A method and device for realizing data encryption and decryption

By setting up relay nodes between data interaction nodes, dynamically generate and share key pairs, and through key reconstruction rules and verification mechanisms, the problem of low key configuration efficiency in the existing technology is solved, and data transmission efficiency is improved and security.

CN116192375BActive Publication Date: 2024-12-06FUJIAN HUIZHOU INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310100579.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-02-07
Publication Date
2024-12-06
Estimated Expiration
2043-02-07

AI Technical Summary

Technical Problem

When the existing encryption and decryption system is encrypted, two sets of keys are required to be configured, resulting in an increase in the calculation amount of data transmission and low efficiency.

Method used

Set up a relay node between the data interaction nodes, dynamically generate and publish key pairs, make the two data interaction nodes share the target key through key reconstruction rules, and improve communication efficiency and security through verification and resource occupation elections.

Benefits of technology

It reduces the amount of encryption and decryption calculation before and after data transmission, improves data transmission efficiency, and enhances communication security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116192375B_ABST
    Figure CN116192375B_ABST
Patent Text Reader

Abstract

The present application relates to the field of data processing technology, and in particular to a method, device, computer equipment, storage medium and computer program product for implementing data encryption and decryption. The method comprises: a data interaction node generates a data interaction request based on the data to be transmitted, and sends the data interaction request to a relay node; after the relay node obtains the data interaction request, it parses the data interaction request to determine the target data interaction node; the relay node generates a key pair and sends the data interaction node; the relay node publishes a key reconstruction rule to the data interaction node and the target data interaction node at a preset time interval, and the data interaction node and the target data interaction node reconstruct the key pair into a target key based on the key reconstruction rule; the data interaction node and the target data interaction node implement encryption and decryption communication based on the target key within the time range covered by the current first reconstruction rule. The use of this method can improve the encryption transmission efficiency of data.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method, apparatus, computer equipment, storage medium and computer program product for implementing data encryption and decryption. Background Art

[0002] With the development of society, the Internet and mobile Internet have become an inseparable part of people's lives. While the Internet brings various conveniences and speeds, the leakage of data privacy of individual users and enterprises has also become the focus of attention. In this case, data encryption and decryption technology has become an important data processing technology. Data encryption refers to the conversion of plaintext into ciphertext through encryption algorithms and encryption keys. Correspondingly, data decryption is the restoration of ciphertext to plaintext through decryption algorithms and decryption keys. The core of data encryption and data decryption is cryptography. In the context of the rapid development of data processing technology, data encryption and decryption are still the most reliable method for computer systems to protect information. It uses cryptographic technology to encrypt information and achieve information concealment, thereby playing a role in protecting the security of information.

[0003] At present, common data encryption and decryption methods mainly include symmetric encryption algorithms and asymmetric encryption algorithms. Among them, symmetric encryption algorithms refer to the use of the same key when encrypting and decrypting data, while asymmetric encryption algorithms refer to the use of two different keys for encryption and decryption, which are public keys and private keys. In asymmetric encryption technology, Party B generates a pair of keys, namely a public key and a private key, and discloses the public key to other parties; Party A, who obtains the public key, uses the key to encrypt confidential information and then sends it to Party B; Party B then uses another private key, namely the private key, to decrypt the encrypted information. During the transmission process, even if the attacker intercepts the transmitted ciphertext and Party B's public key, the ciphertext cannot be decrypted. Similarly, if Party B needs to reply the encrypted information to Party A, Party A needs to first publish Party A's public key to Party B for encryption, and then Party A's private key, which is kept by Party A, decrypts the ciphertext.

[0004] However, the current data encryption and decryption methods have the following technical problems:

[0005] In the existing encryption and decryption system, when Party A and Party B need to perform encrypted communication, two sets of keys need to be configured to encrypt and decrypt the data of both parties respectively, which easily leads to an increase in the amount of data transmission calculation and low data transmission efficiency. Summary of the invention

[0006] Based on this, it is necessary to provide a method, device, computer equipment, computer-readable storage medium and computer program product for data encryption and decryption that can reduce the amount of encryption and decryption calculations before and after data transmission and improve the efficiency of data encryption transmission in response to the above technical problems.

[0007] In a first aspect, the present application provides a method for implementing data encryption and decryption, the method being implemented based on a data encryption and decryption system, the data encryption and decryption system comprising a data interaction node and a relay node, the data interaction node being used to generate data to be transmitted, the relay node being used to assist data communication between data interaction nodes, the method comprising:

[0008] The data interaction node generates a data interaction request based on the data to be transmitted, and sends the data interaction request to the relay node;

