A method, system, device, electronic device and medium for data encryption and decryption

By introducing the encryption and decryption main module, the encryption and decryption backup module and the key storage module in the data encryption and decryption system, the temporary key processing is used to solve the problem of encryption and decryption failure caused by untimely upgrade of cloud encryption and decryption products, and improve data encryption and decryption success rate and security.

CN114070646BActive Publication Date: 2024-11-22SUNSHINE LIFE INSURANCE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111435451.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-29
Publication Date
2024-11-22
Estimated Expiration
2041-11-29

AI Technical Summary

Technical Problem

During the use of existing cloud encryption and decryption products, if they are not upgraded in time, they may lead to encryption and decryption failure, resulting in low security and success rate.

Method used

A data encryption and decryption system is designed, including calling module, encryption and decryption module and business module. By encrypting and decrypting the main module, encryption and decrypting backup module and key storage module, the temporary key is used to encrypt and decrypt the success of data encryption and decryption. rate and security.

Benefits of technology

The success rate and security of data encryption and decryption are improved. The main module is monitored through the encryption and decryption standby module, and a temporary key is provided to deal with the failure of encryption and decryption, ensuring efficient encryption and decryption processing of data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114070646B_ABST
    Figure CN114070646B_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of data encryption and decryption, and discloses a method, system, device, electronic device and medium for data encryption and decryption. The method is applied to a calling module in an encryption and decryption system, and the encryption and decryption system also includes an encryption and decryption module and at least one business module, including obtaining target data from a first encryption and decryption request message sent by a received business module; sending a second encryption and decryption request message containing the target data to the encryption and decryption module, so that the encryption and decryption module encrypts and decrypts the target data; receiving a second encryption and decryption response message returned by the encryption and decryption module; if it is determined that the encryption and decryption fails, obtaining a temporary key in the second encryption and decryption response message; encrypting and decrypting the target data based on the temporary key to obtain the encrypted and decrypted data; and returning the encrypted and decrypted data to the business module. In this way, the user's target data can be encrypted and decrypted by the data encryption and decryption system, thereby improving the security of the user's data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data encryption and decryption, and in particular to a method, system, device, electronic device and medium for data encryption and decryption. Background Art

[0002] With the progress of society, companies are paying more and more attention to the protection of customer information, especially in industries with a large number of customers such as finance, insurance, and the Internet.

[0003] Under existing technology, cloud encryption products are usually used to encrypt and protect customer information.

[0004] However, when using cloud encryption products to encrypt and protect customer information, you need to purchase cloud encryption products, and during the use of cloud encryption products, you need to upgrade the cloud encryption products. If you do not upgrade them in time, encryption and decryption failures may occur, resulting in low security and encryption and decryption success rates.

[0005] Therefore, when encrypting and decrypting data, how to improve the success rate and security of data encryption and decryption is a technical problem that needs to be solved. Summary of the invention

[0006] The purpose of the present application is to provide a method, system, device, electronic device and medium for data encryption and decryption, which can improve the success rate and security of data encryption and decryption when encrypting and decrypting data.

[0007] On the one hand, a system for data encryption and decryption is provided, comprising:

[0008] A calling module, an encryption and decryption module and at least one business module; wherein,

[0009] Each service module is used to: send a first encryption and decryption request message containing target data to the calling module, and receive the encrypted and decrypted data returned by the calling module;

[0010] The calling module is used to send a second encryption and decryption request message containing target data to the encryption and decryption module; receive a second encryption and decryption response message returned by the encryption and decryption module; if it is determined based on the second encryption and decryption response message that the encryption and decryption fails, obtain a temporary key in the second encryption and decryption response message, and encrypt and decrypt the target data based on the temporary key to obtain encrypted and decrypted data;

[0011] The encryption and decryption module is used to encrypt and decrypt the target data when receiving the second encryption and decryption request message, and return a second encryption and decryption response message to the calling module if the encryption and decryption fails.

[0012] In the above implementation process, the data encryption and decryption system composed of the business module, the calling module and the encryption and decryption module improves the success rate and security of data encryption and decryption.

[0013] In one implementation, the encryption and decryption module includes: an encryption and decryption main module, an encryption and decryption backup module, and a key storage module;

[0014] A key storage module, used to store the keys of each business module;

[0015] The encryption and decryption main module is used to obtain the corresponding key stored in the key storage module when determining that the second encryption and decryption request message is received, and encrypt and decrypt the target data according to the key, and return a second encryption and decryption response message to the calling module;

[0016] The encryption and decryption standby module is used to monitor the operation status of the encryption and decryption main module, and if the monitoring result indicates that the encryption and decryption main module is operating abnormally, a second encryption and decryption response message containing a temporary key is sent to the calling module.

[0017] In the above implementation process, when data is encrypted and decrypted by the encryption and decryption main module, encryption and decryption backup module and key storage module in the encryption and decryption module, not only the success rate of data encryption and decryption is improved, but also the timeliness of the temporary key is used to further improve security.

[0018] In one embodiment, it also includes an abnormal operation warning module;

[0019] The abnormal operation warning module is used to obtain the user operation data of the system operator on the data encryption and decryption system, and analyze the user operation data. If it is determined that the analysis result indicates that the user operation is abnormal, an alarm operation is performed.

[0020] In the above implementation process, the abnormal operation warning module in the data encryption and decryption system can effectively supervise the user's operation and improve security.

[0021] On the one hand, a method for data encryption and decryption is provided, which is applied to a scheduling module in an encryption and decryption system, wherein the encryption and decryption system further includes an encryption and decryption module and at least one service module, including:

[0022] When it is determined that a first encryption / decryption request message containing target data sent by the business module is received, the target data contained in the first encryption / decryption request message is obtained;

[0023] Sending a second encryption / decryption request message containing the target data to the encryption / decryption module, so that the encryption / decryption module encrypts / decrypts the target data;

[0024] Receive a second encryption and decryption response message returned by the encryption and decryption module;

[0025] If it is determined based on the second encryption / decryption response message that the encryption / decryption fails, obtaining a temporary key in the second encryption / decryption response message;

[0026] Based on the temporary key, the target data is encrypted and decrypted to obtain the encrypted and decrypted data;

[0027] Return the encrypted and decrypted data to the business module.

[0028] In the above implementation process, the scheduling module determines that the encryption and decryption fails based on the second encryption and decryption response message returned by the encryption and decryption module, obtains the temporary key in the second encryption and decryption response message, encrypts and decrypts the target data using the temporary key, obtains the encrypted and decrypted data, and returns the encrypted and decrypted data to the business module, thereby improving the success rate of data encryption and decryption and the timeliness of using the temporary key, and further improving security.

[0029] In one implementation, the encryption and decryption module includes an encryption and decryption main module and an encryption and decryption backup module, and receiving a second encryption and decryption response message returned by the encryption and decryption module includes:

[0030] Receive a second encryption / decryption response message returned by the encryption / decryption main module; or,

[0031] The second encryption / decryption response message returned by the encryption / decryption standby module when the encryption / decryption main module is detected to be operating abnormally is received.

[0032] In the above implementation process, the second encryption / decryption response message returned by the encryption / decryption module may be returned by the encryption / decryption main module or the encryption / decryption backup module.

[0033] In one implementation, encrypting and decrypting target data based on a temporary key to obtain encrypted and decrypted data includes:

[0034] Decrypting the temporary key to obtain the decrypted temporary key;

[0035] The target data is encrypted and decrypted according to the decrypted temporary key to obtain encrypted and decrypted data.

[0036] In the above implementation process, the calling module encrypts and decrypts the target data based on the decrypted temporary key to obtain encrypted and decrypted data.

[0037] On the one hand, a method for data encryption and decryption is provided, which is applied to an encryption and decryption module in an encryption and decryption system, wherein the encryption and decryption system further includes a calling module and at least one business module, including:

[0038] Receiving a second encryption / decryption request message containing target data sent by the calling module, wherein the target data contained in the second encryption / decryption request message is obtained according to a first encryption / decryption request message containing target data sent by the business module;

[0039] Encrypting and decrypting target data contained in the second encryption and decryption request message;

[0040] If it is determined that encryption and decryption fails, a second encryption and decryption response message containing a temporary key is sent to the calling module, so that the calling module performs the following steps: encrypt and decrypt the target data based on the temporary key contained in the second encryption and decryption response message, and send the obtained encrypted and decrypted data to the business module.

[0041] In the above implementation process, the encryption and decryption module encrypts and decrypts the target data. If it is determined that the encryption and decryption fails, a second encryption and decryption response message containing a temporary key is sent to the scheduling module, so that the calling module can encrypt and decrypt the target data according to the temporary key, and return the encrypted and decrypted data to the calling module, thereby improving the success rate of data encryption and decryption.

[0042] In one implementation, the encryption and decryption module includes an encryption and decryption main module and an encryption and decryption backup module, and the second encryption and decryption response message including the temporary key includes:

[0043] The encryption and decryption main module sends a second encryption and decryption response message containing a temporary key to the calling module; or,

[0044] When the encryption / decryption backup module detects that the encryption / decryption main module is operating abnormally, it returns a second encryption / decryption response message containing a temporary key.

[0045] In the above implementation process, the encryption and decryption main module sends a temporary key to the calling module. If the encryption and decryption backup module detects that the encryption and decryption main module is operating abnormally, the encryption and decryption backup module sends a temporary key to the calling module, so that the calling module can encrypt and decrypt the target data according to the temporary key, thereby improving the success rate of data encryption and decryption.

[0046] On the one hand, a device for data encryption and decryption is provided, comprising:

[0047] A first acquisition unit: configured to acquire the target data contained in the first encryption / decryption request message when determining that the first encryption / decryption request message containing the target data sent by the business module is received;

[0048] The first transceiver unit is used to send a second encryption and decryption request message containing target data to the encryption and decryption module, so that the encryption and decryption module encrypts and decrypts the target data;

[0049] Receiving unit: used to receive the second encryption and decryption response message returned by the encryption and decryption module;

[0050] A second acquisition unit: configured to acquire a temporary key in the second encryption / decryption response message if it is determined based on the second encryption / decryption response message that the encryption / decryption fails;

[0051] Acquisition unit: used for encrypting and decrypting target data based on a temporary key to obtain encrypted and decrypted data;

[0052] The second transceiver unit is used to return the encrypted and decrypted data to the service module.

[0053] In one implementation, the receiving unit is specifically used for:

[0054] Receive a second encryption / decryption response message returned by the encryption / decryption main module; or,

[0055] The second encryption / decryption response message returned by the encryption / decryption standby module when the encryption / decryption main module is detected to be operating abnormally is received.

[0056] In one implementation, the obtaining unit is specifically used for:

[0057] Decrypting the temporary key to obtain the decrypted temporary key;

[0058] The target data is encrypted and decrypted according to the decrypted temporary key to obtain encrypted and decrypted data.

[0059] On the one hand, a device for data encryption and decryption is provided, comprising:

[0060] A receiving unit: configured to receive a second encryption / decryption request message containing target data sent by a calling module, wherein the target data contained in the second encryption / decryption request message is obtained according to a first encryption / decryption request message containing target data sent by a business module;

[0061] Encryption and decryption unit: used to encrypt and decrypt the target data contained in the second encryption and decryption request message;

[0062] Transceiver unit: used to send a second encryption and decryption response message containing a temporary key to the calling module if it is determined that the encryption and decryption has failed, so that the calling module performs the following steps: encrypt and decrypt the target data based on the temporary key contained in the second encryption and decryption response message, and send the obtained encrypted and decrypted data to the business module.

[0063] In one implementation, the transceiver unit is specifically used for:

[0064] The encryption and decryption main module sends a second encryption and decryption response message containing a temporary key to the calling module; or,

[0065] When the encryption / decryption backup module detects that the encryption / decryption main module is operating abnormally, it returns a second encryption / decryption response message containing a temporary key.

[0066] On the one hand, an electronic device is provided, including a processor and a memory, wherein the memory stores computer-readable instructions, and when the computer-readable instructions are executed by the processor, the steps of the method provided in any of the various optional implementations of data encryption and decryption described above are executed.

[0067] On the one hand, a readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of the method provided in any of the various optional implementations of data encryption and decryption described above are executed.

[0068] On the one hand, a computer program product is provided. When the computer program product is run on a computer, the computer executes the steps of the method provided in any of the various optional implementations of data encryption and decryption described above.

[0069] In an embodiment of the present application, when the calling module determines that it has received the first encryption and decryption request message containing the target data sent by the business module, it obtains the target data contained in the first encryption and decryption request message; sends a second encryption and decryption request message containing the target data to the encryption and decryption module, so that the encryption and decryption module encrypts and decrypts the target data; the calling module receives the second encryption and decryption response message returned by the encryption and decryption module; if it is determined based on the second encryption and decryption response message that the encryption and decryption fails, the temporary key in the second encryption and decryption response message is obtained; the calling module encrypts and decrypts the target data based on the temporary key, obtains the encrypted and decrypted data and returns the encrypted and decrypted data to the business module, so that when the encryption and decryption module fails to encrypt and decrypt the target data, the calling module can encrypt and decrypt the target data according to the temporary key provided by the encryption and decryption module, obtain the encrypted and decrypted data, and send the encrypted and decrypted data to the business module, thereby improving the success rate of data encryption and decryption and further improving security by utilizing the timeliness of the temporary key.

[0070] Other features and advantages of the present application will be described in the following description, and partly become apparent from the description, or be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments of the present application will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0072] Figure 1 A schematic diagram of the architecture of a data encryption and decryption system provided in an embodiment of the present application;

[0073] Figure 2 A schematic diagram of an application scenario of a data encryption and decryption method provided in an embodiment of the present application Figure 1 ;

[0074] Figure 3 A schematic diagram of an application scenario of a data encryption and decryption method provided in an embodiment of the present application Figure 2 ;

[0075] Figure 4 A schematic diagram of an application scenario of a data encryption and decryption method provided in an embodiment of the present application Figure 3 ;

[0076] Figure 5 Implementation process of a data encryption and decryption method provided in an embodiment of the present application Figure 1 ;

[0077] Figure 6 Implementation process of a data encryption and decryption method provided in an embodiment of the present application Figure 2 ;

[0078] Figure 7 An interactive flow chart of a method for data encryption and decryption provided in an embodiment of the present application;

[0079] Figure 8 A schematic diagram of a data encryption and decryption device provided in an embodiment of the present application Figure 1 ;

[0080] Fig. 9 A schematic diagram of a data encryption and decryption device provided in an embodiment of the present application Figure 2 ;

[0081] Fig.10 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0082] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0083] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.

[0084] First, some terms involved in the embodiments of the present application are explained to facilitate understanding by those skilled in the art.

[0085] Business module: can be a terminal device, or a mobile terminal, fixed terminal or portable terminal, such as a mobile phone, a site, a unit, a device, a multimedia computer, a multimedia tablet, an Internet node, a communicator, a desktop computer, a laptop computer, a notebook computer, a netbook computer, a tablet computer, a personal communication system device, a personal navigation device, a personal digital assistant, an audio / video player, a digital camera / camcorder, a positioning device, a television receiver, a radio broadcast receiver, an e-book device, a gaming device or any combination thereof, including accessories and peripherals of these devices or any combination thereof. It is also foreseeable that the business module can support any type of user interface (such as a wearable device), etc.

[0086] Software Development Kit (SDK): A software development kit is generally a collection of development tools used by software engineers to build application software for specific software packages, software frameworks, hardware platforms, operating systems, etc.

[0087] The Hyper Text Transfer Protocol Status Code (HTTP Status Code) is a 3-digit code used to indicate the status of the Hyper Text Transfer Protocol response of a web server.

[0088] In order to improve the success rate and security of data encryption and decryption when encrypting and decrypting data, the embodiments of the present application provide a method, system, device, electronic device and medium for data encryption and decryption.

[0089] See also Figure 1 , which is a schematic diagram of the architecture of a data encryption and decryption system according to an embodiment of the present application, wherein the data encryption and decryption system includes a calling module, an encryption and decryption module, and a business module.

[0090] Among them, the encryption and decryption module includes: encryption and decryption main module, encryption and decryption backup module, key storage module, abnormal operation warning module, authorization module, encryption and decryption service module, visual operation platform and operation recording module.

[0091] Calling module: used to send a second encryption and decryption request message containing target data to the encryption and decryption module; receive a second encryption and decryption response message returned by the encryption and decryption module; if it is determined based on the second encryption and decryption response message that the encryption and decryption fails, obtain the temporary key in the second encryption and decryption response message, and encrypt and decrypt the target data based on the temporary key to obtain the encrypted and decrypted data.

[0092] The encryption and decryption module is used to encrypt and decrypt the target data when receiving the second encryption and decryption request message, and return a second encryption and decryption response message to the calling module if the encryption and decryption fails.

[0093] The service module (ie, service module 1 . . . service module n) is used to send a first encryption / decryption request message containing target data to the calling module, and receive the encrypted / decrypted data returned by the calling module.

[0094] It should be noted that n is a positive integer.

[0095] The encryption and decryption main module is used to obtain the corresponding key stored in the key storage module when determining that the second encryption and decryption request message is received, and encrypt and decrypt the target data according to the key, and return a second encryption and decryption response message to the calling module;

[0096] The encryption and decryption standby module is used to monitor the operation status of the encryption and decryption main module, and if the monitoring result indicates that the encryption and decryption main module is operating abnormally, a second encryption and decryption response message containing a temporary key is sent to the calling module.

[0097] A key storage module, used to store the keys of each business module;

[0098] The abnormal operation warning module is used to obtain the user operation data of the system operator on the data encryption and decryption system, and analyze the user operation data. If it is determined that the analysis result indicates that the user operation is abnormal, an alarm operation is performed.

[0099] The authorization module is used to authenticate the received encryption and decryption request message.

[0100] Optionally, the authentication method may be account and password authentication or certificate authentication. In actual applications, the authentication method may be set according to the actual application scenario and is not limited here.

[0101] The encryption and decryption service module is used to connect to the calling module and provide data encryption and decryption services. It is also used by operation and maintenance personnel to encrypt and decrypt batch data through workflow approval.

[0102] In one implementation, when the operation and maintenance personnel encrypt and decrypt batch data, they first submit a report to their superiors through workflow approval. After the report is approved, the encryption and decryption service module is used to perform encryption and decryption services on the batch data.

[0103] In this way, it is possible to avoid the operation and maintenance personnel from decrypting the encrypted user data and causing leakage, thereby improving the security of data encryption and decryption.

[0104] The visual operation platform is used to provide operation and maintenance personnel with single data encryption and decryption operations or batch data encryption and decryption operations.

[0105] The operation record module is used to record the operations performed by the operation and maintenance personnel on the visual interface.

