Business information desensitization method and system based on spreadsheet file

By directly manipulating spreadsheet files on users' computers to identify and classify business information, and performing de-identification processing locally, the technology solves the problems of requiring professional assistance and installation complexity in existing technologies, and achieves safe and efficient de-identification of business information.

CN120910891APending Publication Date: 2025-11-07李尚儒
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510105765.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-23
Publication Date
2025-11-07

AI Technical Summary

Technical Problem

Existing data anonymization methods and tools require the assistance of professionals and a complex installation process, which cannot effectively prevent the leakage of business information during network transmission, increasing time and learning costs.

Method used

A method and system for desensitizing business information based on spreadsheet files is provided. This method identifies and classifies sensitive information by directly manipulating spreadsheet files on the user's computer and performs desensitization processing locally, thus avoiding the risk of leakage during network transmission.

Benefits of technology

It reduces users' time and learning costs, ensures the security and convenience of the data anonymization process, and eliminates the risk of data leakage during network transmission.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120910891A_ABST
    Figure CN120910891A_ABST
Patent Text Reader

Abstract

The invention discloses a commercial information desensitization method and system based on spreadsheet files. The system is implemented by a spreadsheet file containing a runnable macro code (VBA). A user inputs business information needing to be desensitized into a pre-named worksheet of a spreadsheet file with a preset system code, and the system identifies and classifies sensitive information in the worksheet and provides a classification result composition for the user to review and edit. And the user completes the editing and reviewing result, namely, the content comparison table before and after desensitization is reserved for future reference. The table is also used for desensitization reference of the whole content of the file. A user operates the system through a button / icon of a VBA form control or a button / icon of a VBA ActiveX control and the content input into a pre-named worksheet (WorkSheets) in a spreadsheet file, and the system is operated by the user through the button / icon of the VBA form control or the button / icon of the VBA ActiveX control and the content input into the pre-named worksheet in the spreadsheet file. According to the invention, low-cost and high-security business information desensitization is realized, and the risk of information leakage in a network transmission process is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application belongs to the technical field of data desensitization, and particularly relates to a business information desensitization method and system based on a spreadsheet file. BACKGROUND

[0002] In today's digital business environment, data security and privacy protection are of great importance. Business information often contains a large amount of sensitive data, such as electronic invoice code, company tax number, identity card number, invoice code, mobile phone number, invoice number, landline number, enterprise name, address, and name, etc. Once these sensitive information is leaked, it may cause serious loss to legal persons and natural persons. Due to the requirements of data security and privacy protection, there are a large number of data protection measures between legal persons or between legal persons and natural persons in commercial cooperation, one of which is to desensitize business information.

[0003] Today, spreadsheets are widely used in the business field. There are mainly two types of spreadsheet files, one is binary structured file, and the other is composed of XML files and folders. The above two types of files are collectively referred to as spreadsheet files, and the common file extensions of spreadsheet files include xls, xlt, xlsb, xlsx, xltx, xltm, xlsm, et, ett, ods, odf, etc. These spreadsheets are created by legal persons and natural persons for a large amount of business information editing, storage and transmission.

[0004] In the application of spreadsheet, VBA (Visual Basic for Applications) and COM (Component Object Model) technology play an important role. VBA is a macro language based on Visual Basic, which allows users to write or run program code in spreadsheets to achieve automated tasks and complex functions. COM provides a standard component architecture, so that VBA can directly interact with the content of the spreadsheet.

[0005] The worksheet in the spreadsheet, as well as the VBA form control, VBA ActiveX control, and the VBA compiler directly integrated in the spreadsheet program (such as the VBA compiler in Excel and WPS), together realize the interaction between the user and the program composed of VB code.

[0006] Currently, there are various data desensitization methods and tools. For example, Apache ShardingSphere can parse and intercept the SQL input by the user to achieve data desensitization; Mybatis-Mate supports sensitive word desensitization and has multiple built-in common desensitization rules. However, the mainstream desensitization methods and the tools carrying them mostly need to be implemented through one of the following three methods or a combination or mixture based on the three methods, or with the assistance of professional computer personnel: installation and deployment of the desensitization program on the user's computer, service program deployed in the local area network, online service provided on the public Internet. This means that for users who have not received professional training, it means time cost and learning cost to master the desensitization operation process in order to achieve the desensitization function. At the same time, the network-based desensitization tool itself cannot completely eliminate the risk of data leakage during network transmission.

[0007] In reality, when users process business information, they will create spreadsheet files by hand or through other electronic programs. Then, the user can manually input or use electronic programs to input business information and save it. After completing the information input, the user will transfer the spreadsheet file through removable storage media, file transfer tools or services based on the Internet or local area network, email, online communication tools (IM), etc. to achieve the exchange of business information. SUMMARY

[0008] To solve the above problems, the present application provides a business information desensitization method and system based on spreadsheet files. This technical solution can eliminate the risk of data leakage during network transmission while meeting the common usage habits of users. Thus, compared with mainstream data desensitization methods and tools, users can significantly save time and learning costs in the process of completing data desensitization and transferring desensitized data.

[0009] In use, the user does not need to install additional programs on a computer that can run spreadsheet files, thereby saving time. Since the entire desensitization process is performed on the user's personal computer, the user transfers business information by transferring the spreadsheet file containing desensitized business information, thereby eliminating the risk of data leakage due to transmission over the Internet or local area network or encrypted transmission of non-desensitized data.

