Data encryption method, device and equipment and computer readable storage medium

By determining the encryption level based on the data type and size and selecting the appropriate encryption algorithm, the problem of poor effectiveness of existing encryption algorithms is solved, and more efficient data encryption is achieved, combining security and performance optimization.

CN119066683AInactive Publication Date: 2024-12-03SHANDONG LANGCHAO YUNTOU INFORMATION TECH CO LTD

Patent Information

Application Number
CN202411275996.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-12
Publication Date
2024-12-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing encryption algorithms have poor encryption effects during data encryption, which fails to effectively combine user needs and data application scenarios, resulting in poor encryption performance.

Method used

According to the type and size of the target data, determine its security level and performance requirements parameters, determine the encryption level through the encryption mapping method, and select a suitable encryption algorithm for encryption. Combining the security and performance parameters of the encryption algorithm, optimize the encryption level and encryption algorithm choose.

Benefits of technology

The effect of data encryption is improved, and by considering security and performance, a more efficient encryption process is achieved to adapt to the needs of different data types and application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119066683A_ABST
    Figure CN119066683A_ABST
Patent Text Reader

Abstract

The invention discloses a data encryption method, device and equipment and a computer readable storage medium, which are applied to the technical field of data security, and the method comprises the following steps: determining a security level parameter of target data according to a data type corresponding to the target data; the data type is a parameter determined according to a user demand and a data application scene; determining performance demand level parameters of the target data according to the data size corresponding to the target data; determining an encryption level of the target data according to the security level parameter and the performance demand level parameter; determining an encryption algorithm corresponding to the encryption level according to an encryption mapping method, and encrypting the target data by using the encryption algorithm; the encryption mapping method is a method for determining the corresponding relation between the encryption grade and the encryption algorithm. Compared with the current encryption algorithm which is randomly selected for encryption, the encryption algorithm corresponding to each piece of data is determined according to the security parameter and the performance parameter of the data, so that the security and the performance are both considered when the data is encrypted, and the encryption effect is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data security technology, and in particular to a data encryption method, device, equipment and computer-readable storage medium. Background Art

[0002] With the rapid development of information technology, data security has become an important issue. As an important means to ensure data security, the selection of encryption algorithms is related to the security and efficiency of information systems. There are many existing encryption algorithms, including symmetric encryption, asymmetric encryption and other forms. Each algorithm has its own characteristics and scope of application. Currently, when encrypting data, it is often randomly selected, and some data may be too highly encrypted, which affects the encryption performance.

[0003] It can be seen that how to improve the targeted encryption of data and improve the encryption effect is a problem that technical personnel in this field need to solve. Summary of the invention

[0004] In view of this, an object of the present invention is to provide a data encryption method, device, equipment and computer-readable storage medium to solve the technical problem of poor encryption effect in the prior art.

[0005] In order to solve the above technical problems, the present invention provides a data encryption method, comprising:

[0006] Determine the security level parameter of the target data according to the data type corresponding to the target data; wherein the data type is a parameter determined according to user needs and data application scenarios;

[0007] Determining a performance requirement level parameter of the target data according to a data size corresponding to the target data;

[0008] Determining the encryption level of the target data according to the security level parameter and the performance requirement level parameter;

[0009] The encryption algorithm corresponding to the encryption level is determined according to the encryption mapping method, and the target data is encrypted using the encryption algorithm; wherein the encryption mapping method is a method for determining the corresponding relationship between the encryption level and the encryption algorithm.

[0010] Optionally, determining the security level parameter of the target data according to the data type corresponding to the target data includes:

[0011] When the data type of the target data is state confidential information, determining the security level parameter of the target data to be a first security parameter;

[0012] When the data type of the target data is personal privacy information, determining that the security level parameter of the target data is a second security parameter; wherein the second security parameter is smaller than the first security parameter;

[0013] When the data type of the target data is website public information, the security level parameter of the target data is determined to be a third security parameter; wherein the third security parameter is smaller than the second security parameter.

[0014] Optionally, determining the performance requirement level parameter of the target data according to the data size corresponding to the target data includes:

[0015] When the data size of the target data is greater than the set maximum data size, determining the performance requirement level parameter to be the first performance requirement parameter;

[0016] When the data size of the target data is larger than the set minimum data size and smaller than or equal to the set maximum data size, determining the performance requirement level parameter to be a second performance requirement parameter; wherein the second performance requirement parameter is larger than the first performance requirement parameter;

[0017] When the data size of the target data is less than or equal to the set minimum data size, the performance requirement level parameter is determined to be a third performance requirement parameter; wherein the third performance requirement parameter is greater than the second performance requirement parameter.

[0018] Optionally, determining the performance requirement level parameters of the target data includes:

[0019] The performance requirement level parameter corresponding to the target data is determined based on the data size corresponding to the target data and the response time requirement corresponding to the target data; wherein the response time requirement is the response time required for encryption to be completed.

[0020] Optionally, determining the encryption level of the target data according to the security level parameter and the performance requirement level parameter includes:

[0021] Determining a first weight of the security level parameter and a second weight corresponding to the performance requirement level parameter;