[0009] After acquiring the data interaction request, the relay node analyzes the data interaction request to determine a target data interaction node;

[0010] The relay node generates a key pair and publishes the key pair to the data interaction node and the target data interaction node, wherein the key pair includes a real key and an interference key;

[0011] The relay node publishes a key reconstruction rule to the data interaction node and the target data interaction node at a preset time interval, and the data interaction node and the target data interaction node reconstruct the key pair into a target key based on the key reconstruction rule;

[0012] The data interaction node and the target data interaction node implement encryption and decryption communication based on the target key within a time range covered by the current first reconstruction rule.

[0013] In one of the embodiments, the relay node obtains the data interaction request and then analyzes the data interaction request to determine the target data interaction node, including:

[0014] The relay node sends interaction verification information to the target data interaction node;

[0015] After acquiring the interaction verification information, the target data interaction node verifies the data interaction node based on the interaction verification information, and responds to the relay node with the interaction confirmation message after the verification is passed.

[0016] In one of the embodiments, the relay node sending the interaction verification information to the target data interaction node includes:

[0017] The data interaction node generates a data summary based on the data to be transmitted;

[0018] The relay node obtains the data summary, and generates interactive verification information based on the data summary.

[0019] In one embodiment, the method further comprises:

[0020] The data interaction node broadcasts an election message to obtain election feedback responded by a number of the relay nodes;

[0021] The data interaction node obtains the communication resource occupancy values ​​fed back by the plurality of relay nodes, and selects the relay node with the lowest communication resource occupancy value as the target relay node.

[0022] In one embodiment, the method further comprises:

[0023] The data interaction node tests the communication resource occupancy value with the target relay node at a preset time interval;

[0024] When the communication resource occupancy value changes, the target relay node is re-elected.

[0025] In a second aspect, the present application also provides a device for implementing data encryption and decryption. The device comprises:

[0026] An interaction request module, used for the data interaction node to generate a data interaction request based on the data to be transmitted, and send the data interaction request to the relay node;

[0027] A target node module, used for the relay node to parse the data interaction request to determine the target data interaction node after obtaining the data interaction request;

[0028] A key generation module, used for the relay node to generate a key pair and publish the key pair to the data interaction node and the target data interaction node, the key pair including a real key and an interference key;

[0029] A key reconstruction module, used for the relay node to publish a key reconstruction rule to the data interaction node and the target data interaction node at a preset time interval, and the data interaction node and the target data interaction node reconstruct the key pair into a target key based on the key reconstruction rule;

[0030] The encryption communication module is used for the data interaction node and the target data interaction node to implement encryption and decryption communication based on the target key within the time range covered by the current first reconstruction rule.

[0031] In one embodiment, the target node module includes:

[0032] A node verification module, used for the relay node to send interaction verification information to the target data interaction node;

[0033] The verification feedback module is used for verifying the data interaction node based on the interaction verification information after the target data interaction node obtains the interaction verification information, and responding to the relay node with the interaction confirmation message after the verification is passed.

[0034] In one embodiment, the node verification module includes:

[0035] A data summary module, used for the data interaction node to generate a data summary based on the data to be transmitted;

[0036] The information generation module is used for the relay node to obtain the data summary and generate interactive verification information based on the data summary.

[0037] In one embodiment, the device further comprises:

[0038] A message broadcast module, used for the data interaction node to broadcast an election message and obtain election feedback responded by a number of the relay nodes;

[0039] The node election module is used for the data interaction node to obtain the communication resource occupancy values ​​fed back by a number of the relay nodes, and select the relay node with the lowest communication resource occupancy value as the target relay node.

[0040] In one embodiment, the device further comprises:

[0041] A node maintenance module, used for the data interaction node to test the communication resource occupancy value with the target relay node at a preset time interval;

[0042] The node changing module is used to re-elect the target relay node when the communication resource occupancy value changes.

[0043] In a third aspect, the present application also provides a data encryption and decryption system, the system comprising:

[0044] A data interaction node, the data interaction node is used to generate data to be transmitted and perform data communication transmission with other data interaction nodes;

[0045] A relay node, wherein the relay node is used to assist data communication between the data interaction nodes.

[0046] In a fourth aspect, the present application further provides a computer device. The computer device includes a memory and a processor, the memory stores a computer program, and the processor implements the steps in a method for implementing data encryption and decryption as described in any one of the embodiments of the first aspect when executing the computer program.

[0047] In a fifth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in a method for implementing data encryption and decryption as described in any one of the embodiments in the first aspect are implemented.

[0048] In a sixth aspect, the present application further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps in the method for implementing data encryption and decryption as described in any one of the embodiments in the first aspect are implemented.

