Cloud data security sharing and access control method
Through intelligent algorithms and multi-channel encryption technology combined with blockchain, analyzing user behavior and realizing adaptive access control, the challenges of data sharing and access control in the cloud environment are solved and the security and availability of cloud data are improved.
Patent Information
- Application Number
- CN202411281459.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-13
- Publication Date
- 2024-12-06
AI Technical Summary
Traditional data security methods cannot effectively solve the problems of data sharing and access control in cloud environments, especially to ensure data confidentiality, integrity and availability, and to realize access and sharing of multiple users or applications.
Intelligent algorithms such as machine learning and deep learning are used to analyze and predict user behavior and data access patterns, and combine multi-channel encryption and blockchain technology to achieve adaptive access control. The specific steps include initializing encryption parameters to encrypt cloud data, obtaining user access behavior semantic vectors, matching historical access behaviors to determine the degree of matching, and decrypting and sharing or rejecting ciphertext data through the blockchain.
It improves the adaptability and intelligence level of cloud data access control, enhances the security of cloud data, avoids wrong requests, and ensures the confidentiality and availability of data.
Smart Images

Figure CN119089477A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of cloud data access control, and in particular to a cloud data secure sharing and access control method. Background Art
[0002] With the rapid development and popularization of cloud computing technology, more and more organizations and individuals choose to store and process data in the cloud. However, at the same time, cloud data security issues are becoming increasingly prominent. In a cloud environment, data sharing and access control are key challenges because data usually needs to be accessed and shared by multiple users or applications, but the confidentiality, integrity and availability of the data need to be guaranteed. Traditional data security methods often cannot effectively solve data sharing and access control issues in a cloud environment. Summary of the invention
[0003] In view of this, to address this problem, the present invention proposes a cloud data security sharing and access control method, which combines intelligent algorithms, such as machine learning and deep learning technologies, to analyze and predict user behaviors and data access patterns, thereby improving the adaptability and intelligence of access control.
[0004] To achieve the above purpose, the present invention provides a cloud data security sharing and access control method, comprising the following steps: S1: Initialize encryption parameters, use encryption parameters to encrypt cloud data to obtain ciphertext data, and transmit the ciphertext data to blockchain nodes for cloud data sharing; S2: Obtain the user's request information for accessing cloud data, and extract the information to obtain the user's access behavior semantic vector; S3: Obtain the user's historical access behavior semantic vector and form an access behavior semantic vector sequence, perform behavior matching on the access behavior semantic vector sequence and the normal access behavior semantic vector sequence in the user access pattern library, and obtain the user's historical matching degree. If the historical matching degree exceeds a specified threshold, the ciphertext data is decrypted and shared through the request information, otherwise the request information is rejected, wherein the adaptive weighted sequence similarity measurement is the implementation method of the behavior matching; S4: Collect access behavior sequences of different users to form an access behavior sequence set, and perform dynamic pattern mining to update the user access pattern library, wherein incremental pattern mining is an implementation method of the dynamic pattern mining.
[0005] As a further improvement method of the present invention: Optionally, initializing encryption parameters in step S1 includes: Initialize the encryption parameters, where the initialization generation process of the encryption parameters is: Generate a large prime number p of length Len, which constitutes the public key distribution of encryption parameters: in: X represents the public key distribution of encryption parameters; represents a set of integers; Represents public key distribution The control parameters, Represents public key distribution Range parameter; Representing a collection Any integer in , r represents the set Any integer in ; Indicates remainder; Select M groups of q and r from the public key distribution X to form M groups of public key parameters, where the mth group of public key parameters is: in: Indicates the mth group of public key parameters formed; represents the selected mth group q, represents the selected mth group r; ; The large prime number p and M groups of public key parameters constitute the encryption parameters: in: Indicates encryption parameters; The cloud data is encrypted using encryption parameters to obtain ciphertext data, and the ciphertext data is transmitted to the blockchain node for cloud data sharing.
[0006] Optionally, encrypting the cloud data using encryption parameters to obtain ciphertext data, and transmitting the ciphertext data to the blockchain node for cloud data sharing includes: Exploiting Encryption Parameters The cloud data is encrypted to obtain multi-channel ciphertext data, where the encryption process of the cloud data is as follows: S11: Divide the large prime number p in the encryption parameter key and M groups of public key parameters into M groups of channel parameters, where the mth group of channel parameters obtained by division is: in: represents the mth group of channel parameters obtained by division; S12: Perform binary representation on the cloud data data to obtain a binary representation result B_data of the cloud data data; S13: Divide the binary representation result B_data into M groups of binary sequences of different lengths: in: represents the mth group of binary sequences obtained by division; S14: Encrypt each group of binary sequences using the channel parameters, where the mth group of binary sequences The encryption formula is: in: Represents the mth group of binary sequences The encryption result of S15: Constructing the M channel ciphertext data: in: Indicates the ciphertext data of the M channel; The M channel ciphertext data The M encryption results and the public key parameters corresponding to the encryption results are sent to M blockchain nodes in the blockchain for storage, where the encryption results The corresponding public key parameters are .
[0007] Optionally, obtaining the user's request information for accessing cloud data and extracting the information in step S2 includes: Get the user's request information for accessing cloud data, where the user's request information for accessing cloud data data is: in: Indicates the request information of user user to access cloud data data; Indicates the operation that the user user wants to perform on the cloud data data and the user ID of the user user; in the embodiment of the present invention, the execution operation includes viewing and downloading; Represents the client environment of the request information initiated by user user; the client environment Including the client's network port And data compression method ; Indicates the access information of user user; the historical access information includes the access success rate of user user And the number of times the user user accesses the cloud data data ; Request information for user user to access cloud data data Extract information and construct a semantic vector of the user's access behavior to the cloud data , where the information extraction process is: S21: From Extract the operations that the user user wants to perform on the cloud data data , and perform binary encoding to obtain the user's operation information on the cloud data data ; S22: Network port Perform binary encoding to obtain the network information of user user on cloud data data ; Data compression method Perform one-hot encoding to obtain the compressed information of the user on the cloud data data ; S23: Calculate the encoding weight of user user for cloud data data: in: Indicates the encoding weight of user user on cloud data data; represents an exponential function with a natural constant as base; S24: Constructing the semantic vector of user access behavior : in: T stands for transpose.
[0008] Optionally, in step S3, obtaining the user's historical access behavior semantic vectors and forming an access behavior semantic vector sequence includes: Based on the user ID in the request information, the historical access behavior semantic vector of the user corresponding to the request information is obtained to form an access behavior semantic vector sequence, where the access behavior semantic vector sequence of user user is: in: Represents the semantic vector sequence of user user’s access behavior; Represents the semantic vector of the historical access behavior of group S of user user, represents the historical access behavior semantic vector corresponding to the s-th access behavior of user user, and S represents the total number of access behaviors of user user; in the embodiment of the present invention, the historical access behavior semantic vector is the user access behavior semantic vector of the request information corresponding to the historical access; The access behavior semantic vector sequence Perform behavior matching with the normal access behavior semantic vector sequence L in the user access pattern library to obtain the historical matching degree of the user user, where the normal access behavior semantic vector sequence L is: in: represents the dth group of normal access behavior semantic vectors in the normal access behavior semantic vector sequence L, and D represents the length of the normal access behavior semantic vector sequence L.
[0009] Optionally, the access behavior semantic vector sequence Perform behavior matching with the normal access behavior semantic vector sequence L in the user access pattern library to obtain the historical matching degree of the user user, including: The historical matching degree calculation process of the user user is as follows: S31: Calculate the access behavior semantic vector sequence respectively The maximum vector and the minimum vector in the normal access behavior semantic vector sequence L are the same as the maximum vector and the minimum vector in the access behavior semantic vector sequence L. and the normal access behavior semantic vector sequence L, where the historical access behavior semantic vector The marking result is , normal access behavior semantic vector The marking result is ; If the historical access behavior semantic vector If is a minimal vector, then mark the result ; If the historical access behavior semantic vector is a maximum vector, then mark the result ; If the historical access behavior semantic vector To access the behavior semantic vector sequence The starting vector, ending vector or historical access behavior semantic vector in If it is not an extreme value vector, mark the result ; Wherein the extreme value vector includes the maximum vector and the minimum vector; In the embodiment of the present invention, if If the following conditions 1) or 2) are met, the historical access behavior semantic vector is a minimal vector, if If the following conditions 3) or 4) are met, the historical access behavior semantic vector is a maximum vector, otherwise the historical access behavior semantic vector Not an extreme value vector: 1) ,and ; 2) ,and ; 3) ,and ; 4) ,and ; S32: Initialization , b=1; S33: Calculate the semantic vector of historical access behavior Semantic vector with normal access behavior Distance between: in: Represents the semantic vector of historical access behavior Semantic vector with normal access behavior The distance between represents the L2 norm; S34: Calculate the historical access behavior semantic vector Semantic vector with normal access behavior Adaptive weights between: in: Represents the semantic vector of historical access behavior Semantic vector with normal access behavior Adaptive weights between represents the preset maximum weight; in the embodiment of the present invention, Set to 1; represents the weight control coefficient; in the embodiment of the present invention, Set to 0.5; represents the weight parameter for adjusting the tag information; in the embodiment of the present invention, Set to 0.2; S35: Calculate the normal access behavior semantic vector sequence L and the access behavior semantic vector sequence The process matching degree between: in: represents a preset order; in the embodiment of the present invention, Set to 2; Represents the semantic vector of historical access behavior Semantic vector with normal access behavior The cumulative process matching between them; S36: Order , return to step S33 until ; S37: Order , return to step S33 until ; S38: Calculate the historical matching degree of user user: in: Indicates the historical matching degree of user user; If the historical match If the specified threshold is exceeded, the request information , decrypt and share the ciphertext data, otherwise the request information will be rejected .
[0010] Optionally, the historical matching degree If the specified threshold is exceeded, the request information , decrypt and share ciphertext data, including: The ciphertext data The decryption and sharing process is as follows: Request information Send to the blockchain and request information from Extract the data information of the cloud data to be accessed, and store the encrypted data in the blockchain M nodes are used as consensus nodes; The consensus node processes the requested information according to the pre-set consensus algorithm. Make consensus and get the requested information If the voting result is higher than the preset minimum number of votes, the M consensus nodes send the stored M encrypted results to the server, and the server forms the ciphertext data ; The server encrypts the data Decrypt the data to get the binary data corresponding to the cloud data , and convert the binary data Sent to the client of user user, the client sends the binary data Convert to decimal cloud data data, where the decryption formula is: Optionally, collecting access behavior sequences of different users in step S4 to form an access behavior sequence set includes: Collect the access behavior sequences of different users to form an access behavior sequence set: in: Represents a set of access behavior sequences; represents the nth group of access behavior sequence collected; Indicates the access behavior sequence D visits in Indicates the dth visit behavior Request information in Indicates the dth visit behavior The access results in It means the dth visit behavior The access was successful. It means the dth visit behavior Access failed; Dynamic pattern mining is performed on the access behavior sequence set to update the user access pattern library.
[0011] Optionally, in step S4, performing dynamic pattern mining on the access behavior sequence set to update the user access pattern library includes: Perform dynamic pattern mining on the access behavior sequence set and update the normal access behavior semantic vector sequence. The dynamic pattern mining process is as follows: S41: extracting a request information sequence from the access behavior sequence, and extracting information from the request information to form a corresponding user access behavior semantic vector sequence, where the access behavior sequence The corresponding user access behavior semantic vector sequence is: in: Indicates the access behavior sequence The corresponding user access behavior semantic vector sequence; Indicates request information The information extraction results; S42: Calculate the access weight information of the cloud data accessed by any access behavior in the access behavior sequence, where the access behavior Corresponding access to cloud data The access weight information is: in: Indicates access behavior Corresponding access to cloud data The access weight information; Indicates access to cloud data Overall access success rate; Indicates the dth access to cloud data the success rate of conducting visits; S43: Obtain the access success rate of each group of access behavior sequences, where the access behavior sequence The access success rate is ; S44: Update to obtain the normal access behavior semantic vector sequence : in: Sequence of semantic vectors representing normal access behavior In the embodiment of the present invention, the updated normal access behavior semantic vector sequence is As the sequence to be matched in step S3, dynamic update of the sequence to be matched is realized.
[0012] In order to solve the above problem, the present invention provides an electronic device, the electronic device comprising: A memory storing at least one instruction; Communication interface, enabling electronic equipment to communicate; and The processor executes the instructions stored in the memory to implement the above-mentioned cloud data security sharing and access control method.
[0013] In order to solve the above problems, the present invention also provides a computer-readable storage medium, in which at least one instruction is stored. The at least one instruction is executed by a processor in an electronic device to implement the above-mentioned cloud data security sharing and access control method.
[0014] Compared with the prior art, the present invention proposes a cloud data security sharing and access control method, which has the following advantages: First, this scheme proposes a multi-channel encryption storage method, which generates multi-channel encryption parameters and divides the cloud data to be stored into multiple channels. The multi-channel cloud data is encrypted using the multi-channel encryption parameters to obtain multi-channel ciphertext data, and the blockchain storage method is used to store the multi-channel ciphertext data in multiple blockchain nodes to realize multi-channel storage of cloud data, obtain the user's request information for accessing cloud data, extract the user information and client information in the request information, perform semantic encoding processing on the request information, and obtain the user access behavior semantic vector.
[0015] At the same time, this solution obtains the historical access behavior semantic vectors of the user's historical access and forms an access behavior semantic vector sequence, and performs adaptive weighted calculation of the historical matching degree based on the distance between the vectors and the extreme value label information to achieve behavioral matching between the access behavior semantic vector sequence and the normal access behavior semantic vector sequence in the user access pattern library. If the historical matching degree exceeds the specified threshold, the request information is passed and the ciphertext data is decrypted to achieve cloud data sharing and access control based on the request information, and the normal access behavior semantic vector sequence in the user access pattern library is updated in real time to improve the security of cloud data sharing and access control, and avoid erroneous request information similar to the historical normal access behavior semantic vector sequence. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] Figure 1 A flowchart of a cloud data security sharing and access control method provided by an embodiment of the present invention; The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0017] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.
[0018] The embodiment of the present application provides a cloud data security sharing and access control method. The execution subject of the cloud data security sharing and access control method includes but is not limited to at least one of the electronic devices such as a server, a terminal, etc. that can be configured to execute the method provided by the embodiment of the present application. In other words, the cloud data security sharing and access control method can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.
[0019] S1: Initialize encryption parameters, use encryption parameters to encrypt cloud data to obtain ciphertext data, and transmit the ciphertext data to blockchain nodes for cloud data sharing.
[0020] Initializing encryption parameters in step S1 includes: Initialize the encryption parameters, where the initialization generation process of the encryption parameters is: Generate a large prime number p of length Len, which constitutes the public key distribution of encryption parameters: in: X represents the public key distribution of encryption parameters; represents a set of integers; Represents public key distribution The control parameters, Represents public key distribution Range parameter; Representing a collection Any integer in , r represents the set Any integer in ; Indicates remainder; Select M groups of q and r from the public key distribution X to form M groups of public key parameters, where the mth group of public key parameters is: in: Indicates the mth group of public key parameters formed; represents the selected mth group q, represents the selected mth group r; ; The large prime number p and M groups of public key parameters constitute the encryption parameters: in: Indicates encryption parameters; The cloud data is encrypted using encryption parameters to obtain ciphertext data, and the ciphertext data is transmitted to the blockchain node for cloud data sharing.
[0021] The method of encrypting the cloud data using encryption parameters to obtain ciphertext data, and transmitting the ciphertext data to the blockchain node for cloud data sharing, includes: Exploiting Encryption Parameters The cloud data is encrypted to obtain multi-channel ciphertext data, where the encryption process of the cloud data is as follows: S11: Divide the large prime number p in the encryption parameter key and M groups of public key parameters into M groups of channel parameters, where the mth group of channel parameters obtained by division is: in: represents the mth group of channel parameters obtained by division; S12: Perform binary representation on the cloud data data to obtain a binary representation result B_data of the cloud data data; S13: Divide the binary representation result B_data into M groups of binary sequences of different lengths: in: represents the mth group of binary sequences obtained by division; S14: Encrypt each group of binary sequences using the channel parameters, where the mth group of binary sequences The encryption formula is: in: Represents the mth group of binary sequences The encryption result of S15: Constructing the M channel ciphertext data: in: Indicates the ciphertext data of the M channel; The M channel ciphertext data The M encryption results and the public key parameters corresponding to the encryption results are sent to M blockchain nodes in the blockchain for storage, where the encryption results The corresponding public key parameters are .
[0022] S2: Obtain the user's request information for accessing cloud data, and extract the information to obtain the user's access behavior semantic vector.
[0023] The step S2 obtains the user's request information for accessing cloud data and extracts the information, including: Get the user's request information for accessing cloud data, where the user's request information for accessing cloud data data is: in: Indicates the request information of user user to access cloud data data; Indicates the operation that the user user wants to perform on the cloud data data and the user ID of the user user; in the embodiment of the present invention, the execution operation includes viewing and downloading; Represents the client environment of the request information initiated by user user; the client environment Including the client's network port And data compression method ; Indicates the access information of user user; the historical access information includes the access success rate of user user And the number of times the user user accesses the cloud data data ; Request information for user user to access cloud data data Extract information and construct a semantic vector of the user's access behavior to the cloud data , where the information extraction process is: S21: From Extract the operations that the user user wants to perform on the cloud data data , and perform binary encoding to obtain the user's operation information on the cloud data data ; S22: Network port Perform binary encoding to obtain the network information of user user on cloud data data ; Data compression method Perform one-hot encoding to obtain the compressed information of the user on the cloud data data ; S23: Calculate the encoding weight of user user for cloud data data: in: Indicates the encoding weight of user user on cloud data data; represents an exponential function with a natural constant as base; S24: Constructing the semantic vector of user access behavior : in: T stands for transpose.
[0024] S3: Obtain the user's historical access behavior semantic vectors and form an access behavior semantic vector sequence, match the access behavior semantic vector sequence with the normal access behavior semantic vector sequence in the user access pattern library, and obtain the user's historical matching degree. If the historical matching degree exceeds the specified threshold, the ciphertext data is decrypted and shared through the request information, otherwise the request information is rejected.
[0025] The step S3 obtains the user's historical access behavior semantic vector and forms an access behavior semantic vector sequence, including: Based on the user ID in the request information, the historical access behavior semantic vector of the user corresponding to the request information is obtained to form an access behavior semantic vector sequence, where the access behavior semantic vector sequence of user user is: in: Represents the semantic vector sequence of user user’s access behavior; Represents the semantic vector of the historical access behavior of group S of user user, represents the historical access behavior semantic vector corresponding to the s-th access behavior of user user, and S represents the total number of access behaviors of user user; in the embodiment of the present invention, the historical access behavior semantic vector is the user access behavior semantic vector of the request information corresponding to the historical access; The access behavior semantic vector sequence Perform behavior matching with the normal access behavior semantic vector sequence L in the user access pattern library to obtain the historical matching degree of the user user, where the normal access behavior semantic vector sequence L is: in: represents the dth group of normal access behavior semantic vectors in the normal access behavior semantic vector sequence L, and D represents the length of the normal access behavior semantic vector sequence L.
[0026] The behavior semantic vector sequence will be accessed Perform behavior matching with the normal access behavior semantic vector sequence L in the user access pattern library to obtain the historical matching degree of the user user, including: The historical matching degree calculation process of the user user is as follows: S31: Calculate the access behavior semantic vector sequence respectively The maximum vector and the minimum vector in the normal access behavior semantic vector sequence L are the same as the maximum vector and the minimum vector in the access behavior semantic vector sequence L. and the normal access behavior semantic vector sequence L, where the historical access behavior semantic vector The marking result is , normal access behavior semantic vector The marking result is ; If the historical access behavior semantic vector If is a minimal vector, then mark the result ; If the historical access behavior semantic vector is a maximum vector, then mark the result ; If the historical access behavior semantic vector To access the behavior semantic vector sequence The starting vector, ending vector or historical access behavior semantic vector in If it is not an extreme value vector, mark the result ; Wherein the extreme value vector includes the maximum vector and the minimum vector; In the embodiment of the present invention, if If the following conditions 1) or 2) are met, the historical access behavior semantic vector is a minimal vector, if If the following conditions 3) or 4) are met, the historical access behavior semantic vector is a maximum vector, otherwise the historical access behavior semantic vector Not an extreme value vector: 1) ,and ; 2) ,and ; 3) ,and ; 4) ,and ; S32: Initialization , b=1; S33: Calculate the semantic vector of historical access behavior Semantic vector with normal access behavior Distance between: in: Represents the semantic vector of historical access behavior Semantic vector with normal access behavior The distance between represents the L2 norm; S34: Calculate the historical access behavior semantic vector Semantic vector with normal access behavior Adaptive weights between: in: Represents the semantic vector of historical access behavior Semantic vector with normal access behavior Adaptive weights between represents the preset maximum weight; in the embodiment of the present invention, Set to 1; represents the weight control coefficient; in the embodiment of the present invention, Set to 0.5; represents the weight parameter for adjusting the tag information; in the embodiment of the present invention, Set to 0.2; S35: Calculate the normal access behavior semantic vector sequence L and the access behavior semantic vector sequence The process matching degree between: in: represents a preset order; in the embodiment of the present invention, Set to 2; Represents the semantic vector of historical access behavior Semantic vector with normal access behavior The cumulative process matching between them; S36: Order , return to step S33 until ; S37: Order , return to step S33 until ; S38: Calculate the historical matching degree of user user: in: Indicates the historical matching degree of user user; If the historical match If the specified threshold is exceeded, the request information , decrypt and share the ciphertext data, otherwise the request information will be rejected .
[0027] If the historical matching If the specified threshold is exceeded, the request information , decrypt and share ciphertext data, including: The ciphertext data The decryption and sharing process is as follows: Request information Send to the blockchain and request information from Extract the data information of the cloud data to be accessed, and store the encrypted data in the blockchain M nodes are used as consensus nodes; The consensus node processes the requested information according to the pre-set consensus algorithm. Make consensus and get the requested information If the voting result is higher than the preset minimum number of votes, the M consensus nodes send the stored M encrypted results to the server, and the server forms the ciphertext data ; The server encrypts the data Decrypt the data to get the binary data corresponding to the cloud data , and convert the binary data Sent to the client of user user, the client sends the binary data Convert to decimal cloud data data, where the decryption formula is: S4: Collect the access behavior sequences of different users to form an access behavior sequence set, and perform dynamic pattern mining to update the user access pattern library.
[0028] In step S4, the access behavior sequences of different users are collected to form an access behavior sequence set, including: Collect the access behavior sequences of different users to form an access behavior sequence set: in: Represents a set of access behavior sequences; represents the nth group of access behavior sequence collected; Indicates the access behavior sequence D visits in Indicates the dth visit behavior Request information in Indicates the dth visit behavior The access results in It means the dth visit behavior The access was successful. It means the dth visit behavior Access failed; Dynamic pattern mining is performed on the access behavior sequence set to update the user access pattern library.
[0029] In the step S4, dynamic pattern mining is performed on the access behavior sequence set to update the user access pattern library, including: Perform dynamic pattern mining on the access behavior sequence set and update the normal access behavior semantic vector sequence. The dynamic pattern mining process is as follows: S41: extracting a request information sequence from the access behavior sequence, and extracting information from the request information to form a corresponding user access behavior semantic vector sequence, where the access behavior sequence The corresponding user access behavior semantic vector sequence is: in: Indicates the access behavior sequence The corresponding user access behavior semantic vector sequence; Indicates request information The information extraction results; S42: Calculate the access weight information of the cloud data accessed by any access behavior in the access behavior sequence, where the access behavior Corresponding access to cloud data The access weight information is: in: Indicates access behavior Corresponding access to cloud data The access weight information; Indicates access to cloud data Overall access success rate; Indicates the dth access to cloud data the success rate of conducting visits; S43: Obtain the access success rate of each group of access behavior sequences, where the access behavior sequence The access success rate is ; S44: Update to obtain the normal access behavior semantic vector sequence : in: Sequence of semantic vectors representing normal access behavior In the embodiment of the present invention, the updated normal access behavior semantic vector sequence is As the sequence to be matched in step S3, dynamic update of the sequence to be matched is realized.
[0030] It should be noted that the serial numbers of the above-mentioned embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments. And the terms "including", "comprising" or any other variants thereof in this article are intended to cover non-exclusive inclusion, so that a process, device, article or method including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, device, article or method. In the absence of further restrictions, an element defined by the sentence "including a ..." does not exclude the presence of other identical elements in the process, device, article or method including the element.
[0031] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for a terminal device (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present invention.
[0032] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A cloud data security sharing and access control method, characterized in that: The method comprises: S1: Initialize encryption parameters, use encryption parameters to encrypt cloud data to obtain ciphertext data, and transmit the ciphertext data to blockchain nodes for cloud data sharing; S2: Obtain the user's request information for accessing cloud data, and extract the information to obtain the user's access behavior semantic vector; S3: Obtain the user's historical access behavior semantic vectors and form an access behavior semantic vector sequence, match the access behavior semantic vector sequence with the normal access behavior semantic vector sequence in the user access pattern library, and obtain the user's historical matching degree. If the historical matching degree exceeds the specified threshold, the request information is passed to decrypt and share the ciphertext data, otherwise the request information is rejected; S4: Collect the access behavior sequences of different users to form an access behavior sequence set, and perform dynamic pattern mining to update the user access pattern library.
2. A cloud data security sharing and access control method as claimed in claim 1, characterized in that: Initializing encryption parameters in step S1 includes: Initialize the encryption parameters, where the initialization generation process of the encryption parameters is: Generate a large prime number p of length Len, which constitutes the public key distribution of encryption parameters: ; in: X represents the public key distribution of encryption parameters; represents a set of integers; Represents public key distribution The control parameters, Represents public key distribution Range parameter; Representing a collection Any integer in , r represents the set Any integer in ; Indicates remainder; Select M groups of q and r from the public key distribution X to form M groups of public key parameters, where the mth group of public key parameters is: ; in: Indicates the mth group of public key parameters formed; represents the selected mth group q, represents the selected mth group r; ; The large prime number p and M groups of public key parameters constitute the encryption parameters: ; in: Indicates encryption parameters; The cloud data is encrypted using encryption parameters to obtain ciphertext data, and the ciphertext data is transmitted to the blockchain node for cloud data sharing.
3. A cloud data security sharing and access control method as claimed in claim 2, characterized in that: The method of encrypting the cloud data using encryption parameters to obtain ciphertext data, and transmitting the ciphertext data to the blockchain node for cloud data sharing, includes: Exploiting Encryption Parameters The cloud data is encrypted to obtain multi-channel ciphertext data, where the encryption process of the cloud data is as follows: S11: Divide the large prime number p in the encryption parameter key and M groups of public key parameters into M groups of channel parameters, where the mth group of channel parameters obtained by division is: ; in: represents the mth group of channel parameters obtained by division; S12: Perform binary representation on the cloud data data to obtain a binary representation result B_data of the cloud data data; S13: Divide the binary representation result B_data into M groups of binary sequences of different lengths: ; in: represents the mth group of binary sequences obtained by division; S14: Encrypt each group of binary sequences using the channel parameters, where the mth group of binary sequences The encryption formula is: ; in: Represents the mth group of binary sequences The encryption result of S15: Constructing the M channel ciphertext data: ; in: Indicates the ciphertext data of the M channel; The M channel ciphertext data The M encryption results and the public key parameters corresponding to the encryption results are sent to M blockchain nodes in the blockchain for storage, where the encryption results The corresponding public key parameters are .
4. A cloud data security sharing and access control method as claimed in claim 1, characterized in that: The step S2 obtains the user's request information for accessing cloud data and extracts the information, including: Get the user's request information for accessing cloud data, where the user's request information for accessing cloud data data is: ; in: Indicates the request information of user user to access cloud data data; Indicates the operation that user user wants to perform on cloud data data and the user ID of user user; Represents the client environment of the request information initiated by user user; the client environment Including the client's network port And data compression method ; Indicates the access information of user user; the historical access information includes the access success rate of user user And the number of times the user user accesses the cloud data data ; Request information for user user to access cloud data data Extract information and construct a semantic vector of the user's access behavior to the cloud data , where the information extraction process is: S21: From Extract the operations that the user user wants to perform on the cloud data data , and perform binary encoding to obtain the user's operation information on the cloud data data ; S22: Network port Perform binary encoding to obtain the network information of user user on cloud data data ; Data compression method Perform one-hot encoding to obtain the compressed information of the user on the cloud data data ; S23: Calculate the encoding weight of user user for cloud data data: ; in: Indicates the encoding weight of user user on cloud data data; represents an exponential function with a natural constant as base; S24: Constructing the semantic vector of user access behavior : ; in: T stands for transpose.
5. A cloud data security sharing and access control method as claimed in claim 1, characterized in that: The step S3 obtains the user's historical access behavior semantic vector and forms an access behavior semantic vector sequence, including: Based on the user ID in the request information, the historical access behavior semantic vector of the user corresponding to the request information is obtained to form an access behavior semantic vector sequence, where the access behavior semantic vector sequence of user user is: ; ; in: Represents the semantic vector sequence of user user’s access behavior; Represents the semantic vector of the historical access behavior of group S of user user, represents the historical access behavior semantic vector corresponding to the s-th access behavior of user user, and S represents the total number of access behaviors of user user; The sequence of semantic vectors of the access behavior Perform behavior matching with the normal access behavior semantic vector sequence L in the user access pattern library to obtain the historical matching degree of the user user, where the normal access behavior semantic vector sequence L is: ; in: represents the dth group of normal access behavior semantic vectors in the normal access behavior semantic vector sequence L, and D represents the length of the normal access behavior semantic vector sequence L.
6. A cloud data security sharing and access control method as claimed in claim 5, characterized in that: The behavior semantic vector sequence will be accessed Perform behavior matching with the normal access behavior semantic vector sequence L in the user access pattern library to obtain the historical matching degree of the user user, including: The historical matching degree calculation process of the user user is as follows: S31: Calculate the access behavior semantic vector sequence respectively The maximum vector and the minimum vector in the normal access behavior semantic vector sequence L are the same as the maximum vector and the minimum vector in the access behavior semantic vector sequence L. and the normal access behavior semantic vector sequence L, where the historical access behavior semantic vector The marking result is , normal access behavior semantic vector The marking result is ; If the historical access behavior semantic vector If is a minimal vector, then mark the result ; If the historical access behavior semantic vector If is a maximum vector, then mark the result ; If the historical access behavior semantic vector To access the behavior semantic vector sequence The starting vector, ending vector or historical access behavior semantic vector in If it is not an extreme value vector, mark the result ; Wherein the extreme value vector includes the maximum vector and the minimum vector; S32: Initialization , b=1; S33: Calculate the semantic vector of historical access behavior Semantic vector with normal access behavior Distance between: ; in: Represents the semantic vector of historical access behavior Semantic vector with normal access behavior The distance between represents the L2 norm; S34: Calculate the historical access behavior semantic vector Semantic vector with normal access behavior Adaptive weights between: ; in: Represents the semantic vector of historical access behavior Semantic vector with normal access behavior Adaptive weights between Indicates the preset maximum weight; represents the weight control coefficient; Represents the weight parameter for adjusting the marking information; S35: Calculate the normal access behavior semantic vector sequence L and the access behavior semantic vector sequence The process matching degree between: ; in: Indicates the preset order; Represents the semantic vector of historical access behavior Semantic vector with normal access behavior The cumulative process matching between them; S36: Order , return to step S33 until ; S37: Order , return to step S33 until ; S38: Calculate the historical matching degree of user user: ; in: Indicates the historical matching degree of user user; If the historical match If the specified threshold is exceeded, the information is requested , decrypt and share the ciphertext data, otherwise the request information will be rejected .
7. A cloud data security sharing and access control method as claimed in claim 6, characterized in that: If the historical matching If the specified threshold is exceeded, the request information , decrypt and share ciphertext data, including: The ciphertext data The decryption and sharing process is as follows: Request information Send to the blockchain and request information from Extract the data information of the cloud data to be accessed, and store the encrypted data in the blockchain M nodes are used as consensus nodes; The consensus node processes the requested information according to the pre-set consensus algorithm. Make consensus and get the requested information If the voting result is higher than the preset minimum number of votes, the M consensus nodes send the stored M encrypted results to the server, and the server forms the ciphertext data ; The server encrypts the data Decrypt the data to get the binary data corresponding to the cloud data , and convert the binary data Sent to the client of user user, the client sends the binary data Convert to decimal cloud data data, where the decryption formula is: ; 。 8. A cloud data security sharing and access control method as claimed in claim 1, characterized in that: In step S4, the access behavior sequences of different users are collected to form an access behavior sequence set, including: Collect the access behavior sequences of different users to form an access behavior sequence set: ; ; ; in: Represents a set of access behavior sequences; represents the nth group of access behavior sequence collected; Indicates the sequence of access behaviors D visits in Indicates the dth visit behavior Request information in Indicates the dth visit behavior The access results in It means the dth visit behavior The access was successful. It means the dth visit behavior Access failed; Dynamic pattern mining is performed on the access behavior sequence set to update the user access pattern library.
9. A cloud data security sharing and access control method as claimed in claim 8, characterized in that: In the step S4, dynamic pattern mining is performed on the access behavior sequence set to update the user access pattern library, including: Perform dynamic pattern mining on the access behavior sequence set and update the normal access behavior semantic vector sequence. The dynamic pattern mining process is as follows: S41: extracting a request information sequence from the access behavior sequence, and extracting information from the request information to form a corresponding user access behavior semantic vector sequence, where the access behavior sequence The corresponding user access behavior semantic vector sequence is: ; in: Indicates the sequence of access behaviors The corresponding user access behavior semantic vector sequence; Indicates request information The information extraction results; S42: Calculate the access weight information of the cloud data accessed by any access behavior in the access behavior sequence, where the access behavior Corresponding access to cloud data The access weight information is: ; in: Indicates access behavior Corresponding access to cloud data The access weight information; Indicates access to cloud data Overall access success rate; Indicates the dth access to cloud data the success rate of conducting visits; S43: Obtain the access success rate of each group of access behavior sequences, where the access behavior sequence The access success rate is ; S44: Update to obtain the normal access behavior semantic vector sequence : ; ; in: Sequence of semantic vectors representing normal access behavior The dth group of normal access behavior semantic vectors in .
