A private chain-based on-campus grade storage method and system

By adopting private chain technology in the on-campus score management system, using hash encryption algorithm and digital signature to verify score information among multiple nodes, the tampering and permission concentration problems in the centralized system are solved, and the secure storage and transparency of scores are achieved verify.

CN115865358BActive Publication Date: 2024-11-22TAIYUAN UNIVERSITY OF TECHNOLOGY +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211381361.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-07
Publication Date
2024-11-22
Estimated Expiration
2042-11-07

Smart Images

  • Figure CN115865358B_ABST
    Figure CN115865358B_ABST
Patent Text Reader

Abstract

The present invention belongs to the technical field of grade storage and management, and in particular to a method and system for storing grades in schools based on private chain technology. The method comprises the following steps: S1, building a private chain; S2, the first node creates a data index for the grade information that needs to be chained, and uses a hash encryption algorithm to calculate its hash value; after the data index and the hash value of the grade information are digitally signed, they are packaged to generate new block data and broadcast to all nodes; S3, each node verifies the format and signature of the new block, and updates the block data in the local node according to the verification result; S4, when it is necessary to query, verify or audit the grade data under the chain, determine the data index corresponding to the grade data, obtain the hash value corresponding to the data index on all nodes according to the data index, and compare it with the corresponding hash value of the grade information under the chain to determine whether it has been tampered with. The present invention has certain decentralized characteristics and can achieve safe access to grades.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of grade storage and management, and in particular to a private chain-based on-campus grade storage method and system. Background Art

[0002] The current school grade information storage and management system uses a completely centralized technical solution and database, which has the following risks and defects:

[0003] 1. Risk of tampering by hackers: In the centralized grade information storage and management system, hackers attack the school's network, system, database and other vulnerabilities. Once the data is breached, the students' original grade data will be stolen, deleted and tampered with.

[0004] 2. Risk of centralized authority and lack of supervision: In the centralized grade information storage and management system, the schools lack technical means to verify grades, and therefore cannot verify and supervise whether the school's grades have been tampered with, because the organizations or individuals with related interests may steal from the school. The management authority of grades is overly concentrated in a certain department of the school, and other institutions and roles are not fully involved. There is no open, transparent and effective mechanism to limit the authority of a certain department of the school.

[0005] The above risks and defects greatly trouble schools, and blockchain technology is expected to eliminate the above risks. Blockchain is a decentralized chain data structure that uses cryptography to ensure that its data cannot be tampered with or forged. The modification of data by a single or even multiple nodes cannot affect the data of other nodes.

[0006] Based on the above analysis, it is necessary to invent a secure and reliable private chain-based in-school grade storage method and system. Summary of the invention

[0007] The present invention overcomes the deficiencies of the prior art and aims to solve the following technical problems: providing a private chain-based on-campus grade notarization method and system to solve the security problem in the centralized grade information storage management system.

[0008] In order to solve the above technical problems, the technical solution adopted by the present invention is: a method for storing school grades based on a private chain, comprising the following steps:

[0009] S1. Determine the underlying parameters, rules and private chain nodes of a private chain, and build a private chain; the private chain nodes include a first node and a plurality of second nodes; the first node and the second node both store block data of the entire private chain, and each block data includes a data index of the performance information and a hash value of the performance information;

[0010] S2. The first node creates a data index for the performance information that needs to be uploaded to the chain, and uses a hash encryption algorithm to calculate its hash value; after the data index and the hash value of the performance information are digitally signed, they are packaged to generate new block data and broadcast to all nodes in the private chain;

[0011] S3. All nodes in the private chain verify the format and signature of the new block. If one of the nodes fails the verification, the node discards the block. If the verification passes, each node updates the block data in the local node.

[0012] S4. When it is necessary to query, verify or audit the off-chain performance data, determine the data index corresponding to the performance data, obtain the hash value corresponding to the data index on all nodes according to the data index, and at the same time, calculate the hash value of the corresponding off-chain performance information, and compare all the hash values. If they are all equal, it proves that the verification is passed and the performance is correct, otherwise it means that it has been tampered with.

