Data encryption processing method and device, electronic device, and storage medium

By adding new encryption algorithm components and updating encryption scheduling configuration files to the data encryption system, the problem of cumbersome update of encryption algorithms and inability to parse data is solved, convenient update of encryption logic and efficient encryption and decryption of data is achieved, and the flexibility of the system is improved. Sex and efficiency.

CN114969780BInactive Publication Date: 2024-11-08BANK OF CHINA
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202210547020.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-19
Publication Date
2024-11-08
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

In the prior art, the updating of encryption algorithms is too cumbersome, and the data cannot be directly parsed and used by the new encryption algorithm after the update.

Method used

By adding the encryption algorithm components of the new encryption algorithm, responding to user configuration modification operations, modifying the encryption scheduling configuration file, judging and updating the algorithm number of all stored encrypted data, ensuring that the data can be decrypted and encrypted by the new encryption algorithm, realizing data logic and system The separation of logic simplifies the update process.

Benefits of technology

It realizes convenient updates of encryption logic, ensures that data can be parsed and encrypted by new encryption algorithms, solves the problem that data cannot be used directly, and improves the flexibility and efficiency of the system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114969780B_ABST
    Figure CN114969780B_ABST
Patent Text Reader

Abstract

The present application discloses a data encryption processing method and device, an electronic device, and a storage medium, which can be applied to the field of artificial intelligence or the financial field. The method includes: adding an encryption algorithm component of a new encryption algorithm; responding to a user's configuration modification operation, and modifying a configuration file using information of the encryption algorithm component of the new encryption algorithm; if it is currently necessary to encrypt and update all stored encrypted data, then decrypt all stored encrypted data in batches based on the configuration file, and then encrypt them using the new encryption algorithm; update the algorithm number corresponding to each stored encrypted data to the number of the new encryption algorithm; if not required, then whenever any target data is read, decrypt the target data and return it, and then encrypt it based on the encryption scheduling configuration file; update the algorithm number corresponding to the target data to the number of the new encryption algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data encryption technology, and in particular to a data encryption processing method and device, electronic equipment, and storage medium. Background Art

[0002] When storing data, banking software systems often involve some sensitive data, such as user passwords and other private information. Therefore, when storing this data, it is usually necessary to encrypt the data using an encryption algorithm.

[0003] Currently, in order to encrypt data, corresponding encryption logic is added to the system logic, so that when storing data, the data is encrypted using the corresponding encryption algorithm before being stored. Therefore, when the encryption algorithm is updated, the encryption logic in the system logic needs to be adjusted accordingly.

[0004] However, due to the rapid development of current software technology, the iteration of encryption algorithms is also rapid. Adjusting the encryption logic in the system logic is inherently cumbersome, and frequent adjustments are even more cumbersome. In addition, since the stored data is directly encrypted by the encryption algorithm, there is a problem that the stored encryption cannot be parsed by the new encryption algorithm and cannot be used directly. Summary of the invention

[0005] Based on the above-mentioned deficiencies of the prior art, the present application provides a data encryption processing method and device, an electronic device, and a storage medium to solve the problem that the updating algorithm of the prior art is too cumbersome and the updated data cannot be directly used.

[0006] In order to achieve the above objectives, this application provides the following technical solutions:

[0007] The first aspect of the present application provides a data encryption processing method, comprising:

[0008] Add encryption algorithm components for new encryption algorithms;

[0009] In response to a configuration modification operation by a user, modifying the encryption scheduling configuration file using information of the encryption algorithm component of the new encryption algorithm;

[0010] Based on the encryption scheduling configuration file, determining whether to currently perform encryption update on all stored encrypted data;

[0011] If it is determined that all the stored encrypted data are currently being encrypted and updated, then based on the encryption scheduling configuration file, all the stored encrypted data are decrypted in batches, and then all the stored encrypted data are encrypted using the new encryption algorithm;

[0012] Updating the algorithm number corresponding to each of the stored encrypted data to the number of the new encryption algorithm;

[0013] If it is determined that all stored encrypted data are not currently encrypted and updated, then whenever any target data is read, the target data is decrypted and returned, and then the target data is encrypted using the new encryption algorithm based on the encryption scheduling configuration file; wherein the target data refers to the stored encrypted data whose corresponding algorithm number is inconsistent with the number of the new encryption algorithm;

[0014] The algorithm number corresponding to the target data is updated to the number of the new encryption algorithm.

[0015] Optionally, in the above-mentioned data encryption processing method, after decrypting all the stored encrypted data in batches based on the encryption scheduling configuration file, encrypting all the stored encrypted data using the new encryption algorithm includes:

[0016] Batch reading out each of the stored encrypted data;

[0017] Decrypting each of the stored encrypted data using the decryption algorithms corresponding to the algorithm numbers corresponding to the stored encrypted data;

[0018] Based on the encryption scheduling configuration file, each of the stored encrypted data is encrypted using the new encryption algorithm.

[0019] Optionally, in the above data encryption processing method, whenever any target data is read, the target data is decrypted and returned, and then the target data is encrypted using the new encryption algorithm based on the encryption scheduling configuration file, including:

[0020] Whenever any of the stored encrypted data is read, determining whether the algorithm number corresponding to the stored encrypted data is consistent with the number of the new encryption algorithm;

[0021] If the algorithm number corresponding to the stored encrypted data is inconsistent with the number of the new encryption algorithm, the stored encrypted data is determined as the target data;

[0022] Decrypting the target data using the decryption algorithm corresponding to the algorithm number corresponding to the target data, and returning the decrypted target data;

[0023] Based on the encryption scheduling configuration file, the target encrypted data is encrypted using the new encryption algorithm.

[0024] Optionally, in the above data encryption processing method, it also includes:

[0025] If it is determined that encryption update is not currently performed on all stored encrypted data, and the encryption scheduling configuration file includes the name of the current encrypted data table, each of the stored encrypted data in the data table corresponding to the name of the current encrypted data table is determined as the currently processed data;

[0026] Decrypting each of the currently processed data using the decryption algorithms corresponding to the algorithm numbers corresponding to the currently processed data;

[0027] Based on the encrypted scheduling configuration file, encrypt each of the currently processed data using the new encryption algorithm;

[0028] The algorithm number corresponding to each of the currently processed data is updated to the number of the new encryption algorithm.

[0029] Optionally, in the above data encryption processing method, before adding the encryption algorithm component of the new encryption algorithm, it also includes:

[0030] Add the encryption algorithm component of the initial encryption algorithm;

[0031] In response to a configuration modification operation by a user, initializing the encrypted scheduling configuration file using information of an encryption algorithm component of the initial encryption algorithm;

[0032] Whenever receiving data to be encrypted, encrypting the data to be encrypted using the encryption algorithm indicated by the encryption scheduling configuration file;

[0033] The encrypted data to be encrypted is stored, and the algorithm number corresponding to the data to be encrypted is recorded as the number of the encryption algorithm indicated by the encryption scheduling configuration file.

[0034] A second aspect of the present application provides a data encryption processing device, comprising:

[0035] A first adding unit, used for adding an encryption algorithm component of a new encryption algorithm;

[0036] A configuration modification unit, configured to respond to a configuration modification operation of a user and modify the encryption scheduling configuration file using information of an encryption algorithm component of the new encryption algorithm;

[0037] A first determination unit, configured to determine whether to currently perform encryption update on all stored encrypted data based on the encryption scheduling configuration file;

[0038] A batch update unit, configured to, if it is determined that encryption update is currently being performed on all the stored encrypted data, decrypt all the stored encrypted data in batches based on the encryption scheduling configuration file, and then encrypt all the stored encrypted data using the new encryption algorithm;

[0039] A first number updating unit, used to update the algorithm number corresponding to each of the stored encrypted data to the number of the new encryption algorithm;

[0040] A first encryption update unit is configured to, if it is determined that encryption update is not currently performed on all stored encrypted data, decrypt the target data and return it whenever any target data is read, and then encrypt the target data using the new encryption algorithm based on the encryption scheduling configuration file; wherein the target data refers to the stored encrypted data whose corresponding algorithm number is inconsistent with the number of the new encryption algorithm;

[0041] The second number updating unit is used to update the algorithm number corresponding to the target data to the number of the new encryption algorithm.

[0042] Optionally, in the above-mentioned data encryption processing device, the batch update unit includes:

[0043] A reading unit, used for batch reading out each of the stored encrypted data;

[0044] A first decryption unit, configured to decrypt each of the stored encrypted data using a decryption algorithm corresponding to an algorithm number corresponding to each of the stored encrypted data;

[0045] The second encryption updating unit is used to encrypt each of the stored encrypted data using the new encryption algorithm based on the encryption scheduling configuration file.

[0046] Optionally, in the above-mentioned data encryption processing device, the first encryption update unit includes:

[0047] A second judgment unit is used to judge whether the algorithm number corresponding to the stored encrypted data is consistent with the number of the new encryption algorithm whenever any of the stored encrypted data is read;

[0048] A first determining unit, configured to determine the stored encrypted data as target data when the algorithm number corresponding to the stored encrypted data is inconsistent with the number of the new encryption algorithm;

[0049] A second decryption unit, used to decrypt the target data using the decryption algorithm corresponding to the algorithm number corresponding to the target data, and return the decrypted target data;

[0050] The first encryption update subunit is used to encrypt the target encrypted data using the new encryption algorithm based on the encryption scheduling configuration file.

[0051] Optionally, in the above-mentioned data encryption processing device, it also includes:

[0052] A second determining unit is configured to, when it is determined that encryption update is not currently performed on all stored encrypted data and the encryption scheduling configuration file includes a current encrypted data table name, determine each of the stored encrypted data in the data table corresponding to the current encrypted data table name as the current processing data;

[0053] A third decryption unit, configured to decrypt each of the currently processed data using a decryption algorithm corresponding to an algorithm number corresponding to each of the currently processed data;

[0054] A third encryption updating unit, configured to encrypt each of the currently processed data using the new encryption algorithm based on the encryption scheduling configuration file;

[0055] The third number updating unit updates the algorithm number corresponding to each of the currently processed data to the number of the new encryption algorithm.

[0056] Optionally, in the above-mentioned data encryption processing device, it also includes:

[0057] A second adding unit, used for adding an encryption algorithm component of an initial encryption algorithm;

[0058] an initialization unit, configured to respond to a configuration modification operation by a user and initialize the encrypted scheduling configuration file using information of an encryption algorithm component of the initial encryption algorithm;

[0059] an encryption unit, configured to encrypt the data to be encrypted using the encryption algorithm indicated by the encryption scheduling configuration file whenever receiving the data to be encrypted;

[0060] The storage unit is used to store the encrypted data to be encrypted, and record that the algorithm number corresponding to the data to be encrypted is the number of the encryption algorithm indicated by the encryption scheduling configuration file.

[0061] A third aspect of the present application provides an electronic device, including:

[0062] Memory and processor;

[0063] Wherein, the memory is used to store programs;

[0064] The processor is used to execute the program, and when the program is executed, it is specifically used to implement any one of the data encryption processing methods described above.

[0065] A fourth aspect of the present application provides a computer storage medium for storing a computer program, which, when executed, is used to implement the data encryption processing method as described in any one of the above.

[0066] The embodiment of the present application provides a data encryption processing method. When the encryption algorithm needs to be updated, the encryption algorithm component of the new encryption algorithm is added, and the configuration modification operation of the user is responded to, and the encryption scheduling configuration file is modified using the information of the encryption algorithm component of the new encryption algorithm. The encryption algorithm component can be called based on the encryption scheduling configuration file, so that the data encryption is realized by using the new encryption algorithm, so that the encryption logic is separated from the system logic. When updating, only the encryption algorithm component and the configuration file need to be updated, which is more convenient. And after modifying the configuration file, based on the encryption scheduling configuration file, it is determined whether all the stored encrypted data are currently encrypted and updated. If it is determined that all the stored encrypted data are currently encrypted and updated, then based on the encryption scheduling configuration file, all the stored encrypted data are decrypted in batches, and then all the stored encrypted data are encrypted using the new encryption algorithm. Then, the algorithm number corresponding to each of the stored encrypted data is updated to the number of the new encryption algorithm. If it is determined that all stored encrypted data are not currently encrypted and updated, then whenever any target data is read, the target data is decrypted and returned, and then the target data is encrypted using the new encryption algorithm based on the encryption scheduling configuration file; where the target data refers to the stored encrypted data whose corresponding algorithm number is inconsistent with the number of the new encryption algorithm, and the algorithm number corresponding to the target data is updated to the number of the new encryption algorithm. Thus, the data can be updated to be encrypted using the new encryption algorithm in two ways, and can then be parsed by the new encryption algorithm and used directly. BRIEF DESCRIPTION OF THE DRAWINGS

[0067] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0068] Figure 1 A flowchart of a data encryption processing method provided in an embodiment of the present application;

[0069] Figure 2 A flowchart of an initialization processing method provided in an embodiment of the present application;

[0070] Figure 3A flowchart of a method for batch encryption update provided in an embodiment of the present application;

[0071] Figure 4 A flowchart of a method for encrypting and updating target data provided in an embodiment of the present application;

[0072] Figure 5 A schematic diagram of the structure of a data encryption processing device provided in an embodiment of the present application;

[0073] Figure 6 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0075] In this application, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the statement "comprises a ..." does not exclude the presence of other identical elements in the process, method, article or device including the element.

