A dynamic management method, device and storage medium of emergency training platform database
By classifying emergency training files and database users and establishing a user trustworthy value calculation model, the problem of file storage and access in combination with blockchain and database is solved, and efficient and secure file management and access is achieved.
Patent Information
- Application Number
- CN202411786207.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-04-08
- Estimated Expiration
- 2044-12-06
AI Technical Summary
When existing database dynamic management technology combines blockchain, it is difficult to efficiently and securely store and access files of different sizes, and achieve secure access to files in different demand occasions.
By dividing confidentiality levels and database user levels for emergency training files, and encrypted and graded storage based on file size. Establish a user trustworthy value calculation model, and access management of the emergency training platform database based on user trustworthy value, confidentiality level and user level.
It realizes efficient and secure storage and access of files of different sizes when the blockchain is combined with the database, and ensures secure access to files in different demand occasions, improving storage performance and efficiency.
Smart Images

Figure CN119272337B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of database dynamic management, and in particular to a method, device and storage medium for dynamic management of an emergency training platform database. Background Art
[0002] Database dynamic management technology refers to the process of using computer hardware and software technology to effectively access, store, process and apply data in a database to achieve real-time updating and management of data and ensure data accuracy and security. Database dynamic management technology covers real-time monitoring, automated maintenance, data backup and recovery, performance optimization, access control and other aspects.
[0003] As an emergency training platform for military hospital nurses in response to disaster relief and to improve the level of nursing technology and equipment and the construction of medical and health forces in military hospitals, it is particularly important to conduct safe and effective dynamic management of its database; traditional database dynamic management technology mostly concentrates management and access rights on a central server to ensure data consistency and integrity, but faces security issues such as data tampering and destruction, and the file management efficiency is not high and lacks scalability, making it difficult to apply to distributed processing scenarios and difficult to efficiently store a wide variety of training files; the current distributed database system also has problems such as poor data security and confidentiality, and a relatively complex access structure; and due to the different business data logic and responsibility division among various units in military hospitals, data cannot be effectively shared; combining blockchain with database and taking advantage of the decentralized, secure and transparent advantages of blockchain can maintain the flexible, highly available and efficient characteristics of distributed databases while ensuring data security and consistency, such as the CN Patent application No. 112835977A discloses a database management method and system based on blockchain. The solution combines blockchain to build a secure, reliable and efficient chain database system. However, the solution cannot solve the problem of efficient storage and backup of large files and the problem of secure access under different demand scenarios. Therefore, the existing database dynamic management technology lacks a method for efficiently and securely storing and accessing files of different sizes while achieving secure access to files under different demand scenarios in combination with blockchain and database. Summary of the invention
[0004] The present invention aims to solve at least one of the technical problems in the prior art to a certain extent, by classifying emergency training files into confidentiality levels and database user levels; and encrypting and storing them in a hierarchical manner based on file size, establishing a user trust value calculation model, and managing access to the emergency training platform database based on user trust value, confidentiality level and user level; so as to solve the problem that the existing technology cannot efficiently and securely store and access files of different sizes while combining blockchain and database, and at the same time, achieve secure access to files in different demand scenarios.
[0005] To achieve the above objectives, in a first aspect, the present application provides a method for dynamically managing an emergency training platform database, comprising the following steps:
[0006] Classify emergency training documents into confidentiality levels and classify database users;
[0007] Obtain the transaction log of the database transaction operation and encrypt and store the transaction log;
[0008] Files in the database are graded according to their size, and encrypted and uploaded to the blockchain after completion;
[0009] Establish a user trust value calculation model and divide access control permissions;
[0010] Access to the emergency training platform database is managed based on user trust value, confidentiality level and user level.
[0011] Furthermore, the confidentiality level of emergency training documents and the level of database users are divided into the following sub-steps:
[0012] According to the importance of training files, the confidentiality level of files in the database of the emergency training platform is divided into four levels, namely ordinary, restricted, confidential and top secret, and stored according to the confidentiality level. Training files with ordinary confidentiality level are marked as public files, and files with restricted confidentiality level, confidential and top secret are marked as non-public files;
[0013] The users who access the database of the emergency training platform are divided into three levels, namely primary users, intermediate users and advanced users.
[0014] Furthermore, obtaining the transaction diary of the database transaction operation and encrypting and storing the transaction diary includes the following sub-steps:
[0015] Establish a connection between the blockchain and the database of the emergency training platform, and enable an event monitoring thread based on the blockchain to monitor the transaction operations of the database of the emergency training platform at the first time interval, and extract the transaction log after the database completes the transaction operation of adding relevant files to obtain the first transaction log; the blockchain includes a private chain, a public chain, and a consortium chain, and the first time interval is a;
[0016] Using asymmetric encryption to encrypt the first transaction log includes: randomly generating multiple distinct strong prime numbers, denoted as p1, p2, ……, pn; calculating the modulus N = p1 * p2 * …… * pn; then calculating the Euler's totient function φ(N) of the modulus N = (p1 - 1) * (p2 - 1) * …… * (pn - 1); randomly generating a positive integer, denoted as e, 1 < e < φ(N) and the greatest common divisor of e and φ(N) is 1, taking (e, N) as the public key; solving the modular multiplicative inverse element of e with respect to φ(N) based on e and φ(N) to obtain the modular multiplicative inverse element d, and then obtaining the private key (d, N); using the public key (e, N) to encrypt the first transaction log to obtain the encrypted transaction log, and storing the encrypted transaction log on the private chain.
[0017] Furthermore, the hierarchical processing of files in the database according to the file size includes the following sub-steps:
[0018] Use the private key (d, N) to decrypt and parse the encrypted transaction log, extract the data parameter information of the file corresponding to the encrypted transaction log, and retrieve the corresponding file according to the data parameter information, mark it as the first file, calculate the file size of the first file, if the file size exceeds W, then store the first file in the IPFS InterPlanetary File System, obtain the hash address of the first file in the IPFS InterPlanetary File System, mark it as DocData, if the file size does not exceed W, then mark the content stored in the first file as DocData.
[0019] Furthermore, the further encryption and uploading to the chain processing includes the following sub-steps:
[0020] Obtain whether the first file is a public file according to the data parameter information of the first file. If the first file is a public file, then merge DocData with the data parameter information of the first file, mark it as info, and after completion, upload info to the consortium chain of the blockchain;
[0021] If the first file is a non-public file, then use symmetric encryption to encrypt DocData, including: establishing a first mapping and a second mapping, the first mapping formula is: and the second mapping formula is: where x n is the nth random value, x n-1is the (n - 1)th random value, and ŋ ranges from (0, 1); determine the parameter ŋ, set the length n of the required random value sequence, and then randomly generate an initial value x0 ranging from (0, 1) as the mapping initial value; substitute the mapping initial value x0 into the first mapping formula and the second mapping formula respectively, and repeat the iteration to obtain two random value sequences with length n; mark the random value sequence obtained by iterating the first mapping formula as the first random sequence, and mark the random value sequence obtained by iterating the second mapping formula as the second random sequence;
[0022] Convert the values in the first random sequence and the second random sequence into positive integers, and after completion, obtain the first chaotic sequence and the second chaotic sequence; randomly generate an integer value i, where 0 < i < n; use i as the starting subscript, and intercept partial sequences with length L from the first chaotic sequence and the second chaotic sequence; perform XOR operation on the corresponding digits of the values at the corresponding positions of the intercepted partial first chaotic sequence and partial second chaotic sequence in binary; mark the obtained value as the round key, repeat randomly generating different integer values i, and thus repeat generating multiple round keys, and the intercepted length L is the same as the round key length;
[0023] Perform AES encryption on DocData based on the round key to obtain the encrypted DocData, then merge the encrypted DocData with the data parameter information, mark it as info, and after completion, upload info to the consortium chain of the blockchain and store the round key on the private chain.
[0024] Furthermore, establishing a user trustworthiness calculation model includes the following sub-steps:
[0025] Obtain the influencing factor indicators of node e used by the user for the first time to access the database, marked as the security index value VL, and the influencing indicators include functional factor indicators, reliability factor indicators, and security factor indicators; obtain the influencing factor indicators of node e used by the user for subsequent access to the database, marked as the current index value V;
[0026] Perform dimensionless processing on all items of the security index value V, and calculate the basic trustworthiness C1. The basic trustworthiness calculation formula is as follows: , where k represents the kth index, n represents a total of n indexes, V k represents the kth current index value, VA k represents the kth security index value after dimensionless processing of the security index value V;
[0027] Then, according to the security index value VL and the current index value V, calculate the security state similarity C2. The security state similarity calculation formula is as follows: , where k represents the kth index, n represents a total of n indexes, V k represents the kth current index value, VLk represents the kth security index value;
[0028] Then calculate the credible value C(e), C(e)=C1*C2.
[0029] Furthermore, the division of access control permissions includes the following sub-steps:
[0030] Based on user level and confidentiality level settings, primary users can access files with normal confidentiality level, intermediate users can access files with normal and restricted confidentiality level, and advanced users can access files with normal, restricted, confidential and top secret confidentiality levels;
[0031] The trust value thresholds are set for the primary user, the intermediate user and the advanced user respectively. The trust value threshold for the primary user is T1, the trust value thresholds for the intermediate user are T1 and T2, and the trust value thresholds for the advanced user are T2 and T3; and T3>T2>T1;
[0032] When the primary user's trust value is less than T1, the intermediate user's trust value is less than T1, and the advanced user's trust value threshold is less than T1, files cannot be accessed. When the intermediate user's trust value is greater than or equal to T1 and less than T2, files with restricted confidentiality levels cannot be accessed. When the advanced user's trust value is greater than or equal to T2 and less than T3, files with confidentiality levels of confidential and top secret cannot be accessed.
[0033] Furthermore, based on the user trust value, confidentiality level and user level, access management of the emergency training platform database includes the following sub-steps:
[0034] The user initiates an application for file access management to the alliance chain. The alliance chain collects the current index value V of the user's node, obtains the security index value VL to calculate the trust value of the user's node, and determines whether the trust value is less than the trust value threshold based on the user's level. If it is less than the trust value threshold, the user's file access management application is rejected;
[0035] If it is not less than the trust value threshold, the user level and the confidentiality level of the file for which access management is requested are obtained to determine whether the user of that level can access the file of that confidentiality level. If not, the user's access management application is rejected;
[0036] If possible, the user's application for file access management is allowed, and the file information that the user wants to access and manage is obtained at the same time, and the size of the file that the user wants to access and manage is judged. If the file size does not exceed W, the file that the user wants to access and manage is determined to be a small file, and the file is directly read for access management. If the file size exceeds W, the file that the user wants to access and manage is determined to be a large file, then the hash address of the file in the IPFS interstellar file system is read, and the hash address is used to read the file for access management.
[0037] In a second aspect, the present application provides an electronic device, including a processor and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps in the above method are performed.
[0038] In a third aspect, the present application provides a storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in the above method are performed.
[0039] Beneficial effects of the present invention: The present invention divides the confidentiality level of emergency training files and the user level of databases; then obtains the transaction diary of database transaction operations and performs encrypted storage processing on the transaction diary; then performs classification processing on the files in the database according to the file size, and then performs encrypted chain processing after completion; then establishes a user trust value calculation model and divides the access control authority; finally, based on the user trust value, confidentiality level and user level, performs access management on the emergency training platform database; in the case of combining blockchain and database, it can realize efficient and secure storage and access of files of different sizes, and realize that files can be securely accessed in different demand occasions;
[0040] The present invention performs hierarchical processing and storage based on file size, and proposes an improved AES encryption algorithm, which effectively solves the problems of secure storage and backup of large files in blockchain-based database management, while ensuring the security and completeness of archival files, while also improving storage performance and efficiency, and can more quickly realize the storage and access of files of different sizes. By dividing confidentiality levels and user levels and establishing a user trust value calculation model, the purpose of secure access to files in different demand situations is achieved, and the security of emergency training files is guaranteed, thereby preventing the leakage of emergency training files. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 is a flow chart of the steps of the method of the present invention;
[0042] Figure 2 It is a schematic diagram of the structure of the blockchain of the present invention;
[0043] Figure 3 It is a flowchart of file hierarchical storage of the present invention;
[0044] Figure 4 It is a schematic diagram of a sequence XOR operation of the present invention;
[0045] Figure 5 It is a schematic structural diagram of the electronic device of the present invention. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] Example 1, please refer to Figure 1 As shown, in the first aspect, the present application provides a method for dynamically managing an emergency training platform database, comprising the following steps:
[0048] Step S1, classifying the confidentiality level of emergency training files and classifying the database users; Step S1 includes the following sub-steps:
[0049] Step S101, according to the importance of the training files, the confidentiality level of the files in the database of the emergency training platform is divided into four levels, namely ordinary, restricted, confidential and top secret; for example, the training files on the development of new technologies are classified as top secret, the training files on the operation of new equipment are classified as confidential, the training files on the rules and regulations of military hospitals are classified as restricted, and the training files on laws and regulations are classified as ordinary;
[0050] Step S102, and classify and store according to the confidentiality level, marking the training files with a normal confidentiality level as public files;
[0051] Step S103, marking the files with confidentiality level restrictions, confidential and top secret as non-public files;
[0052] Step S104, dividing the users accessing the database of the emergency training platform into three levels, namely primary users, intermediate users and advanced users;
[0053] During the specific implementation process, the leakage of top secret documents will cause particularly serious damage to the safety and interests of the corresponding subjects, so extremely strict confidentiality measures and management are required; the leakage of confidential documents will cause serious damage to the safety and interests of the corresponding subjects, and corresponding confidentiality measures need to be taken to prevent information leakage; the leakage of secret documents will cause certain damage to the safety and interests of the corresponding subjects. Although it is lower than the top secret and confidential levels, it still needs to be properly managed to prevent leakage.
[0054] Step S2, obtaining the transaction diary of the database transaction operation, and encrypting and storing the transaction diary; Step S2 includes the following sub-steps:
[0055] Step S201, establish a connection between the blockchain and the database of the emergency training platform, and enable the event monitoring thread based on the blockchain; please refer to Figure 2As shown, the blockchain includes private chain, public chain and alliance chain; the public chain is open to everyone and anyone can participate; the public chain distributes data across nodes in the entire network through its decentralized characteristics, greatly enhancing the security of the data; in this embodiment, the public chain is open to all personnel in the military hospital; the alliance chain is only open to specific organizations and groups; due to its specific organizational structure and consensus mechanism, the alliance chain can improve the performance and security of the system while ensuring a certain degree of decentralization. In this embodiment, the alliance chain is only open to primary, intermediate and advanced users; the private chain is only open to individual individuals or entities, and the private chain can be customized according to specific needs, including transaction speed, consensus mechanism, etc.; since only specific users or organizations can participate in transactions, the security threats faced by the private chain are relatively small; in this embodiment, the private chain is only open to advanced users.
[0056] Step S202, monitor the transaction operation of the database of the emergency training platform at a first time interval, and extract the transaction diary after the database completes the transaction operation of adding the relevant file to obtain the first transaction diary; the first time interval is a; the transaction diary is a log file used in the database management system to record and track all modification operations on the database; after completing the transaction operation, the database will record the specific content of the operation in the transaction log.
[0057] Step S203, encrypting the first transaction diary using asymmetric encryption; and asymmetric encryption, also known as public key encryption, is an encryption technology that uses a pair of keys for encryption and decryption; the pair of keys includes a public key and a private key; the public key can be shared publicly, while the private key is kept confidential; its core idea is that data encrypted using the public key can only be decrypted using the corresponding private key; for example, if A1 wants to send encrypted information to B1, A1 will first obtain B1's public key, and then encrypt the information using B1's public key; even if the encrypted information is intercepted by a third party, it cannot be interpreted, because only B1 has the corresponding private key. When B1 receives the encrypted information, he will decrypt it with his own B1 private key to obtain the original information; since the private key is confidential, even if the attacker knows the public key, he cannot deduce the private key or decrypt the information; step S203 includes the following sub-steps:
[0058] Step S2031: randomly generate a plurality of strong prime numbers with different values, denoted as p1, p2, ..., pn; in cryptography, a strong prime number usually refers to a very large prime number, and its minus one or plus one form also has a large prime factor; for example, 3215648952147 is a strong prime number;
[0059] Step S2032: Calculate the modulus N = p1 * p2 * …… * pn; then calculate the Euler's totient function φ(N) of the modulus N = (p1 - 1) * (p2 - 1) * …… * (pn - 1);
[0060] Step S2033: Randomly generate a positive integer, denoted as e, where 1 < e < φ(N) and the greatest common divisor of e and φ(N) is 1, and take (e, N) as the public key; to ensure the reliability of encryption, e should be as large as possible;
[0061] Step S2034: Solve the modular multiplicative inverse of e with respect to φ(N) to obtain the modular multiplicative inverse element d, and then obtain the private key (d, N); solve the modular multiplicative inverse of e with respect to φ(N) according to ed ≡ 1 (mod φ(N)); ed ≡ 1 (mod φ(N)) is defined as: if two positive integers e and d are relatively prime, then there must exist an integer φ(N) such that e * d - 1 is divisible by φ(N), or in other words, the remainder of e * d divided by φ(N) is 1. For example, if e is 3215648952153 and φ(N) is 1427401195429103; then (3215648952153 * d - 1) / 1427401195429103 is an integer, and d can be 300000043;
[0062] Step S2035: Encrypt the first transaction log using the public key (e, N) to obtain the encrypted transaction log, and store the encrypted transaction log on the private chain;
[0063] In the specific implementation process, in order to improve the reliability and privacy of the transaction log during transmission and storage, an encryption operation is performed on the extracted transaction log. In this embodiment, the transaction log to be uploaded to the chain is denoted as Flog, expressed as Flog = {PKU, ASSET, METADATA}, where PKU represents the private key, that is, the private key (d, N), ASSET represents the encrypted transaction log, and METADATA represents the type and content information of the data uploaded to the chain; and the blockchain is a distributed and decentralized database technology, and its basic architecture can be divided into six layers, namely the data layer, network layer, consensus layer, incentive layer, contract layer, and application layer; the data layer contains blocks; the block is the basic unit in the blockchain, and each block contains certain transaction information and a hash value pointing to the previous block; the hash value of each block is calculated from the transaction information in the block and the hash value of the previous block, thus forming a blockchain; the data structure of the blockchain is composed of a series of interconnected blocks.
[0064] Step S3, please refer to Figure 3 as shown, classify the files in the database according to the file size, and then perform encryption and upload processing after completion; Step S3 includes the following sub-steps:
[0065] Step S301, using the private key (d, N) to decrypt and parse the encrypted transaction diary, and extract data parameter information of the file corresponding to the encrypted transaction diary; the data parameter information includes the file type and file storage path of the corresponding file;
[0066] Step S302, and retrieve the corresponding file according to the data parameter information, that is, retrieve the corresponding file according to the file storage path in the data parameter information, mark it as the first file, and calculate the file size of the first file;
[0067] Step S303, if the file size exceeds W, store the first file in the IPFS interplanetary file system; obtain the hash address of the first file in the IPFS interplanetary file system, marked as DocData, in this embodiment, W is 128KB; W needs to be set according to the actual application scenario, for example, in some systems, files with a size of no more than 1MB account for a large proportion, so W can be set to 1M; IPFS interplanetary file system is a distributed file system that uses Merkle DAG to store and manage files. Merkle DAG will decompose the file into multiple small blocks and use a hash function to hash each block, and each block has a hash value; this makes it easy for IPFS to check whether the file has been tampered with or damaged; and IPFS can also use Merkle DAG to manage other data types, such as directories, links, and metadata, and supports operations such as adding, deleting, separating, and merging branches;
[0068] Step S304, if the file size does not exceed W, then mark the content stored in the first file as DocData;
[0069] Step S305, if the first file is a non-public file, DocData is encrypted using symmetric encryption; symmetric encryption, also known as single-key encryption, uses the same key for encryption and decryption processes; this means that the sender and the receiver must share the same key in order to understand each other's information; the core idea of symmetric encryption is to convert plaintext into ciphertext using a key, and then restore the ciphertext to plaintext using the same key. For example, if A1 wants to send encrypted information to B1, she will select or generate a key and use this key to encrypt the information; even if the encrypted information is intercepted by a third party, it cannot be interpreted because only B1 with the same key can decrypt it; when B1 receives the encrypted information, he will decrypt it using the same key to obtain the original information; since the keys are the same, the encryption and decryption processes can be reversed.
[0070] Step S305 includes the following sub-steps:
[0071] Step S3051, establish the first mapping and the second mapping. The formula of the first mapping is: , and the formula of the second mapping is: , where x n is the nth random value, and x n-1 is the (n - 1)th random value. The value range of ŋ is (0, 1);
[0072] Step S3052, determine the parameter ŋ, set the length n of the required random value sequence, and then randomly generate an initial value x0 with a value range of (0, 1) as the mapping initial value; in this embodiment, ŋ is 0.48;
[0073] Step S3053, substitute the mapping initial value x0 into the first mapping formula and the second mapping formula respectively, and repeat the iteration, that is, substitute x0 into the formula to get x1, and then substitute x1 to get x2, and repeat the operation until the length n of the required random value sequence is reached, that is, x n is obtained; two random value sequences with a length of n are obtained; the random value sequence obtained by iterating the first mapping formula is marked as the first random sequence, and the random value sequence obtained by iterating the second mapping formula is marked as the second random sequence;
[0074] Step S3054, convert the values in the first random sequence and the second random sequence into positive integers. All the values in the first random sequence and the second random sequence can be multiplied by a positive integer with a fixed size. For example, when calculating the first random sequence and the second random sequence, 7 decimal places are retained, then they can be multiplied by 10000000 to convert the values in the first random sequence and the second random sequence into positive integers; after completion, the first chaotic sequence and the second chaotic sequence are obtained;
[0075] Step S3055, randomly generate an integer value i, 0 < i < n; use i as the starting subscript, and intercept a partial sequence with a length of L from the first chaotic sequence and the second chaotic sequence; if the length from the starting subscript to the last number in the sequence is less than the intercepted length L, then make up from the starting position of the sequence. For example, the intercepted length is 8, the starting subscript is 10, and the first chaotic sequence is (y1, y2, y3, y4, y5, y6, y7, y8, y9, y10, y11, y12, y13, y14, y15), then the intercepted partial first chaotic sequence is (y10, y11, y12, y13, y14, y15, y1, y2, y3);
[0076] Step S3056, please refer to Figure 4As shown, the values of the corresponding positions of the intercepted part of the first chaotic sequence and the part of the second chaotic sequence are subjected to the XOR operation of the corresponding digits in binary; the XOR operation follows the following basic rules: 1⊕1=0, 0⊕0=0, 1⊕0=1, 0⊕1=1, that is, if the two numbers are both 1, they are 0, if they are both 0, they are also 0, and if they are different 1 or different 0, they are both 1;
[0077] Step S3057 marks the obtained value as the round key, repeatedly randomly generates different integer values i, and then repeatedly generates multiple round keys, and the interception length L is the same as the round key length; for example, if the round key length is 128 bits, then the interception length L is also 128;
[0078] Step S3058, perform AES encryption on DocData based on the round key to obtain encrypted DocData, then merge the encrypted DocData with the data parameter information and mark it as info. After completion, upload info to the alliance chain of the blockchain and store the round key on the private chain. In the specific implementation process, the key of traditional AES encryption has defects in the expansion process. The round key of traditional AES uses the initial seed key and then generates a sufficient number of round keys through a series of XOR operations. However, in this process, the round key of each round is generated according to the key of the previous round through group XOR operations, so there is a strong correlation between the round keys. If any of the round keys is cracked, the round key of the entire encryption process will be easily decrypted. Therefore, it is necessary to improve AES encryption, that is, to improve the generation process of the round key, that is, to establish a first mapping and a second mapping, and generate an unpredictable random sequence to generate the round key, replacing the traditional AES The key expansion process makes the correlation between adjacent round keys approach 0. Since there is no correlation between the improved round keys, it is impossible to decrypt other round keys based on one of the round keys, which greatly improves the security of encryption.
[0079] Step S4, establishing a user trust value calculation model and dividing access control permissions; Step S4 includes the following sub-steps:
[0080] Step S401, obtaining the influencing factor index of the node e used by the user to access the database for the first time, marked as the security index value VL, the influencing index includes the functional factor index, the reliability factor index and the security factor index; the functional factor index includes: average CPU utilization, average throughput, average IP packet transmission delay, average number of threads occupied by users, average IP packet delay jitter time, average IP packet network bandwidth occupancy rate, average user IP response time, average user storage resource occupancy rate, etc.; the reliability factor index includes: average user bit error rate, average IP packet loss rate, average connection establishment success rate, average number of user fault service times, etc.; the security factor index includes: average number of illegal user connections, average number of important port scans, average number of attempts to overstep authority, and average number of users infected with physical viruses;
[0081] Step S402, obtaining the influencing factor index of the node e used by the user to access the database later, marked as the current index value V, that is, the specific data of all influencing factor indexes;
[0082] Step S403: All items of the safety index value V are dimensionless processed, and the basic credibility value C1 is calculated. The basic credibility value calculation formula is as follows: , where k represents the kth index, n represents a total of n indexes, V k Represents the kth current index value, VA k represents the kth safety index value after the dimensionless processing of the safety index value V; in this embodiment, the dimensionless processing adopts the specific gravity method, and the formula is as follows: ;
[0083] Step S404, calculate the security status similarity C2 according to the security index value VL and the current index value V. The security status similarity calculation formula is as follows: , where k represents the kth index, n represents a total of n indexes, V k Represents the kth current index value, VL k represents the kth security index value; step S405, calculate the credible value C(e), C(e)=C1*C2;
[0084] Step S406, based on the user level and the confidentiality level, the primary user can access files with a confidentiality level of normal, the intermediate user can access files with a confidentiality level of normal and restricted, and the advanced user can access files with a confidentiality level of normal, restricted, confidential, and top secret;
[0085] Step S407, set the trust value thresholds for novice users, intermediate users, and advanced users respectively. The trust value threshold for novice users is T1, the trust value thresholds for intermediate users are T1 and T2, and the trust value thresholds for advanced users are T2 and T3; and T3 > T2 > T1; in this embodiment, T1 is 0.6, T2 is 0.75, and T3 is 0.85;
[0086] Step S408, when the trust value of a novice user is less than T1, the trust value of an intermediate user is less than T1, and the trust value threshold of an advanced user is less than T1, the file cannot be accessed. When the trust value of an intermediate user is greater than or equal to T1 and less than T2, the file with a confidentiality level of restricted cannot be accessed. When the trust value of an advanced user is greater than or equal to T2 and less than T3, the files with confidentiality levels of confidential and top-secret cannot be accessed; for example, if the trust value of a certain advanced user is 0.8, while T1 is 0.6, T2 is 0.75, and T3 is 0.85, and T2 < 0.8 < T3, so when this advanced user accesses the file through the blockchain, the files with confidentiality levels of confidential and top-secret cannot be accessed, but the files with confidentiality levels of ordinary and restricted can be accessed. If the trust value of this advanced user is 0.7, then the files with confidentiality levels of restricted, confidential, and top-secret cannot be accessed, and only the files with a confidentiality level of ordinary can be accessed. If the trust value of this advanced user is less than 0.6, then the file cannot be accessed;
[0087] In the specific implementation process, according to the access mechanism of the consortium blockchain, if node e enters the blockchain network for the first time, this node can be regarded as an honest node with a good security status; obtain the numerical values of the current influencing factor indicators of node e, transmit them to the consortium blockchain, and record the status at this time as the security status. In this embodiment, the security status of node e is the security index value VL; the functional factor indicators, reliability factor indicators, and security factor indicators can be increased or decreased according to the actual application scenario; and the confidential files and top-secret files have high confidentiality and high importance, so the trust values required for accessing confidential files and top-secret files are also relatively high.
[0088] Step S5, based on the user trust value, confidentiality level, and user level, perform access management on the emergency training platform database; Step S5 includes the following sub-steps:
[0089] Step S501, the user发起 an application for file access management to the consortium blockchain. The consortium blockchain collects the current index value V of the user node, obtains the security index value VL to calculate the trust value of the user node, and determines whether the trust value is less than the trust value threshold according to the user level. If it is less than the trust value threshold, the file access management application of the user is rejected;
[0090] Step S502: if the value is not less than the trust value threshold, the user level and the confidentiality level of the file for which access management is requested are obtained to determine whether the user of the level can access the file of the confidentiality level. If not, the user's access management application is rejected. For example, a middle-level user has a trust value of 0.90 and applies to access a confidential file. Although the trust value is very high, the middle-level user cannot access files with a confidentiality level, so the middle-level user's access management application is rejected.
[0091] Step S503: If yes, the user's application for file access management is allowed, and the file information to be accessed and managed by the user is obtained. The size of the file to be accessed and managed by the user is determined. If the file size does not exceed W, the file to be accessed and managed by the user is determined to be a small file, and the file is directly read for access management; because the file size does not exceed W, it is directly stored on the alliance chain;
[0092] Step S504: If the file size exceeds W, the file to be accessed and managed by the user is determined to be a large file, and the hash address of the file in the IPFS interstellar file system is read, and the file is read using the hash address for access management; because the file size exceeds W, it is stored in the IPFS interstellar file system;
[0093] In the specific implementation process, in addition to file access management, file verification can also be performed. For example, the user uploads the file to be verified to the blockchain, and the blockchain obtains the hash value of the file and compares the hash value with the hash value of the file stored on the chain; if the two hash values are the same, the verification result is true, otherwise it means that the verification result is false, and the information of the file and the file stored on the chain and the verification result are returned.
[0094] Example 2, please refer to Figure 5 As shown, Figure 5 The structural diagram of an electronic device is illustrated, and the electronic device may include: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus. The memory stores computer-readable instructions, and the processor can call the instructions in the memory. When the computer-readable instructions are executed by the processor, the steps in a dynamic management method for an emergency training platform database are executed to achieve the following functions: classify the confidentiality level of emergency training files and classify the database user level; obtain the transaction diary of database transaction operations, and encrypt and store the transaction diary; classify the files in the database according to the file size, and then encrypt and upload them to the chain after completion; establish a user trust value calculation model, and classify the access control authority; and manage the access to the emergency training platform database based on the user trust value, confidentiality level and user level.
[0095] In addition, the logic instructions in the above-mentioned memory can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0096] Embodiment 3, the present application also provides a computer-readable storage medium, the present application provides a storage medium, on which a computer program is stored. When the computer program is executed by the processor, the steps in the above emergency training platform database dynamic management method are executed to achieve the following functions: classify emergency training files into confidentiality levels, and classify database users; obtain transaction diaries of database transaction operations, and encrypt and store the transaction diaries; grade the files in the database according to their size, and then encrypt and upload them to the chain after completion; establish a user trust value calculation model, and divide access control permissions; and manage access to the emergency training platform database based on user trust values, confidentiality levels, and user levels.
[0097] Through the description of the above implementation methods, the embodiments of the present invention can be provided as methods, systems or computer program products. Based on such an understanding, the above technical solutions can be essentially or partly contributed to the prior art in the form of software products, which can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and include several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0098] In the embodiments provided in the present application, it should be understood that the disclosed system or method can be implemented in other ways. The embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of systems, modules and units can be electrical, mechanical or other forms.
[0099] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for dynamic management of emergency training platform database, characterized in that: It includes the following steps: Classify the confidentiality levels of emergency training documents and classify the database user levels; Obtain the transaction logs of database transaction operations and perform encrypted storage processing on the transaction logs; Classify the files in the database according to the file size, and then perform encrypted chain - up processing after completion; Establish a user trust value calculation model and divide the access control permissions; Based on the user trust value, confidentiality level, and user level, perform access management on the emergency training platform database; Establishing a user trust value calculation model includes the following sub - steps: Obtain the influencing factor indicators of node e used by the user for the first time to access the database, marked as the security index value VL. The influencing indicators include functional factor indicators, reliability factor indicators, and security factor indicators; obtain the influencing factor indicators of node e used by the user for subsequent access to the database, marked as the current index value V; All items of the safety index value V are dimensionless, and the basic credible value C1 is calculated. The basic credible value calculation formula is as follows: , where k represents the kth index, n represents a total of n indexes, V k Represents the kth current index value, VA k represents the kth safety index value after dimensionless processing of the safety index value V; Then, according to the safety index value VL and the current index value V, the safety status similarity C2 is calculated. The safety status similarity calculation formula is as follows: , where k represents the kth index, n represents a total of n indexes, V k Represents the kth current index value, VL k represents the kth security index value; Then calculate the trust value C(e), C(e)=C1*C2.
2. According to claim 1, a method for dynamic management of emergency training platform database is characterized in that: Classifying the confidentiality levels of emergency training documents and classifying the database user levels includes the following sub - steps: According to the importance of the training documents, divide the confidentiality levels of the files in the database of the emergency training platform into four levels, namely ordinary, restricted, confidential, and top - secret, and store them classified according to the confidentiality level. Mark the training documents with the confidentiality level of ordinary as public documents, and mark the documents with the confidentiality levels of restricted, confidential, and top - secret as non - public documents; Divide the access users of the database of the emergency training platform into three levels, namely primary users, intermediate users, and advanced users.
3. The method for dynamic management of emergency training platform database according to claim 2, characterized in that: Obtaining the transaction logs of database transaction operations and performing encrypted storage processing on the transaction logs includes the following sub - steps: Establish a connection between the blockchain and the database of the emergency training platform, and enable an event monitoring thread based on the blockchain to monitor the transaction operations of the database of the emergency training platform at a first time interval, and extract the transaction logs after the database completes the transaction operation related to file addition to obtain the first transaction log; the blockchain includes a private chain, a public chain, and a consortium chain, and the first time interval is a; Encrypt the first transaction log using asymmetric encryption, including: randomly generate multiple distinct strong prime numbers, denoted as p1, p2, ……, pn; calculate the modulus N = p1*p2*……*pn; then calculate the Euler's totient function φ(N)=(p1 - 1)*(p2 - 1)*……*(pn - 1) of the modulus N; randomly generate a positive integer, denoted as e, 1 < e < φ(N) and the greatest common divisor of e and φ(N) is 1, take (e, N) as the public key; solve the modular inverse element of e with respect to φ(N) based on e and φ(N) to obtain the modular inverse element d, and then obtain the private key (d, N); use the public key (e, N) to encrypt the first transaction log to obtain the encrypted transaction log, and store the encrypted transaction log on the private chain.
4. The method for dynamic management of emergency training platform database according to claim 3 is characterized in that: Classifying the files in the database according to the file size includes the following sub - steps: Use the private key (d, N) to decrypt and parse the encrypted transaction log, extract the data parameter information of the file corresponding to the encrypted transaction log, retrieve the corresponding file according to the data parameter information, mark it as the first file, calculate the file size of the first file. If the file size exceeds W, store the first file in the IPFS interplanetary file system, obtain the hash address of the first file in the IPFS interplanetary file system, mark it as DocData. If the file size does not exceed W, mark the content stored in the first file as DocData.
5. The method for dynamic management of emergency training platform database according to claim 4, characterized in that: Then perform the encrypted chain - up process, which includes the following sub - steps: According to the data parameter information of the first file, obtain whether the first file is a public file. If the first file is a public file, merge DocData with the data parameter information of the first file, mark it as info, and after completion, upload info to the consortium chain of the blockchain. If the first file is a non-public file, encrypting DocData using symmetric encryption includes: establishing a first mapping and a second mapping, and the first mapping formula is: , the second mapping formula is: , where x n is the nth random value, x n-1 is the n-1th random value, and the value range of ŋ is (0, 1); determine the parameter ŋ, set the length n of the required random value sequence, and then randomly generate an initial value x0 with a value range of (0, 1) as the initial mapping value; substitute the initial mapping value x0 into the first mapping formula and the second mapping formula respectively, repeat the iteration, and obtain two sets of random value sequences with a length of n; mark the random value sequence obtained by iterating the first mapping formula as the first random sequence, and mark the random value sequence obtained by iterating the second mapping formula as the second random sequence; Convert the values in the first random sequence and the second random sequence into positive integers. After completion, obtain the first chaotic sequence and the second chaotic sequence; randomly generate an integer value i, where 0 < i < n; use i as the starting subscript, and intercept partial sequences of length L from the first chaotic sequence and the second chaotic sequence; perform XOR operations on the corresponding digits of the intercepted partial first chaotic sequence and partial second chaotic sequence in binary; mark the obtained value as the round key. Repeat randomly generating different integer values i, and thus repeat generating multiple round keys, with the intercepted length L being the same as the round key length. Based on the round key, perform AES encryption on DocData to obtain the encrypted DocData. Then merge the encrypted DocData with the data parameter information, mark it as info, and after completion, upload info to the consortium chain of the blockchain, and store the round key on the private chain.
6. The method for dynamic management of emergency training platform database according to claim 5, characterized in that: Divide the access control permissions, which includes the following sub - steps: Based on the user level and confidentiality level, set that primary users can access files with a confidentiality level of ordinary, intermediate users can access files with confidentiality levels of ordinary and restricted, and advanced users can access files with confidentiality levels of ordinary, restricted, confidential, and top - secret. Set trust value thresholds for primary users, intermediate users, and advanced users respectively. The trust value threshold for primary users is T1, the trust value thresholds for intermediate users are T1 and T2, and the trust value thresholds for advanced users are T2 and T3; and T3 > T2 > T1. When the trust value of a primary user is less than T1, the trust value of an intermediate user is less than T1, and the trust value threshold of an advanced user is less than T1, the file cannot be accessed. When the trust value of an intermediate user is greater than or equal to T1 and less than T2, the file with a confidentiality level of restricted cannot be accessed. When the trust value of an advanced user is greater than or equal to T2 and less than T3, the files with confidentiality levels of confidential and top - secret cannot be accessed.
7. The method for dynamic management of emergency training platform database according to claim 6, characterized in that: Based on the user trust value, confidentiality level, and user level, perform access management on the emergency training platform database, which includes the following sub - steps: The user initiates an application for file access management to the alliance chain. The alliance chain collects the current index value V of the user's node, obtains the security index value VL to calculate the trust value of the user's node, and determines whether the trust value is less than the trust value threshold based on the user's level. If it is less than the trust value threshold, the user's file access management application is rejected; If it is not less than the trust value threshold, the user level and the confidentiality level of the file for which access management is requested are obtained to determine whether the user of that level can access the file of that confidentiality level. If not, the user's access management application is rejected; If possible, the user's application for file access management is allowed, and the file information that the user wants to access and manage is obtained at the same time, and the size of the file that the user wants to access and manage is judged. If the file size does not exceed W, the file that the user wants to access and manage is determined to be a small file, and the file is directly read for access management. If the file size exceeds W, the file that the user wants to access and manage is determined to be a large file, then the hash address of the file in the IPFS interstellar file system is read, and the hash address is used to read the file for access management.
8. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the steps in the method according to any one of claims 1 to 7 are executed.
9. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps in the method according to any one of claims 1 to 7 are executed.
Citation Information
Patent Citations
Database management method and system based on block chain
CN112835977A
Classified and graded fitness health big data sharing system and method
CN114513533A
Network information security verification method and system based on block chain technology
CN117353893A