Block chain-based salary management method, system and device, equipment and medium

By using blockchain technology for data storage in the salary management process, the problem of easy tampering of salary data and difficulty in auditing is solved, the accuracy and controllability of salary management are achieved, the problem of arrears is reduced, and work efficiency is improved. and data privacy protection.

CN118644238APending Publication Date: 2024-09-13CHINA THREE GORGES CORPORATION
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410673779.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-28
Publication Date
2024-09-13

AI Technical Summary

Technical Problem

In the traditional salary calculation and payment management process for migrant workers, there are problems such as easy tampering of salary data, difficulty in auditing, and difficulty in obtaining evidence of historical arrears. As a result, salaries cannot be paid timely and accurately, affecting the progress and quality of project construction.

Method used

Adopt a blockchain-based salary management method to build and store information tables by obtaining pre-stored transaction hashes and processing information, and use the storage method corresponding to the data type to process and upload the data to the chain for storage to ensure that the data The accuracy and controllability can reduce the workload of evidence collection, and save space on the chain and improve the efficiency of the chain through different evidence storage methods.

Benefits of technology

It solves the problem of easy tampering of salaries, ensures the data accuracy of the salary management process, makes the salary approval process controllable, reduces the problem of salary arrears, improves system work efficiency, and achieves data privacy protection and multiple verifications.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118644238A
    Figure CN118644238A
Patent Text Reader

Abstract

The invention relates to the technical field of block chains, in particular to a block chain-based salary management method, system, device and equipment and a medium, and the method comprises the following steps: after obtaining first transaction hash and processing information according to a processing instruction, constructing and storing a first information table according to the first transaction hash and the processing information; then, processing the data in the first information table by adopting an evidence storage mode corresponding to the number type, and carrying out uplink evidence storage on the processed data; and finally, writing a second transaction hash obtained based on the uplink evidence storage into the first information table. In each node of the salary management system, the data generated by the node is subjected to uplink evidence storage, so that the accuracy of all related data in the salary management process is ensured; according to the method, all related data are linked, the effect that all data are traceable can be achieved, the salary approval process is controllable, and the workload of all parties for obtaining evidences after the salary defaulting problem occurs is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of blockchain technology, and in particular to a salary management method, system, device, equipment and medium based on blockchain. Background Art

[0002] The country attaches great importance to the problem of wage arrears for migrant workers and has promulgated a series of laws and regulations to ensure that the wages of migrant workers are paid on time. In the traditional process of calculating and distributing wages for migrant workers, each main contractor needs to establish a special fund account for the payment of wages to migrant workers and apply for wage cards for all migrant workers who enter the site; before the wages are paid, the subcontractor calculates the monthly wages payable to migrant workers and reports it to the main contractor; the main contractor summarizes and reviews it and reports it to the construction unit; after the construction unit completes the approval, the project settlement funds are deposited into the special account for the wages of migrant workers; finally, the bank directly pays the wages to the personal wage cards of migrant workers.

[0003] However, in the above process, there are various problems such as salary data being easy to tamper with, auditing being difficult, and historical arrears being difficult to collect evidence, which results in the inability to pay salaries in a timely and accurate manner, thus affecting the progress and quality of project construction. Summary of the invention

[0004] In order to solve the above technical problems, the present disclosure provides a salary management method, system, device, equipment and medium based on blockchain.

[0005] In a first aspect, the present invention provides a salary management method based on blockchain, which is executed by any node in the salary management system, comprising:

[0006] In response to the received processing instruction, a pre-stored first transaction hash and processing information corresponding to the current node are obtained; a first information table corresponding to the current node is constructed according to the processing information and the first transaction hash, and the first information table is stored; the data in the first information table is processed using a storage method corresponding to the data type, and the processed data is uploaded to the chain; a second transaction hash obtained based on the upload operation is written into the first information table.