[0106] See also Figure 2 FIG. 1 is a schematic diagram of an application scenario of a data encryption and decryption system according to an embodiment of the present application. Figure 1 . Figure 2 It includes the official micro system (i.e., business module), SDK (i.e., calling module) and encryption and decryption module, wherein the encryption and decryption module includes the encryption and decryption main module and the encryption and decryption backup module. Figure 2 In the description, only one business module is used as an example for explanation. In actual applications, the number of business modules can be one or more, which is not limited here.

[0107] In one embodiment, when encrypting or decrypting target data in the official micro system, the official micro system sends a first encryption and decryption request message containing the target data to the SDK through a pre-set interface. After obtaining the target data, the SDK sends a second encryption and decryption request message containing the target data to the encryption and decryption module through the 443 interface. The encryption and decryption module obtains the target data and performs encryption and decryption on the target data. The encryption and decryption backup module in the encryption and decryption module monitors the encryption and decryption main module in the encryption and decryption module in real time. If it is detected that the operation status of the encryption and decryption main module is normal, the monitoring continues. The encryption and decryption main module returns the encryption and decryption data to the SDK through the 443 port, and the SDK returns the encryption and decryption data to the official micro system.

[0108] In one implementation, if the encryption / decryption backup module detects that the operation status of the encryption / decryption main module is abnormal, it continues to monitor; if the encryption / decryption main module cannot complete the encryption / decryption of the target data, but can provide a temporary key, it continues to monitor, and the SDK obtains the decrypted temporary key through the temporary key provided by the encryption / decryption main module, and encrypts and decrypts the target data through the decrypted temporary key to obtain the encrypted / decrypted data, and sends the encrypted / decrypted data to the official WeChat system.

[0109] In one implementation, if the encryption / decryption backup module detects that the operation status of the encryption / decryption main module is abnormal, it will continue to monitor. If the encryption / decryption main module cannot complete the encryption / decryption of the target data and cannot provide a temporary key, the encryption / decryption backup module will provide a temporary key. The SDK obtains the decrypted temporary key through the temporary key provided by the encryption / decryption backup module, and encrypts and decrypts the target data through the decrypted temporary key to obtain encrypted / decrypted data, and sends the encrypted / decrypted data to the official WeChat system.

[0110] In this way, the target data can be encrypted and decrypted through the encryption and decryption main module, the encryption and decryption backup module and the SDK, avoiding the problem that the encryption and decryption main module cannot encrypt and decrypt the target data immediately due to excessive load, and by utilizing the timeliness of the temporary key, the security of the target data is improved.

[0111] See also Figure 3 FIG. 1 is a schematic diagram of an application scenario of a data encryption and decryption system according to an embodiment of the present application. Figure 2 The application scenario includes a database (i.e., a business module), an interceptor, an SDK (i.e., a calling module), and an encryption and decryption module.

[0112] In one implementation, when customer data needs to be stored in a database, the interceptor will detect the customer data. If no privacy information is detected, the data will be directly stored in the database. If privacy information is detected in the customer data, the interceptor will send a request encryption message containing the privacy information to the SDK. The SDK will send the request encryption message containing the privacy information to the encryption and decryption module through port 443. The encryption and decryption module will encrypt the privacy information and send the encrypted data to the SDK. The SDK will send the encrypted data to the database, and the database will store the encrypted data.

[0113] Optionally, the interceptor may be a Type Handle interceptor or other interceptors. In actual applications, the use of the interceptor may be set according to actual application scenarios and is not limited here.

[0114] In this way, when storing data, the customer's privacy information can be encrypted and stored, thereby improving the security of customer data.

[0115] See also Figure 4 FIG. 1 is a schematic diagram of an application scenario of a data encryption and decryption system according to an embodiment of the present application. Figure 3 This application scenario includes a log system (i.e., business module), an interceptor, an SDK (i.e., a calling module), and an encryption and decryption module.

[0116] In one embodiment, when the log system needs to output logs, it first detects the data through a custom interceptor. If the data is private data, an encryption and decryption request message is sent to the SDK. The SDK sends the encryption and decryption request message to the data encryption and decryption module. The encryption and decryption module encrypts and decrypts the data that needs to be encrypted and decrypted in the received encryption and decryption request message, and sends the encrypted and decrypted data to the SDK. The SDK sends the encrypted and decrypted data to the log system to execute log output.

[0117] It should be noted that the custom interceptor can be a Log4 interceptor or other interceptors, and there is no limitation here.

[0118] In this way, the log system can encrypt private data when outputting logs, thereby improving data security.

[0119] See also Figure 5 As shown, it is an implementation process of a method for data encryption and decryption provided in an embodiment of the present application. Figure 1 , combined with Figure 1 The calling module shown in the figure, the specific implementation process of this method is as follows:

[0120] Step 500: When the calling module determines that it has received the first encryption / decryption request message containing target data sent by the service module, it obtains the target data contained in the first encryption / decryption request message.

[0121] Specifically, when the calling module receives the first encryption / decryption request message containing target data and sent by the business module through the designated port, the calling module obtains the target data contained in the first encryption / decryption request message.

[0122] It should be noted that the designated port can be port 443 or other ports. In actual applications, the designated port can be set according to the actual application scenario and is not limited here.

[0123] In this way, the business module can send an encryption and decryption request message containing target data to the calling module through the designated port, thereby improving data security.

[0124] Step 501: The calling module sends a second encryption / decryption request message containing target data to the encryption / decryption module.

[0125] Step 502: The encryption / decryption module encrypts / decrypts the target data based on the second encryption / decryption request message.

[0126] Step 503: The calling module receives the second encryption and decryption response message returned by the encryption and decryption module.

[0127] Specifically, the calling module receives the second encryption and decryption response message returned by the encryption and decryption module through the designated port.

[0128] It should be noted that the second encryption / decryption response message may be sent by the encryption / decryption main module, or may be sent by the encryption / decryption backup module when the encryption / decryption backup module detects that the encryption / decryption main module is operating abnormally.

[0129] Step 504: If the calling module determines that the encryption and decryption fails based on the second encryption and decryption response message, the calling module obtains the temporary key in the second encryption and decryption response message.

[0130] Specifically, the encryption and decryption main module sends a second encryption and decryption response message containing a temporary key to the calling module; or the encryption and decryption backup module returns a second encryption and decryption response message containing a temporary key when it detects that the encryption and decryption main module is running abnormally.

[0131] In one implementation, the calling module judges the second encryption and decryption response message. If the second encryption and decryption response message contains an encryption and decryption string, it indicates that the encryption and decryption is successful, and the encryption and decryption string is sent to the business system. If the second encryption and decryption response message contains a temporary key, it indicates that the encryption and decryption has failed. The calling module decrypts the temporary key to obtain the decrypted temporary key.