[0076] The present application embodiment provides a data encryption processing method, such as Figure 1 As shown, the following steps are included:

[0077] S101. Add an encryption algorithm component of a new encryption algorithm.

[0078] It should be noted that in the embodiment of the present application, the encryption logic is carried on an independent encryption algorithm component, thereby separating the encryption logic from the system logic. The encryption algorithm component is called by the algorithm scheduling module according to the encryption scheduling configuration file to encrypt the data.

[0079] Therefore, when the user needs to update the encryption algorithm, it is necessary to add an encryption algorithm component that carries the new encryption algorithm. At this time, the system adds it to the system for subsequent calls.

[0080] S102: In response to the configuration modification operation of the user, the encryption scheduling configuration file is modified using the information of the encryption algorithm component of the new encryption algorithm.

[0081] Because when data needs to be encrypted, the encryption algorithm component indicated by the encryption scheduling configuration file is called to encrypt the data, if you want to call the encryption algorithm component of a new encryption algorithm to encrypt the data, you need to modify the encryption scheduling configuration file using the information of the encryption algorithm component of the new encryption algorithm.

[0082] Optionally, the name or address of the encryption algorithm component in the encryption scheduling configuration file and the number of the encryption algorithm being modified can be modified, that is, the information about the encryption algorithm and the components of the encryption algorithm can be modified to the information of the encryption algorithm component of the new encryption algorithm. Of course, the encryption scheduling configuration file can also include other information, but this information is applicable to any encryption algorithm, so it can be modified or not modified according to the needs.

[0083] The premise for modifying the encrypted scheduling configuration file is that the encrypted scheduling configuration file exists. Therefore, in another embodiment of the present application, when the program is first launched, initialization processing is required. Optionally, the embodiment of the present application provides a method for initialization processing, such as Figure 2 As shown, the following steps are included:

[0084] S201. Add an encryption algorithm component of an initial encryption algorithm.

[0085] S202: In response to the configuration modification operation of the user, the encryption scheduling configuration file is initialized using the information of the encryption algorithm component of the initial encryption algorithm.

[0086] S203. Whenever data to be encrypted is received, the data to be encrypted is encrypted using the encryption algorithm indicated by the encryption scheduling configuration file.

[0087] Specifically, the encryption process is performed in accordance with the instructions of the encryption scheduling configuration file. Therefore, at any time after initialization, regardless of whether the encryption algorithm has been updated, when the data to be encrypted is received, the encryption algorithm indicated by the encryption scheduling configuration file can be used to encrypt the data to be encrypted.

[0088] S204: Store the encrypted data to be encrypted, and record that the algorithm number corresponding to the data to be encrypted is the number of the encryption algorithm indicated by the encryption scheduling configuration file.

[0089] In order to facilitate the subsequent decryption of the encrypted data and determine which encryption algorithm the data was encrypted with, it is necessary to record the algorithm number corresponding to the encrypted data.

[0090] S103: Based on the encryption scheduling configuration file, determine whether to perform encryption update on all stored encrypted data.

[0091] The stored encrypted data refers to the encrypted data in the stored data.

[0092] Since the new encryption algorithm has been updated, in order to facilitate the subsequent use of the stored encrypted data, the corresponding decryption algorithm of the new encryption algorithm can be directly used for decryption. Therefore, you can configure in the encryption scheduling configuration file whether to immediately use the new encryption algorithm to re-encrypt all the stored encrypted data. Of course, you can also choose to use the stored data when it is used, and then re-encrypt it with the new encryption algorithm while returning the stored data.

[0093] Therefore, if it is determined that all the stored encrypted data are currently being encrypted and updated, step S104 is executed. If it is determined that all the stored encrypted data are currently not being encrypted and updated, step S106 is executed.

[0094] Optionally, data encryption indication information may be configured in the encryption scheduling configuration file, and when the data encryption indication information in the encryption scheduling configuration file is a preset identifier, it is determined that all stored encrypted data is currently encrypted and updated. When the data encryption indication information in the encryption scheduling configuration file is not a preset identifier, it is determined that all stored encrypted data is not currently encrypted and updated.

[0095] S104. After decrypting all stored encrypted data in batches based on the encryption scheduling configuration file, all stored encrypted data are encrypted using a new encryption algorithm.

[0096] Specifically, the encryption algorithm component is called based on the encryption scheduling configuration file. At this time, the encryption algorithm component of the new encryption algorithm will be called to batch encrypt all stored encrypted data, and the encryption process is to encrypt all stored encrypted data using the new encryption algorithm.

[0097] Optionally, in another embodiment of the present application, a specific implementation of step S104 is as follows: Figure 3 As shown, including:

[0098] S301, batch read out each stored encrypted data.

[0099] Since the database may also store unencrypted data, it is necessary to first read out the stored encrypted data in batches, then encrypt and update them, and then update them back to the database.

[0100] S302: Decrypt each stored encrypted data using the decryption algorithm corresponding to the algorithm number corresponding to each stored encrypted data.

[0101] It should be noted that the encryption algorithm and the decryption algorithm correspond to each other, so the two correspond to the same number, and therefore the corresponding decryption algorithm can be determined according to the algorithm number.

[0102] Since the currently stored encrypted data is still encrypted using the previous old encryption algorithm, it is necessary to first determine which old encryption algorithm was used to encrypt it using the algorithm number corresponding to each stored encrypted data, and then further determine the decryption algorithm. Only after encrypting it using the corresponding decryption algorithm can it be encrypted again.

[0103] S303: Based on the encryption scheduling configuration file, encrypt each stored encrypted data using a new encryption algorithm.

[0104] S105: Update the algorithm number corresponding to each stored encrypted data to the number of the new encryption algorithm.

[0105] Since each stored encrypted data has been updated to data encrypted by the new encryption algorithm, the corresponding algorithm numbers need to be updated to the numbers of the new encryption algorithms in order to know which encryption algorithm the stored encrypted data is currently encrypted by.

[0106] S106. Whenever any target data is read, the target data is decrypted and returned, and then encrypted using a new encryption algorithm based on the encryption scheduling configuration file.

[0107] The target data refers to the stored encrypted data whose corresponding algorithm number is inconsistent with the number of the new encryption algorithm.

[0108] Since some data may not be read for a long time, the necessity of encrypting and updating it is low, so you can choose to encrypt and update it when the data is read. However, since some data may not be replaced for the first time after updating to the new encryption algorithm, that is, some data may have been encrypted and updated before, and the corresponding algorithm number is consistent with the number of the new encryption algorithm, it does not need to be encrypted and updated again. Instead, you only need to encrypt and update the stored data that is read for the first time, that is, only the stored encrypted data whose corresponding algorithm number is inconsistent with the number of the new encryption algorithm.

[0109] Therefore, if the target data is read, the target data is decrypted first. Since the target data is requested to be read at this time, the decrypted data needs to be returned first, and then the encryption algorithm component of the new encryption algorithm is called based on the encryption scheduling configuration file to encrypt the decrypted data. The encryption process is to encrypt the target data using the new encryption algorithm.

[0110] Optionally, in another embodiment of the present application, a specific implementation of step S106 is as follows: Figure 4 As shown, including:

[0111] S401. Whenever any stored encrypted data is read, determine whether the algorithm number corresponding to the stored encrypted data is consistent with the number of the new encryption algorithm.

[0112] If it is determined that the algorithm number corresponding to the stored encrypted data is inconsistent with the number of the new encryption algorithm, step S402 is executed. If it is determined that the algorithm number corresponding to the stored encrypted data is consistent with the number of the new encryption algorithm, since the decrypted stored encrypted data needs to be returned to respond to the read request, the decryption algorithm corresponding to the new encryption algorithm can be used to decrypt and return it.

[0113] S402: Determine the stored encrypted data as target data.

[0114] S403: Decrypt the target data using the decryption algorithm corresponding to the algorithm number corresponding to the target data, and return the decrypted target data.

[0115] S404: Based on the encryption scheduling configuration file, encrypt the target encrypted data using a new encryption algorithm.

[0116] Optionally, in another embodiment of the present application, the user may also configure an encryption scheduling configuration file to implement immediate encryption update of some of the stored encrypted data according to needs, while updating some of the data later when it is used. For example, for commonly used data, choose to encrypt and update immediately, and for infrequently used data, choose to update it when it is read. Therefore, in another embodiment of the present application, when executing step S103 and determining that encryption update is not currently being performed on all stored encrypted data, before executing step S106, further execution may be performed: determining whether the encryption scheduling configuration file includes the name of the current encrypted data table.

[0117] The name of the currently encrypted data table is the table where the currently updated data is located. Of course, using the data table as a unit for configuration is only one of the optional methods, and other dimensions can also be used to select part of the data for immediate update.

[0118] Therefore, if it is determined that the encryption scheduling configuration file includes multiple current encryption data table names, each stored encrypted data in the data table corresponding to the current encryption data table name will be determined as the current processing data, and the decryption algorithm corresponding to the algorithm number corresponding to each current processing data will be used to decrypt each current processing data. Then, based on the encryption scheduling configuration file, each current processing data will be encrypted using the new encryption algorithm. Finally, the algorithm number corresponding to each current processing data will be updated to the number of the new encryption algorithm.

