Ciphertext data search method and system based on overlapping clustering

Through the ciphertext data search method based on overlapping clustering and blockchain, the problem of insufficient efficiency and accuracy of ciphertext data search in the existing technology is solved, and efficient, safe and credible ciphertext data search is realized, which is suitable for Large-scale and frequently updated data scenarios.

CN118779496AActive Publication Date: 2024-10-15SHANDONG COMP SCI CENTNAT SUPERCOMP CENT IN JINAN +1

Patent Information

Application Number
CN202411000294.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-24
Publication Date
2024-10-15
Estimated Expiration
2044-07-24

AI Technical Summary

Technical Problem

Existing searchable encryption technology has shortcomings in the accuracy of single keyword search, low efficiency of large-scale ciphertext search, difficulty in dynamic update of search index, and the relevance and credibility of search results, especially when the data volume is large and frequently updated. In this scenario, it is difficult to achieve efficient and accurate ciphertext data search.

Method used

Using a ciphertext data search method based on overlapping clustering, combined with overlapping K-means clustering, blockchain and attribute-based encryption technology, a dynamically updated search index is generated, and efficient ciphertext search is achieved through clustering preprocessing and consensus verification. Supports multi-keyword search, and uses smart contracts to monitor data changes and automatically update the index.

Benefits of technology

It improves the efficiency and accuracy of ciphertext search, ensures the security and credibility of data, supports fine-grained access control, ensures the relevance and reliability of search results, and dynamically adjusts the trust of cloud servers to improve computing reliability. Credibility.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118779496A_ABST
    Figure CN118779496A_ABST
Patent Text Reader

Abstract

The invention discloses a ciphertext data search method and system based on overlapping clustering, and belongs to the technical field of data security and privacy protection. According to the method, clustering preprocessing operation is performed according to the abstracts of the data sets before ciphertext search, the similar data sets are gathered together, and the multi-keyword search index is generated, so that the search range is narrowed, and the search efficiency is improved; according to the technical scheme, the block chain, attribute encryption, strategy hiding and other technologies are combined, efficient and credible multi-keyword ciphertext search and fine-grained access authorization are achieved, complete hiding of access strategies and dynamic updating of search indexes are supported, search results are optimally sorted according to relevancy, and the efficiency and accuracy of ciphertext search are improved. The problem that the accuracy and efficiency of existing data resource searching need to be improved is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data security and privacy protection, and in particular to a ciphertext data search method and system based on overlapping clustering. Background Art

[0002] The statements in this section merely mention background art related to the present invention and do not necessarily constitute prior art.

[0003] With the rapid development of new generation information technology, the amount of data generated by people has increased dramatically, resulting in the inability of local storage space to meet the growing demand for data storage. More and more institutions and individuals choose to outsource data storage to third-party institutions such as cloud computing centers to effectively reduce the storage costs of data owners and promote data sharing.

[0004] However, outsourced data storage and sharing face security risks such as data leakage. In order to ensure the security of outsourced data, data owners usually adopt the strategy of encrypting data locally before outsourcing storage to prevent sensitive information leakage. However, ciphertext storage brings new challenges to data sharing. It is difficult for data requesters to find the desired data set directly through keyword search. For this reason, searchable encryption technology came into being. It allows data requesters to search ciphertexts through specific keywords to find the target ciphertext data set, thereby achieving secure data sharing.

[0005] In order to prevent malicious users from obtaining original data through searchable encryption technology and causing sensitive information leakage, scholars have proposed an attribute-based searchable encryption method, which allows only users who meet the access policy to obtain the original data while realizing ciphertext search. Since its access policy is either explicit plaintext or partially hidden, the attributes of the data requester still face the security risk of information leakage. In addition, the current searchable encryption still has the following problems:

[0006] (1) Single keyword search is not accurate enough, which can easily lead to poor matching between search results and actual needs.

[0007] (2) The efficiency of large-scale ciphertext search drops sharply. As the number of data sets continues to increase and data resources become richer, it may be difficult for data requesters to accurately find all data sets closely related to keywords even if they spend a lot of time, which not only affects the search efficiency but also the accuracy of the search results.

[0008] (3) The problem of dynamic update of search index. As time goes by, the data set will also change. Its initial search index may not be updated in real time or can only be updated by reconstruction, which will affect the search efficiency and even make it difficult to quickly obtain search results.

[0009] (4) The relevance of search results. Since the ciphertext data resources are huge, if the search results are not sorted from high to low according to relevance, it is difficult for data requesters to quickly find ciphertext data sets that are highly relevant to the search keywords.

[0010] (5) The credibility of search results: Because the third-party server that performs the search may not be completely honest, it is difficult to guarantee the credibility of the search results.

[0011] Currently, the method of encrypting data first, outsourcing storage, and then publishing data resources on the chain for data sharing has become a common way of secure data sharing. This method combines the advantages of data encryption and blockchain technologies to ensure the security and credibility of shared data. Data requesters can search for the required data set on the blockchain based on the data set summary published on the chain. However, since there may be too many ciphertext data sets that meet the search conditions, it is difficult to accurately find the required data set, and the accuracy and efficiency of data resource search needs to be improved. Summary of the invention

[0012] In order to address the deficiencies of the prior art, the present invention provides a ciphertext data search method, system, electronic device, computer-readable storage medium and computer program product based on overlapping clustering, which combines overlapping clustering, blockchain and attribute-based encryption technology to achieve efficient ciphertext search.

[0013] In a first aspect, the present invention provides a ciphertext data search method based on overlapping clustering;

[0014] A ciphertext data search method based on overlapping clustering, comprising:

[0015] Based on the preset algorithm, the search parameters are generated according to the search keyword set and sent to the cloud server, and the data usage request is sent to the blockchain;

[0016] Obtain the ciphertext hash address set corresponding to the target ciphertext data set and download the target ciphertext data set, and use the preset private key to decrypt and obtain the corresponding plaintext data;

