A data information security protection method and system
Through intelligent examination equipment, the user data in the online examination system is collected and encrypted, and the master-slave blockchain is used for secure storage, which solves the problem of insufficient security of user data and test score data in the online examination system, and realizes the data Isolation and efficient access.
Patent Information
- Application Number
- CN202410940880.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-15
- Publication Date
- 2025-02-18
- Estimated Expiration
- 2044-07-15
AI Technical Summary
The security of user data and test score data in the online examination system is insufficient, and it is easily tampered with or leaked by hackers, resulting in the ineffectiveness of test scores.
Data is collected and standardized through intelligent examination equipment, and user data is encrypted using ring signature encryption algorithm and elliptic curve encryption algorithm, which are stored in the master-slave blockchain respectively to achieve isolation and secure storage of user data.
It realizes the isolation of user registration data, user role permission data and user test score data, ensures the security and privacy of data, and improves the efficiency of data access.
Smart Images

Figure CN118709235B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data information security protection, and in particular to a method and system for protecting examination information based on a master-slave blockchain. Background Art
[0002] The online examination system is a popular examination method at present, which will greatly change people's lives in the future. The accuracy and reliability of the security technology of online examination data are directly related to the fairness of the examination. If there is a lack of protection for online examination data, hackers can remotely attack or change the information of online users through the network, and tamper with the user's examination results, making the examination results invalid. Therefore, in online examinations, the protection of online examination user data and examination result data is indispensable.
[0003] The platform based on blockchain technology has the characteristics of traditional Internet of Things information interconnection, and also combines the advantages of blockchain's immutability, traceability, and distribution, which can effectively avoid the risk of tampering during the data transmission process of smart terminal devices. Summary of the invention
[0004] The embodiment of the present invention provides a data information security protection method, the method comprising: step S1, collecting data in the examination system through intelligent examination equipment and performing standardization processing to obtain standardized user data; step S2, classifying the user data, extracting keywords from the user data through a preset keyword extraction algorithm, and comparing with preset keywords, and classifying the user data based on the comparison result, and dividing the user data into user registration data, user role authority data and user examination score data; step S3, encrypting the user registration data and the user role authority data using a ring signature encryption algorithm, and encrypting the user examination score data using an elliptic curve encryption algorithm. Encryption; Step S4, sending the encrypted user data to the master-slave blockchain for storage respectively, wherein the master-slave blockchain includes a main chain and multiple slave chains, the main chain is used to store the user registration data and the user role authority data, the slave chain is used to store the user test score data, and the master-slave blockchain stores the correspondence between the user role authority data and the database in the master-slave blockchain; Step S5, when the user accesses the test score data, the user registration data and the user role authority data are authenticated respectively, after the authentication is passed and the user role authority data is identified, the database authority in the master-slave blockchain corresponding to the role authority data is opened to the user.
[0005] Preferably, the step S1 comprises:
[0006] The registration data and user role authority information input by the user during the examination are collected based on the intelligent examination device; after the examination, the intelligent examination device sends the user's examination answers to the server for the examiner on the server to complete the examination, and returns the examination result data to the intelligent examination device for storage; the user registration data, the user's role authority data and the examination result data stored in the intelligent examination device are standardized to obtain standardized user data.
[0007] Preferably, the preset keyword extraction algorithm is any one of TF-IDF algorithm, TEXtRank algorithm, and Word2VEC.
[0008] Preferably, step S4 comprises:
[0009] When storing data, the user registration data and the user role authority data are stored in the main blockchain; the slave blockchain and key pair corresponding to the role authority data are determined according to the user role authority data, and based on the key pair, the user test score data is stored in the corresponding slave blockchain.
[0010] Preferably, the step S5 comprises:
[0011] Obtain the digital signature of the user accessing the test score data, and decrypt the digital signature with the user's public key to obtain the first summary information; decrypt the ciphertext corresponding to the test score data acquisition request with the user's private key to obtain the original text; perform a hash operation on the original text to obtain the second summary information; determine whether the first summary information is consistent with the second summary information; if the first summary information is consistent with the second summary information, the authentication is passed, otherwise, the authentication is failed;
[0012] If the authentication is successful, the user role authority corresponding to the request is found according to the data, the slave blockchain and private key corresponding to the user role authority are determined, and the slave blockchain is decrypted according to the private key to obtain the corresponding test score data.
[0013] An embodiment of the present invention provides a data information security protection system, the system comprising:
[0014] A data collection and standardization module collects data from the test system through intelligent test equipment and performs standardization processing to obtain standardized user data;
[0015] A data classification module classifies the user data, extracts keywords from the data using a preset keyword extraction algorithm, and compares the data with preset keywords. Based on the comparison result, the data is classified into user registration data, user role authority data, and user test score data;
[0016] A data encryption module, which uses a ring signature encryption algorithm to encrypt the user role data and the user role authority data, and uses an elliptic curve encryption algorithm to encrypt the user test score data;
[0017] A data storage module, which sends the encrypted data to a master-slave blockchain for storage respectively, wherein the master-slave blockchain includes a master chain and multiple slave chains, the master chain is used to store the user registration data and the user role authority data, the slave chain is used to store the user test score data, and the master-slave blockchain stores the corresponding relationship between the user role authority data and the database in the master-slave blockchain;
[0018] The data search module authenticates the user registration data and the user role authority data respectively when the user accesses the test score data. After the authentication is passed and the user role authority data is identified, the database authority in the master-slave blockchain corresponding to the role authority data is opened to the user.
[0019] Preferably, the data collection and standardization module includes:
[0020] Collecting the registration data input by the user during the examination and the user's role authority data based on the intelligent examination device;
[0021] After the test is over, the intelligent test device sends the user's test answers to the server for the examiner on the server to complete the examination, and returns the test score data to the intelligent test device for storage;
[0022] The user registration data, the user role authority data and the test score data stored in the intelligent test device are standardized to obtain standardized user data.
[0023] Preferably, the data storage module comprises:
[0024] When storing data, the user registration data and the user role authority data are stored in the main blockchain; the slave blockchain and key pair corresponding to the role authority are determined according to the user role authority, and based on the key pair, the user test score data is stored in the database of the corresponding slave blockchain.
[0025] Preferably, the data search module includes:
[0026] Obtain the digital signature of the user accessing the test score data, and decrypt the digital signature with the user's public key to obtain the first summary information; decrypt the ciphertext corresponding to the test score data acquisition request with the user's private key to obtain the original text; perform a hash operation on the original text to obtain the second summary information; determine whether the first summary information is consistent with the second summary information; if the first summary information is consistent with the second summary information, the authentication is passed, otherwise, the authentication is failed;
[0027] If the authentication is successful, the slave blockchain and private key corresponding to the user role authority are determined according to the user role authority corresponding to the user's request to access the test score data, and the database in the master-slave blockchain corresponding to the user role authority data is decrypted based on the private key to obtain the corresponding test score data.
[0028] According to yet another embodiment of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the steps of any one of the above method embodiments when run.
[0029] The present invention collects data in the examination system through intelligent examination equipment and performs standardized processing to obtain standardized user data; classifies the user data, extracts keywords from the data through a preset keyword extraction algorithm, and compares the data with preset keywords. Based on the comparison result, the data is classified into user registration data, user role authority data and user examination score data; the user role data and the user role authority data are encrypted by a ring signature encryption algorithm, and the user examination score data is encrypted by an elliptic curve encryption algorithm; the encrypted data is sent to a master-slave blockchain for storage respectively, wherein the master-slave blockchain includes a main chain and multiple slave chains, the main chain is used to store the user registration data and the user role authority data, the slave chain is used to store the user examination score data, and the master-slave blockchain stores the corresponding relationship between the user role authority data and the database in the master-slave blockchain; when the user accesses the examination score data, the user's registration data and the user role authority data are authenticated respectively, and after the authentication is passed and the user's role authority is identified, the database authority in the master-slave blockchain corresponding to the role authority data is opened to the user.
[0030] The beneficial effects of the present invention are as follows: the classified user registration data, user role authority data and user test score data are stored separately in the form of master and slave blockchains, thereby realizing the isolation of user registration data, user role authority data and user test score data, and realizing the isolation of user privacy data and shared data. In addition, by associating the user's role authority with the blockchain database, it avoids aimlessly accessing multiple databases, and only needs to access the slave blockchain corresponding to the role authority, thereby improving the efficiency of data access while ensuring data security.
[0031] Other features and advantages of the embodiments of the present application will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the following specific implementations, they are used to explain the embodiments of the present application, but do not constitute a limitation on the embodiments of the present application. In the accompanying drawings:
[0033] Figure 1 It is a hardware structure diagram of a data information security protection electronic device according to an embodiment of the present invention;
[0034] Figure 2 A flowchart schematically shows a data information security protection method according to a specific embodiment of the present invention;
[0035] Figure 3 A schematic diagram of a classification flow chart of normalized user data is shown;
[0036] Figure 4 A schematic diagram of a blockchain of a master-slave blockchain is schematically shown; DETAILED DESCRIPTION
[0037] In order to make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the specific implementation methods described herein are only used to illustrate and explain the embodiments of the present application, and are not used to limit the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0038] It should be noted that if the embodiments of the present application involve directional indications (such as up, down, left, right, front, back...), such directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0039] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present application, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0040] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 FIG. 1 is a hardware structure block diagram of a mobile terminal of a data information security protection method according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown in the figure) a processor 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input / output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.
[0041] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as a computer program corresponding to a data information security protection method in an embodiment of the present invention. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the mobile terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0042] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the mobile terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0043] A flowchart of a data information security protection method according to an embodiment of the present application is shown in FIG. Figure 2 As shown, the embodiment of the present application provides a data information security protection method, which includes the following steps:
[0044] Step S1, collecting data in the examination system through intelligent examination equipment and performing standardization processing to obtain standardized user data;
[0045] In the embodiments of the present application, the investment in education is showing an increasing trend. With the development of the Internet of Things, the online examination system has been rapidly expanding. The corresponding examination data security is facing increasingly severe tests. Examination institutions generate a large amount of user registration and score data every day. The supervision of these data is difficult and lacks the necessary technical support. They are easy to be tampered with and leaked. The data of each unit and department are stored in their own databases. Due to the different data formats, data islands are formed and it is difficult to achieve data sharing. When user information is leaked on the Internet, it is difficult to trace the hacker information, resulting in difficulties in claims.
[0046] Considering that user data is not entirely generated by a unified online examination in an independent venue, there are also various smart examination devices that collect user data. Specifically, smart examination devices include: mobile phones, computers, platforms and other smart devices that can connect to the Internet. The forms of data collected by different smart devices are also diverse. In order to facilitate unified management in the later stage, the collected data is processed in a standardized format to finally obtain standardized user data.
[0047] Step S2: classify the user data, extract keywords from the data using a preset keyword extraction algorithm, and compare the data with preset keywords. Based on the comparison result, classify the data into user registration data, user role authority data, and user test score data;
[0048] In the embodiment of the present application, in order to realize the classification of different users for different storage, it is necessary to classify the standardized user data. The classification algorithm keyword extraction adopted is the main task, which can identify and extract the key fields that can express the core of the text from the text. Commonly used keyword extraction algorithms include: TF-IDF algorithm, TEXtRank algorithm, Word2VEC algorithm;
[0049] TF-IDF algorithm: TF (term frequency): counts the frequency of a word appearing in user data. The more times a word appears in user data, the stronger its ability to express user data. IDF (inverse document frequency): counts the number of user data in a document set in which a word appears. The fewer documents a word appears in, the stronger its ability to distinguish user data. TF-IDF value: multiply TF and IDF to get the TF-IDF value of a word, which is used to measure the importance of a word to user data. Keyword extraction: sort by TF-IDF value from large to small, and take the first n as keywords.
[0050] TextRank algorithm,The basic idea of the TextRank algorithm: a graph-based sorting algorithm that regards user data as a network of words and uses the co-occurrence information (semantics) between words to extract keywords.
[0051] Specifically, the TextRank algorithm includes the following processes: 1. Construct a word graph: take the words in the document as nodes, and if two words co-occur in a certain window, establish a connection; 2. Calculate the weight of the words: use an iterative algorithm similar to PageRank to calculate the weight of each word; 3. Extract keywords: sort the words according to their weights and select the first n words as keywords.
[0052] The process of the Word2VEC algorithm includes:
[0053] Obtain user data to be processed, and classify the fields of the user data to be processed to obtain candidate keywords of the user data to be processed; search for word vectors corresponding to the candidate keywords in a word vector model, wherein the word vector model includes word vectors of the candidate keywords; construct a word similarity matrix of the candidate keywords based on the word vectors; sort the candidate keywords according to the word similarity matrix of the candidate keywords, and extract keywords of the text to be processed.
[0054] Optionally, constructing a word similarity matrix of the candidate keywords according to the word vectors includes:
[0055] According to the formula:
[0056]
[0057] Calculate the cosine value of the angle between the word vectors corresponding to the candidate keywords, where θ represents the angle between the vectors of the candidate keywords. Represents the eigenvalue of the vector corresponding to one of the candidate keywords in the n-dimensional space, Represents the eigenvalue of the vector corresponding to another candidate keyword in the n-dimensional space, where n represents the dimension of the vector space; constructs the candidate keyword similarity matrix according to the cosine value of the angle between the word vectors.
[0058] Optionally, the sorting of the candidate keywords according to the word similarity matrix of the candidate keywords includes: calculating the word similarity matrix of the candidate keywords according to the PageRank algorithm to obtain the corresponding PageRank values of the candidate keywords; sorting the candidate keywords according to the PageRank values to obtain the importance of the candidate keywords; and extracting keywords of the user data to be processed according to the importance.
[0059] These algorithms have their own characteristics and are suitable for different application scenarios and file data types. In practical applications, you can select a suitable algorithm or combine multiple algorithms to extract keywords according to specific needs and text data characteristics, and there is no specific limitation here.
[0060] After obtaining the keywords of the user data to be processed, compare them with the preset classified keywords. If they match the preset user registration data keywords, the data will be classified into the user registration data category. If they match the preset user role authority keywords, the data will be classified as user role authority data; if they match the preset user test score keywords, the data will be classified as the user test score data category. For example, when the extracted keywords include keywords such as "subjects", they match the preset user test score keywords "subjects", and they will be classified as the user test score data category. Specifically, the classification process can refer to Figure 3 .
[0061] Step S3: encrypt the user role data and the user role authority data using a ring signature encryption algorithm, and encrypt the user test score data using an elliptic curve encryption algorithm;
[0062] In the embodiments of the present application, different types of data use different encryption algorithms in combination with data features. Ring signature is an emerging digital signature scheme. Compared with conventional digital signatures, it has high security and can conceal the identity of the signer. Therefore, it is widely used in blockchain scenarios that require anonymization. The basic principle is that when the signer performs a digital signature, he can use the public key of the user on the ring and his own private key to calculate the signature at will without seeking the consent of other ring members. After receiving the signature from the ring, the verifier cannot determine which signer in the ring the signature comes from. Therefore, only the private key holder, that is, the signer, has the right to view the signature, and other members of the ring cannot view it, ensuring the security of data transmission. Here, the ring signature encryption algorithm is used for user role data and the user role permission data to protect the user's privacy well.
[0063] Elliptic Curve Cryptography Cryptographty (ECC) is a commonly used asymmetric cryptographic algorithm in blockchain. Compared with conventional asymmetric algorithms, ECC has a shorter key length and higher security. This feature also determines that it is suitable for situations where the amount of encrypted data is large. Its basic principle is: define an ellipse curve equation on a plane coordinate system, define a base point P, and generate the final point G after k points are made, where k is the ECC password private key and G is the ECC password public key. The base point is used to calculate the public key G, G=k*P, so it is easy to calculate the public key G. However, it is difficult to calculate the password private key k under the premise of knowing P and G, because division is relatively complicated for computers, which is very good for the security of user test scores.
[0064] Step S4: sending the encrypted user data to the master-slave blockchain for storage respectively, wherein the master-slave blockchain includes a master chain and multiple slave chains, the master chain is used to store the user registration data and the user role authority data, the slave chain is used to store the user test score data, and the master-slave blockchain stores the corresponding relationship between the user role authority data and the database in the master-slave blockchain.
[0065] In the embodiment of the present application, it is considered that the user's test score data is not entirely generated by the test system, and as time goes by, the amount of user test score data also grows exponentially. The traditional single-chain blockchain structure can no longer meet the requirements of diversified source management and high data throughput of user test score data, so the multi-chain blockchain technology is used in this application to solve the above problems. The multi-chain blockchain adopts a structure of a main chain and multiple slave chains, and the specific structure is shown in Figure 4. The main chain is responsible for storing the user's identity information, including user registration information and user role authority information, and its node blocks increase in chronological order; the slave chain is used to store shared data information, including: user test score data, specifically, the user's test score includes: the type of test, the subject of the test, and the score of the test corresponding to the test subject, the date of the test, etc. This ensures the effective isolation of user identity information and shared data. Since the scenarios of the main chain and the slave chain are not completely consistent, the number of nodes in the blockchains of the two is also inconsistent.
[0066] In the master-slave multi-blockchain, users have absolute ownership and control over their own test score information, and can view and download their own test score information through private keys; while the examiner or other examiner institutions and intelligent test equipment companies can upload the user's identity information and corresponding test scores to the blockchain. In this paper, the data layer, network layer, management layer and application layer are used to build a multi-chain blockchain system. The data layer is the bottom layer of the entire system and is used to store the transaction data of the node block. The first block in the entire link is automatically created by the system, and the remaining node blocks can be added to the main chain after verification. The network layer is used to realize the communication of each node block in the multi-chain blockchain system, and the block information is transmitted through the network layer. After the verification is completed, it can become a new node block. The operation of the master-slave blockchain system is supervised by the management layer, which mainly includes various algorithms to ensure the verification behavior between the master and slave chains. The application layer is the macro embodiment of each application, mainly including the storage and release, retrieval, and access of user test scores.
[0067] The user information is parsed to obtain the parsed user role authority data and the user test score data corresponding to the user role authority data, and the parsed user test score data is stored in the database corresponding to the blockchain node according to the correspondence between the data type and the user role authority. By parsing the business data, the correspondence between the user role authority data and the user test score can be stored in the database corresponding to the blockchain node according to the correspondence between the user role authority data and the user test score so that it can be searched quickly and efficiently in the future.
[0068] Step S5: When the user accesses the test score data, the user registration data and the user role authority data are authenticated respectively. After the authentication is passed and the user role authority data is identified, the database authority in the master-slave blockchain corresponding to the role authority data is opened to the user.
[0069] In the embodiment of the present application, when the user searches for test score data, a request from the user to search for test score data is received; first, verification and authentication is performed based on the user's request to access the test score through a private key, and after the verification and authentication is passed, the data type corresponding to the data to be searched is determined; and data matching the data type is obtained from a database corresponding to the data type. In this way, when the user searches for data, a quick search can be achieved based on this corresponding relationship in the database, which increases the flexibility of data query in the blockchain and effectively improves the efficiency of data query.
[0070] A data information security protection system according to an embodiment of the present application includes: a data collection and standardization module, a data classification module, a data encryption module, a data storage module and a data search module.
[0071] Specifically, the data collection and standardization module collects data in the test system through intelligent test equipment and performs standardization processing to obtain standardized user data;
[0072] In the embodiments of the present application, the investment in education is showing an increasing trend. With the development of the Internet of Things, the online examination system has been rapidly expanding. The corresponding examination data security is facing increasingly severe tests. Examination institutions generate a large amount of user registration and score data every day. The supervision of these data is difficult and lacks the necessary technical support. They are easy to be tampered with and leaked. The data of each unit and department are stored in their own databases. Due to the different data formats, data islands are formed and it is difficult to achieve data sharing. When user information is leaked on the Internet, it is difficult to trace the hacker information, resulting in difficulties in claims.
[0073] Taking into account that user data is not entirely generated by a unified online examination system as an independent place, there are also various smart examination devices that collect user data. Specifically, smart examination devices include: mobile phones, computers, platforms and other smart devices that can connect to the Internet. The forms of data collected by different smart devices are also diverse. In order to facilitate unified management in the later stage, the collected data is processed in a standardized format to finally obtain standardized user data.
[0074] A data classification module classifies the user data, extracts keywords from the data using a preset keyword extraction algorithm, and compares the data with preset keywords. Based on the comparison result, the data is classified into user registration data, user role authority data, and user test score data;
[0075] In the embodiment of the present application, in order to realize the classification of different users for different storage, it is necessary to classify the standardized user data. The classification algorithm keyword extraction adopted is the main task, which can identify and extract the key fields that can express the core of the text from the text. Commonly used keyword extraction algorithms include: TF-IDF algorithm, TEXtRank algorithm, Word2VEC algorithm;
[0076] TF-IDF algorithm: TF (term frequency): counts the frequency of a word appearing in user data. The more times a word appears in user data, the stronger its ability to express user data. IDF (inverse document frequency): counts the number of user data in a document set in which a word appears. The fewer documents a word appears in, the stronger its ability to distinguish user data. TF-IDF value: multiply TF and IDF to get the TF-IDF value of a word, which is used to measure the importance of a word to user data. Keyword extraction: sort by TF-IDF value from large to small, and take the first n as keywords.
[0077] TextRank algorithm,The basic idea of the TextRank algorithm: a graph-based sorting algorithm that regards user data as a network of words and uses the co-occurrence information (semantics) between words to extract keywords.
[0078] Specifically, the TextRank algorithm includes the following processes: 1. Construct a word graph: take the words in the document as nodes, and establish a connection if two words co-occur within a certain window; 2. Calculate the weight of the word: use an iterative algorithm similar to PageRank to calculate the weight of each word; 3. Extract keywords: sort the words according to their weights and select the first n words as keywords. The process of the Word2VEC algorithm includes:
[0079] Obtain user data to be processed, and classify the fields of the user data to be processed to obtain candidate keywords of the user data to be processed; search for word vectors corresponding to the candidate keywords in a word vector model, wherein the word vector model includes word vectors of the candidate keywords; construct a word similarity matrix of the candidate keywords based on the word vectors; sort the candidate keywords according to the word similarity matrix of the candidate keywords, and extract keywords of the text to be processed.
[0080] Optionally, constructing a word similarity matrix of the candidate keywords according to the word vectors includes:
[0081] According to the formula:
[0082]
[0083] Calculate the cosine value of the angle between the word vectors corresponding to the candidate keywords, where θ represents the angle between the vectors of the candidate keywords. Represents the eigenvalue of the vector corresponding to one of the candidate keywords in the n-dimensional space, Represents the eigenvalue of the vector corresponding to another candidate keyword in the n-dimensional space, where n represents the dimension of the vector space; constructs the candidate keyword similarity matrix according to the cosine value of the angle between the word vectors.
[0084] Optionally, the sorting of the candidate keywords according to the word similarity matrix of the candidate keywords includes: calculating the word similarity matrix of the candidate keywords according to the PageRank algorithm to obtain the corresponding PageRank values of the candidate keywords; sorting the candidate keywords according to the PageRank values to obtain the importance of the candidate keywords; and extracting keywords of the user data to be processed according to the importance.
[0085] These algorithms have their own characteristics and are suitable for different application scenarios and file data types. In practical applications, you can select a suitable algorithm or combine multiple algorithms to extract keywords according to specific needs and text data characteristics, and there is no specific limitation here.
[0086] After obtaining the keywords of the user data to be processed, compare them with the preset classified keywords. If they match the preset user registration data keywords, the data will be classified into the user registration data category. If they match the preset user role authority keywords, the data will be classified as user role authority data; if they match the preset user test score keywords, the data will be classified as the user test score data category. For example, when the extracted keywords include keywords such as "subjects", they match the preset user test score keywords "subjects", and they will be classified as the user test score data category. Specifically, the classification process can refer to Figure 3 .
[0087] A data encryption module, which uses a ring signature encryption algorithm to encrypt the user role data and the user role authority data, and uses an elliptic curve encryption algorithm to encrypt the user test score data;
[0088] In the embodiments of the present application, different types of data use different encryption algorithms in combination with data features. Ring signature is an emerging digital signature scheme. Compared with conventional digital signatures, it has high security and can conceal the identity of the signer. Therefore, it is widely used in blockchain scenarios that require anonymization. The basic principle is that when the signer performs a digital signature, he can use the public key of the user on the ring and his own private key to calculate the signature at will without seeking the consent of other ring members. After receiving the signature from the ring, the verifier cannot determine which signer in the ring the signature comes from. Therefore, only the private key holder, that is, the signer, has the right to view the signature, and other members of the ring cannot view it, ensuring the security of data transmission. Here, the ring signature encryption algorithm is used for user role data and the user role permission data to protect the user's privacy well.
[0089] Elliptic Curve Cryptography Cryptographty (ECC) is a commonly used asymmetric cryptographic algorithm in blockchain. Compared with conventional asymmetric algorithms, ECC has a shorter key length and higher security. This feature also determines that it is suitable for situations where the amount of encrypted data is large. Its basic principle is: define an ellipse curve equation on a plane coordinate system, define a base point P, and generate the final point G after k points, where k is the ECC password private key and G is the ECC password public key. The base point is used to calculate the public key G, G=k*P, so it is easy to calculate the public key G. However, it is difficult to calculate the password private key k under the premise of knowing P and G, because division is more complicated for computers. This is very good for the security of user test scores.
[0090] A data storage module, which sends the encrypted data to a master-slave blockchain for storage respectively, wherein the master-slave blockchain includes a master chain and multiple slave chains, the master chain is used to store the user registration data and the user role authority data, and the slave chain is used to store the user test score data;
[0091] In the embodiment of the present application, it is considered that the user's test score data is not entirely generated by the test system, and as time goes by, the amount of user test score data also grows exponentially. The traditional single-chain blockchain structure can no longer meet the requirements of diversified source management and high data throughput of user test score data, so the multi-chain blockchain technology is used in this application to solve the above problems. The multi-chain blockchain adopts a structure of a main chain and multiple slave chains, and the specific structure is shown in Figure 4. The main chain is responsible for storing the user's identity information, including user registration information and user role authority information, and its node blocks increase in chronological order; the slave chain is used to store shared data information, including: user test score data, specifically, the user's test score includes: the type of test, the subject of the test, and the score of the test corresponding to the test subject, the date of the test, etc. This ensures the effective isolation of user identity information and shared data. Since the scenarios of the main chain and the slave chain are not completely consistent, the number of nodes in the blockchains of the two is also inconsistent.
[0092] In the master-slave multi-blockchain, users have absolute ownership and control over their own test score information, and can view and download their own test score information through private keys; while the examiner or other examiner institutions and intelligent test companies can upload the user's identity information and corresponding test scores to the blockchain. This paper uses the data layer, network layer, management layer and application layer to build a multi-chain blockchain system. The data layer is the bottom layer of the entire system and is used to store the transaction data of the node block. The first block in the entire link is automatically created by the system, and the remaining node blocks can be added to the main chain after verification. The network layer is used to realize the communication of each node block in the multi-chain blockchain system. The block information is transmitted through the network layer, and it can become a new node block after verification. The operation of the master-slave blockchain system is supervised by the management layer, which mainly includes various algorithms to ensure the verification behavior between the master and slave chains. The application layer is the macro embodiment of each application, mainly including the storage and release, retrieval, and access of user test scores.
[0093] The data search module authenticates the user's registration data and user role authority data respectively when the user accesses the test score data. After the authentication is passed and the user's role authority is identified, the data authority corresponding to the user's role authority is opened to the user.
[0094] In the embodiment of the present application, when the user searches for test score data, a request from the user to search for test score data is received; first, verification and authentication is performed based on the user's request to access the test score through a private key, and after the verification and authentication is passed, the data type corresponding to the data to be searched is determined; and data matching the data type is obtained from a database corresponding to the data type. In this way, when the user searches for data, a quick search can be achieved based on this corresponding relationship in the database, which increases the flexibility of data query in the blockchain and effectively improves the efficiency of data query.
[0095] In this embodiment, the data collection and standardization module includes:
[0096] The intelligent examination device collects the registration data input by the user during the examination, the registered user and the role authority information of the user;
[0097] After the test is over, the smart test device sends the user's test answers to the server for the examiner to complete the marking, and returns the test score data to the smart test device for storage;
[0098] The registered users, the role authority information of the users and the test score data stored in the intelligent test device are standardized to obtain standardized user data.
[0099] An embodiment of the present application also provides a machine-readable storage medium, on which instructions are stored, and the instructions are used to enable a machine to execute any of the methods described above.
[0100] The beneficial effect of the present application is that the method of the present invention can solve the existing problems of poor security and inconvenience in searching for user test scores. By extracting keywords from user data and classifying them, the classified user registration data, user role authority data, and user test score data are stored separately in the form of master and slave blockchains, thereby realizing the isolation of user registration data, user role authority data, and user test score data, and realizing the isolation of user privacy data and shared data. In addition, by associating the user's role authority with the blockchain, it is realized that there is no need to visit multiple databases aimlessly, and only the slave blockchain corresponding to the role authority needs to be accessed, which improves the efficiency of data access while ensuring data security.
[0101] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems or computer program products. Therefore, the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.
[0102] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0103] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0104] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0105] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0106] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0107] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0108] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0109] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.
Claims
1. A data information security protection method, characterized in that: The method comprises: Step S1: Collect data in the examination system through intelligent examination equipment and perform standardization processing to obtain standardized user data; Step S2: classifying the user data, extracting keywords from the user data using a preset keyword extraction algorithm, and comparing the keywords with preset keywords. Based on the comparison result, classifying the user data into user registration data, user role authority data, and user test score data; Step S3: encrypt the user registration data and the user role authority data using a ring signature encryption algorithm, and encrypt the user test score data using an elliptic curve encryption algorithm; Step S4: sending the encrypted user data to the master-slave blockchain for storage respectively, wherein the master-slave blockchain includes a master chain and multiple slave chains, the master chain is used to store the user registration data and the user role authority data, the slave chain is used to store the user test score data, and the master-slave blockchain stores the corresponding relationship between the user role authority data and the database in the master-slave blockchain; Step S5: When the user accesses the test score data, the user registration data and the user role authority data are authenticated respectively. After the authentication is passed and the user role authority data is identified, the database authority in the master-slave blockchain corresponding to the role authority data is opened to the user; The step S4 comprises: When storing data, the user registration data and the user role authority data are stored in the main blockchain; the slave blockchain and key pair corresponding to the role authority data are determined according to the user role authority data, and the user test score data is stored in the corresponding slave blockchain according to the key pair; The step S5 comprises: Obtain the digital signature of the user accessing the test score data, and decrypt the digital signature with the user's public key to obtain the first summary information; decrypt the ciphertext corresponding to the test score data acquisition request with the user's private key to obtain the original text; perform a hash operation on the original text to obtain the second summary information; determine whether the first summary information is consistent with the second summary information; if the first summary information is consistent with the second summary information, the authentication is passed, otherwise, the authentication is failed; If the authentication is successful, the slave blockchain and private key corresponding to the user role authority data are determined according to the user role authority data corresponding to the user's request to access the test score data, and the database in the master-slave blockchain corresponding to the user role authority data is decrypted based on the private key to obtain the corresponding test score data.
2. The method according to claim 1, characterized in that The step S1 comprises: Collecting registration data and user role authority information input by the user during the examination based on the intelligent examination device; After the test is over, the intelligent test device sends the user's test answers to the server for the examiner on the server to complete the marking, and returns the test score data to the intelligent test device for storage; The user registration data, the user role authority data and the test score data stored in the intelligent test device are standardized to obtain standardized user data.
3. The method according to claim 1, characterized in that The preset keyword extraction algorithm is any one of the TF-IDF algorithm, the TEXtRank algorithm, and the Word2VEC algorithm.
4. A data information security protection system, characterized in that: Used to execute the data information security protection method according to any one of claims 1 to 3, the system comprises: A data collection and standardization module collects data from the test system through intelligent test equipment and performs standardization processing to obtain standardized user data; A data classification module classifies the user data, extracts keywords from the data using a preset keyword extraction algorithm, and compares the data with preset keywords. Based on the comparison result, the data is classified into user registration data, user role authority data, and user test score data; A data encryption module, which uses a ring signature encryption algorithm to encrypt the user role data and the user role authority data, and uses an elliptic curve encryption algorithm to encrypt the user test score data; A data storage module, which sends the encrypted data to a master-slave blockchain for storage respectively, wherein the master-slave blockchain includes a master chain and multiple slave chains, the master chain is used to store the user registration data and the user role authority data, the slave chain is used to store the user test score data, and the master-slave blockchain stores the corresponding relationship between the user role authority data and the database in the master-slave blockchain; A data search module, when the user accesses the test score data, authenticates the user registration data and the user role authority data respectively, and after the authentication is passed and the user role authority data is identified, opens the database authority in the master-slave blockchain corresponding to the role authority data to the user; The data storage module comprises: When storing data, the user registration data and the user role authority data are stored in the main blockchain; the slave blockchain and key pair corresponding to the role authority are determined according to the user role authority, and the user test score data is stored in the database of the corresponding slave blockchain according to the key pair; The data search module includes: Obtain the digital signature of the user accessing the test score data, and decrypt the digital signature with the user's public key to obtain the first summary information; decrypt the ciphertext corresponding to the test score data acquisition request with the user's private key to obtain the original text; perform a hash operation on the original text to obtain the second summary information; determine whether the first summary information is consistent with the second summary information; if the first summary information is consistent with the second summary information, the authentication is passed, otherwise, the authentication is failed; If the authentication is successful, the slave blockchain and private key corresponding to the user role authority are determined according to the user role authority corresponding to the user's request to access the test score data, and the database in the master-slave blockchain corresponding to the user role authority data is decrypted based on the private key to obtain the corresponding test score data.
5. The system according to claim 4, characterized in that The data collection and standardization module includes: Collecting the registration data input by the user during the examination and the user's role authority data based on the intelligent examination device; After the test is over, the intelligent test device sends the user's test answers to the server for the examiner on the server to complete the examination, and returns the test score data to the intelligent test device for storage; The user registration data, the user role authority data and the test score data stored in the intelligent test device are standardized to obtain standardized user data.
6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, wherein the computer program is configured to execute the method according to any one of claims 1 to 3 when executed.
Citation Information
Patent Citations
Block chain-based trusted data safe storage method, retrieval method and equipment
CN113742764A
Data processing method and device based on block chain, equipment and storage medium
CN117436137A