CN111737745A - Data encryption method and device, computer equipment and storage medium - Google Patents

Data encryption method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN111737745A
CN111737745A CN202010587452.XA CN202010587452A CN111737745A CN 111737745 A CN111737745 A CN 111737745A CN 202010587452 A CN202010587452 A CN 202010587452A CN 111737745 A CN111737745 A CN 111737745A
Authority
CN
China
Prior art keywords
data
encrypted
original data
index
encryption
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.)
Pending
Application number
CN202010587452.XA
Other languages
Chinese (zh)
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.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China 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 Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN202010587452.XA priority Critical patent/CN111737745A/en
Publication of CN111737745A publication Critical patent/CN111737745A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/62Protecting access to data via a platform, e.g. using keys or access control rules
    • G06F21/6218Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database
    • G06F21/6227Protecting access to data via a platform, e.g. using keys or access control rules to a system of files or objects, e.g. local or distributed file system or database where protection concerns the structure of data, e.g. records, types, queries
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2107File encryption

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Health & Medical Sciences (AREA)
  • Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Data Mining & Analysis (AREA)
  • Bioethics (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Computation (AREA)
  • Evolutionary Biology (AREA)
  • Databases & Information Systems (AREA)
  • Storage Device Security (AREA)

Abstract

The application provides a data encryption method and device, computer equipment and a storage medium, which are applied to the technical field of computers and used for solving the problem that a leakage source cannot be accurately positioned when table type data is leaked. The data encryption method provided by the invention comprises the following steps: acquiring an identity of a user receiving encrypted data, and converting the identity of the user to obtain an index carrying encrypted position information; selecting one column of original data from original data to be encrypted; classifying the selected original data in the row to ensure that the classified original data has the same category as the total digit of the index; according to the index carrying the encryption position information, determining the classified original data of the encryption position positioned with the index in the original data as data to be encrypted; and carrying out encryption processing in a preset form on the data to be encrypted.

Description

Data encryption method and device, computer equipment and storage medium
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method and an apparatus for encrypting data, a computer device, and a storage medium.
Background
Data leakage refers to the fact that data is privately used without authorization of an owner. Billions of losses are incurred worldwide each year from data leakage.
In order to find a person who leaks data in the first time after the data is leaked and reduce loss, a mature scheme in the industry at present is to add a watermark into data of types such as videos and pictures to locate a data leakage source, and to perform user marking on the data in a mode of injecting additional similar watermark information, on one hand, the marking is too obvious, on the other hand, the display content of original data is increased, the watermark is difficult to locate to a specific source which leaks certain encrypted data, and the locating capability of the watermark is very limited.
And for the structured data and the table type data in the database, for example, this method is not suitable, and a method capable of locating the leakage source in time when the structured data and the table type data in the database leaks is needed to be proposed.
Disclosure of Invention
The embodiment of the invention provides a data encryption method and device, computer equipment and a storage medium, and aims to solve the technical problem that a leakage source cannot be accurately positioned when table type data is leaked.
A method of encrypting data, the method comprising:
acquiring an identity of a user receiving encrypted data, and converting the identity of the user to obtain an index carrying encrypted position information;
selecting one column of original data from original data to be encrypted;
classifying the selected original data in the row to ensure that the classified original data has the same category as the total digit of the index;
according to the index carrying the encryption position information, determining the classified original data of the encryption position positioned with the index in the original data as data to be encrypted;
and carrying out encryption processing in a preset form on the data to be encrypted.
An apparatus for encrypting data, the apparatus comprising:
the index conversion module is used for acquiring the identity of a user receiving the encrypted data, and converting the identity of the user to obtain an index carrying encrypted position information;
the data selection module is used for selecting one row of original data from the original data to be encrypted;
the classification module is used for classifying the selected one row of original data, so that the classified original data has the same category as the total digit of the index;
the position determining module is used for determining the original data of the encryption position positioned by the index in the classified original data as the data to be encrypted according to the index carrying the encryption position information;
and the encryption module is used for carrying out encryption processing in a preset form on the data to be encrypted.
A computer device comprising a memory, a processor and a computer program stored in said memory and executable on said processor, said processor implementing the steps of the above data encryption method when executing said computer program.
A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method of encrypting data.
The data encryption method, the data encryption device, the computer equipment and the storage medium are characterized in that firstly, an identity of a user receiving encrypted data is obtained, the identity of the user is converted to obtain an index carrying encrypted position information, and one row of original data is selected from original data to be encrypted; classifying the selected original data in the list to make the classified original data have the same type as the total digit of the index so as to be suitable for the original data with large data volume, then determining the original data at the encryption position positioned by the index in the classified original data as the data to be encrypted according to the index carrying the encryption position information, and carrying out encryption processing in a preset form on the data to be encrypted so that the position of the encrypted data can represent the identity of the leakage source.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
FIG. 1 is a diagram of an application environment of a data encryption method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method of encrypting data in accordance with an embodiment of the present invention;
FIG. 3 is a flow chart of a method of encrypting data in another embodiment of the present invention;
FIG. 4 is a flow chart of a method of encrypting data in accordance with a further embodiment of the present invention;
FIG. 5 is a schematic diagram of an apparatus for encrypting data according to an embodiment of the present invention;
FIG. 6 is a schematic diagram of a computer device according to an embodiment of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The data encryption method provided by the application can be applied to the application environment as shown in fig. 1, wherein the computer device communicates with the external device through the network. Computer devices include, but are not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices, among others. The server may be implemented as a stand-alone server or as a server cluster consisting of a plurality of servers.
In an embodiment, as shown in fig. 2, in order to implement that a "user mark" is embodied in an encryption position of encrypted data without destroying a complete expression of original data information, since a user identifier has uniqueness, when the encrypted data is leaked, a leaking person can be uniquely located according to the encryption position of the encrypted data, and the encryption method does not destroy the original data, which is exemplified by applying the method to the computer device in fig. 1, including the following steps S101 to S105.
S101, obtaining an identity of a user receiving encrypted data, and converting the identity of the user to obtain an index carrying encrypted position information.
In one embodiment, the identity of the user receiving the encrypted data may be considered as a setting, and may be a pure numeric type, or a free combination of a number and other form characters, and the identity of the user receiving the encrypted data is known in advance, and the user receiving the encrypted data can be uniquely identified through the identity.
In application, after a data receiver is determined, an identity identifier is allocated to the data receiver, for example, an id is defined as 5 digits, each digit is randomly selected from 0 to 9, when a generation instruction is obtained, the id is generated, repeated id is not generated in the process of generating the id, and the unique id allocated to the data receiver is ensured.
The same user does not need to be encrypted repeatedly when the same data is transmitted for multiple times, and the id allocated to the same user when different data is transmitted for multiple times is different.
S102, selecting one column of original data from the original data to be encrypted.
Wherein, the original columns each include a plurality of columns, for example, a column including "field work number", the field work number column may be selected as the column in this step, and the selected column represents the encryption row to be determined and the data to be encrypted.
In other embodiments, other columns such as "employee mobile phone number" or "employee birthday" may also be selected as the encryption row to be determined and the data to be encrypted.
S103, classifying the selected one of the rows of original data, so that the classified type of the original data is the same as the total digit of the index.
The purpose of this step of converting the raw data is to classify the raw data, because the raw data may contain a particularly large number of rows, but the number of bits of the index is limited, and generally cannot include data of all rows in a certain column, and the raw data is classified, and all the raw data rows classified as the same type can be marked as encrypted or unencrypted.
The classified original data has the same kind as the index in order to cover all rows of original data.
And S104, according to the index carrying the encryption position information, determining the original data of the encryption position positioned by the index in the classified original data as data to be encrypted.
The identification includes, but is not limited to, a job number, a computer number, and the like of the user, and the determination of the position of the data to be encrypted in the original data can be obtained by converting the identification of the user.
And S105, carrying out encryption processing in a preset form on the data to be encrypted.
In one embodiment, the step S105 further includes:
acquiring original data of which the data type is a character type in the data to be encrypted;
and displaying and marking the acquired original data of the character type.
In one embodiment, the display indicia includes, but is not limited to, bold, color change, slant, underlining, etc. the character-type original data.
In other embodiments, the step S105 further comprises:
acquiring original data with a data type in the data to be encrypted;
and increasing the value of the preset position of the acquired original data of the data type.
In one embodiment, in this example, the following method is preferably adopted for encrypted data transformation, and a column of an outing birthday is selected for marking, and a specific processing method is to replace the last bit of the original data with a random number between 0 and 9, for example: the data updated after the 1990-02-1200: 00:00.0 numerical value increase was 1990-02-1200: 00: 00.8.
In one embodiment, the column of the employee's mobile phone number is selected for marking, specifically, a "86" is added in front of the employee's mobile phone number, for example, the mobile phone number 18588996329 in the original data column is modified to 8618588996329.
Further, the related data transformation modes without changing the data information expression include, but are not limited to:
(1) the transformation of the numerical data precision is, for example: 1.00 ═ 1.0;
(2) character-type abbreviation transformations are for example: road ═ Rd;
(3) character-type data punctuation replacement, for example: jr. ═ Jr;
(4) character-type font format alternatives such as: the Load of King The Road of King.
The data encryption method provided in this embodiment first obtains an identity of a user who receives encrypted data, converts the identity of the user to obtain an index carrying encrypted location information, and selects one column of original data from original data to be encrypted; classifying the selected original data in the list to make the classified original data have the same type as the total digit of the index so as to be suitable for the original data with large data volume, then determining the original data at the encryption position positioned by the index in the classified original data as the data to be encrypted according to the index carrying the encryption position information, and carrying out encryption processing in a preset form on the data to be encrypted so that the position of the encrypted data can represent the identity of the leakage source.
In one embodiment, the method for encrypting data further comprises the following steps:
and obtaining the authorized user information for receiving the encrypted data. After the data receiver is determined, information of the data receiver needs to be acquired, for example, if the data receiver is wangzhi, the name, sex, identification number and the like of the data receiver need to be acquired; the data receiver information is to uniquely determine the data receiver, and therefore, the data receiver information must include information capable of uniquely determining the identity of the data receiver, where the data receiver information is not necessarily information such as name, gender, identification number, and the like in the above example, and the data receiver information may include only the data receiver job number if the data receiver has a job number uniquely corresponding to its identity;
and distributing the identity to the user corresponding to the user information. The id assigned to the position to be encrypted preset by the data receiver is the unique id, after the data is correspondingly encrypted, the id corresponding to the leaked data can be reversely decoded through corresponding information in the data after the data is subsequently found to be leaked, and then the id is unique, so that the related responsible person of the data leakage can be uniquely determined, and therefore the data owner can accurately position the corresponding responsible party when facing the economic loss caused by the leakage of the core data.
Further, after the step of assigning the identity to the user corresponding to the user information, the method further includes:
associating the identity with information of the user receiving the encrypted data;
and storing the information after the identity identification is associated with the data receiver information into a database.
And after the id and the data receiver information are associated and stored in the corresponding database, when the id in the leaked file is restored from the leaked file, the data receiver information associated with the id is searched in the database according to the id, so that a person who leaks the encrypted data is positioned.
Fig. 3 is a flowchart of a data encryption method according to another embodiment of the present invention, and as shown in fig. 3, the step of classifying the selected one of the lists of original data in step S103 further includes the following steps S301 to S303.
S301, obtaining the total digit of the index obtained by conversion according to the identity.
In one embodiment, when the id is converted into a binary number, the total number of bits of the index is the total number of bits of the binary number obtained by the conversion.
S302, calculating a remainder obtained by dividing the row number of each row in the original data of one row by the total digit number.
The data in the index column is numerical data, and the numbers of the first or the last bits of the data in the index column can be selected to obtain the remainder of the selected numbers and the characteristic data.
The total number of the remainder numbers calculated by the method is necessarily the same as the number of bits of the index, so that the original data are classified, if the preset numerical value is 14, the remainder calculated by the method is necessarily a certain value from 0 to 13, and if 14 remainders exist, the original data are classified into 14 types.
And S303, determining the original data corresponding to the rows with the same remainder as the same type.
In one embodiment, the step of converting the identity of the user in step S101 includes:
and converting the identity of the user into a binary number, and determining the digit of the binary number as the digit of the index.
After the id is converted into a binary data value, the converted binary data value is closely associated with the id, the identity id can be obtained from the binary data value, the binary data value only comprises 1 and 0, and 1 and 0 can be used for representing two states of data, for example, 1 can be used for representing that the original data needs to be encrypted, and 0 can be used for representing that the original data does not need to be encrypted. For example, the data authorizer id is set to 10361, and the authorizer id is converted to a binary format of 10100001111001.
Fig. 4 is a flowchart of a data encryption method according to another embodiment of the present invention, and as shown in fig. 4, the step of determining the classified original data at the encryption position located with the index in the original data as the data to be encrypted in step S104 further includes:
s401, acquiring the number of digits where the same number in the binary number is located, further, the number of the same number in the acquired binary number indicates a preset number corresponding to "encryption", for example, if "1" is preset to indicate a row that needs to be encrypted, acquiring the number of digits where all "1" in the binary number are located, and the minimum value of the number of digits is 0;
s402, obtaining the number of rows where the original data with the remainder being the digit is located;
and S403, determining the original data in the acquired line number as the data to be encrypted.
One usage scenario according to the present embodiment is for example: according to the binary number '10100001111001' converted from the identity, the remainder obtained by dividing one column of original data by 14 is 0-13 respectively, and a usage scenario according to the present embodiment is as follows (1):
1 0 1 0 0 0 0 1 1 1 1 0 0 1
0 1 2 3 4 5 6 7 8 9 10 11 12 13
is that Whether or not Is that Whether or not Whether or not Whether or not Whether or not Is that Is that Is that Is that Whether or not Whether or not Is that
Watch (1)
Referring to table 1, if the predetermined relationship between encryption and the same value in the binary number is 1 for encryption and 0 for non-encryption, it is understood that the data in the row with remainder 0, 2, 7, 8, 9, 10 and 13 obtained at the phase of 14 in one of the selected columns of original data is the data to be encrypted of the mark.
One usage scenario according to the present embodiment is as follows:
selecting an outwork number column as one of original data selected from original data to be encrypted, wherein the work number is a 10-system numerical value, and assuming that a work number a exists: 12345, job number b: 45678, job number c: 56789.
the remainder of the last 4 bit division 14 of job number a is 7, the remainder of the last four bit division 14 of job number b is 8, and the remainder of the last four bit division 14 of job number c is 13. Since the numbers in the identification data corresponding to 7 and 13 are 1, the data at the corresponding positions of the data lines with the job numbers a and c are subjected to encrypted data conversion.
In one embodiment, when the encrypted data is leaked, the step of reversely deducing the identity of the leakage source according to the encryption position of the encrypted data comprises the following steps:
acquiring data in a period after encryption processing, wherein the data comprises encrypted row data and non-encrypted row data in the period, and the total row number of the data in the period is the class number for classifying the original data;
and decoding the data in the period according to the preset corresponding relation between the data and the same numerical value in the binary number or not to obtain a decoding result. For example, if a preset value "1" indicates encryption and a value "0" indicates no encryption, a string of binary values can be decoded according to whether data in one cycle is encrypted or not;
and compiling the decoding result into a decimal number to obtain the identity of the user.
In one embodiment, whether data at a position corresponding to a row where index column data is located needs to be encrypted is judged from top to bottom, and data at a position corresponding to a row where index column data is located is encrypted row by row from top to bottom.
The application provides a data encryption method, at first, need obtain the document that treats encrypting and add salt keyword index, confirm the index column, then obtain the only id of assigning to the data receiver, later carry out data encryption according to the data of predetermineeing the algorithm to relevant position again, wherein, data encryption is for not influencing the data transformation mode of treating encrypting data information integrity, the file after the encryption can reverse trace back only id through encrypting the position, thereby can obtain revealing after the data, can be only confirm the relevant person of responsibility that data revealed, this scheme is when guaranteeing original data information's integrality and accuracy, through a series of data transformation modes, the information of having imbedded the data and authorized the user of tracing back, and in follow-up, can fix a position the data fast and reveal the source.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present invention.
In one embodiment, an apparatus for encrypting data is provided, and the apparatus for encrypting data corresponds to the method for encrypting data in the above embodiments one to one. As shown in fig. 5, the data encryption apparatus 100 includes an index conversion module 11, a data selection module 12, a classification module 13, a location determination module 14, and an encryption module 15. The functional modules are explained in detail as follows:
the index conversion module 11 is configured to obtain an identity of a user receiving encrypted data, and convert the identity of the user to obtain an index carrying encrypted location information;
the data selecting module 12 is configured to select one column of original data from original data to be encrypted;
a classification module 13, configured to classify the selected one of the rows of original data, so that the classified original data has the same category as the total number of bits of the index;
a position determining module 14, configured to determine, according to the index carrying the encrypted position information, original data of an encrypted position located with the index in the sorted original data as data to be encrypted;
and the encryption module 15 is configured to perform encryption processing in a preset form on the data to be encrypted.
In one embodiment, the apparatus 100 for encrypting data further includes:
a user information acquisition unit for acquiring authorized user information for receiving the encrypted data;
and the identity distribution unit is used for distributing the identity to the user corresponding to the user information.
In one embodiment, the classification module 13 further includes:
a total digit acquiring unit, configured to acquire a total digit of the index obtained by conversion according to the identity;
the calculating unit is used for calculating a remainder obtained by dividing the row number of each row in the original data of one row by the total digit number;
and the same-class determining unit is used for determining the original data corresponding to the row numbers with the same remainder as the same class.
In one embodiment, the index conversion module 11 is specifically configured to convert the identity of the user into a binary number, and determine the number of bits of the binary number as the number of bits of the index.
In one embodiment, the position determining module 14 further comprises:
the binary number encryption device comprises a digit acquisition unit, a data processing unit and a data processing unit, wherein the digit acquisition unit is used for acquiring digits of digits with the same numerical value in the binary number, further, the acquired digits with the same numerical value in the binary number represent preset digits corresponding to encryption, for example, if preset 1 represents a row needing encryption, the digits of all 1 in the binary number are acquired, and the minimum value of the digits is 0;
a row number obtaining unit, configured to obtain a row number where the original data with the remainder being the number of bits is located;
and the encryption determining unit is used for determining the original data in the acquired line number as the data to be encrypted.
In one embodiment, the encryption module 15 specifically includes:
the type acquisition unit is used for acquiring original data of which the data type is a character type in the data to be encrypted;
and the marking unit is used for displaying and marking the acquired original data of the character type.
In one embodiment, the type obtaining unit is further configured to obtain original data of which the data type is a numerical value type in the data to be encrypted;
the data encryption method further comprises a numerical value increasing unit, and the numerical value increasing unit is used for increasing the numerical value of the preset position of the acquired original data of the numerical value type.
In one embodiment, when encrypted data is leaked, this embodiment proposes a user decoding apparatus for reversely deducing an identity of a leakage source according to an encryption position of the encrypted data, where the user decoding apparatus includes:
the data acquisition module is used for acquiring data in one period after encryption processing, wherein the data comprises encrypted row data and non-encrypted row data in one period, and the total row number of the data in one period is the class number for classifying the original data;
and the decoding module is used for decoding the data in the period according to the preset corresponding relation between the data and the same numerical value in the binary number or not to obtain a decoding result. For example, if a preset value "1" indicates encryption and a value "0" indicates no encryption, a string of binary values can be decoded according to whether data in one cycle is encrypted or not;
and the compiling module is used for compiling the decoding result into a decimal number to obtain the identity of the user.
In one embodiment, whether data at a position corresponding to a row where index column data is located needs to be encrypted is judged from top to bottom, and data at a position corresponding to a row where index column data is located is encrypted row by row from top to bottom.
The data encryption device provided in this embodiment first obtains an identification of a user who receives encrypted data, converts the identification of the user to obtain an index carrying encrypted location information, and selects one column of original data from original data to be encrypted; classifying the selected original data in the list to make the classified original data have the same type as the total digit of the index so as to be suitable for the original data with large data volume, then determining the original data at the encryption position positioned by the index in the classified original data as the data to be encrypted according to the index carrying the encryption position information, and carrying out encryption processing in a preset form on the data to be encrypted so that the position of the encrypted data can represent the identity of the leakage source.
Where the terms "comprises" and "comprising," and any variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or modules is not necessarily limited to those steps or modules explicitly listed, but may include other steps or modules not explicitly listed or inherent to such process, method, article, or apparatus, and such that a division of modules presented in this application is merely a logical division and may be implemented in an actual application in a further manner.
For specific limitations of the data encryption device, reference may be made to the above limitations of the data encryption method, which will not be described herein again. The respective modules in the above-described data encryption apparatus may be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, a network interface, a display screen, and an input device connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile 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 an operating system and computer programs in the non-volatile storage medium. The network interface of the computer device is used for communicating with an external server through a network connection. The computer program is executed by a processor to implement a method of encrypting data.
In one embodiment, there is provided a computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the encryption method of data in the above embodiments when executing the computer program, such as the steps 101 to 105 shown in fig. 2 and other extensions of the method and related steps. Alternatively, the processor, when executing the computer program, implements the functions of the respective modules/units of the encryption apparatus of data in the above-described embodiments, such as the functions of the modules 11 to 15 shown in fig. 5. To avoid repetition, further description is omitted here.
The Processor may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic device, discrete hardware component, etc. The general purpose processor may be a microprocessor or the processor may be any conventional processor or the like which is the control center for the computer device and which connects the various parts of the overall computer device using various interfaces and lines.
The memory may be used to store the computer programs and/or modules, and the processor may implement various functions of the computer device by running or executing the computer programs and/or modules stored in the memory and invoking data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, video data, etc.) created according to the use of the cellular phone, etc.
The memory may be integrated in the processor or may be provided separately from the processor.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements the steps of the encryption method of data in the above-described embodiments, such as the steps 101 to 105 shown in fig. 2 and extensions of other extensions and related steps of the method. Alternatively, the computer program realizes the functions of the respective modules/units of the encryption apparatus of data in the above-described embodiments, for example, the functions of the modules 11 to 15 shown in fig. 5, when being executed by the processor. To avoid repetition, further description is omitted here.
In the data encryption method, the data encryption device, the computer equipment and the storage medium provided by the embodiment, the identity of a user receiving encrypted data is firstly obtained, the identity of the user is converted to obtain an index carrying encrypted position information, and one column of original data is selected from original data to be encrypted; classifying the selected original data in the list to make the classified original data have the same type as the total digit of the index so as to be suitable for the original data with large data volume, then determining the original data at the encryption position positioned by the index in the classified original data as the data to be encrypted according to the index carrying the encryption position information, and carrying out encryption processing in a preset form on the data to be encrypted so that the position of the encrypted data can represent the identity of the leakage source.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present invention, and are intended to be included within the scope of the present invention.