[0049] The above method, apparatus, computer device, storage medium and computer program product for implementing data encryption and decryption can achieve the beneficial effects of the technical problems in the corresponding background technology by deducing the technical features in the claims:

[0050] A relay node is set between the data interaction nodes. When there is a communication demand between the data interaction nodes, an interaction request is sent to the relay node. The relay node dynamically generates a pair of keys for the current data interaction task and publishes the two basic keys to the two data interaction nodes. At this time, the two basic keys are unavailable. Even if a third party obtains the keys, it is difficult to directly crack the interaction data between the data interaction nodes. The relay node then dynamically publishes reconstruction rules. Through the reconstruction rules, the target keys can be generated respectively in the two data interaction nodes, so that the final target key is determined by the key pairs and reconstruction rules that are dynamically published respectively, which increases the difficulty for the third party to obtain the target key, while allowing the two data interaction nodes to share a set of target keys, which helps to improve the data interaction node's processing efficiency for encryption and decryption of data;

[0051] Using broadcasting to select relay nodes among a large number of available data interaction nodes helps to select relay nodes with the smallest communication resource occupancy value to assist in the communication between data interaction nodes, which helps to further improve the efficiency of data encryption and decryption communication between data interaction nodes;

[0052] The relay node uses communication technology to verify the target data interaction node before assisting the data interaction node to perform encryption and decryption communication, which helps to further improve the security of communication between data interaction nodes. BRIEF DESCRIPTION OF THE DRAWINGS

[0053] Figure 1 A schematic diagram of a flow chart of a method for implementing data encryption and decryption in an embodiment;

[0054] Figure 2 A structural block diagram of a device for implementing data encryption and decryption in one embodiment;

[0055] Figure 3 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. Implementation

[0056] 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.

[0057] With the development of information technology, data encryption and decryption algorithms have been widely used in many fields and are closely related to people's lives, such as environmental monitoring data management, road transportation information management, information resource management of enterprises and institutions, etc.

[0058] At present, common data encryption and decryption methods mainly include symmetric encryption algorithms and asymmetric encryption algorithms. Among them, symmetric encryption algorithms refer to the use of the same key when encrypting and decrypting data, while asymmetric encryption algorithms refer to the use of two different keys for encryption and decryption, which are public keys and private keys. In asymmetric encryption technology, Party B generates a pair of keys, namely a public key and a private key, and discloses the public key to other parties; Party A, who obtains the public key, uses the key to encrypt confidential information and then sends it to Party B; Party B then uses another private key, namely the private key, to decrypt the encrypted information. During the transmission process, even if the attacker intercepts the transmitted ciphertext and Party B's public key, the ciphertext cannot be decrypted. Similarly, if Party B needs to reply the encrypted information to Party A, Party A needs to first publish Party A's public key to Party B for encryption, and then Party A's private key, which is kept by Party A, decrypts the ciphertext.

[0059] However, in the existing encryption and decryption system, when Party A and Party B need to perform encrypted communication, two sets of keys need to be configured to encrypt and decrypt the data of both parties respectively, which easily leads to an increase in the amount of data transmission calculation and low data transmission efficiency.

[0060] Based on this, a method for implementing data encryption and decryption provided in an embodiment of the present application can be applied to a data encryption and decryption system, including a data interaction node and a relay node. The data interaction node communicates with the relay node through a network. Among them, the data interaction node can be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The relay node can be implemented with an independent server or a server cluster consisting of multiple servers.

[0061] In one embodiment, Figure 1 As shown, a method for realizing data encryption and decryption is provided, and the method is applied to Figure 1 A data encryption and decryption system in is taken as an example to illustrate, comprising the following steps:

[0062] Step 101: The data interaction node generates a data interaction request based on the data to be transmitted, and sends the data interaction request to the relay node;

[0063] Step 103: the relay node obtains the data interaction request and parses the data interaction request to determine a target data interaction node;

[0064] Step 105: the relay node generates a key pair and publishes the key pair to the data interaction node and the target data interaction node, the key pair including a real key and an interference key;

[0065] Step 107: the relay node publishes a key reconstruction rule to the data interaction node and the target data interaction node at a preset time interval, and the data interaction node and the target data interaction node reconstruct the key pair into a target key based on the key reconstruction rule;

[0066] Step 109: The data interaction node and the target data interaction node implement encryption and decryption communication based on the target key within the time range covered by the current first reconstruction rule.

[0067] By adopting the above technical solution, the following beneficial effects can be obtained:

[0068] A relay node is set between the data interaction nodes. When there is a communication demand between the data interaction nodes, an interaction request is sent to the relay node. The relay node dynamically generates a pair of keys for the current data interaction task and publishes the two basic keys to the two data interaction nodes. At this time, the two basic keys are unavailable. Even if a third party obtains the keys, it is difficult to directly crack the interaction data between the data interaction nodes. The relay node then dynamically publishes reconstruction rules. Through the reconstruction rules, target keys can be generated respectively in the two data interaction nodes, so that the final target key is determined by the key pairs and reconstruction rules that are dynamically published respectively. While increasing the difficulty for the third party to obtain the target key, the two data interaction nodes can share a set of target keys, which helps to improve the processing efficiency of the data interaction nodes in encrypting and decrypting data.

[0069] In one embodiment, step 103 includes:

[0070] Step 201: The relay node sends interaction verification information to the target data interaction node;

[0071] Step 203: After obtaining the interaction verification information, the target data interaction node verifies the data interaction node based on the interaction verification information, and responds to the relay node with the interaction confirmation message after the verification is successful.

[0072] In this embodiment, the relay node uses communication technology to verify the target data interaction node before assisting the data interaction node in performing encryption and decryption communication, which helps to further improve the security of communication between data interaction nodes.

[0073] In one embodiment, step 201 includes:

[0074] Step 301: The data interaction node generates a data summary based on the data to be transmitted;

[0075] Step 303: The relay node obtains the data summary, and generates interactive verification information based on the data summary.

[0076] In this embodiment, the data interaction node generates a data summary to assist the relay node in confirming the target data interaction node, which helps to further improve the security of data interaction and also helps to improve the verification efficiency of the target data interaction node.

[0077] In one embodiment, the method further comprises:

[0078] Step 401: the data interaction node broadcasts an election message to obtain election feedback responded by a number of the relay nodes;

[0079] Step 403: the data interaction node obtains the communication resource occupancy values ​​fed back by a number of the relay nodes, and selects the relay node with the lowest communication resource occupancy value as the target relay node.

[0080] In this embodiment, relay nodes are selected from a large number of available data interaction nodes by broadcasting, which helps to select relay nodes with the smallest communication resource occupancy value to assist in communication between data interaction nodes, and helps to further improve the data encryption and decryption communication efficiency between data interaction nodes.

[0081] In one embodiment, the method further comprises:

[0082] Step 501: the data interaction node tests the communication resource occupancy value with the target relay node at a preset time interval;

[0083] Step 503: When the communication resource occupancy value changes, re-elect the target relay node.

[0084] In this embodiment, maintaining and updating the relay nodes helps to improve the application effect of the relay nodes, maintain the characteristic of low communication resource occupancy value of the relay nodes, and ultimately helps to improve the data encryption and decryption communication efficiency between data interaction nodes.

[0085] 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.

[0086] Based on the same inventive concept, the embodiment of the present application also provides a device for implementing the method for implementing data encryption and decryption involved in the above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations of one or more embodiments of the device for implementing data encryption and decryption provided below can refer to the limitations of the method for implementing data encryption and decryption above, and will not be repeated here.

[0087] In one embodiment, Figure 2 As shown, a device for implementing data encryption and decryption is provided, including: an interactive request module, a target node module, a key generation module, a key reconstruction module and an encryption communication module, wherein:

[0088] An interaction request module, used for the data interaction node to generate a data interaction request based on the data to be transmitted, and send the data interaction request to the relay node;

[0089] A target node module, used for the relay node to parse the data interaction request to determine the target data interaction node after obtaining the data interaction request;

[0090] A key generation module, used for the relay node to generate a key pair and publish the key pair to the data interaction node and the target data interaction node, the key pair including a real key and an interference key;

[0091] A key reconstruction module, used for the relay node to publish a key reconstruction rule to the data interaction node and the target data interaction node at a preset time interval, and the data interaction node and the target data interaction node reconstruct the key pair into a target key based on the key reconstruction rule;

[0092] The encryption communication module is used for the data interaction node and the target data interaction node to implement encryption and decryption communication based on the target key within the time range covered by the current first reconstruction rule.

[0093] In one embodiment, the target node module includes:

[0094] A node verification module, used for the relay node to send interaction verification information to the target data interaction node;

[0095] The verification feedback module is used for verifying the data interaction node based on the interaction verification information after the target data interaction node obtains the interaction verification information, and responding to the relay node with the interaction confirmation message after the verification is passed.

[0096] In one embodiment, the node verification module includes:

[0097] A data summary module, used for the data interaction node to generate a data summary based on the data to be transmitted;