[0017] Among them, the ciphertext hash address set is obtained by the cloud server after searching the ciphertext data set according to the search parameters and the preset search index and sorting the relevance; the search index is generated and dynamically updated by the cloud server based on the data provided by the data owner, using the clustering smart contract to perform overlapping clustering preprocessing; the relevance sorting is performed after the blockchain responds to the data use request and passes the attribute verification.

[0018] In some implementations, the ciphertext data set is generated by the data proprietor by encrypting the owned data set according to the generated access policy vector in combination with the attribute-based searchable encryption technology;

[0019] The ciphertext data set is stored in the cloud server, and the access policy vector set, hash value set, ciphertext data set cloud storage hash address and data summary corresponding to the ciphertext data set are uploaded to the blockchain by the data proponent.

[0020] In some embodiments, the search index is generated by the cloud server assigning clustering preprocessing tasks to computing nodes under the blockchain based on data provided by the data owner, and the computing nodes perform clustering preprocessing operations on the data summaries published on the blockchain using overlapping K-means clustering.

[0021] In some implementations, the performing clustering preprocessing operation using overlapping K-means clustering specifically includes:

[0022] Randomly select multiple data sets as the initial cluster centers, calculate the correlation between each data set and the cluster center and perform normalization to obtain the normalized correlation;

[0023] According to the normalized correlation, the data set is assigned to multiple cluster centers; the positions and covariance matrices of the cluster centers are updated according to the assignment results, and the number of effective members of each cluster is calculated until the convergence condition is met.

[0024] In some embodiments, the relevance ranking is determined by the cloud server based on a relevance score of the search keyword, where the relevance score is generated by the cloud server based on a term frequency-inverse document frequency value fed back by the data owner and a search parameter sent by the data requester.

[0025] In some embodiments, the target ciphertext dataset is a ciphertext dataset verified by consensus;

[0026] The consensus verification is the verification of the search results and sorting results by the cloud server using a practical Byzantine fault-tolerant consensus algorithm, and rewards and punishes the nodes performing consensus verification based on a trust reward and punishment mechanism.

[0027] In a second aspect, the present invention provides a ciphertext data search system based on overlapping clustering;

[0028] A ciphertext data search system based on overlapping clustering, comprising a client and a cloud server;

[0029] The client generates search parameters based on a preset algorithm and a search keyword set and sends the search parameters to the cloud server, and sends a data use request to the blockchain; the cloud server searches for a ciphertext data set based on the search parameters and a preset search index, and sorts the relevance to obtain a ciphertext hash address set corresponding to the target ciphertext data set; the client obtains the ciphertext hash address set corresponding to the target ciphertext data set and downloads the target ciphertext data set, and uses a preset private key to decrypt and obtain the corresponding plaintext data;

[0030] Among them, the search index is generated and dynamically updated by the cloud server using a clustering smart contract to perform overlapping clustering preprocessing based on the data provided by the data owner; the correlation calculation is performed after the blockchain responds to the data use request and passes the attribute verification.

[0031] In a third aspect, the present invention provides an electronic device;

[0032] An electronic device comprises a memory, a processor and a computer program stored in the memory, wherein the processor executes the computer program to implement the steps of the above-mentioned ciphertext data search method based on overlapping clustering.

[0033] In a fourth aspect, the present invention provides a computer-readable storage medium;

[0034] A computer-readable storage medium stores a computer program / instruction thereon, which, when executed by a processor, implements the steps of the overlapping clustering-based ciphertext data search method described in the claim.

[0035] In a fifth aspect, the present invention provides a computer program product;

[0036] A computer program product includes a computer program / instruction, which implements the steps of the above-mentioned ciphertext data search method based on overlapping clustering when executed by a processor.

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

[0038] 1. The technical solution provided by the present invention uses the overlapping k-means clustering algorithm to perform clustering preprocessing on the data set and generate a search index, supports the same data set to belong to multiple clusters, and ensures the meticulousness and accuracy of the clustering results. When performing a ciphertext search operation, the corresponding search index can be quickly located according to the search keyword, narrowing the search scope and greatly improving the efficiency and accuracy of the ciphertext search.

[0039] 2. The technical solution provided by the present invention sorts the search results according to their relevance to the search keywords, so that the data requester can quickly determine the data set he needs without spending time to understand the relevance of each data set.

[0040] 3. The technical solution provided by the present invention combines technologies such as attribute encryption, inner product function and blockchain to achieve complete hiding of fine-grained access control and access policies, ensure the security of shared data, solve the problem of plaintext attribute leakage, and protect the user's identity privacy.

[0041] 4. The technical solution provided by the present invention supports multi-keyword search and uses smart contracts to monitor changes in ciphertext data sets to automatically update the search index, solving the problem of search index update and being more flexible in application scenarios with large data scale and frequent updates.

[0042] 5. The technical solution provided by the present invention uses blockchain instead of a trusted third party, and uses smart contracts to verify user attributes in the access authorization stage, thereby avoiding risks such as third-party manipulation and improving the security and reliability of access authorization; blockchain is used to verify and reach consensus on ciphertext search results and sorting results, and to conduct trust evaluation on cloud servers, thereby achieving dynamic adjustment of cloud server revenue, incentivizing cloud servers to provide high-quality services, and improving the credibility of computing. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0044] Figure 1 A schematic diagram of a flow chart of a ciphertext data search method based on overlapping clustering provided in an embodiment of the present invention;

[0045] Figure 2 A schematic diagram of data interaction of a ciphertext data search method based on overlapping clustering provided in an embodiment of the present invention;

[0046] Figure 3 A schematic diagram of the system architecture of a ciphertext data search system based on overlapping clustering provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0047] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used in the present invention have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0048] It should be noted that the terms used herein are only for describing specific embodiments, and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that the terms "include" and "have" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0049] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.

[0050] Embodiment 1

[0051] The number of ciphertext data sets stored in the blockchain is large, and the corresponding ciphertext data sets that meet the search conditions are also large, resulting in the need to improve the efficiency of existing ciphertext data searches and the accuracy of search results; therefore, the present invention provides a ciphertext data search method based on overlapping clustering, which combines clustering preprocessing, blockchain, and policy hiding technologies to achieve efficient and reliable multi-keyword ciphertext search and fine-grained access authorization, thereby improving the performance and accuracy of ciphertext search.

[0052] Next, combine Figure 1-Figure 3 , a ciphertext data search method based on overlapping clustering disclosed in this embodiment is described in detail. The ciphertext data search method based on overlapping clustering, applied to a data requester, comprises the following steps:

[0053] S1. Based on a preset algorithm, search parameters are generated according to the search keyword set and sent to the cloud server, and a data usage request is sent to the blockchain; wherein the search parameters include the search trap and the corresponding weight ratio of multiple keyword sets corresponding to the search keyword set.

[0054] For example, the data requester u enters the search keyword set Q locally u =kw1A…Akw g Λ…Akw G (1≤g≤G) and public parameter pk, generate search trap door T u , and set the corresponding weight ratio of multiple keyword sets to search for trapdoor T u It is expressed as:

[0055] TrapGen(Q u ,pk)→T u ;

[0056] The corresponding weight ratio of multiple keyword sets is expressed as:

[0057] α u =α1:…:α g :…:α G .

[0058] Then, the search trapdoor T u And the weight ratio α corresponding to the multi-keyword set u Sent to the cloud server to request a ciphertext search.

[0059] The nodes that need to interact with data when executing the overlapping clustering-based encrypted data search method include the data requester (client), cloud server, data advocate, and blockchain. Before executing step S1, an initialization operation is required. As an implementation method, the specific process is as follows:

[0060] Step 1: Initialize the blockchain, including:

[0061] (1) Authoritative node election.

[0062] Blockchain nodes use the Practical Byzantine Fault Tolerance (PBFT) consensus algorithm to elect a node as the attribute authority node AU.

[0063] (2) Smart contract deployment.

[0064] Deploy clustering smart contracts, index dynamic update smart contracts and attribute verification smart contracts on the blockchain.

[0065] Smart contracts are automated protocols that run on the blockchain. When used in practice, smart contracts will automatically execute agreed operations.

[0066] The clustering smart contract is used to receive data summaries from data owners, store them on the blockchain, and trigger the smart contract to complete the clustering task of the data summaries; the index dynamic update smart contract is used to generate a search index for the data summary of each cluster after clustering, and automatically trigger the clustering smart contract to perform dynamic update of the search index when the data summary of the data owner changes; the attribute verification smart contract is used to verify the attributes of the data requester before returning the searched data to the data requester.

[0067] (3) System initialization.

[0068] The security parameter λ and attribute domain AF are input into the attribute authority node AU to generate the system parameter pk and master key msk, which can be expressed as:

[0069] Setup(λ,AF)→{pk,msk}.

[0070] Step 2: Generate a key.

[0071] Specifically, the system parameter pk, the master key msk and the attribute set s of the data requester u are u The input attribute authority node AU executes the key generation algorithm to generate the private key sk of the data requester u u , expressed as:

[0072] KeyGen(pk, msk, s u )→sk u .

[0073] Step 3: Data owner l owns each data set m l,q Generate access policy vector, data summary, encrypt data, store ciphertext and publish on the chain. The specific process is as follows:

[0074] Step 301: Generation of access strategy vector:

[0075] Specifically, the data owner l is each of his own data sets m l,q Set access policy l,q =(A l,q , ρ l,q , τ l,q ), convert the access policy into an access policy vector using the one-hot encoding method That is, generate access strategy vector set for all data sets of data owner l Where 1≤l≤L, L represents the number of data owners, 1≤q≤N l , N l Indicates the number of data sets owned by each data owner l, A l,q is the dataset m of data owner l l,q The attribute matrix, T l,q is the attribute set, ρ l,q To establish the attribute matrix A l,q With the attribute set τ l,q The mapping relationship between them.

[0076] For example, in a medical scenario, the data set m of data owner l l,q The attribute matrix Attribute set τ l,q ={"Department: Cardiology","Doctor's Title: Deputy Chief Physician","Unit: Hospital","Unit: Research Institute","Title: Researcher"}, mapping relationship ρ l,q ={("Department: Cardiology"∩"Title: Deputy Chief Physician"∩"Unit: Provincial Hospital")∪("Unit: Cardiovascular Research Institute"∩"Title: Researcher)}, only when the attributes of the data requester satisfy the access policy P l,qMedical information related to heart disease is only available when the patient is asked to leave the hospital.

[0077] Step 302: Data owner l is responsible for each data set m he owns. l,q Generate data summary Abs l,q , expressed as:

[0078] AbsGen(m l,q ) → Abs l,q .

[0079] Step 303: Data owner l uses public parameter pk, master key msk and access policy vector set All your data sets Encryption generates a collection of ciphertext data sets The corresponding hash value set It is expressed as:

[0080]

[0081] Step 304: Ciphertext storage: Store(CT l )→addr l .

[0082] Specifically, data owner l uploads all his ciphertext datasets CT l The cloud server receives the set of ciphertext data sets CT uploaded by the data owner l. l , store and return its cloud storage hash address At the same time, when a new ciphertext data set is added, the set of ciphertext data sets is updated to CT′.

[0083] Step 305: Data release:

[0084] Specifically, data owner l accesses the policy vector set Hash value set H l 、The cloud storage hash address of the ciphertext dataset addr l and Data Summary Abs l,q Data summary set Abs l Upload to the blockchain and publish data resources centrally; it also allows data owners to publish a single ciphertext data set at any time.

[0085] Step 4: Cluster and generate search index:

[0086] Specifically, the clustering algorithm parameter K is input into the cloud server, and the cloud server calls the clustering smart contract to perform the clustering preprocessing task; the clustering smart contract delegates the computing task to the computing node under the blockchain, and the computing node uses the Overlapping K-means clustering (OKM) algorithm to perform clustering preprocessing operations on the data summaries corresponding to the ciphertext data sets published on all blockchains, and assigns the ciphertext data sets to one or more clusters j (j=1, 2, ..., K). After completing the task, the results are uploaded to the chain for verification and recording.

[0087] As an implementation method, the computing node performs the following operations:

[0088] 1) Initialization.

[0089] Specifically, randomly select K data summary sets x i As the initial cluster center c j , each cluster center has a corresponding covariance matrix ∑j, which represents the distribution of the data summary set of the cluster.

[0090] 2) Calculate the correlation.