[0010] The present application is implemented by the following technical solutions: A business sensitive information identification and desensitization method, the method comprising: reading a worksheet meeting a specified condition in a spreadsheet file based on the specified condition; reading a region meeting the specified condition of the worksheet meeting the specified condition in the spreadsheet file based on the specified condition; Based on the specified area and the specified condition, identify the content in the read non-empty cells that meets the specified condition and classify it; Based on the classification result, desensitize the read non-empty cells content identified based on the condition, and store the desensitized content in the computer memory; Based on the desensitization result in the computer memory, store the read non-empty cells content identified based on the condition and the desensitization result in a separate worksheet or blank area of an existing worksheet; Based on the worksheet content storing the read non-empty cells content and the desensitization result, replace the specified content in the entire spreadsheet file; Based on the replacement process, mark the cells that have been replaced with a prominent visual effect; Invoke an instance of the application that executes the above method; Further, the method of reading the worksheet in the spreadsheet file that meets the specified condition includes: Taking the specific order position of the worksheet in the spreadsheet as the specified condition, determine whether there is a worksheet with a specific order position in the spreadsheet file: If yes, read the worksheet; If no, do not perform the operation.

[0011] Further, based on the specified condition, the method of reading the area in the worksheet in the spreadsheet file that meets the specified condition includes: Taking the specified row, column number, or a segment that can constitute a row or column, or the diagonal cells of a rectangular area in the worksheet as the input instruction of the specified area; Complete the determination of the entire row, column, segment of row, segment of column, and rectangular area drawn by the diagonal cells as the area to be read; Taking a specific row in the worksheet as the specified row, determine whether there is a cell containing the specified keyword in the row: If yes, determine the column to which the cell belongs as the area to be read; If no, do not perform the operation; Taking a specific column in the worksheet as the specified column, determine whether there is a cell containing the specified keyword in the column: If yes, determine the row to which the cell belongs as the area to be read; If no, do not perform the operation.

[0012] Further, the method of identifying the content in the read non-empty cells that meets the specified condition and classifying it based on the specified condition includes: For the identification and classification of enterprise and institution names, specifically includes: determining whether the content length is greater than or equal to a preset minimum length: If yes, then continue the next enterprise name judgment; If no, then determine that it is not an enterprise name; determining whether the number of address feature words in the content is less than a preset threshold: If yes, then continue the next enterprise name judgment; If no, then determine that it is not an enterprise name; determining whether the content contains a special prefix and has an organization suffix: If yes, then determine that it belongs to an enterprise name; If no, then continue the next enterprise name judgment; determining whether the content contains a region name and has an organization suffix: If yes, then determine that it belongs to an enterprise name; If no, then continue the next enterprise name judgment; determining whether the content contains a common enterprise name pattern and has an organization suffix: If yes, then determine that it belongs to an enterprise name; If no, then determine that it is not an enterprise name.

[0013] Further, the method for identifying and classifying the content satisfying the specified condition in the read non-empty cell based on the specified condition includes: For the identification and classification of the person name, specifically includes: determining whether the content length is between a preset minimum length and a maximum length: If yes, then continue the person name judgment; If no, then determine that it is not a person name; determining whether the content characters are all Chinese characters: If yes, then continue the person name judgment; If no, then determine that it is not a person name; determining whether the first two characters of the content are a preset compound surname: If yes, then continue the remaining character number judgment under the compound surname; If no, then continue the remaining character number judgment under the non-compound surname; If it is a compound surname, determining whether the remaining character number is between 1 and 2: If yes, then determine that it is a person name; If no, then determine that it is not a person name; If it is not a compound surname, determining whether the total character number is between 1 and 3: If yes, then determine that it is a person name; If no, then determine that it is not a person name.

[0014] Further, the method of identifying and classifying the content in the read non-empty cells based on the specified conditions includes: For the identification and classification of addresses, specifically includes: Determine whether the content contains a preset regional name and address characteristic word: If yes: continue address determination; If no: determine that it is not an address; Determine whether the total number of regional names and address characteristic words in the content is greater than or equal to a preset threshold: If yes: determine that it is an address; If no: determine that it is not an address.

[0015] Further, the method of identifying and classifying the content in the read non-empty cells based on the specified conditions includes: For the identification and classification of encoded sensitive information, specifically includes: Identify electronic invoice codes, company tax numbers, ID numbers, invoice codes, mobile phone numbers, invoice numbers, landline numbers, and bank account numbers based on a preset regular expression rule; Regular expressions include pure letter code judgment, pure number code judgment, and mixed number and letter code judgment.

[0016] Further, the method of desensitizing the read non-empty cells based on the classification results includes: For the desensitization of enterprise and institution names, specifically includes: Match the organization suffix of the enterprise and institution name in the preset dictionary; Match the regional name of the enterprise and institution name in the preset dictionary (if any); Match the special prefix of the enterprise and institution name in the dictionary (if any); Match the common industry name of the enterprise and institution name in the dictionary (if any); Remove the organization suffix, regional name, special prefix, and common industry name of the enterprise and institution name; If the character length of the remaining content is greater than a threshold: Replace the first specified number of characters and the last specified number of characters with a preset fixed character, and keep the organization suffix, regional name, special prefix, and common industry name; If the main body length is less than the threshold: Only keep the organization suffix, regional name, special prefix, and common industry name.

[0017] Further, the method of desensitizing the read content of the non-empty cell based on the classification result includes: For the desensitization of the name, specifically includes: Matching the complex surname in the dictionary: If the matching is successful, the matching result is taken as the surname part; If the matching fails, the first character is taken as the surname part; The obtained surname part is spliced with the preset string to form the desensitization result.

[0018] Further, the method of desensitizing the read content of the non-empty cell based on the classification result includes: For the desensitization of the address, specifically includes: Matching the region name in the dictionary: If there is a preset region name, the region name is retained; If there is no preset region name, no original information is retained; The retained region name (if any) is spliced with the preset string to form the desensitization result.

[0019] Further, the method of desensitizing the read content of the non-empty cell based on the classification result includes: For the desensitization of the coding type sensitive information, specifically includes: For electronic invoice code, company tax number, ID number, invoice code, invoice number, mobile phone number, bank account number: replace the characters at the specified position with the preset fixed characters; For the fixed-line number: If it contains an area code separator, the area code is retained, and the characters at the specified position of the number part are replaced with the preset fixed characters; If it does not contain an area code separator, replace the characters at the specified position with the preset fixed characters.

