A method and device for desensitizing selected area data in a table file
By identifying keywords in spreadsheet files and matching them with preset rules, the problem of insufficient protection of sensitive data in spreadsheet software is solved, achieving a balance between information security and usability.
Patent Information
- Application Number
- CN201910318080.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-04-19
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2039-04-19
AI Technical Summary
Existing technologies cannot effectively protect sensitive data in spreadsheet editing software, resulting in insufficient information security and affecting user safety and data availability.
By acquiring the area to be desensitized, identifying keyword information, and matching it with preset desensitization rules, if a match is successful, the data is modified and replaced according to the rules; otherwise, a full replacement is performed using specified characters, thus achieving the desensitization of sensitive data in the table file.
It achieves the goal of ensuring information security while maintaining data availability, protecting sensitive data from leakage, and improving both information security and availability.
Smart Images

Figure CN111832062B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of data protection in documents, and in particular to a method and device for desensitizing selected area data in a table document. Background Art
[0002] At present, people are paying more and more attention to information security, especially data involving customer security or some commercially sensitive data. Usually, real data must be transformed and provided for testing without violating system rules. For example, personal information such as ID card number, mobile phone number, card number, and customer number all need to be desensitized. As an important tool for daily work, spreadsheet tools are often used to count and analyze daily data. For example, spreadsheet tools can be used to count employees' mobile phone numbers, ID card numbers, card numbers, and other data, and to classify different types of data or sort data in a specific order.
[0003] However, while spreadsheet tools record information, there is no effective way to ensure the security of the information, especially for sensitive data such as ID card numbers, mobile phone numbers, bank card numbers, etc., which may cause great impact or loss to users when leaked.
[0004] It can be seen that the existing technology cannot effectively protect sensitive data in spreadsheet editing software, and users cannot ensure the availability of data while ensuring information security, and it is not convenient to use. Summary of the invention
[0005] The purpose of the embodiment of the present application is to provide a method and device for desensitizing selected area data in a table file, thereby improving the security of sensitive data in the table. The specific technical solution is as follows:
[0006] In a first aspect, an embodiment of the present application provides a method for desensitizing selected area data in a table file, comprising:
[0007] Get the area to be desensitized;
[0008] Identify data keywords in the area to be desensitized to obtain keyword information;
[0009] Matching the keyword information with preset desensitization rules;
[0010] If the match is successful, the data in the area to be desensitized is modified and replaced according to the preset desensitization rules.
[0011] Optionally, before acquiring the area to be desensitized, the method further includes:
[0012] Get the area selection instruction input by the user;
[0013] According to the area selection instruction, the area to be desensitized is determined.
[0014] Optionally, after matching the keyword information with the preset desensitization rule, the method further includes:
[0015] If the match is unsuccessful, the data in the area to be desensitized is completely replaced with the specified characters.
[0016] Optionally, the data in the area to be desensitized is identified with data keywords to obtain keyword information, including:
[0017] The first row of data in the area to be desensitized is identified with data keywords to obtain keyword information.
[0018] Optionally, the designated data of the area to be desensitized is modified and replaced, including:
[0019] The designated data of the area to be desensitized is replaced by preset characters.
[0020] In a second aspect, the embodiment of the present application further discloses a device for desensitizing selected area data in a table file, comprising:
[0021] A region acquisition module is used to acquire the region to be desensitized;
[0022] A keyword acquisition module is used to identify data keywords in the area to be desensitized to obtain keyword information;
[0023] A desensitization rule matching module, used to match the keyword information with preset desensitization rules;
[0024] The data desensitization module is used to modify and replace the data in the area to be desensitized according to the preset desensitization rules if the match is successful.
[0025] The instruction acquisition submodule is used to obtain the area selection instruction input by the user;
[0026] An area determination submodule, used to determine the area to be desensitized according to the area selection instruction;
[0027] The full desensitization module is used to completely replace the data in the area to be desensitized with specified characters if the match is unsuccessful.
[0028] The first line of data in the area to be desensitized is identified for data keywords to obtain keyword information. If the match is successful, the specified data in the area to be desensitized is replaced by preset characters according to the preset desensitization rules.
[0029] In a third aspect, an embodiment of the present application provides an electronic device, including a processor and a memory;
[0030] The memory is used to store computer programs;
[0031] The processor is used to implement the method for desensitizing selected area data in a table file described in any one of the first aspects when executing the program stored in the memory.
[0032] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method for desensitizing selected area data in a table file described in any one of the first aspects above is implemented.
[0033] The embodiment of the present application provides a method and device for desensitizing selected area data in a table file, obtaining the area to be desensitized; identifying data keywords for the data in the area to be desensitized to obtain keyword information; matching the keyword information with a preset desensitization rule; if the match is successful, modifying and replacing the data in the area to be desensitized according to the preset desensitization rule. In this way, the application of the embodiment of the present application can desensitize the sensitive data in a specified area in a table file, ensuring the security of the information while ensuring the availability of the information. Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] 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, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0035] Figure 1 A flow chart of a method for desensitizing selected area data in a table file of an embodiment of the present application;
[0036] Figure 2a A possible example diagram of the desensitized selected area data in the table file of the embodiment of the present application;
[0037] Figure 2b Another possible example diagram after the selected area data in the table file of the embodiment of the present application is desensitized;
[0038] Figure 3 A possible desensitization rule for desensitizing selected area data in the table file of the embodiment of the present application;
[0039] Figure 4A structural diagram of a device for desensitizing selected area data in a table file of an embodiment of the present application;
[0040] Figure 5 Another structural diagram of a device for desensitizing selected area data in a table file of an embodiment of the present application;
[0041] Figure 6 A schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION
[0042] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions 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 are within the scope of protection of this application.
[0043] The embodiment of the present application discloses a method and device for desensitizing selected area data in a table file, which is described in detail below.
[0044] See also Figure 1 , Figure 1 A flowchart of a method for desensitizing selected area data in a table file of an embodiment of the present application includes the following steps:
[0045] Step 101, obtaining the area to be desensitized.
[0046] The method for desensitizing selected area data in a table file in an embodiment of the present application is for a table file in a smart terminal device, and thus can be executed by a smart terminal device. Specifically, the smart terminal device can be a computer or a smart phone.
[0047] The area to be desensitized is an area in the table file. For example, the area to be desensitized can be all areas containing data in the table file, or the area to be desensitized can be a specified area in the table file.
[0048] Step 102, identifying data keywords in the area to be desensitized to obtain keyword information.
[0049] The keyword information is the data information of the area to be desensitized. For example, it can be the keyword of the first row of the selected area, such as the name, mobile phone number, ID card number and other information in the header part, or it can be the number of data digits in the selected area.
[0050] Step 103, matching the keyword information with preset desensitization rules.
[0051] The preset desensitization rules can be set according to actual conditions. In a possible implementation, the preset desensitization rules are as follows: Figure 3 As shown, the keyword information is matched with the mobile phone number, name, ID number and bank card number in the preset desensitization rules. Of course, other matching words such as passport number, social security account number, insurance policy number, etc. can also be set according to the actual situation, which will not be repeated here.
[0052] Step 104: If the match is successful, the data in the area to be desensitized is modified and replaced according to the preset desensitization rules.
[0053] In the preset desensitization rule, a modification and replacement rule can be set for each matching word, or the same modification and replacement rule can be set for multiple matching words. The smart terminal device needs to execute the modification and replacement rule corresponding to the keyword information according to the setting of the preset desensitization rule. In a possible implementation, the modification and replacement rule of the preset desensitization rule is as follows: Figure 3 As shown, only the last four digits of the mobile phone number are retained, and the rest are replaced; for the name, only the first digit is retained, and the rest are replaced; for the address, only the first three digits are retained, and the rest are replaced; for the ID card number and bank card number, only the first four digits and the last four digits are retained, and the rest are replaced. Of course, the replacement part can also be set according to the actual situation, which will not be repeated here.
[0054] In actual applications, there may be a situation where the keyword information does not match the preset desensitization rule. Optionally, after matching the keyword information with the preset desensitization rule, the method further includes:
[0055] If the match is unsuccessful, the data in the area to be desensitized is completely replaced with the specified characters.
[0056] The designated characters can be set according to the actual situation. For example, the designated characters can be set to "*", "#", or "X". In order to make the embodiment of the present application clearer, the following example is given. The area to be desensitized is the column where the ID card number is located. When the keyword information matches the preset desensitization rule, the area to be desensitized can be as follows: Figure 2a As shown in the figure, when the keyword information does not match the preset desensitization rules, after all the desensitized area data is replaced, Figure 2b shown.
[0057] It can be seen that by applying the embodiments of the present application, users can implement corresponding desensitization rules for different types of sensitive data. By implementing the desensitization rules, sensitive data is desensitized. It is convenient for users to protect sensitive data, so as to ensure the security of information and the availability of information.
[0058] Another flow chart of the method for desensitizing selected area data in an embodiment of the present application includes the following steps:
[0059] Step 201: Obtaining the area selection instruction input by the user.
[0060] The area selection instruction input by the user is an instruction input by the user, for example, an area instruction selected by the user with a mouse, or a designated area of a table file manually input by the user using a keyboard, or the entire area of the entire table document can be defaulted. Of course, it can also be input in other ways according to actual conditions, which will not be repeated here.
[0061] The area to be desensitized is determined by obtaining the area selection instruction input by the user. The user can conveniently and flexibly specify the area to be desensitized, which is convenient for the user to specify the data to be desensitized.
[0062] Step 202: determine the area to be desensitized according to the area selection instruction.
[0063] The area to be desensitized is determined according to the user's area selection instruction. The area selected by the user can be determined as the area to be desensitized, or areas other than the area selected by the user can be determined as the area to be desensitized. Other forms can also be included. For example, the current row of the area selected by the user with the mouse in the table file is determined as the area to be desensitized, or the current row or current column where the user selected area is located is determined as the area to be desensitized, or the entire table text can be defaulted as the area to be desensitized, etc., which will not be repeated here.
[0064] By specifying the area to be desensitized, a large amount of data can be desensitized at the same time. For example, users can desensitize a column of data in a table text at the same time, or desensitize the data of the entire document at the same time.
[0065] Step 203: identify data keywords in the area to be desensitized to obtain keyword information.
[0066] Data keyword recognition is data recognition, which can identify data information in a specified area in a table file, such as the keywords in the first row of a table file, or it can identify the entire selected area, the number of digits of data in the area to be desensitized, etc.
[0067] Step 204, matching the keyword information with preset desensitization rules.
[0068] The preset desensitization rules are desensitization implementation rules, which can be the default desensitization rules set by the program, or can be set by the user. For example, for a mobile phone number, only the last four digits are retained by default, and the remaining digits are replaced with specified characters, or all digits can be replaced with specified characters by the user.
[0069] Step 205: If the match is successful, the data in the area to be desensitized is modified and replaced according to the preset desensitization rules.
[0070] In this step, the desensitization rules can be in various forms, for example: use specified characters to replace all data in the desensitized area; use specified characters to replace specified part of the data in the desensitized area; use custom characters to replace specified part of the data in the desensitized area; use custom characters to replace all data in the desensitized area; for data where keyword matching fails, use custom characters or specified characters for full or partial replacement.
[0071] Specifically in the example, Figure 3 As shown: for the mobile phone number, only the last four digits are retained and the rest are replaced; for the name, only the first digit is retained and the rest are replaced; for the address, only the first three digits are retained and the rest are replaced; for the ID number and bank card number, the first four digits and the last four digits are retained and the rest are replaced, and so on.
[0072] It can be seen that by applying the embodiments of the present application, the user can not only independently specify the area to be desensitized, but also simultaneously desensitize all the data to be desensitized in the desensitized area according to the desensitization rules matching the data to be desensitized, thereby facilitating the user's management of the desensitized area and the implementation of desensitization rules.
[0073] See also Figure 4 , Figure 4 A structural diagram of a device for desensitizing selected area data in a table file of an embodiment of the present application, and Figure 1 The process shown here corresponds to:
[0074] The region acquisition module 401 is used to acquire the region to be desensitized;
[0075] The keyword acquisition module 402 is used to identify the data keywords in the area to be desensitized to obtain keyword information;
[0076] A desensitization rule matching module 403, used to match the keyword information with a preset desensitization rule;
[0077] The data desensitization module 404 is used to modify and replace the data in the area to be desensitized according to the preset desensitization rules if the match is successful.
[0078] In actual applications, there may be a situation where the keyword information does not match the preset desensitization rule. Optionally, after matching the keyword information with the preset desensitization rule, the device further includes:
[0079] The full desensitization module is used to completely replace the data in the area to be desensitized with specified characters if the match is unsuccessful.
[0080] It can be seen that by applying the embodiments of the present application, users can implement corresponding desensitization rules for different types of sensitive data. By implementing the desensitization rules, sensitive data is desensitized. It is convenient for users to protect sensitive data, so as to ensure the security of information and the availability of information.
[0081] See also Figure 5 , Figure 5 Another structural diagram of a device for desensitizing selected area data in a table file of an embodiment of the present application, comprising:
[0082] The region acquisition module 401 includes an instruction acquisition submodule 501 and a region determination submodule 502, wherein the instruction acquisition submodule 501 is used to obtain the region selection instruction input by the user, and the region determination submodule 502 is used to determine the region to be desensitized according to the region selection instruction;
[0083] The keyword acquisition module 402 is used to identify the data keywords in the area to be desensitized to obtain keyword information;
[0084] A desensitization rule matching module 403, used to match the keyword information with a preset desensitization rule;
[0085] The data desensitization module 404 is used to modify and replace the data in the area to be desensitized according to the preset desensitization rules if the match is successful.
[0086] It can be seen that by applying the embodiments of the present application, the user can not only independently specify the area to be desensitized, but also simultaneously desensitize all the data to be desensitized in the desensitized area according to the desensitization rules matching the data to be desensitized, thereby facilitating the user's management of the desensitized area and the implementation of desensitization rules.
[0087] The embodiment of the present application also provides an electronic device, including: a processor and a memory;
[0088] The above-mentioned memory is used to store computer programs.
[0089] When the processor is used to execute the computer program stored in the memory, the following steps are implemented:
[0090] Get the area to be desensitized;
[0091] Identify data keywords in the area to be desensitized to obtain keyword information;
[0092] Matching the keyword information with preset desensitization rules;
[0093] If the match is successful, the data in the area to be desensitized is modified and replaced according to the preset desensitization rules.
[0094] Optional, see Figure 6 The electronic device of the embodiment of the present application further includes a communication interface 602 and a communication bus 604 , wherein the processor 601 , the communication interface 602 , and the memory 603 communicate with each other via the communication bus 604 .
[0095] Optionally, when the processor is used to execute the computer program stored in the memory, the processor can also implement the following steps:
[0096] Optionally, before acquiring the area to be desensitized, the method further includes:
[0097] Get the area selection instruction input by the user;
[0098] According to the area selection instruction, the area to be desensitized is determined.
[0099] Optionally, after matching the keyword information with the preset desensitization rule, the method further includes:
[0100] If the match is unsuccessful, the data in the area to be desensitized is completely replaced with the specified characters.
[0101] Optionally, the data in the area to be desensitized is identified with data keywords to obtain keyword information, including:
[0102] The first row of data in the area to be desensitized is identified with data keywords to obtain keyword information.
[0103] Optionally, the designated data of the area to be desensitized is modified and replaced, including:
[0104] The designated data of the area to be desensitized is replaced by preset characters.
[0105] It can be seen that by applying the embodiments of the present application, the user can not only independently specify the area to be desensitized, but also simultaneously desensitize all the data to be desensitized in the desensitized area according to the desensitization rules matching the data to be desensitized, thereby facilitating the user's management of the desensitized area and the implementation of desensitization rules.
[0106] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0107] The communication interface is used for communication between the above electronic device and other devices.
[0108] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0109] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0110] The present application also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the following steps are implemented:
[0111] Get the area to be desensitized;
[0112] Identify data keywords in the area to be desensitized to obtain keyword information;
[0113] Matching the keyword information with preset desensitization rules;
[0114] If the match is successful, the data in the area to be desensitized is modified and replaced according to the preset desensitization rules.
[0115] It can be seen that by applying the embodiments of the present application, users can implement corresponding desensitization rules for different types of sensitive data. By implementing the desensitization rules, sensitive data is desensitized. It is convenient for users to protect sensitive data, so as to ensure the security of information and the availability of information.
[0116] Optionally, when the above-mentioned computer program is executed by a processor, it can also implement a method for desensitizing selected area data in any of the above-mentioned table files.
[0117] It should be noted that, in this article, the technical features in each optional solution can be combined to form a solution as long as there is no contradiction, and these solutions are all within the scope disclosed in this application. Relational terms such as first and second, etc. are only used to distinguish an entity or operation from another entity or operation, and do not necessarily require or imply that there is any such actual relationship or order between these entities or operations. Moreover, the term "include", "comprise" or any other variant thereof is intended to cover non-exclusive inclusion, so that the process, method, article or equipment including a series of elements not only include those elements, but also include other elements that are not clearly listed, or also include elements inherent to such process, method, article or equipment. In the absence of more restrictions, the elements limited by the sentence "including one..." do not exclude the existence of other identical elements in the process, method, article or equipment including the elements.
[0118] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the embodiments of the device, electronic device, and storage medium, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0119] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.
Claims
1. A method for desensitizing selected area data in a table file, characterized in that: include: Obtaining the area to be desensitized in the table file, including: obtaining an area selection instruction input by a user; determining the area to be desensitized according to the area selection instruction; wherein the area selection instruction input by the user includes: an area instruction selected by the user through a mouse, or a designated area of the table file manually input by the user using a keyboard; Identify data keywords in the area to be desensitized to obtain keyword information, where the keyword information is data information in the area to be desensitized, and includes at least one of the following: keywords in the first row of the selected area to be desensitized, and the number of digits of data in the selected area to be desensitized; Matching the keyword information with matching words in a preset desensitization rule; In the case of a successful match, the data in the area to be desensitized is modified and replaced according to the preset desensitization rule; If the match fails, the designated characters are used to completely replace the data in the area to be desensitized.
2. The method according to claim 1, characterized in that Identify data keywords in the area to be desensitized to obtain keyword information, including: The first row of data in the area to be desensitized is identified with data keywords to obtain keyword information.
3. The method according to claim 1, characterized in that Modify and replace the data specified in the area to be desensitized, including: The designated data of the area to be desensitized is replaced by preset characters.
4. A device for desensitizing selected area data in a table file, characterized in that: include: The area acquisition module is used to obtain the area to be desensitized in the table file; A keyword acquisition module is used to identify data keywords in the area to be desensitized to obtain keyword information, where the keyword information is data information in the area to be desensitized, and includes at least one of the following: keywords in the first row of the selected area to be desensitized, and the number of digits of data in the selected area to be desensitized; A desensitization rule matching module, used to match the keyword information with matching words in a preset desensitization rule; A data desensitization module is used to modify and replace the data in the area to be desensitized according to the preset desensitization rules when the match is successful; The full desensitization module is used to completely replace the data in the area to be desensitized with specified characters when the match fails; The region acquisition module comprises: The instruction acquisition submodule is used to acquire the area selection instruction input by the user; the area selection instruction input by the user includes: the area instruction selected by the user through the mouse, or the designated area of the table file manually input by the user using the keyboard; The area determination submodule is used to determine the area to be desensitized according to the area selection instruction.
5. The device according to claim 4, characterized in that The keyword acquisition module is specifically used for: The first row of data in the area to be desensitized is identified with data keywords to obtain keyword information.
6. The device according to claim 4, characterized in that The data desensitization module is specifically used for: If the match is successful, the specified data in the area to be desensitized is replaced by preset characters according to the preset desensitization rules.
7. An electronic device, characterized in that: including a processor and a memory; The memory is used to store computer programs; The processor is used to implement the method for desensitizing selected area data in a table file described in any one of claims 1 to 3 when executing the program stored in the memory.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method for desensitizing selected area data in a table file described in any one of claims 1 to 3 is implemented.