[0119] As for other stored encrypted data, encryption update will be performed subsequently through step S106, that is, when being read, it will be treated as target data for update processing.

[0120] S107. Update the algorithm number corresponding to the target data to the number of the new encryption algorithm.

[0121] Similarly, since the target data has been changed to data encrypted by the new encryption algorithm, the algorithm number corresponding to the target data also needs to be updated to the number of the new encryption algorithm.

[0122] The embodiment of the present application provides a data encryption processing method. When the encryption algorithm needs to be updated, the encryption algorithm component of the new encryption algorithm is added, and the configuration modification operation of the user is responded to, and the encryption scheduling configuration file is modified using the information of the encryption algorithm component of the new encryption algorithm. The encryption algorithm component can be called based on the encryption scheduling configuration file, so that the data encryption is realized by using the new encryption algorithm, so that the encryption logic is separated from the system logic. When updating, only the encryption algorithm component and the configuration file need to be updated, which is more convenient. And after modifying the configuration file, based on the encryption scheduling configuration file, it is determined whether all the stored encrypted data are currently encrypted and updated. If it is determined that all the stored encrypted data are currently encrypted and updated, then based on the encryption scheduling configuration file, all the stored encrypted data are decrypted in batches, and then all the stored encrypted data are encrypted using the new encryption algorithm. Then, the algorithm number corresponding to each of the stored encrypted data is updated to the number of the new encryption algorithm. If it is determined that all stored encrypted data are not currently encrypted and updated, then whenever any target data is read, the target data is decrypted and returned, and then the target data is encrypted using the new encryption algorithm based on the encryption scheduling configuration file; where the target data refers to the stored encrypted data whose corresponding algorithm number is inconsistent with the number of the new encryption algorithm, and the algorithm number corresponding to the target data is updated to the number of the new encryption algorithm. Thus, the data can be updated to be encrypted using the new encryption algorithm in two ways, and can then be parsed by the new encryption algorithm and used directly.

[0123] Another embodiment of the present application provides a data encryption processing device, such as Figure 5 As shown, including:

[0124] The first adding unit 501 is used to add an encryption algorithm component of a new encryption algorithm.

[0125] The configuration modification unit 502 is used to respond to the configuration modification operation of the user and modify the encryption scheduling configuration file using the information of the encryption algorithm component of the new encryption algorithm.

[0126] The first determination unit 503 is configured to determine whether to perform encryption update on all stored encrypted data based on the encryption scheduling configuration file.

[0127] The batch update unit 504 is used to decrypt all the stored encrypted data in batches based on the encryption scheduling configuration file, and then encrypt all the stored encrypted data using a new encryption algorithm if it is determined that all the stored encrypted data is currently being encrypted and updated.

[0128] The first number updating unit 505 is used to update the algorithm number corresponding to each stored encrypted data to the number of the new encryption algorithm.

[0129] The first encryption update unit 506 is used to, if it is determined that the encryption update is not currently performed on all the stored encrypted data, decrypt the target data and return it whenever any target data is read, and then encrypt the target data using the new encryption algorithm based on the encryption scheduling configuration file. The target data refers to the stored encrypted data whose corresponding algorithm number is inconsistent with the number of the new encryption algorithm.

[0130] The second number updating unit 507 is used to update the algorithm number corresponding to the target data to the number of the new encryption algorithm.

[0131] Optionally, in the data encryption processing device provided in another embodiment of the present application, the batch update unit includes:

[0132] The reading unit is used to read out each stored encrypted data in batches.

[0133] The first decryption unit is used to decrypt each stored encrypted data by using the decryption algorithm corresponding to the algorithm number corresponding to each stored encrypted data.

[0134] The second encryption update unit is used to encrypt each stored encrypted data using a new encryption algorithm based on the encryption scheduling configuration file.

[0135] Optionally, in a data encryption processing device provided in another embodiment of the present application, the first encryption update unit includes:

[0136] The second judgment unit is used to judge whether the algorithm number corresponding to the stored encrypted data is consistent with the number of the new encryption algorithm whenever any stored encrypted data is read.

[0137] The first determination unit is used to determine the stored encrypted data as target data when the algorithm number corresponding to the stored encrypted data is inconsistent with the number of the new encryption algorithm.

[0138] The second decryption unit is used to decrypt the target data using the decryption algorithm corresponding to the algorithm number corresponding to the target data, and return the decrypted target data.