[0020] Further, the method of storing the read content of the non-empty cell in the memory and the desensitization result in a separate worksheet based on the desensitization result includes: Determine whether there is a preset name desensitization before and after content comparison table: If so, delete the existing preset name desensitization before and after content comparison table; If not, continue Create a desensitization before and after content comparison table in a specified worksheet, specifically includes: Create a table header in the desensitization before and after content comparison table, specifically includes: Original data content, commercial sensitive data type, data source worksheet, desensitized content; Check if there is a same record in the original data content: If yes, skip this record; If no, write the original data content into the before and after de-sensitization content table; Check if there is a same record in the de-sensitized content: If yes, concatenate the de-sensitized content with a symbol or serial number and write it into the before and after de-sensitization content table; If no, write the de-sensitized content into the before and after de-sensitization content table.

[0021] Further, the method for replacing the specified content in the entire electronic spreadsheet file based on the content of the read non-empty cell and the worksheet content of the de-sensitization preview result comprises: Creating a dictionary object for storing sensitive information mapping relationship, specifically including: Taking the original data content in the before and after de-sensitization content table as the key value; Taking the de-sensitized content in the before and after de-sensitization content table as the corresponding value; Traversing all worksheets in the workbook, specifically including: Judging whether the worksheet name is the preset excluded worksheet name: If yes, skip this worksheet; If no, continue processing the worksheet; Obtaining the actual use range of the worksheet, specifically including: Identifying the position of the first non-empty row; Identifying the position of the last non-empty row; Identifying the position of the first non-empty column; Identifying the position of the last non-empty column; Determining the actual data range based on the identification result; Reading the determined data range into the memory, specifically including: Traversing each cell content read into the memory; Judging whether the cell is empty: If yes, skip this cell; If no, continue processing; Finding out whether there is a sensitive information matching the cell content in the dictionary: If yes, replace the cell content with the corresponding de-sensitized information and record the cell position; If no, continue processing the next cell; Writing the recorded cell position into the memory; Visualizing the recorded cell position, specifically including: The cell to be replaced is set to a conspicuous visual effect; Display the statistics of the completed processing.

[0022] Further, the user can complete the data de-sensitization on a computer running an electronic spreadsheet file (file extensions include but not limited to xlsx, xlsm, et, ett, ods, odf, etc.) without installing other executable programs (.exe extension).

[0023] Further, the computer of the user completing the de-sensitization process can always remain disconnected from the network before, during and after the de-sensitization process.

[0024] A business information de-sensitization system based on an electronic spreadsheet file, the system comprising: Program packaging carrier: for carrying the packaged program and ensuring compatibility and running on the user's computer; Information input and output interface: for completing the input of information to be de-sensitized and the output of de-sensitized results; User operation component: for starting the system and triggering the system process; Sensitive information processing module: for generating an electronic spreadsheet storing the de-sensitized results; Data structure definition module: for defining the basic data structure of the system and storing the dictionary for matching; Data area definition module: for defining and identifying the sensitive information area in different types of worksheets; Data de-sensitization module: for de-sensitizing the identified sensitive information; Data recognition module: for recognizing various types of business sensitive information; Sensitive information replacement module: by reading the mapping relationship between sensitive information and de-sensitized information, and automatically replacing and marking within the workbook range.

[0025] Further, it also includes: The program packaging carrier is an electronic spreadsheet file (file extension xls) in binary structure (BIFF), or an electronic spreadsheet file (file extensions include but not limited to xlsx, xlsm, et, ett, ods, odf, etc.) composed of XML files and folders.

[0026] Further, it also includes: The information input and output interface is the worksheet interface in the electronic spreadsheet file.

[0027] Further, it also includes: The user operation component is a VBA compiler component, a VBA form control, and a VBA ActiveX control.

[0028] The application provides a business information desensitization method and system based on a spreadsheet file, which has the following beneficial effects: 1. By encapsulating the desensitization process in the spreadsheet, the user does not need to install and deploy additional programs, thereby reducing the use cost. 2. By using the local operation mode based on the regular expression and the local dictionary, the original data before desensitization can be completely isolated from the network, thereby completely eliminating the original data leakage / descrambling caused in the transmission process. 3. The method is consistent with the general office use habit of the user, thereby reducing the learning cost. DETAILED DESCRIPTION In order to more clearly illustrate the technical solutions of the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiment or prior art description. Obviously, the drawings in the following description only constitute some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor on the basis of these drawings; Figure 1 is a work flow chart provided by the system of embodiment 1 of the present application; Figure 2 is an interactive flow chart of the user and the system provided by embodiment 1 of the present application; Figure 3 is a schematic diagram of the user input information process provided by embodiment 1 of the present application; Figure 4 is a schematic diagram of the user operating the control button or the compiler component button to start the corresponding process operation provided by embodiment 1 of the present application; Figure 5 is a schematic diagram of the desensitization information output result provided by embodiment 1 of the present application; Figure 6 is a schematic diagram of the user manually modifying the desensitization information output result provided by embodiment 1 of the present application; Figure 7 is a schematic diagram of the user operating the control button or the compiler component button to start the desensitization information replacement process operation provided by embodiment 1 of the present application; Figure 8 is a schematic diagram of the result of the desensitization information replacement and the eye-catching visual effect provided by embodiment 1 of the present application; Figure 9 is a schematic diagram of the user's operation process of supplementing desensitization based on the eye-catching visual effect provided by embodiment 1 of the present application; Figure 10 is a block diagram of the system of the business information desensitization method based on the spreadsheet file provided by embodiment 1 of the present application; DETAILED DESCRIPTION

[0029] With reference to the accompanying drawings, the technical solutions in the embodiments of the present application will be clearly and completely described in order to make the technical solutions in the embodiments of the present application apparent to those skilled in the art. Obviously, the described embodiments are only a part rather than all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of the present application.