[0022] The encryption level of the target data is determined based on the first weight, the second weight, the security level parameter and the performance requirement level parameter.

[0023] Optionally, before determining the encryption algorithm corresponding to the encryption level according to the encryption mapping method and encrypting the target data using the encryption algorithm, the method further includes:

[0024] Determine the security parameters and performance parameters of the encryption algorithm; wherein the security parameters are parameters determined according to the key length and anti-attack capability, and the performance parameters are parameters determined according to the encryption and decryption speed;

[0025] Determine comprehensive parameters based on security parameters and performance parameters corresponding to each encryption algorithm;

[0026] Determining an encryption level for each encryption algorithm based on the comprehensive parameters;

[0027] Determine the corresponding relationship between the encryption level of the data and the encryption level of each encryption algorithm to obtain an encryption mapping relationship; wherein the encryption mapping method includes the encryption mapping relationship.

[0028] Optionally, the data encryption method further includes:

[0029] Monitor and audit the encryption process and obtain encryption reports;

[0030] The security problem is located based on the encryption report, and / or the encryption level of the encryption algorithm is adjusted based on the encryption report.

[0031] The present invention also provides a data encryption device, comprising:

[0032] A security level parameter determination module, used to determine the security level parameter of the target data according to the data type corresponding to the target data; wherein the data type is a parameter determined according to user needs and data application scenarios;

[0033] A performance requirement level parameter determination module, used to determine the performance requirement level parameter of the target data according to the data size corresponding to the target data;

[0034] An encryption level determination module, used to determine the encryption level of the target data according to the security level parameter and the performance requirement level parameter;

[0035] The encryption algorithm determination module is used to determine the encryption algorithm corresponding to the encryption level according to the encryption mapping method, and encrypt the target data using the encryption algorithm; wherein the encryption mapping method is a method for determining the corresponding relationship between the encryption level and the encryption algorithm.

[0036] The present invention also provides a data encryption device, comprising:

[0037] Memory for storing computer programs;

[0038] A processor is used to execute the computer program to implement the steps of the above data encryption method.

[0039] The present invention also provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned data encryption method are implemented.

[0040] The purpose of the embodiments of the present invention is to provide a data encryption method, device, equipment and computer-readable storage medium, which can solve the technical problem of poor encryption effect.

[0041] To solve the above technical problems, an embodiment of the present invention provides a data encryption method, comprising: determining a security level parameter of the target data according to a data type corresponding to the target data; wherein the data type is a parameter determined according to user requirements and data application scenarios; determining a performance requirement level parameter of the target data according to a data size corresponding to the target data; determining an encryption level of the target data according to the security level parameter and the performance requirement level parameter; determining an encryption algorithm corresponding to the encryption level according to an encryption mapping method, and encrypting the target data using the encryption algorithm; wherein the encryption mapping method is a method for determining the correspondence between the encryption level and the encryption algorithm.

[0042] It can be seen from the above technical scheme that the beneficial effects of the present invention are: by determining the security level parameters of the target data according to user needs and data application scenarios, determining the performance requirement level parameters according to the data size, and thus determining the encryption level based on the security level parameters and the performance requirement level parameters, thereby determining the encryption algorithm corresponding to the encryption level. Since the present invention takes into account both security and encryption performance when encrypting, the data encryption effect can be improved. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0044] Figure 1 A flowchart of a data encryption method provided by an embodiment of the present invention;

[0045] Figure 2 An example flow chart of a data encryption method provided by an embodiment of the present invention;

[0046] Figure 3 A schematic diagram of the structure of a data encryption device provided by an embodiment of the present invention;

[0047] Figure 4 A schematic diagram of the structure of a data encryption device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0048] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0049] The terms "including" and "having" in the specification of the present invention and the above-mentioned drawings, as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device including a series of steps or units is not limited to the listed steps or units, but may include steps or units that are not listed.

[0050] In order to enable those skilled in the art to better understand the solution of the present invention, the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.

[0051] Next, a flow chart of a data encryption method provided by an embodiment of the present invention is introduced in detail. Figure 1 A flowchart of a data encryption method provided by an embodiment of the present invention, the data encryption method may include:

[0052] S101, determining a security level parameter of the target data according to a data type corresponding to the target data; wherein the data type is a parameter determined according to user requirements and data application scenarios.