[0013] In step S2, the first node performs identity authentication on the administrator and then creates an index of the data.

[0014] The private chain-based on-campus grade storage method further includes the following steps:

[0015] S5. The second node automatically verifies the on-chain performance data regularly and obtains the hash values ​​H1 to H1 corresponding to the data index on all nodes according to the data index. n And compare all the hash values. If they are all equal, it proves that the verification is passed and the score is correct. Otherwise, it means that the hash data on the chain has been tampered with, and the verification result is returned to the first node.

[0016] In addition, the present invention also provides an in-school grade certification system based on a private chain, which is used to implement the in-school grade certification method based on a private chain, including: a first blockchain server and multiple second blockchain servers; the first blockchain server is used to join the private chain as a first node, and the second blockchain server is used to join the private chain as a second node.

[0017] The first blockchain server includes:

[0018] The first client management module is used to provide an interface and interface;

[0019] The score upload module is used to create a data index based on the score information that needs to be uploaded to the chain sent by the first client management module, and to calculate the hash value of the uploaded information by applying the hash encryption algorithm. Then, the data index and the hash value are digitally signed and packaged to generate new block data, and then broadcast to other second blockchain servers;

[0020] The first new block update module: used to update the blockchain data of this node after generating new block data;

[0021] Score query verification module: used to receive the query verification request sent by the first client management module, obtain the data index corresponding to the data to be verified in the verification request, and obtain the hash values ​​H1~H corresponding to the data index from all nodes on the private chain. n , and calculate the hash value H0 of the corresponding off-chain performance information, and obtain the hash values ​​H1~H n Compare with H0 and return the comparison result.

[0022] The second blockchain server includes:

[0023] The second client management module is used to provide an interface and interface;

[0024] The second new block update module is used to verify the correctness of the new block after receiving the broadcasted new block data, and update the blockchain data of this node so that the updated blockchain contains all the consensus blocks;

[0025] The score timing verification module is used to determine the block height and data index that need to be verified at regular intervals according to the rules set by the first node server, automatically verify the score data on the chain, and obtain the hash values ​​H1~H corresponding to the data index on all nodes according to the data index. n , and compare all hash values, and return the verification result to the first blockchain server;

[0026] The first blockchain server and the second blockchain server both include an initialization module and a digital identity module;

[0027] The initialization module is used to confirm the current node of the private chain and synchronize the consensus block in the private chain;

[0028] The digital identity module is provided by the digital identity authentication center and is used to authorize and authenticate the identity of the node user.

[0029] The school grade notarization system based on a private chain also includes a database server and a WEB server, and the database server and the WEB server are connected to the first blockchain server.

[0030] Compared with the prior art, the present invention has the following beneficial effects:

[0031] 1. The present invention stores block data including data index of grade information and hash value of grade information based on private chain, realizes grade evidence storage, and makes the system have certain decentralized characteristics. Even if some nodes in the network are offline, attacked, or data is damaged, it will not affect the operation of the entire system.

[0032] 2. The present invention uses hash functions and asymmetric encryption algorithms to upload hash value data corresponding to scores to the private chain, and the scores are only stored in the data upload node; therefore, hackers cannot crack the hash data on the chain, so the score data on the chain will not be decrypted and leaked by hackers, and the chain structure of the blockchain can ensure that the consensus data on the chain cannot be tampered with by hackers. The node administrator is also unable to crack the hash data on the chain, so the tampered information can be identified through the comparison and verification between the chain and the off-chain.

[0033] 3. The present invention realizes the storage of grades through a private chain. A grade query and verification module is provided in the system, which can realize the query and verification of grades; moreover, the grade timing verification module can also automatically verify the grade data on the chain at regular intervals. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 A flowchart of a private chain-based on-campus grade management method provided in Embodiment 1 of the present invention;

[0035] Figure 2 This is a schematic diagram of the structure of the private chain in the first embodiment of the present invention;

[0036] Figure 3 Schematic diagram of the corresponding relationship between data index and hash value of score information in the first embodiment of the present invention;

[0037] Figure 4 This is a schematic diagram of the structure of a private chain-based school grade management system provided in Example 2 of the present invention. DETAILED DESCRIPTION

[0038] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0039] Embodiment 1

[0040] like Figure 1 As shown, the first embodiment of the present invention provides a method for storing school grades based on a private chain, including the following steps:

[0041] S1. Determine the underlying parameters, rules and private chain nodes of the private chain, and build a private chain; the private chain nodes include a first node and multiple second nodes; the first node and the second node both store the block data of the entire private chain, and each block data includes the data index of the performance information and the hash value of the performance information. Figure 2 , which is a schematic diagram of the structure of a private chain built in an embodiment of the present invention.

[0042] In this embodiment, the difference between the two nodes is that the first node can be used to implement the authorization of the second node, the first node can be used to generate the block data to be uploaded according to the results to be stored, and query and verify the results, and the second node is only used for the timed verification operation of the results. In addition, the results to be stored are only stored in the first node.

[0043] Before building a private chain, first determine the department units corresponding to the first node and the second node. In this embodiment, the first node is the school's academic affairs department where grades can be uploaded, and the second node is other nodes in the school (for example, various colleges, student affairs, admissions, employment, and archives departments). The underlying parameters and rule settings in the private chain (for example, block size, data index, grade information type, block sorting, etc.) are determined by the school's academic affairs department, such as the academic affairs office of a certain university.

[0044] In addition, in this implementation, the digital identity authentication center can also be used to authorize and authenticate the identity of each node. The digital identity authentication center (for example, Shanghai CA Authentication Center) authorizes and authenticates the identity of each node (including the first node and the second node) and provides digital identity authentication and management services. Before the digital identity authentication center authorizes the identity of the second node, the first node needs to authorize the second node.

[0045] S2. The first node creates a data index for the performance information that needs to be uploaded to the chain, and uses a hash encryption algorithm to calculate its hash value; after digitally signing the data index and the hash value of the performance information, it packages them to generate new block data, broadcasts them to the remaining nodes in the private chain, and updates the block of this node at the same time.

[0046] like Figure 3 The figure is a schematic diagram of data index in this embodiment. The pre-processing before uploading the grades to the chain specifically refers to that, according to the existing teaching process of colleges and universities, the grades submitted by teachers are stored in the server of the teaching system, data indexes are created for the relevant information such as undergraduate grades that need to be uploaded to the chain, and the hash value of the student grade information that needs to be uploaded to the chain is calculated using a hash encryption algorithm. For relevant information such as undergraduate grades, see Table 1, and for the corresponding relationship between data index and hash value of grade information, see Figure 3 .

[0047] Table 1. Information and categories of scores prepared for uploading to the blockchain

[0048]

[0049] Specifically, in step S2, the first node authenticates the administrator and then creates the data index. In addition, other operations of the first node, including data uploading, querying and verifying scores, etc., are also performed under the authorization of the administrator.

[0050] S3. All second nodes except those for data upload verify the format and signature of the new block. If the verification of one of the nodes fails, the second node discards the block; if the verification passes, each second node updates the block data in the local node.

[0051] The remaining second nodes verify the format and signature of the new block. The authorization of the Shanghai CA Certification Center ensures that the signature of the new block cannot be forged by nodes other than the sender, and any second node can verify the correctness of the signature. If the remaining second nodes fail to verify the correctness of the new block, the second node will discard the block; after the remaining second nodes verify the correctness of the new block, they update the block data in the local node.

[0052] In this embodiment, the operation of uploading the performance information to the chain can only be performed after authorization by the digital identity authentication center. At the same time, the digital signature of the administrator of the first node is attached to the data index and the performance information hash value, which is used to store and trace the operation and personnel.

[0053] S4. When it is necessary to query and verify the off-chain performance data, determine the data index corresponding to the performance data, and obtain the hash values ​​H1~H corresponding to the data index on all nodes according to the data index. n At the same time, the hash value H0 of the corresponding off-chain score information is calculated, and all hash values ​​are compared. If all are equal, it proves that the verification is passed and the score is correct. Otherwise, it means that it has been tampered with. The off-chain score information is stored in the corresponding first node for data upload. n Represents the corresponding hash value in the nth private chain node, where n represents the number of nodes in the private chain.

[0054] Specifically, when the node user queries and verifies the correctness of the off-chain grade data, he or she will query the data index based on the search field, obtain the grade information hash data on all nodes according to the data index, and calculate the hash value of the grade and other related information again according to the data index, and compare all the hash values. If all are equal, it proves that the grade is correct, otherwise it means that the grade data of the academic affairs system or the grade information hash value stored in some nodes has been tampered with.

[0055] S5. The second node automatically verifies the on-chain performance data regularly and obtains the hash values ​​H1 to H1 corresponding to the data index on all nodes according to the data index. n And compare all the hash values. If they are all equal, it proves that the verification is passed and the score is correct. Otherwise, it means that the hash data on the chain has been tampered with, and the verification result is returned to the first node.

[0056] According to the rules set by the first node, the second node automatically verifies the on-chain performance data at regular intervals. The block height and data index that need to be verified can be verified according to the rules set by the first node. According to the data index, the hash values ​​H1~H corresponding to the data index on all nodes are obtained. n , and compare all the hash values. If they are all equal, the verification is passed and the score is correct. Otherwise, it means that the hash data on the chain has been tampered with, and the verification result is returned to the first node. n Represents the corresponding hash value in the nth private chain node, where n represents the number of nodes in the private chain.

[0057] Specifically, when the second node automatically verifies the correctness of the on-chain grade data, it determines the data index to be queried according to the rules set in advance by the academic affairs department (time, block height, data index range, etc.), obtains the grade information hash data on all nodes according to the data index, and compares all hash values. If all are equal, it proves that the grade is correct, otherwise it means that the grade information hash value stored in some nodes has been tampered with.

[0058] Embodiment 2

[0059] like Figure 4 As shown, Embodiment 2 of the present invention provides an in-school grade notarization system based on a private chain, which is used to implement an in-school grade notarization method based on a private chain described in Embodiment 1, including: a first blockchain server and multiple second blockchain servers; the first blockchain server is used to join the private chain as a first node, and the second blockchain server is used to join the private chain as a second node.

[0060] Specifically, Figure 4 As shown, in this embodiment, the first blockchain server includes:

[0061] The first client management module is used to provide an interface and interface;

[0062] The score upload module is used to create a data index based on the score information that needs to be uploaded to the chain sent by the first client management module, and to calculate the hash value of the uploaded information by applying the hash encryption algorithm. Then, the data index and the hash value are digitally signed and packaged to generate new block data, and then broadcast to other second blockchain servers;

[0063] The first new block update module: used to update the blockchain data of this node after generating new block data;

[0064] Score query verification module: used to receive the query verification request sent by the first client management module, obtain the data index corresponding to the data to be verified in the verification request, and obtain the hash values ​​H1~H corresponding to the data index from all nodes on the private chain. n , and calculate the hash value H0 of the corresponding off-chain performance information, and obtain the hash values ​​H1~H n Compare with H0 and return the comparison result;

[0065] Specifically, Figure 4 As shown, in this embodiment, a school grade evidence storage system based on a private chain, the second blockchain server includes:

[0066] The second client management module is used to provide an interface and interface;

[0067] The second new block update module is used to verify the correctness of the new block after receiving the broadcasted new block data, and update the blockchain data of this node so that the updated blockchain contains all the consensus blocks;

[0068] The score timing verification module is used to determine the block height and data index that need to be verified at regular intervals according to the rules set by the first node server, automatically verify the score data on the chain, and obtain the hash values ​​H1~H corresponding to the data index on all nodes according to the data index. n , and compare all hash values, and return the verification result to the first blockchain server;

[0069] Furthermore, if Figure 4 As shown, in this embodiment, the first blockchain server and the second blockchain server both include an initialization module and a digital identity module; the initialization module is used to confirm the current node of the private chain and synchronize the consensus block in the private chain; the digital identity module is provided by the digital identity authentication center and is used to authorize and authenticate the identity of the node user.

[0070] Furthermore, if Figure 2 As shown, in this embodiment, a database server and a WEB server are also included, and the database server and the WEB server are connected to the first blockchain server.

[0071] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or replace some or all of the technical features therein with equivalents. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A private chain-based on-campus grade certification method, characterized in that: The following steps are involved: S1. Determine the underlying parameters, rules and private chain nodes of a private chain, and build a private chain; the private chain nodes include a first node and a plurality of second nodes; the first node and the second node both store block data of the entire private chain, and each block data includes a data index of the performance information and a hash value of the performance information; S2. The first node creates a data index for the score information that needs to be uploaded to the chain, and calculates its hash value using a hash encryption algorithm; After the hash value of the data index and score information is digitally signed and packaged to generate new block data, it is broadcast to all nodes in the private chain; S3. All nodes in the private chain verify the format and signature of the new block. If one of the nodes fails the verification, the node discards the block. If the verification passes, each node updates the block data in the local node. S4. When it is necessary to query, verify or audit the off-chain score data, determine the data index corresponding to the score data, obtain the hash value corresponding to the data index on all nodes according to the data index, and at the same time, calculate the hash value of the corresponding off-chain score information, and compare all the hash values. If all are equal, it proves that the verification is passed and the score is correct, otherwise it means that it has been tampered with; S5. The second node automatically verifies the on-chain performance data regularly and obtains the hash values ​​H1~H corresponding to the data index on all nodes according to the data index. n , and compare all the hash values. If they are all equal, the verification is passed and the score is correct. Otherwise, it means that the hash data on the chain has been tampered with, and the verification result is returned to the first node; In S2, the first node performs identity authentication on the administrator and then creates an index for the data.

2. A school grade record storage system based on a private chain, characterized in that: A private chain-based school grade notarization method for implementing claim 1, comprising: a first blockchain server and multiple second blockchain servers; the first blockchain server is used to join the private chain as a first node, and the second blockchain server is used to join the private chain as a second node.

3. According to the private chain-based school grade evidence storage system of claim 2, it is characterized in that: The first blockchain server includes: The first client management module is used to provide an interface and interface; The score upload module is used to create a data index based on the score information that needs to be uploaded to the chain sent by the first client management module, and to calculate the hash value of the uploaded information by applying the hash encryption algorithm. Then, the data index and the hash value are digitally signed and packaged to generate new block data, and then broadcast to other second blockchain servers; The first new block update module: used to update the blockchain data of this node after generating new block data; Score query verification module: used to receive the query verification request sent by the first client management module, obtain the data index corresponding to the data to be verified in the verification request, and obtain the hash value H1~H corresponding to the data index from all nodes on the private chain. n , and calculate the hash value H0 of the corresponding off-chain performance information, and obtain the hash value H1~H n Compare with H0 and return the comparison result.

4. According to the private chain-based school grade evidence storage system of claim 2, it is characterized in that: The second blockchain server includes: The second client management module is used to provide an interface and interface; The second new block update module is used to verify the correctness of the new block after receiving the broadcasted new block data, and update the blockchain data of this node so that the updated blockchain contains all the consensus blocks; The score timing verification module is used to determine the block height and data index that need to be verified at regular intervals according to the rules set by the first node server, automatically verify the score data on the chain, and obtain the hash values ​​H1~H corresponding to the data index on all nodes according to the data index. n , and compare all hash values, and return the verification result to the first blockchain server.

5. According to the private chain-based school grade evidence storage system of claim 2, it is characterized in that: The first blockchain server and the second blockchain server both include an initialization module and a digital identity module; The initialization module is used to confirm the current node of the private chain and synchronize the consensus block in the private chain; The digital identity module is provided by the digital identity authentication center and is used to authorize and authenticate the identity of the node user.

6. According to the private chain-based school grade evidence storage system of claim 2, it is characterized in that: It also includes a database server and a WEB server, and the database server and the WEB server are connected to the first blockchain server.