Data encryption transmission method, device and equipment
By obtaining the characteristic sequence of data requests, determining the encryption and cache policies using the initial model, selecting the target cache block and public key for encryption, solving the resource consumption and security problems caused by key generation in the prior art, and achieving efficient and secure data transmission.
Patent Information
- Application Number
- CN202510525383.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-24
- Publication Date
- 2025-08-01
AI Technical Summary
In the data transmission, the prior art, due to the temporary generation of keys, the computing resource consumption is large, the system performance is degraded, the transmission efficiency is affected, and the key security management is difficult, making it difficult to meet the high-speed and secure data transmission requirements.
By obtaining the characteristic sequence of the target data request, the encryption policy and cache policy are determined using the initial model, the target cache block and public key are selected for encryption, the public key storage is optimized using linked list policies and shared cache pool policies, the encryption parameters and thread count are dynamically adjusted, and data compression is performed.
It improves data encryption speed and transmission efficiency, optimizes resource allocation, improves system performance and security, and adapts to different data processing needs.
Smart Images

Figure CN120415802A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of data processing, and in particular to a data encryption transmission method, device and equipment. Background Art
[0002] In the digital age, secure data transmission and efficient processing are extremely crucial. With the development of information technology, a large amount of data is transmitted over the network, and data confidentiality and integrity have become the core of information security.
[0003] In related technologies, a key is usually generated temporarily when sending data, which not only consumes a large amount of computing resources and storage resources, but also causes the system performance to decline, seriously affecting the transmission efficiency in the case of processing a large amount of data or high-concurrency scenarios.
[0004] In view of this, a data encryption transmission method with high transmission efficiency is needed. Summary of the Invention
[0005] In view of this, the present invention provides a data encryption transmission method to improve data transmission efficiency.
[0006] In a first aspect, the present invention provides a data encryption transmission method, the method comprising: obtaining a target data request and a feature sequence of the target data request; inputting the feature sequence into an initial model to determine an encryption policy, and selecting a target caching policy from a preset caching policy; the preset caching policy includes a linked list policy and a shared caching pool policy; determining a target cache block corresponding to the target data request based on the target caching policy; writing the target data corresponding to the target data request into the target cache block; selecting a target public key based on the encryption policy; and encrypting the target data using the target public key.
[0007] In this embodiment, a target data request and a feature sequence of the target data request are obtained, and then the feature sequence is input into the initial model to determine an encryption policy and a target caching policy; based on the target caching policy, a target cache block corresponding to the target data request is determined, and the target data corresponding to the target data request is written into the target cache block; based on the encryption policy, a target public key is selected, and the target data is encrypted using the target public key. Through the above solution, an encryption policy and a target caching policy for the target data request are determined through the initial model, and then based on the target caching policy, the corresponding cache block is determined, and the corresponding target data is written into the target cache block; based on the encryption policy, a target public key is selected to encrypt the target data. Compared with temporarily generating a key, the data encryption speed can be increased, thereby improving the data transmission efficiency.
[0008] In an alternative embodiment, selecting the target public key includes: selecting the target public key from a public key caching pool; the public key storage policy of the public key caching pool includes a linked list policy and a shared caching pool policy.
[0009] In this embodiment, by directly selecting the target public key from the public key cache pool, the target data request can be encrypted quickly, improving the data encryption efficiency.
[0010] In an alternative embodiment, the method further includes: when encrypting the target data corresponding to at least one target data request, determining the priority of each target data request; and encrypting the target data corresponding to each target data request based on the priority.
[0011] In this embodiment, encrypting the target data according to the priority of the target data request can optimize resource allocation and improve data security.
[0012] In an alternative embodiment, when the target cache policy is a linked list management policy, based on the target cache policy, determining the target cache block corresponding to the target data request includes: determining the number of target cache blocks based on the feature sequence of the target data request to select the target cache linked list; the number of nodes in the target cache linked list corresponds to the number of target cache blocks; establishing a mapping relationship between the target cache linked list and the cache block, and determining the target cache block based on the mapping relationship.
[0013] In this embodiment, when the target cache policy is a linked list management policy, selecting the target cache linked list according to the number of target cache blocks, and then determining the target cache block according to the mapping relationship between the target cache linked list and the cache block. The corresponding target cache block can be selected according to the feature sequence of the target data request, which can improve the cache utilization rate and reduce the system resource consumption.
[0014] In an alternative embodiment, when the target cache policy is a shared cache pool policy, based on the target cache policy, determining the target cache block corresponding to the target data request includes: determining the target feature of the target cache block based on the feature sequence of the target data request; the target feature includes the target size and the target number; selecting a preset cache block that matches the target feature from the data shared cache pool as the target cache block.
[0015] In this embodiment, when the target cache policy is a shared cache pool policy, determining the target size and the target number of the target cache block according to the feature sequence of the target data request, and then selecting a matching preset cache block from the data shared cache pool as the target cache block can flexibly meet the data processing requirements of different target data requests.
[0016] In an alternative embodiment, the method further includes: performing data compression on the encrypted target data.
[0017] In this embodiment, data compression is performed on the encrypted target data, which can reduce the data transmission volume and improve the transmission efficiency.
[0018] In an alternative embodiment, the feature sequence of the target data request includes at least one of the data volume size, data type, access frequency, and access mode.
[0019] In this embodiment, the feature sequence of the target data request includes at least one of the data volume size, data type, access frequency, and access mode, and a suitable target caching policy and encryption policy can be selected to improve the adaptability of the method.
[0020] In a second aspect, the present invention provides a data encryption and transmission device, which includes: an acquisition module for acquiring a target data request and the feature sequence of the target data request; a selection module for inputting the feature sequence into an initial model to determine an encryption policy and selecting a target caching policy from preset caching policies; the preset caching policies include a linked list policy and a shared cache pool policy; a determination module for determining a target cache block corresponding to the target data request based on the target caching policy; a caching module for writing the target data corresponding to the target data request into the target cache block; an encryption module for selecting a target public key from a public key cache pool based on the encryption policy and encrypting the target data using the target public key.
[0021] In a third aspect, the present invention provides a computer device, which includes: a memory and a processor, which are communicatively connected to each other. The memory stores computer instructions, and the processor executes the computer instructions to execute the data encryption and transmission method according to the first aspect or any corresponding embodiment thereof. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following will briefly introduce the drawings required for use in the description of the specific embodiments or the prior art. Obviously, the following drawings are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0023] Figure 1 is a flowchart of a data encryption and transmission method according to an embodiment of the present invention;
[0024] Figure 2 is a flowchart of another data encryption and transmission method according to an embodiment of the present invention;
[0025] Figure 3 is a structural diagram of a data encryption and transmission system according to an embodiment of the present invention;
[0026] Figure 4 It is a schematic diagram of a dynamic management process of a data cache pool according to an embodiment of the present invention;
[0027] Figure 5 It is a schematic diagram of a process of an encryption module according to an embodiment of the present invention
[0028] Figure 6 It is a structural block diagram of a data encryption transmission device according to an embodiment of the present invention;
[0029] Figure 7 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. Detailed implementation manners
[0030] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0031] In the digital age, with the development of information technology, a large amount of data is transmitted over the network, and the secure transmission and efficient processing of data are extremely critical. The confidentiality and integrity of data have become the core content of information security.
[0032] In related technologies, the encryption method for data transmission usually generates a key temporarily each time data is sent. This not only consumes a large amount of computing and storage resources, resulting in a decline in system performance, but also seriously affects the data transmission efficiency when dealing with a large amount of data or in a high-concurrency scenario. In addition, the key security management in this way is also relatively difficult, and the key is easily leaked, making the data face the risk of being stolen and tampered with.
[0033] In addition, related caching technologies mainly focus on the data itself and lack an effective caching and management mechanism for encryption resources such as encryption keys. This makes it impossible to optimize the data encryption and transmission process with the help of caching technologies and difficult to meet the current high-speed and secure data transmission requirements.
[0034] An embodiment of the present invention provides a data encryption transmission method, which obtains a target data request and a feature sequence of the target data request, then inputs the feature sequence into an initial model to determine an encryption policy and a target caching policy; based on the target caching policy, determines a target cache block corresponding to the target data request, and writes the target data corresponding to the target data request into the target cache block; based on the encryption policy, selects a target public key and uses the target public key to encrypt the target data request. Through the above solution, through the initial model, the encryption policy and the target caching policy of the target data request are determined, then based on the target caching policy, the corresponding cache block is determined, and the corresponding target data is written into the target cache block; based on the encryption policy, the target public key is selected to encrypt the target data request. Compared with temporarily generating a key, the data encryption speed can be improved, thereby improving the data transmission efficiency.
[0035] According to an embodiment of the present invention, an embodiment of a data encryption transmission method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than here.
[0036] In this embodiment, a data encryption transmission method is provided. Figure 1 is a flowchart of the data encryption transmission method according to an embodiment of the present invention, as Figure 1 shown, the process includes the following steps:
[0037] Step S101, obtain a target data request and a feature sequence of the target data request.
[0038] In data transmission, it is usually necessary to first obtain a target data request, and then determine the feature sequence of the target data request based on the target data request, so as to process the target data. Among them, the target data request can be a data request from the host side to the local side, or a data request from the local side to the host side.
[0039] The feature sequence of the target data request can be determined according to the actual situation. In a specific application, the feature sequence of the target data request can include the size of the target data request, the request frequency, and the data frequency, etc. By obtaining the data request size of the target data request, an appropriate cache space can be allocated. By obtaining the request frequency and data frequency of the target data request, the cache situation in the device can be evaluated. Determining the encryption policy and the target caching policy based on these features can improve the stability of the method and the efficiency of data transmission.
[0040] Step S102: Input the feature sequence into the initial model to determine the encryption policy and select the target caching policy from the preset caching policies. The preset caching policies include the linked list policy and the shared cache pool policy.
[0041] Among them, the selection of the initial model can be determined according to the actual situation. In specific implementation, the feature sequence can be input into different neural network models for prediction respectively to determine the encryption policy and the target caching policy; or the feature sequence can be input into a neural network model to obtain the prediction result of the neural network model, and then determine the encryption policy and the target caching policy according to the prediction result.
[0042] When the access frequency of the target data request is high, the linked list policy can be selected as the target caching policy; when the data of the target data request has sharing property, the shared cache pool policy can be selected as the target caching policy.
[0043] For scenarios with small data blocks and high requirements for encryption speed, lightweight encryption algorithms can be selected; for scenarios with large data blocks and extremely high requirements for security, complex but more secure encryption algorithms can be adopted. During the encryption process, the encryption parameters such as the number of encryption threads and the key length are dynamically adjusted according to the data volume size to improve the encryption efficiency.
[0044] Step S103: Based on the target caching policy, determine the target cache block corresponding to the target data request.
[0045] In the case where the target caching policy is the linked list policy, the number of target cache blocks can be determined according to the feature sequence of the target data request, and then a linked list including the corresponding number of nodes is selected as the target linked list. Each node in the target linked list corresponds to a target cache block, and the node contains the identifier of the cache block, the data length, and a pointer to the next node, etc.
[0046] In the case where the target caching policy is the shared cache pool policy, the size and number of the target cache blocks can be determined first according to the feature sequence of the target data request, and then the corresponding cache blocks are searched in the index table of the shared cache pool and used as the target cache blocks.
[0047] Step S104: Write the target data corresponding to the target data request into the target cache block.
[0048] Among them, after determining the target cache block, it can be determined whether the target cache block is available first. If it is available, the target data is written into the target cache block according to the target format, and then the index and status information of the target cache block are updated. If the target cache block is not available, a new cache block can be searched as the target cache block according to the target caching policy, and then the target data is written.
[0049] Step S105: Select a target public key based on the encryption policy; and encrypt the target data using the target public key.
[0050] After selecting an encryption strategy, the corresponding target public key is first read. The target public key is then used to encrypt the target data in the target cache block according to the target encryption algorithm. The target encryption algorithm can be determined based on actual circumstances, specifically based on a signature sequence of the target data request. In some optional implementations, the signature sequence of the target data request can also be input into a neural network model, and the encryption algorithm determined based on the output of the neural network model, thereby improving the adaptability of the method.
[0051] The data encryption transmission method provided in this embodiment obtains the target data request and the characteristic sequence of the target data request, and then inputs the characteristic sequence into the initial model to determine the encryption strategy and the target cache strategy; based on the target cache strategy, determines the target cache block corresponding to the target data request, and writes the target data corresponding to the target data request into the target cache block; based on the encryption strategy, selects the target public key, and uses the target public key to encrypt the target data request. Through the above scheme, the encryption strategy and target cache strategy of the target data request are determined through the initial model, and then based on the target cache strategy, the corresponding cache block is determined, and the corresponding target data is written into the target cache block; based on the encryption strategy, the target public key is selected to encrypt the target data request. Compared with temporarily generating keys, the data encryption speed can be increased, thereby improving the data transmission efficiency.
[0052] In this embodiment, a data encryption transmission method is provided. Figure 2 : is a flow chart of a data encryption transmission method according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:
[0053] Step S201: Obtain a target data request and a characteristic sequence of the target data request.
[0054] For details, please see Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.
[0055] In some optional implementations, the characteristic sequence of the target data request includes at least one of data size, data type, access frequency, and access mode.
[0056] The characteristic sequence of the target data request includes at least one of data size, data type, access frequency and access mode, and a suitable target cache strategy and encryption strategy can be selected to improve the adaptability of the method.
[0057] Step S202: Input the feature sequence into the initial model, determine the encryption policy, and select a target caching policy from the preset caching policies. The preset caching policies include the linked list policy and the shared cache pool policy.
[0058] For details, please refer to Figure 1 Step S102 of the illustrated embodiment, which will not be elaborated here.
[0059] Step S203: Based on the target caching policy, determine the target cache block corresponding to the target data request.
[0060] For details, please refer to Figure 1 Step S103 of the illustrated embodiment, which will not be elaborated here.
[0061] In some alternative embodiments, when the target caching policy is the linked list management policy, the above-mentioned step S203 includes:
[0062] S2031: Based on the feature sequence of the target data request, determine the number of target cache blocks to select the target cache linked list. The number of nodes in the target cache linked list corresponds to the number of target cache blocks.
[0063] Among them, the number of target cache blocks can be determined according to the data size of the target data request. When the data volume of the target data request is large, the number of target cache blocks is large; when the data volume of the target data request is small, the number of target cache blocks is small. After determining the number of target cache blocks, a linked list with the corresponding number of nodes can be selected from the cache space as the target cache linked list, and the number of nodes in the target cache linked list corresponds to the number of target cache blocks.
[0064] S2032: Establish the mapping relationship between the target cache linked list and the cache blocks, and based on the mapping relationship, determine the target cache block.
[0065] Among them, each node in the target cache linked list corresponds to a cache block, and the node contains the identifier of the cache block, the data length, and a pointer to the next node, etc. After determining the target cache linked list, a target data structure can be used to establish the mapping relationship between the linked list nodes of the target cache linked list and the cache blocks. Among them, the target data structure can be a dictionary, etc. Then, based on the mapping relationship, search in the mapping data structure through the identifier of the target cache block to determine the target cache block corresponding to the target cache linked list.
[0066] In some alternative embodiments, when the target caching policy is the linked list management policy, the above-mentioned step S203 includes:
[0067] S2033: Based on the feature sequence of the target data request, determine the target features of the target cache block. The target features include the target size and the target quantity.
[0068] Among them, according to the feature sequence of the target data request, the size and quantity of the target cache block can be determined to adapt to the target data request. Different data processing requirements can be addressed, improving the flexibility of the method. Specifically, when the data volume is large, a larger target cache block can be selected.
[0069] S2034, select a preset cache block that matches the target feature from the data sharing cache pool as the target cache block.
[0070] Among them, the data sharing cache pool contains several preset cache blocks of different sizes. In some alternative embodiments, the data sharing cache pool can be cached through data structures such as arrays, and then, according to the target feature of the target cache block, filter among the preset cache blocks in the data sharing cache pool to determine the preset cache block that matches the target feature and use it as the target cache block.
[0071] Step S204, write the target data corresponding to the target data request into the target cache block.
[0072] For details, please refer to Figure 1 Step S104 of the illustrated embodiment, which will not be elaborated here.
[0073] Step S205, based on the encryption policy, select the target public key; use the target public key to encrypt the target data.
[0074] For details, please refer to Figure 1 Step S105 of the illustrated embodiment, which will not be elaborated here.
[0075] In some alternative embodiments, the above step S205 includes:
[0076] Step S2051, select the target public key from the public key cache pool; the public key storage policy of the public key cache pool includes a linked list policy and a shared cache pool policy.
[0077] Among them, the public key cache policy in the public key cache pool includes a linked list policy and a shared cache pool policy. Among them, when using the linked list policy to store the public keys used to encrypt the target data, each node in the linked list can contain the identifier and content of the public key, and can also record information such as the usage frequency of the public key. In some alternative embodiments, when using the linked list policy to cache the target data corresponding to the target data request, the node information of the public key linked list corresponds to the nodes of the target cache block. In some alternative embodiments, the position of the node in the linked list can also be dynamically adjusted according to the usage frequency of the public key, and the public key with a high usage frequency is closer to the head of the linked list so that it can be obtained more quickly during the encryption process.
[0078] When storing public keys using the shared cache pool strategy, the public key cache pool can cache the public keys corresponding to several cache blocks of different sizes.
[0079] In some alternative embodiments, after data encryption is completed, the target public key used becomes invalid, and a new public key can be input again.
[0080] Step S206: Compress the encrypted target data.
[0081] Among them, the data compression method can select a compression algorithm according to the data characteristics of the target data, and based on the compression algorithm, compress the encrypted target data. The compression parameters of the data compression can be determined according to the actual situation.
[0082] In some alternative embodiments, after step S206, it further includes:
[0083] Step S207: When encrypting the target data corresponding to at least one target data request, determine the priority of each target data request.
[0084] Among them, after receiving the target data request, the priority of each received target data request can be judged according to the preset priority rule to determine the priority of the corresponding target data request.
[0085] Step S208: Based on the priority, encrypt the target data corresponding to each target data request.
[0086] Among them, for the data requests judged to be of high priority, the corresponding high-strength encryption key can be selected, and the data is encrypted using a pre-selected high-security encryption algorithm. For the data requests of medium priority, encryption operations are performed using the keys and encryption algorithms suitable for medium priority. For the data requests of low priority, the corresponding simple keys and encryption algorithms are used for encryption.
[0087] The data encryption and transmission method provided in this embodiment compresses the encrypted target data, which can reduce the data transmission volume and improve the transmission efficiency.
[0088] In this embodiment, a data encryption and transmission system is also provided. The schematic diagram of the system structure is as Figure 3 shown. Data is transmitted between the Local (local) side and the Host (user) side. The Local side is mainly divided into four functional modules, namely the data cache pool module, the learning model module, the public key cache pool module, and the encryption processing module.
[0089] The data cache pool module consists of a set of dynamically allocable memory blocks. Its main function is to temporarily store the data content to be processed or already processed. The number and size of the data blocks have initial values during power-on initialization, and are subsequently dynamically adjusted by the learning model module. It should be noted that the total capacity of the data blocks should be consistent with the data memory size allocated by the Host side.
[0090] Its structure can be formed in two ways. The first way uses a linked list structure. Each node in the linked list corresponds to a data block, and the node contains the identifier of the data block, the data length, and a pointer to the next node, etc. The length of the linked list can be adjusted according to the attributes of the data by the learning model, and the adjustment result is sent to the data cache pool module to dynamically adjust the linked list structure. Therefore, there will be multiple cache block linked lists in the module. When the target data enters this module, the most suitable linked list can be selected for storage according to the attributes. After the data transmission is completed, the linked list becomes invalid, and a new linked list is input by the learning model module. The second way uses a shared cache pool for management. The learning model module inputs several cache blocks of different sizes into the shared cache pool. The size and number of the cache blocks can be dynamically adjusted to flexibly meet different data processing requirements. After the data output transmission is completed, the used cache blocks can re-enter the cache pool for subsequent cyclic use.
[0091] The storage method of the public key cache pool module can adopt two structural ways. The structural content has a mapping relationship with the data cache pool, and the mapping relationship can be controlled by the learning model. The first way uses a linked list structure to store the public keys used to encrypt the data in the encrypted cache blocks. Each node of the linked list not only contains the identifier and content of the public key, but also records information such as the usage frequency of the public key. The node information corresponds to the nodes in the cache block, and the position of the node in the linked list is dynamically adjusted according to the usage frequency of the public key. The public key with a high usage frequency is closer to the head of the linked list so that it can be obtained faster during the encryption process. The second way uses a shared cache pool for encryption. Through the learning model, the corresponding public keys can be input into the public key cache pool according to cache blocks of different sizes. After the data transmission is completed, the used data public keys will become invalid, and new public keys can be input again by the learning model.
[0092] Among them, the schematic diagram of the dynamic management process of the data cache pool module is as Figure 4As shown, after the system starts, it first initializes the cache pool, and then determines whether there is a new data request. When a new data request is received, it analyzes the data attributes, and then based on the data attributes, selects a linked list or a shared cache pool for data storage. After storing the data in the corresponding cache block, the data starts to be transmitted. After the data transmission is completed, it determines whether linked list management is required. If linked list management is required, the original linked list becomes invalid, and the learning model module inputs a new linked list to manage the data. If linked list management is not required, the stored cache block is returned to the cache pool. When no new data request is received, it continuously monitors the usage of the cache blocks in the cache pool. When the usage changes, it uses the learning model to adjust the number of cache blocks, and then performs cache prefetching to load the cache blocks that may be accessed.
[0093] The data cache pool can classify and manage cache blocks from multiple dimensions, dynamically adjust according to the real-time usage and system load, and combine cache prefetching technology to greatly improve the utilization efficiency of cache resources. The public key cache pool is also classified based on multiple factors, sets different cache expiration periods, can dynamically update and recycle public keys, and can also preload in advance according to the prediction of the learning model, which can optimize the public key management process.
[0094] The learning model module collects historical data and data characteristics during the transmission process, including information such as data block size, data type, access frequency, public key usage records, encryption algorithms and encryption times, link load, and processing efficiency of the Host side. It uses machine learning algorithms for in-depth training, analyzes the associations between data, and generates prediction results. The prediction results can include the required cache block type, the appropriate public key category, and the selection of encryption algorithms, etc. In specific implementation, according to the prediction results, it can provide cache block pre-allocation suggestions for the data cache pool module, provide public key preloading guidance for the public key cache pool module, and recommend the best encryption strategy for the encryption processing module, so as to achieve the collaborative optimization of each module and improve the overall data transmission and encryption efficiency. In a practical application, a neural network algorithm is used to construct a data characteristic prediction model, analyze the potential associations and rules between data, and then based on the trained data characteristic prediction model, predict new target data requests.
[0095] The learning model module can accurately predict the key information of new data transmission requests by collecting multi-dimensional historical data characteristics to train the prediction model, provide collaborative optimization suggestions for other modules, break the traditional independent operation mode of modules, and achieve in-depth cross-module collaboration.
[0096] The encryption processing module can adopt an adaptive encryption strategy according to the cache block characteristics provided by the data cache pool module and the encryption algorithm recommended by the learning model module. Among them, the cache block characteristics can include cache block size, data type within the cache block, etc.
[0097] For scenarios with small cache blocks and high requirements for encryption speed, lightweight encryption algorithms can be selected; for scenarios with large cache blocks and extremely high requirements for security, complex but more secure encryption algorithms can be adopted. During the encryption process, encryption parameters such as the number of encryption threads and key length can also be dynamically adjusted according to the data volume to improve encryption efficiency. In addition, for some high-concurrency data transmission scenarios, the encryption processing module can also adopt multi-threaded parallel encryption technology. The learning model module dynamically adjusts the size of the encryption thread pool according to the system resource situation and data request volume, and reasonably allocates encryption tasks.
[0098] In some alternative embodiments, a task priority queue can also be used to preferentially process high-priority data encryption tasks to ensure the timely encryption and transmission of critical data. In addition, the encrypted ciphertext is compressed to reduce the data transmission volume and improve the transmission efficiency.
[0099] The encryption processing module flexibly switches encryption algorithms and dynamically adjusts parameters according to different data block characteristics and scenario requirements. In high-concurrency scenarios, through means such as multi-threaded parallel encryption, dynamically adjusting the size of the thread pool, introducing a task priority queue, and compressing the ciphertext, the encryption efficiency and data transmission performance are comprehensively improved.
[0100] In a practical application, the flow diagram of the encryption module is as Figure 5 shown. After receiving a data transmission request, the characteristic sequence of the data transmission request is obtained, and then the learning model module recommends an encryption algorithm. Then, the cache block size and scenario requirements are judged to select an appropriate encryption algorithm. Specifically, for scenarios with small cache blocks and high requirements for encryption speed, a lightweight encryption algorithm is selected; for scenarios with large cache blocks and high requirements for security, a complex and secure encryption algorithm is adopted. After selecting the encryption algorithm, the encryption parameters are dynamically adjusted. Then, it is judged whether it is a high-concurrency scenario. When it is a high-concurrency data transmission scenario, the learning model module adjusts the size of the encryption thread pool and then allocates encryption tasks, and a priority queue is introduced. When it is not a high-concurrency data transmission scenario, encryption tasks are directly allocated, and a priority queue is introduced. Then, multi-threaded parallel encryption is performed, and the encrypted ciphertext is compressed until the data transmission is completed. After the data transmission is completed, the encryption module continues to wait for data transmission requests.
[0101] The data encryption and transmission system provided in this embodiment uses a multi-dimensional classification and dynamic adjustment mechanism, enabling the data cache pool to accurately match business requirements with cache resources, reducing data read / write waiting time, improving the overall system performance, and significantly enhancing the cache resource utilization rate compared to traditional cache pools. The learning model module conducts intelligent prediction and decision-making based on historical data, facilitating the collaborative work of each module, greatly improving the overall efficiency of data transmission encryption, and significantly enhancing the encryption efficiency and security. The classification management, dynamic update, and recycling mechanism of the public key cache pool ensure the efficient acquisition and use of public keys, significantly improving the encryption speed and security. The adaptive encryption strategy and concurrent processing optimization of the encryption processing module enable it to select the optimal encryption scheme according to different data characteristics and business requirements, effectively handle high-concurrency scenarios, and improve the encryption efficiency and data transmission timeliness. The four functional modules cooperate closely and optimize each other, comprehensively enhancing the comprehensive performance of data transmission encryption from data caching, public key management, encryption strategy to high-concurrency processing, meeting the strict requirements of modern businesses for efficient and secure data transmission.
[0102] In this embodiment, a data encryption and transmission device is also provided. This device is used to implement the above-mentioned embodiment and preferred implementation manners, and those that have been described will not be repeated. As used hereinafter, the term "module" can be a combination of software and / or hardware that can achieve a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware is also possible and contemplated.
[0103] This embodiment provides a data encryption and transmission device, as Figure 6 shown, including:
[0104] An acquisition module 601, configured to acquire a target data request and a feature sequence of the target data request;
[0105] A selection module 602, configured to input the feature sequence into an initial model, determine an encryption strategy, and select a target cache strategy from preset cache strategies; the preset cache strategies include a linked list strategy and a shared cache pool strategy;
[0106] A determination module 603, configured to determine a target cache block corresponding to the target data request based on the target cache strategy;
[0107] A cache module 604, configured to write the target data corresponding to the target data request into the target cache block;
[0108] An encryption module 605, configured to select a target public key based on the encryption strategy; and encrypt the target data using the target public key.
[0109] In some alternative implementation manners, the encryption module 605 includes:
[0110] A selection unit for selecting a target public key from a public key cache pool; the public key storage policies of the public key cache pool include a linked list policy and a shared cache pool policy.
[0111] In some alternative embodiments, the data encryption transmission device further includes:
[0112] A priority determination module for determining the priorities of respective target data requests when encrypting target data corresponding to at least one target data request;
[0113] A priority encryption module for encrypting the target data corresponding to respective target data requests based on the priorities.
[0114] In some alternative embodiments, the determination module 603 includes:
[0115] A first determination unit for determining the number of target cache blocks based on the feature sequence of the target data request to select a target cache linked list; the number of nodes of the target cache linked list corresponds to the number of target cache blocks;
[0116] A mapping relationship establishment unit for establishing a mapping relationship between the target cache linked list and the cache blocks, and determining the target cache blocks based on the mapping relationship.
[0117] In some alternative embodiments, the determination module 603 includes:
[0118] A second determination unit for determining the target features of the target cache blocks based on the feature sequence of the target data request; the target features include a target size and a target quantity;
[0119] A selection unit for selecting preset cache blocks matching the target features from a data shared cache pool as the target cache blocks.
[0120] In some alternative embodiments, the data encryption transmission device further includes:
[0121] A compression module for performing data compression on the encrypted target data.
[0122] In some alternative embodiments, the feature sequence of the target data request includes at least one of a data volume size, a data type, an access frequency, and an access pattern.
[0123] The further function descriptions of the above respective modules and units are the same as those in the corresponding foregoing embodiments, and will not be elaborated herein.
[0124] The data encryption and transmission device in this embodiment is presented in the form of functional units. Here, the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and a memory that execute one or more software or fixed programs, and / or other devices that can provide the above functions.
[0125] An embodiment of the present invention further provides a computer device having the above Figure 6 shown data encryption and transmission device.
[0126] Please refer to Figure 7 , Figure 7 which is a schematic structural diagram of a computer device provided by an alternative embodiment of the present invention. As shown in Figure 7 , the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including a high-speed interface and a low-speed interface. Each component communicates with each other using different buses and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed within the computer device, including instructions stored in the memory or on the memory to display graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In some alternative embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (such as a server array, a set of blade servers, or a multi-processor system). Figure 7 In
[0127] FIG. 1, a processor 10 is taken as an example.
[0128] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0129] The memory 20 may include a program storage area and a data storage area. The program storage area may store an operating system and application programs required for at least one function. The data storage area may store data created according to the use of the computer device and the like. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some alternative embodiments, the memory 20 may optionally include a memory remotely disposed relative to the processor 10, and these remote memories may be connected to the computer device through a network. Examples of the above network include but are not limited to the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0130] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk, or a solid-state drive; the memory 20 may further include a combination of the above types of memories.
[0131] The computer device further includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30, and the output device 40 may be connected through a bus or other means. Figure 7 Taking connection through a bus as an example.
[0132] The input device 30 may receive input digital or character information, and generate key signal inputs related to the user settings and function controls of the computer device, such as a touch screen, a keypad, a mouse, a trackpad, a touchpad, a pointing stick, one or more mouse buttons, a trackball, a joystick, etc. The output device 40 may include a display device, an auxiliary lighting device (e.g., an LED), and a haptic feedback device (e.g., a vibration motor), etc. The above display device includes but is not limited to a liquid crystal display, a light-emitting diode, a display, and a plasma display. In some alternative embodiments, the display device may be a touch screen.
[0133] Embodiments of the present invention also provide a computer-readable storage medium. The method according to the embodiments of the present invention can be implemented in hardware, firmware, or be implemented as computer code that can be recorded on a storage medium, or be implemented as computer code that is originally stored in a remote storage medium or a non-transitory machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored as such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid-state drive, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code, and when the software or computer code is accessed and executed by the computer, the processor, or the hardware, the method shown in the above embodiments is implemented.
[0134] A part of the present invention can be applied as a computer program product, such as computer program instructions, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should be able to understand that the forms in which computer program instructions exist in a computer-readable medium include, but are not limited to, source files, executable files, installation package files, etc. Correspondingly, the ways in which computer program instructions are executed by a computer include, but are not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Herein, the computer-readable medium can be any available computer-readable storage medium or communication medium accessible to the computer.
[0135] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations all fall within the scope defined by the appended claims.
Claims
1. A data encryption and transmission method, characterized in that, The method includes: Obtaining a target data request and a feature sequence of the target data request; Inputting the feature sequence into an initial model, determining an encryption policy, and selecting a target caching policy from preset caching policies; the preset caching policies include a linked list policy and a shared cache pool policy; Determining a target cache block corresponding to the target data request based on the target caching policy; Writing the target data corresponding to the target data request into the target cache block; Selecting a target public key based on the encryption policy; encrypting the target data using the target public key.
2. The method according to claim 1, characterized in that The selecting of the target public key includes: Selecting a target public key from a public key cache pool; the public key storage policy of the public key cache pool includes a linked list policy and a shared cache pool policy.
3. The method according to claim 1, wherein The method further includes: When encrypting the target data corresponding to at least one target data request, determining the priorities of the respective target data requests; And encrypting the target data corresponding to the respective target data requests based on the priorities.
4. The method according to claim 1, wherein In the case where the target caching policy is a linked list management policy, the determining of the target cache block corresponding to the target data request based on the target caching policy includes: Determining the number of the target cache blocks based on the feature sequence of the target data request to select a target cache linked list; the number of nodes of the target cache linked list corresponds to the number of the target cache blocks; Establishing a mapping relationship between the target cache linked list and the cache blocks, and determining the target cache block based on the mapping relationship.
5. The method according to claim 1, characterized in that In the case where the target caching policy is a shared cache pool policy, the determining of the target cache block corresponding to the target data request based on the target caching policy includes: Determining target features of the target cache block based on the feature sequence of the target data request; the target features include a target size and a target number; Selecting a preset cache block matching the target features from a data sharing cache pool as the target cache block.
6. The method according to claim 1, characterized in that, The method further includes: Performing data compression on the encrypted target data.
7. The method according to claim 1, characterized in that The feature sequence of the target data request includes at least one of a data volume size, a data type, an access frequency, and an access pattern.
8. A data encryption and transmission device, characterized in that, The apparatus includes: An obtaining module, configured to obtain a target data request and a feature sequence of the target data request; A selecting module, configured to input the feature sequence into an initial model, determine an encryption policy, and select a target caching policy from preset caching policies; the preset caching policies include a linked list policy and a shared cache pool policy; A determining module, configured to determine a target cache block corresponding to the target data request based on the target caching policy; A caching module, configured to write the target data corresponding to the target data request into the target cache block; An encrypting module, configured to select a target public key from a public key cache pool based on the encryption policy; encrypting the target data using the target public key.
9. A computer device, characterized in that, Includes: A memory and a processor, which are communicatively connected to each other. Computer instructions are stored in the memory, and the processor executes the computer instructions to perform the data encryption transmission method according to any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, Computer instructions are stored on the computer-readable storage medium, and the computer instructions are used to cause a computer to execute the data encryption transmission method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Data processing method and device
CN113297210A
Data processing method and device based on big data analysis, equipment and storage medium
CN119227104A
Data mapping using trust services
US20140101713A1