Log processing method and device, storage medium and electronic equipment

By using hashing algorithms and rewrite converters in transaction log processing, the sensitive information in transaction logs is accurately detected and processed, and the problem of excessive CPU resource consumption caused by regular matching in the prior art is solved, and efficient sensitive information processing and resource utilization are achieved.

CN119739690APending Publication Date: 2025-04-01INDUSTRIAL AND COMMERCIAL BANK OF CHINA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411929430.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-04-01

AI Technical Summary

Technical Problem

In the prior art, desensitization of transaction logs requires continuous judgment of whether sensitive character strings exist in the transaction message log of standard format through a series of regular matches, and then hide or deform sensitive information according to preset rules to achieve desensitization. However, a large number of regular search operations can easily cause the problem of system resources (CPU) usage rate, and many regular search operations are repeated, resulting in a low resource utilization rate of the CPU.

Method used

When the transaction program is detected to generate a transaction log, the rewrite converter is called to obtain the target attribute field name of the transaction program, and hash the target attribute field name through the hash algorithm to obtain the eigenvalue. Then, if sensitive information exists in the transaction log based on the eigenvalue, and desensitize it when sensitive information exists.

Benefits of technology

By introducing hashing algorithm and key-value pair set optimization mechanism, the sensitive information in the transaction log is accurately and efficiently recognized and processed, which significantly reduces CPU resource consumption and improves resource utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119739690A_ABST
    Figure CN119739690A_ABST
Patent Text Reader

Abstract

The invention discloses a log processing method and device, a storage medium and electronic equipment, and relates to the field of financial science and technology. The method comprises the steps that when it is detected that a transaction program generates a transaction log, a rewriting converter is called to obtain a target attribute field name of the transaction program; performing Hash calculation on the target attribute field name through a Hash algorithm to obtain a feature value; detecting whether sensitive information exists in the transaction log according to the characteristic value; and under the condition that the sensitive information is detected to exist in the transaction log according to the characteristic value, desensitizing the sensitive information. According to the method and the device, the problems that in the prior art, transaction log desensitization needs to continuously judge whether a sensitive character string exists in a transaction message log in a standard format or not through a series of regular matching, then sensitive information is hidden or deformed according to a preset rule to achieve desensitization, many regular search operations are repeated, and the desensitization time is shortened are solved. And therefore, the resource utilization rate of the CPU is relatively low.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of financial technology, and specifically, to a log processing method, device, storage medium and electronic device. Background Art

[0002] In the current era of digital transactions, protecting user privacy and sensitive data security has become a top priority in the field of information technology. As an important document that records the transaction process, transaction logs usually contain a large amount of user sensitive information, such as account numbers, passwords, ID numbers, etc. Once this information is leaked, it will cause immeasurable losses to users. Therefore, desensitizing transaction logs, that is, hiding or deforming sensitive information, has become a necessary step in the data processing process.

[0003] Traditional desensitization methods mainly rely on regular expression matching, and each line in the transaction log is checked one by one through preset sensitive information patterns. Although regular matching can effectively identify a variety of sensitive information formats, its computational complexity is relatively high. Especially when processing large-scale, high-frequency transaction data, this computationally intensive processing method will lead to excessive consumption of system resources (especially CPU). In addition, due to the large amount of repeated field information in the transaction log, the regular matching operation is often repeated, which not only increases the computational burden, but also reduces the effective utilization of CPU resources.

[0004] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0005] The present application provides a log processing method, device, storage medium and electronic device to at least solve the problem in the prior art that transaction log desensitization requires continuous determination of whether sensitive strings exist in a transaction message log in a standard format through a series of regular matches, and then hiding or deforming the sensitive information according to preset rules to achieve desensitization. However, a large number of regular search operations can easily cause a high utilization rate of system resources (CPU), and many regular search operations are repeated, resulting in a technical problem of low CPU resource utilization.

[0006] According to one aspect of the present application, a log processing method is provided, including: when it is detected that a transaction program generates a transaction log, calling a rewrite converter to obtain a target attribute field name of the transaction program, wherein the probability that the target attribute field name contains sensitive information is greater than a preset threshold, and the sensitive information is information that is prohibited from being disclosed to the public without user authorization; performing hash calculation on the target attribute field name through a hash algorithm to obtain a feature value; detecting whether there is sensitive information in the transaction log according to the feature value; and when it is detected that there is sensitive information in the transaction log according to the feature value, desensitizing the sensitive information, wherein the desensitizing is used to replace the sensitive information with preset characters.

[0007] Optionally, the target attribute field name is hashed by a hash algorithm to obtain a characteristic value, including: obtaining a program identifier of the transaction program by rewriting a converter; concatenating the program identifier and the target attribute field name into a target string; and hashing the target string by a hash algorithm to obtain a characteristic value.

[0008] Optionally, performing a hash calculation on the target string using a hash algorithm to obtain a characteristic value includes: performing a hash calculation on the target string using a hash algorithm according to a target policy to obtain a characteristic value, wherein the target policy is used to constrain the length of the calculation result of the hash calculation to be a preset length and the calculation result to be a unique and non-repetitive value.

[0009] Optionally, detecting whether there is sensitive information in the transaction log based on the characteristic value includes: detecting whether there is a target key-value pair with the characteristic value as the primary key in the key-value pair set in the memory; when detecting that there is a target key-value pair with the characteristic value as the primary key in the key-value pair set, detecting whether the value in the target key-value pair is an empty character; when detecting that the value in the target key-value pair is not an empty character, determining that sensitive information exists in the transaction log; when detecting that the value in the target key-value pair is an empty character, determining that no sensitive information exists in the transaction log.

[0010] Optionally, after detecting whether there is a target key-value pair with the feature value as the primary key in the key-value pair set, the method also includes: when it is detected that there is no target key-value pair with the feature value as the primary key in the key-value pair set, traversing the transaction log to see whether there are characters with a similarity to the target character higher than a preset similarity based on the target character corresponding to the known sensitive information; when it is detected that there are characters with a similarity to the target character higher than the preset similarity in the transaction log, determining that sensitive information exists in the transaction log; when it is detected that there are no characters with a similarity to the target character higher than the preset similarity in the transaction log, determining that there is no sensitive information in the transaction log.