[0132] In one implementation, the calling module judges the second encryption and decryption response message. If the HTTP status code in the second encryption and decryption response message is not a 200 status code, it indicates that the encryption and decryption module may be unavailable or a current limiting circuit breaker has occurred. The encryption and decryption backup module is called to obtain a temporary key, decrypt the temporary key, and obtain the decrypted temporary key.

[0133] In this way, by judging the second encryption / decryption response message, it is possible to further determine whether the encryption / decryption is successful, and then judge whether the encryption / decryption standby module needs to provide a temporary key, thereby improving the success rate of encryption / decryption.

[0134] Step 505: The calling module encrypts and decrypts the target data based on the temporary key to obtain encrypted and decrypted data.

[0135] Specifically, when executing step 505, the following steps may be specifically performed:

[0136] S5051: The calling module decrypts the temporary key to obtain the decrypted temporary key.

[0137] It should be noted that the decrypted temporary key also has a certain time limit.

[0138] S5052: The calling module encrypts and decrypts the target data according to the decrypted temporary key to obtain encrypted and decrypted data.

[0139] In one implementation, the target data is encrypted and decrypted using a temporary key that is valid for only one minute to obtain the encrypted and decrypted data, which is then sent to a business module. When a user attempts to obtain the target data, the user can only obtain the target data within a limited time. If the time exceeds one minute, the user will not be able to obtain the target data and can only send an encryption and decryption request message again.

[0140] In this way, by utilizing the timeliness of the temporary key, the target data is encrypted and decrypted, thereby improving the security of the data.

[0141] Step 506: The calling module returns the encrypted and decrypted data to the business module.

[0142] It should be noted that the encrypted and decrypted data includes the encrypted data or the target data after decrypting the encrypted data.

[0143] See also Figure 6 As shown, it is an implementation process of a method for data encryption and decryption provided in an embodiment of the present application. Figure 2 , combined with Figure 1 The encryption and decryption module shown in the figure, the specific implementation process of the method is as follows:

[0144] Step 600: The encryption / decryption module receives a second encryption / decryption request message containing target data sent by the calling module.

[0145] It should be noted that the target data included in the second encryption / decryption request message is obtained according to the first encryption / decryption request message including the target data sent by the service module.

[0146] In one embodiment, the encryption and decryption module uses the oauth password mode to authenticate and authorize the business module, so that the business module sends a first encryption and decryption request message containing the target data to the calling module, and then sends a second encryption and decryption request message containing the target data to the encryption and decryption module through the calling module.

[0147] In this way, the encryption and decryption module uses the oauth password mode to authenticate and authorize the business module, effectively avoiding problems such as tampering with the target data and unauthorized illegal access.

[0148] Step 601: The encryption / decryption module encrypts / decrypts the target data included in the second encryption / decryption request message.

[0149] Specifically, the encryption and decryption main module in the encryption and decryption module encrypts and decrypts the target data.

[0150] Step 602: If the encryption / decryption module determines that the encryption / decryption fails, it sends a second encryption / decryption response message including a temporary key to the calling module.

[0151] Specifically, if it is determined that encryption and decryption has failed, a second encryption and decryption response message containing a temporary key is sent to the calling module, so that the calling module performs the following steps: encrypt and decrypt the target data based on the temporary key contained in the second encryption and decryption response message, and send the obtained encrypted and decrypted data to the business module.

[0152] It should be noted that the second encryption and decryption response message containing the temporary key can be sent by the encryption and decryption main module to the calling module, or it can be returned by the encryption and decryption backup module when it detects that the encryption and decryption main module is operating abnormally.

[0153] Step 603: The calling module encrypts and decrypts the target data based on the temporary key included in the second encryption and decryption response message.

[0154] Specifically, the calling module decrypts the temporary key, obtains the decrypted temporary key, and encrypts and decrypts the target data using the temporary key.

[0155] Step 604: The calling module sends the obtained encrypted and decrypted data to the business module.

[0156] In this way, when an abnormality occurs in the operation of the encryption and decryption module, resulting in the inability to encrypt and decrypt the target data, the calling module can encrypt and decrypt the target data using the temporary key provided by the encryption and decryption module, thereby improving the success rate of encryption and decryption.

[0157] See also Figure 7 As shown, it is an interactive flow chart of a method for data encryption and decryption provided in an embodiment of the present application. The specific implementation process of the method is as follows:

[0158] Step 700: The service module sends a first encryption / decryption request message containing target data to the calling module.

[0159] Step 701: a calling module obtains target data contained in a first encryption / decryption request message.

[0160] Step 702: The calling module sends a second encryption / decryption request message containing target data to the encryption / decryption module.

[0161] Step 703: The encryption / decryption module obtains the target data included in the second encryption / decryption request message.

[0162] Step 704: The encryption and decryption module encrypts and decrypts the target data.

[0163] Step 705: If the encryption / decryption module determines that the encryption / decryption fails, it sends a second encryption / decryption response message to the calling module.

[0164] Step 706: The calling module obtains the temporary key in the second encryption / decryption response message.

[0165] Step 707: The calling module encrypts and decrypts the target data based on the temporary key to obtain encrypted and decrypted data.

[0166] Step 708: The calling module sends the encrypted and decrypted data to the business module.

[0167] Specifically, when executing step 700 to step 708, the specific steps refer to the above-mentioned steps 500 to step 506 and step 600 to step 604, which are not repeated here.

[0168] See also Figure 8 FIG. 1 is a schematic diagram of a data encryption and decryption device provided in an embodiment of the present application. Figure 1 ,include:

[0169] The first acquisition unit 801 is configured to, when determining that a first encryption / decryption request message containing target data sent by a business module is received, acquire the target data contained in the first encryption / decryption request message;

[0170] The first transceiver unit 802 is used to send a second encryption and decryption request message containing target data to the encryption and decryption module, so that the encryption and decryption module encrypts and decrypts the target data;

[0171] Receiving unit 803: used to receive a second encryption and decryption response message returned by the encryption and decryption module;

[0172] The second acquisition unit 804 is configured to acquire the temporary key in the second encryption / decryption response message if it is determined that the encryption / decryption fails based on the second encryption / decryption response message;

[0173] The obtaining unit 805 is used to encrypt and decrypt the target data based on the temporary key to obtain the encrypted and decrypted data;