[0098] The information generation module is used for the relay node to obtain the data summary and generate interactive verification information based on the data summary.

[0099] In one embodiment, the device further comprises:

[0100] A message broadcast module, used for the data interaction node to broadcast an election message and obtain election feedback responded by a number of the relay nodes;

[0101] The node election module is used for the data interaction node to obtain the communication resource occupancy values ​​fed back by a number of the relay nodes, and select the relay node with the lowest communication resource occupancy value as the target relay node.

[0102] In one embodiment, the device further comprises:

[0103] A node maintenance module, used for the data interaction node to test the communication resource occupancy value with the target relay node at a preset time interval;

[0104] The node changing module is used to re-elect the target relay node when the communication resource occupancy value changes.

[0105] Each module in the above-mentioned device for realizing data encryption and decryption can be realized in whole or in part by software, hardware and their combination. 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.

[0106] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 3 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, 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 communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for realizing data encryption and decryption is implemented. The display screen of the computer device 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 covered on the display screen, or a key, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse, etc.

[0107] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the 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 those shown in the figure, or combine certain components, or have a different arrangement of components.

[0108] In one embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above method embodiments when executing the computer program.

[0109] 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 steps in the above-mentioned method embodiments are implemented.

[0110] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0111] 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.

[0112] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods 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 this application can include at least one of non-volatile 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), magnetoresistive 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, etc., but are not limited to this.

[0113] 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 specification.

[0114] 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 method for implementing data encryption and decryption, characterized in that: The method is implemented based on a data encryption and decryption system, which includes a data interaction node and a relay node. The data interaction node is used to generate data to be transmitted, and the relay node is used to assist data communication between the data interaction nodes. The method includes: The data interaction node generates a data interaction request based on the data to be transmitted, and sends the data interaction request to the relay node; After obtaining the data interaction request, the relay node analyzes the data interaction request to determine a target data interaction node; The relay node generates a key pair and publishes the key pair to the data interaction node and the target data interaction node, wherein the key pair includes a real key and an interference key; The relay node publishes a key reconstruction rule to the data interaction node and the target data interaction node at a preset time interval, and the data interaction node and the target data interaction node reconstruct the key pair into a target key based on the key reconstruction rule; The data interaction node and the target data interaction node implement encryption and decryption communication based on the target key within a time range covered by the current first reconstruction rule.

2. A method for implementing data encryption and decryption according to claim 1, characterized in that: After the relay node obtains the data interaction request, parsing the data interaction request to determine the target data interaction node includes: The relay node sends interaction verification information to the target data interaction node; After obtaining the interaction verification information, the target data interaction node verifies the data interaction node based on the interaction verification information, and responds to the relay node with an interaction confirmation message after the verification is successful.

3. The method for realizing data encryption and decryption according to claim 2, characterized in that: The relay node sending the interaction verification information to the target data interaction node includes: The data interaction node generates a data summary based on the data to be transmitted; The relay node obtains the data summary, and generates interactive verification information based on the data summary.

4. The method for realizing data encryption and decryption according to claim 1, wherein: The method further comprises: The data interaction node broadcasts an election message and obtains election feedback responded by a number of the relay nodes; The data interaction node obtains the communication resource occupancy values ​​fed back by a number of the relay nodes, and selects the relay node with the lowest communication resource occupancy value as the target relay node.

5. A method for implementing data encryption and decryption according to claim 4, characterized in that: The method further comprises: The data interaction node tests the communication resource occupancy value with the target relay node at a preset time interval; When the communication resource occupancy value changes, the target relay node is re-elected.

6. A device for implementing data encryption and decryption, characterized in that: The device comprises: An interaction request module is used for the data interaction node to generate a data interaction request based on the data to be transmitted, and send the data interaction request to the relay node; A target node module, configured for the relay node to parse the data interaction request after obtaining the data interaction request to determine a target data interaction node; A key generation module, configured for the relay node to generate a key pair and publish the key pair to the data interaction node and the target data interaction node, wherein the key pair includes a real key and an interference key; a key reconstruction module, configured for the relay node to publish a key reconstruction rule to the data interaction node and the target data interaction node at a preset time interval, and the data interaction node and the target data interaction node to reconstruct the key pair into a target key based on the key reconstruction rule; The encryption communication module is used for the data interaction node and the target data interaction node to implement encryption and decryption communication based on the target key within the time range covered by the current first reconstruction rule.

7. 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 5 are implemented.

8. 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 5 are implemented.

9. 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 5 are implemented.

Citation Information

Patent Citations

  • Data transmission method, system and related equipment

    CN103096297A

  • Information transmitting method, processing method and device

    CN107248994A