[0053] The execution subject of this embodiment is an electronic device. This embodiment does not limit the specific electronic device. The electronic device in this embodiment can be a computer; or the electronic device in this embodiment can also be a mobile phone, etc. This embodiment does not limit the specific target data. For example, the target data in this embodiment can be internal enterprise data; or the target data in this embodiment can also be personal information data; or the target data in this embodiment can also be system operation data. This embodiment does not limit the specific data type. For example, the data type in this embodiment can be ordinary data, which refers to data with relatively low sensitivity and limited impact on national security, social order, public interests, etc. after leakage, tampering or destruction. This type of data is usually oriented to a wide range of usage scenarios and does not require special protection measures. Application scenarios: corporate marketing data, ordinary internal communication records, etc., are all ordinary data. These data may cause certain business impacts after leakage, but will not pose a threat to national security or social public interests; or the data type in this embodiment can also be important data, which is data in a specific field, a specific group or with a certain accuracy and scale, and once leaked or tampered with, it may directly endanger national security, economic operation, social stability, public health and safety. For example, a large-scale collection of personal information, operational data of critical infrastructure, etc. Application scenarios: Customer transaction records of financial institutions, patient health information of medical institutions, etc. are all important data. The leakage of such data will not only have a significant impact on the relevant institutions, but may also have serious consequences for the entire society. The data type in this embodiment can also be core data. Core data is data that has a fundamental impact on national security or the national economy. Once it is illegally used or shared, it may directly affect political security. This type of data has high coverage, high precision, and large scale, and is the most important strategic resource for the country. Application scenarios: National-level scientific research project data, defense-related confidential information, blueprints and configuration information of key infrastructure, etc. are all core data. These data involve the fundamental interests of the country and require the highest level of protection. This embodiment does not specify the security level parameter, as long as the security level can distinguish the security level of the target data. For example, the security level parameter in this embodiment can be level one, level two, or level three; or the security level parameter in this embodiment can be a specific score, and the higher the score, the higher the encryption security required. This embodiment can use storage encryption services such as transparent data encryption (TDE) for target data stored on the cloud platform. For data transmitted between cloud platforms or between cloud platforms and clients, transport layer encryption should be used. (4) During data transmission and storage, the following encryption methods can be used: a. Encryption during transmission: Use protocols such as SSL / TLS (cryptographic communication framework) to encrypt data transmission. The client and server exchange certificates and generate session keys through handshake.b. Encryption in storage: Encrypt data storage, such as using an encrypted file system or encrypted database. This protects data from unauthorized access by ensuring that data is always encrypted in storage, and keeps data secure even if the storage media is illegally obtained. c. Database encryption: Encrypt sensitive columns in the database, such as through the Transparent Data Encryption (TDE) feature of the SQL database, which can automatically encrypt and decrypt data without affecting the application, thereby protecting sensitive information stored in the database.

[0054] It should be further explained that, in order to improve the accuracy of determining the security level parameter, the above-mentioned determination of the security level parameter of the target data according to the data type corresponding to the target data may include: when the data type of the target data is state confidential information, determining the security level parameter of the target data as the first security parameter; when the data type of the target data is personal private information, determining the security level parameter of the target data as the second security parameter; wherein the second security parameter is less than the first security parameter; when the data type of the target data is website public information, determining the security level parameter of the target data as the third security parameter; wherein the third security parameter is less than the second security parameter. This embodiment does not limit the specific method for determining the data type. For example, this embodiment can be determined by data identification, or this embodiment can also be determined according to the source of the data. In this embodiment, the first security parameter is greater than the second security parameter and greater than the third security parameter. This embodiment divides the data into the first security parameter, the second security parameter and the third security parameter according to the different data types. Since the embodiment of the present invention provides specific security level parameters corresponding to different data types, the accuracy of determining the security level parameters can be improved.

[0055] S102, determining the performance requirement level parameters of the target data according to the data size corresponding to the target data.

[0056] In this embodiment, the data size is an important indicator that describes the storage space occupied by the data or the bandwidth required during the transmission process. It is understandable that the larger the data is, the longer the encryption time is, and the smaller the performance requirement level parameter is. The performance requirement level parameter of this embodiment is to determine the size of the performance required to encrypt the target data, that is, how fast the data needs to be processed and transmitted. In the high-speed data processing and transmission scenario, it may be necessary to select a more efficient encryption algorithm to reduce the performance overhead of the encryption and decryption process.

[0057] Functions that require further explanation, in order to improve the accuracy of determining the performance requirement level parameters, the above-mentioned determination of the performance requirement level parameters of the target data according to the data size corresponding to the target data may include: when the data size of the target data is greater than the set maximum data size, determining the performance requirement level parameter as the first performance requirement parameter; when the data size of the target data is greater than the set minimum data size, and less than or equal to the set maximum data size, determining the performance requirement level parameter as the second performance requirement parameter; wherein the second performance requirement parameter is greater than the first performance requirement parameter; when the data size of the target data is less than or equal to the set minimum data size, determining the performance requirement level parameter as the third performance requirement parameter; wherein the third performance requirement parameter is greater than the second performance requirement parameter. This embodiment divides the performance requirement level into three levels according to the data size, namely the first performance requirement parameter, the second performance requirement parameter and the third performance requirement parameter. Among them, the larger the target data, the lower the corresponding performance requirement parameter. It can be understood that, generally speaking, the longer the key length, the higher the security strength, but the corresponding amount of calculation will also increase, resulting in slower encryption and decryption speeds. Therefore, when the security requirements are relatively high and the data is relatively large, by making the performance requirement parameters smaller, the security of the corresponding encryption algorithm can be appropriately reduced, thereby ensuring both encryption speed and encryption security.

[0058] It should be further explained that, in order to improve the accuracy of determining the performance requirement level parameters, the above-mentioned determination of the performance requirement level parameters of the target data according to the data size corresponding to the target data may include: determining the performance requirement level parameters corresponding to the target data according to the data size corresponding to the target data and the response time requirement corresponding to the target data; wherein the response time requirement is the response time required for encryption to be completed. It can be understood that the response time requirement is the time required for the user to quickly encrypt the target data. The shorter the time, the higher the performance requirement. At this time, it is necessary to consider the performance of encryption more and appropriately reduce the security of encryption. At this time, the performance requirement level parameters can be appropriately reduced, so that the comprehensive score is lower and the performance of the corresponding encryption algorithm is higher.