[0174] The second transceiver unit 806 is used to return the encrypted and decrypted data to the service module.

[0175] In one implementation, the receiving unit 803 is used to:

[0176] Receive a second encryption / decryption response message returned by the encryption / decryption main module; or,

[0177] The second encryption / decryption response message returned by the encryption / decryption standby module when the encryption / decryption main module is detected to be operating abnormally is received.

[0178] In one implementation, the obtaining unit 805 is used to:

[0179] Decrypting the temporary key to obtain the decrypted temporary key;

[0180] The target data is encrypted and decrypted according to the decrypted temporary key to obtain encrypted and decrypted data.

[0181] participate Fig. 9 FIG. 1 is a schematic diagram of a data encryption and decryption device provided in an embodiment of the present application. Figure 2 ,include:

[0182] Receiving unit 901: used to receive a second encryption and decryption request message containing target data sent by a calling module, wherein the target data contained in the second encryption and decryption request message is obtained according to a first encryption and decryption request message containing target data sent by a service module;

[0183] Encryption and decryption unit 902: used to encrypt and decrypt target data included in the second encryption and decryption request message;

[0184] Transceiver unit 903: is used to send a second encryption and decryption response message containing a temporary key to the calling module if it is determined that the encryption and decryption fails, so that the calling module performs the following steps: encrypt and decrypt the target data based on the temporary key contained in the second encryption and decryption response message, and send the obtained encrypted and decrypted data to the business module.

[0185] In one implementation, the transceiver unit 903 is used to:

[0186] The encryption and decryption main module sends a second encryption and decryption response message containing a temporary key to the calling module; or,

[0187] When the encryption / decryption backup module detects that the encryption / decryption main module is operating abnormally, it returns a second encryption / decryption response message containing a temporary key.

[0188] In the embodiment of the present application, when the calling module determines that it has received the first encryption and decryption request message containing the target data sent by the business module, it obtains the target data contained in the first encryption and decryption request message; sends the second encryption and decryption request message containing the target data to the encryption and decryption module, so that the encryption and decryption module encrypts and decrypts the target data; the calling module receives the second encryption and decryption response message returned by the encryption and decryption module; if it is determined based on the second encryption and decryption response message that the encryption and decryption fails, the temporary key in the second encryption and decryption response message is obtained; the calling module encrypts and decrypts the target data based on the temporary key, obtains the encrypted and decrypted data, and returns the encrypted and decrypted data to the business module. In this way, when the encryption and decryption module fails to encrypt and decrypt the target data, the calling module can perform encryption and decryption processing on the target data according to the temporary key provided by the encryption and decryption module, obtain the encrypted and decrypted data, and send the encrypted and decrypted data to the business module, thereby improving the success rate and security of data encryption and decryption.

[0189] See also Fig.10 , which is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.

[0190] The electronic device 1000 includes: a processor 1010 and a memory 1020 , and optionally, may also include a power supply 1030 , a display unit 1040 , and an input unit 1050 .

[0191] The processor 1010 is the control center of the electronic device 1000. It connects various components using various interfaces and lines, and performs various functions of the electronic device 1000 by running or executing software programs and / or data stored in the memory 1020, thereby monitoring the electronic device 1000 as a whole.

[0192] In the embodiment of the present application, the processor 1010 executes the following when calling the computer program stored in the memory 1020: Figure 5 or Figure 6 The embodiment shown in provides a method for data encryption and decryption.

[0193] Optionally, the processor 1010 may include one or more processing units; preferably, the processor 1010 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and applications, and the modem processor mainly processes wireless communications. It is understandable that the modem processor may not be integrated into the processor 1010. In some embodiments, the processor and the memory may be implemented on a single chip, and in some embodiments, they may also be implemented separately on separate chips.

[0194] The memory 1020 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, various applications, etc.; the data storage area may store data created according to the use of the electronic device 1000, etc. In addition, the memory 1020 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices, etc.

[0195] The electronic device 1000 also includes a power source 1030 (such as a battery) for supplying power to various components. The power source can be logically connected to the processor 1010 through a power management system, so that the power management system can manage functions such as charging, discharging, and power consumption.

[0196] The display unit 1040 may be used to display information input by the user or information provided to the user and various menus of the electronic device 1000, and in the embodiment of the present invention, is mainly used to display the display interface of each application in the electronic device 1000 and objects such as text and pictures displayed in the display interface. The display unit 1040 may include a display panel 1041. The display panel 1041 may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), etc.

[0197] The input unit 1050 may be used to receive information such as numbers or characters input by the user. The input unit 1050 may include a touch panel 1051 and other input devices 1052. The touch panel 1051, also known as a touch screen, may collect touch operations of the user on or near it (such as operations of the user using a finger, a stylus, or any other suitable object or accessory on or near the touch panel 1051).

[0198] Specifically, the touch panel 1051 can detect the user's touch operation, detect the signal brought by the touch operation, convert these signals into touch point coordinates, send them to the processor 1010, and receive and execute the command sent by the processor 1010. In addition, the touch panel 1051 can be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. Other input devices 1052 can include but are not limited to one or more of a physical keyboard, function keys (such as volume control keys, power on / off keys, etc.), a trackball, a mouse, a joystick, etc.

[0199] Of course, the touch panel 1051 can cover the display panel 1041. When the touch panel 1051 detects a touch operation on or near it, it transmits it to the processor 1010 to determine the type of touch event, and then the processor 1010 provides corresponding visual output on the display panel 1041 according to the type of touch event. Fig.10 In the embodiment, the touch panel 1051 and the display panel 1041 are two independent components to realize the input and output functions of the electronic device 1000, but in some embodiments, the touch panel 1051 and the display panel 1041 can be integrated to realize the input and output functions of the electronic device 1000.

[0200] The electronic device 1000 may also include one or more sensors, such as a pressure sensor, a gravity acceleration sensor, a proximity light sensor, etc. Of course, according to the needs of specific applications, the electronic device 1000 may also include other components such as a camera. Since these components are not the key components used in the embodiments of the present application, Fig.10It is not shown and will not be described in detail.

[0201] Those skilled in the art will understand that Fig.10 The electronic device is merely an example and does not limit the electronic device, and may include more or less components than those shown in the figure, or may combine certain components, or may include different components.

[0202] In an embodiment of the present application, a readable storage medium stores a computer program, and when the computer program is executed by a processor, a communication device can perform each step in the above embodiment.

[0203] For the convenience of description, the above parts are divided into centers (or units) according to their functions and described separately. Of course, when implementing this application, the functions of each center (or unit) can be implemented in the same or multiple software or hardware.

[0204] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0205] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0206] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0207] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0208] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they have learned the basic creative concept. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.

[0209] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A data encryption and decryption system, characterized in that: include: A calling module, an encryption and decryption module and at least one business module; wherein, Each service module is used to: send a first encryption and decryption request message containing target data to the calling module, and receive the encrypted and decrypted data returned by the calling module; The calling module is configured to send a second encryption / decryption request message containing the target data to the encryption / decryption module; receive a second encryption / decryption response message returned by the encryption / decryption module; if it is determined based on the second encryption / decryption response message that the encryption / decryption fails, obtain a temporary key in the second encryption / decryption response message, and encrypt / decrypt the target data based on the temporary key to obtain the encrypted / decrypted data; The encryption and decryption module is used to encrypt and decrypt the target data when the second encryption and decryption request message is received, and return the second encryption and decryption response message to the calling module if the encryption and decryption fails; The encryption and decryption module includes: an encryption and decryption main module, an encryption and decryption backup module and a key storage module; the key storage module is used to store the keys of each business module; the encryption and decryption main module is used to determine when receiving the second encryption and decryption request message, obtain the corresponding key stored in the key storage module, and encrypt and decrypt the target data according to the key, and return a second encryption and decryption response message to the calling module; the encryption and decryption backup module is used to monitor the operating status of the encryption and decryption main module, and if the monitoring result indicates that the encryption and decryption main module is operating abnormally, then send the second encryption and decryption response message containing the temporary key to the calling module, wherein, if the encryption and decryption backup module detects that the operating status of the encryption and decryption main module is abnormal, it continues to monitor, and if When the encryption / decryption main module cannot complete the encryption / decryption of the target data and can provide a temporary key, the monitoring continues, and the software development tool obtains the decrypted temporary key through the temporary key provided by the encryption / decryption main module, and encrypts / decrypts the target data through the decrypted temporary key to obtain the encrypted / decrypted data, and sends the encrypted / decrypted data to the official micro-system; if the encryption / decryption main module cannot complete the encryption / decryption of the target data and cannot provide a temporary key, the encryption / decryption backup module will provide a temporary key, and the software development tool obtains the decrypted temporary key through the temporary key provided by the encryption / decryption backup module, and encrypts / decrypts the target data through the decrypted temporary key to obtain the encrypted / decrypted data, and sends the encrypted / decrypted data to the official micro-system.

2. The system according to claim 1, characterized in that It also includes an abnormal operation warning module; The abnormal operation warning module is used to obtain the user operation data of the system operator on the data encryption and decryption system, and analyze the user operation data. If it is determined that the analysis result indicates that the user operation is abnormal, an alarm operation is performed.

3. A method for data encryption and decryption, characterized in that: A calling module applied to an encryption and decryption system, wherein the encryption and decryption system further includes an encryption and decryption module and at least one business module, including: When it is determined that a first encryption / decryption request message containing target data sent by the service module is received, obtaining the target data contained in the first encryption / decryption request message; Sending a second encryption / decryption request message including the target data to the encryption / decryption module, so that the encryption / decryption module encrypts / decrypts the target data based on the second encryption / decryption request message; Receiving a second encryption / decryption response message returned by the encryption / decryption module; If it is determined based on the second encryption / decryption response message that encryption / decryption fails, obtaining a temporary key in the second encryption / decryption response message; Based on the temporary key, encrypt and decrypt the target data to obtain encrypted and decrypted data; Returning the encrypted and decrypted data to the business module; The encryption and decryption module includes: an encryption and decryption main module, an encryption and decryption backup module and a key storage module; the key storage module is used to store the keys of each business module; the encryption and decryption main module is used to determine when receiving the second encryption and decryption request message, obtain the corresponding key stored in the key storage module, and encrypt and decrypt the target data according to the key, and return a second encryption and decryption response message to the calling module; the encryption and decryption backup module is used to monitor the operating status of the encryption and decryption main module, and if the monitoring result indicates that the encryption and decryption main module is operating abnormally, then send the second encryption and decryption response message containing the temporary key to the calling module, wherein, if the encryption and decryption backup module detects that the operating status of the encryption and decryption main module is abnormal, it continues to monitor, and if When the encryption / decryption main module cannot complete the encryption / decryption of the target data and can provide a temporary key, the monitoring continues, and the software development tool obtains the decrypted temporary key through the temporary key provided by the encryption / decryption main module, and encrypts / decrypts the target data through the decrypted temporary key to obtain the encrypted / decrypted data, and sends the encrypted / decrypted data to the official micro-system; if the encryption / decryption main module cannot complete the encryption / decryption of the target data and cannot provide a temporary key, the encryption / decryption backup module will provide a temporary key, and the software development tool obtains the decrypted temporary key through the temporary key provided by the encryption / decryption backup module, and encrypts / decrypts the target data through the decrypted temporary key to obtain the encrypted / decrypted data, and sends the encrypted / decrypted data to the official micro-system.

4. The method according to claim 3, characterized in that The encryption and decryption module includes an encryption and decryption main module and an encryption and decryption standby module, and receiving a second encryption and decryption response message returned by the encryption and decryption module includes: Receive a second encryption / decryption response message returned by the encryption / decryption main module; or receive a second encryption / decryption response message returned by the encryption / decryption backup module when detecting that the encryption / decryption main module is operating abnormally.

5. The method according to claim 3 or 4, characterized in that: The step of encrypting and decrypting the target data based on the temporary key to obtain encrypted and decrypted data includes: Decrypting the temporary key to obtain a decrypted temporary key; The target data is encrypted and decrypted according to the decrypted temporary key to obtain the encrypted and decrypted data.

