CN110995440B - Work history confirming method, device, equipment and storage medium - Google Patents

Work history confirming method, device, equipment and storage medium Download PDF

Info

Publication number
CN110995440B
CN110995440B CN201911148073.4A CN201911148073A CN110995440B CN 110995440 B CN110995440 B CN 110995440B CN 201911148073 A CN201911148073 A CN 201911148073A CN 110995440 B CN110995440 B CN 110995440B
Authority
CN
China
Prior art keywords
work
hash value
proof
certificate
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911148073.4A
Other languages
Chinese (zh)
Other versions
CN110995440A (en
Inventor
彭芊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201911148073.4A priority Critical patent/CN110995440B/en
Publication of CN110995440A publication Critical patent/CN110995440A/en
Application granted granted Critical
Publication of CN110995440B publication Critical patent/CN110995440B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3236Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials using cryptographic hash functions
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/32Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials
    • H04L9/3247Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols including means for verifying the identity or authority of a user of the system or for message authentication, e.g. authorization, entity authentication, data integrity or data verification, non-repudiation, key authentication or verification of credentials involving digital signatures
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/50Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols using hash chains, e.g. blockchains or hash trees

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The embodiment of the invention discloses a work history confirming method, a device, equipment and a storage medium, wherein the method comprises the following steps: receiving a resume confirmation request submitted by a first user unit; determining a target block marked by the identity identifier from the block chain network, and acquiring a work certification ciphertext of a second work certification from the target block; acquiring a first public key of a second human unit and a second public key of a target object, and decrypting a work certificate ciphertext based on the first public key and the second public key to obtain a hash value of a second work certificate; and performing hash calculation on the first work certificate to obtain a hash value of the first work certificate, and if the hash value of the first work certificate is consistent with the hash value of the second work certificate, returning a history confirmation message to the first user unit. By adopting the embodiment of the invention, the work history of the target object can be confirmed, and the applicability is high.

Description

Work history confirming method, device, equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method, an apparatus, a device, and a storage medium for confirming a work history.
Background
At present, with the continuous development of economic level, the frequency of staff to replace the personnel unit is higher and higher. When the employing unit carries out employee recruitment, the employing unit is evaluated mainly through information such as work histories provided in resumes of the employing unit, and whether to allow the employing unit to carry out the applying process of the next round or directly record is determined. Since resumes are provided by the applicants themselves, the employment organization cannot judge the authenticity of the work history provided by the applicants, and will usually conduct a personal survey to verify the authenticity of the work history provided by the applicants. On the other hand, when the employee presents the proof of work by another person unit to the person unit, the person unit cannot judge the authenticity of the proof of work.
Because the employee's work identification, resume information and the like are difficult to verify, the time cost, labor cost and the like generated in the verification process bring serious losses to relevant personnel units, and therefore, how to effectively verify the work history of the employee and/or the applicant becomes a problem to be continuously solved.
Disclosure of Invention
Embodiments of the present invention provide a work history confirmation method, device, apparatus, and storage medium, which can complete confirmation of work histories of a target object and have high applicability.
In a first aspect, an embodiment of the present invention provides a work history confirmation method, where the method includes:
receiving a history confirmation request submitted by a first person unit, and acquiring a first work certificate and an identity of a target object carried by the history confirmation request, wherein the first work certificate is used for explaining a work history corresponding to the target;
determining a target block of the identity mark from a block chain network, and acquiring a work certification ciphertext of a second work certification from the target block, wherein the second work certification is a description of a work history which is provided by a second human unit and is used for certifying that the target object is in the second human unit before leaving the job;
acquiring a first public key of the second user unit and a second public key of the target object, and decrypting the work certificate ciphertext based on the first public key and the second public key to obtain a hash value of the second work certificate;
sending the hash value of the second work certificate to a consensus node so that the consensus node verifies the hash value of the second work certificate and generates a signature confirmation message after the verification is passed;
and receiving a signature confirmation message sent by the consensus node, performing hash calculation on the first work certificate to obtain a hash value of the first work certificate when the signature confirmation message meets a preset consensus strategy, and returning a record confirmation message to the first human unit if the hash value of the first work certificate is consistent with the hash value of the second work certificate.
With reference to the first aspect, in a possible implementation manner, before the receiving the resume confirmation request submitted by the first person unit, the method further includes:
receiving a work certificate storage request submitted by a second person unit, and acquiring a second work certificate and a digital signature of the second work certificate carried by the work certificate storage request, wherein the second work certificate is used for explaining a work history of a target object in the second person unit;
determining whether the work certification storage request is a valid request or not based on the digital signature, and if the work certification storage request is a valid request, acquiring a first private key of the second user unit and a second private key of the target object;
encrypting the second working certificate based on the first private key and the second private key to obtain a working certificate ciphertext of the second working certificate, packaging the working certificate ciphertext into a target block, and adding the target block into a block chain network;
and generating an identity mark based on the identity information of the target object, marking the target block based on the identity mark and returning a storage confirmation message to the second person unit.
With reference to the first aspect, in one possible implementation manner, the encrypting the second work certificate based on the first private key and the second private key to obtain a work certificate ciphertext of the second work certificate includes:
performing hash calculation on the second work certificate to obtain a hash value of the second work certificate;
encrypting the hash value of the second work certificate based on the first private key to obtain an encrypted hash value of the second work certificate;
and encrypting the encrypted hash value of the second work proof based on the second private key to obtain a work proof ciphertext of the second work proof.
With reference to the first aspect, in a possible implementation manner, the decrypting the work certificate ciphertext based on the first public key and the second public key to obtain the hash value of the second work certificate includes:
decrypting the work certification ciphertext of the second work certification based on the second public key to obtain an encrypted hash value of the second work certification;
and decrypting the encrypted hash value of the second work certificate based on the first public key to obtain the hash value of the second work certificate.
With reference to the first aspect, in a possible implementation manner, the work certification request further carries resume information of the target object, and the hash value of the second work certification is a fuzzy hash value; the method further comprises the following steps:
acquiring work history information in the resume information, and determining a fuzzy hash value of the work history information;
determining a weighted editing distance from the fuzzy hash value of the work history information to the hash value of the second work proof;
determining a first length of a fuzzy hash value of the work history information and a second length of a hash value of the second proof of work, and determining a ratio of a total length of the first length and the second length to the weighted edit distance;
determining the similarity between the fuzzy hash value of the work record information and the hash value of the second work proof based on the ratio;
and if the similarity is larger than a preset threshold value, returning the history confirmation message to the first user unit.
With reference to the first aspect, in one possible implementation manner, the determining the fuzzy hash value of the work history information includes:
dividing the work history information to obtain a plurality of pieces of information, wherein the sum of the lengths of the plurality of pieces of information is not less than the length of the work history information;
respectively carrying out hash calculation on each piece of fragmentation information to obtain a hash value of each piece of fragmentation information;
and connecting the hash values of the pieces of information to obtain the fuzzy hash value of the work history information.
With reference to the first aspect, in a possible implementation manner, the determining whether the working certificate storage request is a valid request based on the digital signature includes:
acquiring a third public key of the second user unit, and decrypting the digital signature based on the third public key to obtain first summary information of the second work certificate;
performing hash calculation on the second work certificate to obtain second summary information of the second work certificate;
comparing the first summary information with the second summary information, and if the first summary information is consistent with the second summary information, determining that the work certification storage request is a valid request;
and if the first summary information is inconsistent with the second summary information, determining that the operation certification storage request is an invalid request.
In a second aspect, an embodiment of the present invention provides a work history confirmation apparatus, including:
the system comprises a first receiving module, a second receiving module and a third receiving module, wherein the first receiving module is used for receiving a resume confirmation request submitted by a first person unit, and acquiring a first work certificate and an identity of a target object carried by the resume confirmation request, and the first work certificate is used for explaining a work resume corresponding to the target;
a first obtaining module, configured to determine a target block of the id tag from a block chain network, and obtain a work certification ciphertext of a second work certification from the target block, where the second work certification is a description of a work history that is provided by a second user unit and used for certifying that the target object is before the target object leaves the job;
a first processing module, configured to obtain a first public key of the second user unit and a second public key of the target object, and decrypt the work certificate ciphertext based on the first public key and the second public key to obtain a hash value of the second work certificate;
a sending module, configured to send the hash value of the second working certificate to a consensus node, so that the consensus node verifies the hash value of the second working certificate and generates a signature confirmation message after the verification passes;
and the second processing module is used for receiving the signature confirmation message sent by the consensus node, performing hash calculation on the first work certificate to obtain a hash value of the first work certificate when the signature confirmation message meets a preset consensus strategy, and returning a resume confirmation message to the first human unit if the hash value of the first work certificate is consistent with the hash value of the second work certificate.
With reference to the second aspect, in a possible implementation manner, the apparatus further includes:
the second receiving module is further configured to receive a work certificate storage request submitted by a second person unit, and acquire a second work certificate and a digital signature of the second work certificate, where the second work certificate is used to explain a work history of a target object in the second person unit;
the first determining module is further configured to determine whether the work certification storage request is a valid request based on the digital signature, and if the work certification storage request is a valid request, obtain a first private key of the second user unit and a second private key of the target object;
the third processing module is further configured to encrypt the second working certificate based on the first private key and the second private key to obtain a working certificate ciphertext of the second working certificate, pack the working certificate ciphertext into a target block, and add the target block to a block chain network;
and the generating module is also used for generating an identity identifier based on the identity information of the target object, marking the target block based on the identity identifier and returning a storage confirmation message to the second person unit.
With reference to the second aspect, in one possible implementation manner, the third processing module includes:
a first calculating unit, configured to perform hash calculation on the second working certificate to obtain a hash value of the second working certificate;
a first encryption unit, configured to encrypt the hash value of the second work proof based on the first private key to obtain an encrypted hash value of the second work proof;
and the second encryption unit is used for encrypting the encrypted hash value of the second work proof based on the second private key to obtain a work proof ciphertext of the second work proof.
With reference to the second aspect, in one possible implementation manner, the first processing module includes:
a first decryption unit, configured to decrypt the working certificate ciphertext of the second working certificate based on the second public key to obtain an encrypted hash value of the second working certificate;
and the second decryption unit is used for decrypting the encrypted hash value of the second work certificate based on the first public key to obtain the hash value of the second work certificate.
With reference to the second aspect, in a possible implementation manner, the job certification request further carries resume information of the target object, and the hash value of the second job certification is a fuzzy hash value; the above-mentioned device still includes:
the second determining module is further used for acquiring the work history information in the resume information and determining the fuzzy hash value of the work history information;
the third determining module is further configured to determine a weighted editing distance from the fuzzy hash value of the work history information to the hash value of the second work proof;
a fourth determining module, configured to determine a first length of a fuzzy hash value of the work history information and a second length of a hash value of the second work proof, and determine a ratio of a total length of the first length and the second length to the weighted editing distance;
the fourth processing module is further configured to determine, based on the ratio, a similarity between the fuzzy hash value of the work history information and the hash value of the second work proof;
and the returning module is used for returning the history confirmation message to the first person unit when the similarity is greater than a preset threshold value.
With reference to the second aspect, in one possible implementation manner, the second determining module includes:
a slicing unit, configured to divide the work history information to obtain a plurality of pieces of information, where a sum of lengths of the plurality of pieces of information is not less than a length of the work history information;
the second calculation unit is used for respectively carrying out hash calculation on each piece of fragmentation information to obtain a hash value of each piece of fragmentation information;
and a connection unit, configured to connect the hash values of the pieces of information to obtain a fuzzy hash value of the work history information.
With reference to the second aspect, in one possible implementation manner, the first determining module includes:
an obtaining unit, configured to obtain a third public key of the second user unit, and decrypt the digital signature based on the third public key to obtain first digest information of the second work certificate;
the third calculation unit is used for carrying out Hash calculation on the second work certificate to obtain second summary information of the second work certificate;
a first determining unit, configured to compare the first summary information with the second summary information, and determine that the work certification storage request is a valid request if the first summary information is consistent with the second summary information;
a second determining unit, configured to determine that the operation-proof storage request is an invalid request when the first summary information and the second summary information are inconsistent.
In a third aspect, an embodiment of the present invention provides an apparatus, which includes a processor and a memory, where the processor and the memory are connected to each other. The memory is configured to store a computer program that supports the terminal device to execute the method provided by the first aspect and/or any one of the possible implementation manners of the first aspect, where the computer program includes program instructions, and the processor is configured to call the program instructions to execute the method provided by the first aspect and/or any one of the possible implementation manners of the first aspect.
In a fourth aspect, the present invention provides a computer-readable storage medium, which stores a computer program, where the computer program is executed by a processor to implement the method provided by the first aspect and/or any one of the possible implementation manners of the first aspect.
In the embodiment of the invention, a unified working evidence storage platform can be provided for each human consumption unit by storing the working evidence provided by the human consumption unit into the blockchain network, and the safety of information storage can be further improved by encrypting the working evidence again before the working evidence is stored into the blockchain network. Furthermore, the employment of the personnel unit for issuing the working certificate and the public key of the target object can further encrypt the working certificate, thereby avoiding the possibility that irrelevant personnel acquire and check the working certificate of a certain object and having better safety. Meanwhile, the work record information including the work record provided by the target object, the establishment information and the like are subjected to hash calculation and compared with the hash value of the work record of the target object in the block chain network, so that whether the work record information provided by the target object is real information or not can be accurately and efficiently confirmed, and the applicability is higher.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without creative efforts.
FIG. 1 is a schematic diagram of a work history validation method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a work history confirmation method according to an embodiment of the present invention;
fig. 3 is a schematic view of a scenario for slicing work history information according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a scenario for determining a weighted edit distance according to an embodiment of the present invention;
FIG. 5 is a schematic flow chart illustrating a method for confirming job histories according to an embodiment of the present invention;
FIG. 6 is a diagram illustrating a scenario of a verify-proof-of-work storage request according to an embodiment of the present invention;
FIG. 7 is a schematic structural diagram of a work history confirmation apparatus according to an embodiment of the present invention;
fig. 8 is a schematic structural diagram of an apparatus provided in an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating a method for confirming work histories according to an embodiment of the present invention. As shown in fig. 1, when a history confirmation request 10 submitted by a first person unit is received, a normalization working certificate 101 and an identification 102 of a target object carried in the history confirmation request are acquired. The history confirmation request 10 may be a request submitted by the first human unit to check whether the work history of the target object is accurate when the target object asks for a job to the first human unit, or may be a confirmation request submitted by the first human unit when the employee (target object) verifies the work history (if necessary, the working life of the target object is determined according to the work specification of the target object), and the specific scenario is not limited herein. The identification 102 of the target object may be identification information used for identifying a personal identity corresponding to the target object, such as a name and an identification number of the target object, and may be determined based on an actual application scenario, which is not limited herein. Further, the first work certificate 101 of the target object is a certificate which is submitted to the first human unit by the target object and is used for explaining the work history of the target corresponding to the second human unit before the first human unit enters the job, and since the first work certificate 101 is submitted to the first human unit by the target object, the first human unit can submit the history confirmation request 10 to determine whether the work history described in the first work certificate 101 submitted by the target object is real and valid.
Further, after receiving the resume confirmation request 10 submitted by the first human unit, the target block 20 marked by the identity 102 may be determined from the block chain network based on the identity 102 of the target object, and the ciphertext 30 of the second proof of work of the target object may be obtained from the target block 20. In the process, the ciphertext 30 of the second operation certificate stored in the target block 20 is provided by the second user unit (the last operation unit of the target object) and uploaded to the block chain network. At this time, the ciphertext 30 of the second proof of work may be decrypted based on the first public key 401 (the public key of the second user unit) and the second public key 402 of the target object, so as to obtain the hash value 50 of the second proof of work (the second proof of work is stored in the target block in a hash form). Still further, the hash value 50 of the second work proof may be sent to a common node (such as the common node 60a, the common node 60b, and the common node 60 c) in the blockchain network, so that the common node 60a, the common node 60b, and the common node 60c verify the hash value of the second work proof and generate a signature confirmation message after the verification is passed, and when the generated signature confirmation message satisfies a preset common policy, the hash value 70 of the first work proof may be obtained by performing hash calculation on the first work proof 101. At this time, if the hash value 70 of the first proof of work is completely consistent with the hash value 50 of the second proof of work stored in the block chain, it indicates that the first proof of work 101 submitted to the first person unit by the target object is completely consistent with the second proof of work issued by the second person unit as the target object stored in the block chain, and at this time, a history confirmation message may be returned to the first person unit to inform the first person unit that the work history of the target object in the first proof of work 101 received by the first person unit is not falsified.
The common node 60a, the common node 60b, and the common node 60c are only some nodes in the block chain network, and the number of the specific common nodes may be determined based on an actual application scenario, which is not limited herein.
Referring to fig. 2, fig. 2 is a flow chart of a work history confirmation method according to an embodiment of the present invention. The work history confirmation method provided in fig. 2 may include the following steps S101 to S105.
S101, receiving a history confirmation request submitted by a first person unit, and acquiring a first working certificate and an identity of a target object carried by the history confirmation request.
In some possible embodiments, the resume confirmation request may be a request submitted by the first human unit when the work resume of the target object needs to be verified in any scenario. For example, when a first human unit receives a job application corresponding to a target, if it is required to determine whether a job record of the target object is true or valid according to a first employee certificate submitted by the target object when submitting the job application, a record confirmation request carrying the first job certificate and an identity of the target object may be submitted. For another example, when the first human unit needs to determine the working age of the target object based on the first working certificate provided by the target, a history confirmation request may also be submitted to determine whether the working history of the target object in the first working certificate is detailed, where the history confirmation request still carries the first working certificate and the id corresponding to the target.
The identity of the target object may be an identity card number of the target object, or information which is composed of a name, a native place, a year and month of birth, and the like and can uniquely represent the identity of the target object, and the identity may be determined based on an actual application scenario, which is not limited herein. The identity is used to determine the certification information for certifying whether the first working certificate is authentic from the blockchain network, which is not described herein.
It should be noted that the history confirmation request does not necessarily carry the first proof of work of the target object, but may carry resume information of the target object. For example, when the first human unit receives a job application of the target object, the resume of the target object needs to be preliminarily screened. At this time, it is necessary to verify whether the relevant description about the work history of the target object in the resume information of the target object is true, and the first person unit may submit a history confirmation request carrying the resume information and the identity of the target object.
S102, determining a target block marked by the identity identifier from the block chain network, and acquiring a work certification ciphertext of the second work certification from the target block.
In some possible embodiments, after obtaining the identifier of the target object from the resume confirmation request, a target block corresponding to the identifier of the target object may be determined from the blocks of the block chain network. Specifically, the working certification ciphertext stored with the second working certification of the target object may be determined based on the association relationship between the block height and the identity of each block of the block chain website, or the identity of the target object may be used to mark the target block when the ciphertext of the second working certification of the target object is stored in the block, and the specific implementation manner may be determined based on an actual application scenario, which is not limited herein. In order to further improve the information security based on the security of the second working certificate of the target object stored on the basis of the blockchain network, the second working certificate of the target object can be further encrypted by using a private key of a second user unit and a private key of the target object before the second working certificate of the target object is stored in the blockchain network, so that the data security is improved.
Optionally, after the target block marked with the identity identifier of the target object is determined from the block chain network, the block head of the target block may be analyzed, and then the hash value of the root node of the merkel tree constructed based on the hash values of all the storage information in the block body of the target block is obtained, so that the hash value of the root node is further analyzed to obtain the ciphertext of the second operation certificate of the target object. Optionally, the block body of the target block may be further analyzed to obtain a complete merkel tree in the block body, determine a target leaf node in the merkel tree corresponding to the identity of the target object, and determine storage data corresponding to the target leaf node as a ciphertext of a second operation proof of the target object. In particular, the second working certification ciphertext of the target object stored in the blockchain network is a description of a working history of the target object in the second person unit, which is provided by the second person unit that the target object has worked, and is further encrypted when the second person unit stores the working history in the blockchain network. The second work certificate of the target object can accurately and reliably explain the work history of the target object in the second person unit, and the reliability is high.
S103, a first public key of a second user unit and a second public key of the target object are obtained, and the work certification ciphertext is decrypted based on the first public key and the second public key to obtain a hash value of a second work certification.
In some possible embodiments, after obtaining the ciphertext of the second work proof of the target object from the blockchain network, the first public key of the second human unit and the second public key of the target object may be further obtained to decrypt the ciphertext of the second work proof of the target object, so as to obtain the hash value of the second work proof. The decryption process of the second working certificate may be determined based on an encryption process adopted when the second working certificate is stored in the blockchain network, specifically may be determined based on an actual application scenario, and is not limited herein. For example, in the specific decryption process, the ciphertext of the second work proof may be decrypted first based on the public key of the second human unit to obtain the encrypted hash value of the second work proof, and then the encrypted hash value of the second work proof may be decrypted based on the public key of the target object to obtain the final unencrypted hash value of the second work proof. Optionally, the ciphertext of the second work proof may be decrypted based on the public key of the target object to obtain an encrypted hash value of the second work proof, and then the encrypted hash value of the second work proof may be decrypted based on the public key of the second user unit to obtain a final unencrypted hash value of the second work proof. Optionally, a part of the ciphertext encrypted by the private key of the target object in the ciphertext of the second work proof may be decrypted based on the public key of the target object to obtain a part of the hash value, and another part of the ciphertext encrypted by the private key of the second person unit in the ciphertext of the second work proof may be decrypted based on the public key of the second person unit to obtain another part of the hash value. Further, the two hash values are combined to obtain a complete hash value of the second proof of work. It can be understood that any one of the above decryption processes needs to be determined according to a specific encryption manner of the ciphertext corresponding to the second operation proof, which may be determined based on an actual application scenario, and is not limited herein.
And S104, sending the hash value of the second work certificate to the consensus node so that the consensus node verifies the hash value of the second work certificate and generates a signature confirmation message after the verification is passed.
In some possible embodiments, after determining the hash value of the second proof of work, the hash value of the second proof of work may be sent to a consensus node in the blockchain network, so that the consensus node verifies the hash value of the second proof of work. Specifically, each consensus node may decrypt the ciphertext of the second work proof again based on the public key of the second user unit and the public key of the target object to obtain the hash value of the second work proof, where each consensus node obtains the hash value of the second work proof obtained through decryption. And each consensus node compares the calculated hash value of the second work certificate with the received hash value of the second work certificate, if the calculated hash value of the second work certificate is consistent with the received hash value of the second work certificate, the received hash value of the second work certificate can be determined to be an accurate and effective hash value, and at the moment, the consensus node returns a signature confirmation message. Optionally, the signature confirmation message may be any form of information used to inform that the hash value of the second proof of work verifies, and the specific information content is not limited herein. Meanwhile, the signature confirmation message generated by each consensus node can represent the generation node of the signature confirmation message, so that after the signature confirmation message of each consensus node is received, the consensus node which sends the signature confirmation message can be determined according to the signature confirmation message. Optionally, after generating the signature confirmation message, each common node may perform hash calculation on the signature confirmation message to generate a digest, and encrypt the digest by its own private key to prevent the signature confirmation message from being tampered.
And S105, receiving the signature confirmation message sent by the consensus node, performing hash calculation on the first work certificate to obtain a hash value of the first work certificate when the signature confirmation message meets a preset consensus strategy, and returning a resume confirmation message to the first user unit if the hash value of the first work certificate is consistent with the hash value of the second work certificate.
In some possible embodiments, signature confirmation messages sent by a plurality of consensus nodes in the blockchain network may be received, and when each received signature confirmation message satisfies a preset consensus policy, the hash value of the second proof of work obtained by decrypting the ciphertext of the second proof of work may be determined to be a valid hash value. The preset consensus strategy may be that the hash value of the second operation certificate is considered to be a valid hash value after a certain proportion of the consensus nodes in all the consensus nodes in the blockchain network verify the hash value of the second operation certificate, for example, after a signature confirmation message sent by ninety-five percent of the consensus nodes is received, the hash value of the second operation certificate is considered to be a valid hash value. Or, the preset consensus policy may be that, when receiving the signature confirmation message sent by the multiple consensus nodes in the blockchain network, it is determined whether the consensus node sending the signature confirmation message belongs to the preset consensus node based on the signature in the signature confirmation message, and the hash value of the second operation certificate may be considered to be a valid hash value after the consensus node sending the signature confirmation message is the preset consensus node and/or the consensus node sending the signature confirmation message exceeds all the consensus nodes in the blockchain network by a certain ratio.
It should be particularly noted that the predetermined consensus policy may further include, but is not limited to, a workload certification mechanism (Proof of Work, PoW), a rights and interests certification mechanism (Proof of stamp, PoS), a rights and rights certification mechanism (freed Proof of stamp, DPoS) Practical Byzantine mechanism (PBFT), a Ripple consensus algorithm, and the like, and may be specifically determined based on an actual application scenario, which is not limited herein.
In some possible embodiments, when the signature confirmation message satisfies the predetermined consensus policy, the first working certificate of the target object carried in the work history confirmation request may be hashed to obtain a hash value of the first working certificate. At this time, the hash value of the first work proof may be compared with the hash value of the second work proof obtained above, and if the hash value of the first work proof is completely consistent with the hash value of the second work proof, it may be determined that the contents of the first work proof and the second work proof are completely consistent, and further, it may be determined that the work history of the target object is completely consistent with that described in the second work proof provided by the second human unit. At this time, a history confirmation message may be generated and returned to the first person unit so that the first person unit completes checking the work history of the target object.
In some possible embodiments, if the work history confirmation request submitted by the first human unit carries establishment information of the target object, and the hash value of the second work certificate obtained by decrypting the work certificate ciphertext of the second work certificate stored in the target block is a fuzzy hash value, the work history information of the target object in the resume information may be obtained, and fuzzy hash calculation may be performed on the work history information of the target object to obtain the fuzzy hash value of the work history information of the target object. Specifically, the work history information may be divided into a plurality of pieces of information, and the hash value of each piece of information may be calculated. The fixed-length fragment window can slide in the work record information, and the fixed-length content can be read byte by byte, so that the information in each window is one piece of fragment information. For example, the hash value of abcdef is calculated before, and then the hash value of bcdefg is calculated without being completely recalculated. Based on the above implementation, the total byte length of all the obtained fragment information is not less than the byte length of the work history information. Further, after the hash value of each piece of information is obtained, a hash value sequence may be obtained by concatenating the hash values of each piece of information in the order of arrangement of the job history information, and the hash value sequence may be used as the fuzzy hash value of the job history information. The length of the window may be determined based on an actual application scenario, which is not limited herein, and the byte lengths of the respective pieces of slicing information obtained based on the window with the same fixed length are the same.
For example, please refer to fig. 3, fig. 3 is a schematic view of a scene for slicing the work history information according to an embodiment of the present invention. Assuming that the job history information obtained from the resume information of the target object is "ABCDEFGHIJK", when the byte length of the fragmentation window used for fragmenting the job history is 5, one piece of information "ABCDE" may be selected from the beginning of the job history information as the fragmentation information 1 in the fragmentation window. Further, the fragmentation window is extended backward by 1 byte length (or any one of the fragmentation window is not greater than the byte length of the fragmentation window) to select "BCDEF" from the work history information as fragmentation information 2, and so on, and the operation is stopped until the last word of the work history information is selected from the end of the fragmentation window, so that fragmentation information 1 "ABCDE", fragmentation information 2 "BCDEF", fragmentation information 3 "CDEFG", fragmentation information 4 "def", fragmentation information 5 "EFGHI", fragmentation information 6 "FGHIJ", and fragmentation information 7 "GHIJK" are obtained. At this time, the work history information is divided. The length of the fragmentation window and the number of bytes for performing fragmentation forward delay may be determined based on an actual application scenario, which is not limited herein.
In some possible embodiments, a weighted edit distance from the fuzzy hash value of the work history information to the hash value of the second proof of work may be further determined, a length of the fuzzy hash value of the work history information and a length of the hash value of the second proof of work may be further determined, and a total length of the fuzzy hash value of the work history information and the length of the hash value of the second proof of work may be further determined. The weighted editing distance is how many operations (including insertion, deletion, modification, exchange and the like) are needed at least when the fuzzy hash value of the work history is changed into the fuzzy hash value of the second work proof, different operations correspond to different weight values, and the sum of the weight values corresponding to all the operations at this time is the weighted editing distance from the fuzzy hash value of the work history information to the hash value of the second work proof.
For example, referring to fig. 4, fig. 4 is a schematic view of a scene for determining a weighted edit distance according to an embodiment of the present invention. As shown in fig. 4, the hash value of the work history information is 41405e956e4e, and the hash value of the second proof is 1405e2956e4fe, so it can be easily seen that the following editing steps are required from the fuzzy hash value of the work history information to the hash value of the second proof: delete the first 4 in the fuzzy hash value of the job history information, add 2 between e and 9, and change d to f. Through the steps, the fuzzy hash value of the work record information can be changed into the hash value which is the same as the hash value of the second work proof. Assuming that the weight value corresponding to the deleting operation is x, the weight value corresponding to the adding operation is y, and the weight value corresponding to the changing operation is z, the sum (x + y + z) of the three weight values is the final weighted editing distance.
Further, the ratio of the total length of the fuzzy hash value of the work history information and the length of the hash value of the second work proof to the weighted editing distance can be determined to change the absolute result into a relative result, and then the ratio is mapped to an integer value of 0-100 to obtain the similarity between the fuzzy hash value of the work history information and the hash value of the second work proof. Where 100 identifies that the two hashes are completely identical, and 0 indicates that the two strings are completely dissimilar. When the similarity between the first person unit and the second person unit is larger than the preset threshold, the work history information of the target object can be determined to be real history information, and at the moment, a history confirmation message can be returned to the first person unit to inform the first person unit that the work history information in the resume information of the target object is effective information. The mapping manner and the preset threshold may be determined based on an actual application scenario, and are not limited herein.
Referring to fig. 5, fig. 5 is another schematic flow chart of the work history confirming method according to the embodiment of the present invention. The work history confirmation method shown in fig. 5 may include the following steps S201 to S209.
S201, receiving a work certificate storage request submitted by a second person unit, and acquiring a second work certificate and a digital signature of the second work certificate carried by the work certificate storage request.
In some possible embodiments, since the second proof of work that the second person unit has is a description of the work history of the only certifiable target object in the second person unit, after the second person unit has provided the second proof of work for the target object, the second person unit may submit a work-proof storage request to store the second proof of work into the blockchain network for secure storage of the second proof of work. The second person unit may issue the second operation certificate for the target object when the request for issuing the operation certificate is obtained, for example, when the target object seeks a job for the first person unit, the second person unit may be required to issue the second operation certificate for the target object to assist the work history of the target object in the second person unit, and the second person unit may issue the second operation certificate for the target object. It should be noted that, the specific manner of the second proof of work issuing scenario and the second human unit submitting the storage request of the proof of work may be determined based on the actual application scenario, and is not limited herein.
S202, whether the work proof storage request is an effective request or not is determined based on the digital signature, and if the work proof storage request is the effective request, a first private key of a second user unit and a second private key of a target object are obtained.
In some possible implementations, after receiving a second human-submitted work certification storage request, it may be verified whether the work certification storage request is a valid request based on a second work certification written by the work certification storage request and a digital signature of the second work certification. Specifically, the public key of the second customer unit may be obtained, and the digital signature of the second proof of work is decrypted by using the public key of the second customer unit, so as to obtain summary information (aspect description, hereinafter referred to as first summary information) of the second proof of work. Further, the second proof of work may be hashed to obtain summary information of the second proof of work (for convenience of description, the second summary information is hereinafter referred to as the second summary information), and at this time, the first summary information may be compared with the second summary information. If the first summary information is consistent with the second summary information, the fact that the second working certificate carried by the working certificate is not tampered in the process that the second human unit submits the working certificate storage request is indicated, and therefore the working certificate storage request submitted by the second human unit is indicated to be an effective request. And before the second person unit submits the work certificate storage request, the digital signature of the second work certificate is obtained by encrypting the second work certificate by using the private key of the second person unit.
Referring to fig. 6, fig. 6 is a schematic view of a scenario of a storage request for verification certification according to an embodiment of the present invention. In fig. 6, it is assumed that the digital signature carried in the working certification storage request submitted by the second human unit is "0010101", and at this time, the public key of the second human unit may be obtained and the public key of the second human unit may be used to decrypt the digital signature "0010101" to obtain the first digest "1000100". Meanwhile, the hash calculation can be carried out on the second work certificate carried by the work certificate storage request to obtain a second abstract '1000100' of the second work certificate. At this time, it is easy to see that the first summary "1000100" and the second summary "1000100" are completely consistent, which indicates that the second working certificate carried by the working certificate storage request is not tampered during the process of submitting the working certificate storage request by the second human unit, and further indicates that the working certificate storage request submitted by the second human unit is an effective request.
In some possible embodiments, when the work declaration request submitted by the second person unit is a valid request, the second private key of the second person unit and the second private key of the target object may be further obtained, and the second work declaration is encrypted based on the second private key of the second person unit and the second private key of the target object, where a specific implementation manner of obtaining the second private key of the second person unit and the second private key of the target object may be determined based on an actual application scenario, and is not limited herein.
S203, encrypting the second working certificate based on the first private key and the second private key to obtain a working certificate ciphertext of the second working certificate, packaging the working certificate ciphertext to a target block, and adding the target block into a block chain network.
In some feasible embodiments, when the second working certificate is encrypted based on the first private key of the second human unit and the second private key of the target object, in order to improve the encryption efficiency and the encryption stability, the hash value of the second working certificate may be obtained by performing hash calculation on the second working certificate, and then the hash value of the second working certificate is encrypted by using the first private key of the second human unit and the second private key of the target object. Specifically, the hash value of the second work proof may be encrypted based on the first private key of the second user unit to obtain an encrypted hash value of the second work proof, and then the encrypted hash value of the second work proof may be encrypted based on the second private key of the target object to obtain a final work proof ciphertext of the second work proof. Optionally, the hash value of the second work proof may be encrypted based on the second private key of the target object to obtain an encrypted hash value of the second work proof, and then the encrypted hash value of the second work proof is encrypted based on the first private key of the second human unit to obtain a final work proof ciphertext of the second work proof. Optionally, different parts of the hash value of the second work proof may be encrypted by using the first private key of the second user unit and the second private key of the target object, respectively, to obtain two or more segments of encrypted hash values, and the obtained multiple segments of encrypted hash values are combined to obtain a final work proof ciphertext of the second work proof. The process of encrypting the second working certificate based on the first private key of the second person unit and the second private key of the target object may be determined based on an actual application scenario, and is not limited herein.
In some possible embodiments, after obtaining the working proof ciphertext of the second working proof, the working proof ciphertext may be packed into a target block and the target block may be added to the blockchain network. The work evidence ciphertext of the second work evidence and the work evidence ciphertext of other objects of other user units can be packed together into a new block and the new block is added into the block chain network. Optionally, when there are other working declaration ciphertexts corresponding to the working declaration prescribed by other person units in the target object, all the working declaration ciphertexts corresponding to the target object may be packed into one block, so that the working declaration ciphertexts corresponding to all the working confirmations of the target object may be obtained from one block. It should be particularly noted that, the above specific implementation manner for packing the working certification ciphertext into the target block may be determined based on an actual application scenario, and is not limited herein.
S204, generating an identity mark based on the identity information of the target object, marking the target block based on the identity mark and returning a storage confirmation message to the second person unit.
In some possible embodiments, in order to facilitate the target object and the second human unit to query the target block of the stored working certification ciphertext of the second working certification from the blockchain network, after the target block is added to the blockchain network, an identity may be further generated based on the identity information of the target object, and the target block may be marked based on the identity. The identity may be an identifier that can represent a target object and is obtained by combining one or more of letters, numbers, Chinese characters and character strings. When the target block is marked based on the identity, an association relationship can be established between the identity and the block height of the target block to complete marking of the target block, and the identity can also be stored in a block chain network as a block description of the target block. In addition, after the target block is added to the blockchain network, a storage confirmation message needs to be returned to the second human unit to inform the second human unit that the second work certificate submitted by the second human unit has been successfully stored.
S205, receiving a history confirmation request submitted by a first person unit, and acquiring a first working certificate and an identity of a target object carried by the history confirmation request.
S206, determining the target block marked by the identity identifier from the block chain network, and acquiring the work certification ciphertext of the second work certification from the target block.
S207, a first public key of a second person unit and a second public key of the target object are obtained, and the work certification ciphertext is decrypted based on the first public key and the second public key to obtain a hash value of a second work certification.
And S208, sending the hash value of the second work certificate to the consensus node so that the consensus node verifies the hash value of the second work certificate and generates a signature confirmation message after the verification is passed.
S209, receiving the signature confirmation message sent by the consensus node, and when the signature confirmation message meets the preset consensus strategy, performing hash calculation on the first work certificate to obtain a hash value of the first work certificate, and if the hash value of the first work certificate is consistent with the hash value of the second work certificate, returning a resume confirmation message to the first user unit.
In some possible embodiments, specific implementations of the steps S205 to S209 may refer to implementations shown in steps S101 to S105 in fig. 2, and are not described herein again.
In the embodiment of the invention, a unified working certification storage platform can be provided for each person using unit by storing the working certification made by the person using unit in the blockchain network, and the safety of information storage can be further improved by encrypting the working certification again before the working certification is stored in the blockchain network. Furthermore, the employment of the personnel unit for issuing the working certificate and the public key of the target object can further encrypt the working certificate, thereby avoiding the possibility that irrelevant personnel can acquire and check the working certificate of a certain object, and ensuring better safety. Meanwhile, the work record information including the work record provided by the target object, the establishment information and the like are subjected to hash calculation and compared with the hash value of the work record of the target object in the block chain network, so that whether the work record information provided by the target object is real information or not can be accurately and efficiently confirmed, and the applicability is higher.
Referring to fig. 7, fig. 7 is a schematic structural diagram of a work history confirmation apparatus according to an embodiment of the present invention. The device 1 provided by the embodiment of the invention comprises:
a first receiving module 11, configured to receive a history confirmation request submitted by a first user, and obtain a first work certificate and an identity of a target object carried in the history confirmation request, where the first work certificate is used to describe a work history corresponding to the target;
a first obtaining module 12, configured to determine a target block of the id tag from a block chain network, and obtain a work certification ciphertext of a second work certification from the target block, where the second work certification is a description of a work history that is provided by a second user unit and used for certifying that the target object is before the target object leaves the job;
a first processing module 13, configured to obtain a first public key of the second user unit and a second public key of the target object, and decrypt the work certificate ciphertext based on the first public key and the second public key to obtain a hash value of the second work certificate;
a sending module 14, configured to send the hash value of the second working certificate to a consensus node, so that the consensus node verifies the hash value of the second working certificate and generates a signature confirmation message after the verification is passed;
and a second processing module 15, configured to receive the signature confirmation message sent by the consensus node, perform a hash calculation on the first working certificate to obtain a hash value of the first working certificate when the signature confirmation message satisfies a preset consensus policy, and return a history confirmation message to the first human unit if the hash value of the first working certificate is consistent with the hash value of the second working certificate.
In some possible embodiments, the above-mentioned device 1 further comprises:
the second receiving module 16 is further configured to receive a work certificate storage request submitted by a second person unit, and acquire a second work certificate and a digital signature of the second work certificate, where the second work certificate is used to explain a work history of a target object in the second person unit;
the first determining module 17 is further configured to determine whether the work certification storage request is a valid request based on the digital signature, and if the work certification storage request is a valid request, obtain a first private key of the second user unit and a second private key of the target object;
the third processing module 18 is further configured to encrypt the second working certificate based on the first private key and the second private key to obtain a working certificate ciphertext of the second working certificate, pack the working certificate ciphertext into a target block, and add the target block to a block chain network;
the generating module 19 is further configured to generate an identity identifier based on the identity information of the target object, mark the target block based on the identity identifier, and return a storage confirmation message to the second person unit.
In some possible embodiments, the third processing module 18 includes:
a first calculating unit 181, configured to perform a hash calculation on the second working certificate to obtain a hash value of the second working certificate;
a first encryption unit 182, configured to encrypt the hash value of the second work certificate based on the first private key to obtain an encrypted hash value of the second work certificate;
the second encryption unit 183 is configured to encrypt the encrypted hash value of the second work proof based on the second private key, so as to obtain a work proof ciphertext of the second work proof.
In some possible embodiments, the first processing module 13 includes:
a first decryption unit 131, configured to decrypt the working certificate ciphertext of the second working certificate based on the second public key to obtain an encrypted hash value of the second working certificate;
a second decryption unit 132, configured to decrypt the encrypted hash value of the second work certificate based on the first public key to obtain the hash value of the second work certificate.
In some possible embodiments, the work certification request further carries resume information of the target object, and the hash value of the second work certification is a fuzzy hash value; the above apparatus 1 further comprises:
the second determining module 20 is further configured to obtain the work history information in the resume information, and determine a fuzzy hash value of the work history information;
a third determining module 21, configured to determine a weighted editing distance from the fuzzy hash value of the work history information to the hash value of the second work proof;
a fourth determining module 22, configured to determine a first length of the fuzzy hash value of the work history information and a second length of the hash value of the second work proof, and determine a ratio of a total length of the first length and the second length to the weighted editing distance;
the fourth processing module 23 is further configured to determine, based on the ratio, a similarity between the fuzzy hash value of the work history information and the hash value of the second work proof;
and a returning module 24, configured to return the history confirmation message to the first user unit when the similarity is greater than a preset threshold.
In some possible embodiments, the second determining module 20 includes:
a slicing unit 201, configured to divide the job history information to obtain a plurality of pieces of information, where a sum of lengths of the plurality of pieces of information is not less than a length of the job history information;
the second calculating unit 202 is configured to perform hash calculation on each piece of fragmentation information, so as to obtain a hash value of each piece of fragmentation information;
a connecting unit 203, configured to connect the hash values of the pieces of information to obtain a fuzzy hash value of the work history information.
In some possible embodiments, the first determining module 17 includes:
an obtaining unit 171, configured to obtain a third public key of the second user unit, and decrypt the digital signature based on the third public key to obtain first digest information of the second work certificate;
a third calculating unit 172, configured to perform hash calculation on the second working certificate to obtain second summary information of the second working certificate;
a first determining unit 173 for comparing the first summary information with the second summary information, and determining that the work certification storage request is a valid request if the first summary information is identical with the second summary information;
a second determining unit 174, configured to determine that the operation-proof storage request is an invalid request when the first summary information and the second summary information are inconsistent.
In specific implementation, the apparatus 1 may execute, through each built-in functional module thereof, the implementation manner provided in each step in fig. 2 and/or fig. 5, which may specifically refer to the implementation manner provided in each step, and details are not described herein again.
In the embodiment of the invention, a unified working evidence storage platform can be provided for each human consumption unit by storing the working evidence provided by the human consumption unit into the blockchain network, and the safety of information storage can be further improved by encrypting the working evidence again before the working evidence is stored into the blockchain network. Furthermore, the employment of the personnel unit for issuing the working certificate and the public key of the target object can further encrypt the working certificate, thereby avoiding the possibility that irrelevant personnel can acquire and check the working certificate of a certain object, and ensuring better safety. Meanwhile, the work record information including the work record provided by the target object, the establishment information and the like are subjected to hash calculation and compared with the hash value of the work record of the target object in the block chain network, so that whether the work record information provided by the target object is real information or not can be accurately and efficiently confirmed, and the applicability is higher.
Referring to fig. 8, fig. 8 is a schematic structural diagram of an apparatus provided in an embodiment of the present invention. As shown in fig. 8, the apparatus 1000 in the present embodiment may include: the processor 1001, the network interface 1004, and the memory 1005, and the apparatus 1000 may further include: a user interface 1003, and at least one communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display) and a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a standard wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1004 may be a high-speed RAM memory or a non-volatile memory (e.g., at least one disk memory). The memory 1005 may optionally be at least one memory device located remotely from the processor 1001. As shown in fig. 8, a memory 1005, which is a kind of computer-readable storage medium, may include therein an operating system, a network communication module, a user interface module, and a device control application program.
In the device 1000 shown in fig. 8, the network interface 1004 may provide network communication functions; the user interface 1003 is an interface for providing a user with input; and the processor 1001 may be used to invoke a device control application stored in the memory 1005 to implement:
receiving a history confirmation request submitted by a first person unit, and acquiring a first work certificate and an identity of a target object carried by the history confirmation request, wherein the first work certificate is used for explaining a work history corresponding to the target;
determining a target block of the identity mark from a block chain network, and acquiring a work certification ciphertext of a second work certification from the target block, wherein the second work certification is a description of a work history which is provided by a second human unit and is used for certifying that the target object is in the second human unit before leaving the job;
acquiring a first public key of the second user unit and a second public key of the target object, and decrypting the work certificate ciphertext based on the first public key and the second public key to obtain a hash value of the second work certificate;
sending the hash value of the second work certificate to a consensus node so that the consensus node verifies the hash value of the second work certificate and generates a signature confirmation message after the verification is passed;
and receiving a signature confirmation message sent by the consensus node, performing hash calculation on the first work certificate to obtain a hash value of the first work certificate when the signature confirmation message meets a preset consensus strategy, and returning a record confirmation message to the first human unit if the hash value of the first work certificate is consistent with the hash value of the second work certificate.
In some possible embodiments, the processor 1001 is further configured to:
receiving a work certificate storage request submitted by a second person unit, and acquiring a second work certificate and a digital signature of the second work certificate carried by the work certificate storage request, wherein the second work certificate is used for explaining a work history of a target object in the second person unit;
determining whether the work certification storage request is a valid request or not based on the digital signature, and if the work certification storage request is a valid request, acquiring a first private key of the second user unit and a second private key of the target object;
encrypting the second working certificate based on the first private key and the second private key to obtain a working certificate ciphertext of the second working certificate, packaging the working certificate ciphertext into a target block, and adding the target block into a block chain network;
and generating an identity mark based on the identity information of the target object, marking the target block based on the identity mark and returning a storage confirmation message to the second person unit.
In some possible embodiments, the processor 1001 is configured to:
performing hash calculation on the second work certificate to obtain a hash value of the second work certificate;
encrypting the hash value of the second work certificate based on the first private key to obtain an encrypted hash value of the second work certificate;
and encrypting the encrypted hash value of the second working certificate based on the second private key to obtain a working certificate ciphertext of the second working certificate.
In some possible embodiments, the processor 1001 is configured to:
decrypting the work certification ciphertext of the second work certification based on the second public key to obtain an encrypted hash value of the second work certification;
and decrypting the encrypted hash value of the second work certificate based on the first public key to obtain the hash value of the second work certificate.
In some possible embodiments, the work certification request further carries resume information of the target object, and the hash value of the second work certification is a fuzzy hash value; the processor 1001 is further configured to:
acquiring work history information in the resume information, and determining a fuzzy hash value of the work history information;
determining a weighted editing distance from the fuzzy hash value of the work history information to the hash value of the second work proof;
determining a first length of a fuzzy hash value of the work history information and a second length of a hash value of the second proof of work, and determining a ratio of a total length of the first length and the second length to the weighted edit distance;
determining the similarity between the fuzzy hash value of the work record information and the hash value of the second work proof based on the ratio;
and if the similarity is larger than a preset threshold value, returning the history confirmation message to the first user unit.
The processor 1001 is configured to:
dividing the work history information to obtain a plurality of pieces of information, wherein the sum of the lengths of the plurality of pieces of information is not less than the length of the work history information;
respectively carrying out hash calculation on each piece of fragmentation information to obtain a hash value of each piece of fragmentation information;
and connecting the hash values of the pieces of information to obtain the fuzzy hash value of the work history information.
The processor 1001 is configured to:
acquiring a third public key of the second user unit, and decrypting the digital signature based on the third public key to obtain first summary information of the second work certificate;
performing hash calculation on the second work certificate to obtain second summary information of the second work certificate;
comparing the first summary information with the second summary information, and if the first summary information is consistent with the second summary information, determining that the work certification storage request is a valid request;
and if the first summary information is inconsistent with the second summary information, determining that the operation certification storage request is an invalid request.
It should be understood that in some possible embodiments, the processor 1001 may be a Central Processing Unit (CPU), and the processor may be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), field-programmable gate arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The memory may include both read-only memory and random access memory, and provides instructions and data to the processor. The portion of memory may also include non-volatile random access memory. For example, the memory may also store device type information.
In a specific implementation, the device 1000 may execute, through each built-in functional module thereof, the implementation manners provided in each step in fig. 2 and/or fig. 5, which may specifically refer to the implementation manners provided in each step, and are not described herein again.
In the embodiment of the invention, a unified working evidence storage platform can be provided for each human consumption unit by storing the working evidence provided by the human consumption unit into the blockchain network, and the safety of information storage can be further improved by encrypting the working evidence again before the working evidence is stored into the blockchain network. Furthermore, the employment of the personnel unit for issuing the working certificate and the public key of the target object can further encrypt the working certificate, thereby avoiding the possibility that irrelevant personnel can acquire and check the working certificate of a certain object, and ensuring better safety. Meanwhile, the work record information including the work record provided by the target object, the establishment information and the like are subjected to hash calculation and compared with the hash value of the work record of the target object in the block chain network, so that whether the work record information provided by the target object is real information or not can be accurately and efficiently confirmed, and the applicability is higher.
An embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored in the computer-readable storage medium, and is executed by a processor to implement the method provided in each step in fig. 2 and/or fig. 5, which may specifically refer to the implementation manner provided in each step, and is not described herein again.
The computer readable storage medium may be an internal storage unit of the task processing device provided in any of the foregoing embodiments, for example, a hard disk or a memory of an electronic device. The computer readable storage medium may also be an external storage device of the electronic device, such as a plug-in hard disk, a Smart Memory Card (SMC), a Secure Digital (SD) card, a flash card (flash card), and the like, which are provided on the electronic device. The computer readable storage medium may further include a magnetic disk, an optical disk, a read-only memory (ROM), a Random Access Memory (RAM), and the like. Further, the computer readable storage medium may also include both an internal storage unit and an external storage device of the electronic device. The computer-readable storage medium is used for storing the computer program and other programs and data required by the electronic device. The computer readable storage medium may also be used to temporarily store data that has been output or is to be output.
The terms "first", "second", and the like in the claims, in the description and in the drawings of the present invention are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "include" and "have," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements listed, but may alternatively include other steps or elements not listed, or inherent to such process, method, article, or apparatus. Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the invention. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein can be combined with other embodiments. The term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps of the examples described in connection with the embodiments disclosed herein may be embodied in electronic hardware, computer software, or combinations of both, and that the components and steps of the examples have been described in a functional general in the foregoing description for the purpose of illustrating clearly the interchangeability of hardware and software. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The above disclosure is only for the purpose of illustrating the preferred embodiments of the present invention, and it is therefore to be understood that the invention is not limited by the scope of the appended claims.

Claims (8)

1. A method for confirming a work history, the method comprising:
when the history confirmation request comprises a first work certificate and an identity of a target object, receiving the history confirmation request submitted by a first person unit, and acquiring the first work certificate and the identity of the target object carried by the history confirmation request, wherein the first work certificate is used for explaining the work history of the target object;
determining a target block marked by the identity identifier from a block chain network, and acquiring a work certification ciphertext of a second work certification from the target block, wherein the second work certification is a description provided by a second human unit and used for certifying a work history of the target object in the second human unit before leaving the work;
acquiring a first public key of the second user unit and a second public key of the target object, and decrypting the work certificate ciphertext based on the first public key and the second public key to obtain a hash value of the second work certificate;
sending the hash value of the second proof of work to a consensus node, so that the consensus node verifies the hash value of the second proof of work and generates a signature confirmation message after the verification is passed, including: sending the hash value of the second work proof to a consensus node so that the consensus node decrypts the work proof ciphertext again based on the first public key of the second user unit and the second public key of the target object to obtain the hash value of the second work proof, comparing the hash value of the second work proof with the received hash value of the second work proof based on the second proof, if the hash value of the second work proof is consistent with the received hash value of the second work proof, determining that the received hash value of the second work proof is valid, and returning signature confirmation information;
receiving a signature confirmation message sent by the consensus node, and when the signature confirmation message meets a preset consensus strategy, performing hash calculation on the first working certificate to obtain a hash value of the first working certificate, and if the hash value of the first working certificate is consistent with the hash value of the second working certificate, returning a resume confirmation message to the first human unit;
when the resume confirmation request comprises resume information of the target object, the hash value of the second work proof is a fuzzy hash value; the method further comprises the following steps:
acquiring the work history information in the resume information, and determining a fuzzy hash value of the work history information, wherein the fuzzy hash value comprises the following steps: dividing the work history information to obtain a plurality of pieces of information, wherein the sum of the lengths of the plurality of pieces of information is not less than the length of the work history information; respectively carrying out hash calculation on each piece of fragmentation information to obtain a hash value of each piece of fragmentation information; connecting the hash values of the fragment information to obtain fuzzy hash values of the work history information;
determining a weighted editing distance from the fuzzy hash value of the work resume information to the hash value of the second work proof;
determining a first length of a fuzzy hash value of the work record information and a second length of a hash value of the second work proof, and determining a ratio of a total length of the first length and the second length to the weighted editing distance;
determining the similarity between the fuzzy hash value of the work record information and the hash value of the second work proof based on the ratio;
and if the similarity is greater than a preset threshold value, returning the resume confirmation message to the first user unit.
2. The method of claim 1, wherein prior to receiving the request for the biographical confirmation submitted by the first human unit, the method further comprises:
receiving a work certification storage request submitted by a second person unit, and acquiring a second work certification of a target object and a digital signature of the second work certification carried by the work certification storage request, wherein the second work certification is used for explaining a work history of the target object in the second person unit;
determining whether the work certification storage request is a valid request or not based on the digital signature, and if the work certification storage request is the valid request, acquiring a first private key of the second user unit and a second private key of the target object;
encrypting the second working certificate based on the first private key and the second private key to obtain a working certificate ciphertext of the second working certificate, packaging the working certificate ciphertext to a target block, and adding the target block to a block chain network;
and generating an identity mark based on the identity information of the target object, marking the target block based on the identity mark and returning a storage confirmation message to the second person unit.
3. The method of claim 2, wherein encrypting the second proof of work based on the first private key and the second private key to obtain a proof of work ciphertext for the second proof of work comprises:
performing hash calculation on the second work certificate to obtain a hash value of the second work certificate;
encrypting the hash value of the second work proof based on the first private key to obtain an encrypted hash value of the second work proof;
and encrypting the encrypted hash value of the second work proof based on the second private key to obtain a work proof ciphertext of the second work proof.
4. The method of claim 3, wherein decrypting the proof of work ciphertext based on the first public key and the second public key to obtain the hash value of the second proof of work comprises:
decrypting the work certification ciphertext of the second work certification based on the second public key to obtain an encrypted hash value of the second work certification;
and decrypting the encrypted hash value of the second work certificate based on the first public key to obtain the hash value of the second work certificate.
5. The method of claim 2, wherein said determining whether the working certification storage request is a valid request based on the digital signature comprises:
acquiring a third public key of the second user unit, and decrypting the digital signature based on the third public key to obtain first summary information of the second work certificate;
performing hash calculation on the second work certificate to obtain second summary information of the second work certificate;
comparing the first summary information with the second summary information, and if the first summary information is consistent with the second summary information, determining that the work certification storage request is an effective request;
and if the first summary information and the second summary information are inconsistent, determining that the operation proof storage request is an invalid request.
6. An apparatus for confirming a work history, comprising:
when the history confirmation request comprises a first work certificate and an identity of a target object, a first receiving module is used for receiving the history confirmation request submitted by a first user unit and acquiring the first work certificate and the identity of the target object carried by the history confirmation request, wherein the first work certificate is used for explaining a work history corresponding to the target;
a first obtaining module, configured to determine a target block of the identity tag from a block chain network, and obtain a work certification ciphertext of a second work certification from the target block, where the second work certification is a description of a work history that is provided by a second user unit and used for certifying that the target object is in the second user unit before leaving the job;
the first processing module is used for acquiring a first public key of the second human unit and a second public key of the target object, and decrypting the work certification ciphertext based on the first public key and the second public key to obtain a hash value of the second work certification;
a sending module, configured to send the hash value of the second work proof to a consensus node, so that the consensus node verifies the hash value of the second work proof and generates a signature confirmation message after the verification passes, where the sending module is configured to: sending the hash value of the second work proof to a consensus node so that the consensus node decrypts the work proof ciphertext again based on the first public key of the second user unit and the second public key of the target object to obtain the hash value of the second work proof, comparing the hash value of the second work proof with the received hash value of the second work proof based on the second proof, if the hash value of the second work proof is consistent with the received hash value of the second work proof, determining that the received hash value of the second work proof is valid, and returning signature confirmation information;
the second processing module is used for receiving the signature confirmation message sent by the consensus node, performing hash calculation on the first work certificate to obtain a hash value of the first work certificate when the signature confirmation message meets a preset consensus strategy, and returning a record confirmation message to the first human unit if the hash value of the first work certificate is consistent with the hash value of the second work certificate;
when the resume confirmation request comprises resume information of the target object, the hash value of the second work proof is a fuzzy hash value; the device further comprises:
the second determining module is further used for acquiring the work history information in the resume information and determining the fuzzy hash value of the work history information;
the third determining module is further configured to determine a weighted editing distance from the fuzzy hash value of the work history information to the hash value of the second work proof;
a fourth determining module, configured to determine a first length of a fuzzy hash value of the work history information and a second length of a hash value of the second work proof, and determine a ratio of a total length of the first length and the second length to the weighted editing distance;
the fourth processing module is further configured to determine, based on the ratio, a similarity between the fuzzy hash value of the work history information and the hash value of the second work proof;
the returning module is used for returning the resume confirmation message to the first person unit when the similarity is larger than a preset threshold value;
the second determining module includes:
the slicing unit is used for dividing the work history information to obtain a plurality of pieces of information, wherein the sum of the lengths of the plurality of pieces of information is not less than the length of the work history information;
the second computing unit is used for respectively carrying out hash computation on each piece of fragmentation information to obtain a hash value of each piece of fragmentation information;
and the connecting unit is used for connecting the hash value of each piece of slicing information to obtain the fuzzy hash value of the work record information.
7. A work history confirmation apparatus comprising a processor and a memory, the processor and the memory being connected to each other;
the memory for storing a computer program comprising program instructions, the processor being configured to invoke the program instructions to perform the method of any of claims 1 to 5.
8. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which is executed by a processor to implement the method of any one of claims 1 to 5.
CN201911148073.4A 2019-11-21 2019-11-21 Work history confirming method, device, equipment and storage medium Active CN110995440B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911148073.4A CN110995440B (en) 2019-11-21 2019-11-21 Work history confirming method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911148073.4A CN110995440B (en) 2019-11-21 2019-11-21 Work history confirming method, device, equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110995440A CN110995440A (en) 2020-04-10
CN110995440B true CN110995440B (en) 2022-08-09

Family

ID=70085584

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911148073.4A Active CN110995440B (en) 2019-11-21 2019-11-21 Work history confirming method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110995440B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113222481A (en) * 2021-06-16 2021-08-06 北京神州光大科技有限公司 Resume generation method and resume data storage system

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107483498A (en) * 2017-09-22 2017-12-15 中国联合网络通信集团有限公司 Academic authentication method and system based on block chain
CN110034921A (en) * 2019-04-18 2019-07-19 成都信息工程大学 The webshell detection method of hash is obscured based on cum rights

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107018125B (en) * 2017-02-17 2019-08-09 阿里巴巴集团控股有限公司 A kind of block catenary system, date storage method and device
CN108595126B (en) * 2018-04-27 2022-09-02 腾讯科技(深圳)有限公司 Data storage system, query method, query device, server, and storage medium
CN109086585A (en) * 2018-07-10 2018-12-25 众安信息技术服务有限公司 History data processing method, system and computer readable storage medium
CN109064124B (en) * 2018-07-17 2023-02-28 腾讯科技(深圳)有限公司 Method and device for verifying and storing work history based on block chain
CN110188109B (en) * 2019-04-03 2023-10-31 创新先进技术有限公司 Block chain-based information management method, device and equipment and storage medium

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107483498A (en) * 2017-09-22 2017-12-15 中国联合网络通信集团有限公司 Academic authentication method and system based on block chain
CN110034921A (en) * 2019-04-18 2019-07-19 成都信息工程大学 The webshell detection method of hash is obscured based on cum rights