[0059] S103, determining the encryption level of the target data according to the security level parameter and the performance requirement level parameter.

[0060] This embodiment does not limit the specific method of determining the encryption level of the target data according to the security level parameter and the performance requirement level parameter. For example, this embodiment can set different weights for the security level parameter and the performance requirement level parameter, so as to determine the comprehensive parameter according to the security level parameter and the performance requirement level parameter, and determine the encryption level based on the comprehensive parameter. This embodiment does not limit the number of encryption levels. For example, the encryption level in this embodiment can be divided into level 1 encryption, level 2 encryption, and level 3 encryption; or the encryption level in this embodiment can also be divided into level 1 encryption, level 2 encryption, level 3 encryption, and level 4 encryption. When determining the encryption level, the encryption level can be determined based on the parameter range in which the comprehensive parameter is located. For example, if the comprehensive parameter is greater than the preset maximum threshold parameter, it is determined as the highest level, and if the comprehensive parameter is less than the minimum threshold parameter, it is determined as the lowest level.

[0061] It should be further explained that, in order to improve the accuracy of encryption level determination, the above-mentioned determination of the encryption level of the target data according to the security level parameter and the performance requirement level parameter may include: determining a first weight of the security level parameter and a second weight corresponding to the performance requirement level parameter; determining the encryption level of the target data based on the first weight, the second weight, the security level parameter and the performance requirement level parameter. It is understandable that the higher the user's security requirements, the greater the first weight of the security level parameter is than the second weight of the performance requirement level parameter, or the higher the user's performance requirements, the greater the second weight is than the first weight. This embodiment assigns different weights to the security level parameter and the performance requirement level parameter to obtain an encryption level that better meets the user's needs and improves the user's experience.

[0062] S104, determining an encryption algorithm corresponding to an encryption level according to an encryption mapping method, and encrypting the target data using the encryption algorithm; wherein the encryption mapping method is a method for determining a corresponding relationship between an encryption level and an encryption algorithm.

[0063] This embodiment does not limit the specific encryption algorithm. For example, the encryption algorithm in this embodiment may be a symmetric encryption algorithm. Symmetric encryption (such as AES (Advanced Encryption Standard)) is usually used in scenarios with large data volume and fast processing speed because its computational complexity is low; or the encryption algorithm in this embodiment may also be an asymmetric encryption algorithm; and asymmetric encryption (such as RSA (Rivest-Shamir-Adleman, which is an asymmetric encryption algorithm)) has higher security, but has a large computational overhead and is suitable for encryption of critical data or the encryption algorithm in this embodiment may also be a double-layer dynamic encryption algorithm, which achieves a balance between data encryption security and performance through dynamic key generation and adaptive encryption level adjustment. Specific steps: Initial key generation: Generate a pair of public and private keys using an asymmetric encryption algorithm (such as RSA). The public key is used to encrypt a temporary symmetric key during data transmission, and the private key is used for server-side decryption. Generate a primary key K1 (such as AES-128 bits) for symmetric encryption for preliminary encryption of actual data. Dynamically adjust the length and complexity of the symmetric encryption key according to the sensitivity and security requirements of the data. For example, AES-128 bits are used for general data, and AES-256 bits are used for sensitive data. Automatically adjust the key generation strategy based on real-time security assessment results (considering network attacks, data transmission frequency, etc.). Adaptive encryption level: Set the threshold of the encryption level and select the appropriate encryption algorithm and key length according to the current system load and processing power. For example, when the system load is low, longer keys and more complex algorithms can be used; when the load is high, the encryption complexity can be appropriately reduced to improve performance. Introduce machine learning models to analyze historical data and predict the best encryption configuration scheme, so as to achieve adaptive optimization of encryption performance. Encryption process: The client uses a symmetric encryption algorithm and primary key K1 to quickly encrypt data. The encrypted data and primary key are transmitted together, and the primary key is asymmetrically encrypted with the server public key. After receiving the data, the server first uses the private key to decrypt to obtain the primary key K1, and then uses K1 to decrypt to obtain the original data. Regularly update the asymmetric key pair to increase the difficulty of cracking. The stored data is re-encrypted with different symmetric keys, and the key encapsulation technology is used to protect the security of these keys. Example: Assume that a company needs to encrypt and protect its customer information database, including sensitive data such as name, address, and phone number. Using a two-layer dynamic encryption algorithm, the data is first encrypted with an AES-128-bit key, then the AES key is encrypted with an RSA public key, and finally both are transmitted to the server. The server first decrypts the AES key with an RSA private key, and then uses the key to decrypt the original data. During the entire process, the system automatically adjusts the encryption parameters according to the current security status and load to ensure the optimization of security and performance.The double-layer dynamic encryption algorithm in this embodiment can be applied to the second highest encryption level below the highest encryption level. The encryption algorithm in this embodiment can also be hash encryption. This embodiment determines the encryption algorithm corresponding to the encryption level according to the encryption mapping method, and can determine the comprehensive encryption parameters corresponding to each encryption method according to the security and encryption speed of each encryption method, so that the encryption level of the encryption method can be divided according to the comprehensive encryption parameters, so that the encryption algorithm can be determined according to the encryption level of the encryption method and the encryption level of the target data. This embodiment can formulate and implement encryption strategies, which are the key to ensure the integrity and consistency of data encryption. This includes selecting appropriate encryption algorithms, key lengths and key management practices, and ensuring that the encryption process complies with relevant regulations and industry standards.