[0011] Optionally, after traversing the transaction log to see whether there are characters with a similarity to the target character higher than a preset similarity, the method also includes: when it is detected that there are characters with a similarity to the target character higher than a preset similarity in the transaction log, taking the character in the transaction log with a similarity to the target character higher than the preset similarity as the first character; obtaining the field name corresponding to the first character; generating a key-value pair using the field name corresponding to the first character as the value and the feature value as the primary key, and storing the generated key-value pair in a key-value pair set.

[0012] Optionally, after traversing the transaction log to see if there are characters with a similarity to the target character higher than a preset similarity, the method also includes: when it is detected that there are no characters with a similarity to the target character higher than a preset similarity in the transaction log, generating a key-value pair with the feature value as the primary key and an empty character as the value, and storing the generated key-value pair in a key-value pair set.

[0013] Optionally, when it is detected that the value in the target key-value pair is not a null character, it is determined that sensitive information exists in the transaction log, including: taking the value in the target key-value pair as target index information; taking the log content in the transaction log including the target index information, and / or the log content pointed to by the target index information as sensitive information.

[0014] According to another aspect of the present application, a log processing device is also provided, including: an acquisition unit, which, when detecting that a transaction program generates a transaction log, calls a rewrite converter to obtain a target attribute field name of the transaction program, wherein the probability that the target attribute field name contains sensitive information is greater than a preset threshold, and the sensitive information is information that is prohibited from being disclosed to the public without user authorization; a calculation unit, which performs hash calculation on the target attribute field name through a hash algorithm to obtain a characteristic value; a detection unit, which detects whether there is sensitive information in the transaction log according to the characteristic value; and a processing unit, which, when detecting the presence of sensitive information in the transaction log according to the characteristic value, performs desensitization processing on the sensitive information, wherein the desensitization processing is used to replace the sensitive information with preset characters.

[0015] Optionally, the calculation unit includes: a first acquisition subunit, a first concatenation subunit, and a first calculation subunit. The first acquisition subunit is used to obtain the program identifier of the transaction program through the rewriting converter; the first concatenation subunit is used to concatenate the program identifier and the target attribute field name into a target string; and the first calculation subunit is used to perform hash calculation on the target string through a hash algorithm to obtain a feature value.

[0016] Optionally, the computing unit includes: a second computing subunit, used to perform hash calculation on the target string through a hash algorithm according to a target strategy to obtain a characteristic value, wherein the target strategy is used to constrain the length of the calculation result of the hash calculation to be a preset length and the calculation result to be a unique and non-repetitive value.

[0017] Optionally, the detection unit includes: a first detection subunit, a second detection subunit, a first determination subunit, and a second determination subunit. The first detection subunit is used to detect whether there is a target key-value pair with the characteristic value as the primary key in the key-value pair set in the memory; the second detection subunit is used to detect whether the value in the target key-value pair is an empty character when it is detected that there is a target key-value pair with the characteristic value as the primary key in the key-value pair set; the first determination subunit is used to determine whether there is sensitive information in the transaction log when it is detected that the value in the target key-value pair is not an empty character; the second determination subunit is used to determine that there is no sensitive information in the transaction log when it is detected that the value in the target key-value pair is an empty character.

[0018] Optionally, the log processing device further includes: a traversal unit, a first determination unit, and a second determination unit. The traversal unit is used to, when it is detected that there is no target key-value pair with the feature value as the primary key in the key-value pair set, traverse the transaction log to see whether there are characters with a similarity higher than a preset similarity to the target character according to the target character corresponding to the known sensitive information; the first determination unit is used to, when it is detected that there are characters with a similarity higher than a preset similarity to the target character in the transaction log, determine that there is sensitive information in the transaction log; the second determination unit is used to, when it is detected that there are no characters with a similarity higher than a preset similarity to the target character in the transaction log, determine that there is no sensitive information in the transaction log.

[0019] Optionally, the log processing device further includes: a third determination unit, a first acquisition unit, and a first storage unit. The third determination unit is used to, when detecting that there is a character in the transaction log whose similarity to the target character is higher than a preset similarity, use the character in the transaction log whose similarity to the target character is higher than a preset similarity as the first character; the first acquisition unit is used to acquire the field name corresponding to the first character; and the first storage unit is used to generate a key-value pair using the field name corresponding to the first character as a value and the feature value as a primary key, and store the generated key-value pair in a key-value pair set.

[0020] Optionally, the log processing device also includes: a second storage unit, which is used to generate a key-value pair with the feature value as the primary key and the empty character as the value when it is detected that there is no character in the transaction log whose similarity with the target character is higher than a preset similarity, and store the generated key-value pair in a key-value pair set.

[0021] Optionally, the second determination subunit includes: a first determination module and a second determination module. The first determination module is used to use the value in the target key-value pair as the target index information; the second determination module is used to use the log content including the target index information in the transaction log and / or the log content pointed to by the target index information as sensitive information.

[0022] According to another aspect of the present application, a computer-readable storage medium is provided, the computer-readable storage medium including a stored executable program, wherein when the executable program runs, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned log processing method.

[0023] According to another aspect of the present application, an electronic device is also provided, comprising one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the above-mentioned log processing method.

[0024] According to another aspect of the present application, a computer program product is also provided, including computer instructions, which implement the steps of the above-mentioned log processing method when executed by a processor.