[0030] Embodiment 1: The present embodiment provides a business sensitive information identification and desensitization method and system. The process of user interaction with the system is as shown in Figure 2 The method comprises the following steps: Step S101, the user first inputs the business information to be processed into each pre-named worksheet of the electronic spreadsheet file in which the system is stored in the form of entry or copy-paste, including value-added tax invoice data, bank statement data, subject balance sheet, detailed account and various tax return forms. As shown in Figure 3 .

[0031] Step S102, the user starts the business sensitive information identification process of the system by clicking the button / icon of the VBA form control or the button / icon of the VBA ActiveX control in the electronic spreadsheet file. As shown in Figure 4 .

[0032] Step S103, the system identifies the worksheet type according to the keywords in the worksheet name, and identifies the column type according to the keywords in the column name of each column of the worksheet, and adopts corresponding data identification rules for different types of worksheets, columns and other preset areas; The identification process and strategy of the worksheet-keyword in the present embodiment comprises the following: Reading the worksheet name into the memory Matching the keywords of the read worksheet name: If it contains "invoice", it is identified as a worksheet storing invoice information; If it contains "bank statement", it is identified as a worksheet storing bank statement; If it contains "subject balance sheet", it is identified as a worksheet storing subject balance sheet; If it contains "detailed account", it is identified as a detailed account worksheet; If it contains "report form", it is identified as a report form worksheet; Otherwise, it is identified as other worksheet; Returning the corresponding worksheet type enumeration value to the memory; The identification process and strategy of the specific area in each worksheet in the present embodiment comprises the following: Setting the mapping relationship between the worksheet type and the type of the area used to store sensitive data; Set the mapping relationship between the storage sensitive data area and the possible sensitive data types; According to the worksheet type enumeration value in the memory, read the following strategy: The worksheet storing invoice information: the mapping relationship between the type of the storage sensitive data area contained and the possible sensitive data types includes: The table header contains columns with keywords: "phone", "contact", which may only contain mobile phone numbers or landline numbers; The table header contains columns with keywords: "tax number", "taxpayer identification number", "social credit code", which may only contain company tax numbers or ID numbers; The table header contains columns with keywords: "party name", "person name", which may only contain the names of enterprises and individuals; The table header contains columns with keywords: "remark", which may contain all 11 types of sensitive data; The table header contains columns with keywords: "electronic invoice", which may only contain electronic invoice codes; The table header contains columns with keywords: "invoice code", which may only contain invoice codes; The table header contains columns with keywords: "invoice number", which may only contain invoice numbers; The worksheet storing bank statements: the mapping relationship between the type of the storage sensitive data area contained and the possible sensitive data types includes: The table header contains columns with keywords: "party name", "person name", which may only contain the names of enterprises and individuals; The table header contains columns with keywords: "remark", which may contain all 11 types of sensitive data; The table header contains columns with keywords: "account number", "account", which may contain invoice codes, invoice numbers, electronic invoice codes, and bank account numbers; The worksheet storing declaration forms: the mapping relationship between the type of the storage sensitive data area contained and the possible sensitive data types includes: The table header contains columns with keywords: "person", which may only contain names, ID numbers, and mobile phone numbers; Cell Z1 may contain all 11 types of sensitive data.

[0033] In the fourth step S104, the system identifies a total of eleven types of commercial sensitive information, including electronic invoice codes, company tax numbers, ID numbers, invoice codes, mobile phone numbers, invoice numbers, landline numbers, enterprise names, addresses, names, and bank account numbers. The specific identification process and strategy are as follows: Through a combination of regular expressions and dictionary matching, the specific strategy is as follows: Based on the sensitive data type results of the third step, the data types in each specified area are matched one by one, and the matching order and matching strategy are as follows: For the recognition of enterprise and institution names: Is the length of the continuous text greater than 4? If yes, proceed to the next item If no, determine that it is not an enterprise or institution name Is the number of matched address keywords greater than 4? If yes, determine that it is not an enterprise or institution name If no, proceed to the next item Is the matched organization suffix present and the special prefix present? If yes, determine that it is an enterprise or institution name If no, proceed to the next item Is the matched organization suffix present and the area name present? If yes, determine that it is an enterprise or institution name If no, proceed to the next item Is the matched organization suffix present and the enterprise name pattern present? If yes, determine that it is an enterprise or institution name If no, determine that it is not an enterprise or institution name For the recognition of names, specifically including: Is the length of the continuous text greater than 1 and less than 5? If yes: proceed to the name judgment If no: determine that it is not a name Is the content character all Chinese characters? If yes: proceed to the name judgment If no: determine that it is not a name Is the number of matches in the complex surname dictionary greater than 0? If yes: proceed to the remaining character number judgment under complex surnames If no: proceed to the remaining character number judgment under non-complex surnames If it is a complex surname, is the remaining character number between 1 and 2? If yes: determine that it is a name If no: determine that it is not a name If it is not a complex surname, is the total character number between 1 and 3? If yes: determine that it is a name If no: determine that it is not a name For the recognition of addresses: Whether the number of matches with the district name dictionary and the address feature word dictionary are both greater than 1 and the total number of matches is greater than 4: If yes: determine that it is an address; If no: determine that it is not an address; For the identification and classification of coded sensitive information, the matching order and matching strategy are as follows: Based on the preset regular expression rule to identify electronic invoice code, company tax number, identity card number, invoice code, mobile phone number, invoice number, fixed-line number, bank account number, etc. The regular expression is divided into pure letter code judgment, pure number code judgment and number and letter mixed code judgment. The matching order is electronic invoice code, bank account number, company tax number, identity card number, invoice code, mobile phone number, invoice number, fixed-line number in turn.