Claims (10)

1. A method for encrypting data, the method comprising:
acquiring an identity of a user receiving encrypted data, and converting the identity of the user to obtain an index carrying encrypted position information;
selecting one column of original data from original data to be encrypted;
classifying the selected one row of original data to make the classified original data have the same category as the total digit of the index;
according to the index carrying the encryption position information, determining the classified original data of the encryption position positioned with the index in the original data as data to be encrypted;
and carrying out encryption processing in a preset form on the data to be encrypted.
2. The method of encrypting data according to claim 1, further comprising:
obtaining authorized user information for receiving the encrypted data;
and distributing the identity identification to the user corresponding to the user information.
3. The method of claim 1, wherein the step of classifying the selected one of the columns of original data further comprises:
acquiring the total digit of the index obtained by converting according to the identity;
calculating a remainder obtained by dividing the row number of each row in the original data in one column by the total digit number;
and determining the original data corresponding to the row numbers with the same remainder as the same type.
4. The method for encrypting data according to claim 3, wherein the step of converting the user's identification comprises:
and converting the identity of the user into a binary number, and determining the digit of the binary number as the digit of the index.
5. The method according to claim 4, wherein the step of determining the classified original data at the encryption position located by the index as the data to be encrypted further comprises:
acquiring the digit of the number with the same numerical value in the binary number;
acquiring the number of rows where the original data with the remainder being the number of bits is located;
and determining the original data in the acquired line number as the data to be encrypted.
6. The method according to any one of claims 1 to 5, wherein the step of performing a preset form of encryption processing on the data to be encrypted comprises:
acquiring original data of which the data type is a character type in the data to be encrypted;
and displaying and marking the acquired original data of the character type.
7. The method according to any one of claims 1 to 5, wherein the step of performing a preset form of encryption processing on the data to be encrypted comprises:
acquiring original data of which the data type is a numerical value type in the data to be encrypted;
and increasing the value of the preset position of the acquired original data of the value type.
8. An apparatus for encrypting data, the apparatus comprising:
the index conversion module is used for acquiring the identity of a user receiving encrypted data, and converting the identity of the user to obtain an index carrying encrypted position information;
the data selection module is used for selecting one row of original data from the original data to be encrypted;
the classification module is used for classifying the selected one row of original data, so that the classified original data has the same category as the total digit of the index;
the position determining module is used for determining the original data of the encrypted position positioned by the index in the classified original data as the data to be encrypted according to the index carrying the encrypted position information;
and the encryption module is used for carrying out encryption processing in a preset form on the data to be encrypted.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the steps of the encryption method of data according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of a method for encrypting data according to any one of claims 1 to 7.
CN202010587452.XA 2020-06-24 2020-06-24 Data encryption method and device, computer equipment and storage medium Pending CN111737745A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010587452.XA CN111737745A (en) 2020-06-24 2020-06-24 Data encryption method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010587452.XA CN111737745A (en) 2020-06-24 2020-06-24 Data encryption method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN111737745A true CN111737745A (en) 2020-10-02

Family

ID=72652041

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010587452.XA Pending CN111737745A (en) 2020-06-24 2020-06-24 Data encryption method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111737745A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115412293A (en) * 2022-07-19 2022-11-29 网易(杭州)网络有限公司 Data processing method, device, server and storage medium
CN115987682A (en) * 2023-02-02 2023-04-18 浙江网商银行股份有限公司 Data processing method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115412293A (en) * 2022-07-19 2022-11-29 网易(杭州)网络有限公司 Data processing method, device, server and storage medium
CN115987682A (en) * 2023-02-02 2023-04-18 浙江网商银行股份有限公司 Data processing method

Similar Documents

Publication Publication Date Title
CN109040341B (en) Intelligent contract address generation method and device, computer equipment and readable storage medium
CN110688675B (en) Data leakage tracing device and method based on privacy protection and readable storage medium
CN110096897B (en) Data leakage source positioning method and device based on data desensitization processing
CN112256662B (en) Agricultural product information block chain storage and tracing method, device, equipment and storage medium
CN105468990A (en) Sensitive information management control method and apparatus
CN111737745A (en) Data encryption method and device, computer equipment and storage medium
CN112514349B (en) Detecting duplication using exact and fuzzy matching of cryptographic matching indices
CN109493048B (en) Financial accounting method, device, equipment and storage medium based on block chain
CN110321480B (en) Recommendation information pushing method and device, computer equipment and storage medium
CN111107042B (en) Message parsing method and device, computer equipment and storage medium
CN113159253A (en) Industrial Internet label coding method and device and electronic equipment
CN112035857A (en) Data protection method, device, equipment and medium
CN114896633A (en) Sensitive data processing method and device and computer readable storage medium
CN113434122A (en) Multi-role page creation method and device, server and readable storage medium
CN105069639A (en) Agricultural product quality tracing method and device
CN111984989A (en) Method, device, system and medium for verifying, issuing and accessing URL (uniform resource locator)
CN113360889B (en) Rights management method and apparatus, server, and computer-readable storage medium
CN115758432A (en) Omnibearing data encryption method and system based on machine learning algorithm
CN114124469A (en) Data processing method, device and equipment
CN113360809A (en) Page data updating method and device, computer equipment and storage medium
CN113536254A (en) Resource permission configuration method and device, computer equipment and storage medium
US11580676B1 (en) Method for embedding user information in webpages and electronic device implementing method
CN118260804B (en) Data desensitization method, equipment and storage medium
CN111079435B (en) Named entity disambiguation method, device, equipment and storage medium
CN117134971A (en) Method, device, equipment and storage medium for processing encrypted 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