WO2021042918A1 - Safe desensitization method and apparatus based on time and date data and computer device - Google Patents

Safe desensitization method and apparatus based on time and date data and computer device Download PDF

Info

Publication number
WO2021042918A1
WO2021042918A1 PCT/CN2020/105884 CN2020105884W WO2021042918A1 WO 2021042918 A1 WO2021042918 A1 WO 2021042918A1 CN 2020105884 W CN2020105884 W CN 2020105884W WO 2021042918 A1 WO2021042918 A1 WO 2021042918A1
Authority
WO
WIPO (PCT)
Prior art keywords
time
date
vector
desensitization
parameter
Prior art date
Application number
PCT/CN2020/105884
Other languages
French (fr)
Chinese (zh)
Inventor
许超俊
Original Assignee
深圳壹账通智能科技有限公司
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 深圳壹账通智能科技有限公司 filed Critical 深圳壹账通智能科技有限公司
Publication of WO2021042918A1 publication Critical patent/WO2021042918A1/en

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

Definitions

  • This application relates to the field of big data, and in particular to a security desensitization method, device, computer equipment and storage medium based on time and date data.
  • Data desensitization also known as data bleaching, data deprivation, or data deformation
  • Data desensitization refers to data deformation of certain sensitive information through desensitization rules to achieve reliable protection of sensitive and private data.
  • Date data desensitization is often used in the process of data transmission and processing. The general methods used are: 1. Digital mask desensitization, resulting in loss of information value, and data analysis cannot reflect the full value of the data; 2. Fixed replacement, that is, all Replacing the date with a random date, or the date randomly on the same day, will not only cause unreasonable data, but the corrupted original information will also cause great misleading to statistics and analysis. Therefore, the inventor realizes that traditional technologies cannot guarantee the effective use of data when data desensitization is used to achieve reliable protection of sensitive and private data.
  • the main purpose of this application is to provide a security desensitization method, device, computer equipment and storage medium based on time and date data, aiming to improve the effective utilization of time data.
  • this application proposes a security desensitization method based on time and date data, which includes the following steps:
  • first time and date and the second time and date to be desensitized, where the time and date are at least composed of four time levels: grade, month, day, and time;
  • first time interval
  • the first time date is mapped to the first date vector, where the first date vector includes four sub-vectors composed of four time levels: grade, month, day, and time.
  • the dimension of the first parameter vector is the same as the dimension of the first date vector;
  • i is the independent variable
  • the level identification m is obtained by calculation, where y is the first date vector, yi is the i-th sub-vector in the first date vector, and si is the i-th sub-vector in the first parameter vector.
  • the time level corresponding to the level mark m is recorded as the designated time level;
  • the first time and date are desensitized into a first target time, wherein the value of the specified time level of the first target time is equal to the value of the specified time level of the first time and date The same value;
  • the second time date is mapped to the second date vector
  • the four time levels of grade, month, day, and time are extracted from the second target time vector to form a second target time desensitized to the second time and date.
  • This application provides a safety desensitization device based on time and date data, including:
  • the date acquisition unit is used to acquire the first time and date and the second time and date to be desensitized, where the time and date are at least composed of four time levels: grade, month, day, and time;
  • the first parameter vector obtaining unit is configured to obtain the first parameter vector corresponding to the first time interval according to the corresponding relationship between the preset time interval and the parameter vector;
  • the first date vector mapping unit is used to map the first time and date to the first date vector according to the preset date vector mapping method, where the first date vector includes four times of grade, month, day, and time. Four sub-vectors formed by levels, where the dimension of the first parameter vector is the same as the dimension of the first date vector;
  • the first desensitization unit is configured to desensitize the first time and date as a first target time according to a preset desensitization interval conversion scheme, wherein the value of the designated time level of the first target time is the same as the first target time.
  • the value of the designated time level of a time and date is the same;
  • the second target time acquiring unit is used to extract the four time levels of grade, month, day, and time from the second target time vector to form a second time and date desensitized to the second time and date. Target time.
  • the present application provides a computer device including a memory and a processor, the memory storing a computer program, and the steps of implementing a security desensitization method based on time and date data when the processor executes the computer program:
  • first time and date and the second time and date to be desensitized, where the time and date are at least composed of four time levels: grade, month, day, and time;
  • first time interval
  • the first time date is mapped to the first date vector, where the first date vector includes four sub-vectors composed of four time levels: grade, month, day, and time.
  • the dimension of the first parameter vector is the same as the dimension of the first date vector;
  • i is the independent variable
  • the level identification m is obtained by calculation, where y is the first date vector, yi is the i-th sub-vector in the first date vector, and si is the i-th sub-vector in the first parameter vector.
  • the time level corresponding to the level mark m is recorded as the designated time level;
  • the first time and date are desensitized into a first target time, wherein the value of the specified time level of the first target time is equal to the value of the specified time level of the first time and date The same value;
  • the second time date is mapped to the second date vector
  • the four time levels of grade, month, day, and time are extracted from the second target time vector to form a second target time desensitized to the second time and date.
  • This application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of a method for security desensitization based on time and date data are implemented:
  • first time and date and the second time and date to be desensitized, where the time and date are at least composed of four time levels: grade, month, day, and time;
  • first time interval
  • the first time date is mapped to the first date vector, where the first date vector includes four sub-vectors composed of four time levels: grade, month, day, and time.
  • the dimension of the first parameter vector is the same as the dimension of the first date vector;
  • i is the independent variable
  • the level identification m is obtained by calculation, where y is the first date vector, yi is the i-th sub-vector in the first date vector, and si is the i-th sub-vector in the first parameter vector.
  • the time level corresponding to the level mark m is recorded as the designated time level;
  • the first time and date are desensitized into a first target time, wherein the value of the specified time level of the first target time is equal to the value of the specified time level of the first time and date The same value;
  • the second time date is mapped to the second date vector
  • the four time levels of grade, month, day, and time are extracted from the second target time vector to form a second target time desensitized to the second time and date.
  • FIG. 1 is a schematic flowchart of a security desensitization method based on time and date data according to an embodiment of this application;
  • FIG. 2 is a schematic block diagram of the structure of a safety desensitization device based on time and date data according to an embodiment of the application;
  • FIG. 3 is a schematic block diagram of the structure of a computer device according to an embodiment of the application.
  • an embodiment of the present application provides a security desensitization method based on time and date data, including the following steps:
  • first time interval
  • the first time and date are mapped to the first date vector, where the first date vector includes four points composed of four time levels: grade, month, day, and time.
  • Vector where the dimension of the first parameter vector is the same as the dimension of the first date vector;
  • i is the independent variable
  • the level identification m is obtained by calculation, where y is the first date vector, yi is the i-th sub-vector in the first date vector, and si is the i-th sub-vector in the first parameter vector.
  • the time level corresponding to the level mark m is recorded as the designated time level;
  • S6 Desensitize the first time and date to a first target time according to a preset desensitization interval conversion scheme, wherein the value of the specified time level of the first target time is the same as the specified time of the first time and date The values of the levels are the same;
  • the first time and date to be desensitized and the second time and date are acquired, where the time and date are at least composed of four time levels: grade, month, day, and time.
  • this application adopts the method of simultaneously desensitizing the first time and date to be desensitized and the second time and date to be desensitized.
  • the two-time and date desensitization scheme is just the opposite. In this way, the data is distorted for a single data, but when macro data processing (such as average processing) is performed, the data is guaranteed to be available, thereby improving the effective utilization of data.
  • the time and date are, for example, 2010.01.01.01, which means 1 o'clock on January 1, 2010.
  • the reference time can be set earlier than the first time and date, or later than the first time and date.
  • the first parameter vector corresponding to the first time interval is obtained according to the corresponding relationship between the preset time interval and the parameter vector.
  • the correspondence between the preset time interval and the parameter vector may be a one-to-one correspondence or a one-to-many correspondence. If it is a one-to-many correspondence relationship, the accurate first parameter vector is selected from the multiple parameter vectors.
  • the specific process is, for example, according to the corresponding relationship between the preset time interval and the parameter vector, obtaining the corresponding relationship to the first time interval Multiple initial parameter vectors, where the initial parameter vector marks a designated component vector; comparing the values of the designated component vectors in the multiple initial parameter vectors, so as to filter out the initial parameter vector with the largest value of the designated component vector, And it is recorded as the first parameter vector.
  • the first time and date are mapped to the first date vector, where the first date vector includes four time levels: grade, month, day, and time.
  • the four sub-vectors are formed, in which the dimension of the first parameter vector is the same as the dimension of the first date vector.
  • the first date vector may only include four sub-vectors composed of four time levels: grade, month, day, and time level, and may also include other sub-vectors.
  • mapping the first date and time to the first date vector is, for example, generating a first date initial vector according to the first date and time, and the first date initial vector only includes the first date and time.
  • i is the independent variable
  • the level identification m is obtained by calculation, where y is the first date vector, yi is the i-th sub-vector in the first date vector, and si is the i-th sub-vector in the first parameter vector.
  • the time level corresponding to the level identifier m is recorded as the designated time level.
  • arg max represents the value of the corresponding independent variable when the objective function takes the maximum value. Based on this, it can be seen that m represents the largest i value in yi ⁇ si. In this way, the most valuable designated time level in the first date and time to be desensitized is determined. Therefore, in order to ensure the availability of data, the value of the designated time level is retained.
  • the first time and date are desensitized as the first target time according to the preset desensitization interval conversion scheme, wherein the value of the designated time level of the first target time is the same as the first target time.
  • the value of the designated time level of the date and time is the same.
  • the preset desensitization interval conversion scheme can be any scheme, which needs to change the values of other time levels except the specified time level in the first time and date to values different from the original values.
  • the specific process is for example:
  • the designated desensitization parameter According to the corresponding relationship between the time interval and the desensitization parameter, obtain the designated desensitization parameter corresponding to the first time interval; apply the designated desensitization parameter to the preset initial desensitization model to obtain the designated desensitization parameter Sensitive model; input the values of other time levels in the first time and date except the designated time level into the designated desensitization model for calculation, and compare the output value of the designated desensitization model with the designated time
  • the numerical combination of the level is the first target time. Among them, in order to ensure the availability of data, the value of the specified time level is retained.
  • the compensation vector reflects the degree of deviation between the first target time and the first date and time, and is used as a desensitization basis for the second date and time in the follow-up.
  • the four time levels of grade, month, day, and time are extracted from the second target time vector to form a second target time desensitized to the second time and date. .
  • the value of the designated time level of the second target time is also unchanged, so a certain degree of data availability can also be guaranteed.
  • the data can be guaranteed to be available through joint processing during macro data processing, thereby improving data utilization.
  • the step S3 of obtaining the first parameter vector corresponding to the first time interval according to the corresponding relationship between the preset time interval and the parameter vector includes:
  • S301 Acquire a plurality of initial parameter vectors corresponding to the first time interval according to the corresponding relationship between the preset time interval and the parameter vector, wherein the initial parameter vector marks a designated component vector;
  • the first parameter vector corresponding to the first time interval is obtained according to the corresponding relationship between the preset time interval and the parameter vector.
  • This application adopts a one-to-many correspondence between the preset time interval and the parameter vector, and then compares the values of the designated component vectors in a plurality of initial parameter vectors, so as to filter out the value of the designated component vector.
  • the initial parameter vector with the largest value is recorded as the first parameter vector.
  • the parameter vector of the most valuable time level is selected from the multiple initial parameter vectors, so that the subsequent judgment of the specified time level is more accurate and more consistent.
  • S402. According to a preset method for embedding a fractional vector, embed a plurality of fractional vectors in the first date initial vector, so that the number of fractional vectors of the first date initial vector reaches a specified number;
  • S403 Record the initial vector of the first date after the component vector embedding processing is a first date vector.
  • the first time and date are mapped to the first date vector according to the preset date vector mapping method.
  • this application uses the first date initial vector to be generated according to the first time and date; according to the preset method of embedding the component vectors, a plurality of data are embedded in the first date initial vector.
  • Sub-vector; the first date initial vector after the sub-vector embedding process is recorded as the first date vector, so that there is a disguised sub-vector in the first date vector, so that information can be kept confidential even when the information is leaked Effect.
  • the preset sub-vector embedding method can be any sub-vector embedding method. It is only necessary to keep the four sub-vectors composed of the four time levels of the first time and date: grade, month, day, and time. Yes, for example, the component vectors can be embedded before, between, and after the four component vectors.
  • the first time and date are desensitized as a first target time according to a preset desensitization interval conversion scheme, wherein the value of the designated time level of the first target time is the same as the first target time.
  • the step S6 where the value of the designated time level of a time and date is the same, includes:
  • S601 Acquire a designated desensitization parameter corresponding to the first time interval according to the correspondence between the time interval and the desensitization parameter;
  • the first time and date are desensitized as the first target time according to the preset desensitization interval conversion scheme.
  • the desensitization parameter is used in the desensitization model, so that the desensitization model can output an exact value according to the input value.
  • the desensitization model is an arbitrary model, for example, three exact desensitization functions corresponding to three different time levels, and the specified desensitization parameters are applied to the preset initial desensitization model to obtain the designated desensitization function.
  • Sensitivity model is the process of applying desensitization parameters to the desensitization function to obtain the exact desensitization function.
  • the values of other time levels except the designated time level in the first time and date into the designated desensitization model for calculation, the values of three different time levels after desensitization can be obtained. Combined with the original value of the specified time level, the first target time can be obtained.
  • the desensitization parameter is encrypted as a ciphertext
  • the step S601 of obtaining a designated desensitization parameter corresponding to the first time interval according to the correspondence between the time interval and the desensitization parameter include:
  • S6012 uses the preset AES128 algorithm to decrypt the ciphertext of the designated desensitization parameter into plaintext.
  • the designated desensitization parameter corresponding to the first time interval is obtained according to the correspondence between the time interval and the desensitization parameter.
  • this application adopts the method in which the desensitization parameter is encrypted into ciphertext, and according to the correspondence between the time interval and the ciphertext of the desensitization parameter, Obtain the ciphertext of the designated desensitization parameter corresponding to the first time interval; use the preset AES128 algorithm to decrypt the ciphertext of the designated desensitization parameter into plaintext according to the preset key, so that the desensitization parameter Sensitive parameters are more secure.
  • the AES128 algorithm refers to an advanced encryption standard algorithm with a key length of 128 bits. It is a symmetric encryption algorithm that can effectively improve data security.
  • the first time and date are desensitized as a first target time according to a preset desensitization interval conversion scheme, wherein the value of the designated time level of the first target time is the same as the first target time.
  • the step S6 where the value of the designated time level of a time and date is the same, includes:
  • S612 Perform integration operations on the three desensitization functions in a specified interval respectively, so as to obtain three output integral values;
  • the first time and date are desensitized as the first target time according to the preset desensitization interval conversion scheme.
  • three preset desensitization functions are called, and the values of the three time levels other than the specified time level in the first time and date are respectively used as the parameters of the three desensitization functions;
  • the three desensitization functions perform integral operations within a specified interval to obtain three output integral values; the three integral values and the numerical value of the specified time level are combined into the first target time, and the The first time and date desensitization is the first target time.
  • the values of the three time levels in the first time and date other than the specified time level are not used as the input value of the function (that is, independent of the independent variable), but as the parameters of the function to determine the specific function Perform integration again to obtain the only three integral values, and finally achieve the purpose of data desensitization, and because the desensitization method used is different from the traditional technology, the security of the data is further ensured.
  • the four time levels of grade, month, day, and time level are extracted from the second target time vector to form a second target desensitized to the second time and date After step S9 of time, include:
  • This application adopts a method in which the first time and date and the second time and date form associated data, so as to improve the utilization rate of data.
  • the data processing instruction only involves the first time and date, the result of the data processing will be distorted, and the final credibility of the data processing result cannot be guaranteed, so data processing is rejected accordingly.
  • it while refusing to perform data processing, it generates suggestion information suggesting that data processing be performed on the first time and date and the second time and date at the same time.
  • an embodiment of the present application provides a safety desensitization device based on time and date data, including:
  • the date acquisition unit 10 is used to acquire the first time and date and the second time and date to be desensitized, where the time and date are at least composed of four time levels: grade, month, day, and time;
  • the first parameter vector obtaining unit 30 is configured to obtain the first parameter vector corresponding to the first time interval according to the corresponding relationship between the preset time interval and the parameter vector;
  • the first date vector mapping unit 40 is configured to map the first time and date to the first date vector according to the preset date vector mapping method, where the first date vector includes four types: grade, month, day, and time.
  • the designated time level acquisition unit 50 is used according to the formula: i is the independent variable, and the level identification m is obtained by calculation, where y is the first date vector, yi is the i-th sub-vector in the first date vector, and si is the i-th sub-vector in the first parameter vector.
  • the time level corresponding to the level mark m is recorded as the designated time level;
  • the first desensitization unit 60 is configured to desensitize the first time and date into a first target time according to a preset desensitization interval conversion scheme, wherein the value of the designated time level of the first target time is the same as the value of the first target time.
  • the value of the specified time level of the first time and date is the same;
  • the second target time acquiring unit 90 is used to extract the four time levels of grade, month, day, and time from the second target time vector, so as to form the desensitized second time and date. 2. Target time.
  • the first parameter vector obtaining unit 30 includes:
  • Multiple initial parameter vector acquiring subunits configured to acquire multiple initial parameter vectors corresponding to the first time interval according to the corresponding relationship between the preset time interval and the parameter vector, wherein the initial parameter vector marks the designated component vector;
  • the screening subunit is used to compare the numerical values of the designated component vectors among the multiple initial parameter vectors, so as to filter out the initial parameter vector with the largest numerical value of the designated component vectors, and record it as the first parameter vector.
  • the first date initial vector generating subunit is configured to generate a first date initial vector according to the first date and time, and the first date initial vector only includes the grade, month, day, and date of the first date and time.
  • Four sub-vectors composed of four time levels of time level;
  • the component vector embedding subunit is configured to embed multiple component vectors in the first date initial vector according to a preset component vector embedding method, so that the number of component vectors of the first date initial vector reaches a specified number;
  • the first date vector marking subunit is used to record the first date initial vector after the component vector embedding process as the first date vector.
  • the first desensitization unit 60 includes:
  • the designated desensitization parameter acquisition subunit is configured to acquire the designated desensitization parameter corresponding to the first time interval according to the corresponding relationship between the time interval and the desensitization parameter;
  • the designated desensitization model acquisition subunit is used to apply the designated desensitization parameters to a preset initial desensitization model to obtain a designated desensitization model;
  • the first target time obtaining subunit is used to input the numerical values of the first time and date other than the designated time level into the designated desensitization model for calculation, and calculate the value of the designated desensitization model The output value and the numerical value of the specified time level are combined to form the first target time.
  • the desensitization parameter is encrypted into ciphertext, and the designated desensitization parameter acquisition subunit includes:
  • the ciphertext acquisition module is configured to acquire the ciphertext of the designated desensitization parameter corresponding to the first time interval according to the correspondence between the time interval and the ciphertext of the desensitization parameter;
  • the decryption module is used to decrypt the ciphertext of the designated desensitization parameter into plaintext by using the preset AES128 algorithm according to the preset key.
  • the first desensitization unit 60 includes:
  • the desensitization function call subunit is used to call the three preset desensitization functions, and use the values of the three time levels except the designated time level in the first time and date as three desensitization functions.
  • the parameters of the sensitive function are used to call the three preset desensitization functions, and use the values of the three time levels except the designated time level in the first time and date as three desensitization functions.
  • the integral operation sub-unit is used to perform integral operation on the three desensitization functions in the specified interval to obtain the output three integral values;
  • the combination subunit is used to combine the three integral values and the numerical value of the specified time level into a first target time.
  • the device includes:
  • a data processing instruction unit for receiving a data processing instruction, where the data processing instruction is used to instruct to process the first time and date;
  • a processing judging unit configured to judge whether the data processing instruction also instructs to process the second time and date
  • the rejection unit is configured to reject data processing if the data processing instruction does not instruct to process the second time and date.
  • an embodiment of the present invention also provides a computer device.
  • the computer device may be a server, and its internal structure may be as shown in the figure.
  • the computer equipment includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor designed by the computer is used to provide calculation and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system, a computer program, and a database.
  • the memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium.
  • the database of the computer equipment is used to store the data used in the security desensitization method based on time and date data.
  • the network interface of the computer device is used to communicate with an external terminal through a network connection.
  • the computer program is executed by the processor to realize a safe desensitization method based on time and date data:
  • first time and date and the second time and date to be desensitized, where the time and date are at least composed of four time levels: grade, month, day, and time;
  • first time interval
  • the first time date is mapped to the first date vector, where the first date vector includes four sub-vectors composed of four time levels: grade, month, day, and time.
  • the dimension of the first parameter vector is the same as the dimension of the first date vector;
  • i is the independent variable
  • the level identification m is obtained by calculation, where y is the first date vector, yi is the i-th sub-vector in the first date vector, and si is the i-th sub-vector in the first parameter vector.
  • the time level corresponding to the level mark m is recorded as the designated time level;
  • the first time and date are desensitized into a first target time, wherein the value of the specified time level of the first target time is equal to the value of the specified time level of the first time and date The same value;
  • the second time date is mapped to the second date vector
  • the four time levels of grade, month, day, and time are extracted from the second target time vector to form a second target time desensitized to the second time and date.
  • the above-mentioned processor executes the above-mentioned security desensitization method based on time and date data, wherein the steps included in the method respectively correspond to the steps of executing the security desensitization method based on time and date data of the foregoing embodiment, and will not be repeated here.
  • An embodiment of the present application also provides a computer-readable storage medium.
  • the above-mentioned storage medium may be a volatile storage medium or a non-volatile storage medium, on which a computer program is stored, which is implemented when the computer program is executed by a processor.
  • first time and date and the second time and date to be desensitized, where the time and date are at least composed of four time levels: grade, month, day, and time;
  • first time interval
  • the first time date is mapped to the first date vector, where the first date vector includes four sub-vectors composed of four time levels: grade, month, day, and time.
  • the dimension of the first parameter vector is the same as the dimension of the first date vector;
  • i is the independent variable
  • the level identification m is obtained by calculation, where y is the first date vector, yi is the i-th sub-vector in the first date vector, and si is the i-th sub-vector in the first parameter vector.
  • the time level corresponding to the level mark m is recorded as the designated time level;
  • the first time and date are desensitized into a first target time, wherein the value of the specified time level of the first target time is equal to the value of the specified time level of the first time and date The same value;
  • the second time date is mapped to the second date vector
  • the four time levels of grade, month, day, and time are extracted from the second target time vector to form a second target time desensitized to the second time and date.
  • the steps included in the method respectively correspond to the steps of the security desensitization method based on time and date data of the foregoing implementation manner, which are not repeated here.

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 present application relates to the field of big data. Disclosed are a safe desensitization method and apparatus based on time and date data, a computer device and a storage medium. The method comprises: acquiring a first time and date and a second time and date that are to be desensitized; calling a reference time, and obtaining a first time interval through calculation according to a formula: the first time interval = |first time and date-reference time|; acquiring a first parameter vector; mapping the first time and date into a first date vector; calculating to obtain a level identifier m according to a formula aa, and recording a time level corresponding to the level identifier m as a specified time level; desensitizing the first time and date into a first target time; mapping the first target time into a first target time vector, and performing calculation according to a formula to obtain a compensation vector; mapping the second time and date into a second date vector, and performing calculation to obtain a second target time vector; and forming a second target time after desensitization of the second time and date. Therefore, the utilization rate of data is improved.