Also Published As

Publication number Publication date
CN110995440A (en) 2020-04-10

Similar Documents

Publication Publication Date Title
CN111080295B (en) Electronic contract processing method and device based on blockchain
CN110839015B (en) Log storage and reading method, device, equipment and medium based on block chain
WO2020233373A1 (en) Application configuration file management method and device
CN110457945B (en) List query method, query party device, service party device and storage medium
CN111506901A (en) Data processing method based on block chain, terminal and storage medium
CN111343170B (en) Electronic signing method and system
CN113420049B (en) Data circulation method, device, electronic equipment and storage medium
TWI835300B (en) A data matching method, device, equipment and medium
CN111859431B (en) Electronic file signing method and device, electronic equipment and storage medium
CN113610526A (en) Data trust method and device, electronic equipment and storage medium
CN110958319A (en) Method and device for managing infringement and evidence-based block chain
CN111488372A (en) Data processing method, device and storage medium
CN113704357A (en) Smart city data sharing method and system based on block chain
CN111628863B (en) Data signature method and device, electronic equipment and storage medium
CN112184444A (en) Method, apparatus, device and medium for processing information based on information characteristics
CN111404892B (en) Data supervision method and device and server
CN112907375A (en) Data processing method, data processing device, computer equipment and storage medium
CN114500093A (en) Safe interaction method and system for message information
CN112131593A (en) Information-based feature encryption method, device, equipment and storage medium
CN113489723B (en) Data transmission method, system, computer device and storage medium
CN111614658A (en) Calculation force contract generation method based on block chain network, electronic device and medium
CN115085934A (en) Contract management method based on block chain and combined key and related equipment
CN110995440B (en) Work history confirming method, device, equipment and storage medium
CN114386058A (en) Model file encryption and decryption method and device
CN112560062B (en) Anti-counterfeiting method and device for prescription signature, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant