A ciphertext retrieval system, method, computer device and storage medium

By combining attribute-based encryption and the Word2Vec model, a weighted policy tree and document index were designed, which solved the challenges of data privacy and access control in cloud computing, and realized an efficient, flexible and secure encrypted retrieval system that supports dynamic permission management.

CN115309861BActive Publication Date: 2026-01-27SHENZHEN TECH UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210871895.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-22
Publication Date
2026-01-27
Estimated Expiration
2042-07-22

AI Technical Summary

Technical Problem

In the existing cloud computing environment, there are challenges to the privacy and security of user data and reliable access control. Traditional searchable encryption technologies are time-consuming and inflexible, and cloud servers cannot be fully trusted, which affects data security and retrieval efficiency.

Method used

By employing Attribute-Based Encryption (ABE) technology, and through the collaborative work of data owners, data users, authorization centers, and cloud servers, a weighted strategy tree and a Word2Vec model are designed to generate document indexes, enabling efficient and secure encrypted retrieval.

Benefits of technology

It achieves efficient, flexible, and secure searchable encryption in a cloud environment, supports dynamic updates of user permissions, and ensures data privacy and reliable access control.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115309861B_ABST
    Figure CN115309861B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of ciphertext search system, method, computer equipment and storage medium, it is related to the field of encryption technology, the system is by data owner, data user, authority authentication center and cloud server 4 parts are made up of, also include access control module, index generation module and CP-ABE encryption module, access control module is used to improve access structure based on attribute-based encryption, and the weight strategy tree of weight strategy based on attribute-based encryption is designed.The present application ensures the security and reliability of cloud environment, with reliable, efficient, flexible searchable encryption performance of characteristic, weight strategy based on attribute-based encryption is improved design, corresponding algorithm is carried out;Design module and generation algorithm based on Word2Vec model, attribute-based encryption algorithm based on ciphertext search;Efficient and accurate search is thus realized;Dynamic updating operation to user authority is realized, a high-efficiency and safe DWC-SW scheme is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of encryption technology, and in particular to a encrypted text retrieval system, method, computer device, and storage medium. Background Technology

[0002] Cloud computing, in essence, operates distributed computing, theoretically providing unlimited data storage and computing power. However, users have limited control over data stored in the cloud, especially sensitive user data, which requires robust privacy and reliable access control in business operations. Searchable encryption technology enables the searching of user information within cloud servers under encrypted conditions. While traditional searchable encryption technologies can provide data protection and retrieval features, several key issues must be considered. First, the common vector-based traversal retrieval process is time-consuming. Second, users need to search for data related to specific keywords, potentially leading to frequent changes in user permissions. Finally, cloud servers are not entirely secure, necessitating robust data security. Furthermore, other objective factors, such as third-party influences, affect cloud data security and retrieval efficiency.

[0003] Attribute-based encryption (ABE) is essentially an improvement on identity-based encryption, incorporating user attributes to expand the scope of identity recognition. This results in greater efficiency, flexibility, and security, effectively serving real-world scenarios such as the healthcare industry and website information exchange. Therefore, to ensure the security and reliability of cloud environments, researching searchable encryption solutions with reliable, efficient, and flexible characteristics is of paramount importance. It also holds significant significance and application value for solving cloud security challenges and advancing the development of cloud environments. Summary of the Invention

[0004] The purpose of this invention is to provide a encrypted text retrieval system, method, computer device, and storage medium to solve cloud security problems.

[0005] To achieve the above objectives, the present invention provides the following technical solution:

[0006] In a first aspect, embodiments of the present invention provide a encrypted retrieval system, comprising four parts: a data owner (DO), a data user (DU), an authorized authority (AA), and a cloud service provider (CSP). The data owner determines the access policy and accesses the data encryption policy, and uploads encrypted data to the cloud server. The data user submits a retrieval request and receives a pre-decrypted encrypted text returned by the cloud server. The authorized authority is configured with parameters by the data owner and authorizes the return of a generated private key based on the request submitted by the data user. The cloud server receives encrypted files and an attribute-file index retrieval table, and, based on the retrieval request sent by the data user, pre-decrypts the plaintext data and sends the pre-decrypted encrypted text to the data user.

[0007] As a further aspect of the present invention, the data owner is the original data owner, who is used to determine the access policy and access the data encryption policy, and upload the encrypted data to the cloud server;

[0008] The data user is used to request ciphertext. When only one set of attributes that satisfies the ciphertext access permission is available, the ciphertext is decrypted to obtain the plaintext.

[0009] The authorization authentication center is used to perform attribute authentication based on the identity attribute characteristics of the authorized user;

[0010] The cloud server is responsible for storing encrypted data. When a user or data owner accesses a file, the cloud server operates on the stored data according to the request.

[0011] As a further aspect of the present invention, the data owner sends the encrypted ciphertext set and the corresponding file index vector set to the cloud server, and constructs an access control table-document retrieval table on the cloud server side, and transmits the set access permissions to the access authentication center.

[0012] The data user is used to send the application for search authentication to the authorization authentication center, obtain the authentication result, construct a search token, and send a search request to the cloud server. The authentication result contains a private key.

[0013] The cloud server is used to perform searches, and the results obtained after using the search table are transmitted to the data user, who then decrypts the data to obtain plaintext data.

[0014] As a further aspect of the present invention, the encrypted retrieval system further includes an access control module, an index generation module, and a CP-ABE encryption module;

[0015] The access control module is used to improve the access structure based on attribute-based encryption, and to design a weight policy tree based on the weight policy of attribute-based encryption. The access control module uses the CP-ABE algorithm for data encryption.

[0016] The index generation module is used to generate a document index based on the Word2Vec model, employing the Word2Vec model and secure inner product operations.

[0017] The CP-ABE encryption module includes an algorithm model, which comprises an initialization algorithm, a key generation algorithm, an encryption algorithm, an index generation algorithm, a token generation algorithm, a search algorithm, a pre-decryption algorithm, and a decryption algorithm.

[0018] As a further aspect of the present invention, the vector structure of the weight policy tree designed in the access control module is optimized by vectorizing the weight policy tree and then homomorphically encrypting it, resulting in three parts of the ciphertext:

[0019] The first part is the optimized topic strategy tree: the vectorized ciphertext of {"attribute" and / or "attribute"};

[0020] The second part is the weight corresponding to the attribute class: attribute: {"sub-attribute & weight", ...} ciphertext;

[0021] The third part is the ciphertext set corresponding to the strategy weights: the ciphertext of {"strategy weights & document set", ...}.

[0022] As a further aspect of the present invention, the access control module is used to design the vector structure of the weight policy tree, including the following steps:

[0023] The user uploads a search request vector and sends it to the cloud server. The cloud server then performs homomorphic matching on the user's search request vector and the second part of the weight strategy vector: the ciphertext corresponding to the attribute class weight.

[0024] After ciphertext matching using the weighted strategy in the first part on the cloud server, the set of identity attributes corresponding to the determined search user is subjected to logical operations on the access structure, so that the logical AND / OR calculation is implemented through homomorphic operations;

[0025] The ciphertext of the weight policy vector is combined with the given set of attribute weight values. all ={ω1、、、ω n The algorithm performs homomorphic computation and calculates similarity with the ciphertext set defined in the weight strategy vector in Part 3, returning Value = W. search The return value is the corresponding ciphertext set index on the document index table, and a ciphertext search is performed on the document index table.

[0026] As a further aspect of the present invention, the index generation module includes a Word2Vec model, which is trained using a dataset and constructed by the data owner through the execution of KeyGen, DSInfer, and Encrypt algorithms to build the encrypted retrieval system.

[0027] Secondly, embodiments of the present invention provide a encrypted text retrieval method. Based on the encrypted text retrieval system, the encrypted text retrieval method includes the following steps:

[0028] The data owner sets parameters through the authorization center and calls the initialization Setup(1) function. λ The function retrieves relevant parameters;

[0029] The Encrypt() function is used to encrypt the ciphertext on the local server. The Indexgen() function generates a corresponding document index for each ciphertext. Then, an attribute-document index retrieval table is built using a set of attributes.

[0030] Search users request a private key from the authentication center, which then issues the private key with specified personal identity attributes to the search user through the KeyGen() function.

[0031] Search users generate search trapdoors using the Trapdoor() function with relevant parameters and send them to the cloud server.

[0032] The cloud server matches the attribute-document index table by calling the Search() function to determine the top-k sorted set of ciphertext. The cloud server then performs the Pre-Decrypt() function on the ciphertext, returns an intermediate value to the search user, and calls the Decrypt() function to perform local calculations to obtain the plaintext.

[0033] As a further aspect of the present invention, the initialization algorithm Setup(1) λ → (PK,MK), construct a bilinear group G0 with a group order of prime number p, and Let η be a random value, g be a generator, and e be a bilinear mapping: G0×G0→G r Define a hash function: H0:{0,1} * →G0 and H1:{0,1} * →G zp In group G zp Select three random numbers a, b, c ∈ G zp :

[0034] Public key:

[0035] Master key: MK = {a, b, c}.

[0036] As a further aspect of the present invention, the key generation algorithm KeyGen(MK,S) is... id ,PK)→(SK (S,id) The authorization center AA generates the user's private key; the user applies for the user attribute set S using the master private key MK. id First, perform a public key PK, then output the user's private key SK. (S,id) Generate random numbers. And for all attributes in the attribute set S, i.e. Get random numbers The calculation yields:

[0037] Private key:

[0038] As a further aspect of the present invention, the index generation algorithm Indexgen(PK,S,W)→(In w The attribute set S of DO is constructed into the access vector L corresponding to the permission. A latent semantic vector space (LSA) based on TF-IDF is constructed for the keyword set W in the plaintext set, which is decomposed into the document vector set corresponding to the plaintext. The two are then constructed into an attribute-file index table, which is uploaded to the cloud CSP after homomorphic fuzzy data processing. The index-related parameters are uploaded to the AA authorization center. The parameters here are used in the calculation when DU applies to AA for retrieval vector groups.

[0039] As a further aspect of the present invention, the encryption algorithm Encrypt(PK,M,A)→(CT): obtains ciphertext CT using plaintext M, access policy A, and public key PK, including the following steps:

[0040] By encrypting the plaintext by the data owner, choose Then, the calculations yielded the following results:

[0041]

[0042] Construct an access strategy tree T using access structure A. Starting from the root node of the tree, traverse any node i in the access tree and select a polynomial q. i and conforms to q i =d-1, for the root node T0 of the tree, r0∈G zp ,make Let Y be the set of all leaf nodes in the policy tree T, then we can calculate:

[0043]

[0044] The set of generated keywords W in the latent semantic model is calculated, and a random value r is selected. i ∈G zpFor any key w∈W, the following calculation holds:

[0045]

[0046] The encrypted content is as follows:

[0047] Ciphertext:

[0048] As a further aspect of the present invention, the token generation algorithm Trapdoor(w,S) (S,id) The search token generation algorithm (R)→(TR) is run by the local servers of AA and DU. It requests relevant parameters from AA and performs local calculations on DU. The token generation algorithm uses the keyword set w and the attribute set SK of DU. (S,id) The searchable keyword tree R outputs the search token TR and sends it to the CSP.

[0049] Thirdly, embodiments of the present invention provide a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the above-described encrypted text retrieval method.

[0050] Fourthly, embodiments of the present invention also provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the above-described encrypted text retrieval method.

[0051] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects:

[0052] The encrypted retrieval system, method, computer equipment, and storage medium provided by this invention ensure the security and reliability of the cloud environment, possess reliable, efficient, and flexible searchable encryption performance, and feature an improved design based on an attribute-based encryption weight strategy, along with corresponding algorithms; a design module and generation algorithm based on the Word2Vec model, and an attribute-based encryption algorithm for encrypted retrieval; thereby achieving efficient and accurate retrieval; and enabling dynamic updating of user permissions, thus realizing a DWC-SW solution that provides high efficiency and security.

[0053] These or other aspects of this application will become more apparent from the following description of embodiments. It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the application. Attached Figure Description

[0054] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. In the drawings:

[0055] Figure 1 This schematic diagram illustrates a model of a encrypted retrieval system according to an exemplary embodiment of the present invention.

[0056] Figure 2 This illustration schematically shows an access weight strategy tree in a encrypted retrieval system according to an exemplary embodiment of the present invention.

[0057] Figure 3 This illustration schematically shows a vectorized access weight strategy tree in an ciphertext retrieval system according to an exemplary embodiment of the present invention.

[0058] Figure 4 This illustration schematically shows a Word2Vec system model in a encrypted text retrieval system according to an exemplary embodiment of the present invention.

[0059] Figure 5 This schematically illustrates a flowchart of the DWC-SW algorithm in a encrypted text retrieval method according to an exemplary embodiment of the present invention.

[0060] Figure 6 This schematically illustrates a cloud platform retrieval flowchart in an encrypted retrieval method according to an exemplary embodiment of the present invention.

[0061] Figure 7 A schematic diagram of the access policy tree constructed when encrypting the attributes of the ciphertext policy;

[0062] Figure 8 This is a schematic diagram of the Skip-Gram model in Word2Vec technology;

[0063] Figure 9 This is a hardware architecture diagram of a computer device according to one embodiment of the present invention.

[0064] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0065] The present application will now be further described in conjunction with the accompanying drawings and specific embodiments. It should be noted that, without conflict, the various embodiments or technical features described below can be arbitrarily combined to form new embodiments.

[0066] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.

[0067] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0068] The flowchart shown in the attached diagram is for illustrative purposes only and does not necessarily include all content and operations / steps, nor does it necessarily have to be performed in the order described. For example, some operations / steps can be broken down, combined, or partially merged, so the actual execution order may change depending on the actual situation.

[0069] To ensure the security and reliability of the cloud environment, it is of great research significance to study searchable encryption solutions with reliable, efficient and flexible characteristics through relevant technologies. This is also of great significance and application value for solving cloud security problems and promoting the development of the cloud environment.

[0070] The purpose of this invention is to provide a encrypted text retrieval system, method, computer device, and storage medium to solve the aforementioned cloud security problems.

[0071] The following detailed description of some embodiments of this application is provided in conjunction with the accompanying drawings. Unless otherwise specified, the following embodiments and features can be combined with each other.

[0072] See Figure 1 As shown, this embodiment of the invention provides a encrypted retrieval system, which consists of four parts: Data Owner (DO), Data User (DU), Authorized Authority (AA), and Cloud Service Provider (CSP).

[0073] The data owner determines the access policy and accesses the data encryption policy, and uploads the encrypted data to the cloud server; the data user submits a retrieval request and receives the pre-decrypted ciphertext returned by the cloud server; the authorization center is set by the data owner and authorizes the return of the generated private key according to the request submitted by the data user; the cloud server receives the encrypted file and the attribute-file index retrieval table, and pre-decrypts the plaintext data according to the retrieval request sent by the data user, and sends the pre-decrypted ciphertext of the plaintext data to the data user.

[0074] In this application, the Data Owner (DO) is the original data owner, who is responsible for determining the access policy and accessing the data encryption policy, and uploading encrypted data to the cloud server.

[0075] The Data User (DU) is used to request ciphertext. When it has only one set of attributes that satisfy the ciphertext access permission, it decrypts the ciphertext to obtain the plaintext.

[0076] The Authorized Authority (AA) is used to perform attribute authentication based on the identity attribute characteristics of the entrusting user.

[0077] The cloud server (CSP, Cloud Service Provider) is responsible for storing encrypted data. When a user or data owner accesses a file, it performs operations on the stored data according to the request.

[0078] In the encrypted text retrieval system of this invention, for Figure 1 The proposed solution model demonstrates the following process: The DO sends the encrypted ciphertext set and the corresponding file index vector set to the CSP, and the CSP constructs an access control table—a document retrieval table—transmitting the set access permissions to the AA. The DU then sends a search authentication request to the AA, obtains the authentication result (including the private key), constructs a search token, and sends a search request to the CSP. The CSP executes the search, uses the retrieval table, and transmits the resulting data to the DU, which decrypts to obtain the plaintext data.

[0079] In embodiments of this application, the encrypted retrieval system further includes an access control module, an index generation module, and a CP-ABE encryption module;

[0080] The access control module is used to improve the access structure based on attribute-based encryption, and to design a weight policy tree based on the weight policy of attribute-based encryption. The access control module uses the CP-ABE algorithm for data encryption.

[0081] The index generation module is used to generate a document index based on the Word2Vec model, employing the Word2Vec model and secure inner product operations.

[0082] The CP-ABE encryption module includes an algorithm model, which comprises an initialization algorithm, a key generation algorithm, an encryption algorithm, an index generation algorithm, a token generation algorithm, a search algorithm, a pre-decryption algorithm, and a decryption algorithm.

[0083] In an embodiment of the present invention, the vector structure of the weight policy tree designed in the access control module is optimized by vectorizing the weight policy tree and then homomorphically encrypting it, resulting in three parts of the ciphertext:

[0084] The first part is the optimized topic strategy tree: the vectorized ciphertext of {"attribute" and / or "attribute"};

[0085] The second part is the weight corresponding to the attribute class: attribute: {"sub-attribute & weight", ...} ciphertext;

[0086] The third part is the ciphertext set corresponding to the strategy weights: the ciphertext of {"strategy weights & document set", ...}.

[0087] In the embodiments of this application, the access control module is an improved design based on attribute-based encryption and a corresponding algorithm. The access control module improves the access structure through attribute-based encryption, designs a weighted policy tree, and specifically participates in the process of encrypted retrieval within the system.

[0088] The access control module forms a weighted policy vector. In the searchable encryption system of this application embodiment, the data encryption algorithm used is the CP-ABE algorithm. However, the access policy tree in most CP-ABE algorithms today generally cannot express the attributes of arbitrary states. To improve efficiency and security performance, and to suit actual cloud environments, a weighted policy tree optimization method is proposed.

[0089] Suppose that within a company, employees can be categorized by job title as: staff, manager, and department head. Assuming the weight values ​​for different employee roles are 1, 2, and 3, this can be represented as: "Staff: 1", "Staff: 2", and "Staff: 3". In practice, it can be transformed into: "Staff: Staff, Manager, Department Head". This model categorizes employee roles by assigning weights to each role within a category.

[0090] Based on the previous description, we design {(“Employee” or “Manager” or “Department Head”) and “Male”} as the access strategy logic expression for encrypting related data. The CP-ABE algorithm is used to call this access logic expression and encrypt the document. Based on the characteristics of the identity attribute classification design, corresponding weight values ​​are assigned, transforming the access control logic type to: {“Employee: 1” and “Male”}, because “Employee: 1” in the identity classification includes {“Employee: 2”, “Employee: 3”}. Specifically... Figure 2 As shown, an access weight strategy tree is constructed.

[0091] See Figure 2 As shown, it's clear from the above encryption methods that, under the same environment, weighting and categorizing the identity attributes in the access policy allows for more efficient access control. This is because, assuming the leaf nodes of the access policy's attribute class and the number of attributes within that node's attribute class are both n, then there are n possible encryption schemes using weighted attributes for logical verification. 2 There are 2n possible logic verifications. However, the CP-ABE encryption scheme only has 2n possible logic verifications.

[0092] In this threshold access structure, each weight value can be defined as a random number. Let... Figure 2 The access tree T transformed from the access policy tree T in the middle r ', whose root node is r, take a node that satisfies T r The set of weighted attributes S required by the access logic of ' is thus obtained as T. r '(S)=1. Therefore, if function T r In '(S), r is a non-leaf node, so only d r When all child nodes meet the weighted access logic requirements, T r The result of '(S)' is equal to 1. Similarly, if r is a leaf node, then when the weight value ω in the weight attribute set S is... r When the access logic requirements of the leaf node are met, T r The result of '(S)' is equal to 1. For example, a user has the attributes ("employee", "male"), where the weight of the employee attribute is ("2" or "3"), and this user also satisfies the access tree T' in the graph.

[0093] like Figure 3 As shown, taking the policy tree above as an example, the unoptimized policy tree is used to generate policies in a table, which can be simply represented as follows:

[0094] Strategy 1: {"Employees" and "Male"}

[0095] Strategy 2: {"Managers" and "Men"}

[0096] Strategy 3: {“Minister” and “Male”}

[0097] Matching users in this way requires a time complexity of O(n). However, using an optimized weighted strategy tree, the result is displayed in the table as follows:

[0098] Strategy: {("Employee" & "Weight") and "Male"}

[0099] Employees: Staff (1), Managers (2), Department Heads (3) [The numbers in parentheses indicate the weighting percentage]

[0100] Matching such users requires a time complexity of O(logn). As the number of matching information increases by n times, the retrieval time also increases by logn times, which is similar to the binary search pattern. However, the specific implementation still depends on the data owner DO's attribute settings for the weight strategy tree.

[0101] When the cloud-based document index set is matched, the matching at this point is related to the strategy tree. Figure 3Example of optimization tree T`: Due to the different weights of the three types of employees: {employee(1), manager(2), department head(3)}, users who conform to the policy tree can access different ciphertext locations. Here, the ciphertext set is divided according to the user's attribute weight.

[0102] Here is a brief introduction to the weighted policy tree vector ciphertext structure hidden by homomorphic encryption, as shown in Table 1:

[0103] Table 1 Weighting Strategy Tree Vector Structure

[0104]

[0105] To better understand the operations of the cloud server-side CSP on the user weight policy tree in Table 1, the vector structure of the weight policy tree in Table 1 will be used for illustration. For example... Figure 3 The optimized weight policy tree is vectorized and homomorphically encrypted, generating three parts: the first part is the vectorized ciphertext of the optimized topic policy tree: {"attribute" and / or "attribute"}; the second part is the ciphertext of the weight corresponding to the attribute class: attribute: {"sub-attribute & weight", ...}; and the third part is the ciphertext of the ciphertext set corresponding to the policy weight: {"policy weight & document set", ...}.

[0106] (1) Data users upload search application vectors and send them to the cloud server. The cloud server then performs homomorphic matching on the user's search application vector and the second part of the weight strategy vector: the attribute class corresponding weight ciphertext.

[0107] Value = ((hm.CT) attribute -hm.CT DU )r'p)modN

[0108] =((M) attribute -M token )r'p+2 k r'pq(r attribute -r token ))modN

[0109] =(M attribute -M token )r'p

[0110] Here, r'p is a common parameter given by the homomorphic encryption algorithm, used to test the homomorphic operation. Since the homomorphic parameter r'p ≠ 0, if Value = 0, this weighted policy corresponds to a user, meaning the user has permission to access data within the cloud server. Then, through the same homomorphic operation, the weight value Value = ω of the user's attribute set within the access policy class can be deduced. attribute .

[0111] (2) After the weight strategy ciphertext matching in the first part is completed on the cloud server, the calculated set of identity attributes corresponding to the search user is subjected to logical operations on the access structure, so that the logical AND / OR calculation is implemented through homomorphic operations. Then, the weight strategy vector ciphertext is compared with the given set of attribute weight values. all ={ω1、、、ω n The algorithm performs homomorphic computation, then performs similarity filtering calculations with the ciphertext set defined in the weight strategy vector of Part 3, and returns Value = W. search The return value is the index of the corresponding ciphertext set on the document index table. The next step is to perform a ciphertext search on the document index table.

[0112] In this process, the interaction, transmission, and computation of the user's sensitive data with the cloud server are encrypted throughout. No third party other than the user's local machine can access the plaintext data obtained by the user or the intermediate ciphertext returned by the cloud server.

[0113] In the access control module, the data encryption algorithm used is the CP-ABE algorithm. However, most current CP-ABE algorithms' access policy trees cannot represent attributes in arbitrary states. To improve efficiency and security performance, and to suit real-world cloud environments, a weighted policy tree optimization method is proposed.

[0114] See Figure 4 As shown, the proposed system scheme is described by employing a weighted strategy and homomorphic operations. The basic framework of this search scheme consists of three parts. The system scheme uses the CP-ABE access policy tree for weighting, and based on the generated document vector set, the Encrypt algorithm constructs an access control policy table and a document index table. Then, the DO executes the KeyGen algorithm to share the weighted policy-related parameters and the homomorphic public key with the DU. The data owner (DO) generates two index tables: Table 1, where the ciphertext (weighted form) generated by the weighted policy tree enables many-to-many control with the user; and Table 2, which controls the ciphertext set index. The data user (DU) generates a corresponding search token by executing the Trapdoor algorithm and sends it to the cloud server (CSP). The CSP first performs attribute policy matching on Table 1 using the Search algorithm. Only when the user's identity attributes match the policy ciphertext in the table can the user obtain search ciphertext permissions and access policy corresponding ciphertext ranges. The algorithm searches a defined range of ciphertext sets, performs fast matching using the index in Table 2, filters ciphertexts with high similarity, and returns intermediate ciphertexts due to the characteristics of the CP-ABE algorithm, thus shortening the time required to decrypt the user's local ciphertext and preventing plaintext leakage.

[0115] In the embodiments of this application, the weighted strategy model algorithm mainly describes the process of constructing and using the weighted strategy vector table-document index table, including the following stages:

[0116] Phase 1: System initialization, including weighting the access policy tree and vectorizing the policy:

[0117] Setup(1 λ → (PP): Initialization function, which is operated by the authoritative certification center AA. It outputs the common parameter PP through the parameter λ.

[0118] The authoritative certification center must first confirm the set of attributes S it manages. AA Furthermore, each attribute must be defined first, taking any attribute x∈S AA Calculate the numerical value of its attributes related to the key: E x =H(x) α ,α∈Z p Then release the public consultation document:

[0119] PP={e(g,g) α ,α∈S AA}

[0120] Setup(T Weight ,S)→(PP Weight ): Weighted policy tree vectorization, performed by DO, with the weighted policy tree T as input. Weight And an initial set of attributes S, where the set of attributes S requires S∈S AA .

[0121] According to tree T Weight Given the structure, starting from the root node d of the tree, traverse all possible paths and set T... Weight The corresponding possible decryption attribute set S (DO,d) Mapping to paths, i.e., S (DO,d) →index d , where index d The logical representation of the root node d. Based on the properties of the policy tree, it can be represented as DO attribute x∈S, i.e., through E. DO The (x) function assigns weights to all attributes. The actual weight calculation method varies depending on the environment of the policy tree; here, we use... Figure 5 The company model in the text uses the information weighting method, which quantifies the information of each attribute set in the model, turning information into quantifiable variables. The specific calculation formula is as follows:

[0122]

[0123] Then corresponding to T WeightConvert it into a weight policy vector structure, as shown in Table 5-1. Finally, output the weight policy vector I. Weight and weight parameter PP Weight ={E DO (x), x∈S}, PP Weight Send to AA.

[0124] Phase 2: Generate user private keys, including relevant weight parameters:

[0125] KeyGen(PP,PP Weight ,S id →SK w : Key generation function, here operated by the authoritative center AA. When a user requests a private key, the user attribute set S is input. id , where S id ∈S, through the common parameter PP and the weight parameter PP Weight , for DU attribute x∈S id E id,x =E x Then we can calculate:

[0126] E id,x =(pp Weight ) α *g α

[0127] Finally, the private key SK w Transmitted to the requesting user.

[0128] It is worth noting the calculated E id,x Under certain conditions, the user's corresponding attribute set is hidden, and it effectively replaces the corresponding attribute in the subsequent decryption process, thus realizing attribute hiding of the access strategy.

[0129] Phase 3: Data Encryption

[0130] The encryption function takes common parameters PP as input and a weighted policy tree T as input. Weight The plaintext M to be encrypted is encrypted in the same way as in Section 3.3.2. This is because the weighted policy tree T... Weight The essence of the access control tree remains unchanged; the main improvement lies in selecting the generation weight strategy vector.

[0131] Then, based on the known T Weight The strategy path, namely S (DO,d) →index d and E DO (x), x∈S, construct the weight policy vector structure in Table 5-1, i.e., weight policy vector I.Weight The vectors are categorized and combined, and their values ​​are hidden using homomorphic encryption to generate a weighted strategy vector table. weight Similarly, an index is built for each encrypted document. M Generate a document index table Finally, upload both tables. To the cloud server.

[0132] Phase 4: Data Retrieval. This phase primarily analyzes the matching operations of weighted strategy vectors during the process of users transmitting search tokens to the cloud server and retrieving encrypted data.

[0133] Trapdoor(w,PP Weight ,S id → (TR,V) Weight ): This operation is performed by the search user DO, who inputs the keyword w and the weight parameter PP. Weight User attribute set S id Here, we only consider the change of the access vector group V; the other search trapdoor parameters TR are the same as those in the generation operation in 3.3.2.

[0134] Generate an application vector based on the keyword set w, and request it from AA. This vector set contains the user attribute authorization vector I. (id,S) and keyword search vector I w .in

[0135] I (id,s) ={E id,x *e(g,g) α ,x∈S id}

[0136] Generate search trapdoors (TR) and weighted access vectors (V) for the specified matching content. Weight ={I (id,s) ,I w}

[0137] Search(TR,V Weight →CT': This is the retrieval operation, performed by the CSP cloud server. Input the search trapdoor TR and the weighted access vector V. Weight Accessing the dual-table structure, because the search user's V Weight and double table The attribute-related weight parameters within the array are all consistent, so V can be calculated based on homomorphic encryption. Weight and The secure inner product between secure indexes is used to retrieve the ciphertext within a specified range and return the ciphertext CT' with the highest relevance.

[0138] In embodiments of this application, the access control module is used to design the vector structure of the weight policy tree, including the following steps:

[0139] The user uploads a search request vector and sends it to the cloud server. The cloud server then performs homomorphic matching on the user's search request vector and the second part of the weight strategy vector: the ciphertext corresponding to the attribute class weight.

[0140] After ciphertext matching using the weighted strategy in the first part on the cloud server, the set of identity attributes corresponding to the determined search user is subjected to logical operations on the access structure, so that the logical AND / OR calculation is implemented through homomorphic operations;

[0141] The ciphertext of the weight policy vector is combined with the given set of attribute weight values. all ={ω1、、、ω n The algorithm performs homomorphic computation and calculates similarity with the ciphertext set defined in the weight strategy vector in Part 3, returning Value = W. search The return value is the corresponding ciphertext set index on the document index table, and a ciphertext search is performed on the document index table.

[0142] In embodiments of this application, the index generation module includes a Word2Vec model, which is trained using a dataset and constructed by the data owner through the execution of KeyGen, DSInfer, and Encrypt algorithms to build the encrypted retrieval system.

[0143] The basic process of the proposed system described in this application's search system, which employs the Word2Vec model and secure inner product operations, is as follows: Figure 4 As shown. The Word2Vec model in this system has been trained on a large-scale dataset (e.g., from Wikipedia), and then the system is built by executing the KeyGen, DSInfer, and Encrypt algorithms via DO.

[0144] The Document Analyzer (DO) constructs a document index vector using the Word2Vec model and homomorphically encrypts it into a document-index table. It then shares the Word2Vec model parameters and the homomorphic public key with the Analyzer (DU). The DU then sends a search trapdoor to the Control Center (CSP) by executing the Trapdoor algorithm, thus submitting a search request. The CSP then uses the Search algorithm to determine the encrypted search results and returns the ranking results to the DU.

[0145] Furthermore, unless there is a large number of file uploads, the performance reliability of the index generated by the Word2Vec model tends to be stable. This system model also supports dynamic updates of the cloud-based document-index table. Because the Word2Vec model index has a limited size and is supported by an improved homomorphic algorithm with low computational overhead, the computational cost of updating the table's index information remains consistent regardless of the number of files uploaded.

[0146] In the embodiments of this application, the model framework in the index generation module only considers the steps of using the Word2Vec model and how it is computed in the system. The detailed process is described below:

[0147] ①KeyGen(1 l(n) →SK': The DO generates a secure private key SK' = {S, g, M}, where S is a randomly generated m-bit vector, m is the feature proportion in the Word2Vec model, M is a randomly generated m x m invertible matrix, and g is the public data of the homomorphic algorithm for document set encryption, containing the public key and retrieval test parameters. SK' is shared only by the DU but is not protected by the CSP.

[0148] ②DSInfer(D)→DV: The Word2Vec model is pre-trained on a large dataset with a large dictionary that covers most of the vocabulary. It uses a neural network model to infer feature vectors for documents in the document set, and the dimension of these feature vectors is much smaller than the size of the document set dictionary.

[0149] Assuming the Word2Vec model uses m dimensions to represent document features, then DO obtains each document d in D. i m-dimensional feature vector DV i , where i takes values ​​ranging from the number of documents in the document set D. DV is normalized and used as a plaintext index for semantically aware search.

[0150] ③Encrypt(SK,DV)→(I): DO operates on DV with the corresponding parameters to obtain the document index I. For each document d in the document set D... i The process is as follows.

[0151] 1) The Document Doc (DO) uses a matrix M constructed from document vectors to perform index generation calculations on the Document Vectors (DV):

[0152] I i ={DV i *M T}

[0153] 2) DO uses a homomorphic algorithm to encrypt DV, while simultaneously generating a ciphertext set with plaintext 0: {x i :x i =2 n ri +pq i The ciphertext with 0 is selected from the ciphertext and added during encryption. According to homomorphic analysis, the ciphertext is not affected, which can obfuscate and hide the document vector keyword data.

[0154] After processing each document in document set D, an encrypted secure index I is obtained. Finally, DO will upload the document-index table to CSP and share SK' and Word2Vec model parameters with DU.

[0155] ④Trapdoor(w,SK)→TR:DU generates a search vector TR with the query keyword w by performing the following steps:

[0156] (1) DU inputs the keywords it retrieves into the Word2Vec model parameters. The Word2Vec model then uses a trained neural network to infer the feature vectors of the keywords. The normalized m-dimensional feature vector of the keyword set w is the plaintext query vector I. w .

[0157] (2) Similarly, DU uses a security matrix M to encrypt I. w Generate the search vector TR.

[0158] TR = {I w *M -1}

[0159] It can be proven through calculation that...

[0160] TR*I i

[0161] ={I w *M -1}*{DV i *M T}

[0162] =DV*I w

[0163] DV and I i These are the document feature vector and its security index.

[0164] Since the document vector and query vector were normalized previously, the system in this chapter can calculate the cosine distance between the two vectors, and the relevance of the document matching can be obtained with just a simple inner product operation.

[0165] ⑤ Search(TR,I)→DList: CSP uses the search token TR to perform similarity matching on the document vector set I. It calculates the top n most semantically similar ciphertexts and returns them as the search results DList. Finally, CSP returns DList to DU, ending the ranking search.

[0166] In embodiments of this application, the index generation module includes an overall encryption model framework and specific encryption algorithms. The CP-ABE encryption module includes an algorithm model, which comprises an initialization algorithm, a key generation algorithm, an encryption algorithm, an index generation algorithm, a token generation algorithm, a search algorithm, a pre-decryption algorithm, and a decryption algorithm.

[0167] The DWC-SW system algorithm flow is as follows: Figure 4 As shown: The data owner DO first sets parameters through AA and calls the initialization Setup(1) function. λ The function obtains relevant parameters, and then performs the Encrypt() function operation on the local server to encrypt the ciphertext. The Indexgen() function generates a corresponding document index for each ciphertext, and then builds an attribute-document index retrieval table based on the set of attributes. The search user first applies to the AA to obtain a private key, and the authorization center AA issues a private key with specified personal identity attributes to the search user through the KeyGen() function.

[0168] Search users generate a search trapdoor using the Trapdoor() function with relevant parameters and send it to the cloud server. The cloud server CSP calls the Search() function to match the attribute-document index table, determines the top-k sorted set of ciphertext, and then uses the powerful computing power of the cloud server to perform a Pre-Decrypt() operation on the ciphertext, returning an intermediate value to the search user. In this way, only a small amount of local computation is needed to call the Decrypt() function to obtain the plaintext.

[0169] Furthermore, data owners (DOs) can manipulate the attribute-document index table in the cloud through homomorphic operations, and can also perform attribute revocation operations in conjunction with the Authority Certification Authority (AA).

[0170] The functional modules of the encrypted text retrieval system of the present invention are as follows:

[0171] ① Initialization algorithm Setup(1) λ → (PK,MK): The algorithm constructs a bilinear group G0 with a group order of prime number p, and Let η be a random value, g be a generator, and e be a bilinear mapping: G0×G0→G r Define a hash function: H0:{0,1} *→G0 and H1:{0,1} * →G zp In group G zp Select three random numbers a, b, c ∈ G zp .

[0172] Public key:

[0173] Master key: MK = {a, b, c}

[0174] ② Key generation algorithm KeyGen(MK,S) id ,PK)→(SK (S,id) The user's private key is generated by the authorization center AA. This is achieved using the master private key MK and the requested user attribute set S. id (Attributes include identity information), public key PK, and then output user private key SK. (S,id) Generate random numbers. And for all attributes in the attribute set S, i.e. Get random numbers The calculation yields:

[0175] Private key:

[0176] ③ Index generation algorithm Indexgen(PK,S,W)→(In w L): The attribute set S of DO is constructed into an access vector L corresponding to the permissions, while a latent semantic vector space (LSA) based on TF-IDF is built for the keyword set W in the plaintext set, decomposed into document vector sets corresponding to the plaintext, and the two are constructed into an attribute-file index table. After homomorphic fuzzy data is uploaded to the cloud CSP, this process is as follows: Figure 6 Steps ① and ② are then performed. Finally, the index-related parameters are uploaded to the AA authorization center. These parameters are used in the calculation when DU requests the retrieval vector group from AA.

[0177] ④ Encryption algorithm Encrypt(PK,M,A)→(CT): This algorithm uses plaintext M, access policy A, and public key PK to obtain ciphertext CT. The algorithm implementation is as follows:

[0178] 1) By encrypting the plaintext by the data owner, select... Then, the calculations yielded the following results:

[0179]

[0180] 2) Construct an access strategy tree T using access structure A. Starting from the root node of the tree, traverse any node i in the access tree and select a polynomial q. i and conforms to q i=d-1, for the root node T0 of the tree, r0∈G zp ,make Let Y be the set of all leaf nodes in the policy tree T, then we can calculate:

[0181]

[0182] 3) Calculate the set of generated keywords W in the latent semantic model, and take a random value r. i ∈G zp For any key w∈W, the following calculation holds:

[0183]

[0184] Finally, the encrypted content was obtained as follows:

[0185] Ciphertext:

[0186] ⑤ Token generation algorithm Trapdoor(w,S) (S,id) The search token generation algorithm (R)→(TR) is run by the local servers of AA and DU. It requests relevant parameters from AA, and then DU performs local computation. This algorithm uses the keyword set w and the attribute set SK of DU. (S,id) The searchable keyword tree R is then output, followed by the search token TR, which is then sent to the CSP.

[0187] 1) DU traverses tree R to obtain the root node of tree R, and lets it be t∈G. zp The local server is configured to generate and store a random value d, and then calculate:

[0188] D pai =D t *h1 d =g t(ac-r) / b+ad

[0189] 2) By visiting the tree R, starting from the root node, traverse the tree to any node i, and select a polynomial q. i and conforms to q i =d-1, select the root node R0 of tree R, and let it be t∈G zp ,make set up Let R be the set of all leaf nodes in the policy tree R, then we have And perform the following encrypted calculations:

[0190]

[0191] 3) By taking a random value t j ∈G zp , For the attribute set, for all keywords The following calculations are all included:

[0192]

[0193] 4) Here, an application vector is generated based on the keyword set w, and an access vector group is requested from AA. This vector group contains the user attribute authorization vector I. (id,S) and keyword search vector I id .

[0194] Search token:

[0195] ⑥ Search algorithm Search(CT,TR,In) w ,L)→(1 / ⊥): such as Figure 6 As shown, the search algorithm is Figure 6 The intermediate operations in steps ③ and ④ involve the algorithm using the access vector group in the uploaded search token TR. The process involves verifying against the attribute-file index table in CSP to lock access permissions and the scope of ciphertext retrieval. Similarity inner product vectors can be calculated to determine the document's similarity. Then, a filter is applied to select ciphertexts that meet the requirements, generating a set of ciphertexts to be decrypted. During the ciphertext filtering process, based on the token parameters set in DU, the top-k matching ciphertext set can be selected. If a matching ciphertext is found, 1 is returned; otherwise, ⊥ is returned.

[0196] ⑦ Pre-decrypt algorithm Pre-Decrypt(CT,TR)→(M'): such as Figure 5 As shown, the pre-decryption algorithm is an intermediate operation in steps ④ and ⑤ of the diagram. The CSP will retrieve the ciphertext that meets the requirements, perform calculations, and return the intermediate ciphertext value to the search server.

[0197] 1) Begin pre-decryption operations on the retrieved ciphertext set:

[0198] If y is a leaf node in a given access structure A within the ciphertext CT, then define j = att(y). For any attribute j ∈ A, the intermediate values ​​are calculated as follows:

[0199]

[0200] If y is a non-leaf node of A, then we can set S... Z It is any k Z Given the set of child nodes z of the size, calculate the intermediate value using the following formula:

[0201]

[0202] If y is the root node, then the intermediate value is calculated as follows:

[0203]

[0204] 2) If x is a leaf node of a searchable tree R, let w = key(x) be the key associated with the hash function. For any attribute x∈R, the intermediate value is calculated as follows:

[0205]

[0206] If x is a non-leaf node of a searchable tree R, then we can set S... Z' It is any k Z' Given the set of child nodes z' of the size, we can then calculate the intermediate value using the following formula:

[0207]

[0208] If x is the root node, then return the intermediate value:

[0209]

[0210] Based on the two values, E y and E y’ Perform the corresponding formula calculations:

[0211]

[0212] The final intermediate value is then obtained:

[0213] ⑧ Decryption algorithm Decrypt(M',SK) (S,id) (M): Intermediate input result of the decryption algorithm The d value stored on the local server by the search party DO is calculated according to the formula:

[0214] Decrypting the plaintext:

[0215] Based on the encrypted text retrieval system, the encrypted text retrieval method includes the following steps:

[0216] The data owner sets parameters through the authorization center and calls the initialization Setup(1) function. λ The function retrieves relevant parameters;

[0217] The Encrypt() function is used to encrypt the ciphertext on the local server. The Indexgen() function generates a corresponding document index for each ciphertext. Then, an attribute-document index retrieval table is built using a set of attributes.

[0218] Search users request a private key from the authentication center, which then issues the private key with specified personal identity attributes to the search user through the KeyGen() function.

[0219] Search users generate search trapdoors using the Trapdoor() function with relevant parameters and send them to the cloud server.

[0220] The cloud server matches the attribute-document index table by calling the Search() function to determine the top-k sorted set of ciphertext. The cloud server then performs the Pre-Decrypt() function on the ciphertext, returns an intermediate value to the search user, and calls the Decrypt() function to perform local calculations to obtain the plaintext.

[0221] It should be noted that in attribute-based encryption of ciphertext policies, the ABE encryption algorithm has extensive business applications in real life, such as implementing distributed access management, online social networking, and private data encryption. However, it was Sahai et al., who further developed it, who added attribute characteristics to the theory of identity-based cryptography (IBC) to improve user identity security and privacy as well as authorization efficiency, enabling flexible authorization and access control. In 2007, Waters et al. first proposed the Attribute-Based Encryption of Ciphertext Policies (CP-ABE) algorithm. Compared with the original scheme, encryption algorithms that introduce attribute access control mechanisms can provide higher security performance and work efficiency, and have more flexible data confidentiality performance and access control capabilities. Therefore, the relevant theoretical definitions of the CP-ABE algorithm will be briefly explained.

[0222] In the CP-ABE encryption algorithm, the access structure is used to hide key decryption parameters in the logical expression of the structure. The leaf nodes of the policy tree are essentially attributes and their corresponding parameter values ​​set by the data owner. These are processed so that only when the accessing user's attribute set matches the trapdoor requirement can the node be decrypted, allowing access to the next level node. Non-leaf nodes are threshold nodes; the user must meet the minimum set of attributes required to reach that threshold value. Typically, in ABE schemes, the access structure is represented using an access policy tree.

[0223] exist Figure 7 As shown, the constructed access tree requires users to satisfy attributes that are confirmed based on the selected attribute set according to the threshold value before traversing the policy tree. When a user performs an access operation on ciphertext, if the user's own attribute set meets the threshold requirement (minimum requirement) of the policy tree, then access to the next higher threshold is possible. Access operations are performed sequentially until the final root node is reached, obtaining the encrypted information of that access tree.

[0224] The CP-ABE encryption algorithm primarily consists of four functions: Setup, KeyGen, Encrypt, and Decrypt. Additionally, a fifth algorithm, Delegate, is sometimes considered, as described below:

[0225] 1) System initialization (PK,MK) ← Setup(1 λ ): Randomization algorithm, which obtains public parameters PK and master key MK based on initial parameter λ.

[0226] 2) Key generation SK←KeyGen(MK,S): Based on the public parameter PK, the master key MK, and the user attribute set S, obtain the user's private key SK.

[0227] 3) Encryption algorithm CT←Encrypt(PK,M,A): Based on the common parameter PK, access the structure A and the plaintext M, encrypt M through A to obtain the ciphertext CT.

[0228] 4) Decryption algorithm M←Decrypt(CT,SK,PK): Based on the public parameter PK, the ciphertext CT and the user's private key SK, if the set of user attributes in the private key can meet the logical requirements of the access structure A, then decryption is possible; otherwise, decryption is not possible.

[0229] 5) Authorization Algorithm Primarily used for testing, based on the private key SK of a specified user attribute set S and the set... Get sub-attribute set private key

[0230] It's important to note that, in homomorphic encryption, fully homomorphic encryption enables computation on the encrypted ciphertext without requiring a specified key. This unique characteristic makes fully homomorphic technology urgently needed in many applications. In 2009, Gentry et al. first proposed a fully homomorphic encryption scheme based on an ideal lattice, primarily composed of four algorithmic parts: KeyGen, Encrypt, Decrypt, and Evaluate. A homomorphic algorithm must meet the following requirements: under homomorphic conditions, any operational function f can perform homomorphic operations (addition and multiplication) on its ciphertext, and the decrypted plaintext obtained from the ciphertext after the operation is equivalent to the result of performing the function operation on the original plaintext. Only then can it be called a fully homomorphic encryption scheme.

[0231] Based on relevant references, this paper takes the DGHV integer homomorphic encryption proposed by Dijk and Gentry et al. as an example. This scheme is based on homomorphic operations on integers and has good fully homomorphic capabilities.

[0232] Kengen(λ): Generates a private key P based on the security parameter λ.

[0233] Encrypt(m,p): Generates a large prime integer q and a noisy integer r, and has... r∈[2 η-1 ,2 η Given that q >> p and p / 2 > |2r|, and inputting the plaintext m to be encrypted, the following can be calculated:

[0234] c = pq + 2r + m, m ∈ {0, 1}

[0235] Decrypt(c,p): Input ciphertext c and private key P, calculate m = (c mod p) mod 2 to obtain plaintext m.

[0236] Verifying full homomorphism: Suppose plaintexts m1 and m2 are homomorphically encrypted with c1 and c2. The specific formulas describe this as: c1 = m1 + 2r1 + pq1 and c2 = m2 + 2r2 + pq2. Proof of homomorphic addition:

[0237] c1+c2=p(q1+q2)+2(r1+r2)+m1+m2

[0238] Then, based on the known encryption parameters, perform a modulo operation:

[0239] [(c1+c2)modp]mod2=m1+m2

[0240] Proof of homomorphic multiplication:

[0241] c1+c2=p[pq1q2+2(r1+m1)+2(r2+m2)]+2(r1r2+r2m1+r1m2)+m1*m2

[0242] Then, based on the known encryption parameters, perform a modulo operation:

[0243] [(c1+c2)modp]mod2=m1*m2

[0244] It is evident that the DGHV algorithm satisfies both additive and multiplicative homomorphism. Therefore, it can be concluded that this encryption algorithm possesses the property of full homomorphism, and the homomorphic encryption scheme used in this paper also possesses the same property.

[0245] It's worth noting that Word2Vec is a language model training method proposed by Google. It extracts semantic features from large amounts of data and is widely used in real-world applications and natural language processing. Its key features include keyword testing and analysis, quantifying the association between words and text content through model training, converting document sets into K-dimensional vectors, performing spatial vector operations on the machine, and calculating the semantic relevance of documents based on the model-generated vector matrix.

[0246] The Continuous Bag-of-Words (CBOW) model selects a defined range of context words and determines the word vector centered within that range; the output is this centered word vector. The Skip-Gram model, on the other hand, operates in the opposite way: it takes a specific keyword as input and infers the probability values ​​of words in the surrounding context to form a feature vector.

[0247] like Figure 8 As shown, the Skip-Gram model also consists of a three-part structure, using the input keyword's R(x) to infer the probability of related words in the preceding and following text at that position:

[0248]

[0249] Word2Vec technology trains a model using the CBOW model and Skip-Gram to obtain word vectors. By specifically combining the probabilities of the words obtained after training, keyword vectors can be obtained, and thus the corresponding document vectors can be derived.

[0250] This embodiment also provides a computer device, such as... Figure 9 As shown, the computer device includes multiple computer devices 2000. In this embodiment, the components of the encrypted text retrieval system device may be distributed across different computer devices 2000. Each computer device 2000 may be a smartphone, tablet, laptop, desktop computer, rack server, blade server, tower server, or cabinet server (including standalone servers or server clusters composed of multiple servers), etc. The computer device 2000 in this embodiment includes, but is not limited to, a memory 2001 and a processor 2002 that are communicatively connected to each other via a system bus. However, it should be understood that it is not required to implement all the components shown; more or fewer components may be implemented alternatively.

[0251] In this embodiment, the memory 2001 (i.e., the readable storage medium) includes flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, magnetic disk, optical disk, etc. In some embodiments, the memory 2001 may be an internal storage unit of the computer device 2000, such as the hard disk or memory of the computer device 2000. In other embodiments, the memory 2001 may also be an external storage device of the computer device 2000, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 2000. Of course, the memory 2001 may include both the internal storage unit and the external storage device of the computer device 2000. In this embodiment, the memory 2001 is typically used to store the operating system and various application software installed on the computer device, such as the encrypted retrieval system device of the embodiment. In addition, the memory 2001 can also be used to temporarily store various types of data that have been output or will be output.

[0252] In some embodiments, processor 2002 may be a central processing unit (CPU), controller, microcontroller, microprocessor, or other data processing chip. This processor 2002 is typically used to control the overall operation of computer device 2000. In this embodiment, processor 2002 is used to run program code stored in memory 2001 or process data. When the processors 2002 of multiple computer devices 2000 in this embodiment jointly execute the computer program, the encrypted retrieval method of this embodiment is implemented.

[0253] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software plus a general-purpose hardware platform, or of course, using hardware. Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-compatible storage medium, and when executed, it can include the processes of the embodiments of the methods described above.

[0254] Embodiments of this application also provide a computer-readable storage medium, such as flash memory, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), random access memory (RAM), static random access memory (SRAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), programmable read-only memory (PROM), magnetic memory, disk, optical disk, server, App application store, etc., which stores a computer program. When the program is executed by a processor, it implements the corresponding function. In this embodiment, the computer-readable storage medium stores the encrypted retrieval system device 10 of the embodiment, which, when executed by a processor, implements the encrypted retrieval method of the embodiment.

[0255] The encrypted retrieval system, method, computer equipment, and storage medium provided by this invention ensure the security and reliability of the cloud environment, possess reliable, efficient, and flexible searchable encryption performance, and feature an improved design based on an attribute-based encryption weight strategy, along with corresponding algorithms; a design module and generation algorithm based on the Word2Vec model, and an attribute-based encryption algorithm for encrypted retrieval; thereby achieving efficient and accurate retrieval; and enabling dynamic updating of user permissions, thus realizing a DWC-SW solution that provides high efficiency and security.

[0256] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method.

[0257] The above are merely preferred embodiments of this application and do not limit the patent scope of this application. Any equivalent structural or procedural transformations made using the content of this application's specification and drawings, or direct or indirect applications in other related technical fields, are similarly included within the patent protection scope of this application.

Claims

1. A encrypted text retrieval system, characterized in that, It consists of four parts: data owner, data user, authorization center, and cloud server. The data owner determines the access policy and accesses the data encryption policy, and uploads the encrypted data to the cloud server; the data user submits a retrieval request and receives the pre-decrypted ciphertext returned by the cloud server; the authorization center is set by the data owner and authorizes the return of the generated private key according to the request submitted by the data user; the cloud server receives the encrypted file and the attribute-file index retrieval table, and pre-decrypts the plaintext data according to the retrieval request sent by the data user, and sends the pre-decrypted ciphertext of the plaintext data to the data user; The encrypted retrieval system further includes an access control module, an index generation module, and a CP-ABE encryption module. The access control module improves the access structure based on attribute-based encryption and designs a weighted strategy tree based on the weighted strategy of attribute-based encryption. The access control module uses the CP-ABE algorithm for data encryption. The index generation module generates a document index based on the Word2Vec model, employing the Word2Vec model and secure inner product operations. The CP-ABE encryption module includes an algorithm model comprising an initialization algorithm, a key generation algorithm, an encryption algorithm, an index generation algorithm, a token generation algorithm, a search algorithm, a pre-decryption algorithm, and a decryption algorithm. The vector structure of the weight policy tree designed in the access control module is optimized by vectorizing the weight policy tree and then homomorphically encrypting it. The generated ciphertext consists of three parts: The first part is the optimized topic strategy tree: the vectorized ciphertext of {"attribute" and / or "attribute"}; The second part is the ciphertext of the attribute class corresponding to the weight: attribute: {"sub-attribute & weight", ...}; The third part is the ciphertext set corresponding to the strategy weights: the ciphertext of {"strategy weights & document set", ...}; The access control module is used to design the vector structure of the weight policy tree, including the following steps: The user uploads a search request vector and sends it to the cloud server. The cloud server then performs homomorphic matching on the user's search request vector and the second part of the weight strategy vector: the ciphertext corresponding to the attribute class weight. After ciphertext matching using the weighted strategy in the first part on the cloud server, the set of identity attributes corresponding to the determined search user is subjected to logical operations on the access structure, so that the logical AND / OR calculation is implemented through homomorphic operations; The ciphertext of the weight policy vector is combined with the given set of attribute weight values. all ={ω1、、、ω n The algorithm performs homomorphic computation and calculates similarity with the ciphertext set defined in the weight strategy vector in Part 3, returning Value = W. search The return value is the corresponding ciphertext set index on the document index table, and a ciphertext search is performed on the document index table; The index generation module includes a Word2Vec model, which is trained on a dataset and uses KeyGen, DSInfer, and Encrypt algorithms executed by the data owner to construct the encrypted retrieval system.

2. The encrypted text retrieval system according to claim 1, characterized in that, The data owner is the original data owner, who is responsible for determining the access policy and accessing the data encryption policy, and uploading encrypted data to the cloud server. The data user is used to request ciphertext. When only one set of attributes that satisfies the ciphertext access permission is available, the ciphertext is decrypted to obtain the plaintext. The authorization authentication center is used to perform attribute authentication based on the identity attribute characteristics of the authorized user; The cloud server is used to store encrypted data. When a user or data owner accesses a file, the stored data is manipulated according to the request.

3. The encrypted text retrieval system according to claim 2, characterized in that, The data owner sends the encrypted ciphertext set and the corresponding file index vector set to the cloud server, and builds an access control table - document retrieval table on the cloud server side, and transmits the set access permissions to the access authentication center; The data user is used to send the application for search authentication to the authorization authentication center, obtain the authentication result, construct a search token, and send a search request to the cloud server. The authentication result contains a private key. The cloud server is used to perform searches, and the results obtained after using the search table are transmitted to the data user, who then decrypts the data to obtain plaintext data.

4. A method for encrypting text, characterized in that, Based on the encrypted text retrieval system of claim 3, the method includes: The data owner sets parameters through the authorization center and calls the initialization Setup(1) function. λ The function retrieves relevant parameters; The Encrypt() function is used to encrypt the ciphertext on the local server. The Indexgen() function generates a corresponding document index for each ciphertext. Then, an attribute-document index retrieval table is built using a set of attributes. Search users request a private key from the authentication center, which then issues the private key with specified personal identity attributes to the search user through the KeyGen() function. Search users generate search trapdoors using the Trapdoor() function with relevant parameters and send them to the cloud server. The cloud server matches the attribute-document index table by calling the Search() function to determine the top-k sorted set of ciphertext. The cloud server then performs the Pre-Decrypt() function on the ciphertext, returns an intermediate value to the search user, and calls the Decrypt() function to perform local calculations to obtain the plaintext.

5. A computer device, characterized in that, The computer device includes multiple computer devices, each computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processors of the multiple computer devices jointly implement the steps of the method of claim 4 when executing the computer program.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program stored in the storage medium is executed by a processor, it implements the steps of the method of claim 4.

Citation Information

Patent Citations

  • Attribute-based multi-mechanism hierarchical ciphertext-policy weight encryption method under cloud environment

    CN106059763A

  • Ciphertext search method, system and device in cloud computing environment

    CN112332979A