[0007] The blockchain-based salary management method provided in this embodiment, after obtaining the first transaction hash and the processing information of the current node according to the processing instruction, constructs and stores the first information table according to the first transaction hash and the processing information; then, the data in the first information table is processed by adopting the evidence storage method corresponding to the digital type, and the processed data is stored on the chain; finally, the second transaction hash obtained based on the on-chain evidence is written into the first information table; in each node of the salary management system, the data generated by the node (i.e., the first information table) is stored on the chain, which solves the problem that the salary is easy to tamper with in the current technology and ensures the accuracy of all relevant data in the salary management process; putting all relevant data on the chain can achieve the effect of tracing all data, making the salary approval process controllable and reducing the workload of comparison and evidence collection by all parties after the problem of salary arrears occurs; in addition, by designing different evidence storage methods, the data in the information table generated by each node is put on the chain, which ensures the efficiency of the chain and saves the space on the chain, while realizing multiple verifications on and off the data chain and privacy protection of key data.

[0008] In an optional implementation manner, obtaining a pre-stored first information table includes:

[0009] When the current node is the first node in the salary management system, a preset information table is obtained; and a first transaction hash is obtained from the preset information table.

[0010] In an optional implementation manner, obtaining the pre-stored first information table further includes:

[0011] When the current node is any node except the first node, the information table corresponding to the previous node of the current node is obtained; and the first transaction hash is obtained from the information table corresponding to the previous node of the current node.

[0012] In an optional implementation, after obtaining the pre-stored first transaction hash and the processing information corresponding to the current node in response to the received processing instruction, the method further includes:

[0013] Obtain a second information table to which the first transaction hash belongs; and verify the accuracy of the data in the second information table based on the first transaction hash and the second information table.

[0014] In an optional implementation, verifying the accuracy of data in the second information table according to the first transaction hash and the second information table includes:

[0015] Using the first transaction hash as an index, search the chain data in the second information table from the chain; process the data in the first information table using a storage method corresponding to the data type to obtain a processing result; compare the processing result with the chain data for consistency to obtain a comparison result; and verify the accuracy of the data in the second information table based on the comparison result.

[0016] The salary management method provided in this embodiment, after obtaining the first transaction hash and the processing information corresponding to the current node, can confirm as early as possible whether the data has been tampered with by verifying the data in the second information table to which the first transaction hash belongs, so as to make countermeasures in advance according to the verification results, thereby improving the work efficiency of the system.

[0017] In an optional implementation, the evidence storage method corresponding to the data type includes:

[0018] When the data type is the first type, the evidence storage method is content evidence; when the data type is the second type, the evidence storage method is hash evidence; when the data type is the third type, the evidence storage method is link evidence.

[0019] In a second aspect, the present invention provides a salary management system based on blockchain. The system is established based on a consortium blockchain and includes a salary management module. The salary management module includes a node corresponding to at least one participant in the salary management process. The node is used to execute the salary management method of the first aspect or any corresponding implementation method thereof.

[0020] In a third aspect, the present invention provides a salary management device based on blockchain, the device comprising:

[0021] The first acquisition module is used to obtain the pre-stored first transaction hash and the processing information corresponding to the current node in response to the received processing instruction; the construction module is used to construct the first information table corresponding to the current node according to the processing information and the first transaction hash, and store the first information table; the chain module is used to process the data in the first information table using the evidence storage method corresponding to the data type, and upload the processed data to the chain; the storage module is used to write the second transaction hash obtained based on the chain operation into the first information table.

[0022] In a fourth aspect, the present invention provides a computer device, comprising:

[0023] The memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the blockchain-based salary management method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0024] In a fifth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the blockchain-based salary management method of the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0026] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0027] Figure 1 A flowchart of a salary management method based on blockchain provided by an embodiment of the present invention;

[0028] Figure 2 A flowchart of a salary management method based on blockchain provided by another embodiment of the present invention;

[0029] Figure 3 A structural connection diagram of a salary management device based on blockchain provided in an embodiment of the present invention;

[0030] Figure 4 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0031] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features in the embodiments can be combined with each other without conflict.