[0064] This embodiment can also process the encrypted target data, such as encryption and decoding, encryption conversion, etc., which involves reversible or irreversible conversion of ciphertext to meet different security requirements and data usage scenarios. These processing steps need to follow the encryption algorithm and protocol to ensure the integrity and security of the data during the encryption process.

[0065] Before determining the encryption algorithm, this embodiment can also review and update the encryption algorithm to ensure that the encryption algorithm always meets the latest security requirements. The storage key management system can also be used to generate, distribute, store, rotate and destroy keys. In order to ensure the security of the key, the KMS (Key Management Service) may need to use a hardware security module (HSM) or a secure key management system. The KMS should support automated key management processes to reduce human errors.

[0066] It should be further explained that, in order to improve the accuracy of encryption algorithm determination, before the encryption algorithm corresponding to the encryption level is determined according to the encryption mapping method, and the target data is encrypted using the encryption algorithm, it can also include: determining the security parameters and performance parameters of the encryption algorithm; wherein the security parameters are parameters determined according to the key length and anti-attack capability, and the performance parameters are parameters determined according to the encryption and decryption speed; based on the security parameters and performance parameters corresponding to each encryption algorithm, a comprehensive parameter is determined; the encryption level of each encryption algorithm is determined according to the comprehensive parameter; the corresponding relationship between the encryption level of the data and the encryption level of each encryption algorithm is determined to obtain an encryption mapping relationship; wherein the encryption mapping method includes the encryption mapping relationship. In this embodiment, when determining the security parameters, the key length and anti-attack capability are considered at the same time. The anti-attack capability refers to resisting common attack methods such as exhaustive attack, dictionary attack, and brute force cracking. The anti-attack capability can be determined according to the number of attack methods that can be resisted. The performance parameter in this embodiment is the encryption and decryption speed. In this embodiment, when determining the encryption level of the encryption algorithm, the security parameters and performance parameters are considered at the same time, so that the determined encryption level can correspond to the encryption level of the target data, thereby improving the accuracy of the encryption algorithm determination.

[0067] It is necessary to further include the following steps: monitoring and auditing the encryption process to obtain an encryption report; locating security issues based on the encryption report, and / or adjusting the encryption level of the encryption algorithm based on the encryption report. The embodiments of the present invention record and monitor key operations in the encryption process to promptly detect and respond to potential data security incidents. Monitoring and auditing the encryption process is key to ensuring the effectiveness and compliance of encryption measures. This includes recording all details of encryption operations, such as encryption algorithms, key management, encryption and decryption activities, etc. By regularly reviewing these records, potential security threats can be detected, the effectiveness of encryption strategies can be evaluated, and encryption measures can be adjusted as needed to maintain data security. At the same time, compliance audits also ensure that encryption practices comply with relevant laws, regulations and industry standards.

[0068] It should be further explained that the data encryption method provided by the embodiment of the present invention may also include: Regular security assessment is a key step in evaluating the strength of the encryption scheme, which helps to discover and repair security risks in the encryption process. Through simulated attacks, vulnerability scanning and security testing, organizations can identify weaknesses in encryption strategies and implementations, and thus take measures to strengthen security protection. In addition, as encryption technology and security threats continue to evolve, it is also crucial to optimize encryption schemes to adapt to new security challenges. This may include updating encryption algorithms, improving key management practices, or adopting more advanced security measures. It is also important to establish an emergency response mechanism to deal with problems that may arise during the encryption process. This includes developing detailed emergency response plans and processes to ensure that quick action can be taken in emergency situations such as encryption algorithm leaks, key loss, or security vulnerabilities being exploited. By training employees and conducting emergency drills, organizations can improve their ability to respond to security incidents, thereby minimizing the impact of encryption failures on business operations and data security.

[0069] A data encryption method provided by an embodiment of the present invention may include: S101, determining a security level parameter of target data according to a data type corresponding to the target data; wherein the data type is a parameter determined according to user requirements and data application scenarios; S102, determining a performance requirement level parameter of the target data according to a data size corresponding to the target data; S103, determining an encryption level of the target data according to the security level parameter and the performance requirement level parameter; S104, determining an encryption algorithm corresponding to the encryption level according to an encryption mapping method, and encrypting the target data using the encryption algorithm; wherein the encryption mapping method is a method for determining the correspondence between the encryption level and the encryption algorithm.