Description

基于时间日期数据的安全脱敏方法、装置和计算机设备Safety desensitization method, device and computer equipment based on time and date data
本申请要求于2019年09月02日提交中国专利局、申请号为201910824292.3,发明名称为“基于时间日期数据的安全脱敏方法、装置和计算机设备”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of a Chinese patent application filed with the Chinese Patent Office on September 02, 2019, the application number is 201910824292.3, and the invention title is "Security desensitization method, device and computer equipment based on time and date data", and its entire content Incorporated in this application by reference.
技术领域Technical field
本申请涉及到大数据领域,特别是涉及到一种基于时间日期数据的安全脱敏方法、装置、计算机设备和存储介质。This application relates to the field of big data, and in particular to a security desensitization method, device, computer equipment and storage medium based on time and date data.
背景技术Background technique
数据脱敏,又称为数据漂白、数据去隐私化或数据变形,指对某些敏感信息通过脱敏规则进行数据的变形,实现敏感隐私数据的可靠保护。日期数据脱敏在数据传输和处理的过程中经常使用,一般采用的方法是:1、数位掩码脱敏,造成信息价值缺失,数据分析无法体现数据的全部价值;2、固定替换,即将所有日期替换为随机的日期,或者日期随机为同一天,不仅会产生数据不合理的情况,被破坏的原始信息还对统计和分析造成极大的误导。因此发明人意识到传统技术在采用数据脱敏以实现敏感隐私数据的可靠保护时,无法保证数据的有效利用。Data desensitization, also known as data bleaching, data deprivation, or data deformation, refers to data deformation of certain sensitive information through desensitization rules to achieve reliable protection of sensitive and private data. Date data desensitization is often used in the process of data transmission and processing. The general methods used are: 1. Digital mask desensitization, resulting in loss of information value, and data analysis cannot reflect the full value of the data; 2. Fixed replacement, that is, all Replacing the date with a random date, or the date randomly on the same day, will not only cause unreasonable data, but the corrupted original information will also cause great misleading to statistics and analysis. Therefore, the inventor realizes that traditional technologies cannot guarantee the effective use of data when data desensitization is used to achieve reliable protection of sensitive and private data.
技术问题technical problem
本申请的主要目的为提供一种基于时间日期数据的安全脱敏方法、装置、计算机设备和存储介质,旨在提高时间数据的有效利用率。The main purpose of this application is to provide a security desensitization method, device, computer equipment and storage medium based on time and date data, aiming to improve the effective utilization of time data.
技术解决方案Technical solutions
为了实现上述发明目的,本申请提出一种基于时间日期数据的安全脱敏方法,包括以下步骤:In order to achieve the above-mentioned purpose of the invention, this application proposes a security desensitization method based on time and date data, which includes the following steps:
获取待脱敏的第一时间日期和第二时间日期,其中时间日期至少由年级、月级、日级和时级四种时间级所构成;Obtain the first time and date and the second time and date to be desensitized, where the time and date are at least composed of four time levels: grade, month, day, and time;
调取预设的基准时间,根据公式:第一时间间隔=|第一时间日期-基准时间|,计算得到第一时间间隔;Recall the preset reference time, and calculate the first time interval according to the formula: first time interval=|first time date-reference time|;
根据预设的时间间隔与参数向量的对应关系,获取与第一时间间隔对应的第一参数向量;Obtaining the first parameter vector corresponding to the first time interval according to the corresponding relationship between the preset time interval and the parameter vector;
根据预设的日期向量映射方法,将第一时间日期映射为第一日期向量,其中第一日期向量包括由年级、月级、日级和时级四种时间级所构成的四个分向量,其中第一参数向量的维度与第一日期向量的维度相同;According to the preset date vector mapping method, the first time date is mapped to the first date vector, where the first date vector includes four sub-vectors composed of four time levels: grade, month, day, and time. The dimension of the first parameter vector is the same as the dimension of the first date vector;
根据公式:
Figure PCTCN2020105884-appb-000001
i为自变量,计算得到级别标识m,其中y为第一日期向量,yi为第一日期向量中的第i个分向量,si为第一参数向量中的第i个分向量,并将所述级别标识m对应的时间级记为指定时间级;
According to the formula:
Figure PCTCN2020105884-appb-000001
i is the independent variable, and the level identification m is obtained by calculation, where y is the first date vector, yi is the i-th sub-vector in the first date vector, and si is the i-th sub-vector in the first parameter vector. The time level corresponding to the level mark m is recorded as the designated time level;
根据预设的脱敏间隔变换方案,将所述第一时间日期脱敏为第一目标时间,其中所述第一目标时间的指定时间级的数值与所述第一时间日期的指定时间级的数值相同;According to a preset desensitization interval conversion scheme, the first time and date are desensitized into a first target time, wherein the value of the specified time level of the first target time is equal to the value of the specified time level of the first time and date The same value;
根据预设的日期向量映射方法,将第一目标时间映射为第一目标时间向量,并根据公式:弥补向量=第一目标时间向量-第一日期向量,计算得到弥补向量;According to the preset date vector mapping method, the first target time is mapped to the first target time vector, and the compensation vector is calculated according to the formula: compensation vector = first target time vector-first date vector;
根据预设的日期向量映射方法,将第二时间日期映射为第二日期向量,并根据公式:第二目标时间向量=第二日期向量-弥补向量,计算得到第二目标时间向量;According to the preset date vector mapping method, the second time date is mapped to the second date vector, and the second target time vector is calculated according to the formula: second target time vector = second date vector-compensation vector;
从所述第二目标时间向量中提取出年级、月级、日级和时级四种时间级的数值,从而组成对第二时间日期脱敏后的第二目标时间。The four time levels of grade, month, day, and time are extracted from the second target time vector to form a second target time desensitized to the second time and date.
本申请提供一种基于时间日期数据的安全脱敏装置,包括:This application provides a safety desensitization device based on time and date data, including:
日期获取单元,用于获取待脱敏的第一时间日期和第二时间日期,其中时间日期至少 由年级、月级、日级和时级四种时间级所构成;The date acquisition unit is used to acquire the first time and date and the second time and date to be desensitized, where the time and date are at least composed of four time levels: grade, month, day, and time;
第一时间间隔计算单元,用于调取预设的基准时间,根据公式:第一时间间隔=|第一时间日期-基准时间|,计算得到第一时间间隔;The first time interval calculation unit is configured to retrieve the preset reference time, and calculate the first time interval according to the formula: first time interval=|first time date-reference time|;
第一参数向量获取单元,用于根据预设的时间间隔与参数向量的对应关系,获取与第一时间间隔对应的第一参数向量;The first parameter vector obtaining unit is configured to obtain the first parameter vector corresponding to the first time interval according to the corresponding relationship between the preset time interval and the parameter vector;
第一日期向量映射单元,用于根据预设的日期向量映射方法,将第一时间日期映射为第一日期向量,其中第一日期向量包括由年级、月级、日级和时级四种时间级所构成的四个分向量,其中第一参数向量的维度与第一日期向量的维度相同;The first date vector mapping unit is used to map the first time and date to the first date vector according to the preset date vector mapping method, where the first date vector includes four times of grade, month, day, and time. Four sub-vectors formed by levels, where the dimension of the first parameter vector is the same as the dimension of the first date vector;
指定时间级获取单元,用于根据公式:
Figure PCTCN2020105884-appb-000002
i为自变量,计算得到级别标识m,其中y为第一日期向量,yi为第一日期向量中的第i个分向量,si为第一参数向量中的第i个分向量,并将所述级别标识m对应的时间级记为指定时间级;
Specify the time level to obtain the unit, which is used according to the formula:
Figure PCTCN2020105884-appb-000002
i is the independent variable, and the level identification m is obtained by calculation, where y is the first date vector, yi is the i-th sub-vector in the first date vector, and si is the i-th sub-vector in the first parameter vector. The time level corresponding to the level mark m is recorded as the designated time level;
第一脱敏单元,用于根据预设的脱敏间隔变换方案,将所述第一时间日期脱敏为第一目标时间,其中所述第一目标时间的指定时间级的数值与所述第一时间日期的指定时间级的数值相同;The first desensitization unit is configured to desensitize the first time and date as a first target time according to a preset desensitization interval conversion scheme, wherein the value of the designated time level of the first target time is the same as the first target time. The value of the designated time level of a time and date is the same;
弥补向量获取单元,用于根据预设的日期向量映射方法,将第一目标时间映射为第一目标时间向量,并根据公式:弥补向量=第一目标时间向量-第一日期向量,计算得到弥补向量;The compensation vector acquisition unit is used to map the first target time to the first target time vector according to the preset date vector mapping method, and calculate the compensation according to the formula: compensation vector = first target time vector-first date vector vector;
第二日期向量映射单元,用于根据预设的日期向量映射方法,将第二时间日期映射为第二日期向量,并根据公式:第二目标时间向量=第二日期向量-弥补向量,计算得到第二目标时间向量;The second date vector mapping unit is used to map the second time and date to the second date vector according to the preset date vector mapping method, and calculate according to the formula: second target time vector = second date vector-compensation vector Second target time vector;
第二目标时间获取单元,用于从所述第二目标时间向量中提取出年级、月级、日级和时级四种时间级的数值,从而组成对第二时间日期脱敏后的第二目标时间。The second target time acquiring unit is used to extract the four time levels of grade, month, day, and time from the second target time vector to form a second time and date desensitized to the second time and date. Target time.
本申请提供一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现一种基于时间日期数据的安全脱敏方法的步骤:The present application provides a computer device including a memory and a processor, the memory storing a computer program, and the steps of implementing a security desensitization method based on time and date data when the processor executes the computer program:
获取待脱敏的第一时间日期和第二时间日期,其中时间日期至少由年级、月级、日级和时级四种时间级所构成;Obtain the first time and date and the second time and date to be desensitized, where the time and date are at least composed of four time levels: grade, month, day, and time;
调取预设的基准时间,根据公式:第一时间间隔=|第一时间日期-基准时间|,计算得到第一时间间隔;Recall the preset reference time, and calculate the first time interval according to the formula: first time interval=|first time date-reference time|;
根据预设的时间间隔与参数向量的对应关系,获取与第一时间间隔对应的第一参数向量;Obtaining the first parameter vector corresponding to the first time interval according to the corresponding relationship between the preset time interval and the parameter vector;
根据预设的日期向量映射方法,将第一时间日期映射为第一日期向量,其中第一日期向量包括由年级、月级、日级和时级四种时间级所构成的四个分向量,其中第一参数向量的维度与第一日期向量的维度相同;According to the preset date vector mapping method, the first time date is mapped to the first date vector, where the first date vector includes four sub-vectors composed of four time levels: grade, month, day, and time. The dimension of the first parameter vector is the same as the dimension of the first date vector;
根据公式:
Figure PCTCN2020105884-appb-000003
i为自变量,计算得到级别标识m,其中y为第一日期向量,yi为第一日期向量中的第i个分向量,si为第一参数向量中的第i个分向量,并将所述级别标识m对应的时间级记为指定时间级;
According to the formula:
Figure PCTCN2020105884-appb-000003
i is the independent variable, and the level identification m is obtained by calculation, where y is the first date vector, yi is the i-th sub-vector in the first date vector, and si is the i-th sub-vector in the first parameter vector. The time level corresponding to the level mark m is recorded as the designated time level;
根据预设的脱敏间隔变换方案,将所述第一时间日期脱敏为第一目标时间,其中所述第一目标时间的指定时间级的数值与所述第一时间日期的指定时间级的数值相同;According to a preset desensitization interval conversion scheme, the first time and date are desensitized into a first target time, wherein the value of the specified time level of the first target time is equal to the value of the specified time level of the first time and date The same value;
根据预设的日期向量映射方法,将第一目标时间映射为第一目标时间向量,并根据公式:弥补向量=第一目标时间向量-第一日期向量,计算得到弥补向量;According to the preset date vector mapping method, the first target time is mapped to the first target time vector, and the compensation vector is calculated according to the formula: compensation vector = first target time vector-first date vector;
根据预设的日期向量映射方法,将第二时间日期映射为第二日期向量,并根据公式:第二目标时间向量=第二日期向量-弥补向量,计算得到第二目标时间向量;According to the preset date vector mapping method, the second time date is mapped to the second date vector, and the second target time vector is calculated according to the formula: second target time vector = second date vector-compensation vector;
从所述第二目标时间向量中提取出年级、月级、日级和时级四种时间级的数值,从而组成对第二时间日期脱敏后的第二目标时间。The four time levels of grade, month, day, and time are extracted from the second target time vector to form a second target time desensitized to the second time and date.
本申请提供一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现一种基于时间日期数据的安全脱敏方法的步骤:This application provides a computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, the steps of a method for security desensitization based on time and date data are implemented:
获取待脱敏的第一时间日期和第二时间日期,其中时间日期至少由年级、月级、日级和时级四种时间级所构成;Obtain the first time and date and the second time and date to be desensitized, where the time and date are at least composed of four time levels: grade, month, day, and time;
调取预设的基准时间,根据公式:第一时间间隔=|第一时间日期-基准时间|,计算得到第一时间间隔;Recall the preset reference time, and calculate the first time interval according to the formula: first time interval=|first time date-reference time|;
根据预设的时间间隔与参数向量的对应关系,获取与第一时间间隔对应的第一参数向量;Obtaining the first parameter vector corresponding to the first time interval according to the corresponding relationship between the preset time interval and the parameter vector;
根据预设的日期向量映射方法,将第一时间日期映射为第一日期向量,其中第一日期向量包括由年级、月级、日级和时级四种时间级所构成的四个分向量,其中第一参数向量的维度与第一日期向量的维度相同;According to the preset date vector mapping method, the first time date is mapped to the first date vector, where the first date vector includes four sub-vectors composed of four time levels: grade, month, day, and time. The dimension of the first parameter vector is the same as the dimension of the first date vector;
根据公式:
Figure PCTCN2020105884-appb-000004
i为自变量,计算得到级别标识m,其中y为第一日期向量,yi为第一日期向量中的第i个分向量,si为第一参数向量中的第i个分向量,并将所述级别标识m对应的时间级记为指定时间级;
According to the formula:
Figure PCTCN2020105884-appb-000004
i is the independent variable, and the level identification m is obtained by calculation, where y is the first date vector, yi is the i-th sub-vector in the first date vector, and si is the i-th sub-vector in the first parameter vector. The time level corresponding to the level mark m is recorded as the designated time level;
根据预设的脱敏间隔变换方案,将所述第一时间日期脱敏为第一目标时间,其中所述第一目标时间的指定时间级的数值与所述第一时间日期的指定时间级的数值相同;According to a preset desensitization interval conversion scheme, the first time and date are desensitized into a first target time, wherein the value of the specified time level of the first target time is equal to the value of the specified time level of the first time and date The same value;
根据预设的日期向量映射方法,将第一目标时间映射为第一目标时间向量,并根据公式:弥补向量=第一目标时间向量-第一日期向量,计算得到弥补向量;According to the preset date vector mapping method, the first target time is mapped to the first target time vector, and the compensation vector is calculated according to the formula: compensation vector = first target time vector-first date vector;
根据预设的日期向量映射方法,将第二时间日期映射为第二日期向量,并根据公式:第二目标时间向量=第二日期向量-弥补向量,计算得到第二目标时间向量;According to the preset date vector mapping method, the second time date is mapped to the second date vector, and the second target time vector is calculated according to the formula: second target time vector = second date vector-compensation vector;
从所述第二目标时间向量中提取出年级、月级、日级和时级四种时间级的数值,从而组成对第二时间日期脱敏后的第二目标时间。The four time levels of grade, month, day, and time are extracted from the second target time vector to form a second target time desensitized to the second time and date.
有益效果Beneficial effect
本申请的基于时间日期数据的安全脱敏方法、装置、计算机设备和存储介质,获取待脱敏的第一时间日期和第二时间日期;根据公式:第一时间间隔=|第一时间日期-基准时间|,计算得到第一时间间隔;获取与第一时间间隔对应的第一参数向量;将第一时间日期映射为第一日期向量;根据公式:
Figure PCTCN2020105884-appb-000005
i为自变量,计算得到级别标识m,并将所述级别标识m对应的时间级记为指定时间级;将所述第一时间日期脱敏为第一目标时间;根据公式:弥补向量=第一目标时间向量-第一日期向量,计算得到弥补向量;根据公式:第二目标时间向量=第二日期向量-弥补向量,计算得到第二目标时间向量;从所述第二目标时间向量中提取出年级、月级、日级和时级四种时间级的数值,从而组成对第二时间日期脱敏后的第二目标时间,从而提高了时间数据的利用率。
The security desensitization method, device, computer equipment, and storage medium based on time and date data of the present application acquire the first time and date to be desensitized and the second time and date; according to the formula: first time interval=|first time and date- Base time|, the first time interval is calculated; the first parameter vector corresponding to the first time interval is obtained; the first time and date are mapped to the first date vector; according to the formula:
Figure PCTCN2020105884-appb-000005
i is an independent variable, the level identifier m is calculated, and the time level corresponding to the level identifier m is recorded as the designated time level; the first time and date are desensitized as the first target time; according to the formula: compensation vector=th A target time vector-the first date vector, the compensation vector is obtained by calculation; according to the formula: the second target time vector = the second date vector-the compensation vector, the second target time vector is calculated; extracted from the second target time vector The four time levels of grade, month, day, and time level are output to form a second target time desensitized to the second time and date, thereby improving the utilization of time data.
附图说明Description of the drawings
图1为本申请一实施例的基于时间日期数据的安全脱敏方法的流程示意图;FIG. 1 is a schematic flowchart of a security desensitization method based on time and date data according to an embodiment of this application;
图2为本申请一实施例的基于时间日期数据的安全脱敏装置的结构示意框图;2 is a schematic block diagram of the structure of a safety desensitization device based on time and date data according to an embodiment of the application;
图3为本申请一实施例的计算机设备的结构示意框图。FIG. 3 is a schematic block diagram of the structure of a computer device according to an embodiment of the application.
本发明的最佳实施方式The best mode of the present invention
参照图1,本申请实施例提供一种基于时间日期数据的安全脱敏方法,包括以下步骤:1, an embodiment of the present application provides a security desensitization method based on time and date data, including the following steps:
S1、获取待脱敏的第一时间日期和第二时间日期,其中时间日期至少由年级、月级、日级和时级四种时间级所构成;S1. Obtain the first time and date and the second time and date to be desensitized, where the time and date are at least composed of four time levels: grade, month, day, and time;
S2、调取预设的基准时间,根据公式:第一时间间隔=|第一时间日期-基准时间|,计算得到第一时间间隔;S2. Recall the preset reference time, and calculate the first time interval according to the formula: first time interval=|first time date-reference time|;
S3、根据预设的时间间隔与参数向量的对应关系,获取与第一时间间隔对应的第一参 数向量;S3. Obtain the first parameter vector corresponding to the first time interval according to the corresponding relationship between the preset time interval and the parameter vector;
S4、根据预设的日期向量映射方法,将第一时间日期映射为第一日期向量,其中第一日期向量包括由年级、月级、日级和时级四种时间级所构成的四个分向量,其中第一参数向量的维度与第一日期向量的维度相同;S4. According to the preset date vector mapping method, the first time and date are mapped to the first date vector, where the first date vector includes four points composed of four time levels: grade, month, day, and time. Vector, where the dimension of the first parameter vector is the same as the dimension of the first date vector;
S5、根据公式:
Figure PCTCN2020105884-appb-000006
i为自变量,计算得到级别标识m,其中y为第一日期向量,yi为第一日期向量中的第i个分向量,si为第一参数向量中的第i个分向量,并将所述级别标识m对应的时间级记为指定时间级;
S5. According to the formula:
Figure PCTCN2020105884-appb-000006
i is the independent variable, and the level identification m is obtained by calculation, where y is the first date vector, yi is the i-th sub-vector in the first date vector, and si is the i-th sub-vector in the first parameter vector. The time level corresponding to the level mark m is recorded as the designated time level;
S6、根据预设的脱敏间隔变换方案,将所述第一时间日期脱敏为第一目标时间,其中所述第一目标时间的指定时间级的数值与所述第一时间日期的指定时间级的数值相同;S6. Desensitize the first time and date to a first target time according to a preset desensitization interval conversion scheme, wherein the value of the specified time level of the first target time is the same as the specified time of the first time and date The values of the levels are the same;
S7、根据预设的日期向量映射方法,将第一目标时间映射为第一目标时间向量,并根据公式:弥补向量=第一目标时间向量-第一日期向量,计算得到弥补向量;S7. Map the first target time to the first target time vector according to the preset date vector mapping method, and calculate the compensation vector according to the formula: compensation vector=first target time vector-first date vector;
S8、根据预设的日期向量映射方法,将第二时间日期映射为第二日期向量,并根据公式:第二目标时间向量=第二日期向量-弥补向量,计算得到第二目标时间向量;S8. Map the second time and date to the second date vector according to the preset date vector mapping method, and calculate the second target time vector according to the formula: second target time vector = second date vector-compensation vector;
S9、从所述第二目标时间向量中提取出年级、月级、日级和时级四种时间级的数值,从而组成对第二时间日期脱敏后的第二目标时间。S9. Extract the four time levels of grade, month, day, and time from the second target time vector to form a second target time desensitized to the second time and date.
如上述步骤S1所述,获取待脱敏的第一时间日期和第二时间日期,其中时间日期至少由年级、月级、日级和时级四种时间级所构成。为了提高数据的有效利用率,并且减少计算损耗,本申请采用同时对待脱敏的第一时间日期和第二时间日期进行脱敏的方式进行处理,其中第一时间日期进行脱敏的方案与第二时间日期进行脱敏的方案正好相反,这样对单个数据而言数据失真,但是在进行宏观数据处理的时候(例如平均值处理)保证数据可用,从而提高数据的有效利用率。其中,时间日期例如为2010.01.01.01,即表示2010年1月1日1时。As described in step S1 above, the first time and date to be desensitized and the second time and date are acquired, where the time and date are at least composed of four time levels: grade, month, day, and time. In order to improve the effective utilization of data and reduce calculation loss, this application adopts the method of simultaneously desensitizing the first time and date to be desensitized and the second time and date to be desensitized. The two-time and date desensitization scheme is just the opposite. In this way, the data is distorted for a single data, but when macro data processing (such as average processing) is performed, the data is guaranteed to be available, thereby improving the effective utilization of data. Among them, the time and date are, for example, 2010.01.01.01, which means 1 o'clock on January 1, 2010.
如上述步骤S2所述,调取预设的基准时间,根据公式:第一时间间隔=|第一时间日期-基准时间|,计算得到第一时间间隔。其中基准时间可设置为早于第一时间日期,也可以晚于第一时间日期。As described in step S2, the preset reference time is called, and the first time interval is calculated according to the formula: first time interval=|first time date-reference time|. The reference time can be set earlier than the first time and date, or later than the first time and date.
如上述步骤S3所述,根据预设的时间间隔与参数向量的对应关系,获取与第一时间间隔对应的第一参数向量。其中预设的时间间隔与参数向量的对应关系,可以是一对一的对应关系,也可以是一对多的对应关系。若是一对多的对应关系,则从多个参数向量中筛选出准确的第一参数向量,具体过程例如为:根据预设的时间间隔与参数向量的对应关系,获取与第一时间间隔对应的多个初始参数向量,其中所述初始参数向量标记了指定分向量;比较多个初始参数向量中的所述指定分向量的数值,从而筛选出所述指定分向量的数值最大的初始参数向量,并记为第一参数向量。As described in the foregoing step S3, the first parameter vector corresponding to the first time interval is obtained according to the corresponding relationship between the preset time interval and the parameter vector. The correspondence between the preset time interval and the parameter vector may be a one-to-one correspondence or a one-to-many correspondence. If it is a one-to-many correspondence relationship, the accurate first parameter vector is selected from the multiple parameter vectors. The specific process is, for example, according to the corresponding relationship between the preset time interval and the parameter vector, obtaining the corresponding relationship to the first time interval Multiple initial parameter vectors, where the initial parameter vector marks a designated component vector; comparing the values of the designated component vectors in the multiple initial parameter vectors, so as to filter out the initial parameter vector with the largest value of the designated component vector, And it is recorded as the first parameter vector.
如上述步骤S4所述,根据预设的日期向量映射方法,将第一时间日期映射为第一日期向量,其中第一日期向量包括由年级、月级、日级和时级四种时间级所构成的四个分向量,其中第一参数向量的维度与第一日期向量的维度相同。其中第一日期向量可以仅包括由年级、月级、日级和时级四种时间级所构成的四个分向量,也还可以包括其他的分向量。根据预设的日期向量映射方法,将第一时间日期映射为第一日期向量例如为:根据所述第一时间日期生成第一日期初始向量,所述第一日期初始向量仅包括由所述第一时间日期的年级、月级、日级和时级四种时间级所构成的四个分向量;根据预设的分向量嵌入方法,在所述第一日期初始向量中嵌入多个分向量,以使所述第一日期初始向量的分向量的数量达到指定数量;将经过分向量嵌入处理后的所述第一日期初始向量记为第一日期向量。As described in step S4 above, according to the preset date vector mapping method, the first time and date are mapped to the first date vector, where the first date vector includes four time levels: grade, month, day, and time. The four sub-vectors are formed, in which the dimension of the first parameter vector is the same as the dimension of the first date vector. The first date vector may only include four sub-vectors composed of four time levels: grade, month, day, and time level, and may also include other sub-vectors. According to the preset date vector mapping method, mapping the first date and time to the first date vector is, for example, generating a first date initial vector according to the first date and time, and the first date initial vector only includes the first date and time. Four sub-vectors composed of four time levels of grade, month, day, and time of a date and time; according to a preset sub-vector embedding method, embedding multiple sub-vectors in the first date initial vector, In order to make the number of component vectors of the first date initial vector reach a specified number; the first date initial vector after the component vector embedding processing is recorded as the first date vector.
如上述步骤S5所述,根据公式:
Figure PCTCN2020105884-appb-000007
i为自变量,计算得到级别标识m,其中y为第一日期向量,yi为第一日期向量中的第i个分向量,si为第一参数向量中的第i个分向量,并将所述级别标识m对应的时间级记为指定时间级。其中arg max表 示当目标函数取最大值时,对应的自变量的取值。据此可知m代表yi·si中最大的i值。从而确定待脱敏的第一日期时间中最具价值的指定时间级,因此为了保证数据的可用性,将指定时间级的数值保留。
As described in step S5 above, according to the formula:
Figure PCTCN2020105884-appb-000007
i is the independent variable, and the level identification m is obtained by calculation, where y is the first date vector, yi is the i-th sub-vector in the first date vector, and si is the i-th sub-vector in the first parameter vector. The time level corresponding to the level identifier m is recorded as the designated time level. Where arg max represents the value of the corresponding independent variable when the objective function takes the maximum value. Based on this, it can be seen that m represents the largest i value in yi·si. In this way, the most valuable designated time level in the first date and time to be desensitized is determined. Therefore, in order to ensure the availability of data, the value of the designated time level is retained.
如上述步骤S6所述,根据预设的脱敏间隔变换方案,将所述第一时间日期脱敏为第一目标时间,其中所述第一目标时间的指定时间级的数值与所述第一时间日期的指定时间级的数值相同。其中预设的脱敏间隔变换方案可为任意方案,其需要将第一时间日期中的除指定时间级之外的其他时间级的数值变为与原来数值不同的数值。具体过程例如为:As described in step S6 above, the first time and date are desensitized as the first target time according to the preset desensitization interval conversion scheme, wherein the value of the designated time level of the first target time is the same as the first target time. The value of the designated time level of the date and time is the same. The preset desensitization interval conversion scheme can be any scheme, which needs to change the values of other time levels except the specified time level in the first time and date to values different from the original values. The specific process is for example:
根据所述时间间隔与脱敏参数的对应关系,获取与所述第一时间间隔对应的指定脱敏参数;将所述指定脱敏参数应用于预设的初始脱敏模型中,从而得到指定脱敏模型;将所述第一时间日期中除了指定时间级之外的其他时间级的数值输入所述指定脱敏模型中进行计算,并将所述指定脱敏模型的输出值与所述指定时间级的数值组合为第一目标时间。其中,因此为了保证数据的可用性,将指定时间级的数值保留。According to the corresponding relationship between the time interval and the desensitization parameter, obtain the designated desensitization parameter corresponding to the first time interval; apply the designated desensitization parameter to the preset initial desensitization model to obtain the designated desensitization parameter Sensitive model; input the values of other time levels in the first time and date except the designated time level into the designated desensitization model for calculation, and compare the output value of the designated desensitization model with the designated time The numerical combination of the level is the first target time. Among them, in order to ensure the availability of data, the value of the specified time level is retained.
如上述步骤S7所述,根据预设的日期向量映射方法,将第一目标时间映射为第一目标时间向量,并根据公式:弥补向量=第一目标时间向量-第一日期向量,计算得到弥补向量。其中弥补向量反应了第一目标时间与第一日期时间之间的偏离程度,并在后续中作为第二日期时间的脱敏依据。As described in step S7 above, according to the preset date vector mapping method, the first target time is mapped to the first target time vector, and according to the formula: compensation vector = first target time vector-first date vector, the compensation is calculated vector. The compensation vector reflects the degree of deviation between the first target time and the first date and time, and is used as a desensitization basis for the second date and time in the follow-up.
如上述步骤S8所述,根据预设的日期向量映射方法,将第二时间日期映射为第二日期向量,并根据公式:第二目标时间向量=第二日期向量-弥补向量,计算得到第二目标时间向量。为了提高数据的有效利用率,并且减少计算损耗,本申请采用根据公式:第二目标时间向量=第二日期向量-弥补向量,计算得到第二目标时间向量的方式,保证在进行宏观数据处理的时候(例如平均值处理)保证数据可用,从而提高数据的有效利用率。As described in step S8 above, according to the preset date vector mapping method, the second time and date are mapped to the second date vector, and according to the formula: second target time vector=second date vector-compensation vector, the second is calculated Target time vector. In order to improve the effective utilization of data and reduce the calculation loss, this application adopts the method of calculating the second target time vector according to the formula: the second target time vector = the second date vector-the compensation vector, to ensure that the macro data processing is performed Time (such as average processing) to ensure that the data is available, thereby improving the effective utilization of the data.
如上述步骤S9所述,从所述第二目标时间向量中提取出年级、月级、日级和时级四种时间级的数值,从而组成对第二时间日期脱敏后的第二目标时间。其中,第二目标时间的指定时间级的数值也是不变的,因此也可以保证一定程度的数据可用性。并且由于第一日期时间与第二日期时间相关联,在宏观数据处理时可通过共同处理的方式保证数据可用,从而提高数据利用率。As described in step S9 above, the four time levels of grade, month, day, and time are extracted from the second target time vector to form a second target time desensitized to the second time and date. . Among them, the value of the designated time level of the second target time is also unchanged, so a certain degree of data availability can also be guaranteed. And since the first date and time are associated with the second date and time, the data can be guaranteed to be available through joint processing during macro data processing, thereby improving data utilization.
在一个实施方式中,所述根据预设的时间间隔与参数向量的对应关系,获取与第一时间间隔对应的第一参数向量的步骤S3,包括:In one embodiment, the step S3 of obtaining the first parameter vector corresponding to the first time interval according to the corresponding relationship between the preset time interval and the parameter vector includes:
S301、根据预设的时间间隔与参数向量的对应关系,获取与第一时间间隔对应的多个初始参数向量,其中所述初始参数向量标记了指定分向量;S301: Acquire a plurality of initial parameter vectors corresponding to the first time interval according to the corresponding relationship between the preset time interval and the parameter vector, wherein the initial parameter vector marks a designated component vector;
S302、比较多个初始参数向量中的所述指定分向量的数值,从而筛选出所述指定分向量的数值最大的初始参数向量,并记为第一参数向量。S302. Compare the values of the designated component vectors in the plurality of initial parameter vectors, so as to filter out the initial parameter vector with the largest value of the designated component vectors, and record it as the first parameter vector.
如上所述,实现了根据预设的时间间隔与参数向量的对应关系,获取与第一时间间隔对应的第一参数向量。本申请采用预设的时间间隔与参数向量的对应关系为一对多的对应关系的方式,进而比较多个初始参数向量中的所述指定分向量的数值,从而筛选出所述指定分向量的数值最大的初始参数向量,并记为第一参数向量。据此,将多个初始参数向量中筛选出与最具价值的时间级的参数向量,以使后续判断指定时间级时更加准确更加契合。As described above, it is achieved that the first parameter vector corresponding to the first time interval is obtained according to the corresponding relationship between the preset time interval and the parameter vector. This application adopts a one-to-many correspondence between the preset time interval and the parameter vector, and then compares the values of the designated component vectors in a plurality of initial parameter vectors, so as to filter out the value of the designated component vector. The initial parameter vector with the largest value is recorded as the first parameter vector. According to this, the parameter vector of the most valuable time level is selected from the multiple initial parameter vectors, so that the subsequent judgment of the specified time level is more accurate and more consistent.
在一个实施方式中,所述根据预设的日期向量映射方法,将第一时间日期映射为第一日期向量,其中第一日期向量包括由年级、月级、日级和时级四种时间级所构成的四个分向量的步骤S4,包括:In one embodiment, the first date and time are mapped to the first date vector according to the preset date vector mapping method, where the first date vector includes four time levels: grade, month, day, and time. Step S4 of the formed four component vectors includes:
S401、根据所述第一时间日期生成第一日期初始向量,所述第一日期初始向量仅包括由所述第一时间日期的年级、月级、日级和时级四种时间级所构成的四个分向量;S401. Generate a first date initial vector according to the first time and date, where the first date initial vector only includes four time levels consisting of grade, month, day, and time of the first time and date Four component vectors;
S402、根据预设的分向量嵌入方法,在所述第一日期初始向量中嵌入多个分向量,以使所述第一日期初始向量的分向量的数量达到指定数量;S402. According to a preset method for embedding a fractional vector, embed a plurality of fractional vectors in the first date initial vector, so that the number of fractional vectors of the first date initial vector reaches a specified number;
S403、将经过分向量嵌入处理后的所述第一日期初始向量记为第一日期向量。S403: Record the initial vector of the first date after the component vector embedding processing is a first date vector.
如上所述,实现了根据预设的日期向量映射方法,将第一时间日期映射为第一日期向 量。为了在运算过程及运算结果中进一步保密数据,本申请采用根据所述第一时间日期生成第一日期初始向量;根据预设的分向量嵌入方法,在所述第一日期初始向量中嵌入多个分向量;将经过分向量嵌入处理后的所述第一日期初始向量记为第一日期向量的方式,使第一日期向量中存在有伪装分向量,以当信息泄漏时也能起到信息保密的效果。其中预设的分向量嵌入方法可为任意的分向量嵌入方法,只需将所述第一时间日期的年级、月级、日级和时级四种时间级所构成的四个分向量保留即可,例如在四个分向量之前、之间、之后嵌入分向量均可。As mentioned above, it is realized that the first time and date are mapped to the first date vector according to the preset date vector mapping method. In order to further keep the data in the calculation process and calculation results, this application uses the first date initial vector to be generated according to the first time and date; according to the preset method of embedding the component vectors, a plurality of data are embedded in the first date initial vector. Sub-vector; the first date initial vector after the sub-vector embedding process is recorded as the first date vector, so that there is a disguised sub-vector in the first date vector, so that information can be kept confidential even when the information is leaked Effect. The preset sub-vector embedding method can be any sub-vector embedding method. It is only necessary to keep the four sub-vectors composed of the four time levels of the first time and date: grade, month, day, and time. Yes, for example, the component vectors can be embedded before, between, and after the four component vectors.
在一个实施方式中,所述根据预设的脱敏间隔变换方案,将所述第一时间日期脱敏为第一目标时间,其中所述第一目标时间的指定时间级的数值与所述第一时间日期的指定时间级的数值相同的步骤S6,包括:In one embodiment, the first time and date are desensitized as a first target time according to a preset desensitization interval conversion scheme, wherein the value of the designated time level of the first target time is the same as the first target time. The step S6 where the value of the designated time level of a time and date is the same, includes:
S601、根据所述时间间隔与脱敏参数的对应关系,获取与所述第一时间间隔对应的指定脱敏参数;S601: Acquire a designated desensitization parameter corresponding to the first time interval according to the correspondence between the time interval and the desensitization parameter;
S602、将所述指定脱敏参数应用于预设的初始脱敏模型中,从而得到指定脱敏模型;S602. Apply the designated desensitization parameter to a preset initial desensitization model, thereby obtaining a designated desensitization model;
S603、将所述第一时间日期中除了指定时间级之外的其他时间级的数值输入所述指定脱敏模型中进行计算,并将所述指定脱敏模型的输出值与所述指定时间级的数值组合为第一目标时间。S603. Input the values of other time levels except the designated time level in the first time and date into the designated desensitization model for calculation, and compare the output value of the designated desensitization model with the designated time level. The numerical combination of is the first target time.
如上所述,实现了根据预设的脱敏间隔变换方案,将所述第一时间日期脱敏为第一目标时间。其中所述脱敏参数是用于脱敏模型中,以使脱敏模型根据输入值能输出确切的数值。其中脱敏模型为可任意模型,例如为确切的三个脱敏函数,分别对应三个不同的时间级,将所述指定脱敏参数应用于预设的初始脱敏模型中,从而得到指定脱敏模型即是将脱敏参数应用于脱敏函数中,以得到确切的脱敏函数的过程。据此,将所述第一时间日期中除了指定时间级之外的其他时间级的数值输入所述指定脱敏模型中进行计算,即可得到脱敏后的三个不同的时间级的数值,再结合原有的所述指定时间级的数值,即可得到第一目标时间。As described above, it is realized that the first time and date are desensitized as the first target time according to the preset desensitization interval conversion scheme. The desensitization parameter is used in the desensitization model, so that the desensitization model can output an exact value according to the input value. The desensitization model is an arbitrary model, for example, three exact desensitization functions corresponding to three different time levels, and the specified desensitization parameters are applied to the preset initial desensitization model to obtain the designated desensitization function. Sensitivity model is the process of applying desensitization parameters to the desensitization function to obtain the exact desensitization function. Accordingly, by inputting the values of other time levels except the designated time level in the first time and date into the designated desensitization model for calculation, the values of three different time levels after desensitization can be obtained. Combined with the original value of the specified time level, the first target time can be obtained.
在一个实施方式中,所述脱敏参数被加密为密文,所述根据所述时间间隔与脱敏参数的对应关系,获取与所述第一时间间隔对应的指定脱敏参数的步骤S601,包括:In one embodiment, the desensitization parameter is encrypted as a ciphertext, and the step S601 of obtaining a designated desensitization parameter corresponding to the first time interval according to the correspondence between the time interval and the desensitization parameter, include:
S6011、根据所述时间间隔与脱敏参数的密文的对应关系,获取与所述第一时间间隔对应的指定脱敏参数的密文;S6011, according to the corresponding relationship between the time interval and the ciphertext of the desensitization parameter, obtain the ciphertext of the designated desensitization parameter corresponding to the first time interval;
S6012、根据预设的密钥,采用预设的AES128算法,将所述指定脱敏参数的密文解密为明文。S6012, according to the preset key, use the preset AES128 algorithm to decrypt the ciphertext of the designated desensitization parameter into plaintext.
如上所述,实现了根据所述时间间隔与脱敏参数的对应关系,获取与所述第一时间间隔对应的指定脱敏参数。为了进一步的数据保密需要,防止脱敏后的数据被逆向还原,本申请采用所述脱敏参数被加密为密文的方式,并根据所述时间间隔与脱敏参数的密文的对应关系,获取与所述第一时间间隔对应的指定脱敏参数的密文;根据预设的密钥,采用预设的AES128算法,将所述指定脱敏参数的密文解密为明文的方式,使得脱敏参数更加安全。其中,AES128算法是指密钥长度为128位的高级加密标准算法,是一种对称加密算法,能够有效提高数据的安全性。As described above, it is achieved that the designated desensitization parameter corresponding to the first time interval is obtained according to the correspondence between the time interval and the desensitization parameter. In order to further the need for data confidentiality and prevent the desensitized data from being reversely restored, this application adopts the method in which the desensitization parameter is encrypted into ciphertext, and according to the correspondence between the time interval and the ciphertext of the desensitization parameter, Obtain the ciphertext of the designated desensitization parameter corresponding to the first time interval; use the preset AES128 algorithm to decrypt the ciphertext of the designated desensitization parameter into plaintext according to the preset key, so that the desensitization parameter Sensitive parameters are more secure. Among them, the AES128 algorithm refers to an advanced encryption standard algorithm with a key length of 128 bits. It is a symmetric encryption algorithm that can effectively improve data security.
在一个实施方式中,所述根据预设的脱敏间隔变换方案,将所述第一时间日期脱敏为第一目标时间,其中所述第一目标时间的指定时间级的数值与所述第一时间日期的指定时间级的数值相同的步骤S6,包括:In one embodiment, the first time and date are desensitized as a first target time according to a preset desensitization interval conversion scheme, wherein the value of the designated time level of the first target time is the same as the first target time. The step S6 where the value of the designated time level of a time and date is the same, includes:
S611、调取预设的三个脱敏函数,并将所述第一时间日期中除所述指定时间级之外的三个时间级的数值分别作为三个脱敏函数的参数;S611. Invoke three preset desensitization functions, and use values of three time levels other than the designated time level in the first time and date as parameters of the three desensitization functions;
S612、分别对三个脱敏函数进行在指定区间内的积分运算,从而得到输出的三个积分值;S612: Perform integration operations on the three desensitization functions in a specified interval respectively, so as to obtain three output integral values;
S613、将所述三个积分值与所述指定时间级的数值组合为第一目标时间。S613. Combine the three integral values and the numerical value of the specified time level into a first target time.
如上所述,实现了根据预设的脱敏间隔变换方案,将所述第一时间日期脱敏为第一目 标时间。本申请采用调取预设的三个脱敏函数,并将所述第一时间日期中除所述指定时间级之外的三个时间级的数值分别作为三个脱敏函数的参数;分别对三个脱敏函数进行在指定区间内的积分运算,从而得到输出的三个积分值;将所述三个积分值与所述指定时间级的数值组合为第一目标时间的方式,将所述第一时间日期脱敏为第一目标时间。其中,所述第一时间日期中除所述指定时间级之外的三个时间级的数值不作为函数的输入值(即与自变量无关),而是作为函数的参数,以确定具体函数,再进行积分,从而得到唯一的三个积分值,最终达到数据脱敏的目的,并且由于采用的脱敏方式异于传统技术,更进一步保证了数据的安全性。As described above, it is realized that the first time and date are desensitized as the first target time according to the preset desensitization interval conversion scheme. In this application, three preset desensitization functions are called, and the values of the three time levels other than the specified time level in the first time and date are respectively used as the parameters of the three desensitization functions; The three desensitization functions perform integral operations within a specified interval to obtain three output integral values; the three integral values and the numerical value of the specified time level are combined into the first target time, and the The first time and date desensitization is the first target time. Wherein, the values of the three time levels in the first time and date other than the specified time level are not used as the input value of the function (that is, independent of the independent variable), but as the parameters of the function to determine the specific function Perform integration again to obtain the only three integral values, and finally achieve the purpose of data desensitization, and because the desensitization method used is different from the traditional technology, the security of the data is further ensured.
在一个实施方式中,所述从所述第二目标时间向量中提取出年级、月级、日级和时级四种时间级的数值,从而组成对第二时间日期脱敏后的第二目标时间的步骤S9之后,包括:In one embodiment, the four time levels of grade, month, day, and time level are extracted from the second target time vector to form a second target desensitized to the second time and date After step S9 of time, include:
S91、接收数据处理指令,其中数据处理指令用于指示对第一时间日期进行处理;S91. Receive a data processing instruction, where the data processing instruction is used to instruct to process the first time and date;
S92、判断所述数据处理指令是否还指示对第二时间日期进行处理;S92: Determine whether the data processing instruction also instructs to process the second time and date;
S93、若所述数据处理指令未指示对第二时间日期进行处理,则拒绝进行数据处理。S93: If the data processing instruction does not instruct to process the second time and date, refuse to process the data.
如上所述,实现了拒绝进行数据处理。本申请采用的是第一时间日期与第二时间日期组成关联数据的方式,以提高数据的利用率。而当数据处理指令仅涉及第一时间日期时,数据处理的结果会失真,无法保证数据处理结果最后的可信度,据此拒绝进行数据处理。进一步地,在拒绝进行数据处理的同时,生成建议同时对第一时间日期与第二时间日期进行数据处理的建议信息。As described above, the refusal of data processing is realized. This application adopts a method in which the first time and date and the second time and date form associated data, so as to improve the utilization rate of data. When the data processing instruction only involves the first time and date, the result of the data processing will be distorted, and the final credibility of the data processing result cannot be guaranteed, so data processing is rejected accordingly. Further, while refusing to perform data processing, it generates suggestion information suggesting that data processing be performed on the first time and date and the second time and date at the same time.
本申请的基于时间日期数据的安全脱敏方法,获取待脱敏的第一时间日期和第二时间日期;根据公式:第一时间间隔=|第一时间日期-基准时间|,计算得到第一时间间隔;获取与第一时间间隔对应的第一参数向量;将第一时间日期映射为第一日期向量;根据公式:
Figure PCTCN2020105884-appb-000008
i为自变量,计算得到级别标识m,并将所述级别标识m对应的时间级记为指定时间级;将所述第一时间日期脱敏为第一目标时间;根据公式:弥补向量=第一目标时间向量-第一日期向量,计算得到弥补向量;根据公式:第二目标时间向量=第二日期向量-弥补向量,计算得到第二目标时间向量;从所述第二目标时间向量中提取出年级、月级、日级和时级四种时间级的数值,从而组成对第二时间日期脱敏后的第二目标时间,从而提高了时间数据的利用率。
The security desensitization method based on time and date data of the present application obtains the first time and date to be desensitized and the second time and date; according to the formula: first time interval = | first time and date-reference time | Time interval; obtain the first parameter vector corresponding to the first time interval; map the first time and date to the first date vector; according to the formula:
Figure PCTCN2020105884-appb-000008
i is an independent variable, the level identifier m is calculated, and the time level corresponding to the level identifier m is recorded as the designated time level; the first time and date are desensitized as the first target time; according to the formula: compensation vector=th A target time vector-the first date vector, the compensation vector is obtained by calculation; according to the formula: the second target time vector = the second date vector-the compensation vector, the second target time vector is calculated; extracted from the second target time vector The four time levels of grade, month, day, and time level are output to form a second target time desensitized to the second time and date, thereby improving the utilization of time data.
参照图2,本申请实施例提供一种基于时间日期数据的安全脱敏装置,包括:2, an embodiment of the present application provides a safety desensitization device based on time and date data, including:
日期获取单元10,用于获取待脱敏的第一时间日期和第二时间日期,其中时间日期至少由年级、月级、日级和时级四种时间级所构成;The date acquisition unit 10 is used to acquire the first time and date and the second time and date to be desensitized, where the time and date are at least composed of four time levels: grade, month, day, and time;
第一时间间隔计算单元20,用于调取预设的基准时间,根据公式:第一时间间隔=|第一时间日期-基准时间|,计算得到第一时间间隔;The first time interval calculation unit 20 is configured to retrieve a preset reference time, and calculate the first time interval according to the formula: first time interval=|first time date-reference time|;
第一参数向量获取单元30,用于根据预设的时间间隔与参数向量的对应关系,获取与第一时间间隔对应的第一参数向量;The first parameter vector obtaining unit 30 is configured to obtain the first parameter vector corresponding to the first time interval according to the corresponding relationship between the preset time interval and the parameter vector;
第一日期向量映射单元40,用于根据预设的日期向量映射方法,将第一时间日期映射为第一日期向量,其中第一日期向量包括由年级、月级、日级和时级四种时间级所构成的四个分向量,其中第一参数向量的维度与第一日期向量的维度相同;The first date vector mapping unit 40 is configured to map the first time and date to the first date vector according to the preset date vector mapping method, where the first date vector includes four types: grade, month, day, and time. The four sub-vectors formed by the time level, in which the dimension of the first parameter vector is the same as the dimension of the first date vector;
指定时间级获取单元50,用于根据公式:
Figure PCTCN2020105884-appb-000009
i为自变量,计算得到级别标识m,其中y为第一日期向量,yi为第一日期向量中的第i个分向量,si为第一参数向量中的第i个分向量,并将所述级别标识m对应的时间级记为指定时间级;
The designated time level acquisition unit 50 is used according to the formula:
Figure PCTCN2020105884-appb-000009
i is the independent variable, and the level identification m is obtained by calculation, where y is the first date vector, yi is the i-th sub-vector in the first date vector, and si is the i-th sub-vector in the first parameter vector. The time level corresponding to the level mark m is recorded as the designated time level;
第一脱敏单元60,用于根据预设的脱敏间隔变换方案,将所述第一时间日期脱敏为第一目标时间,其中所述第一目标时间的指定时间级的数值与所述第一时间日期的指定时间级的数值相同;The first desensitization unit 60 is configured to desensitize the first time and date into a first target time according to a preset desensitization interval conversion scheme, wherein the value of the designated time level of the first target time is the same as the value of the first target time. The value of the specified time level of the first time and date is the same;
弥补向量获取单元70,用于根据预设的日期向量映射方法,将第一目标时间映射为第 一目标时间向量,并根据公式:弥补向量=第一目标时间向量-第一日期向量,计算得到弥补向量;The compensation vector obtaining unit 70 is configured to map the first target time to the first target time vector according to the preset date vector mapping method, and calculate according to the formula: compensation vector=first target time vector-first date vector Make up vector
第二日期向量映射单元80,用于根据预设的日期向量映射方法,将第二时间日期映射为第二日期向量,并根据公式:第二目标时间向量=第二日期向量-弥补向量,计算得到第二目标时间向量;The second date vector mapping unit 80 is configured to map the second time and date to the second date vector according to the preset date vector mapping method, and calculate according to the formula: second target time vector=second date vector-compensation vector Get the second target time vector;
第二目标时间获取单元90,用于从所述第二目标时间向量中提取出年级、月级、日级和时级四种时间级的数值,从而组成对第二时间日期脱敏后的第二目标时间。The second target time acquiring unit 90 is used to extract the four time levels of grade, month, day, and time from the second target time vector, so as to form the desensitized second time and date. 2. Target time.
在一个实施方式中,所述第一参数向量获取单元30,包括:In one embodiment, the first parameter vector obtaining unit 30 includes:
多个初始参数向量获取子单元,用于根据预设的时间间隔与参数向量的对应关系,获取与第一时间间隔对应的多个初始参数向量,其中所述初始参数向量标记了指定分向量;Multiple initial parameter vector acquiring subunits, configured to acquire multiple initial parameter vectors corresponding to the first time interval according to the corresponding relationship between the preset time interval and the parameter vector, wherein the initial parameter vector marks the designated component vector;
筛选子单元,用于比较多个初始参数向量中的所述指定分向量的数值,从而筛选出所述指定分向量的数值最大的初始参数向量,并记为第一参数向量。The screening subunit is used to compare the numerical values of the designated component vectors among the multiple initial parameter vectors, so as to filter out the initial parameter vector with the largest numerical value of the designated component vectors, and record it as the first parameter vector.
在一个实施方式中,所述第一日期向量映射单元40,包括:In one embodiment, the first date vector mapping unit 40 includes:
第一日期初始向量生成子单元,用于根据所述第一时间日期生成第一日期初始向量,所述第一日期初始向量仅包括由所述第一时间日期的年级、月级、日级和时级四种时间级所构成的四个分向量;The first date initial vector generating subunit is configured to generate a first date initial vector according to the first date and time, and the first date initial vector only includes the grade, month, day, and date of the first date and time. Four sub-vectors composed of four time levels of time level;
分向量嵌入子单元,用于根据预设的分向量嵌入方法,在所述第一日期初始向量中嵌入多个分向量,以使所述第一日期初始向量的分向量的数量达到指定数量;The component vector embedding subunit is configured to embed multiple component vectors in the first date initial vector according to a preset component vector embedding method, so that the number of component vectors of the first date initial vector reaches a specified number;
第一日期向量标记子单元,用于将经过分向量嵌入处理后的所述第一日期初始向量记为第一日期向量。The first date vector marking subunit is used to record the first date initial vector after the component vector embedding process as the first date vector.
在一个实施方式中,所述第一脱敏单元60,包括:In one embodiment, the first desensitization unit 60 includes:
指定脱敏参数获取子单元,用于根据所述时间间隔与脱敏参数的对应关系,获取与所述第一时间间隔对应的指定脱敏参数;The designated desensitization parameter acquisition subunit is configured to acquire the designated desensitization parameter corresponding to the first time interval according to the corresponding relationship between the time interval and the desensitization parameter;
指定脱敏模型获取子单元,用于将所述指定脱敏参数应用于预设的初始脱敏模型中,从而得到指定脱敏模型;The designated desensitization model acquisition subunit is used to apply the designated desensitization parameters to a preset initial desensitization model to obtain a designated desensitization model;
第一目标时间获取子单元,用于将所述第一时间日期中除了指定时间级之外的其他时间级的数值输入所述指定脱敏模型中进行计算,并将所述指定脱敏模型的输出值与所述指定时间级的数值组合为第一目标时间。The first target time obtaining subunit is used to input the numerical values of the first time and date other than the designated time level into the designated desensitization model for calculation, and calculate the value of the designated desensitization model The output value and the numerical value of the specified time level are combined to form the first target time.
在一个实施方式中,所述脱敏参数被加密为密文,所述指定脱敏参数获取子单元,包括:In one embodiment, the desensitization parameter is encrypted into ciphertext, and the designated desensitization parameter acquisition subunit includes:
密文获取模块,用于根据所述时间间隔与脱敏参数的密文的对应关系,获取与所述第一时间间隔对应的指定脱敏参数的密文;The ciphertext acquisition module is configured to acquire the ciphertext of the designated desensitization parameter corresponding to the first time interval according to the correspondence between the time interval and the ciphertext of the desensitization parameter;
解密模块,用于根据预设的密钥,采用预设的AES128算法,将所述指定脱敏参数的密文解密为明文。The decryption module is used to decrypt the ciphertext of the designated desensitization parameter into plaintext by using the preset AES128 algorithm according to the preset key.
在一个实施方式中,所述第一脱敏单元60,包括:In one embodiment, the first desensitization unit 60 includes:
脱敏函数调取子单元,用于调取预设的三个脱敏函数,并将所述第一时间日期中除所述指定时间级之外的三个时间级的数值分别作为三个脱敏函数的参数;The desensitization function call subunit is used to call the three preset desensitization functions, and use the values of the three time levels except the designated time level in the first time and date as three desensitization functions. The parameters of the sensitive function;
积分运算子单元,用于分别对三个脱敏函数进行在指定区间内的积分运算,从而得到输出的三个积分值;The integral operation sub-unit is used to perform integral operation on the three desensitization functions in the specified interval to obtain the output three integral values;
组合子单元,用于将所述三个积分值与所述指定时间级的数值组合为第一目标时间。The combination subunit is used to combine the three integral values and the numerical value of the specified time level into a first target time.
在一个实施方式中,所述装置,包括:In one embodiment, the device includes:
接收数据处理指令单元,用于接收数据处理指令,其中数据处理指令用于指示对第一时间日期进行处理;A data processing instruction unit for receiving a data processing instruction, where the data processing instruction is used to instruct to process the first time and date;
处理判断单元,用于判断所述数据处理指令是否还指示对第二时间日期进行处理;A processing judging unit, configured to judge whether the data processing instruction also instructs to process the second time and date;
拒绝单元,用于若所述数据处理指令未指示对第二时间日期进行处理,则拒绝进行数据处理。The rejection unit is configured to reject data processing if the data processing instruction does not instruct to process the second time and date.
其中上述单元、子单元分别用于执行的操作与前述实施方式的基于时间日期数据的安 全脱敏方法的步骤一一对应,在此不再赘述。The operations performed by the above-mentioned units and sub-units respectively correspond to the steps of the security desensitization method based on time and date data in the foregoing embodiment, and will not be repeated here.
参照图3,本发明实施例中还提供一种计算机设备,该计算机设备可以是服务器,其内部结构可以如图所示。该计算机设备包括通过系统总线连接的处理器、存储器、网络接口和数据库。其中,该计算机设计的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统、计算机程序和数据库。该内存器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的数据库用于存储基于时间日期数据的安全脱敏方法所用数据。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种基于时间日期数据的安全脱敏方法:Referring to FIG. 3, an embodiment of the present invention also provides a computer device. The computer device may be a server, and its internal structure may be as shown in the figure. The computer equipment includes a processor, a memory, a network interface, and a database connected through a system bus. Among them, the processor designed by the computer is used to provide calculation and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The memory provides an environment for the operation of the operating system and computer programs in the non-volatile storage medium. The database of the computer equipment is used to store the data used in the security desensitization method based on time and date data. The network interface of the computer device is used to communicate with an external terminal through a network connection. The computer program is executed by the processor to realize a safe desensitization method based on time and date data:
获取待脱敏的第一时间日期和第二时间日期,其中时间日期至少由年级、月级、日级和时级四种时间级所构成;Obtain the first time and date and the second time and date to be desensitized, where the time and date are at least composed of four time levels: grade, month, day, and time;
调取预设的基准时间,根据公式:第一时间间隔=|第一时间日期-基准时间|,计算得到第一时间间隔;Recall the preset reference time, and calculate the first time interval according to the formula: first time interval=|first time date-reference time|;
根据预设的时间间隔与参数向量的对应关系,获取与第一时间间隔对应的第一参数向量;Obtaining the first parameter vector corresponding to the first time interval according to the corresponding relationship between the preset time interval and the parameter vector;
根据预设的日期向量映射方法,将第一时间日期映射为第一日期向量,其中第一日期向量包括由年级、月级、日级和时级四种时间级所构成的四个分向量,其中第一参数向量的维度与第一日期向量的维度相同;According to the preset date vector mapping method, the first time date is mapped to the first date vector, where the first date vector includes four sub-vectors composed of four time levels: grade, month, day, and time. The dimension of the first parameter vector is the same as the dimension of the first date vector;
根据公式:
Figure PCTCN2020105884-appb-000010
i为自变量,计算得到级别标识m,其中y为第一日期向量,yi为第一日期向量中的第i个分向量,si为第一参数向量中的第i个分向量,并将所述级别标识m对应的时间级记为指定时间级;
According to the formula:
Figure PCTCN2020105884-appb-000010
i is the independent variable, and the level identification m is obtained by calculation, where y is the first date vector, yi is the i-th sub-vector in the first date vector, and si is the i-th sub-vector in the first parameter vector. The time level corresponding to the level mark m is recorded as the designated time level;
根据预设的脱敏间隔变换方案,将所述第一时间日期脱敏为第一目标时间,其中所述第一目标时间的指定时间级的数值与所述第一时间日期的指定时间级的数值相同;According to a preset desensitization interval conversion scheme, the first time and date are desensitized into a first target time, wherein the value of the specified time level of the first target time is equal to the value of the specified time level of the first time and date The same value;
根据预设的日期向量映射方法,将第一目标时间映射为第一目标时间向量,并根据公式:弥补向量=第一目标时间向量-第一日期向量,计算得到弥补向量;According to the preset date vector mapping method, the first target time is mapped to the first target time vector, and the compensation vector is calculated according to the formula: compensation vector = first target time vector-first date vector;
根据预设的日期向量映射方法,将第二时间日期映射为第二日期向量,并根据公式:第二目标时间向量=第二日期向量-弥补向量,计算得到第二目标时间向量;According to the preset date vector mapping method, the second time date is mapped to the second date vector, and the second target time vector is calculated according to the formula: second target time vector = second date vector-compensation vector;
从所述第二目标时间向量中提取出年级、月级、日级和时级四种时间级的数值,从而组成对第二时间日期脱敏后的第二目标时间。The four time levels of grade, month, day, and time are extracted from the second target time vector to form a second target time desensitized to the second time and date.
上述处理器执行上述基于时间日期数据的安全脱敏方法,其中所述方法包括的步骤分别与执行前述实施方式的基于时间日期数据的安全脱敏方法的步骤一一对应,在此不再赘述。The above-mentioned processor executes the above-mentioned security desensitization method based on time and date data, wherein the steps included in the method respectively correspond to the steps of executing the security desensitization method based on time and date data of the foregoing embodiment, and will not be repeated here.
本领域技术人员可以理解,图中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定。Those skilled in the art can understand that the structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied.
本申请的计算机设备,获取待脱敏的第一时间日期和第二时间日期;根据公式:第一时间间隔=|第一时间日期-基准时间|,计算得到第一时间间隔;获取与第一时间间隔对应的第一参数向量;将第一时间日期映射为第一日期向量;根据公式:
Figure PCTCN2020105884-appb-000011
i为自变量,计算得到级别标识m,并将所述级别标识m对应的时间级记为指定时间级;将所述第一时间日期脱敏为第一目标时间;根据公式:弥补向量=第一目标时间向量-第一日期向量,计算得到弥补向量;根据公式:第二目标时间向量=第二日期向量-弥补向量,计算得到第二目标时间向量;从所述第二目标时间向量中提取出年级、月级、日级和时级四种时间级的数值,从而组成对第二时间日期脱敏后的第二目标时间,从而提高了时间数据的利用率。
The computer device of the present application obtains the first time and date and the second time and date to be desensitized; according to the formula: first time interval=|first time and date-reference time|, the first time interval is calculated; The first parameter vector corresponding to the time interval; the first time and date are mapped to the first date vector; according to the formula:
Figure PCTCN2020105884-appb-000011
i is an independent variable, the level identifier m is calculated, and the time level corresponding to the level identifier m is recorded as the designated time level; the first time and date are desensitized as the first target time; according to the formula: compensation vector=th A target time vector-the first date vector, the compensation vector is obtained by calculation; according to the formula: the second target time vector = the second date vector-the compensation vector, the second target time vector is calculated; extracted from the second target time vector The four time levels of grade, month, day, and time level are output to form a second target time desensitized to the second time and date, thereby improving the utilization of time data.
本申请一实施例还提供一种计算机可读存储介质,上述存储介质可以是易失性存储介 质,也可以是非易失性存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现基于时间日期数据的安全脱敏方法:An embodiment of the present application also provides a computer-readable storage medium. The above-mentioned storage medium may be a volatile storage medium or a non-volatile storage medium, on which a computer program is stored, which is implemented when the computer program is executed by a processor. Security desensitization method based on time and date data:
获取待脱敏的第一时间日期和第二时间日期,其中时间日期至少由年级、月级、日级和时级四种时间级所构成;Obtain the first time and date and the second time and date to be desensitized, where the time and date are at least composed of four time levels: grade, month, day, and time;
调取预设的基准时间,根据公式:第一时间间隔=|第一时间日期-基准时间|,计算得到第一时间间隔;Recall the preset reference time, and calculate the first time interval according to the formula: first time interval=|first time date-reference time|;
根据预设的时间间隔与参数向量的对应关系,获取与第一时间间隔对应的第一参数向量;Obtaining the first parameter vector corresponding to the first time interval according to the corresponding relationship between the preset time interval and the parameter vector;
根据预设的日期向量映射方法,将第一时间日期映射为第一日期向量,其中第一日期向量包括由年级、月级、日级和时级四种时间级所构成的四个分向量,其中第一参数向量的维度与第一日期向量的维度相同;According to the preset date vector mapping method, the first time date is mapped to the first date vector, where the first date vector includes four sub-vectors composed of four time levels: grade, month, day, and time. The dimension of the first parameter vector is the same as the dimension of the first date vector;
根据公式:
Figure PCTCN2020105884-appb-000012
i为自变量,计算得到级别标识m,其中y为第一日期向量,yi为第一日期向量中的第i个分向量,si为第一参数向量中的第i个分向量,并将所述级别标识m对应的时间级记为指定时间级;
According to the formula:
Figure PCTCN2020105884-appb-000012
i is the independent variable, and the level identification m is obtained by calculation, where y is the first date vector, yi is the i-th sub-vector in the first date vector, and si is the i-th sub-vector in the first parameter vector. The time level corresponding to the level mark m is recorded as the designated time level;
根据预设的脱敏间隔变换方案,将所述第一时间日期脱敏为第一目标时间,其中所述第一目标时间的指定时间级的数值与所述第一时间日期的指定时间级的数值相同;According to a preset desensitization interval conversion scheme, the first time and date are desensitized into a first target time, wherein the value of the specified time level of the first target time is equal to the value of the specified time level of the first time and date The same value;
根据预设的日期向量映射方法,将第一目标时间映射为第一目标时间向量,并根据公式:弥补向量=第一目标时间向量-第一日期向量,计算得到弥补向量;According to the preset date vector mapping method, the first target time is mapped to the first target time vector, and the compensation vector is calculated according to the formula: compensation vector = first target time vector-first date vector;
根据预设的日期向量映射方法,将第二时间日期映射为第二日期向量,并根据公式:第二目标时间向量=第二日期向量-弥补向量,计算得到第二目标时间向量;According to the preset date vector mapping method, the second time date is mapped to the second date vector, and the second target time vector is calculated according to the formula: second target time vector = second date vector-compensation vector;
从所述第二目标时间向量中提取出年级、月级、日级和时级四种时间级的数值,从而组成对第二时间日期脱敏后的第二目标时间。The four time levels of grade, month, day, and time are extracted from the second target time vector to form a second target time desensitized to the second time and date.
其中所述方法包括的步骤分别与执行前述实施方式的基于时间日期数据的安全脱敏方法的步骤一一对应,在此不再赘述。The steps included in the method respectively correspond to the steps of the security desensitization method based on time and date data of the foregoing implementation manner, which are not repeated here.
本申请的计算机可读存储介质,获取待脱敏的第一时间日期和第二时间日期;根据公式:第一时间间隔=|第一时间日期-基准时间|,计算得到第一时间间隔;获取与第一时间间隔对应的第一参数向量;将第一时间日期映射为第一日期向量;根据公式:
Figure PCTCN2020105884-appb-000013
i为自变量,计算得到级别标识m,并将所述级别标识m对应的时间级记为指定时间级;将所述第一时间日期脱敏为第一目标时间;根据公式:弥补向量=第一目标时间向量-第一日期向量,计算得到弥补向量;根据公式:第二目标时间向量=第二日期向量-弥补向量,计算得到第二目标时间向量;从所述第二目标时间向量中提取出年级、月级、日级和时级四种时间级的数值,从而组成对第二时间日期脱敏后的第二目标时间,从而提高了时间数据的利用率。
The computer-readable storage medium of the present application obtains the first time and date and the second time and date to be desensitized; according to the formula: first time interval=|first time date-reference time|, the first time interval is calculated; obtain The first parameter vector corresponding to the first time interval; the first time and date are mapped to the first date vector; according to the formula:
Figure PCTCN2020105884-appb-000013
i is an independent variable, the level identifier m is calculated, and the time level corresponding to the level identifier m is recorded as the designated time level; the first time and date are desensitized as the first target time; according to the formula: compensation vector=th A target time vector-the first date vector, the compensation vector is obtained by calculation; according to the formula: the second target time vector = the second date vector-the compensation vector, the second target time vector is calculated; extracted from the second target time vector The four time levels of grade, month, day, and time level are output to form a second target time desensitized to the second time and date, thereby improving the utilization of time data.

Claims (20)

  1. 一种基于时间日期数据的安全脱敏方法,其中,包括:A security desensitization method based on time and date data, which includes:
    获取待脱敏的第一时间日期和第二时间日期,其中时间日期至少由年级、月级、日级和时级四种时间级所构成;Obtain the first time and date and the second time and date to be desensitized, where the time and date are at least composed of four time levels: grade, month, day, and time;
    调取预设的基准时间,根据公式:第一时间间隔=|第一时间日期-基准时间|,计算得到第一时间间隔;Recall the preset reference time, and calculate the first time interval according to the formula: first time interval=|first time date-reference time|;
    根据预设的时间间隔与参数向量的对应关系,获取与第一时间间隔对应的第一参数向量;Obtaining the first parameter vector corresponding to the first time interval according to the corresponding relationship between the preset time interval and the parameter vector;
    根据预设的日期向量映射方法,将第一时间日期映射为第一日期向量,其中第一日期向量包括由年级、月级、日级和时级四种时间级所构成的四个分向量,其中第一参数向量的维度与第一日期向量的维度相同;According to the preset date vector mapping method, the first time date is mapped to the first date vector, where the first date vector includes four sub-vectors composed of four time levels: grade, month, day, and time. The dimension of the first parameter vector is the same as the dimension of the first date vector;
    根据公式:
    Figure PCTCN2020105884-appb-100001
    i为自变量,计算得到级别标识m,其中y为第一日期向量,yi为第一日期向量中的第i个分向量,si为第一参数向量中的第i个分向量,并将所述级别标识m对应的时间级记为指定时间级;
    According to the formula:
    Figure PCTCN2020105884-appb-100001
    i is the independent variable, and the level identification m is obtained by calculation, where y is the first date vector, yi is the i-th sub-vector in the first date vector, and si is the i-th sub-vector in the first parameter vector. The time level corresponding to the level mark m is recorded as the designated time level;
    根据预设的脱敏间隔变换方案,将所述第一时间日期脱敏为第一目标时间,其中所述第一目标时间的指定时间级的数值与所述第一时间日期的指定时间级的数值相同;According to a preset desensitization interval conversion scheme, the first time and date are desensitized into a first target time, wherein the value of the specified time level of the first target time is equal to the value of the specified time level of the first time and date The same value;
    根据预设的日期向量映射方法,将第一目标时间映射为第一目标时间向量,并根据公式:弥补向量=第一目标时间向量-第一日期向量,计算得到弥补向量;According to the preset date vector mapping method, the first target time is mapped to the first target time vector, and the compensation vector is calculated according to the formula: compensation vector = first target time vector-first date vector;
    根据预设的日期向量映射方法,将第二时间日期映射为第二日期向量,并根据公式:第二目标时间向量=第二日期向量-弥补向量,计算得到第二目标时间向量;According to the preset date vector mapping method, the second time date is mapped to the second date vector, and the second target time vector is calculated according to the formula: second target time vector = second date vector-compensation vector;
    从所述第二目标时间向量中提取出年级、月级、日级和时级四种时间级的数值,从而组成对第二时间日期脱敏后的第二目标时间。The four time levels of grade, month, day, and time are extracted from the second target time vector to form a second target time desensitized to the second time and date.
  2. 根据权利要求1所述的基于时间日期数据的安全脱敏方法,其中,所述根据预设的时间间隔与参数向量的对应关系,获取与第一时间间隔对应的第一参数向量的步骤,包括:The security desensitization method based on time and date data according to claim 1, wherein the step of obtaining the first parameter vector corresponding to the first time interval according to the corresponding relationship between the preset time interval and the parameter vector comprises :
    根据预设的时间间隔与参数向量的对应关系,获取与第一时间间隔对应的多个初始参数向量,其中所述初始参数向量标记了指定分向量;Obtaining a plurality of initial parameter vectors corresponding to the first time interval according to the corresponding relationship between the preset time interval and the parameter vector, wherein the initial parameter vector marks the designated component vector;
    比较多个初始参数向量中的所述指定分向量的数值,从而筛选出所述指定分向量的数值最大的初始参数向量,并记为第一参数向量。The numerical values of the designated component vectors in the multiple initial parameter vectors are compared, so as to filter out the initial parameter vector with the largest numerical value of the designated component vectors and record it as the first parameter vector.
  3. 根据权利要求1所述的基于时间日期数据的安全脱敏方法,其中,所述根据预设的日期向量映射方法,将第一时间日期映射为第一日期向量,其中第一日期向量包括由年级、月级、日级和时级四种时间级所构成的四个分向量的步骤,包括:The security desensitization method based on time and date data according to claim 1, wherein the first time and date are mapped to a first date vector according to a preset date vector mapping method, wherein the first date vector includes The steps of the four sub-vectors formed by the four time levels of, month level, day level and time level include:
    根据所述第一时间日期生成第一日期初始向量,所述第一日期初始向量仅包括由所述第一时间日期的年级、月级、日级和时级四种时间级所构成的四个分向量;A first date initial vector is generated according to the first time and date, and the first date initial vector only includes four time levels consisting of four time levels: grade, month, day, and time of the first time and date. Fractional vector
    根据预设的分向量嵌入方法,在所述第一日期初始向量中嵌入多个分向量,以使所述第一日期初始向量的分向量的数量达到指定数量;According to a preset method for embedding component vectors, embed a plurality of component vectors in the first date initial vector, so that the number of component vectors of the first date initial vector reaches a specified number;
    将经过分向量嵌入处理后的所述第一日期初始向量记为第一日期向量。The initial vector of the first date after the component vector embedding processing is recorded as the first date vector.
  4. 根据权利要求1所述的基于时间日期数据的安全脱敏方法,其中,所述根据预设的脱敏间隔变换方案,将所述第一时间日期脱敏为第一目标时间,其中所述第一目标时间的指定时间级的数值与所述第一时间日期的指定时间级的数值相同的步骤,包括:The security desensitization method based on time and date data according to claim 1, wherein the first time and date are desensitized as the first target time according to a preset desensitization interval conversion scheme, wherein the first time and date are desensitized to the first target time The step that the numerical value of the designated time level of the target time is the same as the numerical value of the designated time level of the first time and date includes:
    根据所述时间间隔与脱敏参数的对应关系,获取与所述第一时间间隔对应的指定脱敏参数;Obtaining the designated desensitization parameter corresponding to the first time interval according to the correspondence between the time interval and the desensitization parameter;
    将所述指定脱敏参数应用于预设的初始脱敏模型中,从而得到指定脱敏模型;Applying the designated desensitization parameter to a preset initial desensitization model to obtain a designated desensitization model;
    将所述第一时间日期中除了指定时间级之外的其他时间级的数值输入所述指定脱敏模型中进行计算,并将所述指定脱敏模型的输出值与所述指定时间级的数值组合为第一目标 时间。Input the values of other time levels except the designated time level in the first time and date into the designated desensitization model for calculation, and combine the output value of the designated desensitization model with the value of the designated time level The combination is the first target time.
  5. 根据权利要求4所述的基于时间日期数据的安全脱敏方法,其中,所述脱敏参数被加密为密文,所述根据所述时间间隔与脱敏参数的对应关系,获取与所述第一时间间隔对应的指定脱敏参数的步骤,包括:The security desensitization method based on time and date data according to claim 4, wherein the desensitization parameter is encrypted as a ciphertext, and the corresponding relationship between the time interval and the desensitization parameter is obtained from the second desensitization parameter. The steps of specifying desensitization parameters corresponding to a time interval include:
    根据所述时间间隔与脱敏参数的密文的对应关系,获取与所述第一时间间隔对应的指定脱敏参数的密文;Obtaining the ciphertext of the designated desensitization parameter corresponding to the first time interval according to the correspondence between the time interval and the ciphertext of the desensitization parameter;
    根据预设的密钥,采用预设的AES128算法,将所述指定脱敏参数的密文解密为明文。According to the preset key, the preset AES128 algorithm is used to decrypt the ciphertext of the designated desensitization parameter into plaintext.
  6. 根据权利要求1所述的基于时间日期数据的安全脱敏方法,其中,所述根据预设的脱敏间隔变换方案,将所述第一时间日期脱敏为第一目标时间,其中所述第一目标时间的指定时间级的数值与所述第一时间日期的指定时间级的数值相同的步骤,包括:The security desensitization method based on time and date data according to claim 1, wherein the first time and date are desensitized as the first target time according to a preset desensitization interval conversion scheme, wherein the first time and date are desensitized to the first target time The step that the numerical value of the designated time level of the target time is the same as the numerical value of the designated time level of the first time and date includes:
    调取预设的三个脱敏函数,并将所述第一时间日期中除所述指定时间级之外的三个时间级的数值分别作为三个脱敏函数的参数;Call three preset desensitization functions, and use the values of three time levels in the first time and date other than the specified time level as the parameters of the three desensitization functions;
    分别对三个脱敏函数进行在指定区间内的积分运算,从而得到输出的三个积分值;Perform the integral operation on the three desensitization functions in the specified interval respectively to obtain the three integral values of the output;
    将所述三个积分值与所述指定时间级的数值组合为第一目标时间。The three integral values and the numerical value of the specified time level are combined as the first target time.
  7. 根据权利要求1所述的基于时间日期数据的安全脱敏方法,其中,所述从所述第二目标时间向量中提取出年级、月级、日级和时级四种时间级的数值,从而组成对第二时间日期脱敏后的第二目标时间的步骤之后,包括:The security desensitization method based on time and date data according to claim 1, wherein the four time levels of grade, month, day, and time are extracted from the second target time vector, so that After the step of composing the second target time after desensitization to the second time and date, it includes:
    接收数据处理指令,其中数据处理指令用于指示对第一时间日期进行处理;Receive a data processing instruction, where the data processing instruction is used to instruct to process the first time and date;
    判断所述数据处理指令是否还指示对第二时间日期进行处理;Judging whether the data processing instruction also instructs to process the second time and date;
    若所述数据处理指令未指示对第二时间日期进行处理,则拒绝进行数据处理。If the data processing instruction does not instruct to process the second time and date, then refuse to process the data.
  8. 一种基于时间日期数据的安全脱敏装置,其中,包括:A safety desensitization device based on time and date data, which includes:
    日期获取单元,用于获取待脱敏的第一时间日期和第二时间日期,其中时间日期至少由年级、月级、日级和时级四种时间级所构成;The date obtaining unit is used to obtain the first time and date and the second time and date to be desensitized, where the time and date are at least composed of four time levels: grade, month, day, and time;
    第一时间间隔计算单元,用于调取预设的基准时间,根据公式:第一时间间隔=|第一时间日期-基准时间|,计算得到第一时间间隔;The first time interval calculation unit is configured to retrieve the preset reference time, and calculate the first time interval according to the formula: first time interval=|first time date-reference time|;
    第一参数向量获取单元,用于根据预设的时间间隔与参数向量的对应关系,获取与第一时间间隔对应的第一参数向量;The first parameter vector obtaining unit is configured to obtain the first parameter vector corresponding to the first time interval according to the corresponding relationship between the preset time interval and the parameter vector;
    第一日期向量映射单元,用于根据预设的日期向量映射方法,将第一时间日期映射为第一日期向量,其中第一日期向量包括由年级、月级、日级和时级四种时间级所构成的四个分向量,其中第一参数向量的维度与第一日期向量的维度相同;The first date vector mapping unit is used to map the first time and date to the first date vector according to the preset date vector mapping method, where the first date vector includes four times of grade, month, day, and time. Four sub-vectors formed by levels, where the dimension of the first parameter vector is the same as the dimension of the first date vector;
    指定时间级获取单元,用于根据公式:
    Figure PCTCN2020105884-appb-100002
    i为自变量,计算得到级别标识m,其中y为第一日期向量,yi为第一日期向量中的第i个分向量,si为第一参数向量中的第i个分向量,并将所述级别标识m对应的时间级记为指定时间级;
    Specify the time level to obtain the unit, which is used according to the formula:
    Figure PCTCN2020105884-appb-100002
    i is the independent variable, and the level identification m is obtained by calculation, where y is the first date vector, yi is the i-th sub-vector in the first date vector, and si is the i-th sub-vector in the first parameter vector. The time level corresponding to the level mark m is recorded as the designated time level;
    第一脱敏单元,用于根据预设的脱敏间隔变换方案,将所述第一时间日期脱敏为第一目标时间,其中所述第一目标时间的指定时间级的数值与所述第一时间日期的指定时间级的数值相同;The first desensitization unit is configured to desensitize the first time and date as a first target time according to a preset desensitization interval conversion scheme, wherein the value of the designated time level of the first target time is the same as the first target time. The value of the designated time level of a time and date is the same;
    弥补向量获取单元,用于根据预设的日期向量映射方法,将第一目标时间映射为第一目标时间向量,并根据公式:弥补向量=第一目标时间向量-第一日期向量,计算得到弥补向量;The compensation vector acquisition unit is used to map the first target time to the first target time vector according to the preset date vector mapping method, and calculate the compensation according to the formula: compensation vector = first target time vector-first date vector vector;
    第二日期向量映射单元,用于根据预设的日期向量映射方法,将第二时间日期映射为第二日期向量,并根据公式:第二目标时间向量=第二日期向量-弥补向量,计算得到第二目标时间向量;The second date vector mapping unit is used to map the second time and date to the second date vector according to the preset date vector mapping method, and calculate according to the formula: second target time vector = second date vector-compensation vector Second target time vector;
    第二目标时间获取单元,用于从所述第二目标时间向量中提取出年级、月级、日级和时级四种时间级的数值,从而组成对第二时间日期脱敏后的第二目标时间。The second target time acquiring unit is used to extract the four time levels of grade, month, day, and time from the second target time vector to form a second time and date desensitized to the second time and date. Target time.
  9. 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,其中,所 述处理器执行所述计算机程序时实现一种基于时间日期数据的安全脱敏方法的步骤:A computer device includes a memory and a processor, and the memory stores a computer program. The steps of implementing a security desensitization method based on time and date data when the processor executes the computer program:
    获取待脱敏的第一时间日期和第二时间日期,其中时间日期至少由年级、月级、日级和时级四种时间级所构成;Obtain the first time and date and the second time and date to be desensitized, where the time and date are at least composed of four time levels: grade, month, day, and time;
    调取预设的基准时间,根据公式:第一时间间隔=|第一时间日期-基准时间|,计算得到第一时间间隔;Recall the preset reference time, and calculate the first time interval according to the formula: first time interval=|first time date-reference time|;
    根据预设的时间间隔与参数向量的对应关系,获取与第一时间间隔对应的第一参数向量;Obtaining the first parameter vector corresponding to the first time interval according to the corresponding relationship between the preset time interval and the parameter vector;
    根据预设的日期向量映射方法,将第一时间日期映射为第一日期向量,其中第一日期向量包括由年级、月级、日级和时级四种时间级所构成的四个分向量,其中第一参数向量的维度与第一日期向量的维度相同;According to the preset date vector mapping method, the first time date is mapped to the first date vector, where the first date vector includes four sub-vectors composed of four time levels: grade, month, day, and time. The dimension of the first parameter vector is the same as the dimension of the first date vector;
    根据公式:
    Figure PCTCN2020105884-appb-100003
    i为自变量,计算得到级别标识m,其中y为第一日期向量,yi为第一日期向量中的第i个分向量,si为第一参数向量中的第i个分向量,并将所述级别标识m对应的时间级记为指定时间级;
    According to the formula:
    Figure PCTCN2020105884-appb-100003
    i is the independent variable, and the level identification m is obtained by calculation, where y is the first date vector, yi is the i-th sub-vector in the first date vector, and si is the i-th sub-vector in the first parameter vector. The time level corresponding to the level mark m is recorded as the designated time level;
    根据预设的脱敏间隔变换方案,将所述第一时间日期脱敏为第一目标时间,其中所述第一目标时间的指定时间级的数值与所述第一时间日期的指定时间级的数值相同;According to a preset desensitization interval conversion scheme, the first time and date are desensitized into a first target time, wherein the value of the specified time level of the first target time is equal to the value of the specified time level of the first time and date The same value;
    根据预设的日期向量映射方法,将第一目标时间映射为第一目标时间向量,并根据公式:弥补向量=第一目标时间向量-第一日期向量,计算得到弥补向量;According to the preset date vector mapping method, the first target time is mapped to the first target time vector, and the compensation vector is calculated according to the formula: compensation vector = first target time vector-first date vector;
    根据预设的日期向量映射方法,将第二时间日期映射为第二日期向量,并根据公式:第二目标时间向量=第二日期向量-弥补向量,计算得到第二目标时间向量;According to the preset date vector mapping method, the second time date is mapped to the second date vector, and the second target time vector is calculated according to the formula: second target time vector = second date vector-compensation vector;
    从所述第二目标时间向量中提取出年级、月级、日级和时级四种时间级的数值,从而组成对第二时间日期脱敏后的第二目标时间。The four time levels of grade, month, day, and time are extracted from the second target time vector to form a second target time desensitized to the second time and date.
  10. 根据权利要求9所述的计算机设备,其中,所述根据预设的时间间隔与参数向量的对应关系,获取与第一时间间隔对应的第一参数向量的步骤,包括:The computer device according to claim 9, wherein the step of obtaining the first parameter vector corresponding to the first time interval according to the corresponding relationship between the preset time interval and the parameter vector comprises:
    根据预设的时间间隔与参数向量的对应关系,获取与第一时间间隔对应的多个初始参数向量,其中所述初始参数向量标记了指定分向量;Obtaining a plurality of initial parameter vectors corresponding to the first time interval according to the corresponding relationship between the preset time interval and the parameter vector, wherein the initial parameter vector marks the designated component vector;
    比较多个初始参数向量中的所述指定分向量的数值,从而筛选出所述指定分向量的数值最大的初始参数向量,并记为第一参数向量。The numerical values of the designated component vectors in the multiple initial parameter vectors are compared, so as to filter out the initial parameter vector with the largest numerical value of the designated component vectors and record it as the first parameter vector.
  11. 根据权利要求9所述的计算机设备,其中,所述根据预设的日期向量映射方法,将第一时间日期映射为第一日期向量,其中第一日期向量包括由年级、月级、日级和时级四种时间级所构成的四个分向量的步骤,包括:The computer device according to claim 9, wherein the first date and time is mapped to the first date vector according to the preset date vector mapping method, wherein the first date vector includes grade, month, day and The steps of the four sub-vectors formed by the four time levels of the time level include:
    根据所述第一时间日期生成第一日期初始向量,所述第一日期初始向量仅包括由所述第一时间日期的年级、月级、日级和时级四种时间级所构成的四个分向量;A first date initial vector is generated according to the first time and date, and the first date initial vector only includes four time levels consisting of four time levels: grade, month, day, and time of the first time and date. Fractional vector
    根据预设的分向量嵌入方法,在所述第一日期初始向量中嵌入多个分向量,以使所述第一日期初始向量的分向量的数量达到指定数量;According to a preset method for embedding component vectors, embed a plurality of component vectors in the first date initial vector, so that the number of component vectors of the first date initial vector reaches a specified number;
    将经过分向量嵌入处理后的所述第一日期初始向量记为第一日期向量。The initial vector of the first date after the component vector embedding processing is recorded as the first date vector.
  12. 根据权利要求9所述的计算机设备,其中,所述根据预设的脱敏间隔变换方案,将所述第一时间日期脱敏为第一目标时间,其中所述第一目标时间的指定时间级的数值与所述第一时间日期的指定时间级的数值相同的步骤,包括:9. The computer device according to claim 9, wherein the first time and date are desensitized as a first target time according to a preset desensitization interval conversion scheme, wherein the designated time level of the first target time is The steps in which the value of is the same as the value of the specified time level of the first time and date includes:
    根据所述时间间隔与脱敏参数的对应关系,获取与所述第一时间间隔对应的指定脱敏参数;Obtaining the designated desensitization parameter corresponding to the first time interval according to the correspondence between the time interval and the desensitization parameter;
    将所述指定脱敏参数应用于预设的初始脱敏模型中,从而得到指定脱敏模型;Applying the designated desensitization parameter to a preset initial desensitization model to obtain a designated desensitization model;
    将所述第一时间日期中除了指定时间级之外的其他时间级的数值输入所述指定脱敏模型中进行计算,并将所述指定脱敏模型的输出值与所述指定时间级的数值组合为第一目标时间。Input the values of other time levels except the designated time level in the first time and date into the designated desensitization model for calculation, and combine the output value of the designated desensitization model with the value of the designated time level The combination is the first target time.
  13. 根据权利要求12所述的计算机设备,其中,所述脱敏参数被加密为密文,所述根 据所述时间间隔与脱敏参数的对应关系,获取与所述第一时间间隔对应的指定脱敏参数的步骤,包括:The computer device according to claim 12, wherein the desensitization parameter is encrypted as a ciphertext, and the designated desensitization parameter corresponding to the first time interval is obtained according to the corresponding relationship between the time interval and the desensitization parameter. The steps for sensitive parameters include:
    根据所述时间间隔与脱敏参数的密文的对应关系,获取与所述第一时间间隔对应的指定脱敏参数的密文;Obtaining the ciphertext of the designated desensitization parameter corresponding to the first time interval according to the correspondence between the time interval and the ciphertext of the desensitization parameter;
    根据预设的密钥,采用预设的AES128算法,将所述指定脱敏参数的密文解密为明文。According to the preset key, the preset AES128 algorithm is used to decrypt the ciphertext of the designated desensitization parameter into plaintext.
  14. 根据权利要求9所述的计算机设备,其中,所述根据预设的脱敏间隔变换方案,将所述第一时间日期脱敏为第一目标时间,其中所述第一目标时间的指定时间级的数值与所述第一时间日期的指定时间级的数值相同的步骤,包括:9. The computer device according to claim 9, wherein the first time and date are desensitized as a first target time according to a preset desensitization interval conversion scheme, wherein the designated time level of the first target time is The steps in which the value of is the same as the value of the specified time level of the first time and date includes:
    调取预设的三个脱敏函数,并将所述第一时间日期中除所述指定时间级之外的三个时间级的数值分别作为三个脱敏函数的参数;Call three preset desensitization functions, and use the values of three time levels in the first time and date other than the specified time level as the parameters of the three desensitization functions;
    分别对三个脱敏函数进行在指定区间内的积分运算,从而得到输出的三个积分值;Perform the integral operation on the three desensitization functions in the specified interval respectively to obtain the three integral values of the output;
    将所述三个积分值与所述指定时间级的数值组合为第一目标时间。The three integral values and the numerical value of the specified time level are combined as the first target time.
  15. 根据权利要求9所述的计算机设备,其中,所述从所述第二目标时间向量中提取出年级、月级、日级和时级四种时间级的数值,从而组成对第二时间日期脱敏后的第二目标时间的步骤之后,包括:The computer device according to claim 9, wherein the four time levels of grade, month, day, and time level are extracted from the second target time vector to form a second time and date. After the second target time step after the sensitivity, it includes:
    接收数据处理指令,其中数据处理指令用于指示对第一时间日期进行处理;Receive a data processing instruction, where the data processing instruction is used to instruct to process the first time and date;
    判断所述数据处理指令是否还指示对第二时间日期进行处理;Judging whether the data processing instruction also instructs to process the second time and date;
    若所述数据处理指令未指示对第二时间日期进行处理,则拒绝进行数据处理。If the data processing instruction does not instruct to process the second time and date, then refuse to process the data.
  16. 一种计算机可读存储介质,其上存储有计算机程序,其中,所述计算机程序被处理器执行时实现一种基于时间日期数据的安全脱敏方法的步骤:A computer-readable storage medium having a computer program stored thereon, wherein the steps of implementing a security desensitization method based on time and date data when the computer program is executed by a processor:
    获取待脱敏的第一时间日期和第二时间日期,其中时间日期至少由年级、月级、日级和时级四种时间级所构成;Obtain the first time and date and the second time and date to be desensitized, where the time and date are at least composed of four time levels: grade, month, day, and time;
    调取预设的基准时间,根据公式:第一时间间隔=|第一时间日期-基准时间|,计算得到第一时间间隔;Recall the preset reference time, and calculate the first time interval according to the formula: first time interval=|first time date-reference time|;
    根据预设的时间间隔与参数向量的对应关系,获取与第一时间间隔对应的第一参数向量;Obtaining the first parameter vector corresponding to the first time interval according to the corresponding relationship between the preset time interval and the parameter vector;
    根据预设的日期向量映射方法,将第一时间日期映射为第一日期向量,其中第一日期向量包括由年级、月级、日级和时级四种时间级所构成的四个分向量,其中第一参数向量的维度与第一日期向量的维度相同;According to the preset date vector mapping method, the first time date is mapped to the first date vector, where the first date vector includes four sub-vectors composed of four time levels: grade, month, day, and time. The dimension of the first parameter vector is the same as the dimension of the first date vector;
    根据公式:
    Figure PCTCN2020105884-appb-100004
    i为自变量,计算得到级别标识m,其中y为第一日期向量,yi为第一日期向量中的第i个分向量,si为第一参数向量中的第i个分向量,并将所述级别标识m对应的时间级记为指定时间级;
    According to the formula:
    Figure PCTCN2020105884-appb-100004
    i is the independent variable, and the level identification m is obtained by calculation, where y is the first date vector, yi is the i-th sub-vector in the first date vector, and si is the i-th sub-vector in the first parameter vector. The time level corresponding to the level mark m is recorded as the designated time level;
    根据预设的脱敏间隔变换方案,将所述第一时间日期脱敏为第一目标时间,其中所述第一目标时间的指定时间级的数值与所述第一时间日期的指定时间级的数值相同;According to a preset desensitization interval conversion scheme, the first time and date are desensitized into a first target time, wherein the value of the specified time level of the first target time is equal to the value of the specified time level of the first time and date The same value;
    根据预设的日期向量映射方法,将第一目标时间映射为第一目标时间向量,并根据公式:弥补向量=第一目标时间向量-第一日期向量,计算得到弥补向量;According to the preset date vector mapping method, the first target time is mapped to the first target time vector, and the compensation vector is calculated according to the formula: compensation vector = first target time vector-first date vector;
    根据预设的日期向量映射方法,将第二时间日期映射为第二日期向量,并根据公式:第二目标时间向量=第二日期向量-弥补向量,计算得到第二目标时间向量;According to the preset date vector mapping method, the second time date is mapped to the second date vector, and the second target time vector is calculated according to the formula: second target time vector = second date vector-compensation vector;
    从所述第二目标时间向量中提取出年级、月级、日级和时级四种时间级的数值,从而组成对第二时间日期脱敏后的第二目标时间。The four time levels of grade, month, day, and time are extracted from the second target time vector to form a second target time desensitized to the second time and date.
  17. 根据权利要求16所述的计算机可读存储介质,其中,所述根据预设的时间间隔与参数向量的对应关系,获取与第一时间间隔对应的第一参数向量的步骤,包括:The computer-readable storage medium according to claim 16, wherein the step of obtaining the first parameter vector corresponding to the first time interval according to the corresponding relationship between the preset time interval and the parameter vector comprises:
    根据预设的时间间隔与参数向量的对应关系,获取与第一时间间隔对应的多个初始参数向量,其中所述初始参数向量标记了指定分向量;Obtaining a plurality of initial parameter vectors corresponding to the first time interval according to the corresponding relationship between the preset time interval and the parameter vector, wherein the initial parameter vector marks the designated component vector;
    比较多个初始参数向量中的所述指定分向量的数值,从而筛选出所述指定分向量的数 值最大的初始参数向量,并记为第一参数向量。The numerical value of the designated component vector in the multiple initial parameter vectors is compared, so as to filter out the initial parameter vector with the largest value of the designated component vector, and record it as the first parameter vector.
  18. 根据权利要求16所述的计算机可读存储介质,其中,所述根据预设的日期向量映射方法,将第一时间日期映射为第一日期向量,其中第一日期向量包括由年级、月级、日级和时级四种时间级所构成的四个分向量的步骤,包括:The computer-readable storage medium according to claim 16, wherein the first date and time is mapped to a first date vector according to a preset date vector mapping method, wherein the first date vector includes grades, month grades, The steps of the four sub-vectors formed by the four time levels of day level and time level include:
    根据所述第一时间日期生成第一日期初始向量,所述第一日期初始向量仅包括由所述第一时间日期的年级、月级、日级和时级四种时间级所构成的四个分向量;A first date initial vector is generated according to the first time and date, and the first date initial vector only includes four time levels consisting of four time levels: grade, month, day, and time of the first time and date. Fractional vector
    根据预设的分向量嵌入方法,在所述第一日期初始向量中嵌入多个分向量,以使所述第一日期初始向量的分向量的数量达到指定数量;According to a preset method for embedding component vectors, embed a plurality of component vectors in the first date initial vector, so that the number of component vectors of the first date initial vector reaches a specified number;
    将经过分向量嵌入处理后的所述第一日期初始向量记为第一日期向量。The initial vector of the first date after the component vector embedding processing is recorded as the first date vector.
  19. 根据权利要求16所述的计算机可读存储介质,其中,所述根据预设的脱敏间隔变换方案,将所述第一时间日期脱敏为第一目标时间,其中所述第一目标时间的指定时间级的数值与所述第一时间日期的指定时间级的数值相同的步骤,包括:The computer-readable storage medium according to claim 16, wherein the first time and date are desensitized into a first target time according to a preset desensitization interval conversion scheme, wherein the first target time is The steps in which the value of the designated time level is the same as the value of the designated time level of the first time and date includes:
    根据所述时间间隔与脱敏参数的对应关系,获取与所述第一时间间隔对应的指定脱敏参数;Obtaining the designated desensitization parameter corresponding to the first time interval according to the correspondence between the time interval and the desensitization parameter;
    将所述指定脱敏参数应用于预设的初始脱敏模型中,从而得到指定脱敏模型;Applying the designated desensitization parameter to a preset initial desensitization model to obtain a designated desensitization model;
    将所述第一时间日期中除了指定时间级之外的其他时间级的数值输入所述指定脱敏模型中进行计算,并将所述指定脱敏模型的输出值与所述指定时间级的数值组合为第一目标时间。Input the values of other time levels except the designated time level in the first time and date into the designated desensitization model for calculation, and combine the output value of the designated desensitization model with the value of the designated time level The combination is the first target time.
  20. 根据权利要求19所述的计算机可读存储介质,其中,所述脱敏参数被加密为密文,所述根据所述时间间隔与脱敏参数的对应关系,获取与所述第一时间间隔对应的指定脱敏参数的步骤,包括:The computer-readable storage medium according to claim 19, wherein the desensitization parameter is encrypted into a ciphertext, and the corresponding relationship between the time interval and the desensitization parameter is obtained according to the corresponding relationship between the time interval and the desensitization parameter. The steps to specify desensitization parameters include:
    根据所述时间间隔与脱敏参数的密文的对应关系,获取与所述第一时间间隔对应的指定脱敏参数的密文;Obtaining the ciphertext of the designated desensitization parameter corresponding to the first time interval according to the correspondence between the time interval and the ciphertext of the desensitization parameter;
    根据预设的密钥,采用预设的AES128算法,将所述指定脱敏参数的密文解密为明文。According to the preset key, the preset AES128 algorithm is used to decrypt the ciphertext of the designated desensitization parameter into plaintext.
PCT/CN2020/105884 2019-09-02 2020-07-30 Safe desensitization method and apparatus based on time and date data and computer device WO2021042918A1 (en)

Applications Claiming Priority (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
CN201910824292.3 2019-09-02

Publications (1)

Publication Number Publication Date
WO2021042918A1 true WO2021042918A1 (en) 2021-03-11

Family

ID=69267777

Family Applications (1)

Application Number Title Priority Date Filing Date
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

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
CN116545776A (en) * 2023-07-06 2023-08-04 中航金网(北京)电子商务有限公司 Data transmission method, device, computer equipment and storage medium

Families Citing this family (1)

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

Citations (7)

* 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
US20140271721A1 (en) * 2013-03-14 2014-09-18 Allergen Research Corporation Peanut formulations and uses thereof
CN106991337A (en) * 2017-04-06 2017-07-28 北京数聚世界信息技术有限公司 The desensitization method and device of a kind of date of birth data
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
CN109726585A (en) * 2018-12-14 2019-05-07 银江股份有限公司 A kind of integrated data desensitization system and method towards ID card No.
CN110188571A (en) * 2019-06-05 2019-08-30 深圳市优网科技有限公司 Desensitization method and system based on sensitive data
CN110737913A (en) * 2019-09-02 2020-01-31 深圳壹账通智能科技有限公司 Safety desensitization method and device based on time and date data and computer equipment

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9341486B2 (en) * 2013-04-24 2016-05-17 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
JP2015184875A (en) * 2014-03-24 2015-10-22 株式会社東芝 Data processing device and data processing program

Patent Citations (7)

* 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
US20140271721A1 (en) * 2013-03-14 2014-09-18 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
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.
CN110188571A (en) * 2019-06-05 2019-08-30 深圳市优网科技有限公司 Desensitization method and system based on sensitive data
CN110737913A (en) * 2019-09-02 2020-01-31 深圳壹账通智能科技有限公司 Safety desensitization method and device based on time and date data and computer equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116545776A (en) * 2023-07-06 2023-08-04 中航金网(北京)电子商务有限公司 Data transmission method, device, computer equipment and storage medium
CN116545776B (en) * 2023-07-06 2023-10-03 中航金网(北京)电子商务有限公司 Data transmission method, device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN110737913B (en) 2022-03-18
CN110737913A (en) 2020-01-31

Similar Documents

Publication Publication Date Title
CN105960775B (en) Method and apparatus for migrating keys
US11025415B2 (en) Cryptographic operation method, method for creating working key, cryptographic service platform, and cryptographic service device
WO2021042918A1 (en) Safe desensitization method and apparatus based on time and date data and computer device
WO2019205366A1 (en) Picture management method and apparatus, computer device, and storage medium
CN112632581A (en) User data processing method and device, computer equipment and storage medium
CN110310392B (en) Vehicle unlocking method and device, computer equipment and storage medium
CN111917540A (en) Data encryption and decryption method and device, mobile terminal and storage medium
US11606202B2 (en) Methods and systems for secure data transmission
WO2021190197A1 (en) Method and apparatus for authenticating biometric payment device, computer device and storage medium
WO2020181826A1 (en) Internet of things dynamic password generation and verification methods, system, and computer device
CN115333809A (en) Data desensitization and restoration method based on symmetric encryption
CN112272090B (en) Key generation method and device
US11399015B2 (en) Data security tool
WO2020057389A1 (en) Signature verification method and apparatus, electronic device and readable storage medium
US11936651B2 (en) Automated account recovery using trusted devices
CN213817804U (en) Secret key generating device
CN114641788B (en) Method and apparatus for preventing denial of service attacks on blockchain systems
CN114329614A (en) Data desensitization method and system based on character string confusion
CN114239004A (en) Electronic signature generation method and device, computer equipment and storage medium
CN115168907B (en) Data matching method, system, equipment and storage medium for protecting data privacy
CN117459327B (en) Cloud data transparent encryption protection method, system and device
US11934516B2 (en) Method and system for enabling secure processing of data using untrusted processing application in a trusted execution environment
CN116318899B (en) Data encryption and decryption processing method, system, equipment and medium
CN117527265B (en) Internet of things data acquisition system and method based on distributed digital identity
US20240095336A1 (en) Generating token value for enabling a non-application channel to perform operation

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20859871

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 18.07.2022)

122 Ep: pct application non-entry in european phase

Ref document number: 20859871

Country of ref document: EP

Kind code of ref document: A1