[0025] In the present application, first, when it is detected that a transaction program generates a transaction log, a rewrite converter is called to obtain the target attribute field name of the transaction program, wherein the probability that the target attribute field name contains sensitive information is greater than a preset threshold, and the sensitive information is information that is prohibited from being disclosed to the public without user authorization. Then, a hash calculation is performed on the target attribute field name through a hash algorithm to obtain a feature value, and then the transaction log is detected to contain sensitive information based on the feature value. Finally, when the transaction log is detected to contain sensitive information based on the feature value, the sensitive information is desensitized, wherein the desensitization is used to replace the sensitive information with preset characters, that is, by introducing a hash algorithm and a key The value pair set optimization mechanism achieves the purpose of accurately and efficiently identifying and processing sensitive information in transaction logs, thereby achieving the technical effect of significantly reducing CPU resource consumption and improving resource utilization. It further solves the problem in the prior art that transaction log desensitization requires continuous determination of whether sensitive strings exist in transaction message logs in a standard format through a series of regular matches, and then hiding or deforming sensitive information according to preset rules to achieve desensitization. However, a large number of regular search operations can easily cause the system resource (CPU) usage rate to soar, and many regular search operations are repeated, resulting in low CPU resource utilization. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0027] Figure 1 is a flowchart of an optional log processing method according to an embodiment of the present application;

[0028] Figure 2is a schematic diagram of an optional log processing device according to an embodiment of the present application;

[0029] Figure 3 It is a structural block diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0030] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0031] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0032] It should be noted that the collected information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for display, data for analysis, etc.) involved in this application are information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data are in compliance with relevant laws, regulations and standards, necessary confidentiality measures are taken, and public order and good customs are not violated, and corresponding operation entrances are provided for users to choose to authorize or refuse. For example, an interface is set up between this system and relevant users or institutions to provide users with corresponding operation entrances for users to choose to agree or refuse the results of automated decision-making; if the user chooses to refuse, the expert decision-making process will be entered.

[0033] It should be noted that an intelligent processing system can be used as the execution subject of the log processing method of the embodiment of the present application. It is understandable that the log processing method provided in the embodiment of the present application can also be executed by other systems or devices, and the embodiment of the present application does not specifically limit this.

[0034] According to an embodiment of the present application, a method embodiment of a log processing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0035] Figure 1 is a flow chart of an optional log processing method according to an embodiment of the present application, such as Figure 1 As shown, the method comprises the following steps:

[0036] Step S101, when it is detected that a transaction program generates a transaction log, a rewriting converter is called to obtain a target attribute field name of the transaction program.

[0037] In step S101, the probability that the target attribute field name contains sensitive information is greater than a preset threshold, and sensitive information is information that is prohibited from being disclosed to the public without user authorization.

[0038] Optionally, transaction programs refer to software programs that process transactions in financial institutions, e-commerce platforms, payment systems, etc., which will generate detailed log records when executing transaction processes.

[0039] Optionally, the transaction log refers to the transaction log automatically generated during the execution of the transaction program, which records all detailed information of the transaction, including but not limited to the transaction time, transaction amount, information of both parties to the transaction, etc.

[0040] Optionally, the rewrite converter is used in this embodiment to identify and extract field names containing sensitive information in the transaction log. This module can intelligently analyze the log format and determine which field names may contain sensitive information.

[0041] Optionally, configure the log printing PatternLayout (log output format) in the project's log4j / log4j2 configuration xml (eXtensible Markup Language) file. The example is as follows:

[0042] <PatternLayout

[0043] pattern="%d{yyyy-MM-ddHH:mm:ss.SSS}[%X{traceId} / %X{spanId}]%-5level%c{1}%msg%n" / >

[0044] Where %msg represents the original log message output by the program, that is, the actual log record content. Customize or modify the log message converter in the log4j or log4j2 framework (that is, the part that processes the %msg placeholder) to implement the function of desensitizing sensitive information before the log record is output to the file or stream.

[0045] It should be noted that log4j or log4j2 is a popular Java log framework. Log4j and log4j2 allow users to customize the log output style through XML configuration files to meet different log management and analysis requirements.

[0046] Optionally, the target attribute field name is a field name determined by the rewrite converter that has a high probability of containing sensitive information, such as customer ID number, bank card number, transaction details, etc.

[0047] Optionally, the intelligent processing system intelligently filters out field names that may contain sensitive information through the rewrite converter, so as to conduct subsequent sensitive information detection in a targeted manner, avoiding indiscriminate inspection of all fields in the log, and greatly reducing processing time and CPU resource consumption.

[0048] Step S102, performing hash calculation on the target attribute field name by using a hash algorithm to obtain a characteristic value.

[0049] Optionally, a hash algorithm is an encryption algorithm that converts an input (field name) of any length into an output (feature value) of fixed length. The characteristic of a hash algorithm is that a small change in the input will lead to a large change in the output, and the output result is unique.

[0050] Optionally, the feature value is a value obtained by calculating a hash algorithm and can uniquely identify the target attribute field name. This value can be used for fast retrieval and matching without storing and processing the original field name string.

[0051] Optionally, the intelligent processing system converts the target attribute field name into a feature value through a hash algorithm. Such processing can greatly reduce the use of storage space. At the same time, matching and retrieving information through feature values ​​is more efficient than directly using strings.

[0052] Step S103: Detect whether there is sensitive information in the transaction log according to the characteristic value.

[0053] Optionally, the intelligent processing system can quickly and accurately determine whether sensitive information exists in the transaction log through feature value matching detection, thereby avoiding the waste of system resources caused by a large number of regular search operations.

[0054] Step S104: when sensitive information is detected in the transaction log according to the characteristic value, the sensitive information is desensitized.

[0055] In step S104, the desensitization process is used to replace the sensitive information with preset characters.

[0056] Optionally, log desensitization is to mask or encrypt sensitive fields in the log, so desensitization processing refers to replacing sensitive information detected in the transaction log with preset characters to protect user privacy and security.

[0057] Optionally, once the intelligent processing system confirms the existence of sensitive information, it immediately initiates desensitization processing and replaces the sensitive information with preset characters to ensure that the sensitive information will not be accessed by unauthorized personnel, thereby improving the security of the entire system.

[0058] It can be seen from the contents of step S101 to step S104 that in the present application, first, when it is detected that the transaction program generates a transaction log, the rewrite converter is called to obtain the target attribute field name of the transaction program, wherein the probability that the target attribute field name contains sensitive information is greater than a preset threshold, and the sensitive information is information that is prohibited from being disclosed to the public without user authorization. Then, the target attribute field name is hashed by a hash algorithm to obtain a feature value, and then the transaction log is detected to determine whether there is sensitive information based on the feature value. Finally, when the transaction log is detected to contain sensitive information based on the feature value, the sensitive information is desensitized, wherein the desensitization is used to replace the sensitive information with preset characters. That is, by introducing the hash algorithm and the key-value pair set optimization mechanism, the purpose of accurately and efficiently identifying and processing sensitive information in the transaction log is achieved, thereby achieving the technical effect of significantly reducing CPU resource consumption and improving resource utilization, and further solving the problem in the prior art that transaction log desensitization requires continuous determination of whether sensitive strings exist in the transaction message log in a standard format through a series of regular matches, and then hiding or deforming the sensitive information according to preset rules to achieve desensitization, however, a large number of regular search operations easily cause the system resource (CPU) usage rate to soar, and many regular search operations are repeated, resulting in a low CPU resource utilization.

[0059] In an optional embodiment, the intelligent processing system obtains the program identifier of the transaction program by rewriting the converter, then concatenates the program identifier and the target attribute field name into a target string, and finally performs hash calculation on the target string through a hash algorithm to obtain a feature value.

[0060] Optionally, the intelligent processing system first obtains the program identifier of the transaction program (for example, the unique ID or name of the program) by calling the rewrite converter. The purpose of this step is to accurately identify the specific transaction program that generates the log, so as to implement differentiated sensitive information processing strategies according to different transaction programs. Subsequently, the intelligent processing system concatenates the obtained program identifier with the target attribute field name to form a target string. Through concatenation, a unique identifier related to a specific transaction program and sensitive field can be created, which is helpful for subsequent hash calculations and sensitive information detection. Next, the hash algorithm of the intelligent processing system performs hash calculations on the target string to obtain a feature value. The selection and configuration of the hash algorithm is the key. It needs to ensure that the length of the feature value meets the preset requirements, while ensuring the uniqueness and non-repetitiveness of the calculation result, so as to be able to efficiently and accurately detect sensitive information in the key-value pair set in the memory.

[0061] Alternatively, in a high-concurrency trading system, every millisecond of computing time is crucial. The use of hash algorithms and target string concatenation methods can greatly reduce the time required for sensitive information detection and ensure the system's response speed and stability when processing a large number of transaction logs. At the same time, due to the reduction in CPU resource usage, the system can handle more transaction requests, improving overall processing capabilities and efficiency. In addition, this method can also effectively prevent the leakage of sensitive information, ensure the security of user data, and meet data protection and compliance requirements.

[0062] It can be seen from the above content that by implementing the above steps, this embodiment can intelligently generate and use feature values ​​for each transaction log to detect whether it contains sensitive information. Compared with the regular matching method in the prior art, this embodiment significantly reduces unnecessary CPU operations and improves the efficiency and accuracy of sensitive information detection. More importantly, due to the use of feature values ​​as indexes, a large number of repeated regular search operations are avoided, thereby reducing the consumption of system resources and improving resource utilization, which is the key technical effect of this embodiment.

[0063] In an optional embodiment, the intelligent processing system performs a hash calculation on the target string using a hash algorithm according to a target strategy to obtain a feature value, wherein the target strategy is used to constrain the length of the calculation result of the hash calculation to be a preset length and the calculation result to be a unique and non-repetitive value.

[0064] Optionally, when processing logs, the intelligent processing system will perform hash calculations on the target string using a hash algorithm based on a specific target strategy to obtain a feature value. This process is designed to improve the efficiency and accuracy of sensitive information detection while ensuring the uniqueness and non-repetitiveness of the calculation results to avoid potential security issues caused by sensitive information in the logs.

[0065] Specifically, the target policy is set to control the length of the eigenvalue to meet the preset length requirements. The choice of the preset length needs to take into account the collision probability of the eigenvalue, that is, the possibility that different inputs produce the same eigenvalue. By limiting the length of the eigenvalue, efficient storage and retrieval in memory can be ensured while reducing the consumption of computing resources. In addition, the target policy also requires that the calculation results must be unique and non-repetitive, in order to avoid hash collisions and ensure that each sensitive information can be accurately identified and processed.

[0066] Optionally, when a transaction program generates a transaction log, the intelligent processing system first obtains the target attribute field names of the transaction program through a rewrite converter, which are pre-judged to contain sensitive information. Then, the system combines the obtained program identifier with the target attribute field name to form a target string. A hash algorithm is performed on the target string to generate a feature value, which will be used as an index for subsequent detection and desensitization processing.

[0067] As can be seen from the above content, the intelligent processing system uses a preset target strategy to perform hash calculation on the target string, which can effectively control the length of the characteristic value and ensure the uniqueness of the calculation result, thereby improving the accuracy and efficiency of sensitive information detection, avoiding excessive consumption of system resources, and achieving efficient protection and management of sensitive information. This method not only reduces the waste of CPU resources and improves resource utilization, but also ensures the security and privacy protection of log processing, and has a significant help in improving the operating efficiency and stability of the entire system. By implementing the method of the present invention, sensitive information can be effectively identified and processed while processing a large amount of log data, avoiding unnecessary computing burdens, and achieving efficient data protection and management.

[0068] In an optional embodiment, the intelligent processing system detects whether there is a target key-value pair with the characteristic value as the primary key in the key-value pair set in the memory. When it is detected that there is a target key-value pair with the characteristic value as the primary key in the key-value pair set, it detects whether the value in the target key-value pair is an empty character. When it is detected that the value in the target key-value pair is not an empty character, it is determined that sensitive information exists in the transaction log. When it is detected that the value in the target key-value pair is an empty character, it is determined that no sensitive information exists in the transaction log.

[0069] Optionally, the key-value pair set is a database maintained by the system, which is used to store the mapping relationship between the characteristic value of the sensitive information and the corresponding actual sensitive information field name, wherein the characteristic value serves as the primary key and the field name serves as the value.

[0070] Optionally, after receiving the transaction log, the first step taken by the intelligent processing system is to detect whether there is a target key-value pair with the previously calculated characteristic value as the primary key in the key-value pair set in the memory. The purpose of this step is to use the characteristic value to quickly locate possible sensitive information records, avoid slow full-text search in the log, and greatly improve the efficiency of sensitive information detection. If the target key-value pair with the characteristic value as the primary key is found in the key-value pair set, the system will further check whether the value in the key-value pair is an empty character. If the value in the target key-value pair is not an empty character, it indicates that the field name has been previously identified as a field containing sensitive information and has been stored in the key-value pair set. At this time, the intelligent processing system can be sure that there is sensitive information in the current transaction log, thereby skipping the subsequent regular search or similarity detection steps and directly performing desensitization processing, that is, replacing sensitive information with preset characters, reducing resource consumption and improving processing speed. On the contrary, if the value in the target key-value pair is detected to be an empty character, this means that although the feature value matches the known sensitive information feature, the system has not yet confirmed whether the field name corresponding to the feature value actually contains sensitive information in the current log. In this case, the intelligent processing system can determine that there is no sensitive information in the current transaction log that has been identified by the system, thereby avoiding unnecessary further inspections and improving resource utilization.

[0071] As can be seen from the above content, the intelligent processing system realizes the rapid and accurate detection of sensitive information in the transaction log. Using the key-value pair set with the characteristic value as the primary key, the system can quickly locate the records that may contain sensitive information without traversing the entire log, significantly reducing the consumption of system resources (especially CPU resources). When it is found that the value of the target key-value pair is not an empty character, the system can immediately confirm the existence of sensitive information, skip the redundant detection steps, and directly perform desensitization processing, thereby improving the processing efficiency. On the other hand, when the value of the target key-value pair is an empty character, the system can quickly determine that there is no known sensitive information in the transaction log, avoiding unnecessary waste of resources. Overall, this embodiment effectively solves the resource utilization problem in the process of sensitive information detection and desensitization processing of transaction logs in the prior art through the combined use of key-value pair sets and characteristic values, and realizes efficient, accurate and timely processing of sensitive information, which greatly improves the operating efficiency and security of the entire system.

[0072] In an optional embodiment, when the intelligent processing system detects that there is no target key-value pair with the feature value as the primary key in the key-value pair set, the intelligent processing system traverses the transaction log to determine whether there are characters with a similarity to the target character higher than a preset similarity based on the target character corresponding to the known sensitive information. When it is detected that there are characters with a similarity to the target character higher than the preset similarity in the transaction log, it is determined that sensitive information exists in the transaction log; when it is detected that there are no characters with a similarity to the target character higher than the preset similarity in the transaction log, it is determined that there is no sensitive information in the transaction log.

[0073] Optionally, known sensitive information refers to the content of sensitive fields that have been previously identified in the system, such as identity card number, bank card number, etc., which is crucial to protecting user privacy; target characters: typical components of sensitive information, or pattern features of sensitive information, used to quickly search for clues of sensitive information in logs; preset similarity: a set numerical threshold used to determine whether the characters found by the system in the log are similar enough to the target characters to be considered part of the sensitive information. The setting of this parameter needs to balance accuracy and efficiency to achieve the best detection effect.

[0074] Optionally, the intelligent processing system introduces a two-stage sensitive information detection mechanism based on feature value and target character similarity when processing transaction logs. When the system detects that there is no target key-value pair with a specific feature value as the primary key in the key-value pair set in the memory, this indicates that the sensitive information instance related to the feature value has not been recorded in the database. At this time, the system will start the second stage of detection, that is, according to the target characters corresponding to the known sensitive information, traverse the transaction log to check whether there are characters with a similarity higher than a preset similarity with these target characters.

[0075] Optionally, when the intelligent processing system does not find a matching sensitive information record by querying the key-value pair set through the feature value, the system will traverse the text content of the transaction log based on the target character of the known sensitive information to find a character or string with a high similarity to the target character. During the traversal process, the system will calculate the similarity between the found character and the target character. The similarity calculation can be based on the order, composition or pattern matching of the characters, such as using the Levenshtein distance algorithm (a measure of string similarity, used to calculate the minimum number of single-character editing operations required to convert two strings from one to another) or the Jaccard similarity algorithm (a An indicator for comparing the similarity of two sets, defined as the ratio of the size of the intersection of two sets to the size of the union), etc. If the system finds that the similarity between a character and a target character is higher than the preset similarity during the traversal process, then it can be determined that these characters or strings are part of the sensitive information. At this time, the system will mark this part of the content as the basis for subsequent desensitization processing. Finally, according to the results of the traversal detection, if there are characters in the transaction log whose similarity with the target character is higher than the preset similarity, the system determines that there is sensitive information in the log. Conversely, if the similarity of all characters does not meet the preset standard, the system determines that there is no sensitive information in the log and it can be safely stored or transmitted.

[0076] From the above content, it can be seen that the intelligent processing system includes a two-stage sensitive information detection mechanism, which realizes efficient and comprehensive detection and positioning of sensitive information in transaction logs by combining feature value query and target character similarity matching. First, by querying the key-value pair set through feature values, the system can quickly locate known sensitive information, which greatly improves the detection speed and reduces resource consumption. Secondly, when the feature value query fails, the system does not directly give up the detection, but adopts the target character similarity traversal method to further search for potential sensitive information. This method makes up for the possible omissions of feature value detection and ensures the comprehensiveness and accuracy of sensitive information detection. This method not only improves the efficiency of sensitive information detection and reduces unnecessary computing resource consumption, but also enhances the recognition ability of unknown or new types of sensitive information through a two-stage detection mechanism, providing a more robust and efficient sensitive information protection solution for the log processing system.

[0077] In an optional embodiment, when the intelligent processing system detects that there are characters in the transaction log whose similarity with the target character is higher than a preset similarity, the intelligent processing system takes the character in the transaction log whose similarity with the target character is higher than the preset similarity as the first character, then obtains the field name corresponding to the first character, and then uses the field name corresponding to the first character as the value and the characteristic value as the primary key to generate a key-value pair, and stores the generated key-value pair in a key-value pair set.

[0078] Optionally, when characters whose similarity with the target characters is higher than a preset similarity are detected in the transaction log, the intelligent processing system identifies these characters as first characters, wherein the first characters refer to characters in the log whose similarity with the target characters exceeds a preset value, and these characters may be components of sensitive information. The field name corresponding to the first character is then obtained, wherein the field name refers to a specific named area in the transaction log where information is recorded. By locating the field where the first character is located, the system can more accurately identify potential sources of sensitive information and provide accurate context for subsequent processing. The intelligent processing system then generates a key-value pair using the field name corresponding to the first character as the value and the characteristic value as the primary key. The key-value pair finally generated is stored in a key-value pair set.

[0079] From the above content, it can be seen that the intelligent processing system can accurately detect possible sensitive information in transaction logs, especially when the log format is not uniform or it is difficult to directly identify sensitive information through predefined rules. The flexibility and extensiveness of detection are improved through similarity comparison. At the same time, the efficiency of sensitive information detection is improved based on the generation and storage of key-value pairs. It also provides a means of rapid positioning for subsequent sensitive information processing, avoids repeated calculations and waste of resources, effectively reduces CPU usage, improves system resource utilization, and improves system throughput.

[0080] In an optional embodiment, when the intelligent processing system detects that there are no characters in the transaction log whose similarity with the target character is higher than a preset similarity, it generates a key-value pair using the feature value as the primary key and the empty character as the value, and stores the generated key-value pair in a key-value pair set.

[0081] Optionally, when the system completes the sensitive information detection of the transaction log, that is, traverses the entire log to find whether there are characters whose similarity with the target character is higher than a preset similarity, if the detection result shows that such characters do not exist in the log, the system will take the following steps: the system will use the previously calculated feature value as the primary key and the empty character (a placeholder that does not contain any actual information, used to indicate that no characters with a similarity with the target character higher than a preset similarity are found in the current transaction log) as the value to generate a new key-value pair, and the generated key-value pair (feature value as the primary key, empty character as the value) will be stored in the key-value pair set maintained by the system.

[0082] From the above content, it can be seen that for logs that have been confirmed to not contain sensitive information, the intelligent processing system records an identifier (i.e., a key-value pair of a characteristic value and an empty character) in the key-value pair set, so that when the logs with the same characteristic value are subsequently processed, the sensitive information status can be immediately determined, thus avoiding unnecessary detection calculations and significantly reducing system resource consumption. By reducing unnecessary detection steps, the intelligent processing system can process more transaction logs, improving the overall processing capacity and throughput, which is especially important for high-concurrency transaction environments, ensuring the stability and efficiency of the system. At the same time, for the update of the key-value pair set, it includes both the storage of sensitive information field names and the storage of empty characters. This dual-track storage mechanism enables the key-value pair set to not only be used to quickly locate sensitive information, but also to quickly exclude logs that do not contain sensitive information, improving the flexibility and efficiency of the storage structure.

[0083] In an optional embodiment, the intelligent processing system uses the value in the target key-value pair as the target index information, and uses the log content in the transaction log including the target index information, and / or the log content pointed to by the target index information as sensitive information.

[0084] Optionally, first, the intelligent processing system will identify the value (i.e., the non-empty character part) in the target key-value pair as the target index information. Next, the intelligent processing system will treat all log contents containing the target index information in the transaction log as sensitive information. This means that if the target index information is a field name known to contain sensitive data, the system will automatically treat all data under this field in the log as sensitive information and perform subsequent processing, such as desensitizing or encryption. In addition, the system will further check the log content pointed to by the target index information. The purpose of this step is to ensure that all information related to sensitive fields is captured, even if this information may be distributed in different parts of the log.

[0085] From the above content, it can be seen that the intelligent processing system can accurately identify the specific fields where sensitive information is located in the log by using the value in the target key-value pair as the target index information, avoiding extensive and time-consuming searches of the entire log, and improving the accuracy of sensitive information detection. At the same time, the system not only processes log content that directly contains the target index information, but also checks other log content related to the target index information to ensure that all possible sensitive information is included in the processing scope, enhancing the comprehensiveness of detection and data security. After determining that the value in the target key-value pair is not an empty character, the system directly regards its content as sensitive information. This mechanism reduces unnecessary regular search operations, saves CPU resources, and improves resource utilization and system processing efficiency.

[0086] The embodiment of the present application also provides a log processing device. It should be noted that the log processing device of the embodiment of the present application can be used to execute the log processing method provided by the embodiment of the present application. The log processing device provided by the embodiment of the present application is introduced below.

[0087] According to an embodiment of the present application, a device for implementing the above-mentioned log processing is also provided. Figure 2 is a schematic diagram of an optional log processing device according to an embodiment of the present application, such as Figure 2 As shown, the device includes: an acquisition unit 201, a calculation unit 202, a detection unit 203, and a processing unit 204.

[0088] Optionally, the acquisition unit 201 is used to call the rewrite converter to obtain the target attribute field name of the transaction program when it is detected that the transaction program generates a transaction log, wherein the probability that the target attribute field name contains sensitive information is greater than a preset threshold, and the sensitive information is information that is prohibited from being disclosed to the public without user authorization; the calculation unit 202 is used to perform hash calculation on the target attribute field name through a hash algorithm to obtain a characteristic value; the detection unit 203 is used to detect whether there is sensitive information in the transaction log according to the characteristic value; the processing unit 204 is used to desensitize the sensitive information when the presence of sensitive information in the transaction log is detected according to the characteristic value, wherein the desensitization is used to replace the sensitive information with preset characters.

[0089] Optionally, the calculation unit 202 includes: a first acquisition subunit, a first concatenation subunit, and a first calculation subunit. The first acquisition subunit is used to obtain the program identifier of the transaction program through the rewriting converter; the first concatenation subunit is used to concatenate the program identifier and the target attribute field name into a target string; and the first calculation subunit is used to perform hash calculation on the target string through a hash algorithm to obtain a feature value.

[0090] Optionally, the calculation unit 202 includes: a second calculation subunit, used to perform hash calculation on the target string through a hash algorithm according to a target policy to obtain a characteristic value, wherein the target policy is used to constrain the length of the calculation result of the hash calculation to be a preset length and the calculation result to be a unique and non-repetitive value.

[0091] Optionally, the detection unit 203 includes: a first detection subunit, a second detection subunit, a first determination subunit, and a second determination subunit. The first detection subunit is used to detect whether there is a target key-value pair with the characteristic value as the primary key in the key-value pair set in the memory; the second detection subunit is used to detect whether the value in the target key-value pair is an empty character when it is detected that there is a target key-value pair with the characteristic value as the primary key in the key-value pair set; the first determination subunit is used to determine whether there is sensitive information in the transaction log when it is detected that the value in the target key-value pair is not an empty character; the second determination subunit is used to determine that there is no sensitive information in the transaction log when it is detected that the value in the target key-value pair is an empty character.

[0092] Optionally, the log processing device further includes: a traversal unit, a first determination unit, and a second determination unit. The traversal unit is used to, when it is detected that there is no target key-value pair with the feature value as the primary key in the key-value pair set, traverse the transaction log to see whether there are characters with a similarity higher than a preset similarity to the target character according to the target character corresponding to the known sensitive information; the first determination unit is used to, when it is detected that there are characters with a similarity higher than a preset similarity to the target character in the transaction log, determine that there is sensitive information in the transaction log; the second determination unit is used to, when it is detected that there are no characters with a similarity higher than a preset similarity to the target character in the transaction log, determine that there is no sensitive information in the transaction log.

[0093] Optionally, the log processing device further includes: a third determination unit, a first acquisition unit, and a first storage unit. The third determination unit is used to, when detecting that there is a character in the transaction log whose similarity to the target character is higher than a preset similarity, use the character in the transaction log whose similarity to the target character is higher than a preset similarity as the first character; the first acquisition unit is used to acquire the field name corresponding to the first character; and the first storage unit is used to generate a key-value pair using the field name corresponding to the first character as a value and the feature value as a primary key, and store the generated key-value pair in a key-value pair set.

[0094] Optionally, the log processing device also includes: a second storage unit, which is used to generate a key-value pair with the feature value as the primary key and the empty character as the value when it is detected that there is no character in the transaction log whose similarity with the target character is higher than a preset similarity, and store the generated key-value pair in a key-value pair set.

[0095] Optionally, the second determination subunit includes: a first determination module and a second determination module. The first determination module is used to use the value in the target key-value pair as the target index information; the second determination module is used to use the log content including the target index information in the transaction log and / or the log content pointed to by the target index information as sensitive information.

[0096] An embodiment of the present application may provide an electronic device, Figure 3 is a structural block diagram of an electronic device according to an embodiment of the present application. Figure 3 As shown, the electronic device may include: one or more ( Figure 3 (only one is shown) processor 302, memory 304, storage controller, and peripheral interface, wherein the peripheral interface is connected to the radio frequency module, audio module and display.

[0097] Among them, the memory can be used to store software programs and modules, such as program instructions / modules corresponding to the methods and devices in the embodiments of the present application, and the processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0098] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: when it is detected that the transaction program generates a transaction log, call the rewrite converter to obtain the target attribute field name of the transaction program, wherein the probability that the target attribute field name contains sensitive information is greater than a preset threshold, and the sensitive information is information that is prohibited from being disclosed to the public without user authorization; hash calculation is performed on the target attribute field name through a hash algorithm to obtain a characteristic value; detect whether there is sensitive information in the transaction log according to the characteristic value; when the presence of sensitive information in the transaction log is detected according to the characteristic value, desensitize the sensitive information, wherein the desensitization is used to replace the sensitive information with preset characters.

[0099] The processor can also call the information and application programs stored in the memory through the transmission device to perform the following steps: obtain the program identifier of the transaction program by rewriting the converter; concatenate the program identifier and the target attribute field name into a target string; and perform hash calculation on the target string through a hash algorithm to obtain a feature value.

[0100] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: according to the target strategy, the target string is hashed by a hash algorithm to obtain a characteristic value, wherein the target strategy is used to constrain the length of the calculation result of the hash calculation to a preset length and the calculation result is a unique and non-repetitive value.

[0101] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: detect whether there is a target key-value pair with the characteristic value as the primary key in the key-value pair set in the memory; when it is detected that there is a target key-value pair with the characteristic value as the primary key in the key-value pair set, detect whether the value in the target key-value pair is an empty character; when it is detected that the value in the target key-value pair is not an empty character, determine that sensitive information exists in the transaction log; when it is detected that the value in the target key-value pair is an empty character, determine that no sensitive information exists in the transaction log.

[0102] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: when it is detected that there is no target key-value pair with the feature value as the primary key in the key-value pair set, traverse the transaction log to see whether there are characters with a similarity to the target character higher than a preset similarity based on the target character corresponding to the known sensitive information; when it is detected that there are characters with a similarity to the target character higher than a preset similarity in the transaction log, determine that sensitive information exists in the transaction log; when it is detected that there are no characters with a similarity to the target character higher than a preset similarity in the transaction log, determine that sensitive information does not exist in the transaction log.

[0103] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: when it is detected that there are characters in the transaction log whose similarity with the target character is higher than the preset similarity, use the character in the transaction log whose similarity with the target character is higher than the preset similarity as the first character; obtain the field name corresponding to the first character; use the field name corresponding to the first character as the value and the characteristic value as the primary key to generate a key-value pair, and store the generated key-value pair in a key-value pair set.

[0104] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: when it is detected that there are no characters in the transaction log whose similarity with the target character is higher than a preset similarity, a key-value pair is generated with the feature value as the primary key and the empty character as the value, and the generated key-value pair is stored in a key-value pair set.

[0105] The processor can also call the information and application stored in the memory through the transmission device to perform the following steps: use the value in the target key-value pair as the target index information; use the log content including the target index information in the transaction log, and / or the log content pointed to by the target index information as sensitive information.

[0106] It can be understood by those skilled in the art that Figure 3The structure shown is for illustration only, and the electronic device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (Mobile Internet Devices, MID), a PAD, or other terminal devices. Figure 3 The structure of the electronic device is not limited. Figure 3 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 3 Different configurations are shown.

[0107] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0108] The embodiment of the present application further provides a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the log processing method provided in the first embodiment.

[0109] Optionally, in this embodiment, the above storage medium may be located in any computer terminal in a computer terminal group in a computer network, or in any mobile terminal in a mobile terminal group.

[0110] The present application also provides a computer program product, which, when executed on a data processing device, is suitable for executing the steps of the log processing method.

[0111] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0112] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0113] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0114] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0115] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0116] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0117] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A log processing method, characterized in that: include: When detecting that a transaction program generates a transaction log, calling a rewrite converter to obtain a target attribute field name of the transaction program, wherein the probability that the target attribute field name contains sensitive information is greater than a preset threshold, and the sensitive information is information that is prohibited from being disclosed to the public without user authorization; Perform hash calculation on the target attribute field name using a hash algorithm to obtain a feature value; detecting whether the sensitive information exists in the transaction log according to the characteristic value; In a case where the presence of the sensitive information in the transaction log is detected according to the characteristic value, the sensitive information is desensitized, wherein the desensitization is used to replace the sensitive information with preset characters.

2. The log processing method according to claim 1, characterized in that: The target attribute field name is hashed using a hash algorithm to obtain a characteristic value, including: Obtaining a program identifier of the transaction program through the rewriting converter; Concatenate the program identifier and the target attribute field name into a target character string; The target character string is hashed using the hash algorithm to obtain the characteristic value.

3. The log processing method according to claim 2, characterized in that: Performing a hash calculation on the target character string using the hash algorithm to obtain the characteristic value includes: According to the target policy, the target character string is hashed using the hash algorithm to obtain the characteristic value, wherein the target policy is used to constrain the length of the calculation result of the hash calculation to be a preset length and the calculation result to be a unique and non-repeating value.

4. The log processing method according to claim 1, wherein: Detecting whether the sensitive information exists in the transaction log according to the characteristic value includes: Detect whether there is a target key-value pair with the characteristic value as the primary key in the key-value pair set in the memory; When detecting that a target key-value pair with the characteristic value as the primary key exists in the key-value pair set, detecting whether the value in the target key-value pair is an empty character; When detecting that the value in the target key-value pair is not the null character, determining that the sensitive information exists in the transaction log; When it is detected that the value in the target key-value pair is the empty character, it is determined that the sensitive information does not exist in the transaction log.

5. The log processing method according to claim 4, characterized in that: After detecting whether there is a target key-value pair with the characteristic value as a primary key in the key-value pair set, the method further includes: When it is detected that the target key-value pair with the characteristic value as the primary key does not exist in the key-value pair set, based on the target character corresponding to the known sensitive information, traversing the transaction log to see whether there is a character with a similarity higher than a preset similarity to the target character; In the case of detecting that a character having a similarity with the target character higher than a preset similarity exists in the transaction log, determining that the sensitive information exists in the transaction log; When it is detected that the transaction log does not contain any character having a similarity with the target character higher than a preset similarity, it is determined that the sensitive information does not exist in the transaction log.

6. The log processing method according to claim 5, characterized in that: After traversing the transaction log to determine whether there is a character whose similarity to the target character is higher than a preset similarity, the method further includes: In a case where a character having a similarity with the target character higher than a preset similarity is detected in the transaction log, the character having a similarity with the target character higher than the preset similarity in the transaction log is used as the first character; Get the field name corresponding to the first character; A key-value pair is generated with the field name corresponding to the first character as a value and the characteristic value as a primary key, and the generated key-value pair is stored in the key-value pair set.

7. The log processing method according to claim 5, characterized in that: After traversing the transaction log to determine whether there is a character whose similarity to the target character is higher than a preset similarity, the method further includes: When it is detected that there is no character in the transaction log whose similarity with the target character is higher than a preset similarity, a key-value pair is generated using the feature value as the primary key and an empty character as the value, and the generated key-value pair is stored in the key-value pair set.

8. The log processing method according to claim 4, characterized in that: When detecting that the value in the target key-value pair is not the null character, determining that the sensitive information exists in the transaction log includes: Using the value in the target key-value pair as target index information; The log content including the target index information in the transaction log and / or the log content pointed to by the target index information is used as the sensitive information.

9. A log processing device, characterized in that: include: an acquisition unit, which, upon detecting that a transaction program generates a transaction log, calls a rewriting converter to acquire a target attribute field name of the transaction program, wherein a probability that the target attribute field name contains sensitive information is greater than a preset threshold, and the sensitive information is information that is prohibited from being disclosed to the public without user authorization; A calculation unit, performing a hash calculation on the target attribute field name using a hash algorithm to obtain a characteristic value; a detection unit, configured to detect whether the sensitive information exists in the transaction log according to the characteristic value; The processing unit performs desensitization processing on the sensitive information when detecting the presence of the sensitive information in the transaction log according to the characteristic value, wherein the desensitization processing is used to replace the sensitive information with preset characters.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored executable program, wherein when the executable program is running, the device where the computer-readable storage medium is located is controlled to execute the log processing method according to any one of claims 1 to 8.

11. An electronic device, characterized in that: The system comprises one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors execute the log processing method according to any one of claims 1 to 8.

12. A computer program product comprising computer instructions, characterized in that When the computer instructions are executed by a processor, the steps of the log processing method according to any one of claims 1 to 8 are implemented.