A teaching management method and system based on blockchain and searchable encryption
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- YUNNAN NORMAL UNIV
- Filing Date
- 2026-02-10
- Publication Date
- 2026-06-02
Smart Images

Figure CN122134278A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of information security technology, and in particular to a teaching management method and system based on blockchain and searchable encryption. Background Technology
[0002] The rapid development of information technology has driven profound changes in teaching management models in higher education. Modern teaching management has demonstrated significant advantages in improving teaching efficiency and promoting students' all-round development. However, in actual teaching management practice, teachers often need to rely on multiple teaching platforms (such as Learning Tong and Rain Classroom) to carry out teaching activities. This fragmented application model of platforms leads to the scattered storage of teaching data, and key data such as student grades and outstanding student works are difficult to archive and evaluate systematically. It also significantly increases the burden of data integration and management for teachers. Existing teaching management is facing multiple challenges, such as the systematic recording of teaching activities and learning outcomes by teachers, and the storage and secure sharing of massive amounts of data. How to solve key issues such as data fragmentation, the inability to systematically record learning performance information, and insufficient security in storage and sharing has become a focus of common concern for academia and industry.
[0003] Currently, relevant technical solutions have been developed using blockchain and the InterPlanetary File System (IPFS) to address the aforementioned issues. Blockchain is a distributed ledger technology whose core characteristics include decentralization, immutability, and transparency, ensuring the integrity and authenticity of data. The InterPlanetary File System is a network transmission protocol designed to create persistent and distributed storage and sharing of files. It is a content-addressable peer-to-peer hypermedia distribution protocol. Nodes in the IPFS network constitute a distributed file system. Files in the IPFS system are stored in fragments across multiple nodes globally. Visitors can quickly retrieve and download fragments of files using their CID. IPFS's decentralized nature makes it particularly suitable for integration with blockchain, providing on-chain and off-chain collaborative storage solutions to address the limited storage capacity of blockchain itself.
[0004] However, the inventors discovered during the process of conceiving and implementing this application that although relevant blockchain solutions have made progress in improving the security and transparency of teaching management, they have not yet fully solved how to display students' various grades (such as daily grades, midterm grades, final grades and comprehensive grades) and their rankings, and lack the openness and transparency of the entire teaching management process, while also being insufficient in terms of the trusted storage and sharing of data. Summary of the Invention
[0005] To address the shortcomings of existing technologies, this invention provides a teaching management method and system based on blockchain and searchable encryption. It aims to solve key problems such as data fragmentation, the inability to systematically record, store, and share academic performance information, and insufficient security in these areas. This method can not only systematically record students' grades and rankings, but also ensure the massive storage and reliable sharing of student work data, thereby promoting data security and transparency in the field of teaching management.
[0006] Firstly, to achieve the above objectives, this application provides a teaching management method based on blockchain and searchable encryption, comprising the following steps: S1: Construct an on-chain and off-chain collaborative storage model. The Ethereum blockchain stores user role information, course information, student grade information and work information. The InterPlanetary File System (IPFS) is used to store encrypted student work data. The hash value CID returned by IPFS is stored on the blockchain as part of the on-chain metadata. The CID is recorded on the blockchain as an index. S2: Design a searchable encryption scheme. Use the AES algorithm to symmetrically encrypt student work data. Use the SHA-256 algorithm to generate fixed-length hash values for work keywords and store these hash values as ciphertext indexes in the blockchain. By initiating a keyword search request, perform the same SHA-256 hash operation on the input plaintext keywords to generate query ciphertext. Match the stored keyword hash values in the blockchain. If a match is successful, return the corresponding work's metadata and CID. After obtaining the AES decryption key from the teacher through a secure channel, download and decrypt the original work data. S3: Design smart contracts to record performance data; design and deploy multiple types of smart contracts on the blockchain, including: An administrator contract, used to set up and manage user accounts; A teacher contract has been established, which is used to store and update teacher information; A student contract, which is used to store and update student information; A course contract, which is used to store and update course information; The grade contract is used to calculate and record weekly grades, midterm grades, final grades, and comprehensive grades calculated according to preset weights, and to calculate and record class rankings for each grade dimension. S4: Design a smart contract to implement role access control. Design and deploy a work contract and a role access control contract on the blockchain. The work contract mainly stores and updates relevant information of the work on the blockchain. The role access control contract is used to handle work access applications across classes or years. The access control logic integrated between the work contract and the role access control contract is as follows: students can access their own and their classmates' works by default. Access to data across classes or grades requires an application to the administrator and temporary authorization after the application is approved. Teachers can access the works of their own classmates by default. Access to data across classes requires an application to the administrator and temporary authorization after the application is approved. All work upload, deletion and access application operations are executed through smart contracts and stored on the blockchain.
[0007] Administrators are responsible for entering teacher, student, and course information into the blockchain and can update or delete this information.
[0008] In daily teaching, teachers assign tasks according to the teaching plan, and students complete the tasks online or offline and generate corresponding teaching data. After the teachers review and grade the assignments, they encrypt the students' work and upload it to IPFS to obtain a unique hash CID.
[0009] Subsequently, teachers enter student grades and artwork information into the blockchain for later retrieval. When a teacher needs to query student grades or artwork, the blockchain will return the relevant grade and artwork information. If a teacher needs to query artwork from students in other teachers' classes, the teacher must apply for access permission from the administrator and obtain the administrator's approval before making the query. The administrator can query the blockchain for teacher, student, course information, student grades, and related artwork, and the blockchain will return the corresponding information. The administrator can also delete student artwork.
[0010] In addition, administrators can send the CID from the artwork information to IPFS. IPFS will return an encrypted artwork. After the teacher sends the key through a secure channel, the administrator can decrypt the artwork. Students can also query their own grades and the artwork of their classmates on the blockchain. However, if they want to query the artwork of other classes or students from previous years, they need to apply for access permissions from the administrator. After the blockchain returns the relevant results, students can send the CID from the artwork information to IPFS. IPFS will return an encrypted artwork. After the teacher sends the key through a secure channel, the student can decrypt the artwork.
[0011] As a further aspect of the present invention, the specific steps are as follows: Step 1. Administrators input teacher information, student information, and course information into the blockchain based on smart contracts, and can update or delete this information.
[0012] Step 2. Teachers assign teaching tasks according to the teaching plan.
[0013] Step 3. Students complete tasks assigned by teachers on various teaching platforms or offline, generating teaching data.
[0014] Step 4. Teachers review the teaching results, obtain student works, and grade and score the students' assignments.
[0015] Step 5. After the teacher encrypts the student's work, it is uploaded to IPFS. IPFS returns the hash CID of the encrypted work.
[0016] Step 6. Teachers use smart contracts to input students' grades and related work information into the blockchain and can update the grades and work information.
[0017] Step 7. The teacher sends a request to the blockchain to query the students' grades and related works, and the blockchain returns the query results for the grades and related works.
[0018] Step 8. If a teacher wants to search for student works from other teachers' classes, they need to apply for access permission from the administrator. Only after the administrator approves the application can the search be performed.
[0019] Step 9. The administrator sends a request to the blockchain to query information about teachers, students, or courses, as well as students' grades and related works. The blockchain returns the query results. In addition, the administrator can delete the student works found in the search.
[0020] Step 10. The administrator sends the CID to IPFS, and IPFS returns the found encrypted work to the administrator. The administrator then waits for the teacher to send the key through a secure channel, and uses the key to decrypt the work.
[0021] Step 11. Students send a request to the blockchain to query their grades and related works, and the blockchain returns the query results.
[0022] Step 12. If students want to search for student works from other classes in the same grade or previous classes, they need to apply for access permissions from the administrator. Only after the administrator approves the application can they conduct the search.
[0023] Step 13. Students send their CID to IPFS, and IPFS returns the encrypted work to the students. The teachers then send the key via a secure channel, which the students use to decrypt the work.
[0024] As a further aspect of the present invention, the specific steps of Step 1 are as follows: Step 1.1. Before the administrator can perform any actions, the administrator's account and password must be set through the administrator smart contract contract admin; Step 1.2. The administrator enters student information (student ID, password, name, grade, class, major, and contact number) into the blockchain for storage through the studentSetup() function in the student smart contract contract student. The password is stored after being encrypted with SHA-256, and the rest of the information is stored in plaintext. The student ID and password are used as the student's login account and password. Step 1.3. The administrator enters the teacher information (employee ID, password, name, major or research expertise, contact number) into the blockchain for storage through the teacher smart contract contract teacher's teacherSetup() function. The password is stored after being encrypted with SHA-256, and the rest of the information is stored in plaintext. The employee ID and password are used as the student's login account and password. Step 1.4. The administrator uses the courseSetup() function in the course smart contract contract course to enter the course information (course number, course name, class name, credits, semester, instructor, start week, class time, class location, number of students enrolled) into the blockchain for storage; Step 1.5. If the administrator needs to modify student information, they must ensure that the student ID remains unchanged, and then modify the remaining information through the ChangestudentInfo() function in the contract student. Step 1.6. If the administrator needs to modify the teacher information, they must ensure that the employee ID remains unchanged, and then modify the remaining information through the ChangeTeacherInfo() function in the contract teacher. Step 1.7. If the administrator needs to modify course information, they must ensure that the course number remains unchanged, and then modify the remaining information through the ChangeCourseInfo() function in the contract course. Step 1.8. If an administrator wants to delete student information, they must first check if the student information exists by student ID or name before they can delete it. Deleting student information is achieved through the DelectStudent() function in the contract student. Step 1.9. If an administrator wants to delete teacher information, they must first check whether the teacher information exists by employee ID or name before they can delete it. Deleting teacher information is achieved through the DelectTeacher() function in the contract teacher. Step 1.10. If an administrator wants to delete course information, they must first check if the course information exists by course number before they can delete it. Deleting course information is achieved through the Delectcourse() function in the contract course.
[0025] As a further aspect of the present invention, the specific steps of Step 5 are as follows: Step 5.1. The teacher uses the AES encryption algorithm to encrypt the student's work, then uploads the encrypted work to IPFS and obtains the hash value CID returned by IPFS; As a further aspect of the present invention, the specific steps of Step 6 are as follows: Step 6.1. Before teachers enter students' weekly grades, they need to first enter the number of times they achieved full marks for attendance, online self-study, and class discussions this week. First, retrieve the student's name, class, course number, and course name by student ID or name. Then, enter <course number, course name, week number, attendance, online self-study, class discussion> to complete the entry of information for the student's full marks for the week. This entry is achieved through the `ManfenScoreSetup()` function in the scores smart contract `contract scores`. Step 6.2. If a teacher needs to modify the information regarding the conditions for a student's full score for this week's regular grades, they need to ensure that the course number and week number remain unchanged, and modify the remaining information. The modification of the information regarding the conditions for a student's full score for this week's regular grades is achieved through the ChangeManfenInfo() function in the scores smart contract. Step 6.3. After entering the information for the students' full marks for this week's regular grades, enter the following: <Course Number, Course Name, Week Number, Student ID, Name, Attendance Count, Online Self-Study Count, Class Discussion Count, Comprehensive Experiment Score, Homework Score>. The regular grades are calculated according to the following rules: Figure 2 As shown, the information for entering students' weekly grades is completed through the PingShiScore() function in the score smart contract. Step 6.4. If a teacher needs to modify a student's weekly grade information, they need to ensure that the course number and week number remain unchanged, and modify the rest of the information. Modifying the student's weekly grade information is done through the ChangePinshiScore() function in the score smart contract contract scores; Step 6.5. If a teacher needs to enter a student's midterm grades, they should first look up the student's name, class, course number, and course name by the student's student ID or name. Then, they should enter <course number, course name, student name, student ID, midterm grade> to complete the entry of the student's midterm grade information. The entry of the student's midterm grade information is completed through the QzScoreSetup() function in the score smart contract contract scores. Step 6.6. If a teacher needs to modify a student's midterm grade information, they need to ensure that the course number and week number remain unchanged, and modify the rest of the information. Modifying the student's midterm grade information is done through the ChangeQzScore() function in the score smart contract contract scores; Step 6.7. If a teacher needs to enter students' final grades, they should first look up the student's name, class, course number, and course name by the student's student ID or name. Then, they should enter <course number, course name, student name, student ID, objective grade, subjective grade> to complete the entry of the student's final grade information. The entry of the student's final grades is completed through the QmScoreSetup() function in the score smart contract contract scores. Step 6.8. If a teacher needs to modify a student's final grade information, they need to ensure that the week number remains unchanged and modify the rest of the information. Modifying the student's final grade information is done through the ChangeQmScore() function in the score smart contract contract scores; Step 6.9. Teachers input the work information (work name, work category, work keywords, work IPFS CID, work semester, remarks, student ID, instructor's employee ID) into the blockchain for storage. The work keywords are encrypted using the SHA-256 algorithm and stored as ciphertext, while the remaining information is stored in plaintext. Keywords form a mapping relationship with other information, i.e.: <keyword> -> <work name, work category, work IPFS CID, work semester, remarks, student ID, instructor's employee ID>. Inputting work information is completed through the `studentWork()` function in the `contract work` section of the work's smart contract. Step 6.10. If a teacher needs to modify the work information, they must ensure that the IPFS CID of the work remains unchanged and modify the rest of the information. Modifying the work information is done through the ChangestudentWorkInfo() function in the contract work of the work's smart contract. As a further aspect of the present invention, the specific steps of Step 7 are as follows: Step 7.1. Teachers can enter the student's student ID or name to check the student's grades. The query results will display three sections. The first is basic information, including the student's name, class, course number, and course name. The second is the overall grade, which includes daily grades and their rankings, midterm grades and their rankings, final grades and their rankings, and the overall grade and its ranking. The calculation method for the overall grade is as follows: Figure 3 As shown.
[0026] Thirdly, it displays detailed class attendance records, showing the class attendance details for all students across all 18 weeks. The displayed fields include: <Course ID, Course Name, Week Number, Attendance, Online Self-Study, Class Discussion, Comprehensive Design Experiment, Homework, and Weekly Class Attendance Grade>. The query and display of daily grades, midterm grades, final grades, and overall grades are completed through the `searchPSScore()`, `searchQZScore()`, `searchQmScore()`, and `searchZHScore()` functions in the `contractscores` smart contract. Ranking is completed through the `Getpinshirank()`, `GetQiZhongrank()`, `GetQimorank()`, and `GetZongherank()` functions in the `contractscores` contract, respectively. The average of the 18-week daily grades is calculated using the `PSScoreSetup()` function in the `contractscores` smart contract, and the overall grade is calculated based on weights using the `ZHScoreSetup()` function in the `contractscores` smart contract. Detailed display of daily grades is completed through the `getPingshiScoreDetails()` function in the `contractscores` smart contract. Step 7.2. Teachers enter student IDs to search for student works. The blockchain returns the search results, which will display the work name, category, keywords, IPFS CID, semester, remarks, student ID, name, and class. Student work search is completed through the searchstudentWork() function in the contract work of the work smart contract. Step 7.3. Teachers can also enter keywords to search for student works. A searchable encryption method is used for secure searching. Teachers enter plaintext keywords, which are then encrypted using SHA-256 hashing and matched against the works stored in the blockchain. Since the keywords for student works were encrypted using SHA-256 beforehand, a successful match will return relevant work information (work name, category, encrypted keywords, IPFS CID, semester, remarks, student ID, name, class). As a further aspect of the present invention, the specific steps of Step 8 are as follows: Step 8.1. If a teacher wants to query student works from other teachers' classes, they need to apply to the administrator for access control permissions. After the administrator agrees, the teacher can query the works. The teacher can apply to the administrator to access student works from other teachers' classes by entering the keywords of the works and the detailed application content. The teacher's application is completed through the requireSetup() function in the contract shenqing. Whether the administrator agrees to the application is completed through the PassShenqing() and RejectShenqing() functions in the contract shenqing.
[0027] As a further aspect of the present invention, the specific steps of Step 9 are as follows: Step 9.1. The administrator can retrieve the student's information by entering the student's student ID or name. The query is implemented through the searchStuden() function in the contract student. Step 9.2. The administrator can enter the teacher's employee ID or name to retrieve the teacher's relevant information. The query is implemented through the searchteacher() function in the contract teacher. Step 9.3. The administrator can enter the course number to retrieve relevant course information. The query is achieved through the searchcourse() function in the contract course. Step 9.4. The administrator can retrieve the student's course grades by entering the student's ID and course number. The query results will display three sections: the first is basic information, including the student's name, class, course number, and course name; The second is the overall grade, which includes daily grades and their rankings, midterm grades and their rankings, final grades and their rankings, and the overall grade and its ranking. The calculation method for the overall grade is as follows: Figure 3 As shown; Thirdly, it displays detailed class attendance records, showing the class attendance details for all students across all 18 weeks. The displayed fields include: <Course ID, Course Name, Week Number, Attendance, Online Self-Study, Class Discussion, Comprehensive Design Experiment, Homework, and Weekly Class Attendance Grade>. The query and display of daily grades, midterm grades, final grades, and overall grades are completed through the searchPSScore(), searchQZScore(), searchQmScore(), and searchZHScore() functions in the score smart contract contract scores. The ranking is completed through the Getpinshirank(), GetQiZhongrank(), GetQimorank(), and GetZongherank() functions in the contract scores respectively. The average of the 18-week daily grades is calculated through the PSScoreSetup() function in the score smart contract contract scores. The overall grade is calculated according to the weights through the ZHScoreSetup() function in the score smart contract contract scores. The detailed display of daily grades is completed through the getPingshiScoreDetails() function in the score smart contract contract scores. Step 9.5. The administrator enters the student's ID to search for student works. The blockchain returns the search results, which will display the work name, category, keywords, IPFS CID, semester, remarks, student ID, name, and class. The student work search is completed through the searchstudentWork() function in the contract work of the work's smart contract. Step 9.6. Administrators can also enter keywords to search for student works. A searchable encrypted search is used for security. Administrators enter plaintext keywords, and the system encrypts these keywords using SHA-256 hashing and matches them against the works stored in the blockchain. Since the keywords for student works were previously encrypted using SHA-256 when teachers stored them, a successful match will return relevant work information (work name, category, encrypted keywords, IPFS CID, semester, remarks, student ID, name, class). Step 9.7. When the administrator retrieves a student's work, they can delete the work by entering its IPFS CID. Deleting a student's work is done through the DelectstudentWork() function in the work's smart contract's contract work. As a further aspect of the present invention, the specific steps of Step 10 are as follows: Step 10.1. The administrator obtains the CID of the work from the found work information, and then sends the CID to IPFS. IPFS returns the matched encrypted file to the administrator. The administrator requests a decryption key from the teacher. The teacher sends the AES key to the administrator through a secure channel. The administrator uses the key to decrypt the work.
[0028] As a further aspect of the present invention, the specific steps of Step 11 are as follows: Step 11.1. Students can enter the course number to check their weekly class attendance grades. The query results will display two sections. The first section shows the criteria for achieving a perfect score for the week's class attendance grade, displaying fields such as <course number, course name, week number, number of times attendance scores are perfect, number of times online self-study scores are perfect, number of times class discussion scores are perfect>. The second is the week's regular grades, which display fields such as <course number, course name, week number, attendance count, online self-study count, class discussion count, comprehensive design experiment score, homework score, and week's regular grades>. The week's regular grades can be queried through the getLastcourse() and PingShiScore() functions in the score smart contract contract scores. Step 11.2. Students can enter the course number to query the class performance information for all weeks. The results will display the class performance details for 18 weeks, and the fields displayed are <course number, course name, week number, attendance count, online self-study count, class discussion count, comprehensive design experiment score, homework score, weekly class performance>. The class performance details are displayed through the getPingshiScoreDetails() function in the score smart contract contract scores. Step 11.3. Students can enter the course number to query their midterm grades. The displayed fields are <course number, course name, midterm grade>. Midterm grade queries are completed through the searchQZScore() function in the score smart contract contract scores. Step 11.4. Students can enter the course number to query their final grade information. The displayed fields include <Course Number, Course Name, Subjective Grade, Objective Grade, Final Grade>. The calculation rules for the final grade are as follows: Figure 3 As shown, the final exam grade query is completed through the searchQmScore() function in the score smart contract contract scores; Step 11.5. Students can enter the course number to query their overall grade information. The displayed fields include <Course Number, Course Name, Class Participation Grade, Midterm Grade, Final Grade, Overall Grade>. It will also display the ranking of class participation grade, midterm grade, final grade, and overall grade. The calculation rules for the overall grade are as follows: Figure 3 As shown, the overall score query is completed through the searchZHScore() function in the score smart contract contract scores, the overall score is calculated according to the weight through the ZHScoreSetup() function in the score smart contract contract scores, and the ranking of each score is completed through the Getpinshirank(), GetQiZhongrank(), GetQimorank() and GetZongherank() functions in the contract contract scores respectively; Step 11.6. Students enter their student ID to search for student works. The blockchain returns the search results, which will display the work name, category, encrypted keywords, IPFS CID, semester, remarks, student ID, name, and class. Student work search is completed through the searchstudentWork() function in the contract work of the work's smart contract. Step 11.7. Students can also enter keywords to search for student works. A searchable encryption method is used for secure searching. Students enter plaintext keywords, which are then encrypted using SHA-256 hashing and matched against works stored in the blockchain. Since the keywords for student works were previously encrypted using SHA-256 when teachers stored them, a successful match will return relevant work information (work name, category, encrypted keywords, IPFS CID, semester, remarks, student ID, name, class). As a further aspect of the present invention, the specific steps of Step 12 are as follows: Step 12.1. If a student wants to view student works from other classes in the same grade, they need to request access control permissions from the administrator. Once the administrator approves, the student can view the works. The student can request access to student works from other classes by entering keywords and detailed request information. The student's request is completed through the requireSetup() function in the contract shenqing smart contract. The administrator's approval is determined by the PassShenqing() and RejectShenqing() functions in the contract shenqing smart contract. Step 12.2. If a student wants to view past student works, they need to apply to the administrator for access control permissions. After the administrator agrees, the student can view the works. The student can apply to the administrator for access to past student works by entering the keywords of the works and the detailed application content. The student's application is completed through the requireSetup() function in the contract shenqing. Whether the administrator agrees to the application is completed through the PassShenqing() and RejectShenqing() functions in the contract shenqing. As a further aspect of the present invention, the specific steps of Step 13 are as follows: Step 13.1. Students obtain the CID of a work from the found work information, and then send the CID to IPFS. IPFS returns the matched encrypted file to the student. The student requests a decryption key from the teacher. The teacher sends the AES key to the student through a secure channel. The student uses the key to decrypt the work.
[0029] Secondly, to achieve the above objectives, this application also provides a blockchain-based and searchable encrypted teaching management system, including: administrators, teachers, and students can perform relevant operations on the management system, and the system performs the relevant operations as described in any of the preceding teaching management methods, including: Smart contract module: Deploys and executes smart contracts on the blockchain; Ethereum blockchain: used to store index information and associated fields of users, courses, and student works, record grades and rankings, provide role access control and approval, keyword hash matching and query, and support the updating and deletion of user and work data; InterPlanetary File System (IPFS): Used to store encrypted student work using the AES algorithm, and to locate and retrieve it based on the hash value CID; Encryption and retrieval module: Used to encrypt and decrypt student works using AES, and to perform SHA-256 hash calculations on keywords to achieve on-chain matching and retrieval; Client module: Allows administrators, teachers and students to initiate operations such as information entry, query, approval, update or deletion on the blockchain according to their respective roles, and retrieve encrypted works from IPFS after obtaining CID.
[0030] Furthermore, the Ethereum blockchain and IPFS are used for on-chain and off-chain collaborative storage. Symmetric encryption and keyword hash encryption are performed on the student work data. The encrypted files are uploaded to IPFS, and the work index containing CID and encrypted keywords is written to the blockchain through the smart contract.
[0031] Furthermore, when executing a query, the encryption and retrieval module submits the SHA-256 hash of the keyword to the blockchain for matching, and the plaintext keyword and plaintext AES key are not stored on the chain.
[0032] Furthermore, the smart contract module supports user access permission management and the management of cross-permission access requests.
[0033] Furthermore, access to user works by administrators, teachers, and students requires administrator authorization.
[0034] Compared with the prior art, the beneficial effects of the present invention are as follows: 1. This invention constructs an on-chain and off-chain collaborative storage model based on the Ethereum blockchain and IPFS, in which index information of users, courses and student works is stored on-chain, and encrypted student work data is stored off-chain in IPFS, thereby ensuring data security and large-scale storage capacity.
[0035] 2. This invention designs a role-based access control system based on smart contracts to achieve fine-grained access control and prevent unauthorized access. At the same time, it designs a searchable encryption scheme by combining AES and SHA-256 algorithms to achieve encrypted searching of student works, thus realizing secure sharing while ensuring data privacy.
[0036] 3. This invention fully records students' periodic grades (including weekly grades, midterm grades, and final grades) and corresponding rankings, and ensures the openness and transparency of the teaching management process through smart contracts.
[0037] 4. When this invention is applied in different universities, each university can flexibly formulate appropriate grade weights and calculation methods according to its own policies, regulations and needs. It supports adjusting the proportion of daily grades, midterm grades and final grades in the smart contract according to the actual situation of each university. It can meet personalized evaluation needs without structural modifications, which fully reflects the system's wide applicability, flexibility and scalability. Attached Figure Description
[0038] Figure 1 This is a schematic diagram of the steps of the present invention; Figure 2 This is the method for calculating weekly performance grades in this embodiment of the invention; Figure 3 These are the score calculation rules for each stage in this embodiment of the invention; Figure 4 This refers to the gas consumption of administrator transaction operations in this embodiment of the invention; Figure 5 This refers to the gas consumption of teacher transaction operations in this embodiment of the invention; Figure 6This refers to the gas consumption of student transaction operations in this embodiment of the invention. Detailed Implementation
[0039] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0040] The present invention will be further described below with reference to the accompanying drawings and specific embodiments.
[0041] Example 1: As Figure 1 As shown, this is a teaching management method based on blockchain and searchable encryption. In this method, the administrator is responsible for entering teacher, student and course information into the blockchain and can update or delete this information. In daily teaching, teachers assign tasks according to the teaching plan, students complete the tasks online or offline and generate corresponding teaching data. After the teacher accepts and grades the assignments, the student's work is encrypted and uploaded to IPFS to obtain a unique hash CID.
[0042] Subsequently, teachers enter student grades and work information into the blockchain for later retrieval. When a teacher needs to query student grades or work, the blockchain will return the relevant grade and work information. If a teacher needs to query the work of students in other teachers' classes, the teacher must apply for access permission from the administrator and wait for the administrator's approval before querying. The administrator can query the blockchain for teacher, student, course information, student grades and related works, and the blockchain will return the corresponding information. The administrator can also delete student works.
[0043] In addition, administrators can send the CID from the artwork information to IPFS. IPFS will return an encrypted artwork, which the administrator can then decrypt after the teacher sends the key through a secure channel. Students can also query their own grades and classmates' artwork on the blockchain. However, to query artwork from other classes or previous years, they need to request access from the administrator. After the blockchain returns the relevant results, students can send the CID from the artwork information to IPFS. IPFS will then return an encrypted artwork, which the student can then decrypt after the teacher sends the key through a secure channel.
[0044] The specific steps of the method are as follows: Step 1. Administrators input teacher information, student information, and course information into the blockchain based on smart contracts, and can update or delete this information.
[0045] The specific steps of Step 1 are as follows: Step 1.1. Before the administrator can perform any actions, the administrator's account and password must be set through the administrator smart contract contract admin; Step 1.2. The administrator enters student information (student ID, password, name, grade, class, major, and contact number) into the blockchain for storage through the studentSetup() function in the student smart contract contract student. The password is stored after being encrypted with SHA-256, and the rest of the information is stored in plaintext. The student ID and password are used as the student's login account and password. Step 1.3. The administrator enters the teacher information (employee ID, password, name, major or research expertise, contact number) into the blockchain for storage through the teacher smart contract contract teacher's teacherSetup() function. The password is stored after being encrypted with SHA-256, and the rest of the information is stored in plaintext. The employee ID and password are used as the student's login account and password. Step 1.4. The administrator uses the courseSetup() function in the course smart contract contract course to enter the course information (course number, course name, class name, credits, semester, instructor, start week, class time, class location, number of students enrolled) into the blockchain for storage; Step 1.5. If the administrator needs to modify student information, they must ensure that the student ID remains unchanged, and then modify the remaining information through the ChangestudentInfo() function in the contract student. Step 1.6. If the administrator needs to modify the teacher information, they must ensure that the employee ID remains unchanged, and then modify the remaining information through the ChangeTeacherInfo() function in the contract teacher. Step 1.7. If the administrator needs to modify course information, they must ensure that the course number remains unchanged, and then modify the remaining information through the ChangeCourseInfo() function in the contract course. Step 1.8. If an administrator wants to delete student information, they must first check if the student information exists by student ID or name before they can delete it. Deleting student information is achieved through the DelectStudent() function in the contract student. Step 1.9. If an administrator wants to delete teacher information, they must first check whether the teacher information exists by employee ID or name before they can delete it. Deleting teacher information is achieved through the DelectTeacher() function in the contract teacher. Step 1.10. If an administrator wants to delete course information, they must first check if the course information exists by course number before they can delete it. Deleting course information is achieved through the Delectcourse() function in the contract course. Step 2. Teachers assign teaching tasks according to the teaching plan.
[0046] The specific steps of Step 2 are as follows: Step 2.1: Teachers log in to their teacher accounts on the relevant teaching platform using their own username and password.
[0047] Step 2.2: Post the teaching tasks in the relevant classes on the relevant teaching platforms.
[0048] Step 3: Students complete tasks assigned by teachers on various teaching platforms or offline, generating teaching data.
[0049] The specific steps of Step 3 are as follows: Step 3.1: Students log in to their student accounts on the corresponding teaching platform using their own username and password.
[0050] Step 3.2: Check the tasks posted by the teacher of your class.
[0051] Step 4: Students complete tasks assigned by teachers on various teaching platforms or offline, generating teaching data.
[0052] The specific steps of Step 4 are as follows: Step 4.1: Students upload their assignments within the specified time, thereby generating teaching data.
[0053] Step 4.2: Teachers grade student assignments online, generating teaching feedback.
[0054] Step 4.2: Teachers download all teaching data generated by the corresponding teaching platform for this task.
[0055] Step 5: After the teacher encrypts the student's work, it is uploaded to IPFS. IPFS returns the hash CID of the encrypted work.
[0056] The specific steps of Step 5 are as follows: Step 5.1. The teacher uses the AES encryption algorithm to encrypt the student's work, then uploads the encrypted work to IPFS and obtains the hash value CID returned by IPFS.
[0057] Step 6: Teachers use smart contracts to input students' grades and related work information into the blockchain and can update the grades and work information.
[0058] The specific steps of Step 6 are as follows: Step 6.1. Before teachers enter students' weekly grades, they need to first enter the number of times they achieved full marks for attendance, online self-study, and class discussions this week. First, retrieve the student's name, class, course number, and course name by student ID or name. Then, enter <course number, course name, week number, attendance, online self-study, class discussion> to complete the entry of information for the student's full marks for the week. Entering the information for the student's full marks for the week is achieved through the `ManfenScoreSetup()` function in the scores smart contract `contract scores`. Step 6.2. If a teacher needs to modify the information regarding the conditions for a student's full score for this week's classwork grade, they must ensure that the course number and week number remain unchanged, and modify the remaining information. Modifying the information regarding the conditions for a student's full score for this week's classwork grade is achieved through the `ChangeManfenInfo()` function in the scores smart contract `contract scores`. Step 6.3. After entering the information for the students' full marks for this week's regular grades, enter the following: <Course Number, Course Name, Week Number, Student ID, Name, Attendance Count, Online Self-Study Count, Class Discussion Count, Comprehensive Experiment Score, Homework Score>. The regular grades are calculated according to the following rules: Figure 2 As shown, the information for entering students' weekly grades is done through the PingShiScore() function in the scores smart contract. Step 6.4. If a teacher needs to modify a student's weekly grade, they must ensure the course number and week number remain unchanged, and modify the remaining information. Modifying a student's weekly grade is done through the `ChangePinshiScore()` function in the `contract scores` smart contract. Step 6.5. If a teacher needs to enter students' midterm grades, they should first look up the student's name, class, course number, and course name using the student's student ID or name. Then, they should enter the <course number, course name, student name, student ID, midterm grade> to complete the entry of the student's midterm grade information. The entry of student midterm grade information is accomplished through the QzScoreSetup() function in the scores smart contract. Step 6.6. If teachers need to modify students' midterm grades, they must ensure that the course number and week number remain unchanged, and modify the remaining information. Modifying students' midterm grades is done through the `ChangeQzScore()` function in the scores smart contract. Step 6.7. If a teacher needs to enter students' final grades, they should first look up the student's name, class, course number, and course name by the student's student ID or name. Then, they should enter <course number, course name, student name, student ID, objective grade, subjective grade> to complete the entry of the student's final grade information. The entry of the student's final grades is completed through the QmScoreSetup() function in the score smart contract contract scores. Step 6.8. If a teacher needs to modify a student's final grade information, they need to ensure that the week number remains unchanged and modify the rest of the information. Modifying the student's final grade information is done through the ChangeQmScore() function in the score smart contract contract scores; Step 6.9. Teachers enter the work information (work name, work category, work keywords, work IPFS CID, work semester, remarks, student ID, instructor's employee ID) into the blockchain for storage. Among them, the work keywords will be encrypted using the SHA-256 algorithm and stored in ciphertext, while the remaining information will be stored in plaintext. The keywords form a mapping relationship with other information, that is: <keyword> -> <work name, work category, work IPFS CID, work semester, remarks, student ID, instructor's employee ID>. Entering the work information is completed through the studentWork() function in the contract work of the work's smart contract. Step 6.10. If a teacher needs to modify the work information, they must ensure that the IPFS CID of the work remains unchanged and modify the rest of the information. Modifying the work information is done through the ChangestudentWorkInfo() function in the contract work of the work smart contract.
[0059] Step 7: The teacher sends a request to the blockchain to query the students' grades and related works, and the blockchain returns the query results for the grades and related works.
[0060] The specific steps of Step 7 are as follows: Step 7.1. Teachers can retrieve student grades by entering the student's student ID or name. The query results will display three sections: the first is basic information, including the student's name, class, course number, and course name; the second is the overall grade, including the student's daily performance and ranking, midterm and ranking, final and ranking, and overall grade and ranking. The overall grade is calculated as follows: Figure 3 As shown. The third is the detailed class performance information, which displays the class performance details for all students across all 18 weeks. The displayed fields include: <Course ID, Course Name, Week Number, Attendance, Online Self-Study, Class Discussion, Comprehensive Design Experiment, Homework, and Class Performance for That Week>. The query and display of regular grades, midterm grades, final grades, and overall grades are completed through the searchPSScore(), searchQZScore(), searchQmScore(), and searchZHScore() functions in the score smart contract contract scores. Their ranking is completed through the Getpinshirank(), GetQiZhongrank(), GetQimorank(), and GetZongherank() functions in the contract scores, respectively.
[0061] The average of the 18-week daily performance is calculated using the PSScoreSetup() function in the score smart contract `contract scores`, and the overall score is calculated using the ZHScoreSetup() function in the same contract. Detailed displays of the daily performance are provided by the getPingshiScoreDetails() function in the same contract. Step 7.2. Teachers enter student IDs to search for student works. The blockchain returns the search results, displaying the work name, category, keywords, IPFS CID, semester, remarks, student ID, name, and class. Student work searches are completed through the `searchstudentWork()` function in the `contract work` smart contract. Step 7.3. Teachers can also enter keywords to search for student works. A searchable encryption method is used for secure searching. Teachers enter plaintext keywords, which are then encrypted using SHA-256 hashing and matched against the works stored in the blockchain. Since the keywords for student works were encrypted using SHA-256 beforehand, a successful match will return relevant work information (work name, category, encrypted keywords, IPFS CID, semester, remarks, student ID, name, class). Step 8. If a teacher wants to search for student works from other teachers' classes, they need to apply for access permission from the administrator. Only after the administrator approves the application can the search be performed.
[0062] The specific steps of Step 8 are as follows: Step 8.1. If a teacher wants to view student work from other teachers' classes, they need to apply for access control permissions from the administrator. Once the administrator approves, the teacher can then view the work. The teacher can request access to student work from other teachers' classes by entering keywords and detailed application information. The teacher's request is completed through the `requireSetup()` function in the `contract shenqing` smart contract. The administrator's approval is determined by the `PassShenqing()` and `RejectShenqing()` functions in the `contract shenqing` smart contract.
[0063] Step 9. The administrator sends a request to the blockchain to query information about teachers, students, or courses, as well as students' grades and related works. The blockchain returns the query results. In addition, the administrator can delete the student works found in the search.
[0064] The specific steps of Step 9 are as follows: Step 9.1. The administrator can retrieve the student's information by entering the student's student ID or name. The query is implemented through the searchStuden() function in the contract student. Step 9.2. The administrator can enter the teacher's employee ID or name to retrieve the teacher's relevant information. The query is implemented through the searchteacher() function in the contract teacher. Step 9.3. The administrator can enter the course number to retrieve relevant course information. The query is achieved through the searchcourse() function in the contract course. Step 9.4. The administrator enters the student ID and course ID to retrieve the student's course grades. The query results will display three sections: the first is basic information, including the student's name, class, course ID, and course name; the second is the overall grade, including class participation grades and their rankings, midterm grades and their rankings, final grades and their rankings, and the overall grade and its ranking. The overall grade is calculated as follows: Figure 3 As shown, the third section displays details of student performance throughout the course, for all 18 weeks. The displayed fields include: <Course ID, Course Name, Week Number, Attendance, Online Self-Study, Class Discussion, Comprehensive Design Experiment, Homework, Weekly Performance>. The query and display of regular grades, midterm grades, final grades, and overall grades are completed through the searchPSScore(), searchQZScore(), searchQmScore(), and searchZHScore() functions in the score smart contract contract scores. Their ranking is completed through the Getpinshirank(), GetQiZhongrank(), GetQimorank(), and GetZongherank() functions in the contract scores, respectively.
[0065] The calculation of the average of the 18-week regular grades is completed by the PSScoreSetup() function in the score smart contract contract scores, the calculation of the comprehensive score based on the weight is completed by the ZHScoreSetup() function in the score smart contract contract scores, and the display of the details of the regular grades is completed by the getPingshiScoreDetails() function in the score smart contract contract scores. Step 9.5. The administrator enters the student's ID to search for student works. The blockchain returns the search results, which will display the work name, category, keywords, IPFS CID, semester, remarks, student ID, name, and class. The student work search is completed through the searchstudentWork() function in the contract work of the work's smart contract. Step 9.6. Administrators can also enter keywords to search for student works. A searchable encrypted search is used for security. Administrators enter plaintext keywords, and the system encrypts these keywords using SHA-256 hashing and matches them against the works stored in the blockchain. Since the keywords for student works were previously encrypted using SHA-256 when teachers stored them, a successful match will return relevant work information (work name, category, encrypted keywords, IPFS CID, semester, remarks, student ID, name, class). Step 9.7. When the administrator retrieves a student's work, they can delete the work by entering its IPFS CID. Deleting a student's work is done through the DelectstudentWork() function in the work's smart contract's contract work. Step 10. The administrator sends the CID to IPFS. IPFS returns the found encrypted work to the administrator, who then waits for the teacher to send the key through a secure channel. The administrator uses the key to decrypt the work.
[0066] The specific steps of Step 10 are as follows: Step 10.1. The administrator obtains the CID of the work from the found work information, and then sends the CID to IPFS. IPFS returns the matched encrypted file to the administrator. The administrator requests a decryption key from the teacher. The teacher sends the AES key to the administrator through a secure channel. The administrator uses the key to decrypt the work.
[0067] Step 11. Students send a request to the blockchain to query their grades and related works, and the blockchain returns the query results.
[0068] The specific steps of Step 11 are as follows: Step 11.1. Students can enter the course number to query their weekly class attendance information. The query results will display two sections. The first is the criteria for a perfect score in this week's class attendance, which displays the fields <course number, course name, week number, number of times attendance is perfect, number of times online self-study is perfect, number of times class discussion is perfect>. The second is the weekly class attendance score, which displays the fields <course number, course name, week number, number of times attendance is perfect, number of times online self-study is perfect, number of times class discussion is perfect, comprehensive design experiment score, homework score, and weekly class attendance score>. The query for this week's class attendance score is completed through the getLastcourse() and PingShiScore() functions in the score smart contract contract scores. Step 11.2. Students can enter the course number to query the class performance information for all weeks. The results will display the class performance details for 18 weeks, and the fields displayed are <course number, course name, week number, attendance count, online self-study count, class discussion count, comprehensive design experiment score, homework score, weekly class performance>. The class performance details are displayed through the getPingshiScoreDetails() function in the score smart contract contract scores. Step 11.3. Students can enter the course number to query their midterm grades. The displayed fields are <course number, course name, midterm grade>. Midterm grade queries are completed through the searchQZScore() function in the score smart contract contract scores. Step 11.4. Students can enter the course number to query their final grade information. The displayed fields include <Course Number, Course Name, Subjective Grade, Objective Grade, Final Grade>. The calculation rules for the final grade are as follows: Figure 3 As shown, the final exam grade query is completed through the searchQmScore() function in the score smart contract contract scores; Step 11.5. Students can enter the course number to query their overall grade information. The displayed fields include <Course Number, Course Name, Class Participation Grade, Midterm Grade, Final Grade, Overall Grade>. It will also display the ranking of class participation grade, midterm grade, final grade, and overall grade. The calculation rules for the overall grade are as follows: Figure 3 As shown, the overall score query is completed through the searchZHScore() function in the score smart contract contract scores, the overall score is calculated according to the weight through the ZHScoreSetup() function in the score smart contract contract scores, and the ranking of each score is completed through the Getpinshirank(), GetQiZhongrank(), GetQimorank() and GetZongherank() functions in the contract contract scores respectively; Step 11.6. Students enter their student ID to search for student works. The blockchain returns the search results, which will display the work name, category, encrypted keywords, IPFS CID, semester, remarks, student ID, name, and class. Student work search is completed through the searchstudentWork() function in the contract work of the work's smart contract. Step 11.7. Students can also enter keywords to search for student works. A searchable encryption method is used for secure searching. Students enter plaintext keywords, which are then encrypted using SHA-256 hashing and matched against works stored in the blockchain. Since the keywords for student works were previously encrypted using SHA-256 when teachers stored them, a successful match will return relevant work information (work name, category, encrypted keywords, IPFS CID, semester, remarks, student ID, name, class). Step 12. If students want to search for student works from other classes in the same grade or previous classes, they need to apply for access permissions from the administrator. Only after the administrator approves the application can they conduct the search.
[0069] The specific steps of Step 12 are as follows: Step 12.1. If a student wants to query the works of students in other classes of the same grade, they need to apply to the administrator for access control permissions. After the administrator agrees, the student can query the works. The student can apply to the administrator to access the works of students in other classes of the same grade by entering the keywords of the works and the detailed application content. The student's application is completed through the requireSetup() function in the contract shenqing. Whether the administrator agrees to the application is completed through the PassShenqing() and RejectShenqing() functions in the contract shenqing. Step 12.2. If a student wants to view past student works, they need to apply to the administrator for access control permissions. After the administrator agrees, the student can view the works. The student can apply to the administrator for access to past student works by entering the keywords of the works and the detailed application content. The student's application is completed through the requireSetup() function in the contract shenqing. Whether the administrator agrees to the application is completed through the PassShenqing() and RejectShenqing() functions in the contract shenqing. Step 13. Students send their CID to IPFS, which then returns the encrypted work to the students. The teachers then send the key through a secure channel, and the students use the key to decrypt the work.
[0070] The specific steps of Step 13 are as follows: Step 13.1. Students obtain the CID of a work from the found work information, and then send the CID to IPFS. IPFS returns the matched encrypted file to the student. The student requests a decryption key from the teacher. The teacher sends the AES key to the student through a secure channel. The student uses the key to decrypt the work.
[0071] Appendix: Experimental Comparison Results Table 1. Indexing algorithm time cost (ms) for different numbers of keywords.
[0072] Table 2. Indexing algorithm time cost (ms) for different numbers of files.
[0073] Table 3. Time cost (ms) of the trapdoor algorithm under different query term counts.
[0074] Table 4. Time cost (ms) of the search algorithm for this method under different numbers of files.
[0075] As the number of keywords increases, the index generation time increases linearly, as shown in Table 1. Similarly, as the number of files increases, the index generation time also increases linearly, as shown in Table 2. As can be seen from the figures, the indexing time of the proposed solution is in the millisecond range, with very low overhead.
[0076] Similar to the index generation stage, the trapdoor generation time increases linearly with the increase of query terms, but it remains in the millisecond range with low overhead, as shown in Table 3.
[0077] As shown in Table 4, the number of files is a key factor affecting search time; the search time increases accordingly with the increase in the number of files. In this method, even when processing 1000 files, the search time is only 0.03ms, indicating that the search time of this method is efficient and has high practical usability.
[0078] Figure 4 The graph shows the administrator's gas consumption during various transaction operations. These operations include adding / modifying / deleting student, teacher, and course information; deleting student work; and processing teacher and instructor requests. Request 1 is a student requesting to view the work of previous students; Request 2 is a student requesting to view the work of students in other classes within the same grade; and Request 3 is a teacher requesting to view the work of students from other teachers. As can be seen from the graph, none of the administrator's transactions exceeded the gas limit, and all transactions were successfully completed.
[0079] Figure 5 The graph shows the gas consumption of teachers during various transactions, including logging into the system, adding / modifying the full score criteria for weekly class participation grades, weekly class participation grades, midterm grades, final grades, overall grades, the average of class participation grades for all weeks of the semester, and requesting access to student work from other teachers. As can be seen from the graph, none of the teacher's transactions exceeded the gas limit, and all transactions were successfully completed.
[0080] Figure 6 This display shows the gas consumption of students during various transactions. These transactions involve logging into the system and requesting access control. Access request 1 is for viewing the work of previous students, and access request 2 is for viewing the work of students in other classes within the same grade. As can be seen from the graph, none of the student's transactions exceeded the gas limit, and all transactions were successfully completed.
[0081] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely illustrative of the principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention.
Claims
1. A teaching management method based on blockchain and searchable encryption, characterized in that, Includes the following steps: S1: Construct an on-chain and off-chain collaborative storage model. The Ethereum blockchain stores user role information, course information, student grade information and work information. The InterPlanetary File System (IPFS) is used to store encrypted student work data. The hash value CID returned by IPFS is stored on the blockchain as part of the on-chain metadata. The CID is recorded on the blockchain as an index. S2: Design a searchable encryption scheme. Use the AES algorithm to symmetrically encrypt student work data. Use the SHA-256 algorithm to generate fixed-length hash values for work keywords and store these hash values as ciphertext indexes in the blockchain. By initiating a keyword search request, perform the same SHA-256 hash operation on the input plaintext keywords to generate query ciphertext. Match the stored keyword hash values in the blockchain. If a match is successful, return the corresponding work's metadata and CID. After obtaining the AES decryption key from the teacher through a secure channel, download and decrypt the original work data. S3: Design smart contracts to record performance data; design and deploy multiple types of smart contracts on the blockchain, including: An administrator contract, used to set up and manage user accounts; A teacher contract has been established, which is used to store and update teacher information; A student contract, which is used to store and update student information; A course contract, which is used to store and update course information; The grade contract is used to calculate and record weekly grades, midterm grades, final grades, and comprehensive grades calculated according to preset weights, and to calculate and record class rankings for each grade dimension. S4: Design a smart contract to implement role access control. Design and deploy a work contract and a role access control contract on the blockchain. The work contract mainly stores and updates relevant information of the work on the blockchain. The role access control contract is used to handle work access applications across classes or years. The access control logic integrated between the work contract and the role access control contract is as follows: students can access their own and their classmates' works by default. Access to data across classes or grades requires an application to the administrator and temporary authorization after the application is approved. Teachers can access the works of their own classmates by default. Access to data across classes requires an application to the administrator and temporary authorization after the application is approved. All work upload, deletion and access application operations are executed through smart contracts and stored on the blockchain.
2. The teaching management method based on blockchain and searchable encryption according to claim 1, characterized in that, In the S1 step on-chain and off-chain collaborative storage architecture, the smart contract stores the role identity information of blockchain storage administrators, teachers and students, course information, work information and students’ full-cycle academic information, which includes: daily grades, mid-term grades, final grades and comprehensive grades. The IPFS storage uses AES-encrypted ciphertext files to obtain a unique CID hash value, which is then stored on the blockchain as the work's metadata.
3. The teaching management method based on blockchain and searchable encryption according to claim 1, characterized in that, The specific implementation of designing a searchable encryption scheme in step S2 includes: The AES algorithm is used to generate a symmetric key, which is used to encrypt and store student works in IPFS. The AES encryption key is kept locally by the teacher and distributed as needed through a secure channel. The SHA-256 one-way hash function is applied to the keywords of the works to generate ciphertext, and the keyword ciphertext is stored in the blockchain as the work index, forming a one-to-one mapping with the other work metadata. Input plaintext keywords and apply the same SHA-256 hash to generate query ciphertext. Match it with the ciphertext stored in the blockchain and return the metadata of the matching works, enabling secure searching and sharing of encrypted works.
4. The teaching management method based on blockchain and searchable encryption according to claim 1, characterized in that, The specific implementation of recording and processing teaching information by deploying smart contracts includes: The grade calculation logic is defined in the score smart contract, including the weighted calculation of weekly daily grades based on attendance, class discussion, online learning, comprehensive design experiments and homework, the recording of midterm grades, the weighted calculation of final grades (subjective and objective grades), and the weighted calculation of comprehensive grades (the proportion of daily grades, midterm grades, and final grades). The system also automatically calculates the ranking of each dimension of grades (daily grades, midterm grades, final grades and comprehensive grades) based on the entered grades. The grade contract allows universities to customize grade weighting and calculation methods according to policies, dynamically adjust the proportion of daily grades, midterm grades, and final grades in the overall grade, and supports dynamic adjustment of contract parameters, reflecting the flexibility and scalability of the method.
5. The teaching management method based on blockchain and searchable encryption according to claim 1, characterized in that, The steps for implementing role-based authorization access and decryption include: The smart contract pre-defines the permission boundaries for three roles: administrator, teacher, and student. By default, unauthorized data access across classes and courses is prohibited. The requesting user initiates an access request through the smart contract, which includes the target data range and the reason. The administrator, as the approver, approves or rejects the request by calling the authorization function in the smart contract. Based on the approval result, the smart contract temporarily grants the requesting user access rights for a specific time or number of times, thereby achieving refined and traceable security control over data sharing.
6. A blockchain-based and searchable encrypted teaching management system, employing a blockchain-based and searchable encrypted teaching management method as described in any one of claims 1-5, characterized in that, include: Smart contract module: Deploys and executes the smart contract as described in any one of claims 1-5 on the blockchain; Ethereum blockchain: used to store index information and associated fields of users, courses, and student works, record grades and rankings, provide role access control and approval, keyword hash matching and query, and support the updating and deletion of user and work data; InterPlanetary File System (IPFS): Used to store encrypted student work using the AES algorithm, and to locate and retrieve it based on the hash value CID; Encryption and retrieval module: Used to encrypt and decrypt student works using AES, and to perform SHA-256 hash calculations on keywords to achieve on-chain matching and retrieval; Client module: Allows administrators, teachers and students to initiate operations such as information entry, query, approval, update or deletion on the blockchain according to their respective roles, and retrieve encrypted works from IPFS after obtaining CID.
7. A teaching management system based on blockchain and searchable encryption according to claim 6, characterized in that, The Ethereum blockchain and IPFS are used for on-chain and off-chain collaborative storage. Symmetric encryption and keyword hash encryption are performed on student work data. The encrypted files are uploaded to IPFS, and the work index containing CID and encrypted keywords is written to the blockchain through the smart contract.
8. A teaching management system based on blockchain and searchable encryption according to claim 6, characterized in that, When executing a query, the encryption and retrieval module submits the SHA-256 hash of the keyword to the blockchain for matching. Plaintext keywords and plaintext AES keys are not stored on the chain.
9. A teaching management system based on blockchain and searchable encryption according to claim 6, characterized in that, The smart contract module supports user access permission management and the management of cross-permission access requests.
10. A teaching management system based on blockchain and searchable encryption according to claim 9, characterized in that, Access to user works by administrators, teachers, and students requires administrator authorization.