Sensitive data identification method and device, equipment, medium and product

By dividing and aggregating the initial fields to form regular fragments, and constructing optimal regular expressions, the problem of excessive and inaccurate regular strings in the existing technology is solved, and the accuracy and efficiency of sensitive data identification are improved.

CN118656867APending Publication Date: 2024-09-17CHINA MOBILE INFORMATION TECHNOLOGY CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410850926.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-27
Publication Date
2024-09-17

AI Technical Summary

Technical Problem

When identifying sensitive data, the existing technology generates too many regular strings and is not accurate enough, resulting in low efficiency in identifying sensitive data.

Method used

By dividing and aggregating the initial fields, regular fragments are formed, and optimal regular expressions are constructed based on the regular fragments to identify sensitive data.

Benefits of technology

It reduces the number of regular strings, improves the accuracy and efficiency of sensitive data identification, and reduces resource consumption.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118656867A
    Figure CN118656867A
Patent Text Reader

Abstract

The invention discloses a sensitive data identification method, device and equipment, a medium and a product, relates to the technical field of data security, and discloses a sensitive data identification method, device and equipment, a storage medium and a computer program product, comprising: segmenting and converging initial fields to form regular fragments; wherein the initial field is a sensitive field in the sample data; determining an optimal regular expression in the regular expressions constructed based on the regular fragments; and identifying sensitive data in the overall data according to the optimal regular expression. And the sensitive data identification accuracy of the regular expression formed by the regular strings is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data security technology, and in particular to a sensitive data identification method, a sensitive data identification apparatus, a sensitive data identification device, a storage medium and a computer program product. Background Art

[0002] At present, in the field of data security technology, when identifying sensitive data, each sample data is often analyzed one by one. After any field in any sample data is found to be a sensitive field, a regular string is generated for each sensitive field. The regular expression composed of the regular string is used to identify sensitive data in other data.

[0003] However, many of the regular strings generated in this way have the same sensitive features. For example, newest is a sensitive field in the first sample data, and widest is a sensitive field in the second sample data. According to conventional means, two regular strings will be generated. However, it is often not newest and widest that are sensitive, but est that is sensitive. Then, in order to identify all sensitive fields containing est, a large number of regular strings will be generated according to conventional means. For example, cheapest is a sensitive field in the third sample data, and longest is a sensitive field in the fourth sample data. As a result, a large number of regular strings are required for subsequent sensitive data identification, and the sensitive data identification of the regular expression formed will not be accurate enough.

