A Cloud-Network End-to-End Data Trusted Sharing Authentication Method Based on Bloom Filter
By using Bloom filters to build smart contracts in the data sharing platform, the problems of high concurrency and massive permission storage are solved, efficient permission recognition and secure storage are achieved, and system performance and data security are improved.
Patent Information
- Application Number
- CN202210173271.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-24
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2042-02-24
AI Technical Summary
When traditional data sharing platforms handle high concurrent access and massive permission records, the database load is too high, and the permission records are stored insecure, traditional encryption algorithms take time to process, and blockchain construction is complex and performance is limited.
The cloud network data trusted sharing authentication method based on Blon filter is adopted, and a smart contract is built by counting Blon filters to determine the access rights of data applicants, group user rights, reduce storage space, and ensure data security.
It improves the efficiency of data sharing permission identification, compresses the permission record storage space, ensures data security, does not store sensitive information, and improves system performance.
Smart Images

Figure CN114564708B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of system engineering and relates to a cloud network terminal data trusted sharing authentication method based on Bloom filter. Background Art
[0002] A key step in data sharing is to review whether the data applicant has the authority to access the data. Traditional data sharing platforms send data applications to data publishers for review, and manual review is often too slow. The authentication method of many current data sharing platforms is that the data publisher pre-sets the access rights to the data and grants them to designated users. These rights are recorded in the database. When the user applicant applies for data, the database query is used to determine whether the user has the data access rights. However, with the widespread application of data sharing platforms, when there are too many visits to a certain hot data, the platform will frequently query the database permission table, causing the database to be overloaded. In addition, with the increase in platform users and shared data, the records of data access rights will gradually become huge, which will bring great challenges to data storage. Moreover, directly storing permission records in the database is prone to data security issues, such as data leakage, permission tampering, etc. Even if traditional encryption algorithms are used to process massive data, it is time-consuming.
[0003] Therefore, the optimization of user permission auditing is mainly carried out from three aspects: first, to cope with more and more user requests; second, to solve the storage problem of massive permission records; third, to encrypt permission records to ensure data security. For problem one, enterprises usually use distributed systems to increase the number and performance of servers to improve response time; for problem two, they usually use the method of sub-library and sub-table to store data; for problem three, encryption algorithms are used to process data. Common encryption algorithms include DES, RSA, MD5, etc.
[0004] The latest optimization solution is based on blockchain, such as storing access control policies in blockchain through smart contracts, providing decentralized management and secure access control mode. The data sharing authentication method based on blockchain can ensure that permissions are secure and accurately authenticated. However, the construction of a complete blockchain is relatively complex and costly. The information published in the blockchain cannot be modified, and the user's operating specifications are high. In addition, blockchain transactions are delayed and affected by network transmission. Performance problems may occur as the amount of data increases. Summary of the invention
[0005] In view of the problems existing in the prior art, the purpose of the present invention is to provide a cloud-network-end data trusted sharing authentication method based on Bloom filter, which at least partially solves the above technical problems.
[0006] The embodiment of the present invention provides a cloud-network-end data trusted sharing authentication method based on Bloom filter, comprising:
[0007] S1: Acquire shared data and establish an authentication strategy; the shared data includes shared information provided by the data publisher and relevant information of the data applicant;
[0008] S2: Obtain the bit data length and the number of hash functions corresponding to the relevant information of the data applicant, construct a Bloom filter according to the authentication strategy, and generate a smart contract;
[0009] S3: obtaining the data applicant information for accessing the shared data; the corresponding Bloom filter in the smart contract determines the access rights of the data applicant; if the data applicant has access rights, providing a data interface to the data applicant.
[0010] Furthermore, the Bloom filter is a counting Bloom filter.
[0011] Furthermore, the relevant information of the data applicant includes access permission group, user ID and user identity information; the access permission group is provided by the data publisher.
[0012] Furthermore, each of the permission groups corresponds to each of the Bloom filters.
[0013] Further, obtaining the bit data length and the number of hash functions corresponding to the relevant information of the data applicant includes:
[0014] The bit data length and the number of hash functions corresponding to the current permission group are obtained; the bit data length is the number of data applicants; the bit array includes m counters; the relationship between the hash function and the number of data applicants is expressed as follows:
[0015] k=-lnp / ln2
[0016] Wherein, k represents the number of the hash functions; and p represents the maximum error rate of the Bloom filter.
[0017] Furthermore, the counter counter is composed of x bits; the calculation expression of x is:
[0018] m=kn / ln2
[0019]
[0020] Wherein, n represents the number of the data applicants in the current bit array; max(c) represents the maximum count value of the counter counter.
[0021] The embodiment of the present invention provides a cloud-network data trusted sharing authentication method based on Bloom filters. To address the issues of high concurrent access, massive data storage and data security, Bloom filters are used to improve the data sharing permission recording method, permission determination method and record storage format, thereby making the data sharing permission identification process simpler and more efficient, greatly compressing the permission record storage space, and ensuring that the saved data does not contain any sensitive or critical information.
[0022] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 A block diagram of a cloud-network-end data trusted sharing authentication method based on Bloom filters provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0024] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. 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.
[0025] In the description of the present invention, it should be noted that the terms "upper", "lower", "inside", "outside", "top / bottom" and the like indicate orientations or positional relationships based on the orientations or positional relationships shown in the accompanying drawings, and are only for the convenience of describing the present invention and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present invention.
[0026] In the description of the present invention, it should be noted that, unless otherwise clearly specified and limited, the terms "installed", "provided with", "internal connection", "connection", etc. should be understood in a broad sense. For example, "connection" can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For ordinary technicians in this field, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0027] The embodiment of the present invention provides a cloud network terminal data trusted sharing authentication method based on Bloom filter, such as Figure 1 As shown, including:
[0028] S1: Obtain shared data and establish authentication strategies; shared data includes shared information provided by the data publisher and relevant information of the data applicant;
[0029] S2: Obtain the bit data length and number of hash functions corresponding to the relevant information of the data applicant, build a Bloom filter according to the authentication strategy, and generate a smart contract;
[0030] S3: Obtain the data applicant information for accessing shared data; the corresponding Bloom filter in the smart contract determines the access rights of the data applicant; if the data applicant has access rights, a data interface is provided to him.
[0031] The embodiment of the present invention provides a cloud network end data trusted sharing authentication method based on Bloom filter. Aiming at the problems of high concurrent access, massive data storage and data security, Bloom filter is used to improve the data sharing permission recording method, permission determination method and record storage format, so that the data sharing permission identification process is simpler and more efficient, the permission record storage space is greatly compressed, and the saved data does not contain any sensitive or critical information. In addition, since the traditional Bloom filter does not support the deletion operation, the improved counting Bloom filter is selected, and the specific steps are as follows:
[0032] Step 1: The data publisher divides the access rights to the data and classifies the data applicants into different permission groups;
[0033] Step 2: Initialize a bit array of length s to record all applicants in a permission group;
[0034] Step 3: When a data applicant accesses the data, query whether the user is in the corresponding permission group according to the permission applied for;
[0035] Step 4: If the user has the requested access rights, a data interface is provided to the user; otherwise, a warning of insufficient permissions is returned.
[0036] The second step of the present invention is specifically as follows: according to the number of users n in the current permission group, a bit array length s and k independent hash functions are given. The bit array contains m counters, each counter consists of x bits. During the initialization process, the above values need to be defined.
[0037] There are two mutually exclusive conditions in the selection of the number of hash functions k: if the number of hash functions is too large, the probability of getting 0 when querying an element that does not belong to the set is high; conversely, if the number of hash functions is small, there will be more 0s in the bit array. Since our goal is to minimize the Bloom filter error, we put k into the error rate estimation expression, and minimize this formula to get the best value of k:
[0038] k=-lnp / ln2
[0039] Based on the number of users n and the number of hash functions k, we can calculate the number of counters:
[0040] m=kn / ln2
[0041] In addition, we need to determine the length x of each counter. From the perspective of use, the larger the counter, the better, because the larger the counter, the more information it can represent. However, the larger the counter, the more resources it occupies, and in many cases, it will cause a huge waste of space. Therefore, when choosing a counter, you should try to choose the smallest length possible while meeting the requirements.
[0042] The probability that a counter value is greater than or equal to i can be described by the following formula:
[0043]
[0044] The function Pr() represents the probability of the expression in the brackets occurring. Here, it means the probability that the count in counter is greater than i. max(c) represents the maximum count value of counter. Substituting the expression for k in the above text, we get:
[0045]
[0046] Assume that counter is allocated 4 bits, then when the value of counter reaches 16, it overflows with the following probability:
[0047] Pr(max(c)≥16)≤1.37×10 -15 ×m
[0048] This value is small enough, so selecting x = 4 can meet most business requirements to a certain extent. Finally, the length of the bit array can be calculated based on the percentage of counters and the number of counters.
[0049] After initialization, use k hash functions to hash the user IDs belonging to the permission group to obtain k integers, and increase the corresponding counter in the array by 1.
[0050] Step 3, specifically: when the user accesses the data, query whether the user is in the corresponding permission group for the permission applied by the user. Use the above k hash functions to calculate k hash values for the user ID, and query the corresponding counter bits in the array. If all counter bits are greater than or equal to 1, it is considered that the user has the application permission and the corresponding data is distributed to the user. Otherwise, the user's application is rejected.
[0051] To delete user permissions, you only need to use k hash functions to calculate k hash values for the user ID and subtract 1 from the corresponding counter position in the array.
[0052] The embodiment provides a cloud-network data trusted sharing authentication method based on Bloom filter, which can effectively improve the authentication efficiency, reduce the storage volume of permission records, and ensure data security. Bloom filter is a very long binary vector and a series of random mapping functions, which can be used to retrieve whether an element is in a set, and is often used for big data query optimization. Compared with other data structures, Bloom filter has huge advantages in space and time. The storage space and insertion / query time of Bloom filter are constants. In addition, hash functions have no relationship with each other, which is convenient for parallel implementation by hardware. Bloom filter does not need to store the element itself, which has advantages in some occasions with very strict confidentiality requirements.
[0053] In addition, the introduction of Bloom filters in the original blockchain data sharing authentication method for optimization does not change its management method and security access control mode. It only optimizes the storage structure and specific authentication logic, so it does not affect the trustworthiness of the original solution.
[0054] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and improved concepts of the present invention within the technical scope disclosed by the present invention, and they should be covered by the protection scope of the present invention.
Claims
1. A cloud-network-end data trusted sharing authentication method based on Bloom filter, characterized in that: include: S1: Acquire shared data and establish an authentication strategy; the shared data includes shared information provided by the data publisher and relevant information of the data applicant; The relevant information of the data applicant includes access permission group, user ID and user identity information; the access permission group is provided by the data publisher; S2: Obtain the bit data length and the number of hash functions corresponding to the relevant information of the data applicant, construct a Bloom filter according to the authentication strategy, and generate a smart contract; Obtaining the bit data length and number of hash functions corresponding to the relevant information of the data applicant, including: The bit data length and the number of hash functions corresponding to the current permission group are obtained; the bit data length is the number of data applicants; the bit array includes m counters; the relationship between the hash function and the number of data applicants is expressed as follows: k=-lnp / ln2 Wherein, k represents the number of the hash functions; The counter counter is composed of x bits; the calculation expression of x is: m=kn / ln2 Wherein, n represents the number of data applicants in the current bit array; max(c) represents the maximum count value of the counter; Pr() represents the probability of occurrence of the expression in the brackets; m represents the number of counters; S3: obtaining the data applicant information for accessing the shared data; the corresponding Bloom filter in the smart contract determines the access rights of the data applicant; if the data applicant has access rights, providing a data interface to the data applicant.
2. According to the Bloom filter-based cloud-network-end data trusted sharing authentication method of claim 1, it is characterized by: The Bloom filter is a counting Bloom filter.
3. According to the Bloom filter-based cloud-network-end data trusted sharing authentication method of claim 1, it is characterized by: Each of the permission groups corresponds to each of the Bloom filters.