[0139] The first encryption update subunit is used to encrypt the target encrypted data using a new encryption algorithm based on the encryption scheduling configuration file.

[0140] Optionally, in another embodiment of the present application, the data encryption processing device further includes:

[0141] The second determination unit is used to determine each stored encrypted data in the data table corresponding to the current encrypted data table name as the current processing data when it is determined that encryption update is not currently performed on all stored encrypted data and the encryption scheduling configuration file includes the current encrypted data table name.

[0142] The third decryption unit is used to decrypt each currently processed data by using the decryption algorithm corresponding to the algorithm number corresponding to each currently processed data.

[0143] The third encryption updating unit is used to encrypt each currently processed data by using a new encryption algorithm based on the encryption scheduling configuration file.

[0144] The third number updating unit updates the algorithm number corresponding to each currently processed data to the number of the new encryption algorithm.

[0145] Optionally, in another embodiment of the present application, the data encryption processing device further includes:

[0146] The second adding unit is used to add an encryption algorithm component of the initial encryption algorithm.

[0147] The initialization unit is used to respond to the user's configuration modification operation and initialize the encrypted scheduling configuration file using the information of the encryption algorithm component of the initial encryption algorithm.

[0148] The encryption unit is used to encrypt the data to be encrypted using the encryption algorithm indicated by the encryption scheduling configuration file whenever receiving the data to be encrypted.

[0149] The storage unit is used to store the encrypted data to be encrypted, and record that the algorithm number corresponding to the data to be encrypted is the number of the encryption algorithm indicated by the encryption scheduling configuration file.

[0150] It should be noted that the specific working process of each unit provided in the above embodiments of the present application can refer to the corresponding steps in the above method embodiments, which will not be repeated here.

[0151] Another embodiment of the present application provides an electronic device, such as Figure 6 As shown, including:

[0152] Memory 601 and processor 602 .

[0153] The memory 601 is used to store programs.

[0154] The processor 602 is used to execute the program stored in the memory 601. When the program is executed, it is specifically used to implement the data encryption processing method provided in any one of the above embodiments.

[0155] Another embodiment of the present application provides a computer storage medium for storing a computer program. When the computer program is executed, it is used to implement the data encryption processing method provided in any of the above embodiments.

[0156] Computer storage media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0157] It should be noted that the data encryption processing method and device, electronic device, and storage medium provided by the present invention can be used in the field of artificial intelligence or finance. The above is only an example and does not limit the application field of the data encryption processing method and device, electronic device, and storage medium provided by the present invention.

[0158] 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 this application.

[0159] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A data encryption processing method, It is characterized in that include: Add encryption algorithm components for new encryption algorithms; In response to a configuration modification operation by a user, modifying the encryption scheduling configuration file using information of the encryption algorithm component of the new encryption algorithm; Based on the encryption scheduling configuration file, determining whether to currently perform encryption update on all stored encrypted data; If it is determined that all the stored encrypted data are currently being encrypted and updated, then based on the encryption scheduling configuration file, all the stored encrypted data are decrypted in batches, and then all the stored encrypted data are encrypted using the new encryption algorithm; Updating the algorithm number corresponding to each of the stored encrypted data to the number of the new encryption algorithm; If it is determined that all stored encrypted data are not currently encrypted and updated, then whenever any target data is read, the target data is decrypted and returned, and then the target data is encrypted using the new encryption algorithm based on the encryption scheduling configuration file; wherein the target data refers to the stored encrypted data whose corresponding algorithm number is inconsistent with the number of the new encryption algorithm; The algorithm number corresponding to the target data is updated to the number of the new encryption algorithm.

2. The method according to claim 1, It is characterized in that The step of decrypting all the stored encrypted data in batches based on the encryption scheduling configuration file and then encrypting all the stored encrypted data using the new encryption algorithm comprises: Batch reading out each of the stored encrypted data; Decrypting each of the stored encrypted data using the decryption algorithms corresponding to the algorithm numbers corresponding to the stored encrypted data; Based on the encryption scheduling configuration file, each of the stored encrypted data is encrypted using the new encryption algorithm.

3. The method according to claim 1, It is characterized in that Whenever any target data is read, the target data is decrypted and returned, and then the target data is encrypted using the new encryption algorithm based on the encryption scheduling configuration file, including: Whenever any of the stored encrypted data is read, determining whether the algorithm number corresponding to the stored encrypted data is consistent with the number of the new encryption algorithm; If the algorithm number corresponding to the stored encrypted data is inconsistent with the number of the new encryption algorithm, the stored encrypted data is determined as the target data; Decrypting the target data using the decryption algorithm corresponding to the algorithm number corresponding to the target data, and returning the decrypted target data; Based on the encryption scheduling configuration file, the target encrypted data is encrypted using the new encryption algorithm.