[0034] Step 5 S105, the system outputs the "business sensitive information table" worksheet, which contains four columns of original data content, business sensitive data type, data source worksheet name and desensitized content, and the output style is as shown in Figure 5 ; The specific desensitization process and strategy are as follows: For the desensitization of enterprise and institution names, it specifically includes: Match the organization suffix of the enterprise and institution name in the preset dictionary; Match the district name (if any) of the enterprise and institution name in the preset dictionary; Match the special prefix of the enterprise and institution name in the dictionary (if any); Match the common industry name of the enterprise and institution name in the dictionary (if any); Remove the organization suffix, district name, special prefix and common industry name of the enterprise and institution name; If the character length of the remaining content is greater than 3: Then the first 0 characters and the last 1 character of the remaining content are retained, the rest of the characters are replaced with asterisks, and the organization suffix, district name, special prefix and common industry name are retained; If the main body length is less than 3: Only the organization suffix, district name, special prefix and common industry name are retained; For the desensitization of names, it specifically includes: Match the compound surname in the dictionary: If the match is successful, take the matching result as the surname part; If the match fails, take the first character as the surname part; The obtained surname part is spliced with "someone" to form the desensitized result; For the desensitization of the address, specifically including: Matching the district name in the dictionary: If there is a preset district name, keep the district name; If there is no preset district name, do not keep any original information; Splice the retained district name (if any) with "A place" to form the desensitization result; For the desensitization of coded sensitive information, specifically including: For electronic invoice code, company tax number, ID number, invoice code, invoice number, mobile phone number, bank account number: replace the middle seven digits with "A"; For fixed-line number: If it contains an area code separator, keep the area code and replace the middle four digits of the number part with "A"; If it does not contain an area code separator, replace the middle six digits with "A".

[0035] Step 6 S106, the user checks and directly edits the "Business Sensitive Information Table" to the user's consideration of the desensitization degree reliable, the editing operation can be performed including: modifying the desensitized content, adding or deleting desensitized content. The operation example is shown as Figure 6 .

[0036] Step 7 S107, the user starts the business sensitive information desensitization process of the system by clicking the button / icon of the VBA form control in the Excel file or the VBA ActiveX control button / icon. The operation example is shown as Figure 7 .

[0037] Step 8 S108, the system will traverse all non-empty cells in all pre-named worksheets in the Excel file except "Directory" and "Business Sensitive Information Table", and based on the "original data content" in "Business Sensitive Information Table", replace the same matching result with "desensitized content". The desensitization result is shown as Figure 8 .

[0038] Step 9 S109, the system will mark the cells where "original data content" is replaced with "desensitized content" with a prominent visual effect (yellow highlight). The prominent visual effect is shown as Figure 9 .

[0039] Step 10 S110, the user checks the desensitized file to determine whether there is further desensitization information: If so, re-modify the content of "Business Sensitive Information Table" and repeat Step 7. The operation process is shown as Figure 9 . If not, keep "Business Sensitive Information Table" as a self-use index table and proceed to the next step.

[0040] In the tenth step S111, the user provides the electronic spreadsheet file without the "commercial sensitive information comparison table" worksheet to the information user to realize the transmission of the desensitized information.

[0041] In this embodiment, the program package carrier can be used to save the program code for realizing the commercial sensitive information identification and desensitization method of the above-mentioned embodiments. In this embodiment, an xlsm file is used for packaging, and other packaging examples include xlsx, xls, et, ett, and various electronic spreadsheet files, which are not described in detail here.

[0042] In this embodiment, the program package carrier can be used to save the program code for realizing the commercial sensitive information identification and desensitization method of the above-mentioned embodiments. In this embodiment, an xlsm file is used for packaging, and other packaging examples include xlsx, xls, et, ett, and various electronic spreadsheet files, which are not described in detail here. Figure 10 As shown in the figure, it specifically comprises: The information input and output interface and the user operation component 100 specifically comprise a "description and directory page" worksheet containing a VBA control, a "commercial sensitive information comparison table" for storing the content comparison table before and after desensitization, and various worksheets for storing the original desensitized information.

[0043] The sensitive information processing module 101 carries the main workflow and is used to generate the "commercial sensitive information comparison table"; which comprises: The worksheet processing module is used to call the corresponding processing logic according to the worksheet type; The cell processing module is used to process multiple sensitive information that may be contained in a single cell; The result management module is used to create and maintain the sensitive information comparison table, record the original content, data type, source, and desensitization result; The performance optimization module improves the processing efficiency through batch processing, regular refreshing, and other mechanisms.

[0044] The data structure definition module 104 is used to define the basic data structure of the system and maintain the global dictionary; which comprises: The sensitive data type enumeration module is used to define and distinguish different types of commercial sensitive information, including eleven types of electronic invoice code, company tax number, ID number, invoice code, mobile phone number, invoice number, fixed-line number, enterprise name, address, name, and bank account number; The sensitive information storage structure is used to store the original content, data type, source worksheet, and desensitized content; A plurality of special dictionaries are used to store standardized data such as administrative division, organizational structure, common enterprise and institution name pattern, special prefix, address keyword, and compound surname; Further: The administrative division dictionary contains the names and commonly used abbreviations of all provinces, cities, and counties in China; Organization dictionary contains all the organization forms and unit forms of China's enterprises and institutions; Common enterprise and institution name mode dictionary contains all the industry classification words of China's national economic industries; Special prefix dictionary includes: China, China, state-owned, state, highest, local, and other special agency prefix names; Address keyword dictionary includes: basic road name class, doorplate class, building class, area class, direction class, building type, transportation hub facility class, etc.; Compound surname dictionary includes more than ten common compound surnames in China.

[0045] Data area definition module 102, for defining and identifying sensitive information areas in different types of worksheets; including: Worksheet type identifier, for classifying worksheets into different types such as invoice worksheet, bank statement worksheet, subject balance sheet, and detailed account; Sensitive area definition structure module, for defining column name keywords and possible sensitive data types in each area; Multiple area acquisition functions, for returning corresponding sensitive area definitions according to worksheet types.