[0032] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0033] According to an embodiment of the present invention, a salary management system based on blockchain is provided. The system is established based on a consortium blockchain and includes a salary management module. The salary management module includes a node corresponding to at least one participant in a salary management process.

[0034] Specifically, the consortium blockchain is a consortium chain created based on the Blockchain as a Service (BaaS) platform. The setting of the nodes in the salary management module corresponds to the application scenario of the salary management system based on blockchain. Each node performs the following blockchain-based salary management method to store the data generated by the node on the chain, thereby realizing data protection. For the convenience of reading, the "salary management system based on blockchain" is abbreviated as "salary management system" below.

[0035] Exemplarily, in an optional embodiment, the salary management system is applied to the management of the salary of migrant workers in the engineering project. Then, the participants involved in the salary management process corresponding to the application scenario include subcontractors, main contractors, construction units and banks. Among them, the subcontractors are responsible for entering the basic information of migrant workers, labor contracts and attendance data of each migrant worker during the settlement period, and making salary declarations at the settlement time point corresponding to the settlement period; the main contractor is responsible for reviewing the salary declarations submitted by each subcontractor, submitting the approved declarations to the next node, and returning the unapproved declarations to the previous node; the construction unit is responsible for settling the salary approved by the review unit; the bank is responsible for completing the salary payment according to the settlement amount submitted by the construction unit. Therefore, in this application scenario, the nodes in the salary management module include: the information collection node and salary declaration node corresponding to the subcontractor, the salary review node corresponding to the main contractor, the salary settlement node corresponding to the construction unit and the salary payment node corresponding to the bank. There is a processing order between each review node, and the processing order corresponds to the salary management process. In this embodiment, the processing order of the audit node is: information collection node -> salary declaration node -> salary audit node -> salary settlement node -> salary payment node. During the operation of the node, each node will generate a corresponding information table. After the data in the information table is uploaded to the chain for evidence, the transaction hash based on the feedback of the node's on-chain operation can also be obtained.

[0036] Exemplarily, in another optional embodiment, the salary management system also includes a query tracing module, which uses the transaction hash as an index to query the data generated in the salary management process stored on the chain and the data processing traces.

[0037] According to an embodiment of the present invention, a blockchain-based salary management method embodiment is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in an order different from that shown here.

[0038] In this embodiment, a salary management method based on blockchain is provided, which can be used in a salary management system and executed by any node in the salary management system. Figure 1 is a flowchart of a salary management method based on blockchain according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0039] Step S101, in response to a received processing instruction, obtaining a pre-stored first transaction hash and processing information corresponding to the current node.

[0040] Specifically, the processing instruction is generated by the user triggering the function button of the first operation interface, and is used to execute the processing operation corresponding to the function button. After receiving the processing instruction, the first transaction hash is obtained from the database based on the received processing instruction. It should be noted that the acquisition path of the first transaction hash is related to the position of the current node in the salary management system. When the current node is the first node in the salary management system, obtain the preset information table; obtain the first transaction hash from the preset information table. When the current node is any node except the first node, obtain the information table corresponding to the previous node of the current node; obtain the first transaction hash from the information table corresponding to the previous node of the current node. The preset information table is a table constructed by basic information that is pre-stored in the database before the first node operation.

[0041] Specifically, while the current node obtains the first transaction hash, it also switches the first operation interface to the second operation interface according to the processing instruction, so that the user fills in and submits the corresponding processing information based on the prompt of the second operation interface, thereby completing the acquisition of the processing information. The first operation interface is the main interface of the current node, and the second operation interface is the interface for obtaining processing information through user input. Both the first operation interface and the second operation interface correspond to the current node.

[0042] Step S102: construct a first information table corresponding to the current node according to the processing information and the first transaction hash, and store the first information table.

