Data encryption and storage method and device, equipment and medium
By using AI models in data encryption and storage for preprocessing and dynamic key generation, combined with distributed transmission and storage, the problem of insufficient computing complexity and security in large-scale data processing by traditional encryption technology is solved, and the problem of insufficient computing complexity and security in large-scale data processing is realized. Efficient and secure data processing and storage.
Patent Information
- Application Number
- CN202411115895.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2024-12-31
AI Technical Summary
Traditional encryption technology has high computational complexity when processing large-scale data, slow encryption and decryption speed, and cannot withstand quantum computing attacks, resulting in insufficient data security.
The pre-built AI model is used to pre-process the target stored data, generate dynamic keys and encrypt them, and use distributed transmission and storage systems to improve data security and processing efficiency.
Through AI model preprocessing and dynamic key encryption, combined with distributed transmission and storage, the data security and transmission processing efficiency are significantly improved, ensuring the smooth user experience.
Smart Images

Figure CN119227099A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of Internet technology, and specifically relates to a data encryption and storage method, device, equipment and medium. Background Art
[0002] In today's Internet industry, user data and corporate data often contain sensitive information. Once leaked or used maliciously, it may not only cause personal privacy leakage, but also cause serious damage to corporate reputation and user trust, and may also undermine the continued stable operation of the business. Therefore, it is very necessary to encrypt and store data and improve data security protection capabilities.
[0003] Currently, traditional encryption technologies such as AES (Advanced Encryption Standard) and RSA (Rivest-Shamir-Adleman) are mainly used to encrypt and decrypt stored data. However, when processing large-scale data, traditional encryption technologies have high computational complexity, slow encryption and decryption speeds, and cannot resist advanced attack methods such as quantum computing attacks, thus failing to guarantee data security. Therefore, how to improve the security of stored data and the efficiency of encryption and decryption is an urgent problem to be solved by people in this field. Summary of the invention
[0004] The embodiments of the present application provide a data encryption and storage method, device, equipment and medium, the purpose of which is to improve the security of stored data and the transmission and processing efficiency, and ensure a smooth user experience.
[0005] In a first aspect, an embodiment of the present application provides a data encryption and storage method, the method comprising:
[0006] Acquire target storage data, and preprocess the target storage data using a pre-built AI model to obtain preprocessed data;
[0007] Generate a dynamic key, and encrypt the preprocessed data based on the dynamic key to obtain encrypted data;
[0008] Performing distributed transmission on the encrypted data, and storing the encrypted data in a distributed storage system;
[0009] In response to the data use request, obtaining target encrypted data from the distributed storage system;
[0010] The target encrypted data is decrypted to obtain target data.
[0011] In a second aspect, an embodiment of the present application provides a data encryption and storage device, the device comprising:
[0012] A preprocessing module, used to obtain target storage data and preprocess the target storage data using a pre-built AI model to obtain preprocessed data;
[0013] An encryption module, used for generating a dynamic key, and encrypting the pre-processed data based on the dynamic key to obtain encrypted data;
[0014] A transmission and storage module, used for performing distributed transmission on the encrypted data and storing the encrypted data in a distributed storage system;
[0015] A data acquisition module, configured to acquire target encrypted data from the distributed storage system in response to a data use request;
[0016] The decryption module is used to decrypt the target encrypted data to obtain target data.
[0017] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.
[0018] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0019] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.
[0020] In an embodiment of the present application, the target storage data is obtained, and the target storage data is preprocessed using a pre-built AI model to obtain preprocessed data; a dynamic key is generated, and the preprocessed data is encrypted based on the dynamic key to obtain encrypted data; the encrypted data is distributedly transmitted, and the encrypted data is stored in a distributed storage system; in response to a data use request, the target encrypted data is obtained from the distributed storage system; the target encrypted data is decrypted to obtain the target data. The above-mentioned data encryption and storage method can improve the security of the stored data and the transmission and processing efficiency by combining the AI model in the process of preprocessing, encrypting and decrypting the target storage data, and adopting distributed transmission and storage, so as to ensure a smooth user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0021] Figure 1It is a flowchart of the data encryption and storage method provided in Example 1 of the present application;
[0022] Figure 2 It is a flowchart of the data encryption and storage method provided in the second embodiment of the present application;
[0023] Figure 3 This is a scenario application diagram of the data encryption and storage method provided in Example 2 of the present application;
[0024] Figure 4 It is a flowchart of the data encryption and storage method provided in Example 3 of the present application;
[0025] Figure 5 This is a scenario application diagram of the data encryption and storage method provided in Example 3 of the present application;
[0026] Figure 6 It is a flowchart of the data encryption and storage method provided in the fourth embodiment of the present application;
[0027] Figure 7 This is a scenario application diagram of the data encryption and storage method provided in Embodiment 4 of the present application;
[0028] Figure 8 It is a flowchart of the data encryption and storage method provided in Embodiment 5 of the present application;
[0029] Fig. 9 This is a scenario application diagram of the data encryption and storage method provided in Embodiment 5 of the present application;
[0030] Fig.10 It is a flowchart of the data encryption and storage method provided in Example 6 of the present application;
[0031] Fig.11 This is a scenario application diagram of the data encryption and storage method provided in Example 6 of the present application;
[0032] Fig.12 It is a structural diagram of a data encryption and storage device provided in Embodiment 7 of the present application;
[0033] Fig.13 It is a schematic diagram of the structure of the electronic device provided in Example 8 of the present application. DETAILED DESCRIPTION
[0034] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all the contents are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.
[0035] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.
[0036] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.
[0037] The data encryption and storage method, device, equipment and medium provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and their application scenarios.
[0038] Embodiment 1
[0039] Figure 1 Schematic diagram of the data encryption and storage method provided in the first embodiment of the present application. Figure 1 As shown, the specific steps include:
[0040] S101, acquiring target storage data, and preprocessing the target storage data using a pre-built AI model to obtain preprocessed data;
[0041] First of all, this application is applicable to scenarios where data needs to be stored and used. Based on the above usage scenarios, it can be understood that the execution subject of this application can be a server. Specifically, the preprocessing and encryption of the target storage data and the transmission and storage of the encrypted data can be performed by the server, and the server uses the target data to implement business functions. Among them, the server generally has strong computing power, large storage space and high reliability, and is used to perform critical tasks or provide services to multiple clients.
[0042] The target storage data may refer to the data that needs to be stored currently. For example, if the server is a game server and the player is chatting in the game, the target storage data may be the player's chat text. If the player is trading items, the target storage data may be the player's transaction data. The target storage data is generated on the client side as the player behaves, and after the target storage data is generated, the client side transmits the target storage data to the server.
[0043] The AI (Artificial Intelligence) model is a computing model that uses machine learning algorithms to learn and extract patterns from large amounts of data to achieve specific tasks. It is understandable that in this solution, the AI model may refer to a computing model dedicated to preprocessing target storage data, which can be pre-built based on historical storage data. Among them, historical storage data may refer to each target storage data acquired before the current time point.
[0044] Preprocessing may refer to a process of classifying target storage data and filtering out abnormal data therein. The target storage data remaining after preprocessing is the preprocessed data.
[0045] S102, generating a dynamic key, and encrypting the pre-processed data based on the dynamic key to obtain encrypted data;
[0046] A dynamic key may refer to a key that changes dynamically over time or in a specific event, wherein the key is the key to encrypting and decrypting information and may be a combination of numbers, letters, or symbols. A dynamic key may be generated by using a timestamp or a counter as a seed.
[0047] The method of encrypting the preprocessed data based on the dynamic key can be achieved by inputting the preprocessed data and the dynamic key into a traditional encryption algorithm for operation, thereby obtaining encrypted data. The encrypted data may refer to the preprocessed data in the form of ciphertext that cannot be directly identified; the traditional encryption algorithm includes symmetric encryption algorithm, asymmetric encryption algorithm and hybrid encryption algorithm.
[0048] S103, performing distributed transmission on the encrypted data, and storing the encrypted data in a distributed storage system;
[0049] Distributed transmission can refer to dividing a large file or data stream into multiple smaller blocks, and then transmitting them in parallel through different paths or nodes. The distributed transmission of encrypted data can be achieved by dividing the encrypted data into multiple smaller data blocks or slices, determining the transmission path and nodes for each data block or slice, and transmitting each data block or slice in parallel through different paths and nodes at the same time.
[0050] A distributed storage system may refer to a storage mode in which data is dispersedly stored on multiple nodes or servers. The encrypted data may be stored in a distributed storage system by integrating a server with the distributed storage system and uploading the encrypted data to the distributed storage system.
[0051] S104, in response to the data use request, obtaining target encrypted data from the distributed storage system;
[0052] The data use request may refer to information sent to the server for obtaining target data for subsequent processing of the target data. The target data may refer to the storage data that needs to be used currently, and the target encrypted data is the encrypted target data. The data use request may include identification information for determining the obtained target encrypted data, and the identification information is used as a query condition to query the distributed storage system, and the query result returned is the target encrypted data.
[0053] S105, decrypting the target encrypted data to obtain target data.
[0054] The target encrypted data may be decrypted by verifying whether the dynamic key in the data usage request is valid. If the dynamic key is valid, the target encrypted data may be decrypted according to the traditional encryption algorithm used by the target encrypted data to obtain the target data.
[0055] In an embodiment of the present application, the target storage data is obtained, and the target storage data is preprocessed using a pre-built AI model to obtain preprocessed data; a dynamic key is generated, and the preprocessed data is encrypted based on the dynamic key to obtain encrypted data; the encrypted data is distributedly transmitted, and the encrypted data is stored in a distributed storage system; in response to a data use request, the target encrypted data is obtained from the distributed storage system; the target encrypted data is decrypted to obtain the target data. The above-mentioned data encryption and storage method can improve the security of the stored data and the transmission and processing efficiency by combining the AI model in the process of preprocessing, encrypting and decrypting the target storage data, and adopting distributed transmission and storage, so as to ensure a smooth user experience.
[0056] Embodiment 2
[0057] Figure 2 It is a flow chart of the data encryption and storage method provided in the second embodiment of the present application. This solution makes a better improvement on the above embodiment, and the specific improvement is: the target storage data includes at least one of text data, behavior data and social relationship data; accordingly, the target data is preprocessed using a pre-built AI model to obtain pre-processed data, including: using the SpaCy processing library to semantically classify the text data, and using a pre-built sentiment analysis model to filter out malicious text data in the semantic classification results to obtain pre-processed data; and / or, using the K-means algorithm to classify the behavior data, and using a pre-built anomaly detection model to filter out abnormal behavior data in the behavior classification results to obtain pre-processed data; and / or, using a pre-built GNN model to classify the social relationship data, and filtering out abnormal social relationship data based on the relationship classification results to obtain pre-processed data.
[0058] like Figure 2 As shown, the specific steps include:
[0059] S201, obtaining target storage data;
[0060] S202, using the SpaCy processing library to perform semantic classification on the text data, and using a pre-built sentiment analysis model to filter out malicious text data in the semantic classification results to obtain pre-processed data;
[0061] and / or,
[0062] Using a K-means algorithm to classify the behavior data, and using a pre-built anomaly detection model to filter out abnormal behavior data in the behavior classification results, to obtain pre-processed data;
[0063] and / or,
[0064] Using a pre-built GNN model to classify the social relationship data, and filtering out abnormal social relationship data based on the relationship classification results to obtain pre-processed data;
[0065] Text data may refer to storage data of text data type. For example, the text data of a game may include chat records of players. The SpaCy processing library is an open source natural language processing library that is widely used in text analysis and natural language processing tasks. The method of using the SpaCy processing library to semantically classify text data may be to define the semantic category labels of the SpaCy classifier, train the SpaCy classifier using historical text data, and input the current text data into the trained SpaCy classifier to obtain a semantic classification result. The semantic classification result may refer to the result obtained by classifying text data according to the theme or meaning of its content. For example, the semantic category labels of the text data of a game may include categories such as login information, chat records, and game instructions.
[0066] Malicious text data may refer to text data whose sentiment tendency is negative. The sentiment analysis model may be an AI model that analyzes the sentiment tendency of text data, such as the sentiment analysis tool of NLTK. Specifically, NLTK (Natural Language Toolkit) is a Python library for processing human language data; the sentiment analysis tool can determine the sentiment polarity of the text, that is, whether the text is positive, negative, or neutral. The method of using a pre-built sentiment analysis model to filter out malicious text data in the semantic classification results can be to use the sentiment analysis tool of NLTK to delete the text data with negative sentiment polarity in the semantic classification results, and the remaining text data is the pre-processed data.
[0067] Behavior data may refer to stored data related to the user's operating behavior. For example, the behavior data of a game may include data related to the player's logging into the game. The K-means algorithm is a commonly used unsupervised machine learning clustering algorithm, which is mainly used to divide the data points in the data set into k clusters. The K-means algorithm can be used to classify the behavior data by randomly selecting k data points as the initial cluster centers, calculating the distance between each data point and the k cluster centers, and assigning the data points to the cluster represented by the nearest cluster center, calculating the average value of all data points in each cluster and using it as the new cluster center to obtain the behavior classification result. Among them, the behavior classification result may refer to the result obtained by classifying the behavior data according to its nature. For example, the behavior of a player logging into the game can be classified as normal behavior data or abnormal behavior data.
[0068] Abnormal behavior data may refer to behavior data that may have an adverse impact on the normal operation of business functions. The anomaly detection model may be an AI model that can filter out abnormal data points, such as an isolation forest, which can be pre-built by using the TensorFlow framework. Among them, the isolation forest is an unsupervised anomaly detection algorithm that isolates abnormal data points by building a "forest"; the TensorFlow framework is an open source machine learning framework that provides a rich API (Application Programming Interface) for building and training various types of deep learning models. The method of using a pre-built anomaly detection model to filter out abnormal behavior data in the behavior classification results can be achieved by inputting the behavior classification results into the pre-built anomaly detection model, deleting the abnormal behavior data output by the anomaly detection model, and the remaining behavior data is the pre-processed data.
[0069] Social relationship data can be storage data used to describe the relationship between users. The GNN (Graph Neural Network) model is a type of deep learning model used to process graph structure data. It can effectively represent and analyze graph data by learning the relationship between nodes. The method of using the pre-built GNN model to classify social relationship data can be to model the social relationship data as an undirected graph, with each user represented as a node, and the social relationship between users represented as an edge. The node representation vector is input into the classifier to predict the relationship type between users and obtain the relationship classification result. Among them, the relationship classification result can refer to the result obtained by classifying the social relationship data according to its nature. For example, the relationship classification result of the game can include categories such as friend relationships, transaction relationships, and opponent relationships between players.
[0070] Abnormal social relationship data may refer to social relationship data that may have an adverse impact on the normal operation of business functions. Based on the relationship classification results, the abnormal social relationship data can be filtered out by deleting the abnormal social relationship data, and the remaining social relationship data is the pre-processed data. For example, abnormal social relationship data in the game may include a large number of friend relationship data that suddenly increases for a player.
[0071] Figure 3 This is a scenario application diagram of the data encryption and storage method provided in Example 2 of this application. Figure 3 As shown, when a player logs in, the player's login behavior is preprocessed to ensure that there is no abnormal login in the game; when a player chats, the player's chat history is preprocessed to filter out malicious language; when a player trades, the player's trading behavior is preprocessed to ensure the legality of the transaction.
[0072] S203, generating a dynamic key, and encrypting the pre-processed data based on the dynamic key to obtain encrypted data;
[0073] S204, performing distributed transmission on the encrypted data, and storing the encrypted data in a distributed storage system;
[0074] S205, in response to the data use request, obtaining target encrypted data from the distributed storage system;
[0075] S206, decrypting the target encrypted data to obtain target data.
[0076] The benefit of this setting is that by using a pre-built AI model to pre-process the target storage data, abnormal data in the target storage data can be discovered and filtered out in a timely manner to ensure the normal operation of business functions.
[0077] Embodiment 3
[0078] Figure 4 It is a flow chart of the data encryption and storage method provided in Example 3 of the present application. This solution makes a better improvement on Example 1, and the specific improvement is: generating a dynamic key, and encrypting the preprocessed data based on the dynamic key to obtain encrypted data, including: using a pre-built GAN model to generate a dynamic key, and encrypting the target storage data based on the dynamic key to obtain encrypted data; and / or, generating a dynamic key based on a quantum computer, and encrypting the target storage data based on the dynamic key to obtain encrypted data; and / or, generating a dynamic key based on the Ethereum blockchain, and encrypting the target storage data based on the dynamic key to obtain encrypted data.
[0079] like Figure 4 As shown, the specific steps include:
[0080] S401, acquiring target storage data, and preprocessing the target storage data using a pre-built AI model to obtain preprocessed data;
[0081] S402, using a pre-built GAN model to generate a dynamic key, and encrypting the target storage data based on the dynamic key to obtain encrypted data;
[0082] and / or,
[0083] Generate a dynamic key based on a quantum computer, and encrypt the target storage data based on the dynamic key to obtain encrypted data;
[0084] and / or,
[0085] Generate a dynamic key based on the Ethereum blockchain, and encrypt the target storage data based on the dynamic key to obtain encrypted data;
[0086] GAN (Generative Adversarial Network) is a generative deep learning model consisting of two competing neural networks: the generator and the discriminator. The GAN model can be pre-built using the TensorFlow framework. When using the pre-built GAN model to generate dynamic keys, the generator can be responsible for generating dynamic keys, and the discriminator can be responsible for verifying the validity of the dynamic keys.
[0087] Quantum computers are a new computing model that operates based on the principles of quantum mechanics and are fundamentally different from traditional binary computers. Based on the way quantum computers generate dynamic keys, you can use Qiskit to generate quantum dynamic keys on quantum computers. Qiskit (Quantum Information Science Kit) is an open source quantum computing framework that provides a complete set of tools and programming interfaces for developing and running quantum algorithms. Qiskit allows developers to test quantum algorithms on simulators or run them on real quantum hardware.
[0088] Ethereum blockchain is a decentralized computing platform based on blockchain technology. Blockchain is a distributed ledger technology. Ethereum introduces the concept of smart contracts, which allows developers to deploy executable program code on the blockchain. Smart contracts can automatically execute pre-coded conditions and logic, greatly expanding the application scenarios of blockchain. Based on the method of generating dynamic keys on the Ethereum blockchain, smart contracts can be executed on the Ethereum blockchain to generate dynamic keys.
[0089] In the case of using a pre-built GAN model or generating a dynamic key based on a quantum computer, the target storage data is encrypted based on the dynamic key. The AES (Advanced Encryption Standard) algorithm can be used according to the dynamic key and the target storage data to obtain the encrypted data. The AES algorithm is a symmetric encryption algorithm, and the same key is used for encryption and decryption.
[0090] In the case of generating dynamic keys based on the Ethereum blockchain, the target storage data can be encrypted based on the dynamic keys by using the RSA (Rivest-Shamir-Adleman) algorithm according to the dynamic keys and the target storage data to obtain encrypted data. The RSA algorithm is an asymmetric encryption algorithm, and different keys (public key and private key) are used for encryption and decryption.
[0091] Figure 5 This is a scenario application diagram of the data encryption and storage method provided in Example 3 of this application. Figure 5 As shown, for the player's transaction data, the GAN model can be used to generate dynamic keys to ensure the security of the transaction process; for the player's important combat data, dynamic keys can be generated based on quantum computers to prevent the data from being intercepted and cracked.
[0092] S403, performing distributed transmission on the encrypted data, and storing the encrypted data in a distributed storage system;
[0093] S404, in response to the data use request, obtaining target encrypted data from the distributed storage system;
[0094] S405, decrypting the target encrypted data to obtain target data.
[0095] The benefit of this setting is that by combining the AI model to generate dynamic keys, it can effectively defend against advanced data attack methods and improve the security of stored data.
[0096] Embodiment 4
[0097] Figure 6 It is a flow chart of the data encryption and storage method provided in Example 4 of the present application. This solution makes a better improvement on Example 1, and the specific improvement is: the encrypted data is distributedly transmitted, including: recording the hash value of the data packet of the encrypted data on the Hyperledger Fabric blockchain, and transmitting and verifying the data packet according to the hash value and the pre-built smart contract; and / or, dividing the encrypted data into data blocks based on the BitTorrent protocol, and using the libtorrent library to transmit and reorganize the data blocks; and / or, caching the encrypted data to the global CDN node, and transmitting the encrypted data based on the optimized transmission protocol.
[0098] like Figure 6 As shown, the specific steps include:
[0099] S601, acquiring target storage data, and preprocessing the target storage data using a pre-built AI model to obtain preprocessed data;
[0100] S602, generating a dynamic key, and encrypting the pre-processed data based on the dynamic key to obtain encrypted data;
[0101] S603, recording a hash value of the data packet of the encrypted data on the Hyperledger Fabric blockchain, and transmitting and verifying the data packet according to the hash value and a pre-built smart contract;
[0102] and / or,
[0103] Splitting the encrypted data into data blocks based on the BitTorrent protocol, and transmitting and reassembling the data blocks using the libtorrent library;
[0104] and / or,
[0105] Cache the encrypted data to a global CDN node, and transmit the encrypted data based on an optimized transmission protocol;
[0106] The Hyperledger Fabric blockchain is a permissioned blockchain. Only participants who have been authenticated and authorized can join the network and participate in transactions. This model is suitable for enterprise application scenarios that require a higher level of privacy and security. A data packet refers to the basic unit of data transmitted in network communication; a hash value is a fixed-length digital fingerprint generated by a cryptographic summary algorithm. To record the hash value of a data packet of encrypted data on the Hyperledger Fabric blockchain, you can use a cryptographic hash algorithm (such as SHA-256) to calculate the hash value of the data packet of encrypted data, call the function defined in the Chaincode to store the hash value through the Fabric SDK, and the nodes in the Fabric network will execute the Chaincode function and record the hash value in the ledger. To transmit and verify the data packet based on the hash value and the pre-built smart contract, you can use the pre-built smart contract to transmit the encrypted data packet to the distributed storage system in a secure manner, and recalculate the hash value of the data packet after the distributed storage system receives the data packet, query the hash value recorded in the ledger through the Fabric SDK and compare it with the calculated hash value. If the hash values are consistent, it means that the data has not been tampered with during transmission. Among them, smart contracts can be pre-built using the Go language, which is a statically typed, compiled language developed by Google. It has the characteristics of simplicity, efficiency, and concurrency, and is widely used in system programming, cloud computing, and distributed systems.
[0107] The BitTorrent protocol is a peer-to-peer file sharing protocol. The BitTorrent protocol divides large files into multiple small blocks, and multiple users collaborate to download and upload these small blocks. This block transmission method improves download speed and network availability. Based on the BitTorrent protocol, the encrypted data is divided into data blocks. A seed file (containing metadata of the data, the total number and size of data blocks, and the address of the tracking server) can be created. The libtorrent library is an open source C++ library for implementing the BitTorrent protocol. The libtorrent library is used to transmit and reassemble data blocks. The session and add_torrent functions of the libtorrent library can be called to upload data blocks to the BitTorrent network. The distributed storage system joins the BitTorrent network through the seed file and uses the session and add_torrent functions to download data blocks. When all data blocks are downloaded, the files function of the libtorrent library can be used for reassembly.
[0108] CDN (Content Delivery Network) is a network system composed of multiple servers distributed in different geographical locations; global CDN nodes refer to a series of server nodes deployed by CDN service providers around the world; the method of caching encrypted data to global CDN nodes can be adopted by using AWS CloudFront to cache encrypted data to global CDN nodes, wherein AWS CloudFront is a CDN service provided by Amazon Web Services, which can cache static and dynamic content to edge nodes distributed globally. Optimized transmission protocol refers to a series of technologies and algorithms used to optimize the transmission efficiency of content in CDN network, these protocols can dynamically adjust the transmission strategy according to factors such as network conditions and user equipment to improve transmission speed and reliability; the method of transmitting encrypted data based on optimized transmission protocol can be adopted by calling the method included in the library corresponding to the optimized transmission protocol to transmit encrypted data.
[0109] Figure 7 This is a scenario application diagram of the data encryption and storage method provided in the fourth embodiment of the present application. Figure 7 As shown, for the player's transaction data, the hash value of the encrypted data of the transaction data can be recorded on the blockchain and transmitted through the smart contract. Each data packet has a unique hash value to ensure the integrity of the data; for the player's combat data, the encrypted data of the combat data can be cached to the global CDN node and transmitted based on the optimized transmission protocol to ensure the fast transmission and low latency of real-time combat data.
[0110] S604, storing the encrypted data in a distributed storage system;
[0111] S605, in response to the data use request, obtaining target encrypted data from the distributed storage system;
[0112] S606, decrypt the target encrypted data to obtain target data.
[0113] The benefit of this solution is that by using a distributed data transmission protocol combined with blockchain technology for data transmission, the data transmission efficiency can be significantly improved, ensuring a smooth user experience.
[0114] Embodiment 5
[0115] Figure 8 It is a flow chart of the data encryption and storage method provided in Example 5 of the present application. This solution makes a better improvement on Example 1, and the specific improvement is: storing the encrypted data in a distributed storage system, including: processing the encrypted data in blocks, and encrypting and storing the block results in at least two IPFS nodes through the libp2p component; and / or, using SSE technology or CSEK technology to re-encrypt the encrypted data and store it in at least two geographical areas; and / or, based on the hybrid storage structure of Ceph and Hadoop HDFS, storing the encrypted data.
[0116] like Figure 8 As shown, the specific steps include:
[0117] S801, acquiring target storage data, and preprocessing the target storage data using a pre-built AI model to obtain preprocessed data;
[0118] S802, generating a dynamic key, and encrypting the pre-processed data based on the dynamic key to obtain encrypted data;
[0119] S803, performing distributed transmission on the encrypted data;
[0120] S804, dividing the encrypted data into blocks, and encrypting and storing the block results in at least two IPFS nodes through the libp2p component;
[0121] and / or,
[0122] The encrypted data is re-encrypted using SSE technology or CSEK technology and stored in at least two geographical areas;
[0123] and / or,
[0124] Based on the Ceph and Hadoop HDFS hybrid storage structure, the encrypted data is stored;
[0125] The encrypted data can be processed in blocks by dividing it into fixed lengths, or dynamically adjusting the block size according to the content characteristics of the encrypted data. IPFS is a distributed file system based on content addressing. It does not rely on a central server to store and distribute data, but stores data in nodes around the world (i.e., IPFS nodes); the libp2p component is an important component in the IPFS ecosystem, providing a set of protocols and APIs for peer-to-peer communication; the block results are encrypted and stored in at least two IPFS nodes through the libp2p component. The encrypted data blocks can be uploaded to at least two different IPFS nodes by connecting to the IPFS network using the libp2p component.
[0126] SSE (Server-Side Encryption) technology is a server-side encryption function provided by AWS S3. When uploading data to S3, S3 will automatically encrypt the data. The encryption key is managed by AWS. This method can ensure the security of data during storage. CSEK (Customer-Supplied Encryption Keys) technology is a customer-managed encryption key function provided by Google Cloud Storage. Customers can generate and manage encryption keys by themselves and require Google Cloud Storage to encrypt data using the provided keys. This method can enhance data security. Cloud storage services generally deploy data centers and storage nodes in multiple geographic regions around the world. You can choose to store data in multiple geographic regions to improve data availability and disaster recovery capabilities.
[0127] Ceph is a distributed storage system that provides multiple storage interfaces such as object storage, block storage, and file system storage; Hadoop HDFS (Hadoop Distributed File System) is a distributed file system in the Hadoop ecosystem, used to store and process large-scale data; Ceph and Hadoop HDFS hybrid storage structure can refer to a storage service that uses both Ceph and Hadoop HDFS storage media and technologies in a storage system. Based on the Ceph and Hadoop HDFS hybrid storage structure, the encrypted data can be stored by storing the encrypted data blocks in Ceph or Hadoop HDFS respectively.
[0128] Fig. 9 This is a scenario application diagram of the data encryption and storage method provided in Example 5 of this application. Fig. 9 As shown, IPFS can be used to store the player's archive data, and each data block can be encrypted independently to ensure the security and availability of the data; SSE can be used to store the player's chat history and back it up in multiple regions to ensure data persistence and disaster recovery capabilities.
[0129] S805, in response to the data use request, obtaining target encrypted data from the distributed storage system;
[0130] S806, decrypt the target encrypted data to obtain target data.
[0131] The benefit of this arrangement of the scheme is that by combining a multi-layer encryption strategy and storing encrypted data in a distributed storage system, the security of the data during the storage process can be ensured.
[0132] Embodiment 6
[0133] Fig.10 It is a flow chart of the data encryption and storage method provided in Example 6 of the present application. This solution makes a better improvement on Example 1, and the specific improvement is: decrypting the target encrypted data to obtain the target data, including: using the OpenSSL tool to decrypt the target encrypted data according to the dynamic key to obtain the target data; and / or, using the HSM device to decrypt the target encrypted data according to the dynamic key to obtain the target data; and / or, mixing local and cloud decryption technology to decrypt the target encrypted data according to the dynamic key to obtain the target data.
[0134] like Fig.10 As shown, the specific steps include:
[0135] S1001, obtaining target storage data, and preprocessing the target storage data using a pre-built AI model to obtain preprocessed data;
[0136] S1002, generating a dynamic key, and encrypting the pre-processed data based on the dynamic key to obtain encrypted data;
[0137] S1003, performing distributed transmission on the encrypted data, and storing the encrypted data in a distributed storage system;
[0138] S1004, in response to the data use request, obtaining target encrypted data from the distributed storage system;
[0139] S1005, using the OpenSSL tool to decrypt the target encrypted data according to the dynamic key to obtain target data;
[0140] and / or,
[0141] Using the HSM device to decrypt the target encrypted data according to the dynamic key to obtain the target data;
[0142] and / or,
[0143] The local and cloud decryption technologies are mixed to decrypt the target encrypted data according to the dynamic key to obtain the target data.
[0144] OpenSSL (Open Secure Sockets Layer) is an open source cryptographic toolkit that supports symmetric encryption, asymmetric encryption, digital signature and other functions. The method of using the OpenSSL tool to decrypt the target encrypted data according to the dynamic key can use the encryption algorithm in the OpenSSL tool to decrypt the target encrypted data according to the dynamic key to obtain the target data.
[0145] Optionally, after obtaining the target data, the AI model trained by TensorFlow can be used to parse the target data and provide real-time feedback.
[0146] HSM (Hardware Security Module) is a dedicated hardware device used to generate, store and process encryption keys. It can prevent encryption keys from being accessed or tampered with without authorization, ensuring the security of encryption operations. The method of using HSM devices to decrypt target encrypted data according to dynamic keys can be achieved by calling the decryption interface of HSM and using the corresponding dynamic key to decrypt the data block to obtain the target data.
[0147] Optionally, you can use AWS CloudHSM or Azure Key Vault to manage decryption keys. AWS CloudHSM is a managed service provided by Amazon Web Services for creating and managing HSMs; Azure KeyVault is a cloud service provided by the Microsoft Azure platform for securely storing and accessing encryption keys, certificates, and confidential information.
[0148] Local decryption technology can mean that both data and keys are stored locally, and decryption operations are performed locally, which can achieve higher performance and response speed; cloud decryption technology can mean using the powerful computing and storage capabilities of the cloud to perform decryption operations, and can dynamically expand decryption capabilities as needed to improve flexibility. The mixed use of local and cloud decryption technologies to decrypt the target encrypted data according to the dynamic key can be achieved by using the GnuPG tool to perform real-time decryption processing on the target encrypted data according to the dynamic key to obtain the target data when the target data is locally processed data, or by using the AWS KMS service to perform real-time decryption processing on the target encrypted data according to the dynamic key to obtain the target data when the target data is large-scale processing data.
[0149] Fig.11 This is a scenario application diagram of the data encryption and storage method provided in Example 6 of this application. Fig.11 As shown, for the player's transaction data, OpenSSL can be used for decryption, and AI models can be used for analysis and feedback to ensure a smooth transaction process without delay; for the player's combat data, HSM devices can be used for decryption to ensure the security and efficient processing of combat data.
[0150] In this technical solution, optionally, a local decryption technology and a cloud decryption technology are mixed to perform real-time decryption processing on the target encrypted data according to the dynamic key to obtain the target data, including:
[0151] In the case where the target data is locally processed data, using the GnuPG tool to perform real-time decryption processing on the target encrypted data according to the dynamic key to obtain the target data;
[0152] or,
[0153] In the case where the target data is large-scale processing data, the target encrypted data is decrypted in real time according to the dynamic key based on the AWS KMS service to obtain the target data.
[0154] Locally processed data may refer to data that is calculated and processed by a local device. The GnuPG tool is a free software encryption tool that provides functions such as digital signature, encryption and decryption, supports multiple encryption algorithms, and can be used to protect the security of data such as files and emails. The GnuPG tool is used to perform real-time decryption processing on the target encrypted data according to the dynamic key. The key management environment of the GnuPG tool can be configured, and the gpg command of the GnuPG tool can be used to decrypt the target encrypted data according to the dynamic key.
[0155] Large-scale data processing can refer to massive amounts of data that do not require high real-time performance. AWS KMS is a managed service provided by Amazon Web Services that can be integrated with other AWS services to encrypt and decrypt data. It also provides secure and reliable key management functions, which are suitable for large-scale data encryption and decryption needs. Based on the AWS KMS service's real-time decryption of target encrypted data based on dynamic keys, you can call the AWS KMS service's decryption interface to complete data decryption through the AWS SDK or AWS CLI tool.
[0156] The benefit of this solution is that by using the GnuPG tool when the target data is locally processed data or based on the AWS KMS service when the target data is large-scale processing data, the target encrypted data can be decrypted in real time according to the dynamic key. Appropriate decryption operations can be taken according to the needs of data use, making this solution suitable for various data processing scenarios.
[0157] The benefit of this arrangement of the solution is that a smooth user experience can be ensured by performing real-time decryption and data processing.
[0158] Embodiment 7
[0159] Fig.12 Schematic diagram of the structure of the data encryption and storage device provided in the seventh embodiment of the present application. Fig.12 As shown, the device comprises:
[0160] A preprocessing module 1210 is used to obtain target storage data and preprocess the target storage data using a pre-built AI model to obtain preprocessed data;
[0161] The encryption module 1220 is used to generate a dynamic key, and encrypt the pre-processed data based on the dynamic key to obtain encrypted data;
[0162] The transmission and storage module 1230 is used to perform distributed transmission on the encrypted data and store the encrypted data in a distributed storage system;
[0163] The data acquisition module 1240 is used to acquire target encrypted data from the distributed storage system in response to a data use request;
[0164] The decryption module 1250 is used to decrypt the target encrypted data to obtain target data.
[0165] In an embodiment of the present application, a preprocessing module is used to obtain target storage data and use a pre-built AI model to preprocess the target storage data to obtain preprocessed data; an encryption module is used to generate a dynamic key and encrypt the preprocessed data based on the dynamic key to obtain encrypted data; a transmission storage module is used to distribute the encrypted data and store the encrypted data in a distributed storage system; a data acquisition module is used to obtain target encrypted data from the distributed storage system in response to a data use request; a decryption module is used to decrypt the target encrypted data to obtain target data. The above-mentioned data encryption and storage device can improve the security of stored data and the transmission and processing efficiency by combining AI models in the process of preprocessing, encrypting and decrypting the target storage data, and adopting distributed transmission and storage, thereby ensuring a smooth user experience.
[0166] The data encryption and storage device in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a palmtop computer, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and the non-mobile electronic device can be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0167] The data encryption and storage device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an IOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0168] The data encryption and storage device provided in the embodiment of the present application can implement each process implemented in the above-mentioned embodiments one to six, and will not be described again here to avoid repetition.
[0169] Embodiment 8
[0170] like Fig.13As shown, an embodiment of the present application also provides an electronic device 1300, including a processor 1301, a memory 1302, and a program or instruction stored in the memory 1302 and executable on the processor 1301. When the program or instruction is executed by the processor 1301, each process of the above-mentioned data encryption and storage method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0171] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0172] Embodiment 9
[0173] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned data encryption and storage method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0174] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0175] Embodiment 10
[0176] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned data encryption and storage method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.
[0177] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.
[0178] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0179] 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 application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (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 application.
[0180] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
[0181] The above are only preferred embodiments of the present application and the technical principles used. The present application is not limited to the specific embodiments described herein, and various obvious changes, readjustments and substitutions that can be made by those skilled in the art will not deviate from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the claims.
Claims
1. A data encryption and storage method, characterized in that: The method comprises: Acquire target storage data, and preprocess the target storage data using a pre-built AI model to obtain preprocessed data; Generate a dynamic key, and encrypt the preprocessed data based on the dynamic key to obtain encrypted data; Performing distributed transmission on the encrypted data, and storing the encrypted data in a distributed storage system; In response to the data use request, obtaining target encrypted data from the distributed storage system; The target encrypted data is decrypted to obtain target data.
2. The data encryption and storage method according to claim 1, characterized in that: The target storage data includes at least one of text data, behavior data and social relationship data; Accordingly, the target data is preprocessed using a pre-built AI model to obtain preprocessed data, including: Using the SpaCy processing library to semantically classify the text data, and using a pre-built sentiment analysis model to filter out malicious text data in the semantic classification results to obtain pre-processed data; and / or, Using a K-means algorithm to classify the behavior data, and using a pre-built anomaly detection model to filter out abnormal behavior data in the behavior classification results, to obtain pre-processed data; and / or, The social relationship data is classified using a pre-built GNN model, and abnormal social relationship data is filtered out based on the relationship classification result to obtain pre-processed data.
3. The data encryption and storage method according to claim 1, characterized in that: Generating a dynamic key, and encrypting the pre-processed data based on the dynamic key to obtain encrypted data, including: Generate a dynamic key using a pre-built GAN model, and encrypt the target storage data based on the dynamic key to obtain encrypted data; and / or, Generate a dynamic key based on a quantum computer, and encrypt the target storage data based on the dynamic key to obtain encrypted data; and / or, A dynamic key is generated based on the Ethereum blockchain, and the target storage data is encrypted based on the dynamic key to obtain encrypted data.
4. The data encryption and storage method according to claim 1, characterized in that: The encrypted data is distributedly transmitted, including: Recording a hash value of a data packet of the encrypted data on the Hyperledger Fabric blockchain, and transmitting and verifying the data packet based on the hash value and a pre-built smart contract; and / or, Splitting the encrypted data into data blocks based on the BitTorrent protocol, and transmitting and reassembling the data blocks using the libtorrent library; and / or, The encrypted data is cached in a global CDN node, and the encrypted data is transmitted based on an optimized transmission protocol.
5. The data encryption and storage method according to claim 1, characterized in that: Storing the encrypted data in a distributed storage system includes: The encrypted data is processed in blocks, and the block results are encrypted and stored in at least two IPFS nodes through the libp2p component; and / or, The encrypted data is re-encrypted using SSE technology or CSEK technology and stored in at least two geographical areas; and / or, The encrypted data is stored based on a hybrid storage structure of Ceph and Hadoop HDFS.
6. The data encryption and storage method according to claim 1, characterized in that: Decrypting the target encrypted data to obtain target data includes: Using the OpenSSL tool to decrypt the target encrypted data according to the dynamic key to obtain the target data; and / or, Using the HSM device to decrypt the target encrypted data according to the dynamic key to obtain the target data; and / or, The local and cloud decryption technologies are mixed to decrypt the target encrypted data according to the dynamic key to obtain the target data.
7. The data encryption and storage method according to claim 6, characterized in that: Mixing local decryption technology and cloud decryption technology to perform real-time decryption processing on the target encrypted data according to the dynamic key to obtain the target data, including: In the case where the target data is locally processed data, using the GnuPG tool to perform real-time decryption processing on the target encrypted data according to the dynamic key to obtain the target data; or, In the case where the target data is large-scale processing data, the target encrypted data is decrypted in real time according to the dynamic key based on the AWS KMS service to obtain the target data.
8. A data encryption and storage method, characterized in that: The method comprises: A preprocessing module, used to obtain target storage data and preprocess the target storage data using a pre-built AI model to obtain preprocessed data; An encryption module, used for generating a dynamic key, and encrypting the pre-processed data based on the dynamic key to obtain encrypted data; A transmission and storage module, used for performing distributed transmission on the encrypted data and storing the encrypted data in a distributed storage system; A data acquisition module, configured to acquire target encrypted data from the distributed storage system in response to a data use request; The decryption module is used to decrypt the target encrypted data to obtain target data.
9. An electronic device, characterized in that: It comprises a processor, a memory and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the data encryption and storage method as described in any one of claims 1 to 7.
10. A readable storage medium, characterized in that: The readable storage medium stores programs or instructions, and when the programs or instructions are executed by the processor, the steps of the data encryption and storage method according to any one of claims 1 to 7 are implemented.
Citation Information
Cited By
Communication data leakage detection and protection method combined with deep learning
CN119788418A
A method for detecting and protecting communication data leakage combined with deep learning
CN119788418B
Cloud computer storage management method and system and medium
CN121309147A