[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention

[0005] The main purpose of this application is to provide a sensitive data identification method, a sensitive data identification apparatus, a sensitive data identification device, a storage medium and a computer program product, aiming to solve the technical problem of inaccurate sensitive data identification.

[0006] To achieve the above objectives, the present application proposes a sensitive data identification method, the method comprising:

[0007] Segment and aggregate the initial fields to form regular segments; wherein the initial fields are sensitive fields in the sample data;

[0008] Determining an optimal regular expression among regular expressions constructed based on the regular fragments;

[0009] According to the optimal regular expression, sensitive data in the overall data is identified.

[0010] In one embodiment, the step of segmenting and aggregating the initial fields to form regular segments includes:

[0011] Split consecutive characters of the same type in the initial field to obtain substrings;

[0012] According to the substrings and the number of occurrences of the substrings, regular fragments are obtained by aggregation.

[0013] In one embodiment, the step of aggregating the regular fragments according to the substrings and the number of occurrences of the substrings includes:

[0014] Split substrings into individual characters;

[0015] Merge adjacent split characters to obtain byte pairs;

[0016] wherein the number of occurrences of the character and the byte pair is the same as the number of occurrences of the substring;

[0017] Fix the byte pairs that meet the preset fixed conditions to the characters after the substring is split, and obtain the new characters after the substring is split;

[0018] Return to the step of merging adjacent characters to obtain byte pairs, until the new byte pairs do not meet the preset fixed condition, or the number of repetitions of returning to the execution is greater than a preset number threshold;

[0019] The latest byte pair at the end of the execution will be returned as a regular fragment.

[0020] In one embodiment, the step of fixing the byte pairs satisfying the preset fixing condition to the characters after the substring is split includes:

[0021] After the adjacent split characters are first merged, the byte pairs that appear the most times are fixed to the characters after the substring is split;

[0022] After the adjacent split characters are merged for the non-first time, a target byte pair is determined according to a dynamic rule, and the target byte pair is fixed to the characters after the substring is split.

[0023] In one embodiment, the step of determining the target byte pair according to the dynamic rule comprises:

[0024] The byte pair with the largest number of occurrences in the latest byte pairs is used as the pending byte pair, and the first substring where the pending byte pair is located is determined;

[0025] Determine each historical fixed byte pair and each second substring where each historical fixed byte pair is located;

[0026] If the second substring includes the first substring, taking the pending byte pair as the target byte pair;

[0027] If the second substring does not include the first substring, determine whether the pending byte pair represents sensitivity. If the pending byte pair represents sensitivity, use the pending byte pair as the target byte pair.

[0028] In one embodiment, the step of determining whether the pending byte pair represents sensitivity includes:

[0029] Determine a target substring in the second substring that is different from the first substring, a maximum common byte pair of the target substring in the byte pairs currently merged, and a first occurrence number of the maximum common byte pair;

[0030] Determine the second number of occurrences of the byte pair that currently occurs the most times, the third number of occurrences of the first substring and the second substring, and the fourth number of occurrences of all substrings;

[0031] If the ratio of the first number of occurrences to the second number of occurrences is greater than or equal to the ratio of the third number of occurrences to the fourth number of occurrences, then determining the sensitivity of the undetermined byte pair to represent;

[0032] If the ratio of the first number of occurrences to the second number of occurrences is less than the ratio of the third number of occurrences to the fourth number of occurrences, it is determined that the pending byte pair fails to represent sensitivity.

[0033] In addition, to achieve the above purpose, the present application also proposes a sensitive data identification device, the device comprising:

[0034] An initialization module, used to segment and aggregate initial fields to form regular segments; wherein the initial fields are sensitive fields in the sample data;

[0035] A determination module, used to determine an optimal regular expression among regular expressions constructed based on the regular fragments;

[0036] An identification module is used to identify sensitive data in the overall data according to the optimal regular expression.

[0037] In addition, to achieve the above-mentioned purpose, the present application also proposes a sensitive data identification device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the sensitive data identification method described above.

[0038] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by the processor, the steps of the sensitive data identification method described above are implemented.

[0039] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, it implements the steps of the sensitive data identification method described above.

[0040] One or more technical solutions proposed in this application have at least the following technical effects:

[0041] In the present application, by segmenting and aggregating sensitive fields in sample data, regular fragments that can accurately indicate the sensitivity of sensitive fields are formed, wherein the regular fragments are partial sensitive fields determined by segmentation and aggregation, that is, partial fragments of sensitive fields determined by segmentation and aggregation, so that the entire sensitive field does not need to be used to generate regular fragments, but the partial fields that truly represent the sensitivity of sensitive fields are located to avoid interference with the number and accuracy of regular strings by the remaining fields that do not represent the sensitivity of sensitive fields, thereby reducing the number of regular strings while improving the accuracy of the generated regular strings in representing the sensitivity of sensitive fields, thereby improving the accuracy of sensitive data recognition of regular expressions composed of regular strings. At the same time, the efficiency of sensitive data recognition is improved and the resource consumption of sensitive data recognition is reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0043] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0044] Figure 1 A flowchart of the first embodiment of the sensitive data identification method of the present application is provided;

[0045] Figure 2 This is a schematic diagram of the module structure of the sensitive data identification device according to an embodiment of the present application;

[0046] Figure 3 Schematic diagram of the device structure of the hardware operating environment involved in the sensitive data identification method in the embodiment of the present application.

[0047] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0048] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0049] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0050] The present application provides a method for identifying sensitive data. Figure 1 , Figure 1 This is a flowchart of the first embodiment of the sensitive data identification method of the present application.

[0051] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device that can realize the above functions.

[0052] In this embodiment, the sensitive data identification method includes steps S10 to S30:

[0053] Step S10, segmenting and aggregating the initial fields to form regular segments; wherein the initial fields are sensitive fields in the sample data;

[0054] It should be noted that sensitive fields refer to fields with sensitive information in sample data, such as newest, widest, cheapest, longest and other sensitive fields in sample data, including sensitive information of "est". The purpose of segmenting and aggregating the initial fields is to locate and extract the sensitive information of "est" to form regular segments. In this embodiment, the method of identifying sensitive fields in sample data is not limited.

