CN115688184B - Log desensitization method and device, electronic equipment and storage medium - Google Patents

Log desensitization method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN115688184B
CN115688184B CN202211670424.XA CN202211670424A CN115688184B CN 115688184 B CN115688184 B CN 115688184B CN 202211670424 A CN202211670424 A CN 202211670424A CN 115688184 B CN115688184 B CN 115688184B
Authority
CN
China
Prior art keywords
information
sensitive information
sensitive
mark
mark information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202211670424.XA
Other languages
Chinese (zh)
Other versions
CN115688184A (en
Inventor
周小亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ping An Bank Co Ltd
Original Assignee
Ping An Bank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ping An Bank Co Ltd filed Critical Ping An Bank Co Ltd
Priority to CN202211670424.XA priority Critical patent/CN115688184B/en
Publication of CN115688184A publication Critical patent/CN115688184A/en
Application granted granted Critical
Publication of CN115688184B publication Critical patent/CN115688184B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Storage Device Security (AREA)

Abstract

The embodiment of the application provides a log desensitization method, a log desensitization device, an electronic device and a storage medium, wherein the method comprises the following steps: loading a log file; traversing the sensitive information of the log file; acquiring mark information in the currently traversed sensitive information; desensitizing the sensitive information according to the mark information, wherein the mark information is used for identifying the desensitized sensitive information. Implementing the above embodiments can reduce the likelihood that sensitive information is the same after desensitization of different subjects.

Description

Log desensitization method and device, electronic equipment and storage medium
Technical Field
The application relates to the technical field of data processing, in particular to a log desensitization method, a log desensitization device, an electronic device and a storage medium.
Background
In the software development process, after an online problem occurs, the most common method for positioning the problem is to examine a log file, so that some log information is output at a proper position when a program is developed. Part of the log function does not print only some of the business fields, and may output the entire object to the log, which may result in leakage of the core privacy data of the user, which is particularly important for both the enterprise and the user. Therefore, it is necessary to prevent the leakage of various private data, and in general, partial data in the data is replaced by using a positive table expression by converting the data in the code according to a private data desensitization rule, but this method has the following problems: after partial data are desensitized by using the replacement, when log checking is carried out, the corresponding log is difficult to be positioned through key information (order number, mobile phone number and identity card number), and two groups of different data after desensitization in the method can be displayed as the same data in a log file, so that the trouble is brought to log removal.
Disclosure of Invention
In view of this, an object of the embodiments of the present application is to provide a log desensitization method, which can prevent different desensitized data from being displayed as the same data, and can improve log exclusion efficiency.
In a first aspect, an embodiment of the present application provides a log desensitization method, including:
loading a log file;
traversing the sensitive information of the log file;
acquiring mark information in currently traversed sensitive information;
desensitizing the sensitive information according to the mark information, wherein the mark information is used for identifying the desensitized sensitive information.
In the implementation process, different from the prior art, the method and the device for log record desensitization are used for traversing the sensitive information in the log file and extracting the mark information in the currently traversed sensitive information, and because the mark information can distinguish different sensitive information, desensitization processing is performed on the sensitive information according to the mark information, so that the desensitized sensitive information has distinctiveness, and a worker can quickly locate the sensitive information and other information corresponding to the sensitive information during log record investigation, thereby accelerating the log record removing process and improving operation and maintenance efficiency.
Further, the method further comprises: generating index information of the log file;
encrypting the sensitive information to obtain encrypted information;
and storing the encryption information according to the index information.
In the implementation process, on the basis of partial desensitization, complete desensitization is further performed to obtain the encrypted information, index information is further generated, the encrypted information is stored on the basis of the index information, and therefore staff can conveniently acquire the encrypted information according to the index information when needed subsequently, and then decrypt the encrypted information to obtain the original sensitive information. Based on the above embodiment, the security of the information is improved, the privacy of the user is protected, and meanwhile, complete sensitive information can be obtained at any time in the operation and maintenance process.
Further, the step of acquiring, by the root, flag information in the currently traversed sensitive information includes:
determining distinguishing information in the sensitive information;
and generating the mark information according to the distinguishing information.
In the implementation process, the sensitive distinguishing information is the distinguishing characteristic among different sensitive information, the mark information is generated according to the distinguishing information, so that the mark information has distinguishing performance, the different sensitive information still has distinguishing degree after desensitization, the sensitive information can be conveniently positioned by workers, and the maintenance efficiency is improved.
Further, the step of acquiring the flag information in the currently traversed sensitive information includes:
acquiring a main body corresponding to the sensitive information;
acquiring a plurality of sensitive information corresponding to the main body;
merging the plurality of sensitive information corresponding to the main body to obtain merged sensitive information;
and generating the mark information according to the combined sensitive information.
In the implementation process, the sensitive information is used for describing a certain attribute of different subjects, so that a plurality of sensitive information of the subject corresponding to the sensitive information is obtained, the sensitive information is combined to obtain combined sensitive information, and the mark information is generated according to the combined sensitive information. Considering that the uniform sensitive information of different subjects may be the same after desensitization, the mark information obtained by combining a plurality of sensitive information can reduce the possibility that the sensitive information of different subjects after desensitization is the same.
Further, the step of determining the distinguishing information in the sensitive information includes:
and if the sensitive information is the identity card information, determining the first two digits and the last three digits of the identity card information as the distinguishing information.
In the implementation process, a method for acquiring the distinguishing information is provided, and the distinguishing information is determined based on the method, so that the situation that a large amount of same data exists in the desensitized sensitive information can be reduced to a certain extent.
Further, the desensitizing process of the sensitive information according to the mark information includes:
selecting a regular expression from a plurality of preset regular expressions;
acting the selected expression on the mark information to obtain processed mark information;
and desensitizing the sensitive information according to the processed mark information.
In the implementation process, one regular expression is selected from a plurality of preset regular expressions to act on the sensitive information, so that if the same sign information exists, the sensitive information after desensitization can further have the same data based on the method.
Further, the step of generating the flag information according to the merged sensitive information includes:
determining initial mark information in the merged sensitive information;
and adjusting the sequence of the initial mark information according to a preset algorithm to obtain the mark information.
In the implementation process, the marker information is acquired by adopting a sequential adjustment mode, a complex algorithm is not needed, and the condition that the desensitized sensitive information has the same data can be further reduced.
In a second aspect, an embodiment of the present application provides a log desensitization apparatus, including:
the loading module is used for loading the log file;
the traversal module is used for traversing the sensitive information of the log file;
the mark information acquisition module is used for acquiring mark information in the currently traversed sensitive information;
and the desensitization module is used for desensitizing the sensitive information according to the mark information, and the mark information is used for identifying the desensitized sensitive information.
In the implementation process, different from the prior art, the method and the device for log clearing are different from the prior art in that the sensitive information in the log file is traversed, the mark information in the currently traversed sensitive information is extracted, and different sensitive information can be distinguished by the mark information, so that desensitization processing is performed on the sensitive information according to the mark information, the desensitized sensitive information can be distinguished, and a worker can quickly locate the sensitive information and other information corresponding to the sensitive information during log clearing, so that the log clearing process is accelerated, and the operation and maintenance efficiency is improved.
In a third aspect, an embodiment of the present application provides an electronic device, including: memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method according to any of the first aspect when executing the computer program.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium having instructions stored thereon, which when executed on a computer, cause the computer to perform the method according to any one of the first aspect.
Additional features and advantages of the disclosure will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the above-described technology disclosed herein.
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic flowchart of a log desensitization method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a logging desensitization apparatus according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
Example 1
Referring to fig. 1, an embodiment of the present application provides a log desensitization method, including:
s1: loading a log file;
s2: traversing the sensitive information of the log file;
s3: acquiring mark information in the currently traversed sensitive information;
s4: desensitizing the sensitive information according to the mark information, wherein the mark information is used for identifying the desensitized sensitive information.
For example, marker information may be employed as sensitive information after desensitization.
For example, if there are two identity card numbers of the user, in the prior art, the two identity card numbers are both replaced by a star number, so that when a worker performs log analysis, it is difficult to obtain the sensitive information for analysis, the worker needs to apply for obtaining the original sensitive information, the whole process is very long, and the maintenance efficiency is low. In the method implemented by the embodiment of the application, the mark information is acquired based on the two pieces of identification card information, the mark information can distinguish different sensitive information, and then the sensitive information is desensitized based on the mark information, so that the desensitized sensitive information has distinctiveness. The staff can not encounter a lot of consistent desensitized mark information when maintaining and repairing the loophole, thereby realizing accurate analysis, positioning and elimination of the log file.
In the implementation process, different from the prior art, the method and the device for log record desensitization are used for traversing the sensitive information in the log file and extracting the mark information in the currently traversed sensitive information, and because the mark information can distinguish different sensitive information, desensitization processing is performed on the sensitive information according to the mark information, so that the desensitized sensitive information has distinctiveness, and a worker can quickly locate the sensitive information and other information corresponding to the sensitive information during log record investigation, thereby accelerating the log record removing process and improving operation and maintenance efficiency.
In a possible embodiment, the method further comprises: generating index information of the log file;
encrypting the sensitive information to obtain encrypted information;
and storing the encryption information according to the index information.
Illustratively, in the process of maintaining software and a server and repairing vulnerabilities, a complete log file needs to be acquired sometimes, and since sensitive information is related to privacy of a user and operation of an enterprise, the sensitive information is encrypted to obtain encrypted information, corresponding index information is generated according to the sensitive information, the encrypted information is stored according to the index information, and when an operation and maintenance technician needs to acquire original sensitive information, the encrypted information needs to be acquired and decrypted based on the index information. The index information may be that the sensitive information corresponds to the MD5 code or other information that has a lower likelihood of index collisions.
In a possible implementation manner, the encrypted information is stored on a specific server, and when obtaining the sensitive information, the operation and maintenance personnel needs to submit the identity information first, and after verifying the identity information, send the encrypted sensitive information to the client corresponding to the operation and maintenance personnel.
In the implementation process, on the basis of partial desensitization, complete desensitization is further performed to obtain the encrypted information, the index information is further generated, the encrypted information is stored on the basis of the index information, and therefore a worker can conveniently obtain the encrypted information according to the index information when needed subsequently, and then decrypt the encrypted information to obtain the original sensitive information. Based on the above embodiment, the security of the information is improved, the privacy of the user is protected, and meanwhile, complete sensitive information can be obtained at any time in the operation and maintenance process.
In a possible implementation manner, the step of the root acquiring the flag information in the sensitive information of the current traversal includes: determining distinguishing information in the sensitive information; and generating the mark information according to the distinguishing information.
For example, if the sensitive information is an order or a bank card number, only the first three bits of information and the last three bits of information, which are the distinguishing information, can be retained through a desensitization principle, and the mark information is directly generated according to the distinguishing information. If the sensitive information is address information, the first four characters and the last 4 characters can be used as distinguishing information, and the mark information can be generated according to the distinguishing information.
The identification information of the type to which the sensitive information belongs may be added before the distinguishing information to form the mark information, for example, if the information is the id card information, the letter AIB is directly added before the distinguishing information to obtain the mark information.
In a possible implementation manner, the distinguishing information may be further encrypted by using a preset conversion algorithm, or the distinguishing information may be directly used as the flag information.
In the implementation process, the sensitive distinguishing information is the distinguishing characteristic among different sensitive information, the mark information is generated according to the distinguishing information, so that the mark information has distinguishing performance, the different sensitive information still has distinguishing degree after desensitization, the sensitive information can be conveniently positioned by workers, and the maintenance efficiency is improved.
In a possible implementation manner, the step of obtaining flag information in the sensitive information of the current traversal includes:
acquiring a main body corresponding to the sensitive information;
acquiring a plurality of sensitive information corresponding to the main body;
merging the plurality of sensitive information corresponding to the main body to obtain merged sensitive information;
and generating the mark information according to the combined sensitive information.
Illustratively, the relevant information of a client includes: when the address, the telephone, the order number, the order information, the bank card number information and the like are processed according to the method, a situation may exist that the telephone numbers of different customers are still the same after being processed, and at this time, the investigation is difficult to be carried out, so for further distinguishing, the telephone number and the order number can be firstly combined to obtain new information, and then the information is processed based on the information to obtain the mark information.
In the implementation process, the sensitive information is used for describing a certain attribute of different main bodies, so that a plurality of pieces of sensitive information of the main body corresponding to the sensitive information are obtained, the plurality of pieces of sensitive information are combined to obtain combined sensitive information, and the mark information is generated according to the combined sensitive information. Considering that the uniform sensitive information of different subjects may be the same after desensitization, the mark information obtained by combining a plurality of sensitive information can reduce the possibility that the sensitive information of different subjects after desensitization is the same.
In a possible embodiment, the step of determining the distinguishing information in the sensitive information includes:
and if the sensitive information is the identity card information, determining the first two digits and the last three digits of the identity card information as the distinguishing information.
Illustratively, the first three bits of information of the identity card information can represent the region where the subject is located, and the last three bits of information of the identity card information can identify the birthday of the subject to a certain extent. Therefore, based on the mode, different identity card information can be distinguished, and sensitive information can be hidden.
In the implementation process, a method for acquiring the distinguishing information is provided, and the distinguishing information is determined based on the method, so that the situation that a large amount of same data exists in the desensitized sensitive information can be reduced to a certain extent.
In a possible implementation manner, the step of desensitizing the sensitive information according to the flag information includes:
selecting a regular expression from a plurality of preset regular expressions;
acting the selected expression on the mark information to obtain processed mark information;
and carrying out desensitization processing on the sensitive information according to the processed mark information.
For example, in consideration of the situation, the flag information corresponding to the multiple different subjects is the same, and at this time, the distinction cannot be performed, so that after the flag information is obtained each time, one regular expression is selected from the multiple regular expressions, the regular expression is applied to the flag information to obtain the processed flag information, and the processed flag information is used for desensitizing the sensitive information.
In the above embodiments, the regular expressions correspond to different data processing methods, for example, the first regular expression is a character repeated at the end, and the second regular expression is a character repeated at the end of the flag information.
The specific form of the regular expression is not limited, and in the practical application process, the regular expression is not required to be too complex and can be used for exclusion.
Each regular expression has a corresponding identifier, and the desensitized sensitive information includes the identifier of the adopted regular expression.
In the implementation process, one regular expression is selected from a plurality of preset regular expressions to act on the sensitive information, so that if the same mark information exists, the situation that the desensitized sensitive information has the same data can be further realized based on the method.
In a possible implementation manner, the step of generating the flag information according to the merged sensitive information includes:
determining initial mark information in the merged sensitive information;
and adjusting the sequence of the initial mark information according to a preset algorithm to obtain the mark information.
For example, if the combined sensitive information is 1234567, the character may be adjusted, where 123 is the flag information corresponding to the phone number, and 4567 is the flag information of the phone number, so that the adjustment is still differentiated, but the outsider cannot determine what the actual information of the acquired log file is.
In the implementation process, the marker information is acquired by adopting a sequential adjustment mode, a complex algorithm is not needed, and the condition that the desensitized sensitive information has the same data can be further reduced.
Example 2
Referring to fig. 2, a log desensitization apparatus according to an embodiment of the present application includes:
the loading module 1 is used for loading the log file;
the traversal module 2 is used for traversing the sensitive information of the log file;
the mark information acquisition module 3 is used for acquiring mark information in the currently traversed sensitive information;
and the desensitization module 4 is used for performing desensitization treatment on the sensitive information according to the mark information, and the mark information is used for identifying the desensitized sensitive information.
In the implementation process, different from the prior art, the method and the device for log record desensitization are used for traversing the sensitive information in the log file and extracting the mark information in the currently traversed sensitive information, and because the mark information can distinguish different sensitive information, desensitization processing is performed on the sensitive information according to the mark information, so that the desensitized sensitive information has distinctiveness, and a worker can quickly locate the sensitive information and other information corresponding to the sensitive information during log record investigation, thereby accelerating the log record removing process and improving operation and maintenance efficiency.
In one possible embodiment, the apparatus further comprises: the storage module is used for generating index information of the log file;
encrypting the sensitive information to obtain encrypted information;
and storing the encryption information according to the index information.
In the implementation process, on the basis of partial desensitization, complete desensitization is further performed to obtain the encrypted information, index information is further generated, the encrypted information is stored on the basis of the index information, and therefore staff can conveniently acquire the encrypted information according to the index information when needed subsequently, and then decrypt the encrypted information to obtain the original sensitive information. Based on the above embodiment, the security of the information is improved, the privacy of the user is protected, and meanwhile, complete sensitive information can be obtained at any time in the operation and maintenance process.
In a possible implementation manner, the mark information obtaining module is further configured to determine distinguishing information in the sensitive information;
and generating the mark information according to the distinguishing information.
In the implementation process, the sensitive distinguishing information is the distinguishing characteristic among different sensitive information, the mark information is generated according to the distinguishing information, so that the mark information has distinguishing performance, the different sensitive information still has distinguishing degree after desensitization, the sensitive information can be conveniently positioned by workers, and the maintenance efficiency is improved.
In a possible implementation manner, the mark information obtaining module is further configured to obtain a main body corresponding to the sensitive information;
acquiring a plurality of sensitive information corresponding to the main body;
merging the plurality of sensitive information corresponding to the main body to obtain merged sensitive information;
and generating the mark information according to the combined sensitive information.
In the implementation process, the sensitive information is used for describing a certain attribute of different subjects, so that a plurality of sensitive information of the subject corresponding to the sensitive information is obtained, the sensitive information is combined to obtain combined sensitive information, and the mark information is generated according to the combined sensitive information. Considering that the uniform sensitive information of different subjects may be the same after desensitization, the mark information obtained by combining a plurality of sensitive information can reduce the possibility that the sensitive information of different subjects after desensitization is the same.
In a possible embodiment, the desensitization module is further configured to determine, if the sensitive information is identification card information, the first two digits and the last three digits of the identification card information as the distinguishing information.
In a possible implementation manner, the sign information obtaining module is further configured to select a regular expression from a plurality of preset regular expressions;
acting the selected expression on the mark information to obtain processed mark information;
and desensitizing the sensitive information according to the processed mark information.
In a possible implementation manner, the mark information obtaining module is further configured to determine initial mark information in the merged sensitive information;
and adjusting the sequence of the initial mark information according to a preset algorithm to obtain the mark information.
Fig. 3 shows a block diagram of an electronic device according to an embodiment of the present disclosure, where fig. 3 is a block diagram of the electronic device. The electronic device may comprise a processor 31, a communication interface 32, a memory 33 and at least one communication bus 34. Wherein the communication bus 34 is used for realizing direct connection communication of these components. In the embodiment of the present application, the communication interface 32 of the electronic device is used for performing signaling or data communication with other node devices. The processor 31 may be an integrated circuit chip having signal processing capabilities.
The Processor 31 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor 31 may be any conventional processor or the like.
The Memory 33 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The memory 33 stores computer readable instructions which, when executed by the processor 31, enable the electronic device to perform the various steps involved in the above-described method embodiments.
Optionally, the electronic device may further include a memory controller, an input output unit.
The memory 33, the memory controller, the processor 31, the peripheral interface, and the input/output unit are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, these components may be electrically connected to each other via one or more communication buses 34. The processor 31 is adapted to execute executable modules stored in the memory 33, such as software functional modules or computer programs comprised by the electronic device.
The input and output unit is used for providing a task for a user to create and start an optional time period or preset execution time for the task creation so as to realize the interaction between the user and the server. The input/output unit may be, but is not limited to, a mouse, a keyboard, and the like.
It will be appreciated that the configuration shown in fig. 3 is merely illustrative and that the electronic device may include more or fewer components than shown in fig. 3 or have a different configuration than shown in fig. 3. The components shown in fig. 3 may be implemented in hardware, software, or a combination thereof.
The embodiments of the present application further provide a computer-readable storage medium, where instructions are stored on the computer-readable storage medium, and when the instructions are run on a computer, a computer program is executed by a processor to implement the method of the method embodiments, and details are not repeated here to avoid repetition.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above embodiments are merely examples of the present application and are not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined or explained in subsequent figures.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrases "comprising one of 8230; \8230;" 8230; "does not exclude the presence of additional like elements in a process, method, article, or apparatus that comprises the element.

Claims (8)

1. A method of log desensitization, comprising:
loading a log file;
traversing the sensitive information of the log file;
acquiring mark information in the currently traversed sensitive information;
desensitizing the sensitive information according to the mark information, wherein the mark information is used for identifying the desensitized sensitive information;
the step of obtaining the mark information in the currently traversed sensitive information includes:
acquiring a main body corresponding to the sensitive information;
acquiring a plurality of sensitive information corresponding to the main body;
merging the plurality of sensitive information corresponding to the main body to obtain merged sensitive information;
generating the mark information according to the combined sensitive information;
the step of desensitizing the sensitive information according to the flag information includes:
selecting a regular expression from a plurality of preset regular expressions;
acting the selected expression on the mark information to obtain processed mark information;
and desensitizing the sensitive information according to the processed mark information.
2. The log desensitization method according to claim 1, further comprising: generating index information of the log file;
encrypting the sensitive information to obtain encrypted information;
and storing the encryption information according to the index information.
3. The log desensitization method according to claim 2, wherein said step of obtaining flag information in the sensitive information currently traversed comprises:
determining distinguishing information in the sensitive information;
and generating the mark information according to the distinguishing information.
4. A log desensitization method according to claim 3, wherein said step of determining discriminative information among said sensitive information comprises:
and if the sensitive information is the identity card information, determining the first two digits and the last three digits of the identity card information as the distinguishing information.
5. The log desensitization method according to claim 1, wherein the step of generating the flag information based on the merged sensitive information comprises:
determining initial mark information in the merged sensitive information;
and adjusting the sequence of the initial mark information according to a preset algorithm to obtain the mark information.
6. A logging desensitization apparatus, comprising:
the loading module is used for loading the log file;
the traversal module is used for traversing the sensitive information of the log file;
the mark information acquisition module is used for acquiring mark information in the currently traversed sensitive information;
the desensitization module is used for desensitizing the sensitive information according to the mark information, and the mark information is used for identifying the desensitized sensitive information;
the mark information acquisition module is also used for acquiring a main body corresponding to the sensitive information;
acquiring a plurality of sensitive information corresponding to the main body;
merging the plurality of sensitive information corresponding to the main body to obtain merged sensitive information;
generating the mark information according to the combined sensitive information;
the sign information acquisition module is also used for selecting a regular expression from a plurality of preset regular expressions;
acting the selected expression on the mark information to obtain processed mark information;
and desensitizing the sensitive information according to the processed mark information.
7. An electronic device, comprising: memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method according to any of claims 1-5 when executing the computer program.
8. A computer-readable storage medium having stored thereon instructions which, when executed on a computer, cause the computer to perform the method of any one of claims 1-5.
CN202211670424.XA 2022-12-26 2022-12-26 Log desensitization method and device, electronic equipment and storage medium Active CN115688184B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211670424.XA CN115688184B (en) 2022-12-26 2022-12-26 Log desensitization method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211670424.XA CN115688184B (en) 2022-12-26 2022-12-26 Log desensitization method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN115688184A CN115688184A (en) 2023-02-03
CN115688184B true CN115688184B (en) 2023-03-31

Family

ID=85055001

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211670424.XA Active CN115688184B (en) 2022-12-26 2022-12-26 Log desensitization method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN115688184B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114021185A (en) * 2021-10-29 2022-02-08 深圳市欢太数字科技有限公司 Log desensitization method, log desensitization device, electronic device, and readable storage medium
CN114626097A (en) * 2022-03-22 2022-06-14 中国平安人寿保险股份有限公司 Desensitization method, desensitization device, electronic apparatus, and storage medium
CN114896628A (en) * 2022-05-16 2022-08-12 中国银行股份有限公司 Data desensitization method and device
CN115186290A (en) * 2022-06-20 2022-10-14 中国电信股份有限公司 Data processing method and device, electronic equipment and storage medium

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8775364B2 (en) * 2011-05-05 2014-07-08 Telcordia Technologies, Inc. Model-theoretic approach to data anonymity and inference control
CN105426445A (en) * 2015-11-06 2016-03-23 天津佳宁坤祥科技有限公司 Format-preserving data desensitization method
CN106203139A (en) * 2016-07-13 2016-12-07 成都知道创宇信息技术有限公司 A kind of data local desensitization method
CN108289095A (en) * 2018-01-02 2018-07-17 诚壹泰合(北京)科技有限公司 A kind of sensitive data storage method, apparatus and system
CN108681676B (en) * 2018-04-03 2022-10-04 北京市商汤科技开发有限公司 Data management method and apparatus, system, electronic device, program, and storage medium
CN109558748B (en) * 2018-11-23 2020-11-03 泰康保险集团股份有限公司 Data processing method and device, electronic equipment and storage medium
US11216587B2 (en) * 2019-04-19 2022-01-04 Salesforce.Com, Inc. Log tokenization in an integration platform
CN111310224B (en) * 2020-01-16 2023-06-02 深圳平安医疗健康科技服务有限公司 Log desensitization method, device, computer equipment and computer readable storage medium
CN111818036B (en) * 2020-06-30 2021-06-04 平安科技(深圳)有限公司 Sensitive information protection method and device, computing equipment and storage medium
CN112000980B (en) * 2020-07-06 2022-02-22 拉卡拉支付股份有限公司 Data processing method and device
CN111950022A (en) * 2020-08-10 2020-11-17 国家计算机网络与信息安全管理中心 Desensitization method, device and system based on structured data
CN113868698A (en) * 2021-08-26 2021-12-31 上海上讯信息技术股份有限公司 File desensitization method and equipment
CN114048501A (en) * 2021-10-14 2022-02-15 中国银联股份有限公司 Data desensitization method, federal learning method and system
CN115081016A (en) * 2022-06-14 2022-09-20 深圳云创数安科技有限公司 Log desensitization method and device, electronic equipment and storage medium
CN115270186A (en) * 2022-08-05 2022-11-01 中国平安财产保险股份有限公司 Method, device, computer equipment and storage medium for desensitizing log

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114021185A (en) * 2021-10-29 2022-02-08 深圳市欢太数字科技有限公司 Log desensitization method, log desensitization device, electronic device, and readable storage medium
CN114626097A (en) * 2022-03-22 2022-06-14 中国平安人寿保险股份有限公司 Desensitization method, desensitization device, electronic apparatus, and storage medium
CN114896628A (en) * 2022-05-16 2022-08-12 中国银行股份有限公司 Data desensitization method and device
CN115186290A (en) * 2022-06-20 2022-10-14 中国电信股份有限公司 Data processing method and device, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
滕金芳 ; 钟诚 ; .基于聚类的敏感属性-多样性匿名化算法.计算机工程与设计.2010,(20),第46-49页. *

Also Published As

Publication number Publication date
CN115688184A (en) 2023-02-03

Similar Documents

Publication Publication Date Title
US11468192B2 (en) Runtime control of automation accuracy using adjustable thresholds
CA2906475C (en) Method and apparatus for substitution scheme for anonymizing personally identifiable information
CN110096897B (en) Data leakage source positioning method and device based on data desensitization processing
CN111767565A (en) Data desensitization processing method, processing device and storage medium
CN108009435B (en) Data desensitization method, device and storage medium
CN107563176A (en) Login authentication method and system based on USB flash disk, readable storage medium and computer
CN111914029A (en) Block chain-based medical data calling method and device, electronic equipment and medium
CN115238286A (en) Data protection method and device, computer equipment and storage medium
CN112765673A (en) Sensitive data statistical method and related device
CN112329043A (en) Information encryption processing method, device, computer equipment and medium
US11899770B2 (en) Verification method and apparatus, and computer readable storage medium
CN108090364B (en) Method and system for positioning data leakage source
CN115688184B (en) Log desensitization method and device, electronic equipment and storage medium
CN117592108A (en) Interface data desensitization processing method and device
CN116055067B (en) Weak password detection method, device, electronic equipment and medium
CN112711570A (en) Log information processing method and device, electronic equipment and storage medium
CN112328975A (en) Product software authorization management method, terminal device and medium
CN109003345B (en) Identity verification method and device and electronic equipment
CN109729076B (en) Data desensitization and inverse desensitization method and device, storage medium and terminal
CN116361774A (en) Password cracking method and device
CN115906171A (en) Desensitization verification method and device, electronic equipment and storage medium
CN115292731A (en) Encryption storage method of text reading and amending information and related equipment
CN113283677A (en) Index data processing method, device, equipment and storage medium
CN114584314B (en) Registration method, device, equipment and medium
CN111611459A (en) File data protection method based on block chain

Legal Events

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