[0043] Specifically, after obtaining the processing information and the first transaction hash, the first information table corresponding to the current node can be directly constructed based on the processing information and the first transaction hash, or the original data corresponding to the first transaction hash (i.e., the data in the information table to which the first transaction hash belongs) can be found based on the first transaction hash, and then the first information table corresponding to the current node can be constructed based on the original data and the processing information. After obtaining the first information table, the first information table can be displayed on the third operation interface, and the user can check the data in the first information table. When the user triggers the third operation interface to indicate the function button of saving, the first information table is stored in the database.

[0044] Step S103, process the data in the first information table using a storage method corresponding to the data type, and upload the processed data to the chain.

[0045] Specifically, the data in the first information table is processed using a storage method corresponding to the data type to obtain a processing result, which is the data to be uploaded to the chain in the first information table. The data to be uploaded to the chain is serialized in JSON format and then the original storage certificate interface is called to upload to the chain.

[0046] Exemplarily, in this embodiment, three different evidence storage methods are set for three different data types. Content evidence is to store the data to be chained directly on the chain, which is suitable for relatively simple and basic structured data (i.e., the first type of data); hash evidence is to calculate a "digital signature" of a fixed length through the hash algorithm (SHA256) of the data to be chained, and store the "digital signature" on the chain. This method stores the "digital signature" of the data to be chained on the chain, which can not only make the data to be chained safe outside the chain, but also be safely stored on the chain, and obtain double verification on the chain and outside the chain. This method is suitable for large-capacity or structured data with high security and privacy requirements (i.e., the second type of data); link evidence is to store the "digital signature" of the data to be chained and the "storage link" of the data to be chained in the database together on the chain, which is suitable for large-capacity unstructured data (i.e., the third type of data). The data is processed and chained using the evidence storage method corresponding to the data type, which saves space on the chain, improves the efficiency of chaining, and realizes multiple verifications on the data chain and outside the chain and privacy protection of the chained data.

[0047] Step S104, write the second transaction hash obtained based on the on-chain operation into the first information table.

[0048] Specifically, when the chain operation corresponding to the current node is completed, the second transaction hash based on the feedback of the chain operation is written into the non-chain field of the first information table, so that the next node can construct the information table corresponding to the next node through the second transaction hash and the processing information of the next node. It is also convenient for the query and tracing module of the salary management system to use the transaction hash of the non-chain field as an index to query the data generated in the salary management process stored on the chain and the traces of data processing.

[0049] Exemplarily, in an optional embodiment, the current node may also receive information such as the block height and the on-chain time based on the on-chain operation feedback, and write the block height and the on-chain time into the non-on-chain field of the first information table.

[0050] The salary management method provided in this embodiment, after obtaining the first transaction hash and the processing information of the current node according to the processing instruction, constructs and stores the first information table according to the first transaction hash and the processing information; then, the data in the first information table is processed by adopting the evidence storage method corresponding to the digital type, and the processed data is stored on the chain; finally, the second transaction hash obtained based on the on-chain evidence is written into the first information table; in each node of the salary management system, the data generated by the node (i.e., the first information table) is stored on the chain, which solves the problem that the salary is easy to tamper with in the current technology and ensures the accuracy of all relevant data in the salary management process; putting all relevant data on the chain can achieve the effect of tracing all data, making the salary approval process controllable and reducing the workload of comparison and evidence collection for all parties after the problem of salary arrears occurs; in addition, by designing different evidence storage methods, the data in the information table generated by each node is put on the chain, which ensures the efficiency of the chain and saves the space on the chain, while realizing multiple verifications on and off the data chain and the privacy protection of key data.

[0051] By way of example, in this embodiment, taking the management scenario of the wages of migrant workers in an engineering project as an example, the "salary management method based on blockchain" executed by each node in the salary management system is exemplarily explained, and the specific description is as follows.

[0052] (I) When the current node is the first node of the salary management system, i.e., the information collection node, the salary management method executed is as follows:

[0053] Receive information collection instructions; obtain the first transaction hash from the pre-stored migrant workers information table (i.e., the preset information table) according to the information collection instructions; at the same time, jump the operation interface from the main interface of the information collection node to the collection information entry interface according to the information collection instructions, and obtain the processing information of the current node according to the user's input, i.e., the name of the person entering, the entry time, and the entry content (the entry content is the attendance details of all migrant workers who currently have a labor relationship with the subcontracting unit during the settlement period); generate an attendance information table (i.e., the first information table) according to the first transaction hash and the above-mentioned processing information; use the content evidence method to store the "name of the person entering, the entry time, and the first transaction hash" in the attendance information table on the chain, and use the hash evidence method to store the "entry content" on the chain; and write the second transaction hash obtained according to this chain operation into the non-chain field of the attendance information table. At this point, the processing flow of the information collection node ends.

[0054] It should be made clear here that the information table of migrant workers in this embodiment is a table entered and stored by the subcontracting unit after the labor relationship is established. The table includes two parts, namely the chain field and the non-chain field. The chain field is used to store the personal information of migrant workers, such as name, ID number, gender, age, native place, home address, contact information, labor contract signed by migrant workers and other data; the non-chain field is used to store the transaction hash (i.e., the first transaction hash) fed back after the data in the above chain field is chained. The construction and chain operation of the information table of migrant workers are completed by the first node before the start of the entire salary management process. After entering the salary management process, the first node can directly obtain the relevant data of the information table of migrant workers (such as the first transaction hash). Moreover, the personal information of the above-mentioned migrant workers is entered with their knowledge and consent.

[0055] (II) When the current node is a salary declaration node, the salary management method executed is as follows:

[0056] Receive salary declaration instructions; read the first transaction hash from the attendance information table (the information table corresponding to the previous node of the current node) according to the salary declaration instruction; at the same time, jump the operation interface from the main interface of the salary declaration node to the declaration information entry interface according to the salary declaration instruction; obtain the processing information of the current node according to the user's input, that is, the declaration unit, the declaration unit number, the declaration period (such as XX year XX month-XX year XX month), the declaration amount, the declaration status (to be declared / declared) and the salary details; generate a salary declaration form according to the first transaction hash and the above processing information; use the content notarization method to store the "declaration unit, declaration unit number, declaration period, declaration amount, declaration status and transaction hash corresponding to the attendance information table" on the chain; use the hash notarization method to store the "salary details" on the chain; and write the second transaction hash obtained according to this on-chain operation into the non-on-chain field of the salary declaration form. At this point, the processing flow of the salary declaration node ends.

[0057] It should be noted that the process of obtaining the salary details in the processing information is as follows: First, find the attendance information table to which the first transaction hash belongs, and determine the attendance data of each migrant worker in the current settlement period based on the attendance details in the attendance information table, such as attendance days, overtime days, leave days, absenteeism days, etc. Secondly, use smart contracts to automatically perform calculations based on attendance data to obtain the corresponding salary data of each migrant worker in the current settlement period, that is, the corresponding salary details of the subcontracting unit in the current settlement period; finally, automatically fill in the salary details in the corresponding position of the second operation interface, so as to use it as part of the processing information for subsequent operations.

[0058] Among them, the smart contract is a program that is written in the transaction RECEIPT LOG in JSON format and deploys the compiled contract in the alliance blockchain. It has the function of calculating the salary of migrant workers based on the incoming attendance details, and also has the function of displaying the salary calculation logic of migrant workers. Among them, the former automatically completes the salary calculation on the chain according to the attendance details of migrant workers by calling the contract salary calculation function calSalaryProc(), and is mainly used in the salary declaration node; the latter realizes the trusted calculation and verification of the salary data of migrant workers on the chain by calling the verification query function tableLog() of the contract, and is mainly used in the salary review node and subsequent query process. In addition, the smart contract also designs salary settlement and salary payment functions. The salary settlement function is used in the salary settlement node. When the salary review form is confirmed to be accurate, the salary settlement form is generated in combination with the processing information of the salary settlement node. The special account number and settlement amount of migrant workers are automatically passed into the smart contract, and the contract salary settlement function settlement() is called to transfer the settlement amount to the special account of migrant workers, and the salary settlement form is submitted to the bank. The salary payment function is used in the processing of the salary payment node. When the bank is paying the salary, it automatically triggers the call of the contract salary payment function transferForm() to pay the funds in the special account of migrant workers to the personal account of migrant workers. By designing salary calculation and verification contracts, salary settlement contracts and salary payment contracts and deploying them on the chain, the trusted calculation and payment of migrant workers' salaries on the chain are realized. The salary calculation business logic is open and transparent, and the salary calculation results are authentic and verifiable, which reduces the workload of manual review. At the same time, the salary settlement and payment process is automatically triggered and completed.

[0059] For example, the salary calculation function is as follows:

[0060] function calSalaryProc(

[0061] string spBaseaData,stringdaySalary,string string monthRecord,stringovertimePay,stringfullBonus,stringleaveDeduct,stringsi ckDeduct,stringabsentDeduct,stringpreTxHash)

[0062] public{……}

[0063] For example, the salary verification query function is as follows:

[0064] function tableLog(string spBaseData)private{……Salary calculation logic……}

[0065] For example, the salary settlement function is as follows:

[0066] function settlement(identity account,unit256value)

[0067] only Admin()public returns(bool){……}

[0068] For example, the salary payment function is as follows:

[0069] functiontransferForm(identity form,identity to,unit256 value)

[0070] public returns(bool){……}

[0071] (III) When the current node is the salary review node, the salary management method executed is as follows:

[0072] Receive salary review instructions; obtain the first transaction hash from the salary declaration form according to the salary review instructions. At the same time, according to the salary review instructions, jump the operation interface from the main interface of the salary review node to the review information entry interface, and obtain the processing information of the current node according to the user's input, that is, the reviewer, reviewer number, review time, review opinion, and review status (passed / failed); generate a salary review form based on the first transaction hash and the above processing information; directly use the content notarization method to store the "above processing information and the first transaction hash" on the chain; and write the second transaction hash obtained according to this chain operation into the non-chain field of the salary review form. At this point, the processing flow of the salary review node ends.

[0073] (IV) When the current node is a salary settlement node, the salary management method implemented is as follows:

[0074] Receive salary settlement instructions; obtain the first transaction hash from the salary review table according to the salary settlement instructions; at the same time, according to the salary settlement instructions, jump the operation interface from the main interface of the salary settlement node to the settlement information entry interface, and obtain the processing information of the current node according to the user's input, that is, the project name, the total amount of the project payment, the total amount of this settlement, the main contract, the special account for migrant workers, the settlement time, and the settlement status (unsettled / settled); generate a salary settlement table according to the first transaction hash and the above processing information; use the content notarization method to store the "project name, total amount of the project payment, the total amount of this settlement, the special account for migrant workers, the settlement time, the settlement status and the transaction hash corresponding to the salary review table" on the chain, and use the link notarization method to store the "main contract" on the chain; and write the second transaction hash obtained according to this chain operation into the non-chain field of the salary settlement table. At this point, the processing flow of the salary settlement node ends.

[0075] (V) When the current node is a salary payment node, the salary management method executed is as follows:

[0076] Receive salary payment instructions; obtain the first transaction hash from the salary settlement table according to the salary payment instructions; at the same time, according to the salary payment instructions, jump the operation interface from the main interface of the salary payment node to the payment information entry interface, and obtain the processing information of the current node according to the user's input, that is, the payer, payment time, total salary, payment details, payment status (to be paid / paid), and payment opinions; generate a salary payment table according to the first transaction hash and the above processing information; use the content notarization method to upload the "payer, payment time, total salary, payment status, payment opinions and transaction hash corresponding to the salary settlement table" to the chain, and use the hash notarization method to store the "payment details" on the chain; and write the second transaction hash obtained according to this chain operation into the non-chain field of the salary payment table. At this point, the processing flow of the salary payment node ends.