[0046] Data recognition module 103, for recognizing various types of commercial sensitive information; including: Regular expression matching module, for identifying structured sensitive information such as invoice number, invoice code, electronic invoice code, tax number, ID number, etc.; Further: the above identification method is to obtain the judgment result by regex.Test() method; Enterprise name recognition module, which recognizes enterprise names by matching multi-dimensional features such as regional names, organization suffixes, and industry characteristic words in the dictionary; Address information recognition module, which recognizes address information by matching the combination of regional names and address keywords; Name recognition module, which recognizes names by matching Chinese character length and compound surname features.

[0047] Data desensitization module 105, for desensitizing the identified sensitive information; including: Number information desensitization module, for partially replacing various numbers, such as retaining the first and last few digits and replacing the middle with a special character; Enterprise name desensitization module, which desensitizes enterprise names by retaining the beginning and organization suffix and replacing the middle with an asterisk; Address information desensitization module, which desensitizes address information by retaining regional names and replacing other information with "place A"; The human name desensitization module desensitizes by retaining the surname and replacing other parts with "someone"; The sensitive information replacement module 106 automatically replaces and marks sensitive information in the workbook by establishing a mapping relationship between sensitive information and desensitized information. This includes: The sensitive information mapping module is used to establish and manage the correspondence between sensitive information and desensitized information. This module uses a dictionary object to store the mapping relationship for fast lookup and matching. This module includes two key elements: original information and corresponding desensitized information. The data range determination module intelligently identifies the effective range of data actually contained in the worksheet. It locates the starting row, ending row, starting column, and ending column of the data area through iterative scanning, avoiding the impact of empty rows and columns on processing efficiency. The batch data processing module is used to efficiently process large-scale data. It uses array-based batch reading and processing of data to avoid frequent cell read-write operations. This module can simultaneously process data from multiple worksheets and has data verification and error handling mechanisms. The information replacement module is used to perform sensitive information replacement operations. It uses string matching and replacement algorithms to replace original sensitive information with corresponding desensitized information. This module supports case-insensitive fuzzy matching to ensure the accuracy and completeness of the replacement. The visual marking module is used to visually mark processed data. It uses color highlighting to mark all cells that have undergone desensitization processing, making it easier for users to review and confirm later. The performance optimization module is used to improve system processing efficiency. It controls screen updates, event handling, and calculation modes to significantly improve the efficiency of large-scale data processing. This module also includes a progress feedback mechanism to display real-time processing progress and time consumption information.

[0048] As a further scheme of the present application, the working mode of the sensitive information processing unit 101 is as follows: 1. Worksheet traversal and identification: The system first obtains the total number of worksheets in the workbook (excluding result tables and instruction tables), and then processes each worksheet in turn. During processing: Identify the worksheet type (invoice, bank statement, subject balance table, detailed account, declaration form, etc.) through the worksheet name; Call the corresponding processing function according to the worksheet type; Update the screen once every 3 worksheets; Use the status bar to display the processing progress; 2. Performance optimization mechanism To improve the efficiency of processing large amounts of data, the system adopts a number of performance optimization measures: Turn off screen updates (Application.ScreenUpdating = False); Set manual calculation mode (Application.Calculation = xlCalculationManual); Disable event triggering (Application.EnableEvents = False); Use array batch storage to process results and avoid frequent worksheet operations; Use dynamic array expansion mechanism, initial capacity is 100,000 records; 3. Data storage structure The processing result is stored in a two-dimensional array, each record contains 5 fields: Original content; Data type; Source worksheet; De-sensitization content; Processing mark; 4. Cell processing mechanism The processing logic of a single cell is implemented: Skip the header row (first row); Split the cell content (according to space, comma, etc. Separator); Support specifying data type check or full type check; Use data recognition module for data type recognition; Sensitive information identified is desensitized; 5. Result deduplication and renumbering mechanism: The combination of functions and memory arrays is used to achieve result deduplication and addition: Check if the combination of the same content, type and source already exists; Renumber the same desensitized content; Record processing mark; 6. Result table generation: Create a new worksheet after the instructions page; Set the standard table header; Use text formatting to ensure correct data display; Implement intelligent column width adjustment (with a failed alternative); Set the first row freeze for easy browsing.

[0049] As a further scheme of the present application: further comprising: the working mode of the sensitive information replacement module 106 is as follows: 1. System initialization and performance optimization mechanism When the system starts, first perform performance optimization configuration: Turn off Excel screen updating; Disable event triggering; Set manual calculation mode; These configurations can handle scenarios with more than 100 million cells; 2. Processing mechanism of sensitive information mapping table: The system uses a dictionary object to store the mapping relationship of sensitive information: Read mapping data from the "Business Sensitive Information Table" worksheet; Use the End(xlUp) method to accurately locate the last row of data; Batch read data from A2:D last row to array through Range object; Load array data into dictionary object, where: Dictionary key (Key) is the original sensitive information; Dictionary value (Value) is the corresponding desensitization result; Use the exists method to check duplicates to ensure the uniqueness of the mapping relationship; 3. Worktable data range identification mechanism The system implements an accurate data range identification algorithm (TrimUsedRange function): First, get the UsedRange of the worksheet as the initial range: Determine the actual data range by four independent scans: Forward scan to determine the first non-empty row (FirstRow); Reverse scan to determine the last non-empty row (LastRow); Forward scan to determine the first non-empty column (FirstCol); Reverse scan to determine the last non-empty column (LastCol); Based on the scan results, construct an accurate data range object; Use error recovery mechanism to ensure the stability of the scanning process; 4. Batch data processing mechanism Use in-memory array operations to process data: For each worksheet (except "Business Sensitive Information Table" and "Instructions and Directory Page"): Read the effective data range into the array (cellData) at one time; Perform data processing in memory to avoid frequent cell access; The processing result is stored using a two-dimensional array. 5. Sensitive information replacement algorithm The system implements a high-performance text replacement mechanism: For each non-empty cell in the array: Convert the cell content to a string (CStr function); Traverse all sensitive information in the dictionary; Use the InStr function for case-insensitive text matching; Use the Replace function to perform precise replacement; Optimize matching efficiency by Exit For, find matching items and stop traversal; 6. Change tracking and visual marking mechanism The system implements complete data change tracking: Use the Collection object to store all changed cell information; Record format: "cell address | worksheet name"; Ensure address accuracy through relative position calculation; Batch set yellow highlight mark; Support cross-worksheet change tracking; 7. Progress feedback mechanism The system implements detailed progress feedback: Use the Timer function to record the start time; Statistical processing cell quantity; Calculate processing time consumption; Show the processing result through the message box, including: The number of successfully processed cells; Time consumption (accurate to two decimal places); 8. Data integrity protection mechanism: Restore Excel settings in any abnormal situation; Control data write-back operation through the changed flag; Protective data type conversion.

