Intelligent construction site attendance management method, system and equipment based on block chain and medium
By adopting a blockchain-based attendance management method in smart construction sites, the problem of attendance data being easily tampered with and lack of transparency is solved, and high accuracy, security and transparent attendance management are achieved, reducing management costs.
Patent Information
- Application Number
- CN202411562619.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-05
- Publication Date
- 2025-03-18
AI Technical Summary
The attendance management of smart construction sites has data that is easily tampered with, its accuracy is difficult to guarantee, and its lack of transparency, resulting in information asymmetry, difficulty in supervising and holding data falsely accountable, increasing management costs.
The smart construction site attendance management method based on blockchain is adopted, and the security, accuracy and transparency of attendance data are achieved through technical means such as obtaining clock data, identity identification, encryption processing, smart contracts and consensus mechanisms.
It improves the accuracy and security of attendance data, realizes transparency and decentralization of attendance management, reduces management costs, and improves management efficiency.
Smart Images

Figure CN119649504A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of attendance management technology, and in particular to a blockchain-based smart construction site attendance management method, system, equipment and medium. Background Art
[0002] In recent years, with the rapid development of information technology, smart construction sites have emerged. Smart construction sites have implanted high-tech technologies such as artificial intelligence, sensor technology, and virtual reality into various objects such as buildings, machinery, and personnel wearable facilities. They use modern information technologies such as the Internet of Things, big data, and cloud computing to integrate all aspects of the site, thereby achieving intelligent management. These technologies are not limited to specific types of engineering projects and can be flexibly used in various civil engineering construction sites, whether they are civil buildings, industrial buildings, or municipal roads, bridges, and other infrastructure construction projects.
[0003] However, despite the introduction of a variety of advanced technologies in smart construction sites, it is still not enough to solve the problem of attendance management on construction sites. Attendance management on construction sites has always been a key link in the construction industry. The current attendance management often stores attendance data in a local server, which is easy to be tampered with and difficult to ensure accuracy. In addition, due to the lack of transparency, information asymmetry occurs, making it difficult to supervise and hold accountable for violations of false data, which increases management costs. Summary of the invention
[0004] The main purpose of the embodiments of the present application is to propose a blockchain-based smart construction site attendance management method, system, equipment and medium, aiming to improve the accuracy and security of attendance data and achieve transparency and decentralization of attendance management.
[0005] To achieve the above purpose, one aspect of the embodiments of the present application proposes a blockchain-based smart construction site attendance management method, the method comprising:
[0006] Obtaining the clock-in data of the clock-in personnel for attendance, wherein the clock-in data includes a facial image, attendance time, and attendance location;
[0007] According to the punch-in data and the facial information pre-stored in the blockchain network, the punch-in person is identified by a pre-trained identity recognition model to obtain identity information;
[0008] Adding the identified identity information to the punch-in data through a smart contract;
[0009] Encrypting the punch-in data to obtain a unique attendance ID;
[0010] Obtain attendance record data according to the punch-in data and the unique attendance identifier;
[0011] Verifying the attendance record data through a consensus mechanism, and updating the verified legal attendance record data to the blockchain network;
[0012] The attendance record data of the employees in the blockchain network is counted to obtain the attendance results.
[0013] In some embodiments, the identification of the punch-in person is performed using a pre-trained identity recognition model based on the punch-in data and the facial information pre-stored in the blockchain network to obtain the identity information, including the following steps:
[0014] Extracting features from the facial image to obtain facial features;
[0015] The facial features are compared with the facial information pre-stored in the blockchain network through the identity recognition model to obtain feature similarity;
[0016] Based on a preset similarity threshold, the identity information of the clock-in person is determined according to the feature similarity.
[0017] In some embodiments, the step of determining the identity information of the clock-in person based on the feature similarity based on a preset similarity threshold comprises the following steps:
[0018] When the feature similarity is greater than or equal to a preset similarity threshold, the identity information matching the facial information is determined as the identity information of the person punching the card.
[0019] In some embodiments, encrypting the punch-in data to obtain a unique attendance identifier includes the following steps:
[0020] Performing a hash operation on the identity information to obtain a first hash value;
[0021] Performing a hash operation on the attendance time to obtain a second hash value;
[0022] Performing a hash operation on the attendance location to obtain a third hash value;
[0023] Synthesize the first Hash value, the second Hash value, and the third Hash value based on a preset rule to obtain a fourth Hash value;
[0024] Performing a hash operation on the fourth Hash value to obtain a fifth Hash value;
[0025] The fifth Hash value is determined as the unique attendance identifier.
[0026] In some embodiments, the counting of the attendance record data of employees in the blockchain network to obtain attendance results includes the following steps:
[0027] Extracting the employee's attendance record data from the blockchain network;
[0028] Performing data cleaning on the attendance record data, and classifying and marking the cleaned attendance record data, wherein the classification marks include a late arrival mark and an early leave mark;
[0029] Attendance statistics are performed according to the classification marks to obtain attendance results.
[0030] In some embodiments, the blockchain-based smart construction site attendance management method further includes the following steps:
[0031] Obtain the social security payment records of the project manager;
[0032] The attendance results are verified according to the social security payment records through smart contracts to determine whether the project manager has engaged in affiliation behavior;
[0033] When a project manager engages in abusive behavior, an early warning message will be issued.
[0034] In some embodiments, the blockchain-based smart construction site attendance management method further includes the following steps:
[0035] Establishing temporary accounts for migrant workers;
[0036] The attendance record data and work status data of the mobile workers are recorded in the temporary account and stored in the blockchain network.
[0037] To achieve the above purpose, another aspect of the embodiment of the present application proposes a blockchain-based smart construction site attendance management system, the system comprising:
[0038] The first module is used to obtain the punch-in data of the punch-in personnel for attendance, wherein the punch-in data includes facial image, attendance time and attendance location;
[0039] The second module is used to identify the punch-in person through a pre-trained identity recognition model based on the punch-in data and the facial information pre-stored in the blockchain network to obtain identity information;
[0040] The third module is used to add the identified identity information to the punch-in data through a smart contract;
[0041] The fourth module is used to encrypt the punch-in data to obtain a unique attendance identification;
[0042] A fifth module is used to obtain attendance record data according to the punch-in data and the unique attendance identifier;
[0043] The sixth module is used to verify the attendance record data through a consensus mechanism, and update the verified legal attendance record data to the blockchain network;
[0044] The seventh module is used to count the attendance record data of employees in the blockchain network to obtain attendance results.
[0045] To achieve the above objective, another aspect of an embodiment of the present application provides an electronic device, the electronic device comprising a memory and a processor, the memory storing a computer program, and the processor implementing the above method when executing the computer program.
[0046] To achieve the above objective, another aspect of an embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and the computer program implements the above method when executed by a processor.
[0047] The embodiments of the present application include at least the following beneficial effects: The present application provides a blockchain-based smart construction site attendance management method, system, electronic device and storage medium. The solution obtains the clock-in data of the clock-in personnel for attendance; based on the clock-in data and facial information pre-stored in the blockchain network, the identity of the clock-in personnel is identified through a pre-trained identity recognition model to obtain identity information; the identified identity information is added to the clock-in data through a smart contract; the clock-in data is encrypted to obtain a unique attendance identifier; attendance record data is obtained based on the clock-in data and the unique attendance identifier; the possibility of data tampering is reduced, and the accuracy and security of the attendance data are improved.
[0048] The attendance record data is verified through a consensus mechanism, and the verified legal attendance record data is updated to the blockchain network, which can achieve transparency and decentralization of attendance management.
[0049] By counting the attendance record data of employees in the blockchain network and obtaining attendance results, management efficiency can be improved and management costs can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 It is a flowchart of a blockchain-based smart construction site attendance management method provided in an embodiment of the present application;
[0051] Figure 2 It is a structural diagram of the intelligent attendance system provided in the embodiment of the present application;
[0052] Figure 3 This is a flow chart of the face recognition technology provided by the embodiment of the present application in the attendance check-in process;
[0053] Figure 4It is a structural diagram of the blockchain technology application provided by the embodiment of the present application;
[0054] Figure 5 is a flow chart of data management provided by an embodiment of the present application;
[0055] Figure 6 This is a flowchart of a blockchain-based smart construction site attendance management method provided by another embodiment of the present application;
[0056] Figure 7 It is a structural diagram of a blockchain-based smart construction site attendance management system provided in an embodiment of the present application;
[0057] Figure 8 It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application is further described in detail below in conjunction with the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. They are only examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the attached claims.
[0059] It is understood that the terms "first", "second", etc. used in this application can be used to describe various concepts in this article, but unless otherwise specified, these concepts are not limited by these terms. These terms are only used to distinguish one concept from another concept. For example, without departing from the scope of the embodiment of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein can be interpreted as "at the time of" or "when" or "in response to determination".
[0060] The terms "at least one", "multiple", "each", "any", etc. used in this application, at least one includes one, two or more, multiple includes two or more, each refers to each of the corresponding multiple, and any refers to any one of the multiple.
[0061] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0062] Before describing the embodiments of the present application in detail, some related technologies involved in the embodiments of the present application are first described.
[0063] With the continuous advancement of technology, deep learning technology helps to accurately identify personnel, and traceability technology ensures that data is transparent and traceable. However, relying solely on these technologies is still not enough to completely solve the problems of data being easily tampered with, accuracy being difficult to guarantee, and lack of transparency in smart construction site attendance, leading to information asymmetry, supervision and accountability mechanisms.
[0064] In view of this, an embodiment of the present application provides a blockchain-based smart construction site attendance management method, system, device and medium. The solution obtains the clock-in data of the clock-in personnel for attendance; identifies the clock-in personnel through a pre-trained identity recognition model based on the clock-in data and facial information pre-stored in the blockchain network to obtain identity information; adds the identified identity information to the clock-in data through a smart contract; encrypts the clock-in data to obtain a unique attendance identifier; obtains attendance record data based on the clock-in data and the unique attendance identifier; can reduce the possibility of data tampering and improve the accuracy and security of attendance data.
[0065] The attendance record data is verified through a consensus mechanism, and the verified legal attendance record data is updated to the blockchain network, which can achieve transparency and decentralization of attendance management.
[0066] By counting the attendance record data of employees in the blockchain network and obtaining attendance results, management efficiency can be improved and management costs can be reduced.
[0067] The blockchain-based smart construction site attendance management method provided in the embodiment of the present application relates to the field of attendance management technology. The blockchain-based smart construction site attendance management method provided in the embodiment of the present application can be applied to a terminal, can also be applied to a server, and can also be software running in a terminal or a server. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, and a car terminal, etc., but is not limited to this; the server side can be configured as an independent physical server, or it can be configured as a server cluster or distributed system composed of multiple physical servers, and can also be configured to provide cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms and other basic cloud computing services. The server can also be a node server in the blockchain network; the software can be an application that implements a blockchain-based smart construction site attendance management method, etc., but is not limited to the above forms.
[0068] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0069] It should be noted that in each specific implementation of the present application, when it comes to the need to perform relevant processing based on data related to user identity or characteristics such as user information, user behavior data, user historical data, and user location information, the user's permission or consent will be obtained first, and the collection, use, and processing of these data will comply with relevant laws, regulations, and standards. In addition, when the embodiment of the present application needs to obtain the user's sensitive personal information, the user's separate permission or consent will be obtained through a pop-up window or by jumping to a confirmation page. After clearly obtaining the user's separate permission or consent, the necessary user-related data for the normal operation of the embodiment of the present application will be obtained.
[0070] Figure 1 This is an optional flowchart of the blockchain-based smart construction site attendance management method provided in the embodiment of the present application. Figure 1 The method may include but is not limited to steps S101 to S107.
[0071] Step S101, obtaining the clock-in data of the clock-in personnel for attendance, wherein the clock-in data includes a facial image, attendance time and attendance location.
[0072] Specifically, the attendance equipment is used to obtain the punch-in data of the punch-in personnel, where the punch-in data includes facial images, attendance time and attendance location. The facial image is used as key information for identity verification and is used in the subsequent identity recognition process. The attendance time and attendance location are used to mark the specific context in which the attendance behavior occurs.
[0073] For example, attendance equipment is deployed at the entrance of the smart construction site. When the clocking personnel sign in for daily attendance, the camera in the preset area will capture a clearly visible image of the face and record the current timestamp and current location of the shot. The attendance time is determined based on the current timestamp, and the attendance location is determined based on the current location.
[0074] Step S102, based on the punch-in data and the facial information pre-stored in the blockchain network, the identity of the punch-in person is identified through a pre-trained identity recognition model to obtain identity information.
[0075] Specifically, the facial information and identity information of each employee are stored in the blockchain in advance, the facial information and the corresponding identity information are labeled and associated, and a deep learning algorithm is used to train an identity recognition model that can accurately match facial information and identity information.
[0076] During the clocking-in process, the pre-trained identity recognition model is used to automatically identify the clocking-in person based on the clocking-in data and the facial information pre-stored in the blockchain network, verify the identity of the clocking-in person, and ensure that it is the person who is doing the operation. The identity recognition model can extract facial features from the facial image and match them with the stored information. When the match is successful, the identity information of the clocking-in person can be obtained, such as name or work number, which can clearly identify the individual.
[0077] It should be noted that if matching identity information cannot be found when performing identity recognition based on the punch-in data and facial information pre-stored in the blockchain network, it indicates that the recognition has failed. The failure record needs to be saved in the exception database and uploaded to the blockchain so that managers can view the sign-in anomalies.
[0078] Step S103, adding the recognized identity information to the clock-in data through the smart contract.
[0079] Specifically, in order to ensure the accuracy and traceability of attendance, when the identity recognition model successfully identifies and obtains the identity information, it is also necessary to associate the punch-in data with the identity information. This process can automatically add the identified identity information to the punch-in data through smart contracts. Smart contracts are automatically executed contracts that define the data processing rules and logic. Smart contracts will integrate identity information with attendance time, attendance location and other data according to preset rules to form complete punch-in data, providing a basis for subsequent data analysis and processing.
[0080] Step S104, encrypt the punch-in data to obtain a unique attendance ID.
[0081] Optionally, in order to ensure the security and privacy of the attendance data, the sorted punch-in data is encrypted. This step usually involves using encryption techniques such as hash algorithms to convert the punch-in data into a unique, unalterable identifier, namely a unique attendance identifier.
[0082] For example, a hash algorithm with the characteristics of one-way and collision resistance, such as SHA-256, can be used to encrypt the punch-in data, and the punch-in data is converted into a hash value to obtain a unique attendance identification.
[0083] Step S105, obtaining attendance record data according to the punch-in data and the unique attendance identifier.
[0084] Specifically, after the encryption process is completed, the final attendance record data is obtained based on the punch-in data and the unique attendance identifier as the data part of the transaction.
[0085] In step S105 of another embodiment, the unique attendance identifier itself can also be used as the data part of the transaction to obtain the final attendance record data.
[0086] Step S106, verify the attendance record data through a consensus mechanism, and update the verified legal attendance record data to the blockchain network.
[0087] It is understandable that the consensus mechanism is a key component of blockchain technology, which can ensure the consistency and reliability of data on all nodes of the blockchain. After the attendance record data is generated, it is broadcast to each node of the blockchain. Then each node in the blockchain network verifies the attendance record data through the consensus mechanism. According to the rules of the consensus algorithm, the nodes compete to generate new blocks. When the transaction is confirmed to be valid, the verified legal attendance record data will be updated to the blockchain network.
[0088] Specifically, when a new node joins the network, it obtains the initial blockchain state, downloads a copy of the blockchain and verifies its integrity and validity to ensure that it starts running from the correct state. Once a new transaction is generated, the node broadcasts the transaction to other nodes in the network.
[0089] Then, through the consensus mechanism, each node verifies the received transactions and data. After receiving the new block, other nodes will verify the legitimacy of the block, the validity of the transaction, and the hash value. If the new block passes the verification, each node will add it to the local blockchain to update the ledger, and the node will also update the local blockchain status. Once the transaction is confirmed and added to the blockchain, the hash value becomes the unalterable identifier of the attendance record on the blockchain. The authenticity, integrity, and traceability of the attendance record data are ensured, and any tampering with the attendance record will cause a change in the hash value, which can be easily detected.
[0090] Optionally, for smart construction site attendance, since more emphasis is placed on efficiency and manageability, it can be stored in the blockchain in a chain structure or a tree structure.
[0091] It should be noted that when choosing a consensus mechanism, factors such as application scenarios, performance requirements, and security requirements need to be considered. Common consensus mechanisms include Proof of Work (PoW), Proof of Stake (PoS), and Delegated Proof of Stake (DPoS).
[0092] After selecting the consensus mechanism, you need to process it accordingly. For example, when PoW is selected as the consensus mechanism, nodes need to compete for the right to record by calculating the hash value; or, when Pos is selected as the consensus mechanism, nodes need to participate in the bookkeeping according to the number of tokens held; if DPoS is selected as the consensus mechanism, the coin holders vote to select the representative node to record the bookkeeping. Different consensus mechanisms are processed differently, but the overall goal is to ensure the consistency and security of the blockchain network.
[0093] Step S107, counting the attendance record data of employees in the blockchain network to obtain the attendance results.
[0094] Specifically, the attendance record data of employees in the blockchain network is counted. This process usually involves using data mining, machine learning and other technologies to extract and analyze key information in the attendance record data, such as lateness, early departure, and attendance rate, and obtain attendance results through in-depth analysis of the data.
[0095] In this embodiment, blockchain technology is used for smart construction site attendance management to ensure that attendance record data cannot be modified once uploaded, effectively preventing data tampering. Verification and recording are performed through smart contracts to ensure the authenticity and security of data. Through the distributed characteristics of blockchain, attendance data is stored on multiple nodes to achieve decentralized management. By deeply analyzing the attendance record data on the blockchain, management efficiency is improved and management costs are reduced.
[0096] In some embodiments, step S102 may include but is not limited to steps S201 to S203.
[0097] Step S201, extracting features from the facial image to obtain facial features.
[0098] Specifically, image processing technology is used to extract features from facial images to obtain facial features. Facial features refer to the position and shape of facial contours, eyes, nose and mouth.
[0099] Optionally, in order to improve the data processing speed of the image, the facial image may be preprocessed before feature extraction is performed on the facial image.
[0100] Furthermore, the preprocessing specifically includes filtering processing, grayscale processing and face detection.
[0101] First, a filtering algorithm is used to remove noise from the image.
[0102] Next, considering that the facial images collected by the attendance equipment are generally color images, since color images occupy a large storage space and the processing process is complicated, while grayscale images are relatively simple to process and have a fast processing speed, color images can be converted into grayscale images.
[0103] Alternatively, the imaging principle of color images is that the color of each pixel is determined by the three primary colors of light (red R, green G, blue B), and different colors can be formed by mixing in different proportions, while grayscale images only contain brightness information and the brightness changes continuously. In order to facilitate the measurement of image grayscale information, the brightness value is quantized into 256 levels from 0 to 255, where 0 represents black and 255 represents white.
[0104] For example, a corresponding relationship between brightness U and the three primary colors of light R, G, and B is established, and the specific calculation method is as shown in formula (1):
[0105] U=0.299R+0.587G+0.114B (1),
[0106] In formula (1), R, G, and B are the three primary color values of light.
[0107] At the same time, the color threshold T can be set to determine whether the color corresponding to the calculated brightness value U is black, white or gray. For example, when the brightness value is less than or equal to the first color threshold, the color corresponding to the brightness value is considered to be black; when the brightness value is greater than the first color threshold and less than the second color threshold, the color corresponding to the brightness value is considered to be gray; when the brightness value is greater than or equal to the second color threshold, the color corresponding to the brightness value is considered to be white. The pixel color judgment formula is as shown in formula (2):
[0108]
[0109] In formula (2), T1 is the first color threshold, and T2 is the second color threshold.
[0110] After grayscale processing is completed, the face detection phase begins. Using the pre-trained deep learning model, automatic face detection and positioning are achieved.
[0111] Step S202, using the identity recognition model, compares the facial features with the facial information pre-stored in the blockchain network to obtain feature similarity.
[0112] Specifically, after extracting the features in the facial image, the facial features are compared with the facial information pre-stored in the blockchain network through the identity recognition model. During the comparison process, a series of algorithms are used to calculate the feature similarity between feature points, such as Euclidean distance and cosine similarity.
[0113] Step S203, based on a preset similarity threshold, determine the identity information of the person punching the card according to the feature similarity.
[0114] Specifically, in order to accurately determine whether the clock-in person is a registered employee, a similarity threshold is preset in the blockchain. Based on the preset similarity threshold, the feature similarity calculated is used to determine whether the similarity threshold is met, thereby determining the identity information of the clock-in person. When the feature similarity meets the similarity threshold, the clock-in person is considered to be a registered employee. If the feature similarity does not meet the similarity threshold, the clock-in person is considered not to be a registered employee.
[0115] In this embodiment, the identity of the person punching the clock is identified through the identity recognition model, and judgment is made based on a preset similarity threshold, which can improve the accuracy of the judgment and effectively reduce the situation where others punch in on behalf of others.
[0116] In some embodiments, step S203 may include but is not limited to step S301.
[0117] Step S301: When the feature similarity is greater than or equal to a preset similarity threshold, the identity information matching the facial information is determined as the identity information of the person punching the card.
[0118] In step S301 of some embodiments, when the calculated feature similarity is greater than or equal to a preset similarity threshold, the identity information is matched according to the facial information used to calculate the feature similarity through a pre-trained identity recognition model, and the identity information is determined as the identity information of the person who punched in.
[0119] In some embodiments, step S104 may include but is not limited to steps S401 to S406.
[0120] Step S401, performing a hash operation on the identity information to obtain a first hash value.
[0121] Exemplarily, identity information is extracted from the attendance record data and encrypted using a hash algorithm. For example, assuming that the employee's identity information is "Name: Zhang San, ID number: 123456787654321", the identity information is used as algorithm input and converted into a fixed-length output using a hash algorithm to obtain a first hash value.
[0122] Step S402, performing a hash operation on the attendance time to obtain a second hash value.
[0123] Exemplarily, the attendance time is extracted from the attendance record data, and the attendance time is encrypted using a hash algorithm. For example, assuming that Zhang San's clocking in time is "2024-03-01 07:58:00", this time string is used as the algorithm input for hash operation to obtain a second hash value.
[0124] Step S403, performing a hash operation on the attendance location to obtain a third hash value.
[0125] For example, the attendance location is also a key information in the attendance record, which records which smart construction site the clock-in personnel is at or from which entrance. In order to ensure the accuracy and non-tamperability of the information, the attendance location is extracted from the attendance record data, and the attendance location is hashed to obtain the third hash value.
[0126] Step S404: synthesize the first Hash value, the second Hash value, and the third Hash value based on a preset rule to obtain a fourth Hash value.
[0127] Specifically, after obtaining the first Hash value, the second Hash value and the third Hash value, they are synthesized based on a preset rule to obtain a fourth Hash value.
[0128] Optionally, the synthesis rule may be to concatenate the first Hash value, the second Hash value and the third Hash value to obtain the fourth Hash value, or to perform an XOR operation on the first Hash value, the second Hash value and the third Hash value to obtain the fourth Hash value.
[0129] Step S405: Perform a hash operation on the fourth hash value to obtain a fifth hash value.
[0130] It can be understood that in order to further improve the security and non-tamperability of the data, after the fourth hash value is synthesized, the fourth hash value can be hashed again to obtain a unique hash value (ie, the fifth hash value).
[0131] Step S406: determine the fifth Hash value as the unique attendance identifier.
[0132] Specifically, the fifth hash value is determined as the unique attendance identifier corresponding to the attendance record data, which will be used as the unique identity of the attendance record data on the blockchain for subsequent query, verification and tracing. If any information in the attendance record data is tampered with, the generated hash value will also change, which can be easily detected.
[0133] In this embodiment, the security and reliability of the data are improved by encrypting the attendance record data, and the hash value is used as the attendance identifier, so that the traceability of the attendance data can be achieved and the tampering of the attendance record can be discovered in time.
[0134] In some embodiments, step S107 may include but is not limited to steps S501 to S503.
[0135] Step S501, extracting employee attendance record data from the blockchain network.
[0136] Specifically, by interacting with the blockchain network through smart contracts, the attendance record data of employees stored on the blockchain is extracted, including each employee's identity information, attendance time, and attendance location. Due to the immutability of the blockchain, these data cannot be modified once recorded, ensuring the authenticity and reliability of the data.
[0137] Step S502, cleaning the attendance record data, and classifying and marking the cleaned attendance record data, wherein the classification marks include a late arrival mark and an early leave mark.
[0138] Specifically, after the attendance record data is extracted, the attendance record data is cleaned, and the data cleaning includes removing duplicate data, processing missing data and other operations, and the cleaned attendance record data is classified and marked, wherein the classification marks include lateness marks and early departure marks.
[0139] Step S503, performing attendance statistics according to the classification mark to obtain the attendance result.
[0140] Specifically, smart contracts are used to assist in attendance statistics, and indicators such as employees' attendance days, number of latenesses, number of early departures, etc. are calculated based on classification marks to obtain attendance results.
[0141] In this embodiment, the attendance data is analyzed through blockchain technology, which can achieve transparency, efficiency and intelligence in attendance management.
[0142] In some embodiments, the blockchain-based smart construction site attendance management method may also include but is not limited to steps S601 to S603.
[0143] Step S601, obtaining the social security payment record of the project manager.
[0144] Specifically, with regard to the issue of project managers relying on others, if the company provides social security for project managers, it can effectively curb the phenomenon of relying on others for qualification certificates. Paying social security for affiliated personnel means that the company needs to bear additional costs, and social security payment records are one of the key points of inspection by the labor inspection department. If the company pays social security for affiliated personnel, then this behavior is more likely to be discovered by the regulatory agency. Once it is verified that there is affiliation, the company may face serious consequences such as fines and revocation of qualifications. Therefore, project managers are required to provide information including qualification certificates and social security payment records when registering, so as to facilitate subsequent supervision of the affiliation situation.
[0145] Step S602: Verify the attendance results based on the social security payment records through smart contracts to determine whether the project manager has engaged in any affiliation behavior.
[0146] Specifically, set up automatic supervision by smart contracts, verify the project manager's attendance results based on the social security payment records, and determine whether the project manager has engaged in affiliation. If the project manager's attendance results do not match the social security payment records, for example, the project manager has not appeared on the project for several consecutive days without the company's leave permission, but the social security is still being paid, or the social security payment unit is inconsistent with the project unit, or the social security payment is only paid for one to two months and then suspended, then the project manager is considered to have engaged in affiliation.
[0147] Step S603: When the project manager engages in affiliation, a warning message is issued.
[0148] Specifically, when the smart contract detects that the project manager is engaging in affiliation, an early warning message will be issued to notify the project manager and management personnel, who will provide a written explanation. If necessary, the early warning message may also be notified to relevant departments for on-site verification, thereby avoiding the issue of construction engineer qualifications being affiliated with others, especially the issue of affiliation in a different place, and promoting the "integration of person and certificate" between project managers and professional qualifications.
[0149] In this implementation, the attendance results of the project manager are verified according to the social security payment records through the smart contract to determine whether the project manager has engaged in affiliation. If the project manager has engaged in affiliation, an early warning message is issued, which can effectively reduce the number of project managers affiliating.
[0150] In some embodiments, the blockchain-based smart construction site attendance management method may also include but is not limited to steps S701 to S702.
[0151] Step S701: Create a temporary account for a migrant worker.
[0152] It should be noted that, considering the existence of highly mobile workers in smart construction sites, the nature of their work is uncertain and temporary, and they may join or leave the construction of the smart construction site at any time. Therefore, it is necessary to establish a temporary account in the system to record the attendance record data and work status of mobile workers.
[0153] Step S702, recording the attendance record data and work status data of the migrant workers into a temporary account and storing it in the blockchain network.
[0154] Specifically, the attendance record data and work status data of migrant workers are recorded in a temporary account and stored in the blockchain network. When the migrant workers leave the construction site, their attendance record data and work status data will be retained on the blockchain for subsequent query and settlement.
[0155] In this embodiment, by establishing a temporary account to record the attendance of mobile workers, not only can the temporary mobile workers be managed effectively, but also the efficiency of attendance work is improved and the management cost is reduced.
[0156] Establishing a blockchain-based smart construction site attendance management system is a complex project that involves the collaboration of multiple components and the deep integration of technologies. Below, the solution of the embodiment of the present invention is introduced and explained in detail in conjunction with specific application examples.
[0157] An embodiment of the present application provides an intelligent attendance system, including a blockchain node, a smart contract, a front-end interface and a database.
[0158] Reference Figure 2 ,Firstly select the appropriate blockchain framework and the number of nodes and ,build a stable and secure blockchain network to obtain the ,intelligent attendance system architecture.
[0159] The nodes are responsible for maintaining the integrity and security of the blockchain, ensuring that the attendance data cannot be tampered with and is traceable. In the smart attendance system, multiple blockchain nodes form a decentralized network. This network has no central node. Each node communicates and exchanges data through a peer-to-peer network, which has high reliability and privacy protection. Each node stores a complete copy of the data, and data is synchronized regularly between nodes. After receiving the data, each node verifies and stores it to ensure the consistency and reliability of the data.
[0160] Specifically, newly added nodes find other nodes and establish connections through the network discovery mechanism, while verifying the node identity and legitimacy; a stable and reliable network topology is built between nodes through communication protocols; secure data transmission protocols are used between nodes for data transmission and sharing, and encryption technology is used to ensure data security.
[0161] Smart contracts have complete data recording, storage, verification and query functions, which are used to automatically perform attendance recording and verification to improve management efficiency. Smart contracts can define variables and data structures for storing attendance record data, including the identity information of construction workers and project managers, work time stamps, and off-get off work time stamps. Data such as the timestamp and location information of each employee's clock-in can be securely recorded on the blockchain to ensure that the data cannot be tampered with.
[0162] In terms of attendance records, when employees arrive at or leave work, the smart contract automatically records the timestamp and attendance status on the blockchain, facilitating subsequent inquiries and audits.
[0163] In terms of attendance verification, smart contracts ensure that the recorded timestamps are legal and comply with preset attendance rules, such as encoding attendance management rules, including the definition of working hours and off-get off work hours, overtime calculation methods, and leave approval processes. When an employee clocks in, the smart contract automatically uploads the attendance record data to the blockchain. If there is new attendance record data, the legality of the data will be automatically verified and the attendance record data stored on the blockchain will be updated. At the same time, the contract execution results will be recorded on the blockchain, thereby ensuring that the data cannot be tampered with and is traceable.
[0164] In terms of attendance query, smart contracts allow managers to view employee attendance results and generate reports by querying attendance record data on the blockchain and organizing it into an easy-to-read format.
[0165] For abnormal situations, smart contracts can take into account possible network failures, data errors and other exceptions, and can also write corresponding exception handling codes to ensure the stability and reliability of smart contracts.
[0166] The front-end interface is used to facilitate users to log in, register, query attendance records and other functions.
[0167] The registration page should contain necessary user information, such as username, password, etc. During the registration process, the system automatically generates a pair of public and private keys for the user as the user's identity. The private key should be kept properly and only in the hands of the user. After successful registration, a clear success prompt will be displayed, and the user will be informed of the importance of the private key and how to keep it.
[0168] The login page should provide a private key input box, and users need to enter their own private key for identity authentication. After successful login, it will automatically jump to the system main interface; when the login fails, a clear error prompt will be displayed so that the user can correct it in time and allow the user to re-enter the private key.
[0169] After successfully logging in, you can view your personal attendance details at any time through the query interface, including specific attendance dates, work and commuting time records, and whether you have been late or left early.
[0170] The database is used to store employee information, attendance records and other data, and provides data query and retrieval functions. The database can interact with the blockchain to ensure that the attendance data on the blockchain is consistent with the data in the database. During the data synchronization process, we can use the hash value on the blockchain to ensure the consistency and integrity of the data. Whenever a new attendance record is added to the blockchain, a unique hash value is generated. This hash value can be stored in the corresponding record in the database for subsequent data comparison and verification.
[0171] After the intelligent attendance system architecture is built, the information of construction workers and project managers is bound, including face entry and identity entry. The face entry stage requires construction workers and project managers to stand in a designated position, obtain images through image acquisition equipment, and use image processing technology to extract facial features, obtain facial information, summarize the facial information of construction workers and project managers to form a face database, and upload it to the blockchain; in the identity entry stage, the ID card, mobile phone number, social security card, medical insurance card and other identity information that can clearly identify individuals of construction workers and project managers are entered into the system, and the project manager also needs to bind performance. After the above information is stored on the blockchain, it is trained using a deep learning algorithm to establish an identity recognition model that can match facial information and identity information. This model can generate a unique identity recognition identifier for each construction worker and project manager, and in order to ensure the security and authenticity of the data, the identity recognition model will be stored on the blockchain.
[0172] Reference Figure 3 When an employee uses the attendance device to check in with face recognition, the image is acquired through the attendance device. The pre-trained deep learning model is used based on the image information collected by the attendance device to realize automatic detection and positioning of the face. After the face detection and alignment is completed, the image is pre-processed to extract facial features and compare them with the employee's face information pre-stored in the blockchain. During the comparison process, the similarity between the feature points is calculated to determine whether it is a registered employee and complete face recognition. If it is a registered employee, the recognized face information and recorded check-in information will be displayed.
[0173] To ensure the accuracy of the judgment, a similarity threshold is set. If the similarity does not reach the set threshold, it is considered that they are different people, the attendance fails, and the user is prompted to sign in again or take manual review. When face attendance is not feasible, employees can explain the situation to the reviewer, and the reviewer will record and confirm it according to the actual situation.
[0174] If the calculated similarity exceeds this threshold, they are identified as the same person and the attendance is successful. The smart contract is triggered to generate a clock-in data containing employee information, attendance time, and attendance location, which is encrypted and stored in the blockchain.
[0175] Specifically, first, hash operations are performed on employee information, attendance time, and attendance location to obtain their respective hash values. Then, these hash values are concatenated or XORed and hashed again to obtain a unique hash value. This unique hash value will be used as the unique attendance identifier of the attendance record, and together with the encrypted attendance record or itself as the data part of the transaction, it will be packaged into the block of the blockchain.
[0176] The nodes in the blockchain network will verify the legitimacy of the transaction. Once the transaction is confirmed and added to the blockchain, the hash value becomes the unalterable identifier of the attendance record on the blockchain. At the same time, due to the distributed nature of the blockchain, attendance data is stored on multiple nodes, further improving the security and reliability of the data.
[0177] Exemplarily, the hash calculation formula is as follows:
[0178] H(F)=H(H(Y)||H(T)||H(L)) (3),
[0179] In formula (3), H(F) is the concatenated hash value, H(Y) is the hash value of employee information, H(T) is the hash value of attendance time, H(L) is the hash value of attendance location, and “||” represents the concatenation operation.
[0180] The following is a Python code example for calculating the hash value of attendance records.
[0181] import hashlib
[0182] import json
[0183] employee_name="Zhang San"
[0184] face_info = "Specific facial feature description"
[0185] check_in_time="09:00"
[0186] check_out_time="18:00"
[0187] check_in_location="Attendance device at the construction site entrance"
[0188] name_hash = hashlib.sha256(employee_name.encode()).hexdigest()
[0189] face_hash = hashlib.sha256(face_info.encode()).hexdigest()
[0190] in_time_hash = hashlib.sha256(check_in_time.encode()).hexdigest()
[0191] out_time_hash = hashlib.sha256(check_out_time.encode()).hexdigest()
[0192] location_hash = hashlib.sha256(check_in_location.encode()).hexdigest()
[0193] data = {
[0194] "employee_name": employee_name,
[0195] "face_info": face_info,
[0196] "check_in_time": check_in_time,
[0197] "check_out_time": check_out_time,
[0198] "check_in_location": check_in_location
[0199] }
[0200] data_json = json.dumps(data)
[0201] hash_object = hashlib.sha256(data_json.encode())
[0202] overall_hash = hash_object.hexdigest()
[0203] print(f"Employee name hash value: {name_hash}")
[0204] print(f"Face information hash value: {face_hash}")
[0205] print(f"Working time hash value: {in_time_hash}")
[0206] print(f"Off-duty time hash value: {out_time_hash}")
[0207] print(f"Check-in location hash value: {location_hash}")
[0208] print(f"Overall attendance data hash value: {overall_hash}").
[0209] Reference Figure 2 For the management of temporary construction workers, a temporary account is established in the system to record their attendance information and work status. When temporary construction workers leave the construction site, their attendance data and work records will be retained on the blockchain for subsequent query and settlement. In this way, not only can temporary mobile construction workers be managed effectively, but also work efficiency is improved and management costs are reduced.
[0210] In order to solve the problem of project managers being dependent on others, project managers also need to bind their own performance. The work performance of project managers plays a very important role in the entire project bidding process. Performance can reflect the performance and level of commitment of project managers at work, and indirectly understand the quality and results of the work of project managers during working hours, so as to have a more comprehensive assessment of their attendance. Combining performance with attendance can help motivate project managers to treat their work more seriously and responsibly.
[0211] Conduct in-depth analysis of the attendance data on the blockchain, collect attendance information, and feed the information back to the finance departments of Party A and Party B so that the two parties can check salary performance and achieve better management.
[0212] Reference Figure 4 , Figure 4 It is a structural diagram of the blockchain technology application provided in the embodiment of the present application.
[0213] First, generate the data that needs to be recorded and stored, including personal information (such as name, ID number, skill certificate, etc.), social security payment records, and attendance records.
[0214] Then, the collected clock-in data is encrypted to ensure security and privacy.
[0215] Next, the encrypted data is distributed to a distributed ledger consisting of multiple nodes for storage, with each node storing a complete copy of the data.
[0216] The consistency and integrity of the ledger are guaranteed through the consensus mechanism. For the PoW algorithm, nodes compete for the right to generate blocks by calculating complex mathematical problems; for the PoS algorithm, nodes compete based on the proportion of equity they hold.
[0217] Smart contracts are used to automatically execute a series of computer protocols that execute a set of established operations, so that each node in the blockchain can verify transactions and data, ensuring that only legitimate transactions and data can be added to the ledger, effectively preventing malicious node attacks and data tampering.
[0218] In attendance management, a decentralized network is composed of multiple nodes, and management operations such as joining, exiting and troubleshooting are performed on the nodes in the network. By storing data in a distributed ledger composed of multiple nodes, adopting a consensus mechanism, using smart contracts and building a decentralized network composed of multiple nodes, the attendance system can be operated safely, reliably and efficiently, effectively preventing data tampering and improving data transparency and credibility.
[0219] Finally, data is synchronized regularly between nodes to share and transmit data securely.
[0220] Reference Figure 5 The embodiment of the present application also provides a flowchart of data management, including a data collection stage, a data storage stage, a data extraction stage, a data analysis stage, a report generation stage, and a data transmission stage.
[0221] During the data collection stage, construction workers and project managers sign in through facial recognition. After the device records the data, it encrypts it to generate a transaction request and transmits it to the blockchain node.
[0222] During the data storage phase, the blockchain nodes verify and confirm the transaction based on the consensus mechanism. If the verification is successful, the sign-in information will be permanently recorded in the blockchain, forming an unalterable ledger. If the verification fails, an error message will be fed back and a new sign-in will be required.
[0223] In the data extraction stage, data is extracted from the blockchain, the extracted data is formatted and cleaned, and the data is classified and labeled.
[0224] During the data analysis phase, smart contracts assist in counting attendance, calculating indicators such as the number of days workers are at work and the number of times they are late or leave early, and deeply analyzing the relationship between attendance and performance.
[0225] During the report generation stage, design the report content and structure based on the results of data analysis and select the appropriate format to ensure that the report layout is clear and the data presentation is intuitive.
[0226] During the data transmission stage, the generated report is transmitted to the finance department through a secure channel. The finance department can perform salary calculation, performance evaluation and other tasks based on the attendance report.
[0227] Reference Figure 6 , Figure 6 This is a flowchart of a blockchain-based smart construction site attendance management method provided by another embodiment of the present application.
[0228] Facial images are acquired through image acquisition devices, and facial features are extracted to form a facial database, which is then uploaded to the blockchain to ensure the security and non-tamperability of the data.
[0229] At the entrance of the construction site, when construction workers and project managers sign in, cameras in the preset area will capture image information. The system will perform face detection on these images and extract the facial information of the signer. The facial features of the signer are identified using the trained deep learning model and compared with the facial database previously stored on the blockchain.
[0230] If the recognition fails, it means that the sign-in has failed. The system will save the failure record in the exception database and upload it to the blockchain so that the management personnel can view the sign-in exception through the smart terminal.
[0231] If the identification is successful, the identity information and sign-in information of the construction workers and project managers are obtained and uploaded to the blockchain to ensure the authenticity and immutability of the data.
[0232] The attendance check-in information of construction workers and project managers stored in the blockchain network is checked against the preset attendance plan.
[0233] If the match fails, the sign-in fails, and the system will also save the failure record in the exception database and upload it to the blockchain. The manager can view the sign-in exception through the smart terminal.
[0234] If the match is successful, the sign-in is successful, and the system will generate attendance reports for the construction workers and project managers and display them through the smart terminal.
[0235] The smart terminal supports three types of access methods, namely the project manager side, the construction worker side and the administrator side.
[0236] Project manager side: After the project manager successfully logs in, he can enter the system to view his attendance information (including attendance date, get off work time records, and whether he is late or leaves early, etc.), identity information (including bound ID number, work number, mobile phone number, social security card, medical insurance card, etc.), performance information and attendance information of all construction workers. If the login fails, you will not be able to enter the system to view the information.
[0237] It should be noted that the project manager's work performance plays a very important role in the entire project bidding process. Performance can reflect the project manager's performance and level of commitment at work, and indirectly understand the project manager's work quality and results during working hours, so as to have a more comprehensive assessment of his attendance. Combining performance with attendance can help motivate project managers to treat their work more seriously and responsibly.
[0238] Construction worker side: After a construction worker successfully logs in, he can enter the system to view his attendance information and identity information. If the login fails, he cannot enter the system to view the information.
[0239] Administrator side: After the administrator successfully logs in, he can enter the system to view the attendance information, identity information, abnormal sign-in information and project manager affiliation information of all project managers, employees and temporary workers. If the login fails, he cannot enter the system to view the information.
[0240] In this embodiment, intelligent, efficient and secure attendance management is achieved by integrating facial recognition, deep learning and traceability technology and blockchain technology.
[0241] Reference Figure 7 The embodiment of the present application also provides a blockchain-based smart construction site attendance management system, which can implement the above-mentioned blockchain-based smart construction site attendance management method, and the system includes:
[0242] The first module is used to obtain the punch-in data of the punch-in personnel for attendance, wherein the punch-in data includes facial image, attendance time and attendance location;
[0243] The second module is used to identify the punch-in personnel through the pre-trained identity recognition model based on the punch-in data and the facial information pre-stored in the blockchain network to obtain the identity information;
[0244] The third module is used to add the recognized identity information to the clock-in data through smart contracts;
[0245] The fourth module is used to encrypt the punch-in data to obtain a unique attendance ID;
[0246] The fifth module is used to obtain attendance record data based on the punch-in data and the unique attendance identifier;
[0247] The sixth module is used to verify the attendance record data through a consensus mechanism and update the verified legal attendance record data to the blockchain network;
[0248] The seventh module is used to count the attendance record data of employees in the blockchain network and obtain the attendance results.
[0249] It can be understood that the contents of the above method embodiments are all applicable to the present system embodiments, the functions specifically implemented by the present system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0250] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above-mentioned blockchain-based smart construction site attendance management method when executing the computer program. The electronic device can be any smart terminal including a tablet computer, a car computer, etc.
[0251] It can be understood that the contents of the above method embodiments are all applicable to the present device embodiments, the functions specifically implemented by the present device embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0252] Reference Figure 8 , Figure 8 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0253] The processor 901 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0254] The memory 902 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 902 can store an operating system and other applications. When the technical solution provided in the embodiments of this specification is implemented by software or firmware, the relevant program code is stored in the memory 902, and the processor 901 calls and executes the blockchain-based smart construction site attendance management method of the embodiment of this application;
[0255] Input / output interface 903, used to implement information input and output;
[0256] Communication interface 904, used to realize communication interaction between the device and other devices, which can be realized by wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);
[0257] A bus 905 that transmits information between various components of the device (e.g., the processor 901, the memory 902, the input / output interface 903, and the communication interface 904);
[0258] The processor 901 , the memory 902 , the input / output interface 903 and the communication interface 904 are connected to each other in communication within the device via a bus 905 .
[0259] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the above-mentioned blockchain-based smart construction site attendance management method.
[0260] It can be understood that the contents of the above method embodiments are all applicable to the present storage medium embodiments, the functions specifically implemented by the present storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.
[0261] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0262] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0263] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0264] The system embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0265] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0266] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0267] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A blockchain-based smart construction site attendance management method, characterized in that: The method comprises the following steps: Obtaining the clock-in data of the clock-in personnel for attendance, wherein the clock-in data includes a facial image, attendance time, and attendance location; According to the punch-in data and the facial information pre-stored in the blockchain network, the punch-in person is identified by a pre-trained identity recognition model to obtain identity information; Adding the identified identity information to the punch-in data through a smart contract; Encrypting the punch-in data to obtain a unique attendance ID; Obtain attendance record data according to the punch-in data and the unique attendance identifier; Verifying the attendance record data through a consensus mechanism, and updating the verified legal attendance record data to the blockchain network; The attendance record data of the employees in the blockchain network is counted to obtain the attendance results.
2. The method according to claim 1, characterized in that The method of identifying the punch-in person through a pre-trained identity recognition model based on the punch-in data and the face information pre-stored in the blockchain network to obtain the identity information includes the following steps: Extracting features from the facial image to obtain facial features; The facial features are compared with the facial information pre-stored in the blockchain network through the identity recognition model to obtain feature similarity; Based on a preset similarity threshold, the identity information of the clock-in person is determined according to the feature similarity.
3. The method according to claim 2, characterized in that The step of determining the identity information of the clock-in person based on the preset similarity threshold and the feature similarity comprises the following steps: When the feature similarity is greater than or equal to a preset similarity threshold, the identity information matching the facial information is determined as the identity information of the person punching the card.
4. The method according to claim 1, characterized in that: The method of encrypting the punch-in data to obtain a unique attendance identifier includes the following steps: Performing a hash operation on the identity information to obtain a first hash value; Performing a hash operation on the attendance time to obtain a second hash value; Performing a hash operation on the attendance location to obtain a third hash value; Synthesize the first Hash value, the second Hash value, and the third Hash value based on a preset rule to obtain a fourth Hash value; Performing a hash operation on the fourth Hash value to obtain a fifth Hash value; The fifth Hash value is determined as the unique attendance identifier.
5. The method according to claim 1, characterized in that The method of counting the attendance record data of employees in the blockchain network to obtain attendance results includes the following steps: Extracting the employee's attendance record data from the blockchain network; Performing data cleaning on the attendance record data, and classifying and marking the cleaned attendance record data, wherein the classification marks include a late arrival mark and an early leave mark; Attendance statistics are performed according to the classification marks to obtain attendance results.
6. The method according to claim 1, characterized in that The blockchain-based smart construction site attendance management method also includes the following steps: Obtain the social security payment records of the project manager; The attendance results are verified according to the social security payment records through smart contracts to determine whether the project manager has engaged in affiliation behavior; When a project manager engages in abusive behavior, an early warning message will be issued.
7. The method according to claim 1, characterized in that The blockchain-based smart construction site attendance management method also includes the following steps: Establishing temporary accounts for migrant workers; The attendance record data of the mobile workers is uploaded to the temporary account and stored in the blockchain network.
8. A blockchain-based smart construction site attendance management system, characterized in that: The system comprises: The first module is used to obtain the punch-in data of the punch-in personnel for attendance, wherein the punch-in data includes facial image, attendance time and attendance location; The second module is used to identify the punch-in person through a pre-trained identity recognition model based on the punch-in data and the facial information pre-stored in the blockchain network to obtain identity information; The third module is used to add the identified identity information to the punch-in data through a smart contract; The fourth module is used to encrypt the punch-in data to obtain a unique attendance identification; A fifth module is used to obtain attendance record data according to the punch-in data and the unique attendance identifier; The sixth module is used to verify the attendance record data through a consensus mechanism, and update the verified legal attendance record data to the blockchain network; The seventh module is used to count the attendance record data of employees in the blockchain network to obtain attendance results.
9. An electronic device, characterized in that: The electronic device comprises a memory and a processor, the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Data verification method and related device and equipment
CN111339551A
Identity recognition method and system based on block chain
CN113971270A
Block chain-based mobile attendance system and method thereof
CN114187673A
Employee attendance system based on biological feature recognition and block chain
CN117217623A
Real-time multi-mode attendance collection platform and method supporting elastic assessment
CN118470814A