4. The method according to claim 1, It is characterized in that Also includes: If it is determined that encryption update is not currently performed on all stored encrypted data, and the encryption scheduling configuration file includes the name of the current encrypted data table, each of the stored encrypted data in the data table corresponding to the name of the current encrypted data table is determined as the currently processed data; Decrypting each of the currently processed data using the decryption algorithms corresponding to the algorithm numbers corresponding to the currently processed data; Based on the encrypted scheduling configuration file, encrypt each of the currently processed data using the new encryption algorithm; The algorithm number corresponding to each of the currently processed data is updated to the number of the new encryption algorithm.

5. The method according to claim 1, It is characterized in that Before adding the encryption algorithm component of the new encryption algorithm, the method further includes: Add the encryption algorithm component of the initial encryption algorithm; In response to a configuration modification operation by a user, initializing the encrypted scheduling configuration file using information of an encryption algorithm component of the initial encryption algorithm; Whenever receiving data to be encrypted, encrypting the data to be encrypted using the encryption algorithm indicated by the encryption scheduling configuration file; The encrypted data to be encrypted is stored, and the algorithm number corresponding to the data to be encrypted is recorded as the number of the encryption algorithm indicated by the encryption scheduling configuration file.

6. A data encryption processing device, It is characterized in that include: A first adding unit, used for adding an encryption algorithm component of a new encryption algorithm; A configuration modification unit, configured to respond to a configuration modification operation of a user and modify the encryption scheduling configuration file using information of an encryption algorithm component of the new encryption algorithm; A first determination unit, configured to determine whether to currently perform encryption update on all stored encrypted data based on the encryption scheduling configuration file; A batch update unit, configured to, if it is determined that encryption update is currently being performed on all the stored encrypted data, decrypt all the stored encrypted data in batches based on the encryption scheduling configuration file, and then encrypt all the stored encrypted data using the new encryption algorithm; A first number updating unit, used to update the algorithm number corresponding to each of the stored encrypted data to the number of the new encryption algorithm; A first encryption update unit is configured to, if it is determined that encryption update is not currently performed on all stored encrypted data, decrypt the target data and return it whenever any target data is read, and then encrypt the target data using the new encryption algorithm based on the encryption scheduling configuration file; wherein the target data refers to the stored encrypted data whose corresponding algorithm number is inconsistent with the number of the new encryption algorithm; The second number updating unit is used to update the algorithm number corresponding to the target data to the number of the new encryption algorithm.

7. The device according to claim 6, It is characterized in that The batch update unit comprises: A reading unit, used for batch reading out each of the stored encrypted data; A first decryption unit, configured to decrypt each of the stored encrypted data using a decryption algorithm corresponding to an algorithm number corresponding to each of the stored encrypted data; The second encryption updating unit is used to encrypt each of the stored encrypted data using the new encryption algorithm based on the encryption scheduling configuration file.

8. The device according to claim 6, It is characterized in that The first encryption update unit includes: A second judgment unit is used to judge whether the algorithm number corresponding to the stored encrypted data is consistent with the number of the new encryption algorithm whenever any of the stored encrypted data is read; A first determining unit, configured to determine the stored encrypted data as target data when the algorithm number corresponding to the stored encrypted data is inconsistent with the number of the new encryption algorithm; A second decryption unit, used to decrypt the target data using the decryption algorithm corresponding to the algorithm number corresponding to the target data, and return the decrypted target data; The first encryption update subunit is used to encrypt the target encrypted data using the new encryption algorithm based on the encryption scheduling configuration file.

9. An electronic device, It is characterized in that include: Memory and processor; Wherein, the memory is used to store programs; The processor is used to execute the program, and when the program is executed, it is specifically used to implement the data encryption processing method as described in any one of claims 1 to 5.

10. A computer storage medium, It is characterized in that Used to store a computer program, which, when executed, is used to implement the data encryption processing method as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Cloud storage data access control method, attribute certificate issuing method and system

    CN109818757A

  • Parameter configuration method and device, and computer readable storage medium

    CN112016102A

  • System security encryption and decryption method and device, computer equipment and storage medium

    CN114297686A

  • Data transmission encryption and decryption method and device, equipment and storage medium

    CN114417382A

  • Systems, Methods, and Devices for Encrypting Database Data

    US20180096164A1