Claims

1. A method for identifying and desensitizing business sensitive information, characterized in that, The method comprises: reading a worksheet in the spreadsheet file that meets the specified condition based on the specified condition; reading the specified area of the worksheet in the spreadsheet file that meets the specified condition based on the specified condition; identifying and classifying the content in the read non-empty cell that meets the specified condition based on the specified area and the specified condition; based on the classification result, desensitizing the read non-empty cell content identified based on the condition, and storing the desensitization result in the computer memory; based on the desensitization result in the computer memory, storing the read non-empty cell content and the desensitization result identified based on the condition in a separate worksheet or blank area of an existing worksheet; based on the content of the worksheet storing the read non-empty cell content and the desensitization result, replacing the entire spreadsheet file that meets the specified content; based on the replacement process, marking the cells that have been replaced with a highlighted visual effect.

2. The method of claim 1, wherein, The method for reading a worksheet in a spreadsheet file that meets the specified condition based on the specified condition comprises: using the specific sequential position of the worksheet in the spreadsheet as the specified condition to determine whether there is a worksheet with a specific sequential position in the spreadsheet file: if yes, read the worksheet; if no, do not perform the operation; using the relative sequential position of the worksheet in the spreadsheet as the specified condition to determine whether there is a worksheet that increases / decreases the specified sequential position from the sequential position of a specified worksheet as the starting position: if yes, read the worksheet; if no, do not perform the operation; using the keyword contained in the worksheet name as the specified condition to determine whether there is a worksheet in the spreadsheet file whose name contains the specified keyword: if yes, read the worksheet; if no, do not perform the operation.

3. The method of claim 1, wherein, The method for reading the specified area of the worksheet in the spreadsheet file that meets the specified condition based on the specified condition comprises: using the specified row, column number, or a segment that can form a row or column, or the diagonal cells of a rectangular area in the worksheet as the input instruction for the specified area; determining the entire row, column, segment of row, segment of column, or rectangular area drawn by the diagonal cells as the area to be read; using a specific row in the worksheet as the specified row to determine whether there is a cell containing the specified keyword in the row: if yes, determine the column to which the cell belongs as the area to be read; if no, do not perform the operation; using a specific column in the worksheet as the specified column to determine whether there is a cell containing the specified keyword in the column: if yes, determine the row to which the cell belongs as the area to be read; if no, do not perform the operation.

4. The method of claim 1, wherein, The method for identifying and classifying the content in the read non-empty cell that meets the specified condition based on the specified condition comprises: For the identification and classification of enterprise and institution names, specifically including: determining whether the content length is greater than or equal to the preset minimum length: if yes, proceed to the next enterprise and institution name determination; if no, determine that it is not an enterprise and institution name; determining whether the number of address characteristic words in the content is less than the preset threshold: If yes: continue the next item of enterprise and institution name judgment; If no: determine that it is not an enterprise and institution name; Judge whether the content contains special prefixes and has organization suffixes: If yes: determine that it belongs to enterprise and institution name; If no: continue the next item of enterprise and institution name judgment; Judge whether the content contains area names and has organization suffixes: If yes: determine that it belongs to enterprise and institution name; If no: continue the next item of enterprise and institution name judgment; Judge whether the content contains common enterprise name patterns and has organization suffixes: If yes: determine that it belongs to enterprise and institution name; If no: determine that it is not an enterprise and institution name.

5. The method of claim 1, wherein, The method for identifying and classifying the content that meets the specified conditions in the read non-empty cells based on the specified conditions comprises: For the identification and classification of names, it specifically comprises: Judge whether the content length is between the preset minimum length and maximum length: If yes: continue the name judgment; If no: determine that it is not a name; Judge whether the content characters are all Chinese characters: If yes: continue the name judgment; If no: determine that it is not a name; Judge whether the first two characters of the content are the preset compound surnames: If yes: continue the remaining character number judgment under the compound surnames; If no: continue the remaining character number judgment under the non-compound surnames; If it is a compound surname, judge whether the remaining character number is between 1 and 2: If yes: determine that it is a name; If no: determine that it is not a name; If it is not a compound surname, judge whether the total character number is between 1 and 3: If yes: determine that it is a name; If no: determine that it is not a name.

6. The method of claim 1, wherein, The method for identifying and classifying the content that meets the specified conditions in the read non-empty cells based on the specified conditions comprises: For the identification and classification of addresses, it specifically comprises: Judge whether the content contains preset area names and address characteristic words: If yes: continue the address judgment; If no: determine that it is not an address; Judge whether the total number of area names and address characteristic words in the content is greater than or equal to the preset threshold: If yes: determine that it is an address; If no: determine that it is not an address.

7. The method of claim 1, wherein, The method for identifying and classifying the content that meets the specified conditions in the read non-empty cells based on the specified conditions comprises: For the identification and classification of coding type sensitive information, it specifically comprises: Identify electronic invoice code, company tax number, ID number, invoice code, mobile phone number, invoice number, fixed-line number, bank account number, etc. based on the preset regular expression rules; Regular expressions include pure letter code judgment, pure number code judgment, and number and letter mixed code judgment.

