Data encryption method and apparatus, device, and medium
By constructing a matrix graph in the target system of a financial transaction system, and directly querying and determining the symmetric encryption algorithm key, the problem of modifying the system code logic in the existing technology is solved, and the data encryption is fast and efficient.
Patent Information
- Application Number
- PCT/CN2023/136038
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-08-21
- Filing Date
- 2023-12-04
- Publication Date
- 2025-02-27
AI Technical Summary
In the prior art, in financial transaction systems, when there is a new source system access or the value of the existing key changes, the system code logic needs to be modified, the steps are cumbersome and the operation risks are increased.
By constructing a matrix graph in the target system, arranging the source system and business scenario requests into a matrix, directly query and determine the symmetric encryption algorithm key, thereby performing data encryption and avoiding the steps of modifying the system code logic.
It realizes that when there is a new source system access or the value of the existing key changes, it can quickly query and determine the symmetric encryption algorithm key, avoid operational risks, reduce operational costs, and make data encryption fast and efficient.
Smart Images

Figure CN2023136038_27022025_PF_FP_ABST
Abstract
Description
Data encryption method, device, equipment and medium
[0001] This invention claims priority from Chinese patent application number 202311052568.3, filed with the State Intellectual Property Office of the People's Republic of China on August 21, 2023, entitled "A Data Encryption Method, Device, Equipment and Medium," the entire contents of which are incorporated herein by reference. Technical Field
[0002] The present application relates to the field of network security or finance, and in particular to a data encryption method, apparatus, device and medium. Background Art
[0003] Financial transaction systems, including banking systems, contain important information such as citizens' personal information, corporate capital flow information, and social and economic activity information. Therefore, not only must data be strictly reviewed when entering the transaction system, but strict management measures and technical means should also be adopted to protect it during data transmission and use, so as to reduce the risk of illegal access, theft, tampering and damage to data and its transaction systems.
[0004] In related technologies, a financial transaction may originate from different source systems and then be processed by the same target system. To ensure data security during transmission, the source system encrypts the data before sending it to the target system, which then decrypts the encrypted data before processing the transaction. The symmetric encryption algorithm key used during encryption and decryption is agreed upon by both systems.
[0005] However, when a target system needs to receive encrypted data from multiple source systems, it must agree on different symmetric encryption algorithm keys with each source system. When a new source system is added or the value of the existing key changes, the target system must modify its system code logic. Modifying system code logic is not only cumbersome but also increases the operational risk of the target system.
[0006] Summary of the Invention
[0007] In view of this, the embodiments of the present application provide a data encryption method, apparatus, device and medium, which can avoid the step of modifying the system code logic when a new source system is connected or the existing key value changes, and determine the corresponding symmetric encryption algorithm key through a matrix diagram to perform data encryption.
[0008] The embodiments of this application disclose the following technical solutions:
[0009] In a first aspect, the present application provides a data encryption method, applied to a target system, the method comprising:
[0010] In response to a business scenario request issued by a source system, selecting a symmetric encryption algorithm key corresponding to the source system and the business scenario request in the matrix diagram of the target system;
[0011] Data encryption is performed on the data corresponding to the business scenario request according to the symmetric encryption algorithm key.
[0012] Optionally, the method for constructing the matrix diagram specifically includes:
[0013] All source systems are placed as the first row in the matrix diagram, all business scenario requests are placed as the first column in the matrix diagram, and the symmetric encryption algorithm key corresponding to the i-th source system and the j-th business scenario request is placed in the i-th column and j-th row in the matrix diagram to construct a matrix diagram, where i and j are positive integers.
[0014] Optionally, performing data encryption on the data corresponding to the business scenario request according to the symmetric encryption algorithm key includes:
[0015] Converting a combination of the source system, the business scenario request, and the symmetric encryption algorithm key corresponding to the source system and the business scenario request into a target parameter;
[0016] If the source system and / or the business scenario request changes, modify the target parameters;
[0017] According to the modified target parameters, data encryption is performed on target data, where the target data is data corresponding to the business scenario request or the changed business scenario request.
[0018] Optionally, performing data encryption on the data corresponding to the business scenario request according to the symmetric encryption algorithm key includes:
[0019] Identifying sensitive data in the business scenario request, where the sensitive data is data whose sensitivity index is greater than a preset threshold;
[0020] The sensitive data is encrypted according to the symmetric encryption algorithm key.
[0021] Optionally, the symmetric encryption algorithm includes one or more of a Data Encryption Standard algorithm, a Triple Data Encryption Algorithm, and an Advanced Encryption Standard algorithm.
[0022] In a second aspect, the present application provides a data encryption device, applied to a target system, the device comprising: a selection module and an execution module;
[0023] The selection module is configured to select, in response to a business scenario request issued by a source system, a symmetric encryption algorithm key corresponding to the source system and the business scenario request in the matrix diagram of the target system;
[0024] The execution module is used to perform data encryption on the data corresponding to the business scenario request according to the symmetric encryption algorithm key.
[0025] Optionally, the execution module specifically includes: an identification submodule and an encryption submodule;
[0026] The identification submodule is used to identify sensitive data in the business scenario request, where the sensitive data is data whose sensitivity index is greater than a preset threshold;
[0027] The encryption submodule is used to perform data encryption on the sensitive data according to the symmetric encryption algorithm key.
[0028] Optionally, the symmetric encryption algorithm includes one or more of a Data Encryption Standard algorithm, a Triple Data Encryption Algorithm, and an Advanced Encryption Standard algorithm.
[0029] In a third aspect, the present application provides a data encryption device, comprising: a memory and a processor;
[0030] The memory is used to store programs;
[0031] The processor is used to implement the steps of the above-mentioned data encryption method when executing the computer program.
[0032] In a fourth aspect, the present application 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.
[0033] Compared with the existing technology, this application has the following beneficial effects:
[0034] The present application discloses a data encryption method, apparatus, device, and medium. The method comprises: in response to a business scenario request issued by a source system, selecting a symmetric encryption algorithm key corresponding to the source system and the business scenario request in a matrix diagram of a target system; and performing data encryption on the data corresponding to the business scenario request according to the symmetric encryption algorithm key. Thus, by arranging the source systems and business scenario requests that affect the symmetric encryption algorithm key into a matrix diagram, when a new source system is connected or the value of the existing key changes, the step of modifying the system code logic can be circumvented, and the symmetric encryption algorithm key can be directly queried and determined in the matrix diagram, thereby avoiding operational risks, reducing operating costs, and making data encryption fast and efficient. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in this embodiment or the prior art, the following briefly introduces the drawings required for use in the embodiment or the prior art description. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0036] FIG1 is a flow chart of a data encryption method provided in an embodiment of the present application;
[0037] FIG2 is a schematic diagram of a data encryption device provided in an embodiment of the present application;
[0038] FIG3 is a schematic diagram of a computer-readable medium provided in an embodiment of the present application;
[0039] FIG4 is a schematic diagram of the hardware structure of a server provided in an embodiment of the present application. DETAILED DESCRIPTION
[0040] The data encryption method, device, equipment, and medium provided by the present invention can be used in the field of network security or the financial field. The above is only an example and does not limit the application field of the data encryption method, device, equipment, and medium provided by the present invention.
[0041] First, let’s explain the technical terms involved in this application:
[0042] Symmetric Cryptography is a type of encryption algorithm in cryptography that uses the same key for encryption and decryption.
[0043] In related technologies, a financial transaction may originate from different source systems and then be processed by the same target system. To ensure data security during transmission, the source system encrypts the data before sending it to the target system, which then decrypts the encrypted data before processing the transaction. The symmetric encryption algorithm key used during encryption and decryption is agreed upon by both systems.
[0044] However, when a target system needs to receive encrypted data from multiple source systems, it must agree on different symmetric encryption algorithm keys with each source system. When a new source system is added or the value of the existing key changes, the target system must modify its system code logic. Modifying system code logic is not only cumbersome but also increases the operational risk of the target system.
[0045] In view of this, the present application provides a data encryption method, apparatus, device, and medium, the method comprising: in response to a business scenario request issued by a source system, selecting a symmetric encryption algorithm key corresponding to the source system and the business scenario request in a matrix diagram of a target system; and performing data encryption on the data corresponding to the business scenario request according to the symmetric encryption algorithm key. Thus, by arranging the source systems and business scenario requests that affect the symmetric encryption algorithm key into a matrix diagram, when a new source system is connected or the value of the existing key changes, the step of modifying the system code logic can be circumvented, and the symmetric encryption algorithm key can be directly queried and determined in the matrix diagram, thereby avoiding operational risks, reducing operating costs, and making data encryption fast and efficient.
[0046] In order to help those skilled in the art better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. 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 those skilled in the art without creative work are within the scope of protection of this application.
[0047] See Figure 1, which is a flow chart of a data encryption method provided in an embodiment of the present application. The method is applied to a target system and includes:
[0048] S101: In response to a business scenario request issued by a source system, a symmetric encryption algorithm key corresponding to the source system and the business scenario request is selected in a matrix diagram of a target system.
[0049] A symmetric encryption algorithm key refers to the key that both the source and target systems must use to encrypt and decrypt plaintext. In some specific implementations, the symmetric encryption algorithm key can include one or more of the Data Encryption Standard (DES), Triple Encryption, and Advanced Encryption Standard (AES).
[0050] See Table 1, which is a schematic diagram of a matrix diagram provided in an embodiment of the present application. It can be understood that the matrix diagram is constructed based on the source system, the business scenario request, and the symmetric encryption algorithm key corresponding to the source system and the business scenario request. The matrix diagram is constructed by placing all source systems as the first row of the matrix diagram, all business scenario requests as the first column of the matrix diagram, and the symmetric encryption algorithm key corresponding to the i-th source system and the j-th business scenario request in the i-th column and j-th row of the matrix diagram, where i and j are positive integers.
[0051] Table 1
[0052] When receiving a business scenario request from the source system, the target system must select the symmetric encryption algorithm key corresponding to the source system and business scenario request from the matrix diagram. As shown in Table 1, if the received request is from source system A under business scenario 1, then symmetric encryption algorithm key 1 can be selected from the matrix diagram in Table 1; if the received request is from source system B under business scenario 2, then symmetric encryption algorithm key 4 can be selected from the matrix diagram in Table 1.
[0053] It should be noted that this application does not limit the specific source system, business scenario and symmetric encryption algorithm key.
[0054] S102: Perform data encryption on the data corresponding to the business scenario request according to the symmetric encryption algorithm key.
[0055] After selecting the symmetric encryption algorithm key corresponding to the source system and the business scenario request in the matrix diagram of the target system, data encryption can be performed on the data corresponding to the business scenario request based on the symmetric encryption algorithm key.
[0056] It's understandable that even in financial transaction systems, not all data corresponding to business scenario requests is sensitive data. Therefore, the data corresponding to business scenario requests can be filtered and only the data that needs to be encrypted can be encrypted, thereby improving encryption efficiency.
[0057] In some specific implementations, sensitive data in business scenario requests can be first identified. This sensitive data can refer to data with a sensitivity index greater than a preset threshold. This sensitive data can be set by relevant technical personnel, for example, relevant technical personnel can uniformly set the transaction amount as sensitive data; or it can be set by the user according to their own needs, for example, the user can set the user's annual income as sensitive data. It should be noted that this application does not limit the specific sensitive data and its setting method.
[0058] After identifying the sensitive data in the business scenario request, data encryption can be performed on the sensitive data according to the symmetric encryption algorithm key.
[0059] It is understandable that source systems and business scenario requests may also change. If the changes are to the source systems and / or business scenarios included in the matrix, data encryption can be performed directly based on the symmetric encryption algorithm key corresponding to the changed source systems and / or business scenarios.
[0060] If the source system and / or business scenario request changes to a source system and / or business scenario not included in the matrix diagram, then it is necessary to first convert the source system and business scenario request before the change, and the combination of the symmetric encryption algorithm key corresponding to the source system and business scenario request into target parameters; then, modify the target parameters at the same time according to the modification situation; finally, perform data encryption on the target data according to the modified target parameters, where the target data is data corresponding to the business scenario request or the changed business scenario request.
[0061] In summary, the present application discloses a data encryption method, which is applied to a target system and includes: in response to a business scenario request issued by a source system, selecting a symmetric encryption algorithm key corresponding to the source system and the business scenario request in a matrix diagram of the target system; and performing data encryption on the data corresponding to the business scenario request according to the symmetric encryption algorithm key. Thus, by arranging the source systems and business scenario requests that affect the symmetric encryption algorithm key into a matrix diagram, when a new source system is connected or the value of the existing key changes, the step of modifying the system code logic can be circumvented, and the symmetric encryption algorithm key can be directly queried and determined in the matrix diagram, thereby avoiding operational risks, reducing operating costs, and making data encryption fast and efficient.
[0062] 2 , which shows a data encryption device according to an embodiment of the present application. The data encryption device 200 includes a selection module 201 and an execution module 202 .
[0063] Specifically, the selection module 201 is configured to respond to a business scenario request issued by the source system and select a symmetric encryption algorithm key corresponding to the source system and the business scenario request in the matrix diagram of the target system;
[0064] The execution module 202 is configured to perform data encryption on the data corresponding to the business scenario request according to the symmetric encryption algorithm key.
[0065] In some specific implementations, the execution module 202 specifically includes: an identification submodule and an encryption submodule;
[0066] The identification submodule is used to identify sensitive data in business scenario requests. Sensitive data refers to data with a sensitivity index greater than a preset threshold.
[0067] The encryption submodule is used to perform data encryption on sensitive data according to the symmetric encryption algorithm key.
[0068] In some specific implementations, the symmetric encryption algorithm includes one or more of a Data Encryption Standard algorithm, a Triple Data Encryption Algorithm, and an Advanced Encryption Standard algorithm.
[0069] In some specific implementations, the above-mentioned matrix diagram construction device is specifically used to: place all source systems as the first row in the matrix diagram, place all business scenario requests as the first column in the matrix diagram, and place the symmetric encryption algorithm key corresponding to the i-th source system and the j-th business scenario request in the i-th column and j-th row in the matrix diagram to construct a matrix diagram, where i and j are positive integers.
[0070] In some specific implementations, the execution module 202 specifically includes: a conversion submodule, a modification submodule, and a second encryption submodule;
[0071] Specifically, the conversion submodule is used to convert the combination of the source system, the business scenario request, and the symmetric encryption algorithm key corresponding to the source system and the business scenario request into a target parameter;
[0072] The modification submodule is used to modify target parameters if the source system and / or business scenario request changes;
[0073] The second encryption submodule is used to perform data encryption on target data according to the modified target parameters, where the target data is data corresponding to the business scenario request or the changed business scenario request.
[0074] In summary, this application discloses a data encryption device, which is applied to a target system and includes a selection module and an execution module. Thus, by arranging the source systems and business scenario requests that affect the symmetric encryption algorithm key into a matrix diagram, when a new source system is connected or the value of the existing key changes, the step of modifying the system code logic can be circumvented, and the symmetric encryption algorithm key can be directly queried and determined in the matrix diagram, thereby avoiding operational risks, reducing operating costs, and making data encryption fast and efficient.
[0075] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.
[0076] 3 , which is a schematic diagram of a computer-readable medium provided in an embodiment of the present application, wherein the computer-readable medium 300 stores a computer program 311 , which, when executed by a processor, implements the steps of the data encryption method of FIG. 1 .
[0077] It should be noted that in the context of the present application, a machine-readable medium may be a tangible medium that may contain or store a program for use by an instruction execution system, device or equipment or used in conjunction with an instruction execution system, device or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0078] It should be noted that the machine-readable medium mentioned above in this application can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination of the above. More specific examples of computer-readable storage media can include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this application, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or device. In this application, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. This propagated data signal can take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.
[0079] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0080] Referring to Figure 4, which is a schematic diagram of the hardware structure of a server provided in an embodiment of the present application, the server 400 may have relatively large differences due to different configurations or performances, and may include one or more central processing units (CPUs) 422 (for example, one or more processors) and memory 432, and one or more storage media 430 (for example, one or more mass storage devices) storing application programs 440 or data 444. Among them, the memory 432 and the storage medium 430 can be temporary storage or permanent storage. The program stored in the storage medium 430 may include one or more modules (not shown in the figure), and each module may include a series of instruction operations on the server. Furthermore, the central processing unit 422 can be configured to communicate with the storage medium 430 to execute a series of instruction operations in the storage medium 430 on the server 400.
[0081] The server 400 may also include one or more power supplies 426, one or more wired or wireless network interfaces 450, one or more input and output interfaces 458, and / or one or more operating systems 441, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0082] The steps performed by the data encryption method in the above embodiment may be based on the server structure shown in FIG. 4 .
[0083] It should also be noted that, according to embodiments of the present application, the data encryption method described in the flowchart in FIG1 can be implemented as a computer software program. For example, embodiments of the present application include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program including program code for executing the method shown in the flowchart in FIG1 .
[0084] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are merely example forms of implementing the claims.
[0085] Although several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of this application. Certain features described in the context of separate embodiments may also be implemented in combination in a single embodiment. Conversely, various features described in the context of a single embodiment may also be implemented in multiple embodiments individually or in any suitable sub-combination.
[0086] The above description is merely a preferred embodiment of the present application and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure in this application is not limited to the technical solutions formed by a specific combination of the above-mentioned technical features, but also encompasses other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this application.
Claims
1. A data encryption method, characterized in that: Applied to the target system, the method comprises: In response to a business scenario request issued by a source system, selecting a symmetric encryption algorithm key corresponding to the source system and the business scenario request in a matrix diagram of the target system; Data encryption is performed on data corresponding to the business scenario request according to the symmetric encryption algorithm key.
2. The method according to claim 1, characterized in that The method for constructing the matrix diagram specifically includes: All source systems are taken as the first row in the matrix diagram, all business scenario requests are taken as the first column in the matrix diagram, and the symmetric encryption algorithm key corresponding to the i-th source system and the j-th business scenario request is located in the i-th column and the j-th row in the matrix diagram to construct a matrix diagram, where i and j are positive integers.
3. The method according to claim 1 or 2, characterized in that: The performing data encryption on the data corresponding to the business scenario request according to the symmetric encryption algorithm key includes: Converting a combination of the source system, the business scenario request, and the symmetric encryption algorithm key corresponding to the source system and the business scenario request into a target parameter; If the source system and / or the business scenario request changes, modify the target parameter; According to the modified target parameters, data encryption is performed on the target data, where the target data is data corresponding to the business scenario request or the changed business scenario request.
4. The method according to claim 1, characterized in that: The performing data encryption on the data corresponding to the business scenario request according to the symmetric encryption algorithm key includes: Identify sensitive data in the business scenario request, where the sensitive data is data whose sensitivity index is greater than a preset threshold; The sensitive data is encrypted according to the symmetric encryption algorithm key.
5. The method according to claim 1, characterized in that The symmetric encryption algorithm includes one or more of a data encryption standard algorithm, a triple data encryption algorithm and an advanced encryption standard algorithm.
6. A data encryption device, characterized in that: Applied to a target system, the device comprises: a selection module and an execution module; The selection module is used to select a symmetric encryption algorithm key corresponding to the source system and the business scenario request in the matrix diagram of the target system in response to the business scenario request issued by the source system; The execution module is used to perform data encryption on the data corresponding to the business scenario request according to the symmetric encryption algorithm key.
7. The method according to claim 1, characterized in that The execution module specifically includes: an identification submodule and an encryption submodule; The identification submodule is used to identify sensitive data in the business scenario request, where the sensitive data is data whose sensitivity index is greater than a preset threshold; The encryption submodule is used to perform data encryption on the sensitive data according to the symmetric encryption algorithm key.
8. The method according to claim 1, characterized in that: The symmetric encryption algorithm includes one or more of a data encryption standard algorithm, a triple data encryption algorithm and an advanced encryption standard algorithm.
9. A data encryption device, characterized in that: include: Memory and processor; The memory is used to store programs; The processor is used to execute the program to implement each step of the method according to any one of claims 1 to 5.
10. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, each step of the method according to any one of claims 1 to 5 is implemented.
Citation Information
Patent Citations
Encryption method, device and system for financial sensitive data
CN112016104A
Management method and system for encryption and decryption of secret key
CN114357485A
Data processing method based on secure multi-party computing, electronic equipment and storage medium
CN115314202A
Data encryption method based on different business scenes, computer equipment and computer readable storage medium
CN115730349A
Data encryption method and device, equipment and storage medium
CN116186740A