[0091] Specifically, calculate each data summary set x i With cluster center c j The correlation formula is as follows:

[0092]

[0093] Among them, P(x i |c j ) represents the data summary set x i The association degree of cluster j, d is the dimension of the data summary set, ∑ j is the covariance matrix of cluster j.

[0094] 3) Normalized correlation.

[0095] Specifically, for each data set x i , normalizing its association with all clusters to ensure that the sum is 1:

[0096]

[0097] 4) Assign data summary sets to cluster centers.

[0098] Specifically, according to the normalized correlation P(x i |c j ), the data summary set is assigned to multiple cluster centers so that the sum of the associations assigned to different clusters is 1, and a data summary set is in multiple clusters.

[0099] For example, if P(x i |c1)=0.5,P(x i |c2)=0.2,P(x i |c3)=0.3, then we can think that the data set x i Assigned to clusters 1, 2, and 3.

[0100] 5) Update cluster centers and covariance matrices.

[0101] Specifically, the position and covariance matrix of each cluster center are updated according to the allocation results, and the number of effective members of each cluster is calculated:

[0102]

[0103] Where N is the total number of data summary sets. Update the cluster center based on the weighted average of all data summary sets:

[0104]

[0105] Then, the covariance matrix ∑j of each cluster is calculated, which represents the distribution shape and range of the data summary set in cluster j. The update steps are as follows:

[0106]

[0107] Among them, (x i -c j )(x i -c j ) T is the data summary set x i With cluster center c j The outer product of the difference vectors between them.

[0108] 6) Clustering is completed. Repeat steps 3)-5) until the cluster center and covariance matrix reach the maximum number of iterations, that is, the convergence condition is met, and clustering is completed.

[0109] 7) Search index generation. After grouping the data sets into different clusters, a search index I is generated for each cluster j. j With index metadata The search indexes generated by all clusters will be composed of the index set I and the index metadata set IndInfo, where the index metadata By index identifier Timestamp and index stores hash address composition.

[0110] An index is a data structure used to accelerate data retrieval and query. A cluster is a collection of data summaries with similar contents. In this embodiment, the data ID of each data summary under the cluster and the keywords contained therein are combined to form a search index to facilitate search queries using keywords.

[0111] Index metadata is additional information that describes and manages the index. It consists of the index's unique identifier, the index's storage address, the timestamp of index creation and update, and the cluster that generated the index. Index metadata can improve index query efficiency and maintain index consistency.

[0112] Furthermore, to ensure the accuracy and timeliness of the search index, the cloud server calls the index dynamic update smart contract to automatically monitor data changes; when a new ciphertext data set is added, the index dynamic update smart contract and clustering smart contract are triggered to automatically update and generate a new search index. The search index dynamic update is expressed as:

[0113] IndUpdate(I,CT′).

[0114] S2. Obtain the ciphertext hash address set corresponding to the target ciphertext data set and download the target ciphertext data set, and use the preset private key to decrypt and obtain the corresponding plaintext data.

[0115] In this embodiment, the ciphertext hash address is obtained by the cloud server searching the ciphertext data set according to the search trap and the preset search index and sorting the ciphertext data set for relevance; the relevance sorting is performed after the blockchain performs attribute verification in response to the data use request.

[0116] Furthermore, the specific process is as follows:

[0117] (1) The cloud server obtains the latest multi-keyword encrypted search index set I from the blockchain, finds the ciphertext data set that meets the requirements in the ciphertext data resource according to the search trap, and uses the search index to find the ciphertext data set SerData containing the search keyword of the data requester u u .

[0118] Specifically, the cloud server compares the trapdoor with the encrypted keywords in the search index. If the trapdoor matches an index entry, it meets the query requirements. Then, the cloud server finds the ciphertext data set that meets the requirements in the ciphertext data resource based on the corresponding data ID information in the index.

[0119] In combination with the above steps, the keyword "fever" is used as an example for further explanation. The keyword "fever" is input, the keyword is encrypted with a key, a trapdoor is generated, and the trapdoor is sent to the cloud server. The cloud server receives the trapdoor, searches for matching entries in the encrypted search index, and obtains the ID information corresponding to all entries containing "fever". Then, the cloud storage hash address is found based on the ID information, thereby extracting the corresponding ciphertext data set from the ciphertext data resource.

[0120] (2) Data requester u initiates a data usage request to the blockchain, triggering the attribute verification smart contract; the attribute verification smart contract converts the attributes of data requester u into vectors and the corresponding access strategy vector Perform matching verification. If the verification passes, output 'Y', indicating that the access right is granted; otherwise, output 'No', indicating that the access right is denied. After the attribute access authorization passes, execute step (3).

[0121] Specifically, each attribute is mapped to a vector, each attribute corresponds to a binary bit, 1 indicates that the attribute is present, and 0 indicates that the attribute is not present. By calculating the inner product of the attribute vector and the strategy vector, if the inner product is equal to the number of 1s in the strategy vector, the match is considered successful.

[0122] For example, the attribute vector of an internal medicine physician can be represented as: [doctor, nurse, internal medicine, surgery], then after vectorization it is [1,0,1,0]. At the same time, the access strategy is also in the form of a vector. The access strategy is doctor AND internal medicine, then after vectorization it is [1,0,1,0].

[0123] The product of the attribute vector and the access policy is 1*1+0*0+1*1+0*0=2, and the number of 1s in the policy vector is 2, so the match is successful and the access permission is satisfied.

