CN113472537B - Data encryption method, system and computer readable storage medium - Google Patents

Data encryption method, system and computer readable storage medium Download PDF

Info

Publication number
CN113472537B
CN113472537B CN202111018318.9A CN202111018318A CN113472537B CN 113472537 B CN113472537 B CN 113472537B CN 202111018318 A CN202111018318 A CN 202111018318A CN 113472537 B CN113472537 B CN 113472537B
Authority
CN
China
Prior art keywords
data
data segment
target
characteristic parameters
segment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202111018318.9A
Other languages
Chinese (zh)
Other versions
CN113472537A (en
Inventor
马桂武
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Tongyixin Technology Development Co ltd
Original Assignee
Shenzhen Tongyixin Technology Development Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Tongyixin Technology Development Co ltd filed Critical Shenzhen Tongyixin Technology Development Co ltd
Priority to CN202111018318.9A priority Critical patent/CN113472537B/en
Publication of CN113472537A publication Critical patent/CN113472537A/en
Application granted granted Critical
Publication of CN113472537B publication Critical patent/CN113472537B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L9/00Cryptographic mechanisms or cryptographic arrangements for secret or secure communications; Network security protocols
    • H04L9/08Key distribution or management, e.g. generation, sharing or updating, of cryptographic keys or passwords
    • H04L9/0861Generation of secret information including derivation or calculation of cryptographic keys or passwords

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Storage Device Security (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a data encryption method, a data encryption system and a computer readable storage medium. A data encryption method comprising the steps of: acquiring target data to be encrypted, and dividing the target data into a plurality of data segments with preset lengths; calculating characteristic parameters of each data segment; selecting a corresponding interference field according to the characteristic parameters, and adding the interference field into the corresponding data segment to obtain a corresponding target data segment; selecting a corresponding encryption strategy according to the characteristic parameters to encrypt the corresponding target data segment to obtain a target encrypted data segment; and combining the target encrypted data segments corresponding to the plurality of data segments to obtain target encrypted data. The same target data is encrypted by adopting segmentation and different encryption algorithms, so that the decoding difficulty of the target data is greatly improved, and the encryption algorithm of each segment of data segment is dynamic and is related to the characteristic parameters of the data segment, so that the possibility of decoding the target data is further reduced.

Description

Data encryption method, system and computer readable storage medium
Technical Field
The embodiment of the invention relates to the technical field of data encryption, in particular to a data encryption method, a data encryption system and a computer readable storage medium.
Background
At present, in the technical field of data encryption, target data are encrypted by adopting either symmetric encryption or asymmetric encryption, the encryption mode is single, and once an encryption algorithm is cracked, immeasurable loss can be caused.
Therefore, the prior art has defects and needs to be improved urgently.
Disclosure of Invention
In order to solve at least one technical problem, the invention provides a data encryption method, a data encryption system and a computer-readable storage medium, wherein the same target data is encrypted by adopting segmentation and different encryption algorithms, so that the difficulty of decoding the same target data is greatly improved, and the encryption algorithm of each data segment is dynamic and is related to the characteristic parameters of the data segment, so that the possibility of cracking the target data is further reduced, and the data security can be improved.
In order to achieve the above object, the present invention provides a data encryption method, comprising the steps of:
acquiring target data to be encrypted, and dividing the target data into a plurality of data segments with preset lengths;
calculating characteristic parameters of each data segment;
selecting a corresponding interference field according to the characteristic parameters, and adding the interference field into the corresponding data segment to obtain a corresponding target data segment;
selecting a corresponding encryption strategy according to the characteristic parameters to encrypt the corresponding target data segment to obtain a target encrypted data segment;
and combining the target encrypted data segments corresponding to the plurality of data segments to obtain target encrypted data.
The same target data is encrypted by adopting segmentation and different encryption algorithms, so that the decoding difficulty of the target data is greatly improved, and the encryption algorithm of each segment of data segment is dynamic and is related to the characteristic parameters of the data segment, so that the possibility of decoding the target data is further reduced, and the data security can be improved.
Optionally, in the data encryption method according to the embodiment of the present application, the selecting a corresponding encryption policy according to the characteristic parameter to encrypt the corresponding target data segment to obtain the target encrypted data segment includes:
converting the target data segment into a first data segment corresponding to a preset scale according to the characteristic parameters; the preset binary system is not a binary system;
and selecting a corresponding encryption algorithm according to the characteristic parameters to encrypt the first data segment to obtain an encrypted data segment, and adding the corresponding characteristic parameters into the segment head of the encrypted data segment to obtain a target encrypted data segment.
By adopting the method of converting the target data segment into different preset systems, the decoding difficulty of the data is greatly reduced, and the safety of the data is improved.
Optionally, in the data encryption method according to the embodiment of the present application, the selecting a corresponding encryption algorithm according to the characteristic parameter to encrypt the first data segment to obtain a target encrypted data segment includes:
if the characteristic parameters meet a first preset condition, encrypting the first data segment by adopting quantum encryption to obtain a corresponding target encrypted data segment; the first preset condition is one of a plurality of first sub-conditions, and each first sub-condition corresponds to a different quantum encryption algorithm;
if the characteristic parameters meet a second preset condition, encrypting the first data segment of the algorithm by adopting asymmetric encryption to obtain a corresponding target encrypted data segment; the second preset condition is one of a plurality of second sub-conditions, and each second sub-condition corresponds to a different asymmetric encryption pair algorithm.
Optionally, in the data encryption method according to the embodiment of the present application, the calculating a characteristic parameter of each data segment includes:
and carrying out hash operation on each data segment to obtain a corresponding hash value as a characteristic parameter.
Optionally, in the data encryption method according to the embodiment of the present application, the calculating a characteristic parameter of each data segment includes:
performing hash operation on each data segment to obtain a corresponding hash value;
and acquiring a current time parameter, and combining the time parameter and the hash value to obtain the characteristic parameter of the data segment.
Optionally, in the data encryption method according to the embodiment of the present application, the selecting a corresponding interference field according to the characteristic parameter, and adding the interference field to the corresponding data segment to obtain a corresponding target data segment includes:
performing first operation on the hash value to obtain a first interference field;
and mixing the first interference field and the data segment according to a preset mixing rule to obtain a corresponding target data segment.
Optionally, in the data encryption method according to the embodiment of the present application, the obtaining target data to be encrypted and dividing the target data into a plurality of data segments with preset lengths includes:
acquiring target data to be encrypted, wherein the target data to be encrypted is decimal data;
converting the target data into binary target data;
and dividing the binary target data into a plurality of data segments with preset lengths.
Optionally, in the data encryption method according to the embodiment of the present application, the dividing the binary target data into a plurality of data segments with preset lengths includes:
the binary target data is divided into a plurality of data segments with preset length, wherein the number of '1' included in each data segment is a preset constant value.
In a second aspect, an embodiment of the present application further provides a data encryption system, where the system includes: the storage comprises a data encryption method program, and the data encryption method program realizes the following steps when executed by the processor:
acquiring target data to be encrypted, and dividing the target data into a plurality of data segments with preset lengths;
calculating characteristic parameters of each data segment;
selecting a corresponding interference field according to the characteristic parameters, and adding the interference field into the corresponding data segment to obtain a corresponding target data segment;
selecting a corresponding encryption strategy according to the characteristic parameters to encrypt the corresponding target data segment to obtain a target encrypted data segment;
and combining the target encrypted data segments corresponding to the plurality of data segments to obtain target encrypted data.
In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium includes a data encryption method program, and when the data encryption method program is executed by a processor, the data encryption method program implements the steps of a data encryption method as described in any one of the above.
As can be seen from the above, the data encryption method and system provided by the embodiment of the present application obtain target data to be encrypted, and divide the target data into a plurality of data segments with preset lengths; calculating characteristic parameters of each data segment; selecting a corresponding interference field according to the characteristic parameters, and adding the interference field into the corresponding data segment to obtain a corresponding target data segment; selecting a corresponding encryption strategy according to the characteristic parameters to encrypt the corresponding target data segment to obtain a target encrypted data segment; combining the target encrypted data segments corresponding to the plurality of data segments to obtain target encrypted data; the data encryption is completed, the same target data is encrypted by adopting segmentation and different encryption algorithms, so that the decoding difficulty of the target data is greatly improved, and the encryption algorithm of each segment of data segment is dynamic and is related to the characteristic parameters of the data segment, so that the possibility of the target data being decoded is further reduced, and the data security can be improved.
Additional aspects and advantages of the invention will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the invention.
Drawings
FIG. 1 illustrates a flow diagram of a method of data encryption in some embodiments of the invention;
FIG. 2 illustrates a block diagram of a data encryption system in some embodiments of the inventions.
Detailed Description
In order that the above objects, features and advantages of the present invention can be more clearly understood, a more particular description of the invention will be rendered by reference to the appended drawings. It should be noted that the embodiments and features of the embodiments of the present application may be combined with each other without conflict.
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention, however, the present invention may be practiced in other ways than those specifically described herein, and therefore the scope of the present invention is not limited by the specific embodiments disclosed below.
Fig. 1 is a flowchart of a data encryption method according to the present invention. The data encryption method comprises the following steps:
s101, acquiring target data to be encrypted, and dividing the target data into a plurality of data segments with preset lengths;
s102, calculating characteristic parameters of each data segment;
s103, selecting a corresponding interference field according to the characteristic parameters, and adding the interference field into the corresponding data segment to obtain a corresponding target data segment;
s104, selecting a corresponding encryption strategy according to the characteristic parameters to encrypt the corresponding target data segment to obtain a target encrypted data segment;
and S105, combining the target encrypted data segments corresponding to the plurality of data segments to obtain target encrypted data.
In step S101, the target data may be words, numbers, or a combination of words and numbers. The preset lengths of the data segments may be the same or different. When dividing, the division may be performed sequentially in the order of arrangement of the target data.
In step S102, the characteristic parameter may be a hash value of the data segment, or a characteristic parameter generated by combining a hash value with time information, or a characteristic parameter generated by combining position information with a hash value, or a characteristic parameter generated by combining spatio-temporal information with a hash value. Alternatively, the characteristic parameters generated for the ratio of 0 to 1 of the data segment can also be used. It is understood that the characteristic parameter may also be generated by combining the receiving time information of the specified receiver with the hash value, and when decrypting, the decryption machine for the specified receiver must collect the current time and combine the current time to generate the characteristic parameter for the specified receiver, and then combine the characteristic parameter for decryption, and if the receiving time is not correct, decryption cannot be performed.
It will be appreciated that the characteristic parameter may also be generated based on the end recipient's terminal device information in combination with a hash value of the data segment. So that only the receiver can perform decryption based on the terminal device information.
In step S103, the interference field may be generated by performing an operation using the characteristic parameter, or may be obtained from a preset database. The interference fields may be added side by side or mixed. For example, if the data segment is a1a2a3a4a5 and the interference field is b1b2b3b4b5, the target data segment is a1b1a2b2a3b4a4b5a5b 5.
In step S104, the encryption policy may include a preprocessing policy and an encryption algorithm used after preprocessing.
In step S105, the data segments may be arranged according to the positions of the data segments in the target data, but the invention is not limited thereto.
In some embodiments, this step S101 may include the following sub-steps: s1011, obtaining target data to be encrypted; s1012, converting the target data into binary target data; and S1013, dividing the binary target data into a plurality of data segments with preset lengths. In step S1011, the target data exists in the form of characters, letters, decimal numbers, etc., and the number of data units of the target data is greatly increased after the target data is converted into binary data. For example, for decimal number 8, the number of the corresponding data unit is 1, and after the conversion into binary, 100 is obtained, and the corresponding data unit is 3. In step S1013, the preset length may be related to the number of bits of the binary data, such as 100 bits, or related to the number of "1" in the binary data, for example, each data segment is defined to have 100 "1" therein. Specifically, the method comprises the following steps: the binary target data is divided into a plurality of data segments with preset length, wherein the number of '1' included in each data segment is a preset constant value.
According to the embodiment of the application, the target data are converted into the binary data, so that the number of data units is greatly increased, the possible grouping condition is greatly increased when data grouping is adopted, and the data safety is improved.
In some embodiments, this step S102 may include the following sub-steps: and carrying out hash operation on each data segment to obtain a corresponding hash value as a characteristic parameter.
In some embodiments, this step S102 may include the following sub-steps: performing hash operation on each data segment to obtain a corresponding hash value; and acquiring a current time parameter, and combining the time parameter and the hash value to obtain the characteristic parameter of the data segment. And combining the time parameter with the hash value in a binary data form to obtain a corresponding characteristic parameter.
In some embodiments, this step S103 may comprise the following sub-steps: performing first operation on the hash value to obtain a first interference field; and mixing the first interference field and the data segment according to a preset mixing rule to obtain a corresponding target data segment. For example, the hash value may be added or subtracted by one number, or may be multiplied. The preset mixing rule can be various and is not limited.
In some embodiments, this step S104 may include the following sub-steps:
s1041, converting the target data segment into a first data segment corresponding to a preset scale according to the characteristic parameters; the preset binary system is not a binary system; s1042, selecting a corresponding encryption algorithm according to the characteristic parameters to encrypt the first data segment to obtain an encrypted data segment, and adding the corresponding characteristic parameters to the segment head of the encrypted data segment to obtain a target encrypted data segment. For example, the preset bin may include ternary, quaternary, quinary, octal, hexadecimal, etc. Wherein, the characteristic parameter is added in the segment head to facilitate the subsequent operation in decryption.
In some embodiments, the step S1042 may include: if the characteristic parameters meet a first preset condition, encrypting the first data segment by adopting quantum encryption to obtain a corresponding target encrypted data segment; the first preset condition is one of a plurality of first sub-conditions, and each first sub-condition corresponds to a different quantum encryption algorithm; if the characteristic parameters meet a second preset condition, encrypting the first data segment of the algorithm by adopting asymmetric encryption to obtain a corresponding target encrypted data segment; the second preset condition is one of a plurality of second sub-conditions, and each second sub-condition corresponds to a different asymmetric encryption pair algorithm.
As can be seen from the above, the data encryption algorithm provided in the embodiment of the present application obtains target data to be encrypted, and divides the target data into a plurality of data segments with preset lengths; calculating characteristic parameters of each data segment; selecting a corresponding interference field according to the characteristic parameters, and adding the interference field into the corresponding data segment to obtain a corresponding target data segment; selecting a corresponding encryption strategy according to the characteristic parameters to encrypt the corresponding target data segment to obtain a target encrypted data segment; combining the target encrypted data segments corresponding to the plurality of data segments to obtain target encrypted data; the data encryption is completed, the same target data is encrypted by adopting segmentation and different encryption algorithms, so that the decoding difficulty of the target data is greatly improved, and the encryption algorithm of each segment of data segment is dynamic and is related to the characteristic parameters of the data segment, so that the possibility of the target data being decoded is further reduced, and the data security can be improved.
According to the embodiment of the invention, the method further comprises the following steps:
establishing a historical mixed model base of the data segment according to the hash value, the time information and the characteristic parameters of the historical accumulated data segment, wherein the mixed model base comprises various mixed models of the historical accumulated data segment;
comparing threshold values in the historical mixed model library according to the hash value, the time information and the characteristic parameters of the data segment to find out a mixed model with the closest preset threshold value as a target mixed model;
and mixing the data segment and the first interference field of the data segment in the target mixed model to obtain a corresponding target data segment.
It should be noted that, a historical mixed model library of the data segment is established according to the hash value, the time information and the characteristic parameters of the historical accumulated data segment, so as to improve the richness of the types of the mixed models of the mixed model library, the hash value, the time information and the characteristic parameters of the data segment are subjected to threshold comparison in the historical mixed model library, and a mixed model with the closest preset threshold is found as a target mixed model, the target mixed model is closest to a reasonable target mixed model, the data segment and the first interference field of the data segment are mixed in the target mixed model to obtain a corresponding target data segment, and the data interference margin of the target data segment is improved.
According to the embodiment of the invention, the method further comprises the following steps:
acquiring characteristic parameter factors of the data segment, wherein the characteristic parameter factors comprise solid-state response factors, public key factors and time information factors;
preprocessing the solid state response factor, the public key factor and the time information factor to obtain a characteristic parameter factor training sample set;
inputting the characteristic parameter factor training sample set into a neural network encryption model for training to obtain a corresponding target neural network encryption model;
and encrypting the data segment according to the trained corresponding target neural network encryption model to obtain a corresponding target encrypted data segment.
It should be noted that the neural network encryption model requires a large amount of historical data to be trained to obtain a corresponding target neural network encryption model with higher accuracy, so the abundance of the data volume of the data segment determines the training accuracy of the model, the neural network encryption model in the present application can be trained by using the solid state response factor, the public key factor and the time information factor obtained by the characteristic parameters of the historical data segment as inputs to improve the training accuracy of the encryption model, the neural network encryption model trained by the target neural network encryption model according to the characteristic parameters of the data segment to obtain corresponding preset conditions can be one of a plurality of alternative neural network encryption models of the same category in a plurality of neural network encryption models such as a quantum neural network encryption model, an asymmetric neural network encryption model, a chaotic neural network encryption model, etc., and the corresponding neural network encryption model obtained by training can accurately obtain a matched conditional neural network encryption model pair And encrypting the data segment to improve the data encryption coupling degree of the target encrypted data segment.
As shown in fig. 2, an embodiment of the present application further provides a data encryption system, where the system includes: a memory 201 and a processor 202, wherein the memory includes a data encryption method program, and the data encryption method program realizes the following steps when executed by the processor: acquiring target data to be encrypted, and dividing the target data into a plurality of data segments with preset lengths; calculating characteristic parameters of each data segment; selecting a corresponding interference field according to the characteristic parameters, and adding the interference field into the corresponding data segment to obtain a corresponding target data segment; selecting a corresponding encryption strategy according to the characteristic parameters to encrypt the corresponding target data segment to obtain a target encrypted data segment; and combining the target encrypted data segments corresponding to the plurality of data segments to obtain target encrypted data.
The target data may be words, numbers, or a combination of words and numbers. The preset lengths of the data segments may be the same or different. When dividing, the division may be performed sequentially in the order of arrangement of the target data.
The characteristic parameter may be a hash value of the data segment, or a characteristic parameter generated by combining the hash value with time information, or a characteristic parameter generated by combining position information with the hash value, or a characteristic parameter generated by combining spatio-temporal information with the hash value. Alternatively, the characteristic parameters generated for the ratio of 0 to 1 of the data segment can also be used. It will be appreciated that the characteristic parameter may also be generated based on the end recipient's terminal device information in combination with a hash value of the data segment. So that only the receiver can perform decryption based on the terminal device information.
The interference field may be generated by performing an operation using the characteristic parameter, or may be obtained from a preset database. The interference fields may be added side by side or mixed. For example, if the data segment is a1a2a3a4a5 and the interference field is b1b2b3b4b5, the target data segment is a1b1a2b2a3b4a4b5a5b 5.
The encryption policy may include a preprocessing policy and an encryption algorithm used after preprocessing.
However, the data segments may be arranged correspondingly according to the positions of the data segments in the target data, and the combination is not limited to this.
In some embodiments, the data encryption method program when executed by the processor implements the steps of: acquiring target data to be encrypted; converting the target data into binary target data; and dividing the binary target data into a plurality of data segments with preset lengths. The target data exists in the forms of characters, decimal numbers and the like, and after the target data is converted into binary data, the number of data units of the target data is greatly increased. For example, for decimal number 8, the number of the corresponding data unit is 1, and after the conversion into binary, 100 is obtained, and the corresponding data unit is 3. In step S1013, the preset length may be related to the number of bits of the binary data, such as 100 bits, or related to the number of "1" in the binary data, for example, each data segment is defined to have 100 "1" therein. Specifically, the method comprises the following steps: the binary target data is divided into a plurality of data segments with preset length, wherein the number of '1' included in each data segment is a preset constant value.
According to the embodiment of the application, the target data are converted into the binary data, so that the number of data units is greatly increased, the possible grouping condition is greatly increased when data grouping is adopted, and the data safety is improved.
In some embodiments, the data encryption method program when executed by the processor implements the steps of: and carrying out hash operation on each data segment to obtain a corresponding hash value as a characteristic parameter.
In some embodiments, the data encryption method program when executed by the processor implements the steps of: performing hash operation on each data segment to obtain a corresponding hash value; and acquiring a current time parameter, and combining the time parameter and the hash value to obtain the characteristic parameter of the data segment. And combining the time parameter with the hash value in a binary data form to obtain a corresponding characteristic parameter.
In some embodiments, the data encryption method program when executed by the processor implements the steps of: performing first operation on the hash value to obtain a first interference field; and mixing the first interference field and the data segment according to a preset mixing rule to obtain a corresponding target data segment. For example, the hash value may be added or subtracted by one number, or may be multiplied. The preset mixing rule can be various and is not limited.
In some embodiments, the data encryption method program when executed by the processor implements the steps of: converting the target data segment into a first data segment corresponding to a preset scale according to the characteristic parameters; the preset binary system is not a binary system; and selecting a corresponding encryption algorithm according to the characteristic parameters to encrypt the first data segment to obtain an encrypted data segment, and adding the corresponding characteristic parameters into the segment head of the encrypted data segment to obtain a target encrypted data segment. For example, the preset bin may include ternary, quaternary, quinary, octal, hexadecimal, etc. Wherein, the characteristic parameter is added in the segment head to facilitate the subsequent operation in decryption.
In some embodiments, the data encryption method program when executed by the processor implements the steps of: if the characteristic parameters meet a first preset condition, encrypting the first data segment by adopting quantum encryption to obtain a corresponding target encrypted data segment; the first preset condition is one of a plurality of first sub-conditions, and each first sub-condition corresponds to a different quantum encryption algorithm; if the characteristic parameters meet a second preset condition, encrypting the first data segment of the algorithm by adopting asymmetric encryption to obtain a corresponding target encrypted data segment; the second preset condition is one of a plurality of second sub-conditions, and each second sub-condition corresponds to a different asymmetric encryption pair algorithm.
As can be seen from the above, the data encryption system provided in the embodiment of the present application obtains target data to be encrypted, and divides the target data into a plurality of data segments with preset lengths; calculating characteristic parameters of each data segment; selecting a corresponding interference field according to the characteristic parameters, and adding the interference field into the corresponding data segment to obtain a corresponding target data segment; selecting a corresponding encryption strategy according to the characteristic parameters to encrypt the corresponding target data segment to obtain a target encrypted data segment; combining the target encrypted data segments corresponding to the plurality of data segments to obtain target encrypted data; the data encryption is completed, the same target data is encrypted by adopting segmentation and different encryption algorithms, so that the decoding difficulty of the target data is greatly improved, and the encryption algorithm of each segment of data segment is dynamic and is related to the characteristic parameters of the data segment, so that the possibility of the target data being decoded is further reduced, and the data security can be improved.
According to the embodiment of the invention, the method further comprises the following steps:
establishing a historical mixed model base of the data segment according to the hash value, the time information and the characteristic parameters of the historical accumulated data segment, wherein the mixed model base comprises various mixed models of the historical accumulated data segment;
comparing threshold values in the historical mixed model library according to the hash value, the time information and the characteristic parameters of the data segment to find out a mixed model with the closest preset threshold value as a target mixed model;
and mixing the data segment and the first interference field of the data segment in the target mixed model to obtain a corresponding target data segment.
It should be noted that, a historical mixed model library of the data segment is established according to the hash value, the time information and the characteristic parameters of the historical accumulated data segment, so as to improve the richness of the types of the mixed models of the mixed model library, the hash value, the time information and the characteristic parameters of the data segment are subjected to threshold comparison in the historical mixed model library, and a mixed model with the closest preset threshold is found as a target mixed model, the target mixed model is closest to a reasonable target mixed model, the data segment and the first interference field of the data segment are mixed in the target mixed model to obtain a corresponding target data segment, and the data interference margin of the target data segment is improved.
According to the embodiment of the invention, the method further comprises the following steps:
acquiring characteristic parameter factors of the data segment, wherein the characteristic parameter factors comprise solid-state response factors, public key factors and time information factors;
preprocessing the solid state response factor, the public key factor and the time information factor to obtain a characteristic parameter factor training sample set;
inputting the characteristic parameter factor training sample set into a neural network encryption model for training to obtain a corresponding target neural network encryption model;
and encrypting the data segment according to the trained corresponding target neural network encryption model to obtain a corresponding target encrypted data segment.
It should be noted that the neural network encryption model requires a large amount of historical data to be trained to obtain a corresponding target neural network encryption model with higher accuracy, so the abundance of the data volume of the data segment determines the training accuracy of the model, the neural network encryption model in the present application can be trained by using the solid state response factor, the public key factor and the time information factor obtained by the characteristic parameters of the historical data segment as inputs to improve the training accuracy of the encryption model, the neural network encryption model trained by the target neural network encryption model according to the characteristic parameters of the data segment to obtain corresponding preset conditions can be one of a plurality of alternative neural network encryption models of the same category in a plurality of neural network encryption models such as a quantum neural network encryption model, an asymmetric neural network encryption model, a chaotic neural network encryption model, etc., and the corresponding neural network encryption model obtained by training can accurately obtain a matched conditional neural network encryption model pair And encrypting the data segment to improve the data encryption coupling degree of the target encrypted data segment.
In a third aspect, an embodiment of the present application further provides a computer-readable storage medium, where the computer-readable storage medium includes a data encryption method program, and when the data encryption method program is executed by a processor, the data encryption method program implements the steps of a data encryption method as described in any one of the above. Thereby realizing that: acquiring target data to be encrypted, and dividing the target data into a plurality of data segments with preset lengths; calculating characteristic parameters of each data segment; selecting a corresponding interference field according to the characteristic parameters, and adding the interference field into the corresponding data segment to obtain a corresponding target data segment; selecting a corresponding encryption strategy according to the characteristic parameters to encrypt the corresponding target data segment to obtain a target encrypted data segment; combining the target encrypted data segments corresponding to the plurality of data segments to obtain target encrypted data; the data encryption is completed, the same target data is encrypted by adopting segmentation and different encryption algorithms, so that the decoding difficulty of the target data is greatly improved, and the encryption algorithm of each segment of data segment is dynamic and is related to the characteristic parameters of the data segment, so that the possibility of the target data being decoded is further reduced, and the data security can be improved.
In the several embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. The above-described device embodiments are merely illustrative, for example, the division of the unit is only a logical functional division, and there may be other division ways in actual implementation, such as: multiple units or components may be combined, or may be integrated into another system, or some features may be omitted, or not implemented. In addition, the coupling, direct coupling or communication connection between the components shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or units may be electrical, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units; can be located in one place or distributed on a plurality of network units; some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, all the functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may be separately regarded as one unit, or two or more units may be integrated into one unit; the integrated unit can be realized in a form of hardware, or in a form of hardware plus a software functional unit.
Those of ordinary skill in the art will understand that: all or part of the steps for realizing the method embodiments can be completed by hardware related to program instructions, the program can be stored in a computer readable storage medium, and the program executes the steps comprising the method embodiments when executed; and the aforementioned storage medium includes: a mobile storage device, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
Alternatively, the integrated unit of the present invention may be stored in a computer-readable storage medium if it is implemented in the form of a software functional building block and sold or used as a separate product. Based on such understanding, the technical solutions of the embodiments of the present invention may be essentially implemented or a part contributing to the prior art may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the methods described in the embodiments of the present invention. And the aforementioned storage medium includes: a removable storage device, a ROM, a RAM, a magnetic or optical disk, or various other media that can store program code.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (8)

1. A method of data encryption, comprising the steps of:
acquiring target data to be encrypted, and dividing the target data into a plurality of data segments with preset lengths;
calculating characteristic parameters of each data segment;
selecting a corresponding interference field according to the characteristic parameters, and adding the interference field into the corresponding data segment to obtain a corresponding target data segment;
selecting a corresponding encryption strategy according to the characteristic parameters to encrypt the corresponding target data segment to obtain a target encrypted data segment;
combining the target encrypted data segments corresponding to the plurality of data segments to obtain target encrypted data;
the selecting a corresponding encryption strategy according to the characteristic parameters to encrypt the corresponding target data segment to obtain a target encrypted data segment includes:
converting the target data segment into a first data segment corresponding to a preset scale according to the characteristic parameters; the preset binary system is not a binary system;
selecting a corresponding encryption algorithm according to the characteristic parameters to encrypt the first data segment to obtain an encrypted data segment, and adding the corresponding characteristic parameters into the segment head of the encrypted data segment to obtain a target encrypted data segment;
selecting a corresponding encryption algorithm according to the characteristic parameters to encrypt the first data segment to obtain a target encrypted data segment, comprising:
if the characteristic parameters meet a first preset condition, encrypting the first data segment by adopting quantum encryption to obtain a corresponding target encrypted data segment; the first preset condition is one of a plurality of first sub-conditions, and each first sub-condition corresponds to a different quantum encryption algorithm;
if the characteristic parameters meet a second preset condition, encrypting the first data segment by adopting an asymmetric encryption algorithm to obtain a corresponding target encrypted data segment; the second preset condition is one of a plurality of second sub-conditions, and each second sub-condition corresponds to a different asymmetric encryption algorithm;
establishing a historical mixed model base of the data segment according to the hash value, the time information and the characteristic parameters of the historical accumulated data segment, wherein the mixed model base comprises various mixed models of the historical accumulated data segment;
comparing threshold values in the historical mixed model library according to the hash value, the time information and the characteristic parameters of the data segment to find out a mixed model with the closest preset threshold value as a target mixed model;
and mixing the data segment and the first interference field of the data segment in the target mixed model to obtain a corresponding target data segment.
2. The data encryption method of claim 1, wherein said calculating the characteristic parameter of each of the data segments comprises:
and carrying out hash operation on each data segment to obtain a corresponding hash value as a characteristic parameter.
3. The data encryption method of claim 1, wherein said calculating the characteristic parameter of each of the data segments comprises:
performing hash operation on each data segment to obtain a corresponding hash value;
and acquiring a current time parameter, and combining the time parameter and the hash value to obtain the characteristic parameter of the data segment.
4. The data encryption method according to claim 2 or 3, wherein the selecting a corresponding interference field according to the characteristic parameter and adding the interference field to the corresponding data segment to obtain a corresponding target data segment comprises:
performing first operation on the hash value to obtain a first interference field;
and mixing the first interference field and the data segment according to a preset mixing rule to obtain a corresponding target data segment.
5. The data encryption method according to claim 1, wherein the obtaining of the target data to be encrypted and the dividing of the target data into a plurality of data segments of a preset length comprises:
acquiring target data to be encrypted, wherein the target data to be encrypted is decimal data;
converting the target data into binary target data;
and dividing the binary target data into a plurality of data segments with preset lengths.
6. The data encryption method according to claim 5, wherein the dividing the binary target data into a plurality of data segments of a preset length comprises:
the binary target data is divided into a plurality of data segments with preset length, wherein the number of '1' included in each data segment is a preset constant value.
7. A data encryption system, the system comprising: the storage comprises a data encryption method program, and the data encryption method program realizes the following steps when executed by the processor:
acquiring target data to be encrypted, and dividing the target data into a plurality of data segments with preset lengths;
calculating characteristic parameters of each data segment;
selecting a corresponding interference field according to the characteristic parameters, and adding the interference field into the corresponding data segment to obtain a corresponding target data segment;
selecting a corresponding encryption strategy according to the characteristic parameters to encrypt the corresponding target data segment to obtain a target encrypted data segment;
combining the target encrypted data segments corresponding to the plurality of data segments to obtain target encrypted data;
the selecting a corresponding encryption strategy according to the characteristic parameters to encrypt the corresponding target data segment to obtain a target encrypted data segment includes:
converting the target data segment into a first data segment corresponding to a preset scale according to the characteristic parameters; the preset binary system is not a binary system;
selecting a corresponding encryption algorithm according to the characteristic parameters to encrypt the first data segment to obtain an encrypted data segment, and adding the corresponding characteristic parameters into the segment head of the encrypted data segment to obtain a target encrypted data segment;
selecting a corresponding encryption algorithm according to the characteristic parameters to encrypt the first data segment to obtain a target encrypted data segment, comprising:
if the characteristic parameters meet a first preset condition, encrypting the first data segment by adopting quantum encryption to obtain a corresponding target encrypted data segment; the first preset condition is one of a plurality of first sub-conditions, and each first sub-condition corresponds to a different quantum encryption algorithm;
if the characteristic parameters meet a second preset condition, encrypting the first data segment by adopting an asymmetric encryption algorithm to obtain a corresponding target encrypted data segment; the second preset condition is one of a plurality of second sub-conditions, and each second sub-condition corresponds to a different asymmetric encryption algorithm;
establishing a historical mixed model base of the data segment according to the hash value, the time information and the characteristic parameters of the historical accumulated data segment, wherein the mixed model base comprises various mixed models of the historical accumulated data segment;
comparing threshold values in the historical mixed model library according to the hash value, the time information and the characteristic parameters of the data segment to find out a mixed model with the closest preset threshold value as a target mixed model;
and mixing the data segment and the first interference field of the data segment in the target mixed model to obtain a corresponding target data segment.
8. A computer-readable storage medium, characterized in that a data encryption method program is included in the computer-readable storage medium, which when executed by a processor, implements the steps of a data encryption method according to any one of claims 1 to 6.
CN202111018318.9A 2021-09-01 2021-09-01 Data encryption method, system and computer readable storage medium Active CN113472537B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111018318.9A CN113472537B (en) 2021-09-01 2021-09-01 Data encryption method, system and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111018318.9A CN113472537B (en) 2021-09-01 2021-09-01 Data encryption method, system and computer readable storage medium

Publications (2)

Publication Number Publication Date
CN113472537A CN113472537A (en) 2021-10-01
CN113472537B true CN113472537B (en) 2021-11-26

Family

ID=77867093

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111018318.9A Active CN113472537B (en) 2021-09-01 2021-09-01 Data encryption method, system and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN113472537B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114189347B (en) * 2021-10-14 2022-08-05 北京连山科技股份有限公司 Data safety transmission method combining data granulation and gatekeeper
CN115567328B (en) * 2022-12-06 2023-03-14 杭州菲助科技有限公司 Secure encryption transmission method, device and application of video resource address

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111291397A (en) * 2020-02-09 2020-06-16 成都神殿科技有限责任公司 Webpage data anti-crawling encryption method

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1716660A1 (en) * 2004-02-13 2006-11-02 IVI Smart Technologies, Inc. Method and apparatus for cryptographically processing data
CN103780622B (en) * 2014-01-24 2016-09-28 华中科技大学 A kind of data classification encryption method of facing cloud storage
CN106599698B (en) * 2015-10-19 2019-09-20 腾讯科技(深圳)有限公司 A kind of method and apparatus for encrypting picture, decrypting picture
CN106788982A (en) * 2017-02-22 2017-05-31 郑州云海信息技术有限公司 A kind of sectional encryption transmission method and device
RU2021125103A (en) * 2017-04-03 2021-09-16 Листат Лтд. METHODS AND DEVICE OF LAST MILE HYPER-PROTECTED COMMUNICATION
CN108134666A (en) * 2018-02-07 2018-06-08 北京安博通科技股份有限公司 A kind of encrypting and decrypting method and device
CN108932434B (en) * 2018-06-20 2021-06-25 中国农业银行股份有限公司 Data encryption method and device based on machine learning technology

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111291397A (en) * 2020-02-09 2020-06-16 成都神殿科技有限责任公司 Webpage data anti-crawling encryption method

Also Published As

Publication number Publication date
CN113472537A (en) 2021-10-01

Similar Documents

Publication Publication Date Title
CN113472537B (en) Data encryption method, system and computer readable storage medium
CN116471007B (en) Network information encryption transmission method based on cloud platform
CN106817358B (en) Encryption and decryption method and device for user resources
CN110933063B (en) Data encryption method, data decryption method and equipment
CN112437060B (en) Data transmission method and device, computer equipment and storage medium
CN114218322B (en) Data display method, device, equipment and medium based on ciphertext transmission
CN112529586B (en) Transaction information management method, device, equipment and storage medium
CN112365001A (en) Model generation method and device and server
CN116933222B (en) Three-dimensional model copyright authentication method and system based on zero watermark
CN114205084B (en) Quantum key-based electronic mail multi-operation encryption method and device
CN111490995A (en) Model training method and device for protecting privacy, data processing method and server
CN111259445B (en) Database platform access method, device, equipment and medium
CN114244635B (en) Encryption type data coding method of communication equipment
CN114692201B (en) Multi-party security calculation method and system
CN109951417B (en) Identity authentication method, system and terminal equipment
CN115757535A (en) Data query method, data storage method and device and electronic equipment
CN113051592A (en) File encryption method and device, electronic equipment and storage medium
CN115664799B (en) Data exchange method and system applied to information technology security
CN116405293B (en) Data encryption storage method of safe operation and maintenance system
CN116484407B (en) Data security protection method and device, electronic equipment and storage medium
CN114691759B (en) Data query statistical method, device, computer equipment and storage medium
CN110505203B (en) Message data processing method, device and storage medium
CN117272342A (en) Encryption method, device, equipment and medium
CN110032833B (en) Web application processing method and device
CN117370077A (en) Self-adaptive backup method, system and medium for financial data

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant