CN110737913A - Safety desensitization method and device based on time and date data and computer equipment - Google Patents

Safety desensitization method and device based on time and date data and computer equipment Download PDF

Info

Publication number
CN110737913A
CN110737913A CN201910824292.3A CN201910824292A CN110737913A CN 110737913 A CN110737913 A CN 110737913A CN 201910824292 A CN201910824292 A CN 201910824292A CN 110737913 A CN110737913 A CN 110737913A
Authority
CN
China
Prior art keywords
time
date
vector
level
desensitization
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.)
Granted
Application number
CN201910824292.3A
Other languages
Chinese (zh)
Other versions
CN110737913B (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.)
OneConnect Smart Technology Co Ltd
Original Assignee
OneConnect Smart Technology 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 OneConnect Smart Technology Co Ltd filed Critical OneConnect Smart Technology Co Ltd
Priority to CN201910824292.3A priority Critical patent/CN110737913B/en
Publication of CN110737913A publication Critical patent/CN110737913A/en
Priority to PCT/CN2020/105884 priority patent/WO2021042918A1/en
Application granted granted Critical
Publication of CN110737913B publication Critical patent/CN110737913B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/6245Protecting personal data, e.g. for financial or medical purposes

Landscapes

  • Engineering & Computer Science (AREA)
  • Health & Medical Sciences (AREA)
  • Bioethics (AREA)
  • General Health & Medical Sciences (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Databases & Information Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Medical Informatics (AREA)
  • Storage Device Security (AREA)

Abstract

The application discloses safety desensitization methods, devices, computer equipment and storage media based on time-date data, wherein the method comprises the steps of obtaining time-date and second time-date to be desensitized, calling reference time, calculating to obtain a time interval according to the formula that the time interval is the time-date-reference time, obtaining a parameter vector, mapping the time-date to a date vector, and according to the formula:
Figure DDA0002188567120000011
calculating to obtain a level identifier m, recording the time level corresponding to the level identifier m as an appointed time level, desensitizing the th time and date to the th target time, mapping the th target time to the th target time vector, calculating according to a formula to obtain a compensation vector, mapping the second time and date to the second date vector, calculating to obtain a second target time vector, and forming a second target time after desensitizing the second time and date. Thereby improving the utilization rate of data.

Description

Safety desensitization method and device based on time and date data and computer equipment
Technical Field
The present application relates to the field of computers, and more particularly to methods, apparatuses, computer devices and storage media for security desensitization based on time-date data.
Background
Data desensitization, also called data bleaching, data privacy removal or data deformation, refers to data deformation of certain sensitive information through desensitization rules to realize reliable protection of sensitive private data, the data desensitization is frequently used in the data transmission and processing process, and the method adopted by is that 1, digital mask desensitization causes loss of information value and data analysis cannot reflect the whole value of the data, and 2, fixed replacement, namely all dates are replaced by random dates or the dates are randomly the same as days, so that unreasonable data can be generated, and damaged original information also causes great misleading on statistics and analysis.
Disclosure of Invention
The main object of the present application is to provide methods, apparatuses, computer devices and storage media for security desensitization based on time-date data, aiming at improving the effective utilization of time data.
In order to achieve the above object, the present application proposes methods for security desensitization based on time-date data, comprising the steps of:
acquiring a time date and a second time date to be desensitized, wherein the time date is composed of at least four time levels of a year level, a month level, a day level and a time level;
a preset reference time is called, and a time interval is calculated according to a formula of the time interval | the time date-the reference time |;
acquiring a th parameter vector corresponding to the th time interval according to the corresponding relation between the preset time interval and the parameter vector;
mapping th time and date into th date vector according to a preset date vector mapping method, wherein the th date vector comprises four component vectors consisting of four time levels, namely a year level, a month level, a day level and a time level, and the th parameter vector has the same dimension as the th date vector;
according to the formula:
Figure BDA0002188567100000021
i is an independent variable, and a level identifier m is calculated, wherein y is the th date vector, and yi is in the th date vectorAn ith component vector si is the ith component in the th parameter vector, and the time level corresponding to the level identifier m is recorded as a designated time level;
desensitizing the time-date to a target time according to a preset desensitization interval shifting scheme, wherein the specified time level value for the target time is the same as the specified time level value for the time-date;
mapping th target time into th target time vector according to a preset date vector mapping method, and calculating to obtain a compensation vector according to a formula, wherein the compensation vector is th target time vector- th date vector;
according to a preset date vector mapping method, mapping a second time and date into a second date vector, and according to a formula: calculating a second target time vector, namely a second date vector and a compensation vector;
and extracting numerical values of four time levels of grade, month level, day level and time level from the second target time vector so as to form a second target time after desensitization to the second time and date.
, the step of obtaining the th parameter vector corresponding to the th time interval according to the corresponding relationship between the preset time interval and the parameter vector includes:
acquiring a plurality of initial parameter vectors corresponding to th time intervals according to the corresponding relation between preset time intervals and the parameter vectors, wherein the initial parameter vectors are marked with designated component vectors;
and comparing the numerical values of the designated component vectors in the plurality of initial parameter vectors, thereby screening out the initial parameter vector with the maximum numerical value of the designated component vector, and recording as the -th parameter vector.
, the step of mapping time date to date vector according to preset date vector mapping method, wherein date vector includes four component vectors composed of four time levels of year, month, day and time, including:
generating date initial vector according to the time date, wherein the date initial vector only comprises four component vectors consisting of four time levels of grade, month grade, day grade and time grade of the time date;
embedding a plurality of component vectors in the th date initial vector according to a preset component embedding method, so that the number of the component vectors of the th date initial vector reaches a specified number;
and recording the th date initial vector subjected to component embedding processing as a th date vector.
, the step of desensitizing the time date to a target time according to a preset desensitization interval transition scheme wherein the designated time level value of the target time is the same as the designated time level value of the time date comprises:
acquiring an appointed desensitization parameter corresponding to the th time interval according to the corresponding relation between the time interval and the desensitization parameter;
applying the specified desensitization parameters to a preset initial desensitization model to obtain a specified desensitization model;
inputting values of other time levels than the specified time level in the th time date into the specified desensitization model for calculation, and combining the output value of the specified desensitization model and the value of the specified time level into the th target time.
, encrypting the desensitization parameter into ciphertext, and acquiring the appointed desensitization parameter corresponding to the th time interval according to the corresponding relationship between the time interval and the desensitization parameter, wherein the steps include:
acquiring a ciphertext of the appointed desensitization parameter corresponding to the th time interval according to the corresponding relation between the time interval and the ciphertext of the desensitization parameter;
and decrypting the ciphertext of the specified desensitization parameter into a plaintext by adopting a preset AES128 algorithm according to a preset secret key.
, the step of desensitizing the time date to a target time according to a preset desensitization interval transition scheme wherein the designated time level value of the target time is the same as the designated time level value of the time date comprises:
calling three preset desensitization functions, and respectively taking values of three time levels except the specified time level in the th time date as parameters of the three desensitization functions;
respectively carrying out integral operation on the three desensitization functions within a specified interval so as to obtain three output integral values;
combining the three integrated values with the values of the specified time level to th target time.
Further , the step of extracting values for the four time levels of year, month, day and time from the second target time vector to form a second target time desensitized to the second time-date comprises:
receiving data processing instructions, wherein the data processing instructions are used for indicating that time and date are processed;
judging whether the data processing instruction further indicates to process a second time and date;
and if the data processing instruction does not indicate that the second time and date are processed, refusing to process the data.
The present application provides security desensitization devices based on time-date data, comprising:
a date acquisition unit for acquiring th time date and second time date to be desensitized, wherein the time date is composed of at least four time levels of a grade, a month level, a day level and a time level;
the th time interval calculating unit is used for calling a preset reference time, and calculating a th time interval according to the formula, wherein the th time interval is the < the th time date-the reference time';
an th parameter vector obtaining unit, configured to obtain a th parameter vector corresponding to the th time interval according to a preset correspondence between the time interval and the parameter vector;
an date vector mapping unit, for mapping the date and time into a date vector according to a preset date vector mapping method, wherein the date vector includes four component vectors composed of four time levels of a year level, a month level, a day level and a time level, and the dimension of the parameter vector is the same as that of the date vector;
a designated time level obtaining unit configured to:
Figure BDA0002188567100000041
i is an independent variable, a level identifier m is obtained through calculation, wherein y is an th date vector, yi is an ith component vector in a th date vector, si is an ith component vector in a th parameter vector, and a time level corresponding to the level identifier m is recorded as a specified time level;
an desensitization unit for desensitizing the time date to a th target time according to a preset desensitization interval shifting scheme, wherein the value of the specified time level of the th target time is the same as the value of the specified time level of the th time date;
the offset vector acquisition unit is used for mapping the th target time into the th target time vector according to a preset date vector mapping method, and calculating to obtain an offset vector according to a formula, wherein the offset vector is the th target time vector-the th date vector;
a second date vector mapping unit, configured to map a second time and date into a second date vector according to a preset date vector mapping method, and according to a formula: calculating a second target time vector, namely a second date vector and a compensation vector;
and the second target time acquisition unit is used for extracting numerical values of four time levels of grade, month level, day level and time level from the second target time vector so as to form a second target time after desensitization to the second time and date.
The present application provides computer apparatus comprising a memory storing a computer program and a processor, the processor when executing the computer program implementing the steps of the method of any of the items above.
The present application provides computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the method of any of the above .
The application discloses a safety desensitization method, a device, a computer device and a storage medium based on time-date data, wherein a th time date and a second time date to be desensitized are obtained, a th time interval is obtained by calculation according to a formula that an th time interval is | the th time date-reference time |, a th parameter vector corresponding to a th time interval is obtained, a th time date is mapped to a th date vector, and according to the formula:
Figure BDA0002188567100000051
the method comprises the steps of calculating a level identifier m by taking i as an independent variable, recording a time level corresponding to the level identifier m as a designated time level, desensitizing the th time and date to th target time, calculating a compensation vector according to a formula, wherein the compensation vector is th target time vector- th date vector, calculating a second target time vector according to a formula, wherein the second target time vector is a second date vector-compensation vector, and extracting values of four time levels, namely year level, month level, day level and time level from the second target time vector so as to form second target time desensitized to the second time and date, thereby improving the utilization rate of time data.
Drawings
FIG. 1 is a schematic flow chart of a security desensitization method based on time-date data according to an embodiment of the present application ;
FIG. 2 is a block diagram illustrating the structure of a safety desensitization device based on time-date data according to an embodiment of the present application ;
fig. 3 is a block diagram illustrating a computer device according to an embodiment of the present application .
The objectives, features, and advantages of the present application will be further explained in connection with the embodiments, as illustrated in the accompanying drawings at .
Detailed Description
For purposes of making the present application, its objects, aspects and advantages more apparent, the present application is described in further detail with reference to the drawings and the examples.
Referring to fig. 1, the present application provides methods for security desensitization based on time-date data, including the following steps:
s1, acquiring a th time date and a second time date to be desensitized, wherein the time date at least comprises four time levels of grade, month grade, day grade and time grade;
s2, calling preset reference time, and calculating a th time interval according to a formula, wherein the th time interval is | the th time date-reference time |;
s3, acquiring a th parameter vector corresponding to the th time interval according to the corresponding relation between the preset time interval and the parameter vector;
s4, mapping time and date into a date vector according to a preset date vector mapping method, wherein the date vector comprises four component vectors consisting of four time levels, namely a year level, a month level, a day level and a time level, and the dimension of the parameter vector is the same as that of the date vector;
s5, according to the formula:
Figure BDA0002188567100000061
i is an independent variable, a level identifier m is obtained through calculation, wherein y is an th date vector, yi is an ith component vector in a th date vector, si is an ith component vector in a th parameter vector, and a time level corresponding to the level identifier m is recorded as a specified time level;
s6, desensitizing the time date to a th target time according to a preset desensitization interval conversion scheme, wherein the value of the designated time level of the th target time is the same as the value of the designated time level of the th time date;
s7, mapping the target time into a target time vector according to a preset date vector mapping method, and calculating to obtain a compensation vector according to a formula, wherein the compensation vector is the target time vector- date vector;
s8, according to a preset date vector mapping method, mapping the second time and date into a second date vector, and according to a formula: calculating a second target time vector, namely a second date vector and a compensation vector;
and S9, extracting numerical values of four time levels of grade, month level, day level and time level from the second target time vector, thereby forming a second target time after desensitization to the second time and date.
In order to improve the effective utilization rate of data and reduce the calculation loss, the application processes the time date and the second time date which are simultaneously treated with desensitization, wherein the scheme of desensitization of the time date is just opposite to the scheme of desensitization of the second time date, so that the data are distorted for single data, but the data are ensured to be available when macroscopic data processing (such as average value processing) is carried out, thereby improving the effective utilization rate of the data, wherein the time date is 2010.01.01.01 for example, namely representing 1/2010.
As described in the above step S2, the preset reference time is called, and the time interval is calculated according to the formula, that is, the time interval | the time date — the reference time |, wherein the reference time may be set to be earlier than the time date or later than the time date.
As described in step S3, the th parameter vector corresponding to the th time interval is obtained according to the corresponding relationship between the preset time interval and the parameter vector, wherein the corresponding relationship between the preset time interval and the parameter vector may be the corresponding relationship between and , or the corresponding relationship between and more, if is the corresponding relationship between the preset time interval and the parameter vector, the accurate th parameter vector is selected from the plurality of parameter vectors, for example, the method includes obtaining a plurality of initial parameter vectors corresponding to the th time interval according to the corresponding relationship between the preset time interval and the parameter vector, wherein the initial parameter vectors are marked with designated components, comparing the values of the designated components in the plurality of initial parameter vectors, and thereby selecting the initial parameter vector with the largest value of the designated components and marking the initial parameter vector as the th parameter vector.
As described in step S4, the th time-date is mapped to the th date vector according to a preset date vector mapping method, wherein the th date vector comprises four component vectors consisting of four time levels of year, month, day and time, the th parameter vector has the same dimension as the th date vector, the th date vector may comprise only four component vectors consisting of four time levels of year, month, day and time, and may further comprise other component vectors, the th time-date is mapped to the th date vector according to the preset date vector mapping method, for example, the th date initial vector is generated according to the th time-date, the th date initial vector comprises only four component vectors consisting of four time levels of year, month, day and time, the 85 th date initial vector is embedded into the 39 th date vector according to a preset component embedding method, the initial date vector is embedded into the 53934 th date vector, and the initial date vector is processed into the number of the initial date vector.
As stated in step S5 above, according to the formula:
Figure BDA0002188567100000071
i is an independent variable, a level identifier m is obtained through calculation, wherein y is a th date vector, yi is an ith component vector in a th date vector, si is an ith component vector in a th parameter vector, and a time level corresponding to the level identifier m is recorded as a designated time levelThe value specifies a temporal level, and thus the value of the specified temporal level is retained in order to guarantee the availability of the data.
As stated in step S6 above, the time-date is desensitized to the th target time according to a preset desensitization interval shifting scheme, wherein the value of the specified time level of the th target time is the same as the value of the specified time level of the th time-date.
The method comprises the steps of obtaining designated desensitization parameters corresponding to th time intervals according to the corresponding relation between the time intervals and the desensitization parameters, applying the designated desensitization parameters to a preset initial desensitization model to obtain a designated desensitization model, inputting numerical values of other time levels except for designated time levels in the th time date into the designated desensitization model for calculation, and combining output values of the designated desensitization model and the numerical values of the designated time levels into th target time, wherein the numerical values of the designated time levels are reserved for guaranteeing the availability of data.
As described in the above step S7, according to the preset date vector mapping method, the target time is mapped to the target time vector, and according to the formula, the compensation vector is calculated from the target time vector — the date vector, wherein the compensation vector reflects the deviation degree between the target time and the date and time, and is used as the desensitization basis of the second date and time in the following.
As described in step S8, the second time and date is mapped into the second date vector according to the preset date vector mapping method, and according to the formula: and calculating to obtain a second target time vector, wherein the second target time vector is a second date vector and a compensation vector. In order to improve the effective utilization rate of data and reduce the calculation loss, the method adopts the following formula: the second target time vector is the second date vector-offset vector, and the way of calculating the second target time vector ensures that data is available when macroscopic data processing is performed (for example, average processing), so that the effective utilization rate of the data is improved.
As described in step S9 above, the values of the four time levels of year, month, day and time are extracted from the second target time vector to form the second target time after desensitization to the second time and date, wherein the values of the specified time levels of the second target time are also constant, so that a certain degree of data availability can be guaranteed , and since the date and time is associated with the second date and time, data availability can be guaranteed by means of common processing during macroscopic data processing, thereby improving data utilization.
In embodiments, the step S3 of obtaining a th parameter vector corresponding to a th time interval according to a preset relationship between the time interval and the parameter vector includes:
s301, obtaining a plurality of initial parameter vectors corresponding to th time intervals according to the corresponding relation between preset time intervals and the parameter vectors, wherein the initial parameter vectors are marked with designated component vectors;
s302, comparing the numerical values of the designated component vectors in the plurality of initial parameter vectors, thereby screening out the initial parameter vector with the maximum numerical value of the designated component vector, and recording the initial parameter vector as the -th parameter vector.
According to the method, the parameter vector corresponding to the time interval is obtained according to the corresponding relation between the preset time interval and the parameter vector, the mode that the corresponding relation between the preset time interval and the parameter vector is -to-many is adopted, the numerical values of the designated component vectors in the initial parameter vectors are compared, and therefore the initial parameter vector with the maximum numerical value of the designated component vector is screened out and recorded as the parameter vector, accordingly, the parameter vector with the most valuable time level is screened out from the initial parameter vectors, and the designated time level is judged more accurately and more appropriately in the follow-up judgment.
In embodiments, the step S4 of mapping time-date to date vector according to the preset date vector mapping method, wherein the date vector includes four sub-vectors consisting of four time levels of year, month, day and time, includes:
s401, generating a date initial vector according to the time date, wherein the date initial vector only comprises four component vectors consisting of four time levels of a grade, a month level, a day level and a time level of the time date;
s402, embedding a plurality of component vectors into the th date initial vector according to a preset component embedding method, so that the number of the component vectors of the th date initial vector reaches a specified number;
and S403, recording the th date initial vector subjected to component embedding processing as a th date vector.
In order to map time and date into date vector according to the preset date vector mapping method, in order to further steps of secret data in the operation process and the operation result, the method adopts date initial vector generated according to the time and date, a plurality of component vectors are embedded into the date initial vector according to the preset component embedding method, and the date initial vector subjected to component embedding processing is marked as the date vector, so that the date vector has disguised component vectors, and the effect of information secret can be achieved when information leaks.
In embodiments, the step S6 of desensitizing the time date to a th target time according to a preset desensitization interval shifting scheme, wherein the value of the specified time level at the th target time is the same as the value of the specified time level at the th time date includes:
s601, acquiring an appointed desensitization parameter corresponding to the th time interval according to the corresponding relation between the time interval and the desensitization parameter;
s602, applying the specified desensitization parameters to a preset initial desensitization model to obtain a specified desensitization model;
s603, inputting numerical values of other time levels except for the specified time level in the th time date into the specified desensitization model for calculation, and combining the output value of the specified desensitization model and the numerical value of the specified time level into the th target time.
According to the method, values of other time levels except for the specified time level in the time date are input into the specified desensitization model for calculation, namely the values of the three different time levels after desensitization can be obtained, and then the original values of the specified time levels are combined, so that the target time can be obtained.
In embodiments, the step S601 of encrypting the desensitization parameter into ciphertext and acquiring the specified desensitization parameter corresponding to the th time interval according to the correspondence between the time interval and the desensitization parameter includes:
s6011, obtaining a ciphertext of the specified desensitization parameter corresponding to the th time interval according to the corresponding relationship between the time interval and the ciphertext of the desensitization parameter;
s6012, according to a preset secret key, decrypting the ciphertext of the specified desensitization parameter into a plaintext by adopting a preset AES128 algorithm.
In order to prevent the desensitized data from being reversely restored according to the data confidentiality requirement of the step, the method adopts a mode that the desensitization parameters are encrypted into ciphertexts, acquires the ciphertexts of the specified desensitization parameters corresponding to the time interval according to the corresponding relation between the time interval and the ciphertexts of the desensitization parameters, and decrypts the ciphertexts of the specified desensitization parameters into the plaintexts according to a preset secret key by adopting a preset AES128 algorithm, so that the desensitization parameters are safer, wherein the AES128 algorithm is an advanced encryption standard algorithm with the secret key length of 128 bits, and is symmetric encryption algorithms, and the data security can be effectively improved.
In embodiments, the step S6 of desensitizing the time date to a th target time according to a preset desensitization interval shifting scheme, wherein the value of the specified time level at the th target time is the same as the value of the specified time level at the th time date includes:
s611, calling three preset desensitization functions, and taking numerical values of three time levels except the specified time level in the th time date as parameters of the three desensitization functions respectively;
s612, respectively carrying out integral operation on the three desensitization functions within a specified interval so as to obtain three output integral values;
and S613, combining the three integrated values and the numerical value of the specified time level into an th target time.
The application adopts the steps of taking three preset desensitization functions, respectively taking numerical values of three time levels except the specified time level in the time date as parameters of the three desensitization functions, respectively carrying out integral operation in a specified interval on the three desensitization functions to obtain three output integrated values, combining the three integrated values and the numerical values of the specified time level into the target time, desensitizing the time date into the target time, wherein the numerical values of the three time levels except the specified time level in the time date are not taken as input values of the function (namely are not related to independent variables) but taken as parameters of the function to determine a specific function, and then carrying out integration to obtain only three integrated values of , finally achieving the aim of data desensitization, and further ensuring the safety of data because the desensitization mode adopted is different from the traditional technology.
In embodiments, after the step S9 of extracting numerical values of four time levels of year, month, day and hour from the second target time vector to constitute the second target time desensitized to the second time-date, the method includes:
s91, receiving a data processing instruction, wherein the data processing instruction is used for indicating that the time and date are processed;
s92, judging whether the data processing instruction further indicates to process the second time and date;
and S93, if the data processing instruction does not instruct to process the second time and date, refusing to process the data.
The method adopts a mode that the time date and the second time date form associated data to improve the utilization rate of the data, and when the data processing instruction only relates to the time date, the result of the data processing is distorted, the final credibility of the data processing result cannot be ensured, and the data processing is rejected, and generates suggestion information for suggesting that the data processing is simultaneously carried out on the time date and the second time date while rejecting the data processing.
The safety desensitization method based on time-date data obtains th time-date and second time-date to be desensitized, calculates th time interval according to a formula that the th time interval is the third th time-date-reference time, obtains th parameter vector corresponding to the th time interval, maps the th time-date to the th date vector, and according to the formula:
Figure BDA0002188567100000121
the method comprises the steps of calculating a level identifier m by taking i as an independent variable, recording a time level corresponding to the level identifier m as a designated time level, desensitizing the th time and date to th target time, calculating a compensation vector according to a formula, wherein the compensation vector is th target time vector- th date vector, calculating a second target time vector according to a formula, wherein the second target time vector is a second date vector-compensation vector, and extracting values of four time levels, namely year level, month level, day level and time level from the second target time vector so as to form second target time desensitized to the second time and date, thereby improving the utilization rate of time data.
Referring to fig. 2, an embodiment of the present application provides security desensitization devices based on time-date data, including:
a date acquisition unit 10 for acquiring th time date and second time date to be desensitized, wherein the time date is constituted by at least four time levels of grade, month level, day level and time level;
the th time interval calculation unit 20 is used for calling a preset reference time, and calculating a th time interval according to the formula, wherein the th time interval is the third th time date-the reference time;
an th parameter vector obtaining unit 30, configured to obtain a th parameter vector corresponding to the th time interval according to a preset correspondence between the time interval and the parameter vector;
an date vector mapping unit 40, configured to map the date and time into a date vector according to a preset date vector mapping method, where the date vector includes four component vectors composed of four time levels, namely, a year level, a month level, a day level and a time level, and a dimension of the parameter vector is the same as a dimension of the date vector;
a specified time level obtaining unit 50 for obtaining, according to the formula:
Figure BDA0002188567100000131
i is an independent variable, and a grade mark m is obtained through calculation, wherein y isAn th date vector, yi is the ith component vector in the th date vector, si is the ith component vector in the th parameter vector, and the time level corresponding to the level identifier m is recorded as a specified time level;
an desensitization unit 60 for desensitizing the time date to a th target time according to a preset desensitization interval shifting scheme, wherein the value of the specified time level of the th target time is the same as the value of the specified time level of the th time date;
the offset vector acquiring unit 70 is configured to map the th target time into the th target time vector according to a preset date vector mapping method, and calculate the offset vector according to a formula that the offset vector is the th target time vector and the th date vector;
a second date vector mapping unit 80, configured to map a second time and date into a second date vector according to a preset date vector mapping method, and according to a formula: calculating a second target time vector, namely a second date vector and a compensation vector;
a second target time obtaining unit 90, configured to extract, from the second target time vector, numerical values of four time levels, a year level, a month level, a day level, and a time level, thereby composing a second target time desensitized to a second time date.
The operations performed by the above units correspond to step of the security desensitization method based on time-date data of the foregoing embodiment, and are not described herein again.
In embodiments, the parameter vector obtaining unit 30 includes:
a plurality of initial parameter vector obtaining subunits, configured to obtain a plurality of initial parameter vectors corresponding to the th time interval according to a preset correspondence between time intervals and parameter vectors, where the initial parameter vectors are labeled with designated component vectors;
and the screening subunit is used for comparing the numerical values of the specified component vectors in the plurality of initial parameter vectors, thereby screening the initial parameter vector with the maximum numerical value of the specified component vector and recording the initial parameter vector as the -th parameter vector.
The operations performed by the sub-units correspond to step of the security desensitization method based on time-date data of the foregoing embodiment, and are not described herein again.
In embodiments, the date vector mapping unit 40 comprises:
an th date initial vector generating subunit, configured to generate a th date initial vector according to the th time date, where the th date initial vector includes only four component vectors consisting of four time levels, namely, a year level, a month level, a day level and a time level, of the th time date;
a vector embedding subunit, configured to embed, according to a preset vector embedding method, a plurality of vectors in the th-date initial vector so that the number of vectors of the th-date initial vector reaches a specified number;
and the th date vector marking subunit is used for marking the date initial vector subjected to component embedding processing as the th date vector.
The operations performed by the sub-units correspond to step of the security desensitization method based on time-date data of the foregoing embodiment, and are not described herein again.
In embodiments, the desensitizing unit 60 comprises:
a specified desensitization parameter obtaining subunit, configured to obtain a specified desensitization parameter corresponding to the th time interval according to the correspondence between the time interval and the desensitization parameter;
the appointed desensitization model obtaining subunit is used for applying the appointed desensitization parameters to a preset initial desensitization model so as to obtain an appointed desensitization model;
an th target time obtaining subunit, configured to input the values of the time levels other than the specified time level in the th time date into the specified desensitization model for calculation, and combine the output values of the specified desensitization model and the values of the specified time level into a th target time.
The operations performed by the sub-units correspond to step of the security desensitization method based on time-date data of the foregoing embodiment, and are not described herein again.
In embodiments, the desensitization parameter is encrypted as ciphertext, and the specifying a desensitization parameter acquisition subunit includes:
a ciphertext obtaining module, configured to obtain a ciphertext of the specified desensitization parameter corresponding to the th time interval according to a correspondence between the time interval and a ciphertext of the desensitization parameter;
and the decryption module is used for decrypting the ciphertext of the specified desensitization parameter into a plaintext by adopting a preset AES128 algorithm according to a preset secret key.
The operations performed by the modules correspond to step of the security desensitization method based on time-date data in the foregoing embodiment, and are not described herein again.
In embodiments, the desensitizing unit 60 comprises:
a desensitization function calling subunit, configured to call three preset desensitization functions, and use numerical values of three time levels in the th time date except the specified time level as parameters of the three desensitization functions, respectively;
the integral operation subunit is used for respectively carrying out integral operation on the three desensitization functions within a specified interval so as to obtain three output integral values;
a combining subunit for combining the three integrated values and the numerical value of the specified time level into an th target time.
The operations performed by the sub-units correspond to step of the security desensitization method based on time-date data of the foregoing embodiment, and are not described herein again.
In embodiments, the apparatus, comprising:
a received data processing instruction unit for receiving data processing instructions, wherein the data processing instructions are used for indicating that time and date are processed;
the processing judging unit is used for judging whether the data processing instruction further indicates to process a second time and date;
and the rejection unit is used for rejecting the data processing if the data processing instruction does not indicate that the second time and date is processed.
The operations performed by the above units correspond to step of the security desensitization method based on time-date data of the foregoing embodiment, and are not described herein again.
The safety desensitization device based on time-date data acquires th time-date and second time-date to be desensitized, calculates th time interval according to the formula that the th time interval is the third th time-date-reference time, acquires th parameter vector corresponding to the th time interval, maps the th time-date to the th date vector, and according to the formula:
Figure BDA0002188567100000161
the method comprises the steps of calculating a level identifier m by taking i as an independent variable, recording a time level corresponding to the level identifier m as a designated time level, desensitizing the th time and date to th target time, calculating a compensation vector according to a formula, wherein the compensation vector is th target time vector- th date vector, calculating a second target time vector according to a formula, wherein the second target time vector is a second date vector-compensation vector, and extracting values of four time levels, namely year level, month level, day level and time level from the second target time vector so as to form second target time desensitized to the second time and date, thereby improving the utilization rate of time data.
Referring to fig. 3, there are also computer devices that may be servers whose internal structure may be as shown, the computer devices including a processor, a memory, a network interface, and a database connected by a system bus, wherein the processor of the computer is designed to provide computing and control capabilities, the memory of the computer device includes a non-volatile storage medium, an internal memory, the non-volatile storage medium storing an operating system, a computer program, and a database, the internal memory providing an environment for the operating system and the computer program to run in the non-volatile storage medium, the database of the computer device storing data for a security desensitization method based on time-date data, the network interface of the computer device for communicating with an external terminal over a network connection, the computer program when executed by the processor to implement security desensitization methods based on time-date data.
The processor executes the above-mentioned security desensitization method based on time-date data, wherein the method includes steps corresponding to step of executing the security desensitization method based on time-date data of the foregoing embodiment, which are not described herein again.
It will be understood by those skilled in the art that the structures shown in the drawings are only block diagrams of some of the structures associated with the embodiments of the present application and do not constitute a limitation on the computer apparatus to which the embodiments of the present application may be applied.
The computer equipment acquires th time and date and second time and date to be desensitized, calculates th time interval according to the formula that the th time interval is the absolute value of th time and date-reference time, acquires th parameter vector corresponding to th time interval, maps th time and date to th date vector, and according to the formula:
Figure BDA0002188567100000171
the method comprises the steps of calculating a level identifier m by taking i as an independent variable, recording a time level corresponding to the level identifier m as a designated time level, desensitizing the th time and date to th target time, calculating a compensation vector according to a formula, wherein the compensation vector is th target time vector- th date vector, calculating a second target time vector according to a formula, wherein the second target time vector is a second date vector-compensation vector, and extracting values of four time levels, namely year level, month level, day level and time level from the second target time vector so as to form second target time desensitized to the second time and date, thereby improving the utilization rate of time data.
Embodiments of of the present application further provide computer-readable storage media, on which computer programs are stored, and when the computer programs are executed by a processor, the method for security desensitization based on time-date data is implemented, where the method includes steps corresponding to step of executing the security desensitization method based on time-date data of the foregoing embodiments, and details are not repeated here.
The computer-readable storage medium of the application acquires th time and date and second time and date to be desensitized, calculates th time interval according to the formula that the th time interval is the absolute value of the th time and date-the reference time, acquires th parameter vector corresponding to the th time interval, maps the th time and date to the th date vector, and according to the formula:
Figure BDA0002188567100000172
the method comprises the steps of calculating a level identifier m by taking i as an independent variable, recording a time level corresponding to the level identifier m as a designated time level, desensitizing the th time and date to th target time, calculating a compensation vector according to a formula, wherein the compensation vector is th target time vector- th date vector, calculating a second target time vector according to a formula, wherein the second target time vector is a second date vector-compensation vector, and extracting values of four time levels, namely year level, month level, day level and time level from the second target time vector so as to form second target time desensitized to the second time and date, thereby improving the utilization rate of time data.
It will be understood by those of ordinary skill in the art that all or a portion of the processes of the methods of the embodiments described above may be implemented by a computer program that may be stored in a non-volatile computer-readable storage medium, which when executed, may include the processes of the embodiments of the methods described above, wherein any reference to memory, storage, database, or other medium provided herein and used in the embodiments may include non-volatile and/or volatile memory.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, apparatus, article, or method that comprises an series of elements does not include only those elements, but may include other elements not expressly listed or inherent to such process, apparatus, article, or method.
The above description is only a preferred embodiment of the present application, and not intended to limit the scope of the present application, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the specification and the drawings of the present application, or which are directly or indirectly applied to other related technical fields, are also included in the scope of the present application.

Claims (10)

1, A method for security desensitization based on time-date data, comprising:
acquiring a time date and a second time date to be desensitized, wherein the time date is composed of at least four time levels of a year level, a month level, a day level and a time level;
a preset reference time is called, and a time interval is calculated according to a formula of the time interval | the time date-the reference time |;
acquiring a th parameter vector corresponding to the th time interval according to the corresponding relation between the preset time interval and the parameter vector;
mapping th time and date into th date vector according to a preset date vector mapping method, wherein the th date vector comprises four component vectors consisting of four time levels, namely a year level, a month level, a day level and a time level, and the th parameter vector has the same dimension as the th date vector;
according to the formula:
Figure FDA0002188567090000011
i is an independent variable, a level identifier m is obtained through calculation, wherein y is an th date vector, yi is an ith component vector in a th date vector, si is an ith component vector in a th parameter vector, and a time level corresponding to the level identifier m is recorded as a specified time level;
desensitizing the time-date to a target time according to a preset desensitization interval shifting scheme, wherein the specified time level value for the target time is the same as the specified time level value for the time-date;
mapping th target time into th target time vector according to a preset date vector mapping method, and calculating to obtain a compensation vector according to a formula, wherein the compensation vector is th target time vector- th date vector;
according to a preset date vector mapping method, mapping a second time and date into a second date vector, and according to a formula: calculating a second target time vector, namely a second date vector and a compensation vector;
and extracting numerical values of four time levels of grade, month level, day level and time level from the second target time vector so as to form a second target time after desensitization to the second time and date.
2. The method for desensitizing security based on time-date data according to claim 1, wherein said step of obtaining th parameter vector corresponding to th time interval according to the relationship between the preset time interval and the parameter vector comprises:
acquiring a plurality of initial parameter vectors corresponding to th time intervals according to the corresponding relation between preset time intervals and the parameter vectors, wherein the initial parameter vectors are marked with designated component vectors;
and comparing the numerical values of the designated component vectors in the plurality of initial parameter vectors, thereby screening out the initial parameter vector with the maximum numerical value of the designated component vector, and recording as the -th parameter vector.
3. The method for security desensitization based on time-date data according to claim 1, characterized in that said th time-date is mapped into th date vector according to a preset date vector mapping method, wherein th date vector comprises four component vectors consisting of four time levels of year, month, day and time, comprising:
generating date initial vector according to the time date, wherein the date initial vector only comprises four component vectors consisting of four time levels of grade, month grade, day grade and time grade of the time date;
embedding a plurality of component vectors in the th date initial vector according to a preset component embedding method, so that the number of the component vectors of the th date initial vector reaches a specified number;
and recording the th date initial vector subjected to component embedding processing as a th date vector.
4. The method of claim 1, wherein the step of desensitizing the time-date to the target time according to a preset desensitization interval transformation scheme, wherein the specified time level value of the target time is the same as the specified time level value of the time-date comprises:
acquiring an appointed desensitization parameter corresponding to the th time interval according to the corresponding relation between the time interval and the desensitization parameter;
applying the specified desensitization parameters to a preset initial desensitization model to obtain a specified desensitization model;
inputting values of other time levels than the specified time level in the th time date into the specified desensitization model for calculation, and combining the output value of the specified desensitization model and the value of the specified time level into the th target time.
5. The security desensitization method according to claim 4, wherein said desensitization parameters are encrypted into ciphertext, and said step of obtaining the designated desensitization parameters corresponding to said th time interval according to the correspondence between said time interval and desensitization parameters comprises:
acquiring a ciphertext of the appointed desensitization parameter corresponding to the th time interval according to the corresponding relation between the time interval and the ciphertext of the desensitization parameter;
and decrypting the ciphertext of the specified desensitization parameter into a plaintext by adopting a preset AES128 algorithm according to a preset secret key.
6. The method of claim 1, wherein the step of desensitizing the time-date to the target time according to a preset desensitization interval transformation scheme, wherein the specified time level value of the target time is the same as the specified time level value of the time-date comprises:
calling three preset desensitization functions, and respectively taking values of three time levels except the specified time level in the th time date as parameters of the three desensitization functions;
respectively carrying out integral operation on the three desensitization functions within a specified interval so as to obtain three output integral values;
combining the three integrated values with the values of the specified time level to th target time.
7. The method of claim 1, wherein the step of extracting numerical values of four time levels, year, month, day and hour, from the second target time vector to form a second target time after desensitization to the second time-date comprises:
receiving data processing instructions, wherein the data processing instructions are used for indicating that time and date are processed;
judging whether the data processing instruction further indicates to process a second time and date;
and if the data processing instruction does not indicate that the second time and date are processed, refusing to process the data.
8, A security desensitizing device based on time-date data, comprising:
a date acquisition unit for acquiring th time date and second time date to be desensitized, wherein the time date is composed of at least four time levels of a grade, a month level, a day level and a time level;
the th time interval calculating unit is used for calling a preset reference time, and calculating a th time interval according to the formula, wherein the th time interval is the < the th time date-the reference time';
an th parameter vector obtaining unit, configured to obtain a th parameter vector corresponding to the th time interval according to a preset correspondence between the time interval and the parameter vector;
an date vector mapping unit, for mapping the date and time into a date vector according to a preset date vector mapping method, wherein the date vector includes four component vectors composed of four time levels of a year level, a month level, a day level and a time level, and the dimension of the parameter vector is the same as that of the date vector;
a designated time level obtaining unit configured to:
Figure FDA0002188567090000041
i is an independent variable, and a grade identifier m is calculated, wherein y is th dateThe vector, yi is the ith component vector in the th date vector, si is the ith component vector in the th parameter vector, and the time level corresponding to the level identifier m is recorded as the designated time level;
an desensitization unit for desensitizing the time date to a th target time according to a preset desensitization interval shifting scheme, wherein the value of the specified time level of the th target time is the same as the value of the specified time level of the th time date;
the offset vector acquisition unit is used for mapping the th target time into the th target time vector according to a preset date vector mapping method, and calculating to obtain an offset vector according to a formula, wherein the offset vector is the th target time vector-the th date vector;
a second date vector mapping unit, configured to map a second time and date into a second date vector according to a preset date vector mapping method, and according to a formula: calculating a second target time vector, namely a second date vector and a compensation vector;
and the second target time acquisition unit is used for extracting numerical values of four time levels of grade, month level, day level and time level from the second target time vector so as to form a second target time after desensitization to the second time and date.
Computer device of , comprising a memory and a processor, the memory storing a computer program, wherein the processor when executing the computer program is configured to carry out the steps of the method of any of claims 1 to 7 as claimed in .
10, computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any of claims 1 to 7, wherein represents a set of instructions for carrying out the method.
CN201910824292.3A 2019-09-02 2019-09-02 Safety desensitization method and device based on time and date data and computer equipment Active CN110737913B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201910824292.3A CN110737913B (en) 2019-09-02 2019-09-02 Safety desensitization method and device based on time and date data and computer equipment
PCT/CN2020/105884 WO2021042918A1 (en) 2019-09-02 2020-07-30 Safe desensitization method and apparatus based on time and date data and computer device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910824292.3A CN110737913B (en) 2019-09-02 2019-09-02 Safety desensitization method and device based on time and date data and computer equipment

Publications (2)

Publication Number Publication Date
CN110737913A true CN110737913A (en) 2020-01-31
CN110737913B CN110737913B (en) 2022-03-18

Family

ID=69267777

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910824292.3A Active CN110737913B (en) 2019-09-02 2019-09-02 Safety desensitization method and device based on time and date data and computer equipment

Country Status (2)

Country Link
CN (1) CN110737913B (en)
WO (1) WO2021042918A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021042918A1 (en) * 2019-09-02 2021-03-11 深圳壹账通智能科技有限公司 Safe desensitization method and apparatus based on time and date data and computer device

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113360942A (en) * 2021-06-15 2021-09-07 广州小鹏智慧充电科技有限公司 Data processing method and device and electronic equipment
CN116545776B (en) * 2023-07-06 2023-10-03 中航金网(北京)电子商务有限公司 Data transmission method, device, computer equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140324327A1 (en) * 2013-04-24 2014-10-30 University Of Washington Through Its Center For Commercialization Methods and systems for providing geotemporal graphs
US20150269291A1 (en) * 2014-03-24 2015-09-24 Kabushiki Kaisha Toshiba Data processing apparatus and data processing program
CN106991337A (en) * 2017-04-06 2017-07-28 北京数聚世界信息技术有限公司 The desensitization method and device of a kind of date of birth data
US9747280B1 (en) * 2013-08-21 2017-08-29 Intelligent Language, LLC Date and time processing
CN109726585A (en) * 2018-12-14 2019-05-07 银江股份有限公司 A kind of integrated data desensitization system and method towards ID card No.

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102790774A (en) * 2012-07-31 2012-11-21 北京江南天安科技有限公司 Method and device capable of allowing internal network to obtain time information
WO2014159609A1 (en) * 2013-03-14 2014-10-02 Allergen Research Corporation Peanut formulations and uses thereof
CN108154044A (en) * 2016-12-05 2018-06-12 广东精点数据科技股份有限公司 A kind of ID card No. desensitization method and device being combined based on random and displacement
CN110188571A (en) * 2019-06-05 2019-08-30 深圳市优网科技有限公司 Desensitization method and system based on sensitive data
CN110737913B (en) * 2019-09-02 2022-03-18 深圳壹账通智能科技有限公司 Safety desensitization method and device based on time and date data and computer equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140324327A1 (en) * 2013-04-24 2014-10-30 University Of Washington Through Its Center For Commercialization Methods and systems for providing geotemporal graphs
US9747280B1 (en) * 2013-08-21 2017-08-29 Intelligent Language, LLC Date and time processing
US20150269291A1 (en) * 2014-03-24 2015-09-24 Kabushiki Kaisha Toshiba Data processing apparatus and data processing program
CN106991337A (en) * 2017-04-06 2017-07-28 北京数聚世界信息技术有限公司 The desensitization method and device of a kind of date of birth data
CN109726585A (en) * 2018-12-14 2019-05-07 银江股份有限公司 A kind of integrated data desensitization system and method towards ID card No.

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021042918A1 (en) * 2019-09-02 2021-03-11 深圳壹账通智能科技有限公司 Safe desensitization method and apparatus based on time and date data and computer device

Also Published As

Publication number Publication date
WO2021042918A1 (en) 2021-03-11
CN110737913B (en) 2022-03-18

Similar Documents

Publication Publication Date Title
CN110737913A (en) Safety desensitization method and device based on time and date data and computer equipment
CN105960775B (en) Method and apparatus for migrating keys
EP3190543A1 (en) Method of dynamically encrypting fingerprint data and related fingerprint sensor
CN110753226B (en) High-capacity ciphertext domain image reversible data hiding method
CN110391906B (en) Data processing method based on block chain, electronic device and readable storage medium
US11025415B2 (en) Cryptographic operation method, method for creating working key, cryptographic service platform, and cryptographic service device
CN105577379A (en) Information processing method and apparatus thereof
CN111628966B (en) Data transmission method, system and device and data authorization method, system and device
CN103870525A (en) Secure search processing system and secure search processing method
CN111404952B (en) Transformer substation data encryption transmission method and device, computer equipment and storage medium
CN107885864A (en) A kind of encryption data querying method, system, device and readable storage medium storing program for executing
CN109462475B (en) Data encryption method, data decryption method and related devices
CN113221184A (en) Internet of things system and device based on block chain network
GB2574458A (en) Methods and Systems For Secure Data Transmission
CN114428784A (en) Data access method and device, computer equipment and storage medium
CN114553499A (en) Image encryption method, image processing method, device, equipment and medium
CN111079153B (en) Security modeling method and device, electronic equipment and storage medium
CN112487444A (en) Database-based data encryption method and device, storage medium and electronic equipment
CN117459327B (en) Cloud data transparent encryption protection method, system and device
US20190394018A1 (en) Ciphertext matching system and ciphertext matching method
CN113946862A (en) Data processing method, device and equipment and readable storage medium
CN112995096B (en) Data encryption and decryption methods, devices and equipment
WO2023065637A1 (en) Data processing method and apparatus, and electronic device and storage medium
CN110853042A (en) Automatic secret-involved vector graph segmentation system and method based on image recognition
CN114465713A (en) Joint data analysis method and device for protecting privacy and storage medium

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