[0124] (3) Calculate the TF-IDF value:

[0125] Specifically, the data owner l uses the TF-IDF algorithm to search for the trap door T sent by the cloud. u And the searched ciphertext data set, calculate each search keyword kw g of The value is then returned to the cloud server.

[0126] For example, the specific process is as follows:

[0127] (301) Calculate each keyword kw g The frequency TF and inverse document frequency IDF are calculated as follows:

[0128]

[0129] The first formula represents the keyword kw g In the ciphertext dataset t s The frequency of occurrence in g,s Indicates the keyword kw g In the ciphertext dataset t s The number of occurrences in m η g,s Represents the ciphertext dataset t s The second formula is used to calculate the number of all entries in the keyword kw g IDF value of , where |D| represents the total number of ciphertext data sets, |g,s:d g ∈t s | indicates that the keyword kw is included g The number of ciphertext data sets.

[0130] (302) Calculate the keyword kw g of The value is fed back to the cloud server.

[0131] Specifically, the data owner l calculates the key words kw in the ciphertext data set g of value:

[0132]

[0133] (4) Relevance ranking:

[0134] The cloud server returns the data according to the owner l Calculate the weight ratio α based on multiple keyword sets u The relevance score u , and without leaking the searched ciphertext dataset SerData i In the case of content, the search results are sorted according to their relevance scores. The specific steps of the sorting operation are as follows:

[0135] (401) Calculate the relevance score u :

[0136]

[0137] (402) According to the calculated relevance score u The cloud server sorts the search results from high to low scores to obtain the sorted ciphertext data set SortData u .

[0138] In order to ensure the consistency and reliability of data, it further includes:

[0139] (403) The cloud server requests consensus verification of the search results and sorting results.

[0140] Specifically, the cloud server uses the PBFT consensus algorithm to randomly select sample data and send it to the blockchain's master node Node z , master node z Receive verification requests and broadcast them to each secondary node f , and is responsible for instructing all nodes to perform verification operations and compare the verification results with the results submitted by the cloud server.

[0141] Under the PBFT framework, even if there are some malicious nodes, as long as more than two-thirds of the nodes verify the same result, the consistency and correctness of the data can be ensured, and the result can be regarded as reliable and valid. After the consensus verification is successful, execute steps (404) and (405).

[0142] (404) The cloud server returns the sorted ciphertext data set SortData u The corresponding data summary is given to the data requester u, who selects the data he needs from the sorted ciphertext data set, namely the target ciphertext data set, and its data content remains confidential.

[0143] (405) The trustworthiness of the cloud server is evaluated based on a trust-based reward and punishment mechanism.

[0144] After the cloud server's consensus verification is completed, all consensus verification nodes jointly calculate the trust score and final revenue. If more than two-thirds of the nodes agree that the data is valid, the trust score will increase and more revenue will be obtained. Otherwise, the verification failure result will be returned, and the cloud server's credit score will be reduced and revenue will be penalized.

[0145] The reward and punishment mechanism based on trust is expressed as:

[0146] Among them, B is a constant, including the bonus value B up and minus value B down , It is a coefficient that changes with the number of times the cloud is verified, including the bonus coefficient and reduction factor And B and All are set by the cloud server user. The range is (0,9], The range is (0,90). The range of the current trust score TS and the historical trust score HTS is [TS min ,TS max]=[40,100], in the next trust evaluation, the current trust score TS will be updated to the new historical trust score HTS; it should be noted that when the trust score is lower than 40, it is necessary to consider the network security and consider replacing the server.

[0147] The trust score calculation formula is as follows:

[0148] when As the trust score increases, it indicates the following:

[0149]

[0150] Among them, β1, β2, and β3 represent the weights of the factors affecting the trust score, including response time, verification success rate, and historical trust score. Initially it can be set to 1 and increase with the number of successful verifications. max The maximum trust score threshold.

[0151] when When the trust score decreases, it means the following:

[0152]

[0153] in, Initially set to 1, and gradually increases with the number of verification failures, TS min is the minimum trust score threshold, nr is the ratio of the number of agreed nodes to the number of all nodes.

[0154] The calculation formula for income rewards and penalties is expressed as:

[0155] E=max(E min ,E0·[1+θ·(TS-HTS)]),

[0156] Among them, E and E0 are the final income and basic income respectively, E min It is the minimum profit value set to prevent the final profit from being negative. θ∈(0,1), θ is the profit coefficient set by the user, and TS-HTS represents the difference between the latest trust score after the result verification and the historical trust score. The final profit of the cloud server will be affected by the trust score. If the cloud server performs well, the profit will increase and get rewards, otherwise, the profit will decrease and get penalties.

[0157] (5) The data requester obtains the target search result: Return (GoalData u )→{addr l ,H l}.

[0158] Specifically, the cloud server returns the target ciphertext dataset GoalData selected by the data requester u u All cloud storage hash addresses addr l .

[0159] (6) Data requester u decrypts the plaintext data: Dec(GoalData u ,addr l ,sk u ).

[0160] Specifically, the data requester u selects the ciphertext hash address set addr according to his needs. l Download the ciphertext dataset GoalData u , and use the private key sk u Decrypt to obtain the corresponding plaintext data.

[0161] Embodiment 2

[0162] Combination Figure 1-Figure 3 The present embodiment discloses a ciphertext data search system based on overlapping clustering, including a client, a cloud server and a blockchain. The client is used by the data owner to generate access policy vectors and data summaries, complete data set encryption, and publish ciphertext data resources and other information; the data requester inputs a search trap to submit a search request, defines a keyword weight ratio to achieve sorting of search results, submits a data usage request to complete attribute verification, and decrypts to obtain plaintext data; the cloud server is used to store the ciphertext data set sent by the data owner through the client, return its cloud storage hash address, perform multi-keyword ciphertext search, perform optimal sorting of search results based on keyword relevance, request the blockchain to perform consensus verification on the search and sorting results, and finally return the target ciphertext data set to the data requester through the client; the blockchain is used to elect a node as the attribute authority node AU through a consensus algorithm to be responsible for system initialization, generate system parameters and keys and deploy smart contracts, store information such as the cloud storage hash address of the ciphertext data set, allow the call of smart contracts to perform clustering preprocessing tasks, monitor data changes to trigger index dynamic update and attribute verification, set verification nodes to perform consensus verification on cloud server search results and sorting results, and perform trust evaluation on the cloud server according to the consensus results to realize an effective reward and punishment mechanism.