8. The method of claim 1, wherein, The method for desensitizing the read non-empty cells based on the classification results comprises: For the desensitization of enterprise and institution names, it specifically comprises: Match the organization suffixes of enterprise and institution names in the preset dictionary; Match the area names of enterprise and institution names in the preset dictionary (if any); Match the special prefixes of enterprise and institution names in the dictionary (if any); Match the common industry names of enterprise and institution names in the dictionary (if any); Remove the organization suffixes, area names, special prefixes, and common industry names of enterprise and institution names; If the character length of the remaining content is greater than the threshold value: The first specified number of characters and the last specified number of characters of the remaining content are replaced with preset fixed characters, and the organizational suffix, the area name, the special prefix, and the common industry name are retained; If the subject length is less than the threshold value: Only the organizational suffix, the area name, the special prefix, and the common industry name are retained.

9. The method of claim 1, wherein, The method for desensitizing the read non-empty cell content based on the classification result includes: For the desensitization of the name, specifically includes: Matching the compound surname in the dictionary: If the matching is successful, the matching result is taken as the surname part; If the matching fails, the first character is taken as the surname part; The obtained surname part is spliced with the preset string to form the desensitization result.

10. The method of claim 1, wherein, The method for desensitizing the read non-empty cell content based on the classification result includes: For the desensitization of the address, specifically includes: Matching the area name in the dictionary: If the preset area name exists, the area name is retained; If the preset area name does not exist, no original information is retained; The retained area name (if any) is spliced with the preset string to form the desensitization result.

11. The method of claim 1, wherein, The method for desensitizing the read non-empty cell content based on the classification result includes: For the desensitization of the coded sensitive information, specifically includes: For the electronic invoice code, the company tax number, the ID number, the invoice code, the invoice number, the mobile phone number, and the bank account number: the characters at the specified positions are replaced with preset fixed characters; For the landline number: If the area code separator is included, the area code is retained, and the characters at the specified positions of the number part are replaced with preset fixed characters; If the area code separator is not included, the characters at the specified positions are replaced with preset fixed characters.

12. The method of claim 1, wherein, The method for storing the read non-empty cell content and the desensitization result in a separate worksheet based on the desensitization result includes: Judging whether a desensitization-before-and-after content comparison table of the preset name already exists: If yes, the desensitization-before-and-after content comparison table of the preset name is deleted; If no, the process continues; Creating the desensitization-before-and-after content comparison table after the specified worksheet, specifically includes: Creating the table header in the desensitization-before-and-after content comparison table, specifically includes: Original data content, commercial sensitive data type, data source worksheet, desensitized content; Checking whether the same record exists in the original data content: If yes, the record is skipped; If no, the original data content is written into the desensitization-before-and-after content comparison table; Checking whether the same record exists in the desensitized content: If yes, the desensitized content is written into the desensitization-before-and-after content comparison table after concatenating a serial symbol or a serial number; If no, the desensitized content is written into the desensitization-before-and-after content comparison table.

13. The method of claim 1, wherein, The method for replacing the specified content in the entire spreadsheet file based on the worksheet content of the read non-empty cell content and the desensitization preview result includes: Creating a dictionary object for storing the sensitive information mapping relationship, specifically includes: Taking the original data content in the desensitization-before-and-after content comparison table as the key value; Taking the desensitized content in the desensitization-before-and-after content comparison table as the corresponding value; Traverse all sheets in the workbook, including: Determine if the sheet name is a preset excluded sheet name: If so, skip this sheet; If not, continue processing the sheet; Get the actual usage range of the sheet, including: Identify the position of the first non-empty row; Identify the position of the last non-empty row; Identify the position of the first non-empty column; Identify the position of the last non-empty column; Determine the actual data range based on the identification results; Read the determined data range into memory, including: Traverse the content of each cell in the memory; Determine if the cell is empty: If so, skip this cell; If not, continue processing; Check if there is sensitive information matching the cell content in the dictionary: If so, replace the cell content with the corresponding desensitized information and record the cell position; If not, continue processing the next cell; Write the recorded cell position to memory; Visualize the recorded cell position, including: Set the replaced cell to a prominent visual effect; Display the statistical information of the processing completed.

14. The method of claim 1, wherein, Users can complete data desensitization on computers running Excel files (file extensions include but are not limited to xls, xlt, xlsb, xlsx, xltx, xltm, xlsm, et, ett, ods, odf, etc.) without installing other executable programs (.exe extension).

15. The method of claim 1, wherein, The computer used by the user to complete the desensitization process can remain disconnected from the network at all times before, during, and after the desensitization process without affecting the desensitization results.

16. A system for de-identifying business information based on a spreadsheet file, the system comprising: The system includes: Program packaging carrier: used to carry the packaged program and ensure compatibility and running on the user's computer; Information input and output interface: used to complete the input of information to be desensitized and the output of desensitization results; User operation component: used to start the system and trigger the system process; Sensitive information processing module: used to generate an Excel file to store desensitization results; Data structure definition module: used to define the basic data structure of the system and store the dictionary used for matching; Data area definition module: used to define and identify sensitive information areas in different types of sheets; Data desensitization module: used to desensitize the identified sensitive information; Data recognition module: used to recognize various types of commercial sensitive information; Sensitive information replacement module: by reading the mapping relationship between sensitive information and desensitized information, and automatically replacing and marking within the workbook range.

17. The system of claim 16, wherein, Also includes: The program packaging carrier is a binary structure (BIFF) Excel file (file extension xls, xlt, xlsb), or an Excel file composed of XML files and folders (file extensions include but are not limited to xlsx, xltx, xltm, xlsm, et, ett, ods, odf, etc.).

18. The system of claim 16, wherein, Also includes: The information input and output interface is the sheet interface in the Excel file.

19. The system of claim 16, wherein, Also includes: The user operation component is a VBA compiler component, a VBA form control, and a VBA ActiveX control.

Citation Information

Cited By

  • Financial insurance field-oriented cloud report automatic generation method and system

    CN121502807A