Data processing method and device based on hardware encryption equipment, computer equipment, readable storage medium and program product
Through the data processing method based on hardware encryption equipment, the preset national secret algorithm is used to encrypt and backup the business data, which solves the problem of low security of data backup in the existing technology and achieves higher security and efficiency.
Patent Information
- Application Number
- CN202411360097.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-27
- Publication Date
- 2024-12-13
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
In the prior art, the data backup process implemented by software has problems with low security and is easily invaded.
The data processing method based on hardware encryption equipment is adopted, and the service data is encrypted and backed up by detecting the access information of the preset hardware encryption equipment, and the preset national secret algorithm is used to encrypt and backup the service data, thereby improving the security of data backup.
Encrypting backup data through hardware encryption devices significantly improves the security of data backup, reduces the risk of data being cracked, and improves the speed and efficiency of encryption and decryption.
Smart Images

Figure CN119128950A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of security technology, and in particular to a data processing method, apparatus, computer equipment, computer-readable storage medium and computer program product based on a hardware encryption device. Background Art
[0002] In the field of data backup and recovery, in order to ensure the security of the backed-up data, the data backup process needs to be encrypted and decrypted. Currently, the way to encrypt the data during the backup process is usually achieved through software. However, when encrypting the backup data through software, the encryption process is easier to be invaded, resulting in low security of data processing.
[0003] Therefore, the current method for backing up data has the defect of low security. Summary of the invention
[0004] Based on this, it is necessary to provide a data processing method, device, computer equipment, computer-readable storage medium and computer program product based on a hardware encryption device that can improve security in response to the above technical problems.
[0005] In a first aspect, the present application provides a data processing method based on a hardware encryption device, the method comprising:
[0006] When receiving a backup instruction for each business data, detecting access information of a preset hardware encryption device; the preset hardware encryption device carries a preset national encryption algorithm;
[0007] When the access information of each of the preset hardware encryption devices is detected, each of the preset national encryption algorithms in each of the preset hardware encryption devices is determined through each of the preset backup programs corresponding to each of the preset hardware encryption devices;
[0008] Loading the corresponding respective preset hardware encryption devices according to the respective business data;
[0009] According to each of the preset national encryption algorithms in each of the preset hardware encryption devices, the corresponding business data are encrypted and backed up.
[0010] In one embodiment, when the access information of each of the preset hardware encryption devices is detected, the preset national encryption algorithms in each of the preset hardware encryption devices are determined through the preset backup programs corresponding to each of the preset hardware encryption devices, including:
[0011] When the access information of each of the preset hardware encryption devices is detected, the access quantity corresponding to each of the preset hardware encryption devices is determined according to the access information;
[0012] Starting a corresponding number of preset backup programs according to the number of accesses;
[0013] Through each preset backup program corresponding to each preset hardware encryption device, each preset national encryption algorithm in each preset hardware encryption device is determined.
[0014] In one embodiment, starting a corresponding number of preset backup programs according to the number of accesses includes:
[0015] For each of the preset hardware encryption devices, loading a device driver corresponding to the preset hardware encryption device;
[0016] According to the device driver, a preset backup program corresponding to the preset hardware encryption device is started.
[0017] In one embodiment, determining each of the preset national encryption algorithms in each of the preset hardware encryption devices through each of the preset backup programs corresponding to each of the preset hardware encryption devices includes:
[0018] For each of the preset hardware encryption devices, register the preset hardware encryption device through the preset backup program to obtain the registered preset hardware encryption device;
[0019] The registered preset hardware encryption device is bound to the preset backup program, and the preset national encryption algorithm in the preset hardware encryption device is determined through the preset backup program bound to the preset hardware encryption device.
[0020] In one embodiment, the loading of the corresponding respective preset hardware encryption devices according to the respective business data includes:
[0021] For each piece of business data, obtaining a business type corresponding to the business data;
[0022] According to the service type, a preset algorithm mapping table is queried to determine a preset service level corresponding to the service type; the preset algorithm mapping table includes various preset service levels corresponding to various service types, and each service level represents the importance corresponding to each service type;
[0023] Determine the corresponding target preset national encryption algorithm according to the preset service level;
[0024] Load the preset hardware encryption device corresponding to the target preset national encryption algorithm.
[0025] In one embodiment, the encrypting and backing up the corresponding business data according to the preset national encryption algorithms in the preset hardware encryption devices includes:
[0026] For each of the business data, encrypt the business data according to a preset national encryption algorithm corresponding to the business data to obtain the encrypted business data;
[0027] The encrypted business data are written into a preset backup file to back up the encrypted business data.
[0028] In a second aspect, the present application provides a data processing device based on a hardware encryption device, the device comprising:
[0029] A receiving module, configured to detect access information of a preset hardware encryption device when receiving a backup instruction for each service data; the preset hardware encryption device carries a preset national encryption algorithm;
[0030] A detection module, configured to, when access information of each of the preset hardware encryption devices is detected, determine each of the preset national encryption algorithms in each of the preset hardware encryption devices through each of the preset backup programs corresponding to each of the preset hardware encryption devices;
[0031] A loading module, used for loading the corresponding respective preset hardware encryption devices according to the respective business data;
[0032] The backup module is used to encrypt and back up the corresponding business data according to the preset national encryption algorithms in the preset hardware encryption devices.
[0033] In a third aspect, the present application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.
[0034] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.
[0035] In a fifth aspect, the present application provides a computer program product, including a computer program, which implements the steps of the above method when executed by a processor.
[0036] The data processing method, device, computer device, computer-readable storage medium and computer program product based on the hardware encryption device described above, when backing up business data, after detecting the access information of the preset hardware encryption device, determine the preset national secret algorithm in the preset hardware encryption device through the preset backup program, load the preset hardware encryption device corresponding to the business data, and encrypt and backup the corresponding business data according to the preset national secret algorithm in each preset hardware encryption device. Compared with the traditional method of backing up through software, this solution detects the access information of the preset hardware encryption device, uses the backup program to load the national secret algorithm in the device, and uses the national secret algorithm in the hardware encryption device to encrypt and backup the corresponding business data, thereby achieving the technical effect of improving the security of business data backup. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0038] FIG1 is a schematic diagram of a flow chart of a data processing method based on a hardware encryption device in one embodiment;
[0039] FIG2 is a schematic flow chart of a data processing method based on a hardware encryption device in another embodiment;
[0040] FIG3 is a block diagram of a data processing device based on a hardware encryption device in one embodiment;
[0041] FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0042] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0043] In one embodiment, as shown in FIG1 , a data processing method based on a hardware encryption device is provided. This embodiment uses the method applied to a terminal as an example for illustration. It is understandable that the method can also be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server, including the following steps S202 to S208. Among them:
[0044] Step S202, when receiving the backup instruction for each business data, detecting the access information of the preset hardware encryption device; the preset hardware encryption device carries the preset national encryption algorithm.
[0045] In the backup field, in order to ensure the security of business data, the terminal needs to encrypt the business data during the backup process. With the diversified needs of business data, the terminal can concurrently map different business data to different hardware resources for processing, thereby significantly increasing the speed of encryption and decryption during the backup and recovery process of business data, and effectively increasing data security.
[0046] Among them, the terminal can be a management device for business data. The above-mentioned backup of business data can be performed periodically and automatically, or it can be performed based on the backup instructions input by relevant managers. For example, according to the pre-set backup cycle, when the terminal detects that this moment is the moment when backup is required, the terminal can issue a backup instruction for each business data to start the backup; or, the relevant manager can initiate the backup instruction by triggering the corresponding backup button. Then, when the terminal receives the backup instruction for each business data, it can determine to start the encryption backup process for each business data. Among them, the above-mentioned business data that needs to be backed up can be of multiple types, that is, the terminal needs to back up each business data of multiple types of businesses.
[0047] During the backup process, the terminal can back up by hardware encryption backup. The terminal can detect whether there is access information of a preset hardware encryption device. Among them, a preset hardware interface can be reserved in the terminal for access by the preset hardware encryption device, and the preset hardware encryption device can also carry a preset national secret algorithm. Specifically, the above-mentioned preset hardware encryption device can be an encryption card, and the relevant management personnel can insert the encryption card by inserting the encryption card into the preset hardware interface in the terminal. The above-mentioned encryption card carries a preset national secret algorithm, and the preset national secret algorithm carried in each encryption card can be different.
[0048] Among them, the national encryption algorithm is the domestic encryption algorithm recognized by the State Cryptography Administration. There are mainly SM1, SM2, SM3, and SM4. The key length and packet length of each encryption algorithm are both 128 bits. Among them, SM1 is symmetric encryption. When calling this algorithm, it is necessary to call the encryption card carrying the algorithm through the interface of the encryption chip. SM2 is asymmetric encryption based on ECC (Elliptic Curves Cryptography). The public key algorithm announced by the State Cryptography Administration has an encryption strength of 256 bits. SM3 is a message digest, and its check result is 256 bits. SM4 is a packet data algorithm for wireless LAN standards, which belongs to symmetric encryption, and the key length and packet length are both 128 bits.
[0049] Step S204, when the access information of each preset hardware encryption device is detected, each preset national encryption algorithm in each preset hardware encryption device is determined through each preset backup program corresponding to each preset hardware encryption device.
[0050] There may be multiple preset hardware encryption devices inserted into the terminal. When the terminal detects the access information of each preset hardware encryption device, the terminal may start the corresponding preset backup programs. The preset backup program may be a pre-compiled program for processing the access information of the preset hardware encryption device. The number of preset backup programs may correspond to the number of preset hardware encryption devices connected. For example, the terminal starts a corresponding number of preset backup programs according to the number of preset hardware encryption devices connected. The running code of each preset backup program is the same, and each preset backup program processes one preset hardware encryption device. Thus, the terminal processes the access information of each preset hardware encryption device connected through the corresponding preset backup programs, and then obtains each preset national encryption algorithm in each preset hardware encryption device. The preset national encryption algorithm carried in each preset hardware encryption device may be different.
[0051] Step S206: loading corresponding preset hardware encryption devices according to various business data.
[0052] Among them, after the terminal detects that each preset hardware encryption device is connected and determines the preset national secret algorithm in each preset hardware encryption device, the terminal can use these preset hardware encryption devices to process each business data. Before using the preset hardware encryption device to process the business data, the terminal can load each preset hardware encryption device according to each business data. Among them, the preset hardware encryption device carries the corresponding preset national secret algorithm. When the terminal needs to call the preset national secret algorithm in the preset hardware encryption device, it needs to load the corresponding preset hardware encryption device to call the algorithm. Among them, the terminal can determine which connected preset hardware encryption device needs to be called based on the relevant information of the business data to be backed up. For example, the terminal can determine the preset hardware encryption device that needs to be loaded based on the business type of the business data. Thus, the terminal can load the corresponding preset hardware encryption devices according to each business data.
[0053] Step S208, encrypt and back up the corresponding business data according to the preset national encryption algorithms in the preset hardware encryption devices.
[0054] Among them, after the terminal loads the corresponding preset hardware encryption device based on the business data, the preset hardware encryption device can be used to encrypt and back up the business data. Among them, the terminal can call the preset national secret algorithm carried in the preset hardware encryption device through the preset backup program corresponding to the preset hardware encryption device, and encrypt and back up the corresponding business data according to the preset national secret algorithm. Among them, for business data that call different preset hardware encryption devices, the terminal can back up each business data in a concurrent form. For example, take the business data to be backed up as A and B, and the preset hardware encryption devices as A and B. The terminal can open the preset hardware encryption device A based on the business data A, and use the preset national secret algorithm A in the preset hardware encryption device A to encrypt and back up the business data A; at the same time, the terminal can simultaneously open the preset hardware encryption device B based on the business data B, and use the preset national secret algorithm B in the preset hardware encryption device B to encrypt and back up the business data B.
[0055] The terminal may also store each encrypted and backed-up business data into a backup file, so that the terminal can back up each business data and obtain the backed-up business data.
[0056] In one embodiment, the terminal can also decrypt the backed-up business data based on the instruction. When the terminal detects the business data recovery instruction, the backed-up business data can be decrypted. When decrypting the backed-up business data, the terminal can detect whether the preset hardware encryption device used when backing up the business data is connected. If the access is not detected, decryption is not allowed. When the corresponding preset hardware encryption device is detected to be connected, the terminal can load the preset hardware encryption device through the corresponding preset backup program, and call the preset national secret algorithm therein to decrypt the backed-up business data, thereby obtaining the decrypted business data. After the terminal obtains the decrypted business data, it can use the business data to execute the business data recovery instruction, thereby realizing data recovery, improving the efficiency of backup recovery, and also improving the security of backup recovery.
[0057] In the data processing method based on the hardware encryption device, when backing up business data, after detecting the access information of the preset hardware encryption device, the preset national secret algorithm in the preset hardware encryption device is determined through the preset backup program, the preset hardware encryption device corresponding to the business data is loaded, and the corresponding business data is encrypted and backed up according to the preset national secret algorithm in each preset hardware encryption device. Compared with the traditional method of backing up through software, this solution detects the access information of the preset hardware encryption device, uses the backup program to load the national secret algorithm in the device, and uses the national secret algorithm in the hardware encryption device to encrypt and back up the corresponding business data, thereby achieving the technical effect of improving the security of business data backup.
[0058] In one embodiment, when access information of each preset hardware encryption device is detected, each preset national encryption algorithm in each preset hardware encryption device is determined through each preset backup program corresponding to each preset hardware encryption device, including: when access information of each preset hardware encryption device is detected, the access quantity corresponding to each preset hardware encryption device is determined according to the access information; a corresponding number of preset backup programs are started according to the access quantity; and each preset national encryption algorithm in each preset hardware encryption device is determined through each preset backup program corresponding to each preset hardware encryption device.
[0059] In this embodiment, the terminal can determine the number of preset backup programs that need to be started based on the number of preset hardware encryption devices connected. The terminal can detect the access information of the preset hardware encryption device. For example, the terminal can determine whether the access information of the preset hardware encryption device is detected by detecting whether each preset hardware interface generates an access signal.
[0060] When the terminal detects the access information of each preset hardware encryption device, the access quantity corresponding to each preset hardware encryption device can be determined according to the access information. For example, the terminal can detect the number of preset hardware interfaces with electrical signals, and then determine the access quantity of the preset hardware encryption device. Thus, the terminal can start the corresponding number of preset backup programs according to the above access quantity. Among them, the number of preset backup programs corresponds to the number of preset hardware encryption devices. In addition, the terminal can implement the processing of the preset hardware encryption device through the corresponding driver.
[0061] In one embodiment, starting a corresponding number of preset backup programs according to the number of accesses includes: for each preset hardware encryption device, loading a device driver corresponding to the preset hardware encryption device; and starting a preset backup program corresponding to the preset hardware encryption device according to the device driver.
[0062] In this embodiment, each of the above-mentioned preset hardware encryption devices has a corresponding device driver. There may be multiple preset hardware encryption devices for the above-mentioned access terminal. For each preset hardware encryption device connected, the terminal can load the device driver corresponding to the preset hardware encryption device. Among them, the device driver of each preset hardware encryption device can be pre-stored in the terminal. Thus, the terminal can start the preset backup program corresponding to the preset hardware encryption device according to the above-mentioned device driver to realize the call of the preset hardware encryption device. For example, taking the preset hardware encryption device as an encryption card as an example, the terminal can detect that the encryption card is connected and load the corresponding encryption card device driver, so that the terminal can start the preset backup program corresponding to the encryption card according to the above-mentioned device driver.
[0063] Thus, the terminal can determine each preset national encryption algorithm in each preset hardware encryption device through each preset backup program corresponding to each preset hardware encryption device. For example, the terminal can detect the preset national encryption algorithm carried in each preset hardware encryption device through the preset backup program, and then determine the algorithm name and other information of the preset national encryption algorithm carried in each preset hardware encryption device.
[0064] Through the above-mentioned embodiments, the terminal can call the corresponding preset backup program to load the corresponding preset hardware encryption device based on the number of accesses to the preset hardware encryption device and in combination with the device driver of the preset hardware encryption device. Thus, when backing up business data, the terminal can use the preset national encryption algorithm in the accessed preset hardware encryption device to encrypt and back up the business data, thereby achieving the technical effect of improving the security of business data backup.
[0065] In one embodiment, each preset national encryption algorithm in each preset hardware encryption device is determined through each preset backup program corresponding to each preset hardware encryption device, including: for each preset hardware encryption device, registering the preset hardware encryption device through the preset backup program to obtain a registered preset hardware encryption device; binding the registered preset hardware encryption device with the preset backup program, and determining the preset national encryption algorithm in the preset hardware encryption device through the preset backup program bound to the preset hardware encryption device.
[0066] In this embodiment, the terminal can determine the preset national encryption algorithm in the preset hardware encryption device through the preset backup program bound to each preset hardware encryption device. There can be multiple preset hardware encryption devices connected to the terminal. For each preset hardware encryption device, the terminal can use the preset backup program to register the preset hardware encryption device to obtain the registered preset hardware encryption device. The terminal can also bind the registered preset hardware encryption device to the preset backup program. Specifically, taking the preset hardware encryption device as an encryption card and the preset backup program as an example, the terminal can dynamically register the encryption card in the preset backup program. For example, when the terminal detects that the encryption card is connected, it starts the preset backup program to register the encryption card. The terminal can also bind the preset backup program to the encryption card and set the national encryption algorithm corresponding to the encryption card in the preset backup program. If there are multiple encryption cards, the terminal can bind multiple preset backup programs.
[0067] Thus, the terminal can determine the preset national encryption algorithm in the preset hardware encryption device through the preset backup program bound to the preset hardware encryption device. For example, the terminal can add an identifier corresponding to the preset hardware encryption device to the preset backup program bound to the preset hardware encryption device, and then when the terminal needs to call the preset national encryption algorithm in the preset hardware encryption device, the preset backup program can be started to call the preset national encryption algorithm in the bound preset hardware encryption device.
[0068] Through this embodiment, the terminal can register and bind the connected preset hardware encryption device with the preset backup program, so that the terminal can use the preset backup program to call the national encryption algorithm in the corresponding preset hardware encryption device to back up and restore business data, thereby improving the security of business data backup and recovery.
[0069] In one embodiment, the corresponding preset hardware encryption devices are loaded according to each business data, including: for each business data, obtaining the business type corresponding to the business data; querying the preset algorithm mapping table according to the business type to determine the preset business level corresponding to the business type; the preset algorithm mapping table includes various preset business levels corresponding to each business type, and each business level represents the importance of each business type; determining the corresponding target preset national encryption algorithm according to the preset business level; loading the preset hardware encryption device corresponding to the target preset national encryption algorithm.
[0070] In this embodiment, the terminal can use the service type of the service data to determine the national secret algorithm that needs to be called. Among them, there are multiple national secret algorithms, and different national secret algorithms can process service data of different importance. The higher the importance of the service data, the higher the complexity of the national secret algorithm that needs to be called when encrypting and backing up. There can be multiple types of service data that need to be backed up. For each service data, the terminal can obtain the service type corresponding to the service data. Among them, the terminal can pre-construct a preset algorithm mapping table. For example, the terminal can set corresponding preset service levels according to each service type, and associate each service type with the corresponding preset service level to form a preset algorithm mapping table, wherein the service level represents the importance corresponding to the service type, that is, the higher the service level, the higher the importance of the service type.
[0071] The terminal can query the preset algorithm mapping table according to the above-mentioned business type to obtain the business level corresponding to the business type of the above-mentioned business data, so that the terminal can determine the corresponding target preset national encryption algorithm according to the above-mentioned preset business level. Among them, the higher the preset business level, the higher the complexity of the corresponding target preset national encryption algorithm. The terminal can load the preset hardware encryption device carrying the above-mentioned target preset national encryption algorithm based on the target preset national encryption algorithm, so that the terminal can call the target preset national encryption algorithm by calling the preset hardware encryption device.
[0072] Through this embodiment, the terminal can use national encryption algorithms of different complexity to perform encrypted backup based on the importance of business data, thereby improving the backup efficiency of business data.
[0073] In one embodiment, each business data corresponding to each preset national encryption algorithm in each preset hardware encryption device is encrypted and backed up, including: for each business data, encrypting the business data according to the preset national encryption algorithm corresponding to the business data to obtain encrypted business data; writing the encrypted business data into a preset backup file to back up the encrypted business data.
[0074] In this embodiment, there may be multiple business data that need to be encrypted and backed up. The backup of each business data needs to call the corresponding preset hardware encryption device for encrypted backup, and the terminal can concurrently execute the backup process of each business data. Among them, for each business data, the terminal can encrypt the business data according to the preset national encryption algorithm corresponding to the business data to obtain the encrypted business data. The terminal can concurrently execute the process of encrypting business data based on the preset national encryption algorithm, so that the terminal can obtain the encrypted business data. The terminal can write the encrypted business data into the preset backup file, so that the terminal realizes the encrypted backup of each encrypted business data.
[0075] Specifically, take the preset hardware encryption device as an encryption card, the business data includes A and B, and the encryption card includes A and B as an example. The terminal can create a backup job and specify the encryption card to be used based on the type of business data, for example, business data A corresponds to encryption card A, and business data B corresponds to encryption card B. Then the terminal opens encryption card A based on business data A, calls the national secret algorithm A therein for encryption operation, and opens encryption card B based on business data B, calls the national secret algorithm B therein for encryption operation. Among them, the algorithm calls and encryption operations of the above business data A and business data B can be executed concurrently, so that the terminal can write the encrypted business data A and business data B into the preset backup file to achieve encrypted backup.
[0076] Through this embodiment, the terminal can concurrently execute the encryption process of each business data based on the national encryption algorithm corresponding to each business data, and write each encrypted business data into a preset backup file, thereby improving the backup security of the business data and improving the backup efficiency of the business data.
[0077] In an exemplary embodiment, as shown in FIG2 , FIG2 is a flow chart of a data processing method based on a hardware encryption device in another embodiment. In this embodiment, the preset hardware encryption device is an encryption card, the business data to be backed up are A, B and C, and the preset hardware encryption devices are A, B and C. The terminal can read various business data from the data source device, such as business data A, business data B and business data C. The terminal can also load various device drivers for the above-mentioned encryption cards. When the encryption card is connected to the terminal, the terminal can start the corresponding number of preset backup programs according to the number of connected encryption cards. The terminal dynamically registers the encryption card in the preset backup program, and binds the preset backup program to the connected encryption card one-to-one. The terminal can also determine the corresponding national encryption algorithm based on the encryption card bound to the preset backup program.
[0078] The terminal can also create a backup or restore job and specify the encryption card to be used based on the type of business data. For example, business data A corresponds to encryption card A, business data B corresponds to encryption card B, and business data C corresponds to encryption card C. Then the terminal can open encryption card A based on business data A, call the national secret algorithm A therein for encryption operation, open encryption card B based on business data B, call the national secret algorithm B therein for encryption operation, open encryption card C based on business data C, call the national secret algorithm C therein for encryption operation. Among them, the algorithm call and encryption operation of the above business data A, business data B and business data C can be executed concurrently, so that the terminal can write the encrypted business data A and business data B into the preset backup file to achieve encrypted backup.
[0079] In addition, the terminal can also use the above encryption card to decrypt the encrypted and backed-up business data. The decryption process is similar to the encryption process and will not be described in detail here.
[0080] Through the above embodiments, the terminal detects the access information of the preset hardware encryption device, uses the national secret algorithm in the backup program to load the device, and uses the national secret algorithm in the hardware encryption device to encrypt and back up the corresponding business data, thereby achieving the technical effect of improving the security of business data backup. In addition, the terminal maps different data to different hardware resources for processing by concurrently calling encryption cards of different models, which can not only significantly improve the speed of encryption and decryption, but also effectively enhance data security, because each type of data can be protected by its own key, thereby reducing the risk of data being cracked. In addition, through concurrent backup and recovery of multiple encryption cards, the speed of encryption and decryption can be significantly improved, while improving data security. When processing diversified data, different encryption cards can be selected for encryption and decryption according to the characteristics of the data, thereby improving the efficiency of data processing.
[0081] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0082] Based on the same inventive concept, the embodiment of the present application also provides a data processing device based on a hardware encryption device for implementing the data processing method based on a hardware encryption device involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more data processing device embodiments based on a hardware encryption device provided below can refer to the limitations of the data processing method based on a hardware encryption device above, and will not be repeated here.
[0083] In an exemplary embodiment, as shown in FIG3 , a data processing device based on a hardware encryption device is provided, comprising: a receiving module 500, a detection module 502, a loading module 504 and a backup module 506, wherein:
[0084] The receiving module 500 is used to detect the access information of the preset hardware encryption device when receiving the backup instruction for each business data; the preset hardware encryption device carries the preset national encryption algorithm.
[0085] The detection module 502 is used to determine each preset national encryption algorithm in each preset hardware encryption device through each preset backup program corresponding to each preset hardware encryption device when the access information of each preset hardware encryption device is detected.
[0086] The loading module 504 is used to load corresponding preset hardware encryption devices according to various business data.
[0087] The backup module 506 is used to encrypt and back up the corresponding business data according to the preset national encryption algorithms in the preset hardware encryption devices.
[0088] In one embodiment, the above-mentioned detection module 502 is used to detect the access information of each preset hardware encryption device, determine the access quantity corresponding to each preset hardware encryption device according to the access information; start the corresponding quantity of preset backup programs according to the access quantity; and determine each preset national encryption algorithm in each preset hardware encryption device through each preset backup program corresponding to each preset hardware encryption device.
[0089] In one embodiment, the detection module 502 is used to load a device driver corresponding to each preset hardware encryption device; and start a preset backup program corresponding to the preset hardware encryption device according to the device driver.
[0090] In one embodiment, the above-mentioned detection module 502 is used to register the preset hardware encryption device for each preset hardware encryption device through a preset backup program to obtain a registered preset hardware encryption device; bind the registered preset hardware encryption device to the preset backup program, and determine the preset national encryption algorithm in the preset hardware encryption device through the preset backup program bound to the preset hardware encryption device.
[0091] In one embodiment, the above-mentioned loading module 504 is used to obtain the business type corresponding to each business data; query the preset algorithm mapping table according to the business type to determine the preset business level corresponding to the business type; the preset algorithm mapping table includes various preset business levels corresponding to various business types, and each business level represents the importance of each business type; determine the corresponding target preset national encryption algorithm according to the preset business level; load the preset hardware encryption device corresponding to the target preset national encryption algorithm.
[0092] In one embodiment, the backup module 506 is used to encrypt each business data according to a preset national encryption algorithm corresponding to the business data to obtain encrypted business data; and write each encrypted business data into a preset backup file to back up each encrypted business data.
[0093] Each module in the data processing device based on the hardware encryption device can be implemented in whole or in part by software, hardware and a combination thereof. Each module can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to each module above.
[0094] In an exemplary embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be shown in FIG4. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit, and an input device. The processor, the memory, and the input / output interface are connected via a system bus, and the communication interface, the display unit, and the input device are connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner may be implemented through WIFI, a mobile cellular network, near field communication (NFC) or other technologies. When the computer program is executed by the processor, a data processing method based on a hardware encryption device is implemented. The display unit of the computer device is used to form a visually visible picture, which may be a display screen, a projection device, or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0095] Those skilled in the art will understand that the structure shown in FIG. 4 is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.
[0096] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the above-mentioned data processing method based on the hardware encryption device when executing the computer program.
[0097] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the data processing method based on the hardware encryption device is implemented.
[0098] In one embodiment, a computer program product is provided, including a computer program, which implements the above-mentioned data processing method based on the hardware encryption device when executed by a processor.
[0099] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.
[0100] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0101] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0102] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A data processing method based on a hardware encryption device, characterized in that: The method comprises: When receiving a backup instruction for each business data, detecting access information of a preset hardware encryption device; the preset hardware encryption device carries a preset national encryption algorithm; When the access information of each of the preset hardware encryption devices is detected, each of the preset national encryption algorithms in each of the preset hardware encryption devices is determined through each of the preset backup programs corresponding to each of the preset hardware encryption devices; Loading the corresponding respective preset hardware encryption devices according to the respective business data; According to each of the preset national encryption algorithms in each of the preset hardware encryption devices, the corresponding business data are encrypted and backed up.
2. The method according to claim 1, characterized in that When the access information of each of the preset hardware encryption devices is detected, each of the preset national encryption algorithms in each of the preset hardware encryption devices is determined through each of the preset backup programs corresponding to each of the preset hardware encryption devices, including: When the access information of each of the preset hardware encryption devices is detected, the access quantity corresponding to each of the preset hardware encryption devices is determined according to the access information; Starting a corresponding number of preset backup programs according to the number of accesses; Through each preset backup program corresponding to each preset hardware encryption device, each preset national encryption algorithm in each preset hardware encryption device is determined.
3. The method according to claim 2, characterized in that The starting of a corresponding number of preset backup programs according to the number of accesses includes: For each of the preset hardware encryption devices, loading a device driver corresponding to the preset hardware encryption device; According to the device driver, a preset backup program corresponding to the preset hardware encryption device is started.
4. The method according to claim 1, characterized in that Determining each of the preset national encryption algorithms in each of the preset hardware encryption devices through each of the preset backup programs corresponding to each of the preset hardware encryption devices includes: For each of the preset hardware encryption devices, register the preset hardware encryption device through the preset backup program to obtain the registered preset hardware encryption device; The registered preset hardware encryption device is bound to the preset backup program, and the preset national encryption algorithm in the preset hardware encryption device is determined through the preset backup program bound to the preset hardware encryption device.
5. The method according to claim 1, characterized in that The loading of the corresponding respective preset hardware encryption devices according to the respective business data comprises: For each piece of business data, obtaining a business type corresponding to the business data; According to the service type, a preset algorithm mapping table is queried to determine a preset service level corresponding to the service type; the preset algorithm mapping table includes various preset service levels corresponding to various service types, and each service level represents the importance corresponding to each service type; Determine the corresponding target preset national encryption algorithm according to the preset service level; Load the preset hardware encryption device corresponding to the target preset national encryption algorithm.
6. The method according to claim 1, characterized in that The step of encrypting and backing up the corresponding business data according to the preset national encryption algorithms in the preset hardware encryption devices includes: For each of the business data, encrypt the business data according to a preset national encryption algorithm corresponding to the business data to obtain the encrypted business data; The encrypted business data are written into a preset backup file to back up the encrypted business data.
7. A data processing device based on a hardware encryption device, characterized in that: The device comprises: A receiving module, configured to detect access information of a preset hardware encryption device when receiving a backup instruction for each service data; the preset hardware encryption device carries a preset national encryption algorithm; A detection module, configured to, when access information of each of the preset hardware encryption devices is detected, determine each of the preset national encryption algorithms in each of the preset hardware encryption devices through each of the preset backup programs corresponding to each of the preset hardware encryption devices; A loading module, used for loading the corresponding respective preset hardware encryption devices according to the respective business data; The backup module is used to encrypt and back up the corresponding business data according to the preset national encryption algorithms in the preset hardware encryption devices.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
Data encryption and decryption method based on distributed encryption card
CN110768789A
Data processing method based on Internet of Things equipment binding
CN113672982A
Large file backup and recovery security method based on hardware encryption device
CN114036003A
Secure calculation method for data encryption based on FPGA (Field Programmable Gate Array)
CN116488814A
Self-adaptive hardware encryption method and device, computer equipment and medium
CN118643517A