[0163] As an implementation method, the steps of searching for ciphertext data based on the above-mentioned ciphertext data search system based on overlapping clustering are as follows:

[0164] 1. Initialization: Setup(λ,AF)→{pk,msk}.

[0165] 1) Authoritative node election. Blockchain nodes use the PBFT consensus algorithm to elect a node as the attribute authority AU.

[0166] 2) Smart contract deployment: Deploy clustering smart contracts, index dynamic update smart contracts, and attribute verification smart contracts on the blockchain.

[0167] 3) System initialization: AU inputs security parameter λ and attribute field AF to generate system parameter pk and master key msk.

[0168] 2. Key generation: KeyGen(pk,msk,s u )→sk u .

[0169] AU executes the key generation algorithm, inputting the system parameter pk, the master key msk and the attribute set s of the data requester u u , generate the private key sk of the data requester u u .

[0170] 3. Access strategy vector generation:

[0171] The data owner l uses the client to create a new instance of each data set m for himself. l,q Set access policy l,q =(A l,q ,ρ l,q ,τ l,q ), convert the access policy into an access policy vector using the one-hot encoding method That is, generate access strategy vector set for all data sets of data owner l Where 1≤l≤L, L represents the number of data owners, 1≤q≤N l , N l Indicates the number of data sets owned by each data owner l, A l,q is the dataset m of data owner l l,q The attribute matrix, τ l,q is the attribute set, ρ l,q To establish the attribute matrix A l,q With the attribute set τ l,q For example, in a medical scenario, the data set m of the data owner l l,q The attribute matrix Attribute set τ l,q ={"Department: Cardiology","Doctor's Title: Deputy Chief Physician","Unit: Hospital","Unit: Research Institute","Title: Researcher"}, mapping relationship ρ l,q ={("Department: Cardiology"∩"Title: Deputy Chief Physician"∩"Unit: Provincial Hospital")∪("Unit: Cardiovascular Research Institute"∩"Title: Researcher)}, only when the attributes of the data requester satisfy the access policy P l,q Medical information related to heart disease is only available when the patient is asked to leave the hospital.

[0172] 4. Data summary generation: AbsGen(m l,q )→Abs l,q .

[0173] The data owner l uses the client to create a new dataset m for each data set m he owns. l,q Generate data summary Abs l,q .

[0174] 5. Data encryption:

[0175] The data owner l uses the public parameter pk, the master key msk and the access policy vector set through the client All your data sets Encryption generates a collection of ciphertext data sets The corresponding hash value set

[0176] 6. Ciphertext storage: Store(CT l )→addr l .

[0177] Data owner l uploads all his ciphertext data sets CT through the client l The cloud server receives the set of ciphertext data sets CT uploaded by the data owner l. l , store and return its cloud storage hash address At the same time, when a new ciphertext data set is added, the set of ciphertext data sets is updated to CT′.

[0178] 7. Data Release:

[0179] The data owner l sends the access policy vector set to the client Hash value set H l 、The ciphertext dataset cloud storage hash address addr l and Data Summary Abs l,q Data summary set Abs l Upload to the blockchain and publish data resources centrally; it also allows data owners to publish a single ciphertext data set at any time.

[0180] 8. Clustering and generating search index:

[0181] The cloud server inputs the clustering algorithm parameter K and calls the clustering smart contract to perform clustering preprocessing tasks; the clustering smart contract delegates the computing tasks to the computing nodes under the blockchain. The computing nodes use the overlapping K-means clustering (OKM) algorithm to perform clustering preprocessing operations on the data summaries of all data sets published on the blockchain, and assign the data sets to one or more clusters j (j = 1, 2, ..., K). After completing the task, the results are uploaded to the chain for verification and recording. The computing nodes perform the following operations:

[0182] 1) Initialization. Randomly select K data summary sets x i As the initial cluster center c j , each cluster center has a corresponding covariance matrix ∑ j , represents the distribution of the data set of this cluster.

[0183] 2) Calculate the association degree. Calculate each data summary set x i With cluster center c j The correlation formula is as follows:

[0184]

[0185] Where d is the dimension of the dataset, ∑ j is the covariance matrix of cluster j.

[0186] 3) Normalized correlation.

[0187] For each data summary set x i , normalizing its association with all clusters to ensure that the sum is 1:

[0188]

[0189] 4) Assign data summary sets to cluster centers.

[0190] According to the normalized correlation P(x i |c j ), distribute the data summary set to multiple cluster centers, where P(x i |c j ) represents the data summary set x i The association degree of belonging to cluster j.

[0191] 5) Update cluster centers and covariance matrices.

[0192] According to the allocation results, the position and covariance matrix of each cluster center are updated, and the number of effective members of each cluster is calculated:

[0193]

[0194] Where N is the total number of data summary sets.

[0195] Update the cluster centers based on the weighted average of all data summary sets:

[0196]

[0197] Then, the covariance matrix ∑ of each cluster is calculated j , which represents the distribution shape and range of the data summary set in cluster j. The update steps are as follows:

[0198]

[0199] Among them, (x i -c j )(x i -c j ) T is the data summary set x i With cluster center c j The outer product of the difference vectors between them.

[0200] 6) Clustering is completed. Repeat steps 3)-5) until the cluster center and covariance matrix reach the maximum number of iterations, that is, the convergence condition is met, and clustering is completed.

[0201] 7) Search index generation. After grouping the data summary sets into different clusters, a search index I is generated for each cluster j. j With index metadata The search indexes generated by all clusters will be composed of the index set I and the index metadata set IndInfo, where the index metadata By index identifier Timestamp and index stores hash address composition.

[0202] 9. Dynamic update of search index: IndUpdate(I,CT′).

[0203] To ensure the accuracy and timeliness of the search index, the cloud server calls the index dynamic update smart contract to automatically monitor data changes; when a new ciphertext data set is added, the smart contract is triggered to automatically update and generate a new search index.

[0204] 10. Generate search trap: TrapGen (Q u ,pk)→T u .

[0205] Data requester u enters the search keyword set Q on the client u =kw1Λ…Λkw g Λ…Λkw G (1≤g≤G) and public parameter pk, generate search trap door T u, and set the corresponding weight ratios of multiple keyword sets:

[0206] α u =α1:...:α g :...:α G ,

[0207] Send it to the cloud server and request a ciphertext search.

[0208] 11. Ciphertext search: Search(T u ,I)→SerData u .

[0209] The cloud server obtains the latest multi-keyword encrypted search index set I from the blockchain, finds the ciphertext data set that meets the requirements in the ciphertext data resource according to the search trap, and uses the search index to find the ciphertext data set SerData containing the search keyword of the data requester u u .

[0210] 12. Attribute Verification:

[0211] Data requester u initiates a data usage request to the blockchain, triggering the attribute verification smart contract; the attribute verification smart contract converts the data requester's attributes into vectors and the corresponding access strategy vector Perform matching verification. If the verification passes, output 'Y', indicating that access permission is granted; otherwise, output 'No', indicating that access is denied.

[0212] 13. Calculate TF-IDF value:

[0213] After the attribute access authorization is passed, the data owner l uses the TF-IDF algorithm to search the trap door T sent by the cloud. u And the searched ciphertext data set, calculate each search keyword kw g of value and finally returns it to the cloud.

[0214] 1) The calculation formulas for frequency TF and inverse document frequency IDF are as follows:

[0215]

[0216]

[0217] The first formula represents the keyword kw g In the dataset t s The frequency of occurrence in g,s Indicates the keyword kw g In the dataset ts The number of occurrences in m η g,s Represents the data set t s The second formula is used to calculate the number of all entries in the keyword kw g IDF value of |D|, where |g,s:d g ∈t s | indicates that the term kw is included g The number of data sets.

[0218] 2) Calculate the keyword kw g of The data owner l calculates the value of the keyword kw in the data set through the client. g of value:

[0219]

[0220] 14. Result sorting:

[0221] The cloud server returns the TF-IDF value based on the data owner l. kwg , calculate the relevance score based on keywords u , and without leaking the searched ciphertext dataset SerData u In the case of content, according to its relevance score and keyword weight ratio α u Sort the search results. The specific steps of the sorting operation are as follows:

[0222] 1) Calculate the relevance score u :

[0223]

[0224] 2) Search results are sorted according to the calculated relevance score u The cloud server sorts the search results from high to low scores to obtain the sorted ciphertext data set SortData u .

[0225] 3) Consensus verification. The cloud server requests consensus verification of search results and sorting results, uses the PBFT consensus algorithm, randomly selects sample data and sends it to the master node Node z The master node receives the verification request and broadcasts it to each slave node f, and is responsible for instructing all nodes to perform verification operations and compare the verification results with the results submitted by the cloud server. Under the PBFT framework, even if there are some malicious nodes, as long as more than two-thirds of the nodes verify the same results, the consistency and correctness of the data can be ensured, and the results can be regarded as reliable and valid.

[0226] 4) Return the sorting result. After the consensus verification is successful, the cloud server returns the sorted ciphertext data set SortData u The corresponding data summary is given to the data requester u, and the data content remains confidential.

[0227] 15. Reward and punishment mechanism based on trust:

[0228] After the cloud server's consensus verification is completed, all consensus verification nodes jointly calculate the trust score and final revenue. If more than two-thirds of the nodes agree that the data is valid, the trust score will increase and more revenue will be obtained. Otherwise, the verification failure result will be returned, and the cloud server's credit score will be reduced and revenue will be punished. Among them, nr is the ratio of the number of agreed nodes to the total number of nodes, B is a constant, including the bonus value B up and minus value B down , It is a coefficient that changes with the number of times the cloud is verified, including the bonus coefficient and reduction factor And B and All are set by the cloud server user. The range is (0,9], The range is (0,90). The range of the current trust score TS and the historical trust score HTS is [TS min ,TS max ]=[40,100], in the next trust evaluation, the current trust score TS will be updated to the new historical trust score HTS; it should be noted that when the trust score is lower than 40, it is necessary to consider the network security and consider replacing the server.

[0229] 1) Trust score calculation formula:

[0230] when As the trust score increases, it indicates the following:

[0231]

[0232] Among them, β1, β2, and β3 represent the weights of the factors affecting the trust score, including response time, verification success rate, and historical trust score. Initially it can be set to 1 and increase with the number of successful verifications. maxThe maximum trust score threshold.

[0233] when When the trust score decreases, it means the following:

[0234]

[0235] in, Initially set to 1, and gradually increases with the number of verification failures, TS min is the minimum trust score threshold.

[0236] 2) Income reward and punishment calculation formula:

[0237] E=max(E min ,E0·[1+θ·(TS-HTS)]),

[0238] Among them, E and E0 are the final income and basic income respectively, E min It is the minimum profit value set to prevent the final profit from being negative. θ∈(0,1), θ is the profit coefficient set by the user, and TS-HTS represents the difference between the latest trust score after the result verification and the historical trust score. The final profit of the cloud server will be affected by the trust score. If the cloud server performs well, the profit will increase and get rewards, otherwise, the profit will decrease and get penalties.

[0239] 16. Get the target search results: Return (GoalData u )→{addr l ,H l}.

[0240] The cloud server returns the target ciphertext dataset GoalData selected by the data requester u u All cloud storage hash addresses addr l .