[0070] A data encryption method provided by an embodiment of the present invention may include: S101, determining the security level parameter of the target data according to the data type corresponding to the target data; wherein the data type is a parameter determined according to user needs and data application scenarios; S102, determining the performance requirement level parameter of the target data according to the data size corresponding to the target data; S103, determining the encryption level of the target data according to the security level parameter and the performance requirement level parameter; S104, determining the encryption algorithm corresponding to the encryption level according to the encryption mapping method, and encrypting the target data using the encryption algorithm; wherein the encryption mapping method is a method for determining the corresponding relationship between the encryption level and the encryption algorithm. Compared with the current random selection of an encryption method for encryption, or encrypting data only considering security, the present invention determines the security level parameter of the target data according to user needs and data application scenarios, determines the performance requirement level parameter by data size, thereby determining the encryption level based on the security level parameter and the performance requirement level parameter, thereby determining the encryption algorithm corresponding to the encryption level. Since the present invention considers both security and encryption performance when encrypting, the data encryption effect can be improved.

[0071] In order to make the present invention easier to understand, please refer to Figure 2 , Figure 2 An example flow chart of a data encryption method provided by an embodiment of the present invention may specifically include:

[0072] S201, determining the encryption level of each encryption algorithm according to the security parameters and performance parameters of the encryption algorithm.

[0073] S202: Determine the security level parameter of the target data according to the data type of the data to be encrypted.

[0074] The data to be encrypted in this embodiment corresponds to the target data described above. Before determining the data type of the data to be encrypted, this embodiment can also determine whether a customized encryption algorithm is required according to a request, and if so, perform the step of determining the security level parameter of the target data according to the data type of the data to be encrypted. If not, encryption is performed directly according to the set encryption method.

[0075] S203: Determine the performance requirement level parameters of the target data according to the data size of the data to be encrypted.

[0076] S204: Determine the encryption level of the data to be encrypted according to the security level parameter and the performance requirement level parameter.

[0077] S205, using an encryption mapping method to determine an encryption algorithm based on the encryption level of the data to be encrypted and the encryption level of the encryption algorithm, and using the encryption algorithm to encrypt the target data to obtain encrypted data.

[0078] This embodiment can also determine the impact of data encryption on business performance, for example, determine the performance requirements of the encryption algorithm. If the use of the encryption algorithm will affect business performance, the encryption method needs to be adjusted.

[0079] S206, sending the encryption algorithm key to the key management system.

[0080] S207, utilizing the encryption processing layer to process the data when transmitting it.

[0081] The data transmitted in this embodiment may be data to be encrypted or encrypted data.

[0082] The data encryption method provided in the embodiment of the present invention implements customized or general data encryption strategies according to different application scenarios, optimizes encryption performance, realizes decentralized key management, and has flexible data encryption strategies that can adapt to data protection requirements in different scenarios.

[0083] The data encryption device provided by an embodiment of the present invention is introduced below. The data encryption device described below and the data encryption method described above can be referenced to each other.

[0084] Figure 3 A schematic diagram of the structure of a data encryption device provided by an embodiment of the present invention may include:

[0085] The security level parameter determination module 100 is used to determine the security level parameter of the target data according to the data type corresponding to the target data; wherein the data type is a parameter determined according to user requirements and data application scenarios;

[0086] A performance requirement level parameter determination module 200, configured to determine a performance requirement level parameter of the target data according to a data size corresponding to the target data;

[0087] An encryption level determination module 300, configured to determine the encryption level of the target data according to the security level parameter and the performance requirement level parameter;

[0088] The encryption algorithm determination module 400 is used to determine the encryption algorithm corresponding to the encryption level according to the encryption mapping method, and encrypt the target data using the encryption algorithm; wherein the encryption mapping method is a method for determining the corresponding relationship between the encryption level and the encryption algorithm.

[0089] Further, based on the above embodiment, the security level parameter determination module 100 may include:

[0090] A first security parameter determination unit, configured to determine, when the data type of the target data is state confidential information, a security level parameter of the target data as a first security parameter;

[0091] A second security parameter determination unit, configured to determine, when the data type of the target data is personal privacy information, a security level parameter of the target data as a second security parameter; wherein the second security parameter is smaller than the first security parameter;

[0092] A third security parameter determining unit is used to determine, when the data type of the target data is website public information, that the security level parameter of the target data is a third security parameter; wherein the third security parameter is smaller than the second security parameter.

[0093] Further, based on the above embodiment, the performance requirement level parameter determination module 200 may include:

[0094] A first performance requirement parameter determining unit, configured to determine the performance requirement level parameter as a first performance requirement parameter when the data size of the target data is greater than a set maximum data size;

[0095] a second performance requirement parameter determining unit, configured to determine, when the data size of the target data is greater than a set minimum data size and less than or equal to the set maximum data size, that the performance requirement level parameter is a second performance requirement parameter; wherein the second performance requirement parameter is greater than the first performance requirement parameter;

[0096] The third performance requirement parameter determining unit is used to determine that the performance requirement level parameter is a third performance requirement parameter when the data size of the target data is less than or equal to the set minimum data size; wherein the third performance requirement parameter is greater than the second performance requirement parameter.

[0097] Further, based on the above embodiment, the performance requirement level parameter determination module 200 may include:

[0098] A performance requirement level parameter determination unit is used to determine the performance requirement level parameter corresponding to the target data based on the data size corresponding to the target data and the response time requirement corresponding to the target data; wherein the response time requirement is the response time required for encryption to be completed.

[0099] Further, based on any of the above embodiments, the encryption level determination module 300 may include:

[0100] A weight determination unit, used to determine a first weight of the security level parameter and a second weight corresponding to the performance requirement level parameter;

[0101] A weight-based determination unit is used to determine the encryption level of the target data based on the first weight, the second weight, the security level parameter and the performance requirement level parameter.

[0102] Further, based on any of the above embodiments, the above data encryption device may further include:

[0103] A security parameter and performance parameter determination module, used to determine the security parameters and performance parameters of the encryption algorithm; wherein the security parameters are parameters determined according to the key length and anti-attack capability, and the performance parameters are parameters determined according to the encryption and decryption speed;

[0104] A comprehensive parameter determination module, used to determine comprehensive parameters based on security parameters and performance parameters corresponding to each encryption algorithm;

[0105] An encryption level determination module for encryption algorithms, used to determine the encryption level of each encryption algorithm according to the comprehensive parameters;

[0106] The encryption mapping relationship determination module is used to determine the corresponding relationship between the encryption level of the data and the encryption level of each encryption algorithm to obtain the encryption mapping relationship; wherein the encryption mapping method includes the encryption mapping relationship.

[0107] Further, based on any of the above embodiments, the above data encryption device may further include:

[0108] An encryption report determination module is used to monitor and audit the encryption process and obtain an encryption report;

[0109] The encryption level determination module is used to locate the security problem based on the encryption report and / or adjust the encryption level of the encryption algorithm based on the encryption report.

[0110] It should be noted that the order of the modules and units in the above data encryption device can be changed without affecting the logic.

[0111] Figure 3 For the description of the features in the corresponding embodiments, please refer to the relevant description of the embodiments corresponding to the image data encryption, which will not be repeated here.

[0112] The data encryption device provided by the embodiment of the present invention may include: a security level parameter determination module 100, which is used to determine the security level parameter of the target data according to the data type corresponding to the target data; wherein the data type is a parameter determined according to user needs and data application scenarios; a performance requirement level parameter determination module 200, which is used to determine the performance requirement level parameter of the target data according to the data size corresponding to the target data; an encryption level determination module 300, which is used to determine the encryption level of the target data according to the security level parameter and the performance requirement level parameter; an encryption algorithm determination module 400, which is used to determine the encryption algorithm corresponding to the encryption level according to the encryption mapping method, and encrypt the target data using the encryption algorithm; wherein the encryption mapping method is a method for determining the corresponding relationship between the encryption level and the encryption algorithm. Compared with the current random selection of an encryption method for encryption, or only considering security to encrypt data, the present invention determines the security level parameter of the target data according to user needs and data application scenarios, determines the performance requirement level parameter by data size, thereby determining the encryption level based on the security level parameter and the performance requirement level parameter, thereby determining the encryption algorithm corresponding to the encryption level, and since the present invention considers both security and encryption performance when encrypting, the data encryption effect can be improved.

[0113] A data encryption device provided by an embodiment of the present invention is introduced below. The data encryption device described below and the data encryption method described above can refer to each other.

[0114] Figure 4 A schematic diagram of the structure of a data encryption device provided by an embodiment of the present invention, such as Figure 4 As shown, the data encryption device includes: a memory 60 for storing a computer program;

[0115] The processor 61 is used to implement the steps of the data encryption method in the above embodiment when executing a computer program.

[0116] The data encryption device provided in this embodiment may include but is not limited to a smart phone, a tablet computer, a laptop computer, or a desktop computer.

[0117] Among them, the processor 61 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 61 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 61 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 61 may be integrated with a graphics processing unit (GPU), and the GPU is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 61 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.

[0118] The memory 60 may include one or more computer-readable storage media, which may be non-transitory. The memory 60 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In this embodiment, the memory 60 is at least used to store the following computer program 601, wherein, after the computer program is loaded and executed by the processor 61, the relevant steps of the data encryption method disclosed in any of the aforementioned embodiments can be implemented. In addition, the resources stored in the memory 60 may also include an operating system 602 and data 603, etc., and the storage method may be temporary storage or permanent storage. Among them, the operating system 602 may include Windows, Unix, Linux, etc. Data 603 may include but is not limited to target data, etc.

[0119] In some embodiments, the data encryption device may also include a display screen 62 , an input / output interface 63 , a communication interface 64 , a power supply 65 , and a communication bus 66 .

[0120] Those skilled in the art will understand that Figure 4 The structure shown in the figure does not constitute a limitation on the data encryption device, and may include more or fewer components than those shown in the figure.

[0121] It is understandable that if the data encryption method in the above embodiment is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the current technology or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium to execute all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), electrically erasable programmable ROM, register, hard disk, removable disk, CD-ROM, magnetic disk or optical disk and other media that can store program codes.

[0122] Based on this, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned data encryption method are implemented.

[0123] An embodiment of the present invention further provides a computer program product, including a computer program / instruction, which implements the steps of the above data encryption method when executed by a processor.