6. A method for data encryption and decryption, characterized in that: An encryption and decryption module applied to an encryption and decryption system, wherein the encryption and decryption system further includes a calling module and at least one business module, including: Receiving a second encryption / decryption request message containing target data sent by the calling module, wherein the target data contained in the second encryption / decryption request message is obtained according to a first encryption / decryption request message containing the target data sent by the business module; encrypting and decrypting the target data included in the second encryption and decryption request message; If it is determined that the encryption and decryption fails, a second encryption and decryption response message containing a temporary key is sent to the calling module, so that the calling module performs the following steps: encrypting and decrypting the target data based on the temporary key contained in the second encryption and decryption response message, and sending the obtained encrypted and decrypted data to the business module; The encryption and decryption module includes: an encryption and decryption main module, an encryption and decryption backup module and a key storage module; the key storage module is used to store the keys of each business module; the encryption and decryption main module is used to determine when receiving the second encryption and decryption request message, obtain the corresponding key stored in the key storage module, and encrypt and decrypt the target data according to the key, and return a second encryption and decryption response message to the calling module; the encryption and decryption backup module is used to monitor the operating status of the encryption and decryption main module, and if the monitoring result indicates that the encryption and decryption main module is operating abnormally, then send the second encryption and decryption response message containing the temporary key to the calling module, wherein, if the encryption and decryption backup module detects that the operating status of the encryption and decryption main module is abnormal, it continues to monitor, and if When the encryption / decryption main module cannot complete the encryption / decryption of the target data and can provide a temporary key, the monitoring continues, and the software development tool obtains the decrypted temporary key through the temporary key provided by the encryption / decryption main module, and encrypts / decrypts the target data through the decrypted temporary key to obtain the encrypted / decrypted data, and sends the encrypted / decrypted data to the official micro-system; if the encryption / decryption main module cannot complete the encryption / decryption of the target data and cannot provide a temporary key, the encryption / decryption backup module will provide a temporary key, and the software development tool obtains the decrypted temporary key through the temporary key provided by the encryption / decryption backup module, and encrypts / decrypts the target data through the decrypted temporary key to obtain the encrypted / decrypted data, and sends the encrypted / decrypted data to the official micro-system.

7. The method according to claim 6, characterized in that The encryption and decryption module includes an encryption and decryption main module and an encryption and decryption standby module, and the second encryption and decryption response message containing the temporary key includes: The encryption and decryption main module sends a second encryption and decryption response message including the temporary key to the calling module; or When the encryption / decryption backup module detects that the encryption / decryption main module is operating abnormally, the second encryption / decryption response message containing the temporary key is returned.

8. A device for data encryption and decryption, characterized in that: include: A first acquisition unit: configured to, when determining that a first encryption / decryption request message containing target data sent by a business module is received, acquire the target data contained in the first encryption / decryption request message; A first transceiver unit is used to send a second encryption / decryption request message containing the target data to the encryption / decryption module, so that the encryption / decryption module encrypts / decrypts the target data; Receiving unit: used to receive the second encryption and decryption response message returned by the encryption and decryption module; A second acquisition unit: configured to acquire a temporary key in the second encryption / decryption response message if it is determined based on the second encryption / decryption response message that the encryption / decryption fails; An obtaining unit: configured to encrypt and decrypt the target data based on the temporary key to obtain encrypted and decrypted data; A second transceiver unit: used for returning the encrypted and decrypted data to the service module; The encryption and decryption module includes: an encryption and decryption main module, an encryption and decryption backup module and a key storage module; the key storage module is used to store the keys of each business module; the encryption and decryption main module is used to determine when receiving the second encryption and decryption request message, obtain the corresponding key stored in the key storage module, and encrypt and decrypt the target data according to the key, and return a second encryption and decryption response message to the calling module; the encryption and decryption backup module is used to monitor the operating status of the encryption and decryption main module, and if the monitoring result indicates that the encryption and decryption main module is operating abnormally, send the second encryption and decryption response message containing the temporary key to the calling module, wherein if the encryption and decryption backup module detects that the operating status of the encryption and decryption main module is abnormal, it continues to monitor, and if the When the encryption / decryption main module cannot complete the encryption / decryption of the target data and can provide a temporary key, the monitoring continues, and the software development tool obtains the decrypted temporary key through the temporary key provided by the encryption / decryption main module, and encrypts / decrypts the target data through the decrypted temporary key to obtain the encrypted / decrypted data, and sends the encrypted / decrypted data to the official micro-system; if the encryption / decryption main module cannot complete the encryption / decryption of the target data and cannot provide a temporary key, the encryption / decryption backup module will provide a temporary key, and the software development tool obtains the decrypted temporary key through the temporary key provided by the encryption / decryption backup module, and encrypts / decrypts the target data through the decrypted temporary key to obtain the encrypted / decrypted data, and sends the encrypted / decrypted data to the official micro-system.

9. A device for data encryption and decryption, characterized in that: include: A receiving unit: configured to receive a second encryption / decryption request message containing target data sent by a calling module, wherein the target data contained in the second encryption / decryption request message is obtained according to a first encryption / decryption request message containing the target data sent by a business module; An encryption and decryption unit: configured to encrypt and decrypt the target data contained in the second encryption and decryption request message; The transceiver unit is used to send a second encryption and decryption response message containing a temporary key to the calling module if it is determined that the encryption and decryption fails, so that the calling module performs the following steps: encrypting and decrypting the target data based on the temporary key contained in the second encryption and decryption response message, and sending the obtained encrypted and decrypted data to the business module; The transceiver unit includes: an encryption and decryption main module, an encryption and decryption backup module and a key storage module; the key storage module is used to store the keys of each business module; the encryption and decryption main module is used to determine when receiving the second encryption and decryption request message, obtain the corresponding key stored in the key storage module, and encrypt and decrypt the target data according to the key, and return a second encryption and decryption response message to the calling module; the encryption and decryption backup module is used to monitor the operating status of the encryption and decryption main module, and if the monitoring result indicates that the encryption and decryption main module is operating abnormally, send the second encryption and decryption response message containing the temporary key to the calling module, wherein if the encryption and decryption backup module detects that the operating status of the encryption and decryption main module is abnormal, it continues to monitor, and if the When the encryption / decryption main module cannot complete the encryption / decryption of the target data and can provide a temporary key, the monitoring continues, and the software development tool obtains the decrypted temporary key through the temporary key provided by the encryption / decryption main module, and encrypts / decrypts the target data through the decrypted temporary key to obtain the encrypted / decrypted data, and sends the encrypted / decrypted data to the official micro-system; if the encryption / decryption main module cannot complete the encryption / decryption of the target data and cannot provide a temporary key, the encryption / decryption backup module will provide a temporary key, and the software development tool obtains the decrypted temporary key through the temporary key provided by the encryption / decryption backup module, and encrypts / decrypts the target data through the decrypted temporary key to obtain the encrypted / decrypted data, and sends the encrypted / decrypted data to the official micro-system.