[0241] 17. Decrypt plaintext data: Dec(GoalData u ,addr l ,sk u ).

[0242] The data requester u receives the encrypted hash address set addr through the client l Download the ciphertext dataset GoalData u , and use the private key sk u Decrypt to obtain the corresponding plaintext data.

[0243] Embodiment 3

[0244] Embodiment 3 of the present invention provides an electronic device, including a memory and a processor, and computer instructions stored in the memory and executed on the processor. When the computer instructions are executed by the processor, the steps of the above-mentioned ciphertext data search method based on overlapping clustering are completed.

[0245] Embodiment 4

[0246] Embodiment 4 of the present invention provides a computer-readable storage medium for storing computer instructions. When the computer instructions are executed by a processor, the steps of the above-mentioned ciphertext data search method based on overlapping clustering are completed.

[0247] Embodiment 5

[0248] Embodiment 5 of the present invention provides a computer program product, including a computer program / instruction, which implements the steps of the above-mentioned ciphertext data search method based on overlapping clustering when executed by a processor.

[0249] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of 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 produce 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.

[0250] 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.

[0251] These computer program instructions can also be loaded onto a computer or other programmable data processing device, and a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide 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.

[0252] The description of each embodiment in the above embodiments has different emphases. For parts not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0253] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. Ciphertext data search method based on overlapping clustering, It is characterized in that include: Based on the preset algorithm, the search parameters are generated according to the search keyword set and sent to the cloud server, and the data usage request is sent to the blockchain; Obtain the ciphertext hash address set corresponding to the target ciphertext data set and download the target ciphertext data set, and use the preset private key to decrypt and obtain the corresponding plaintext data; Among them, the ciphertext hash address set is obtained by the cloud server after searching the ciphertext data set according to the search parameters and the preset search index and sorting the relevance; the search index is generated and dynamically updated by the cloud server based on the data provided by the data owner, using the clustering smart contract to perform overlapping clustering preprocessing; the relevance sorting is performed after the blockchain responds to the data use request and passes the attribute verification.

2. The ciphertext data search method based on overlapping clustering as claimed in claim 1, It is characterized in that The ciphertext data set is generated by the data proponent according to the generated access policy vector and combining the attribute-based searchable encryption technology to encrypt the owned data set; The ciphertext data set is stored in the cloud server, and the access policy vector set, hash value set, ciphertext data set cloud storage hash address and data summary corresponding to the ciphertext data set are uploaded to the blockchain by the data proponent.

3. The ciphertext data search method based on overlapping clustering as claimed in claim 1, It is characterized in that The search index is generated by the cloud server according to the data provided by the data owner, by assigning the clustering preprocessing task to the computing node under the blockchain, and by the computing node performing the clustering preprocessing operation on the data summary published on the blockchain using overlapping K-means clustering.

4. The ciphertext data search method based on overlapping clustering as claimed in claim 3, It is characterized in that The clustering preprocessing operation performed using overlapping K-means clustering specifically includes: Randomly select multiple data sets as the initial cluster centers, calculate the correlation between each data set and the cluster center and perform normalization to obtain the normalized correlation; According to the normalized correlation, the data set is assigned to multiple cluster centers; the positions and covariance matrices of the cluster centers are updated according to the assignment results, and the number of effective members of each cluster is calculated until the convergence condition is met.

5. The ciphertext data search method based on overlapping clustering as claimed in claim 1, It is characterized in that The relevance ranking is determined by the cloud server based on the relevance score of the search keyword, and the relevance score is generated by the cloud server according to the word frequency-inverse document frequency value fed back by the data owner and the search parameters sent by the data requester.

6. The ciphertext data search method based on overlapping clustering as claimed in claim 1, It is characterized in that The target ciphertext data set is a ciphertext data set that has passed consensus verification; The consensus verification is the verification of the search results and sorting results by the cloud server using a practical Byzantine fault-tolerant consensus algorithm, and rewards and punishes the nodes performing consensus verification based on a trust reward and punishment mechanism.

7. Ciphertext data search system based on overlapping clustering, It is characterized in that Including client and cloud server; The client generates search parameters based on a preset algorithm and a search keyword set and sends the search parameters to the cloud server, and sends a data use request to the blockchain; the cloud server searches for a ciphertext data set based on the search parameters and a preset search index, and sorts the relevance to obtain a ciphertext hash address set corresponding to the target ciphertext data set; the client obtains the ciphertext hash address set corresponding to the target ciphertext data set and downloads the target ciphertext data set, and uses a preset private key to decrypt and obtain the corresponding plaintext data; Among them, the search index is generated and dynamically updated by the cloud server using a clustering smart contract to perform overlapping clustering preprocessing based on the data provided by the data owner; the correlation calculation is performed after the blockchain responds to the data use request and passes the attribute verification.

8. An electronic device comprising a memory, a processor and a computer program stored in the memory, It is characterized in that The processor executes the computer program to implement the steps of the ciphertext data search method based on overlapping clustering according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program / instructions stored thereon, It is characterized in that When the computer program / instruction is executed by a processor, the steps of the ciphertext data search method based on overlapping clustering described in any one of claims 1 to 6 are implemented.

10. A computer program product comprising a computer program / instructions, It is characterized in that When the computer program / instruction is executed by a processor, the steps of the ciphertext data search method based on overlapping clustering described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Ciphertext retrieval method

    CN103927340A

  • Correlation detection method and device for web page search keywords

    CN104391958A

  • Fuzzy keyword search method oriented to multi-server and multi-user

    CN108062485A

  • Efficient verifiable multi-keyword sequencing searchable encryption method supporting preference search and logic search

    CN108388807A

  • Semantic-based multi-keyword sorting search privacy protection system and method

    CN108647529A

Cited By

  • Intelligent obstetrical nursing screening auxiliary system

    CN119964811A

  • Extra-high voltage equipment full-chain data trusted sharing system based on block chain

    CN121567478A

  • Blockchain-based ultra-high voltage equipment full-chain data trusted sharing system

    CN121567478B