[0124] The above is a detailed introduction to a data encryption method, device, equipment and computer-readable storage medium provided by an embodiment of the present invention. The various embodiments in the specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same and similar parts between the various embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part description.

[0125] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0126] The above is a detailed introduction to a data encryption method, device, equipment and computer-readable storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present invention, several improvements and modifications can be made to the present invention, and these improvements and modifications also fall within the scope of protection of the claims of the present invention.

Claims

1. A data encryption method, characterized in that: include: Determine the security level parameter of the target data according to the data type corresponding to the target data; wherein the data type is a parameter determined according to user needs and data application scenarios; Determining a performance requirement level parameter of the target data according to a data size corresponding to the target data; Determining the encryption level of the target data according to the security level parameter and the performance requirement level parameter; The encryption algorithm corresponding to the encryption level is determined according to the encryption mapping method, and the target data is encrypted using the encryption algorithm; wherein the encryption mapping method is a method for determining the corresponding relationship between the encryption level and the encryption algorithm.

2. The data encryption method according to claim 1, characterized in that: Determining the security level parameter of the target data according to the data type corresponding to the target data includes: When the data type of the target data is state confidential information, determining the security level parameter of the target data to be a first security parameter; When the data type of the target data is personal privacy information, determining that the security level parameter of the target data is a second security parameter; wherein the second security parameter is smaller than the first security parameter; When the data type of the target data is website public information, the security level parameter of the target data is determined to be a third security parameter; wherein the third security parameter is smaller than the second security parameter.

3. The data encryption method according to claim 1, characterized in that: Determining the performance requirement level parameters of the target data according to the data size corresponding to the target data includes: When the data size of the target data is greater than the set maximum data size, determining the performance requirement level parameter to be the first performance requirement parameter; When the data size of the target data is larger than the set minimum data size and smaller than or equal to the set maximum data size, determining the performance requirement level parameter to be a second performance requirement parameter; wherein the second performance requirement parameter is larger than the first performance requirement parameter; When the data size of the target data is less than or equal to the set minimum data size, the performance requirement level parameter is determined to be a third performance requirement parameter; wherein the third performance requirement parameter is greater than the second performance requirement parameter.

4. The data encryption method according to claim 3, characterized in that: Determining the performance requirement level parameters of the target data according to the data size corresponding to the target data includes: The performance requirement level parameter corresponding to the target data is determined based on the data size corresponding to the target data and the response time requirement corresponding to the target data; wherein the response time requirement is the response time required for encryption to be completed.

5. The data encryption method according to any one of claims 1 to 4, characterized in that: Determining the encryption level of the target data according to the security level parameter and the performance requirement level parameter includes: Determining a first weight of the security level parameter and a second weight corresponding to the performance requirement level parameter; The encryption level of the target data is determined based on the first weight, the second weight, the security level parameter and the performance requirement level parameter.

6. The data encryption method according to claim 1, characterized in that: Before determining the encryption algorithm corresponding to the encryption level according to the encryption mapping method and encrypting the target data using the encryption algorithm, the method further includes: Determine the security parameters and performance parameters of the encryption algorithm; wherein the security parameters are parameters determined according to the key length and anti-attack capability, and the performance parameters are parameters determined according to the encryption and decryption speed; Determine comprehensive parameters based on security parameters and performance parameters corresponding to each encryption algorithm; Determining an encryption level for each encryption algorithm based on the comprehensive parameters; Determine the corresponding relationship between the encryption level of the data and the encryption level of each encryption algorithm to obtain an encryption mapping relationship; wherein the encryption mapping method includes the encryption mapping relationship.

7. The data encryption method according to claim 6, characterized in that: The data encryption method further comprises: Monitor and audit the encryption process and obtain encryption reports; The security problem is located based on the encryption report, and / or the encryption level of the encryption algorithm is adjusted based on the encryption report.

8. A data encryption device, characterized in that: include: A security level parameter determination module, used to determine the security level parameter of the target data according to the data type corresponding to the target data; wherein the data type is a parameter determined according to user needs and data application scenarios; A performance requirement level parameter determination module, used to determine the performance requirement level parameter of the target data according to the data size corresponding to the target data; An encryption level determination module, used to determine the encryption level of the target data according to the security level parameter and the performance requirement level parameter; The encryption algorithm determination module is used to determine the encryption algorithm corresponding to the encryption level according to the encryption mapping method, and encrypt the target data using the encryption algorithm; wherein the encryption mapping method is a method for determining the corresponding relationship between the encryption level and the encryption algorithm.

9. A data encryption device, characterized in that: include: Memory for storing computer programs; A processor, configured to execute the computer program to implement the steps of the data encryption method according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the data encryption method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Method and device for encrypting data

    CN116756761A

  • Data encryption method and device, computer equipment and storage medium

    CN117390657A

Cited By

  • System and method for remotely upgrading program of magnetic suspension molecular pump

    CN119917142A

  • Data transmission method and data transmission encryption and decryption system

    CN119921983A

  • Dynamic switching method and system of security encryption algorithm

    CN120017381A

  • Bus encryption method, device and equipment based on simulated annealing optimization

    CN120811676A

  • Data encryption method, electronic equipment and medium

    CN120979845A