[0055] In addition, it should be noted that the character type of the initial field can be letters, numbers, and other symbols, etc. In this embodiment, the character type of the initial field is not limited.

[0056] In a feasible implementation, the continuous characters with the highest frequency of occurrence in all initial fields can be segmented, such as ab, bc, and bm, and then the segmented continuous characters can be aggregated to obtain regular segments, such as b, by removing duplicates. The segmented continuous characters can also be aggregated to obtain regular segments, such as abcm, by combining them.

[0057] In a feasible implementation, step S10 may include steps S101 to S102:

[0058] Step S101: splitting consecutive characters of the same type in the initial field to obtain substrings;

[0059] In a feasible implementation, step S101 may include steps a to d:

[0060] Step a: Add a processing parameter to all initial fields;

[0061] The initial value of the processing parameter is 0. The processing parameter is used to indicate whether the initial field has been processed. If the initial field has not been processed, the processing parameter value is 0. If the initial field has been processed, the processing parameter value is 1.

[0062] Step b: randomly select an initial field with an initial value of 0 for a processing parameter;

[0063] For example, if there are 1000 initial fields, then an unprocessed initial field (that is, an initial field with a processing parameter of 0) is randomly selected. Suppose initial field i is selected.

[0064] Step c: split the initial field i into substrings;

[0065] Continuous bits of the same type in the initial field i are extracted to obtain a substring, where the substring is a string composed of bits of the continuous type.

[0066] In a feasible implementation, step c may include steps c1 to c9:

[0067] Step c1: add an identification parameter to each bit of the initial field i, and the initial value of the identification parameter is 0;

[0068] The identification parameter indicates whether the bit has been processed. If it has not been processed, the initial field of the bit is 0. If it has been processed, the initial field of the bit is 1.

[0069] Step c2: take the first bit of the initial field i as the current bit;

[0070] Step c3: Determine the character type of the current position;

[0071] For example, if the current position is a number, then the character type is numeric, and \d can also be used to represent numeric type.

[0072] Step c4: Determine whether there is a next bit of the current bit;

[0073] Step c5: If the next bit of the current bit exists, execute steps c6-c8;

[0074] Step c6: Determine the character type of the next bit of the current bit;

[0075] Step c7: If the character type of the next bit is different from the character type of the current bit, all bits with identification parameters of 0 from the current bit forward (including the current bit) are taken as a whole to form a substring. The identification parameters of each bit of the substring are updated to 1. The next bit is taken as the current bit, and step c3 and subsequent steps are repeated;

[0076] Step c8: If the character type of the next bit is the same as the character type of the current bit, the next bit is used as the current bit, and step c3 and subsequent steps are repeated;

[0077] Step c9: If there is no next bit of the current bit, it means that all bits of the initial field i have been processed, and all bits with identification parameters of 0 from the current bit forward (including the current bit) are taken as a whole to form a substring. Update the identification parameters of each bit of the substring to 1. The substring division process of the initial field i ends, that is, step c ends.

[0078] Step d: Update the processing parameter of the initial field i to 1, and repeat step b and subsequent steps until there is no initial field with a processing parameter of 0.

[0079] At this point, all initial fields are segmented, and consecutive characters of the same type are formed into substrings.

[0080] In a feasible implementation manner, step S101 may further include step e:

[0081] Determine the number of occurrences of each substring.

[0082] It should be noted that the number of occurrences of a substring can be the number of times or entries that the substring appears in all initial fields, or the number of times or entries that the substring appears in all sample data. For example, if the number of occurrences of a substring is preset to be determined based on the initial field, then for any substring low, the total number of times "low" appears in all the obtained initial fields is determined, that is, the total number of times the substring low appears. If the number of occurrences of a substring is preset to be determined based on sample data, then for any substring low, the total number of times "low" appears in the obtained sample data is determined, that is, the total number of times the substring low appears.

[0083] For example, the number of occurrences of each substring is shown in Table 1:

[0084] Table 1

[0085] Substring Occurrence low 5 lower 2 newest 6 widest 3

[0086] Step S102: according to the substrings and the number of occurrences of the substrings, regular fragments are obtained by aggregation.

[0087] In a feasible implementation, the substring with the highest number of occurrences can be determined based on the number of occurrences of substrings and group strings, such as newest in Table 1, and then the substring with the most identical characters and / or the most occurrences as the substring newest among other substrings can be determined, such as widest in Table 1, and finally, the common characters of the two substrings can be determined as a regular segment, such as "est" as the regular segment obtained by convergence.

[0088] In a feasible implementation, step S102 may include steps f to j:

[0089] Step f: Split the substring into individual characters;

[0090] For example, referring to Table 1, each substring is split into individual characters to obtain Table 2:

[0091] Table 2

[0092]

[0093] Step g: merge adjacent split characters to obtain byte pairs;

[0094] The number of occurrences of the character and the byte pair is the same as the number of occurrences of the substring; for example, adjacent split characters are sequentially merged to form byte pairs, as shown in Table 3:

[0095] Table 3

[0096]

[0097] Step h: fix the byte pairs that meet the preset fixing conditions to the characters after the substring is split, and obtain the new characters after the substring is split;

[0098] In a feasible embodiment, the preset fixed condition is a fixed rule, and the byte pair with the most occurrences is fixed to the characters after the substring is split.

[0099] In a feasible embodiment, step h may include steps h1 to h2:

[0100] Step h1: After first merging adjacent split characters, fix the byte pair with the most occurrences to the characters after the substring split;

[0101] For example, it can be seen from the table that the byte pairs "es" and "st" have the highest number of occurrences, both 6+3=9, and the frequency of the byte pairs is 9 / 16. Take es as an example to form a new split character. In other words, determine the byte pair with the highest frequency in Table 3, fix it, and form the split character shown in Table 4.

[0102] Table 4

[0103]

[0104] Step h2: After merging adjacent split characters for a non-first time, determine a target byte pair according to a dynamic rule, and fix the target byte pair to the characters after the substring is split.

[0105] It should be noted that although the fixed conditions of the dynamic rule are dynamically changing, making it unpredictable whether the current character pair is fixed, only the initial field execution step h2 can confirm whether it is fixed, but it will make the merging of substrings strongly related to the current data, and the final regular fragment can better reflect the sensitivity of the current data. The regular expression obtained based on the regular fragment can more accurately identify sensitive data.

[0106] In a feasible embodiment, step h2 may include steps h21 to h24:

[0107] Step h21: taking the byte pair with the largest number of occurrences in the latest byte pairs as the pending byte pair, and determining the first substring where the pending byte pair is located;

[0108] For example, referring to Table 5, the byte pair that appears most frequently in the latest byte pairs is "est", the "est" byte pair is used as the pending byte pair, and the first substring of the pending byte pair "est" is determined to be "newest" and "widest".

[0109] For example, assuming that the substring "widest" in Table 1 is "wides", then the byte pair that appears most frequently in the latest byte pairs in Table 5 will be "lo" or "ow", with 7 occurrences. Assuming that the pending byte pair is "lo", then the first substring where the pending byte pair "lo" is located is "low" and "lower".

[0110] Step h22: determining each historical fixed byte pair and the second substring to which each historical fixed byte pair belongs;

[0111] For example, referring to Table 4, the historical fixed byte pair is "es", and the second substring of the historical fixed byte pair "es" is "newest" and "widest". It should be noted that the historical fixed byte pair refers to all byte pairs that have been fixed before the latest fixed byte pair. There can be multiple historical fixed byte pairs. The historical fixed byte pair in Table 4 is only "es", which is only used as an example for explanation.

[0112] Step h23: if the second substring includes the first substring, the pending byte pair is used as the target byte pair;

[0113] If the second substring contains the first substring, it means that although the pending byte pair is not the largest byte pair that characterizes the sensitivity of the substring, it can still characterize the sensitivity of the substring and further characterize the sensitive characteristics of the data. Based on this, the pending byte pair with the most occurrences in the latest byte pair is fixed, and then the next merge and fixed condition judgment is continued, so as to accurately determine the substring and reduce the number of substrings, ensuring the accuracy of the final sensitive data identification.

[0114] Step h24: If the second substring does not include the first substring, determine whether the pending byte pair represents sensitivity. If the pending byte pair represents sensitivity, use the pending byte pair as the target byte pair.

[0115] If part of the second substring does not contain the first substring, that is, part of the first substring is not included in the second substring, it means that the pending byte pair is not an extension of the fixed byte pair, but a new byte pair. It is necessary to determine whether to fix it based on whether the pending byte pair can represent sensitivity.

[0116] For example, the second substring "newest" and "widest" where the historical fixed byte pair "es" is located does not include the first substring "low" and "lower" where the pending byte pair "lo" is located.

[0117] In a feasible embodiment, if the pending byte pair can represent sensitivity, then the pending byte pair is fixed; if it cannot represent sensitivity, it means that the new byte pair obtained by merging adjacent new split characters does not meet the preset fixed conditions, and the loop iteration is stopped.

[0118] In a feasible embodiment, step h24 may include steps h241 to h244:

[0119] Step h241: Determine a target substring in the second substring that is different from the first substring, the maximum common byte pair of the target substring in the byte pairs currently merged, and the first occurrence number of the maximum common byte pair;

[0120] For example, in the new Table 5 where the substring "widest" is "wides", the second substring where the historical fixed byte pair "es" is located is "newest" and "wides", and the target substring where the second substring is different from the first substring is also "newest" and "wides". The byte pairs currently merged include "lo", "ow", "lo", "ow", "we", "er", "ne", "ew", "wes", "est", "wi", "id", and "des", but do not include the byte pair "est" of the substring "widest" in the current Table 5. The target substring, the target substring "newest" and "wides" have the largest common byte pair in the byte pairs currently merged is "es", and the first occurrence number of the largest common byte pair "es" is 6 times.

[0121] Step h242: Determine the second occurrence number of the byte pair with the current largest number of occurrences, the third occurrence numbers of the first substring and the second substring, and the fourth occurrence numbers of all substrings;

[0122] For example, in the new Table 5 where the substring "widest" is "wides", the byte pair that currently appears the most times is "lo", the second occurrence of "lo" is 7 times, the third occurrence of the first substring "low" and "lower" and the second substring "newest" and "widest" is 5+2+6+3=16 times, and it is assumed that the fourth occurrence of all substrings is 50 times.

[0123] Step h243: If the ratio of the first number of occurrences to the second number of occurrences is greater than or equal to the ratio of the third number of occurrences to the fourth number of occurrences, then determining the sensitivity of the undetermined byte pair to represent;

[0124] It should be noted that the first number of occurrences / the second number of occurrences represents the ratio of the commonality of the pending byte pair in all substrings to the byte commonality of the substring that does not contain the pending byte pair, and this ratio is the possibility of whether the substring where the pending byte pair is located can represent the substring that does not contain the pending byte pair; the third number of occurrences / the fourth number of occurrences represents the ratio of the substring containing the pending byte pair, and this ratio represents the possibility of the substring where the pending byte pair is located representing sensitivity among all substrings.

[0125] If the first number of occurrences / the second number of occurrences ≥ the third number of occurrences / the fourth number of occurrences, it means that the substring in which the pending byte pair is located is sufficient to characterize the sensitivity of all data, and then it is fixed.

[0126] Step h244: If the ratio of the first number of occurrences to the second number of occurrences is less than the ratio of the third number of occurrences to the fourth number of occurrences, it is determined that the pending byte pair fails to represent sensitivity.

[0127] If the first number of occurrences / the second number of occurrences is less than the third number of occurrences / the fourth number of occurrences, it means that the substring where the pending byte pair is located is not sufficient to represent the sensitivity of all data, and the loop iteration is stopped, and the byte pair determined in the previous round of loop iteration is used as the latest byte pair and as the regular fragment.

[0128] Step i: Return to the step of merging adjacent characters to obtain byte pairs, until the new byte pairs do not meet the preset fixed condition, or the number of repetitions of returning to the execution is greater than a preset number threshold;

[0129] For example, return to the step of merging adjacent characters to obtain byte pairs to obtain Table 5.

[0130] Table 5

[0131]

[0132] Next, it is determined whether the new byte pair in Table 5 meets the preset fixed condition, or whether the number of repetitions of returning to execute after obtaining Table 5 is greater than the preset number threshold. For example, the new byte pair that meets the preset fixed condition is fixed to the character after the substring is split.

[0133] It should be noted that the loop iteration is stopped until the new byte pair obtained by merging the adjacent new split characters does not meet the preset fixed condition, or the number of repetitions returned to be executed is greater than the preset number threshold.

[0134] Step j: The latest byte pair at the end of execution is returned as the regular fragment.

[0135] The latest byte pair that satisfies the preset fixed condition or returns the number of repeated executions equal to the preset number threshold is used as the regular fragment.

[0136] In addition, in an optional embodiment, when identifying sensitive data, the location where the sensitive data appears itself represents some sensitive information. Therefore, position information can be added to each byte pair, and the position information of the first and last characters of the byte pair appearing in the corresponding substring can be recorded, and then subsequent merging and fixing steps can be performed. The byte pairs and regular fragments obtained in this way can be more suitable for the initial field feature information.

[0137] Step S20, determining an optimal regular expression among the regular expressions constructed based on the regular fragments;

[0138] It should be noted that regular expressions are a tool for pattern matching and text searching, providing a flexible and powerful way to find, replace, verify and extract text data. Regular expressions are a logical formula for operating on strings (including common characters (for example, letters from a to z) and special characters (called "meta-characters")), using some pre-defined specific characters and combinations of these specific characters to form a "regular string", which is used to express a filtering logic for strings.

[0139] In a feasible implementation, step S20 may include steps S201 to S202:

[0140] Step S201: constructing a syntax tree based on the regular fragment, and determining a regular expression through a syntax number;

[0141] Step S202: construct a scoring system, and determine the optimal regular expression through the scoring system.

[0142] It should be noted that when designing a scoring system to judge the quality of each regular expression, multiple dimensions can be considered, such as the target sample hit rate, the regular length (the closer to the average sample length, the higher the score), the proportion of characters or range expressions in the regular expression, the positive sample hit rate and the negative sample miss rate, that is, the recall rate and precision rate. In addition, multiple dimensions need to be normalized to a scoring range, such as the first dimension value range is generalized to 0-1, and the weight can also be adjusted to highlight a certain dimension.

[0143] In a feasible embodiment, the generated candidate regular expressions are subjected to a genetic algorithm, and a new candidate population is generated through hybridization, mutation, etc., and high-quality seeds are selected according to the scoring system to enter the next round of iteration, and then converge to a high-quality solution, that is, the optimal regular expression. For example: 1. Randomly select two parents, and the selection strategy is that the one with a higher score in the previous round needs to be selected with a higher probability, and a round-robin selection algorithm can be used; 2. Randomly retain some parents to enter the next generation population; 3. Hybridize some nodes on the syntax tree, exchange some feature information, and important feature information may not be hybridized to generate two individuals; 4. For each number, randomly mutate a node according to the mutation rate, and important features may not be mutated; 5. Iterate a sufficient population, calculate the fitness rate (score), select a number of population individuals with high scores, and enter the next round of iteration; 6. If the iteration limit is reached or the initial field score is full, the target solution is obtained. That is to say, in a regular expression, there may be non-optimal situations. For example, although the regular expression can be used to discover sensitive data, the regular string in the regular expression may not be optimal. Therefore, a system for evaluating the quality of regular expressions is constructed, such as evaluating the quality of regular expressions by target sample hit rate, regular length, and the proportion of characters or range expressions in the regular expression. At the same time, through genetic algorithms, the regular expression is changed through hybridization, mutation, etc., to achieve the effect of changing from a basic regular expression to multiple variant regular expressions. Then, through the scoring system, the effects of each regular expression obtained by the change are evaluated, and the regular expression with the best effect is selected as the final regular expression. In this way, the effect of further optimizing the regular expression on the basis of the accurate regular expression obtained is achieved.

[0144] Step S30: identifying sensitive data in the overall data according to the optimal regular expression.

[0145] In this embodiment, the initial fields are segmented and aggregated to form regular segments. That is, compared with directly forming regular segments from the original initial fields in conventional means, this embodiment processes the initial fields again after obtaining the initial fields, and forms regular segments based on the substrings obtained after the processing. In this way, not only the number of regular segments is effectively reduced, the recognition efficiency of sensitive data is improved, and the resource consumption required for sensitive data recognition is reduced, but also the substrings are ensured to accurately reflect sensitive situations, that is, the regular expressions obtained by constructing the regular segments obtained from the substrings can accurately identify sensitive data.

[0146] This application also provides a sensitive data identification device, please refer to Figure 2 , the device comprises:

[0147] An initialization module 10 is used to segment and aggregate initial fields to form regular segments; wherein the initial fields are sensitive fields in the sample data;

[0148] A determination module 20, configured to determine an optimal regular expression among regular expressions constructed based on the regular fragments;

[0149] The identification module 30 is used to identify sensitive data in the overall data according to the optimal regular expression.

[0150] In one embodiment, the initialization module is further used to:

[0151] Split consecutive characters of the same type in the initial field to obtain substrings;

[0152] According to the substrings and the number of occurrences of the substrings, regular fragments are obtained by aggregation.

[0153] In one embodiment, the initialization module is further used to:

[0154] Split substrings into individual characters;

[0155] Merge adjacent split characters to obtain byte pairs;

[0156] wherein the number of occurrences of the character and the byte pair is the same as the number of occurrences of the substring;

[0157] Fix the byte pairs that meet the preset fixed conditions to the characters after the substring is split, and obtain the new characters after the substring is split;

[0158] Return to the step of merging adjacent characters to obtain byte pairs, until the new byte pairs do not meet the preset fixed condition, or the number of repetitions of returning to the execution is greater than a preset number threshold;

[0159] The latest byte pair at the end of the execution will be returned as a regular fragment.

[0160] In one embodiment, the initialization module is further used to:

[0161] After the adjacent split characters are first merged, the byte pairs that appear the most times are fixed to the characters after the substring is split;

[0162] After the adjacent split characters are merged for the non-first time, a target byte pair is determined according to a dynamic rule, and the target byte pair is fixed to the characters after the substring is split.

[0163] In one embodiment, the initialization module is further used to:

[0164] The byte pair with the largest number of occurrences in the latest byte pairs is used as the pending byte pair, and the first substring where the pending byte pair is located is determined;

[0165] Determine each historical fixed byte pair and each second substring where each historical fixed byte pair is located;

[0166] If the second substring includes the first substring, taking the pending byte pair as the target byte pair;

[0167] If the second substring does not include the first substring, determine whether the pending byte pair represents sensitivity. If the pending byte pair represents sensitivity, use the pending byte pair as the target byte pair.

[0168] In one embodiment, the initialization module is further used to:

[0169] Determine a target substring in the second substring that is different from the first substring, a maximum common byte pair of the target substring in the byte pairs currently merged, and a first occurrence number of the maximum common byte pair;

[0170] Determine the second number of occurrences of the byte pair that currently occurs the most times, the third number of occurrences of the first substring and the second substring, and the fourth number of occurrences of all substrings;

[0171] If the ratio of the first number of occurrences to the second number of occurrences is greater than or equal to the ratio of the third number of occurrences to the fourth number of occurrences, then determining the sensitivity of the undetermined byte pair to represent;

[0172] If the ratio of the first number of occurrences to the second number of occurrences is less than the ratio of the third number of occurrences to the fourth number of occurrences, it is determined that the pending byte pair fails to represent sensitivity.

[0173] The sensitive data identification device provided by the present application adopts the sensitive data identification method in the above embodiment, which can solve the technical problem of inaccurate sensitive data identification. Compared with the prior art, the beneficial effects of the sensitive data identification device provided by the present application are the same as the beneficial effects of the sensitive data identification method provided by the above embodiment, and the other technical features in the sensitive data identification device are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0174] The present application provides a sensitive data identification device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the sensitive data identification method in the above-mentioned embodiment one.

[0175] Reference below Figure 3, which shows a schematic diagram of the structure of a sensitive data identification device suitable for implementing the embodiments of the present application. The sensitive data identification device in the embodiments of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 3 The sensitive data identification device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0176] like Figure 3 As shown, the sensitive data identification device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the xxx device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the sensitive data identification device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a sensitive data identification device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.

[0177] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0178] The sensitive data identification device provided by the present application adopts the sensitive data identification method in the above embodiment, which can solve the technical problem of inaccurate sensitive data identification. Compared with the prior art, the beneficial effects of the sensitive data identification device provided by the present application are the same as the beneficial effects of the sensitive data identification method provided by the above embodiment, and the other technical features in the sensitive data identification device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0179] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0180] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0181] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the sensitive data identification method in the above-mentioned embodiment.

[0182] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0183] The above-mentioned computer-readable storage medium may be included in the sensitive data identification device; or it may exist independently without being assembled into the sensitive data identification device.

[0184] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the sensitive data identification device, the sensitive data identification device: divides and aggregates the initial fields to form regular fragments; wherein the initial fields are sensitive fields in the sample data; determines the optimal regular expression in the regular expressions constructed based on the regular fragments; and identifies the sensitive data in the overall data according to the optimal regular expression.

[0185] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0186] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0187] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0188] The readable storage medium provided in this application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned sensitive data identification method, and can solve the technical problem of inaccurate sensitive data identification. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the sensitive data identification method provided in the above-mentioned embodiment, and will not be elaborated here.

[0189] The present application also provides a computer program product, including a computer program, which implements the steps of the sensitive data identification method as described above when executed by a processor.

[0190] The computer program product provided by this application can solve the technical problem of inaccurate sensitive data identification. Compared with the prior art, the beneficial effects of the computer program product provided by this application are the same as the beneficial effects of the sensitive data identification method provided by the above embodiment, which will not be repeated here.

[0191] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A sensitive data identification method, characterized in that: The method includes: Segment and aggregate the initial fields to form regular segments; wherein the initial fields are sensitive fields in the sample data; Determining an optimal regular expression among regular expressions constructed based on the regular fragments; According to the optimal regular expression, sensitive data in the overall data is identified.

2. The method according to claim 1, characterized in that The steps of segmenting and aggregating the initial fields to form regular segments include: Split consecutive characters of the same type in the initial field to obtain substrings; According to the substrings and the number of occurrences of the substrings, regular fragments are obtained by aggregation.

3. The method according to claim 2, characterized in that The step of aggregating the regular fragments according to the substrings and the number of occurrences of the substrings comprises: Split substrings into individual characters; Merge adjacent split characters to obtain byte pairs; wherein the number of occurrences of the character and the byte pair is the same as the number of occurrences of the substring; Fix the byte pairs that meet the preset fixed conditions to the characters after the substring is split, and obtain the new characters after the substring is split; Return to the step of merging adjacent characters to obtain byte pairs, until the new byte pairs do not meet the preset fixed condition, or the number of repetitions of returning to the execution is greater than a preset number threshold; The latest byte pair at the end of the execution will be returned as a regular fragment.

4. The method according to claim 3, characterized in that The step of fixing the byte pairs satisfying the preset fixing conditions to the characters after the substring is split comprises: After the adjacent split characters are first merged, the byte pairs that appear the most times are fixed to the characters after the substring is split; After the adjacent split characters are merged for the non-first time, a target byte pair is determined according to a dynamic rule, and the target byte pair is fixed to the characters after the substring is split.

5. The method according to claim 4, characterized in that The step of determining the target byte pair according to the dynamic rule comprises: The byte pair with the largest number of occurrences in the latest byte pairs is used as the pending byte pair, and the first substring where the pending byte pair is located is determined; Determine each historical fixed byte pair and each second substring where each historical fixed byte pair is located; If the second substring includes the first substring, taking the pending byte pair as the target byte pair; If the second substring does not include the first substring, determine whether the pending byte pair represents sensitivity. If the pending byte pair represents sensitivity, use the pending byte pair as the target byte pair.

6. The method according to claim 5, characterized in that The step of determining whether the pending byte pair represents sensitivity comprises: Determine a target substring in the second substring that is different from the first substring, a maximum common byte pair of the target substring in the byte pairs currently merged, and a first occurrence number of the maximum common byte pair; Determine the second number of occurrences of the byte pair that currently occurs the most times, the third number of occurrences of the first substring and the second substring, and the fourth number of occurrences of all substrings; If the ratio of the first number of occurrences to the second number of occurrences is greater than or equal to the ratio of the third number of occurrences to the fourth number of occurrences, then determining the sensitivity of the undetermined byte pair to represent; If the ratio of the first number of occurrences to the second number of occurrences is less than the ratio of the third number of occurrences to the fourth number of occurrences, it is determined that the pending byte pair fails to represent sensitivity.

7. A sensitive data identification device, characterized in that: The device comprises: An initialization module, used to segment and aggregate initial fields to form regular segments; wherein the initial fields are sensitive fields in the sample data; A determination module, used to determine an optimal regular expression among regular expressions constructed based on the regular fragments; An identification module is used to identify sensitive data in the overall data according to the optimal regular expression.

8. A sensitive data identification device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the sensitive data identification method according to any one of claims 1 to 6.

9. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the sensitive data identification method as described in any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the sensitive data identification method according to any one of claims 1 to 6 are implemented.