[0077] In this embodiment, a salary management method based on blockchain is provided, which can be used in a salary management system and executed by any node in the salary management system. Figure 2 is a flowchart of a salary management method based on blockchain according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0078] Step S201, in response to the received processing instruction, obtain the pre-stored first transaction hash and the processing information corresponding to the current node. Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.

[0079] Step S202, obtaining the second information table to which the first transaction hash belongs.

[0080] Specifically, when the current node is the first node in the salary management system, the preset information table is the second information table; when the current node is any node except the first node in the salary management system, the second information table is the information table corresponding to the previous node of the current node.

[0081] Step S203, verifying the accuracy of the data in the second information table based on the first transaction hash and the second information table.

[0082] Specifically, the above step S203 includes:

[0083] Step S2031, using the first transaction hash as an index, searching the on-chain data in the second information table from the chain.

[0084] Specifically, the first transaction hash is the corresponding evidence identifier of the on-chain data in the second information table. Therefore, the on-chain data in the second information table can be found on the chain by using the first transaction hash as an index.

[0085] Step S2032: Process the data in the first information table using a storage method corresponding to the data type to obtain a processing result.

[0086] Specifically, the processing result is the data to be uploaded to the chain in the second information table.

[0087] Step S2033, compare the processed result with the uploaded data for consistency to obtain a comparison result.

[0088] Step S2034, verifying the accuracy of the data in the second information table based on the comparison results.

[0089] Specifically, if the comparison result is that the processing result is consistent with the on-chain data, the data in the second information table is determined to be accurate, that is, it has not been tampered with; if the comparison result is that the processing result is inconsistent with the on-chain data, the data in the second information table is determined to be inaccurate, that is, it has been tampered with.

[0090] Step S204: construct a first information table corresponding to the current node according to the processing information and the first transaction hash, and store the first information table. Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.

[0091] Step S205: Process the data in the first information table using a storage method corresponding to the data type, and upload the processed data to the blockchain. Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.

[0092] Step S206: Write the second transaction hash obtained based on the on-chain operation into the first information table. Figure 1 Step S104 of the illustrated embodiment will not be described in detail here.

[0093] The salary management method provided in this embodiment, after obtaining the first transaction hash and the processing information corresponding to the current node, can confirm as early as possible whether the data has been tampered with by verifying the data in the second information table to which the first transaction hash belongs, so as to make countermeasures in advance according to the verification results, thereby improving the work efficiency of the system.

[0094] In this embodiment, a salary management device based on blockchain is also provided, which is used to implement the above embodiments and preferred implementations, and will not be repeated here. As used below, the term "module" can implement a combination of software and / or hardware for a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0095] This embodiment provides a salary management device based on blockchain, such as Figure 3 As shown, including:

[0096] The first acquisition module 301 is used to acquire the pre-stored first transaction hash and the processing information corresponding to the current node in response to the received processing instruction.

[0097] The construction module 302 is used to construct a first information table corresponding to the current node according to the processing information and the first transaction hash, and store the first information table.

[0098] The chain module 303 is used to process the data in the first information table using a storage method corresponding to the data type, and upload the processed data to the chain.

[0099] The storage module 304 is used to write the second transaction hash obtained based on the on-chain operation into the first information table.

[0100] In some optional implementations, the first acquisition module 301 includes:

[0101] The first acquisition submodule is used to acquire a preset information table when the current node is the first node in the salary management system; and acquire a first transaction hash from the preset information table.

[0102] In some optional implementations, the first acquisition module 301 further includes:

[0103] The second acquisition submodule is used to obtain the information table corresponding to the previous node of the current node when the current node is any node except the first node; and obtain the first transaction hash from the information table corresponding to the previous node of the current node.

[0104] In some optional implementations, after the first acquisition module 301, the following is further included:

[0105] The second acquisition module is used to obtain the second information table to which the first transaction hash belongs; the verification module is used to verify the accuracy of the data in the second information table based on the first transaction hash and the second information table.

[0106] In some optional implementations, the verification module includes:

[0107] The third acquisition submodule is used for the search submodule, which is used to search the on-chain data in the second information table from the chain with the first transaction hash as the index; the processing submodule is used to process the data in the first information table using the evidence storage method corresponding to the data type to obtain the processing result; the comparison submodule is used to compare the processing result with the on-chain data for consistency to obtain the comparison result; the verification submodule is used to verify the accuracy of the data in the second information table according to the comparison result.

[0108] In some optional implementations, the evidence storage methods corresponding to the data types in the uplink module 303 include:

[0109] When the data type is the first type, the evidence storage method is content evidence; when the data type is the second type, the evidence storage method is hash evidence; when the data type is the third type, the evidence storage method is link evidence.

[0110] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0111] The salary management device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0112] The embodiment of the present invention also provides a computer device having the above Figure 3 The payroll management device shown.

[0113] See also Figure 4 , Figure 4 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 4As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 4 A processor 10 is taken as an example.

[0114] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0115] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.

[0116] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0117] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0118] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0119] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0120] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0121] The above are only specific embodiments of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to these embodiments herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A salary management method based on blockchain, characterized in that: The method is executed by any node in the salary management system, and includes: Responding to the received processing instruction, obtaining the pre-stored first transaction hash and processing information corresponding to the current node; Constructing a first information table corresponding to the current node according to the processing information and the first transaction hash, and storing the first information table; Processing the data in the first information table using a storage method corresponding to the data type, and uploading the processed data to the blockchain; The second transaction hash obtained based on the on-chain operation is written into the first information table.

2. The method according to claim 1, characterized in that Get the pre-stored first transaction hash, including: When the current node is the first node in the salary management system, obtaining a preset information table; The first transaction hash is obtained from the preset information table.

3. The method according to claim 1, characterized in that Obtaining the pre-stored first transaction hash, further comprising: When the current node is any node except the first node, obtaining the information table corresponding to the previous node of the current node; The first transaction hash is obtained from the information table corresponding to the previous node of the current node.

4. The method according to any one of claims 1 to 3, characterized in that After acquiring the pre-stored first transaction hash and the processing information corresponding to the current node in response to the received processing instruction, the method further includes: Obtain a second information table to which the first transaction hash belongs; Verify the accuracy of the data in the second information table based on the first transaction hash and the second information table.

5. The method according to claim 4, characterized in that The verifying the accuracy of the data in the second information table according to the first transaction hash and the second information table includes: Using the first transaction hash as an index, searching the chain for the on-chain data in the second information table; Processing the data in the first information table using a storage method corresponding to the data type to obtain a processing result; Compare the processing result with the on-chain data for consistency to obtain a comparison result; Verify the accuracy of the data in the second information table based on the comparison results.

6. The method according to any one of claims 1 to 3, characterized in that The storage methods corresponding to the data types include: When the data type is the first type, the evidence storage method is content evidence storage; When the data type is the second type, the evidence storage method is hash evidence storage; When the data type is the third type, the evidence storage method is link evidence storage.

7. A salary management system based on blockchain, characterized in that: The system is established based on a consortium blockchain, and includes a salary management module. The salary management module includes a node corresponding to at least one participant in the salary management process, and the node is used to execute the salary management method as described in any one of claims 1 to 6.

8. A salary management device based on blockchain, characterized in that: The device comprises: A first acquisition module, configured to acquire, in response to a received processing instruction, a pre-stored first transaction hash and processing information corresponding to a current node; A construction module, configured to construct a first information table corresponding to the current node according to the processing information and the first transaction hash, and store the first information table; A chain-up module, used to process the data in the first information table using a storage method corresponding to the data type, and upload the processed data to the chain; The storage module is used to write the second transaction hash obtained based on the on-chain operation into the first information table.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the blockchain-based salary management method according to any one of claims 1 to 6 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the blockchain-based salary management method described in any one of claims 1 to 6.