A security protection method and system for sensitive data
By dividing file formats and partitioning sensitive data in real-time content data on the platform, combining identity authentication and encryption processing, the problem of poor security protection in the existing technology is solved, and more efficient security protection is achieved.
Patent Information
- Application Number
- CN202411287551.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-13
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2044-09-13
AI Technical Summary
The existing sensitive data security protection methods rely solely on user account permission restrictions and do not encrypt sensitive content secondaryly, resulting in poor security protection, lack of targetedness and low protection efficiency.
By dividing the real-time content data of the platform in file format, sensitive data is extracted, and the web address of the network interface is divided into the first protection area and the second protection area, different security protection measures are taken for different intervals, including identity authentication and encryption processing.
It improves the security and protection efficiency of sensitive data, and realizes targeted identification and encryption processing of sensitive content in different file formats.
Smart Images

Figure CN119094217B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of information security and relates to encryption technology, in particular to a security protection method and system for sensitive data. Background Art
[0002] Existing sensitive data security protection methods have the following defects in the process of protecting sensitive data:
[0003] 1. Existing security protection methods rely solely on user accounts to restrict access rights without secondary encryption of sensitive content, resulting in poor security protection of sensitive data.
[0004] 2. Sensitive content is not divided into file formats and sensitive content, making it impossible to formulate targeted protection methods, resulting in a lack of targeted and inefficient sensitive data protection methods.
[0005] To this end, we propose a security protection method and system for sensitive data. Summary of the Invention
[0006] In response to the shortcomings of the existing technology, the purpose of the present invention is to provide a security protection method and system for sensitive data. The present invention is based on obtaining real-time content data of the platform and extracting sensitive data from the real-time content data of the platform to obtain real-time sensitive data. By analyzing the real-time sensitive data, the Web address of the network interface where the sensitive content is located is divided into a first protection interval and a second protection interval to obtain protection interval data. According to the protection interval data, security protection is performed on the Web address in the first protection interval, and according to the protection interval data, security protection is performed on the Web address in the second protection interval.
[0007] To achieve the above objectives, the present invention adopts the following technical solution: a method for protecting sensitive data, further comprising the following specific steps:
[0008] Step S1: Acquire real-time content data of the platform, divide and merge the real-time content data of the platform into file formats to obtain first processed data and second processed data, and extract sensitive data from the first processed data and the second processed data respectively to obtain real-time sensitive data;
[0009] Step S2: Calculate first to mth sensitivity coefficients by analyzing real-time sensitive data, obtain sensitivity coefficient thresholds, perform numerical comparisons with the first to mth sensitivity coefficients, and divide the web address of the network interface where the sensitive content is located into a first protection zone and a second protection zone based on the comparison results to obtain protection zone data;
[0010] Step S3: Obtain the web address of the first protection zone based on the protection zone data, authenticate the user end through the target data platform, and send an encrypted SYN-ACK packet to the authenticated user end. Only after the user end decrypts the SYN-ACK packet can the user end access the web address.
[0011] Step S4: The Web address in the second protection interval and the sensitive content linked to the Web address are separately encrypted according to the protection interval data to obtain an encrypted code. The user terminal decrypts the encrypted code to view the sensitive content.
[0012] Furthermore, the step S1 further includes the following specific steps:
[0013] Step S11: acquiring platform content data generated by the target data platform in real time to obtain real-time platform content data;
[0014] Step S12: dividing the platform real-time content data into text format content data, audio format content data, picture format content data, and video format content data according to the file format;
[0015] Step S13: converting the audio format content data into text format content data by performing speech recognition on the audio format content data, and naming the text format content data as first processed data;
[0016] Step S14: converting the video format content data into picture format content data by intercepting the video format content data frame by frame, and defining the picture format content data as second processed data;
[0017] Step S15: further classifying the second processed data into different types by performing feature analysis on the images in the second processed data;
[0018] The step S15 further includes the following specific steps:
[0019] Step S151: naming the images in the second processed data as the first processed image to the jth processed image in the order of generation time;
[0020] Step S152: performing feature analysis on the first processed image to obtain image feature analysis coefficients corresponding to the first processed image;
[0021] The step S152 further includes the following specific steps:
[0022] Step S1521: Recognize the text in the first processed image by an OCR scanning device, and name the recognized text as first recognized text to i-th recognized text respectively;
[0023] Step S1522: Draw a line through the upper edge of the first recognized character and parallel to the upper edge of the image to obtain a first annotation line; draw a line through the lower edge of the first recognized character and parallel to the lower edge of the image to obtain a second annotation line; draw a line through the left edge of the first recognized character and parallel to the left edge of the image to obtain a third annotation line; draw a line through the right edge of the first recognized character and parallel to the right edge of the image to obtain a fourth annotation line;
[0024] Step S1523: naming the rectangle enclosed by the first, second, third, and fourth annotation lines as a first character rectangle, obtaining the area of the first character rectangle, and obtaining a first character area value;
[0025] Step S1524: acquiring area values of the character rectangles corresponding to the second recognized character to the i-th recognized character respectively, to obtain the second to i-th area values;
[0026] Step S1525: summing the first to i-th area values to obtain the area value of the processed image text;
[0027] Step S1526: Marking the area outside the text rectangle in the first processed image as the background image area, and selecting the first background marking point to the pth background marking point in the background image area;
[0028] Step S1527: respectively obtaining pixel depth values corresponding to the first background annotation point to the p-th background annotation point, to obtain the first pixel depth value to the p-th pixel depth value;
[0029] Step S1528: Calculate the average of the pixel depth values from the first pixel to the p-th pixel to obtain a labeled average pixel depth, and calculate the variance of the pixel depth value from the first pixel to the p-th pixel to obtain a pixel depth variation variance;
[0030] Step S1529: Calculating the image feature analysis coefficients by processing the text area value, the average pixel depth of the annotation, and the variance of the pixel depth;
[0031] Calculate the image feature analysis coefficient. The specific formula is as follows:
[0032]
[0033] Among them, Tzx1 is the image feature analysis coefficient, Wmj is the area value of the processed image text, Sup is the average pixel depth of the annotation, and Scf is the variance of the pixel depth change;
[0034] Step S153: acquiring image feature analysis coefficients corresponding to the second processed image to the j-th processed image respectively, to obtain j image feature analysis coefficients;
[0035] Step S154: obtaining an image feature analysis coefficient threshold, and comparing the j image feature analysis coefficients with the image feature analysis coefficient threshold respectively;
[0036] The step S154 further includes the following specific steps:
[0037] Step S1541: when the image feature analysis coefficient is greater than or equal to the image feature analysis coefficient threshold, the corresponding image is reclassified into first processed data;
[0038] Step S1542: when the image feature analysis coefficient is less than the image feature analysis coefficient threshold, the corresponding image is used as the second processed data;
[0039] Step S16: extracting sensitive data from the first processed data to obtain real-time sensitive data corresponding to the first processed data;
[0040] Step S17: Extract the sensitive data in the second processed data to obtain real-time sensitive data corresponding to the second processed data.
[0041] Furthermore, the step S16 further includes the following specific steps:
[0042] Step S161: in the process of extracting sensitive data from text data, m sensitive keywords are set and marked as first sensitive keyword to mth sensitive keyword respectively;
[0043] Step S162: Perform text matching on the first processed data with the first to mth sensitive keywords. If the matching results are consistent, mark the matching text as sensitive content, and obtain the web address of the network interface where the sensitive content is located to obtain real-time sensitive data corresponding to the first processed data.
[0044] Furthermore, the step S17 further includes the following specific steps:
[0045] Step S171: Acquire multiple historical images generated by the target data platform to obtain platform historical image data;
[0046] Step S172: Marking the sensitive areas of the platform's historical image data to obtain sensitive marked image data;
[0047] Step S173: Divide the sensitive labeled image data into a model test set and a model training set according to the test-training ratio;
[0048] Step S174: Create an image recognition model using an existing artificial intelligence platform, train the image recognition model using the model training set, and after all images in the model training set have been trained, perform a recognition test on the image recognition model using the model test set, and obtain the recognition success rate to obtain the model recognition success rate;
[0049] Step S175: Obtain a preset image recognition success rate. If the model recognition success rate is greater than or equal to the preset image recognition success rate, the model training is completed and a sensitive recognition image model is obtained. If the model recognition success rate is less than the preset image recognition success rate, the image recognition model is repeatedly trained using the model training set until the model recognition success rate is greater than or equal to the preset image recognition success rate.
[0050] Step S176: Use the sensitive recognition image model to perform image recognition on the second processed data, define the picture with sensitive areas as sensitive content, obtain the web address of the network interface where the sensitive content is located, and obtain real-time sensitive data corresponding to the second processed data.
[0051] Furthermore, the step S2 further includes the following specific steps:
[0052] Step S21: obtaining real-time sensitive data, obtaining the web address of each network interface where the sensitive content is located according to the real-time sensitive data, and marking them as the first web address to the mth web address respectively;
[0053] Step S22: performing sensitive content analysis on the network interface corresponding to the first web address to obtain a first sensitivity coefficient;
[0054] Step S23: performing sensitive content analysis on the network interfaces corresponding to the second Web address to the mth Web address respectively to obtain the second sensitivity coefficient to the mth sensitivity coefficient;
[0055] Step S24: obtaining a sensitivity coefficient threshold, performing a numerical comparison between the first sensitivity coefficient and the sensitivity coefficient threshold, and dividing the first Web address into a first protection interval and a second protection interval according to the comparison result;
[0056] Step S25: numerically comparing the second sensitivity coefficient to the mth sensitivity coefficient with the sensitivity coefficient threshold, and dividing the second web address to the mth web address into a first protection interval and a second protection interval;
[0057] Step S26: defining the Web addresses corresponding to the first protection zone and the second protection zone respectively as protection zone data.
[0058] Furthermore, the step S22 further includes the following specific steps:
[0059] Step S221: obtaining the number of characters corresponding to the sensitive content in the network interface to obtain a first character number, obtaining the total number of characters in the network interface to obtain a second character number, and calculating the ratio of the first character number to the second character number to obtain a sensitive character number ratio;
[0060] Step S222: Obtain the number of images corresponding to the sensitive content in the network interface to obtain the first number of images, obtain the total number of images in the network interface to obtain the second number of images, and calculate the ratio of the first number of images to the second number of images to obtain the sensitive image number ratio;
[0061] Step S223: Taking the current time as the reference time point, obtaining a time point corresponding to a feature monitoring duration before the reference time point as the detection start time point, and taking the time period between the detection start time point and the reference time point as the sensitive detection period;
[0062] Step S224: Obtain the number of times the first web address is accessed by users during the sensitive detection period to obtain the user's period visit volume;
[0063] Step S225: Calculating the first sensitivity coefficient by taking into account the number of first characters, the number of first images, the ratio of sensitive characters, the ratio of sensitive images, and the number of visits by users during a period of time;
[0064] Calculate the first sensitivity coefficient. The specific formula is as follows:
[0065] Mg1=[(Zf1+Tp1)+(Zfb+Tpb)]×Fwl;
[0066] Among them, Mg1 is the first sensitivity coefficient, Zf1 is the first number of characters, Tp1 is the first number of pictures, Zfb is the ratio of the number of sensitive characters, Tpb is the ratio of the number of sensitive pictures, and Fwl is the number of visits by users in a certain period of time.
[0067] Furthermore, the step S24 further includes the following specific steps:
[0068] Step S241: respectively obtaining a first character quantity threshold, a first image quantity threshold, a sensitive character quantity ratio threshold, a sensitive image quantity ratio threshold, and a user time period visit volume threshold;
[0069] Step S242: Calculating the first character quantity threshold, the first image quantity threshold, the sensitive character quantity ratio threshold, the sensitive image quantity ratio threshold, and the user time period visit volume threshold to obtain a sensitivity coefficient threshold;
[0070] Step S243: When the first sensitivity coefficient is greater than or equal to the sensitivity coefficient threshold, the first web address is divided into a first protection interval;
[0071] Step S244: When the first sensitivity coefficient is less than the sensitivity coefficient threshold, the first Web address is divided into a second protection interval.
[0072] Furthermore, the step S3 further includes the following specific steps:
[0073] Step S31: obtaining protection interval data, and obtaining a Web address in a first protection interval according to the protection interval data;
[0074] Step S32: The target data platform obtains security user information and establishes a security access directory;
[0075] Step S33: The user terminal sends a SYN packet to the target data platform to indicate that a connection needs to be established with the target data platform;
[0076] Step S34: The target data platform obtains the SYN packet and obtains the user information corresponding to the user terminal through the SYN packet. The target data platform searches the user information in its own security access directory. If the corresponding user information exists in the security access directory, the target data platform creates a SYN-ACK packet, encrypts the SYN-ACK packet, obtains an encrypted SYN-ACK packet, and transmits the encrypted SYN-ACK packet to the user terminal.
[0077] Step S35: After receiving the encrypted SYN-ACK packet, the user terminal needs to decrypt the encrypted SYN-ACK. If the decryption is complete, the user terminal sends an ACK packet to the target data platform again to confirm the connection. If the decryption is not complete, the user terminal cannot send an ACK packet to the target data platform again.
[0078] Step S36: When the target data platform receives the ACK packet sent by the user terminal, it allows the user terminal to access the Web address.
[0079] Furthermore, the step S4 further includes the following specific steps:
[0080] Step S41: obtaining protection interval data, and obtaining a Web address in a second protection interval according to the protection interval data;
[0081] Step S42: Acquire real-time sensitive data, obtain the real-time sensitive data, and acquire sensitive content corresponding to the web address in the second protection zone based on the real-time sensitive data;
[0082] Step S43: randomly generating two 128-bit character strings by random character generation to obtain a first random character string and a second random character string, marking the first random character string as a text encryption key, and marking the first random character string as an initialization vector;
[0083] Step S44: If the encrypted content is in text format, the encrypted content is converted into byte format using UTF-8 encoding to obtain the encrypted content code;
[0084] Step S45: If the encrypted content is in image format, the encrypted content is converted into byte format through the Pillow library to obtain the encrypted content code;
[0085] Step S46: Divide the encrypted content into data blocks of n characteristic bytes in length, and mark them as the first data block to the mth data block respectively;
[0086] Step S47: performing an XOR operation on the first data block and the initial vector to obtain a first encryption code, performing an XOR operation on the first encryption code and the second data block to obtain a second encryption code, performing an XOR operation on the second encryption code and the third data block to obtain a third encryption code, and repeating this process until performing an XOR operation on the n-1th encryption code and the nth data block to obtain an nth encryption code;
[0087] Step S48: Displaying the sensitive content in an encrypted format on the display interface corresponding to the Web address;
[0088] Step S49: The user terminal decrypts the encrypted code by obtaining the text encryption key, thereby accessing the sensitive content;
[0089] The step S49 further includes the following specific steps:
[0090] Step S491: XOR the nth encrypted code with the text encryption key to obtain the nth data block, XOR the n-1th encrypted code with the nth data block to obtain the n-1th encrypted code, and repeat this process until the first data block is obtained;
[0091] Step S492: Convert the first to nth data blocks into byte format to obtain encrypted content code;
[0092] Step S493: If the sensitive content corresponding to the encrypted content code is in text format, the encrypted content code is converted into sensitive content using UTF-8 encoding;
[0093] Step S494: If the sensitive content corresponding to the encrypted content code is in image format, the encrypted content code is converted into sensitive content through the Pillow library.
[0094] A security protection system for sensitive data. The specific working process of each module is as follows:
[0095] Data acquisition module: used to obtain real-time content data of the platform and extract sensitive data from the real-time content data of the platform to obtain real-time sensitive data;
[0096] Data analysis module: used to divide the web address of the network interface where the sensitive content is located into a first protection zone and a second protection zone by analyzing the real-time sensitive data, and obtain protection zone data;
[0097] The first protection module is used to provide security protection for Web addresses in the first protection zone according to the protection zone data;
[0098] The second protection module is used to provide security protection for the Web addresses in the second protection zone according to the protection zone data.
[0099] In summary, due to the adoption of the above technical solution, the beneficial effects of the present invention are:
[0100] 1. The present invention can improve the security of sensitive data protection by dividing sensitive content into a first protection zone and a second protection zone, and adopting different security protection methods for the sensitive content in the first protection zone and the second protection zone respectively;
[0101] 2. The present invention divides the platform's real-time content data into file formats, and adopts targeted extraction methods for the platform's real-time content data in different file formats to automatically identify sensitive content, which can effectively improve the efficiency of identifying sensitive content, thereby improving the protection efficiency of sensitive content. BRIEF DESCRIPTION OF THE DRAWINGS
[0102] To facilitate understanding by those skilled in the art, the present invention is further described below with reference to the accompanying drawings.
[0103] Figure 1 It is a diagram of the implementation steps of the present invention;
[0104] Figure 2 is a block diagram of the overall system of the present invention;
[0105] Figure 3 This is a schematic diagram of the first character rectangle in the present invention;
[0106] Figure 4 Create a flow chart for the sensitive recognition image model of the present invention. DETAILED DESCRIPTION
[0107] The technical solutions of the present invention will be clearly and completely described below in conjunction with the embodiments. Obviously, the embodiments described are only some embodiments of the present invention, not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of the present invention.
[0108] Example 1
[0109] See also Figure 1The present invention provides a technical solution: a security protection method for sensitive data, comprising the following specific steps:
[0110] Step S1: extracting sensitive data from the platform's real-time content data to obtain real-time sensitive data;
[0111] Step S11: acquiring platform content data generated by the target data platform in real time to obtain real-time platform content data;
[0112] Step S12: dividing the platform real-time content data into text format content data, audio format content data, picture format content data, and video format content data according to the file format;
[0113] Step S13: converting the audio format content data into text format content data by performing speech recognition on the audio format content data, and naming the text format content data as first processed data;
[0114] Step S14: converting the video format content data into picture format content data by intercepting the video format content data frame by frame, and defining the picture format content data as second processed data;
[0115] Step S15: further classifying the second processed data into different types by performing feature analysis on the images in the second processed data;
[0116] The step S15 further includes the following specific steps:
[0117] Step S151: naming the images in the second processed data as the first processed image to the jth processed image in the order of generation time;
[0118] Step S152: performing feature analysis on the first processed image to obtain image feature analysis coefficients corresponding to the first processed image;
[0119] The step S152 further includes the following specific steps:
[0120] Step S1521: Recognize the text in the first processed image by an OCR scanning device, and name the recognized text as first recognized text to i-th recognized text respectively;
[0121] Step S1522: Draw a line through the upper edge of the first recognized character and parallel to the upper edge of the image to obtain a first annotation line; draw a line through the lower edge of the first recognized character and parallel to the lower edge of the image to obtain a second annotation line; draw a line through the left edge of the first recognized character and parallel to the left edge of the image to obtain a third annotation line; draw a line through the right edge of the first recognized character and parallel to the right edge of the image to obtain a fourth annotation line;
[0122] Step S1523: Please refer to Figure 3 , naming the rectangle enclosed by the first annotation line, the second annotation line, the third annotation line, and the fourth annotation line as the first character rectangle, obtaining the area of the first character rectangle to obtain the first character area value;
[0123] Step S1524: acquiring area values of the character rectangles corresponding to the second recognized character to the i-th recognized character respectively, to obtain the second to i-th area values;
[0124] Step S1525: summing the first to i-th area values to obtain the area value of the processed image text;
[0125] Step S1526: Marking the area outside the text rectangle in the first processed image as the background image area, and selecting the first background annotation point to the pth background annotation point in the background image area;
[0126] Step S1527: respectively obtaining pixel depth values corresponding to the first background annotation point to the p-th background annotation point, to obtain the first pixel depth value to the p-th pixel depth value;
[0127] Step S1528: Calculate the average of the pixel depth values from the first pixel to the p-th pixel to obtain a labeled average pixel depth, and calculate the variance of the pixel depth value from the first pixel to the p-th pixel to obtain a pixel depth variation variance;
[0128] Step S1529: Calculating the image feature analysis coefficients by processing the text area value, the average pixel depth of the annotation, and the variance of the pixel depth;
[0129] Calculate the image feature analysis coefficient. The specific formula is as follows:
[0130]
[0131] Among them, Tzx1 is the image feature analysis coefficient, Wmj is the area value of the processed image text, Sup is the average pixel depth of the annotation, and Scf is the variance of the pixel depth change;
[0132] Step S153: acquiring image feature analysis coefficients corresponding to the second processed image to the j-th processed image respectively, to obtain j image feature analysis coefficients;
[0133] Step S154: obtaining an image feature analysis coefficient threshold, and comparing the j image feature analysis coefficients with the image feature analysis coefficient threshold respectively;
[0134] The step S154 further includes the following specific steps:
[0135] Step S1541: when the image feature analysis coefficient is greater than or equal to the image feature analysis coefficient threshold, the corresponding image is reclassified into first processed data;
[0136] Step S1542: when the image feature analysis coefficient is less than the image feature analysis coefficient threshold, the corresponding image is used as the second processed data;
[0137] Step S16: extracting sensitive data from the first processed data to obtain real-time sensitive data corresponding to the first processed data;
[0138] The step S16 further includes the following specific steps:
[0139] Step S161: in the process of extracting sensitive data from text data, m sensitive keywords are set and marked as first sensitive keyword to mth sensitive keyword respectively;
[0140] Step S162: Perform text matching on the first processed data with the first to mth sensitive keywords. If the matching results are consistent, mark the matching text as sensitive content, and obtain the web address of the network interface where the sensitive content is located to obtain real-time sensitive data corresponding to the first processed data.
[0141] Step S17: extracting sensitive data from the second processed data to obtain real-time sensitive data corresponding to the second processed data;
[0142] The step S17 further includes the following specific steps:
[0143] Step S171: Acquire multiple historical images generated by the target data platform to obtain platform historical image data;
[0144] Step S172: Marking the sensitive areas of the platform's historical image data to obtain sensitive marked image data;
[0145] Step S173: Divide the sensitive labeled image data into a model test set and a model training set according to the test-training ratio;
[0146] Step S174: Please refer to Figure 4 , create an image recognition model through the existing artificial intelligence platform, use the model training set to train the image recognition model, after all images in the model training set have completed one training, use the model test set to perform recognition test on the image recognition model, and obtain the recognition success rate to obtain the model recognition success rate;
[0147] Step S175: Obtain a preset image recognition success rate. If the model recognition success rate is greater than or equal to the preset image recognition success rate, the model training is completed and a sensitive recognition image model is obtained. If the model recognition success rate is less than the preset image recognition success rate, the image recognition model is repeatedly trained using the model training set until the model recognition success rate is greater than or equal to the preset image recognition success rate.
[0148] Step S176: Using the sensitive recognition image model to perform image recognition on the second processed data, defining the image with the sensitive area as sensitive content, obtaining the web address of the network interface where the sensitive content is located, and obtaining real-time sensitive data corresponding to the second processed data;
[0149] Step S2: dividing the web address of the network interface where the sensitive content is located into a first protection zone and a second protection zone by analyzing the real-time sensitive data to obtain protection zone data;
[0150] Step S21: obtaining real-time sensitive data, obtaining the web address of each network interface where the sensitive content is located according to the real-time sensitive data, and marking them as the first web address to the mth web address respectively;
[0151] Step S22: performing sensitive content analysis on the network interface corresponding to the first web address to obtain a first sensitivity coefficient;
[0152] The step S22 further includes the following specific steps:
[0153] Step S221: obtaining the number of characters corresponding to the sensitive content in the network interface to obtain a first character number, obtaining the total number of characters in the network interface to obtain a second character number, and calculating the ratio of the first character number to the second character number to obtain a sensitive character number ratio;
[0154] Step S222: Obtain the number of images corresponding to the sensitive content in the network interface to obtain the first number of images, obtain the total number of images in the network interface to obtain the second number of images, and calculate the ratio of the first number of images to the second number of images to obtain the sensitive image number ratio;
[0155] Step S223: Taking the current time as the reference time point, obtaining a time point corresponding to a feature monitoring duration before the reference time point as the detection start time point, and taking the time period between the detection start time point and the reference time point as the sensitive detection period;
[0156] Step S224: Obtain the number of times the first web address is accessed by users during the sensitive detection period to obtain the user's period visit volume;
[0157] Step S225: Calculating the first sensitivity coefficient by taking into account the number of first characters, the number of first images, the ratio of sensitive characters, the ratio of sensitive images, and the number of visits by users during a period of time;
[0158] Calculate the first sensitivity coefficient. The specific formula is as follows:
[0159] Mg1=[(Zf1+Tp1)+(Zfb+Tpb)]×Fwl;
[0160] Wherein, Mg1 is the first sensitivity coefficient, Zf1 is the number of first characters, Tp1 is the number of first pictures, Zfb is the ratio of the number of sensitive characters, Tpb is the ratio of the number of sensitive pictures, and Fwl is the number of visits by the user during the period;
[0161] Step S23: performing sensitive content analysis on the network interfaces corresponding to the second Web address to the mth Web address respectively to obtain the second sensitivity coefficient to the mth sensitivity coefficient;
[0162] Step S24: obtaining a sensitivity coefficient threshold, performing a numerical comparison between the first sensitivity coefficient and the sensitivity coefficient threshold, and dividing the first Web address into a first protection interval and a second protection interval according to the comparison result;
[0163] The step S24 further includes the following specific steps:
[0164] Step S241: respectively obtaining a first character quantity threshold, a first image quantity threshold, a sensitive character quantity ratio threshold, a sensitive image quantity ratio threshold, and a user time period visit volume threshold;
[0165] Step S242: Calculating the first character quantity threshold, the first image quantity threshold, the sensitive character quantity ratio threshold, the sensitive image quantity ratio threshold, and the user time period visit volume threshold to obtain a sensitivity coefficient threshold;
[0166] Calculate the sensitivity coefficient threshold. The specific formula is as follows:
[0167] Mgy=[(Zfy+Tpy)+(Zfy+Tpy)]×Fwy;
[0168] Among them, Mgy is the sensitivity coefficient threshold, Zfy is the first character number threshold, Tpy is the first picture number threshold, Zfy is the sensitive character number ratio threshold, Tpy is the sensitive picture number ratio threshold, and Fwy is the user time period visit threshold;
[0169] Step S243: When the first sensitivity coefficient is greater than or equal to the sensitivity coefficient threshold, the first web address is divided into a first protection interval;
[0170] Step S244: When the first sensitivity coefficient is less than the sensitivity coefficient threshold, the first web address is divided into a second protection interval;
[0171] Step S25: numerically comparing the second sensitivity coefficient to the mth sensitivity coefficient with the sensitivity coefficient threshold, and dividing the second web address to the mth web address into a first protection interval and a second protection interval;
[0172] Step S26: defining the Web addresses corresponding to the first protection zone and the second protection zone respectively as protection zone data;
[0173] Step S3: Perform security protection on the Web address in the first protection interval according to the protection interval data;
[0174] Step S31: obtaining protection interval data, and obtaining a Web address in a first protection interval according to the protection interval data;
[0175] Step S32: The target data platform obtains security user information and establishes a security access directory;
[0176] Step S33: The user terminal sends a SYN packet to the target data platform to indicate that a connection needs to be established with the target data platform;
[0177] Step S34: The target data platform obtains the SYN packet and obtains the user information corresponding to the user terminal through the SYN packet. The target data platform searches the user information in its own security access directory. If the corresponding user information exists in the security access directory, the target data platform creates a SYN-ACK packet, encrypts the SYN-ACK packet, obtains an encrypted SYN-ACK packet, and transmits the encrypted SYN-ACK packet to the user terminal.
[0178] Step S35: After receiving the encrypted SYN-ACK packet, the user terminal needs to decrypt the encrypted SYN-ACK. If the decryption is complete, the user terminal sends an ACK packet to the target data platform again to confirm the connection. If the decryption is not complete, the user terminal cannot send an ACK packet to the target data platform again.
[0179] Step S36: When the target data platform receives the ACK packet sent by the user terminal, it allows the user terminal to access the Web address;
[0180] Step S4: Perform security protection on the sensitive content corresponding to the Web address in the second protection interval according to the protection interval data;
[0181] Step S41: obtaining protection interval data, and obtaining a Web address in a second protection interval according to the protection interval data;
[0182] Step S42: Acquire real-time sensitive data, obtain the real-time sensitive data, and acquire sensitive content corresponding to the web address in the second protection zone based on the real-time sensitive data;
[0183] Step S43: randomly generating two 128-bit character strings by random character generation to obtain a first random character string and a second random character string, marking the first random character string as a text encryption key, and marking the first random character string as an initialization vector;
[0184] Step S44: If the encrypted content is in text format, the encrypted content is converted into byte format using UTF-8 encoding to obtain the encrypted content code;
[0185] Step S45: If the encrypted content is in image format, the encrypted content is converted into byte format through the Pillow library to obtain the encrypted content code;
[0186] Step S46: Divide the encrypted content into data blocks of n characteristic bytes in length, and mark them as the first data block to the mth data block respectively;
[0187] Step S47: performing an XOR operation on the first data block and the initial vector to obtain a first encryption code, performing an XOR operation on the first encryption code and the second data block to obtain a second encryption code, performing an XOR operation on the second encryption code and the third data block to obtain a third encryption code, and repeating this process until performing an XOR operation on the n-1th encryption code and the nth data block to obtain an nth encryption code;
[0188] Step S48: Displaying the sensitive content in an encrypted format on the display interface corresponding to the Web address;
[0189] Step S49: The user terminal decrypts the encrypted code by obtaining the text encryption key, thereby accessing the sensitive content;
[0190] The step S49 further includes the following specific steps:
[0191] Step S491: XOR the nth encrypted code with the text encryption key to obtain the nth data block, XOR the n-1th encrypted code with the nth data block to obtain the n-1th encrypted code, and repeat this process until the first data block is obtained;
[0192] Step S492: Convert the first to nth data blocks into byte format to obtain encrypted content code;
[0193] Step S493: If the sensitive content corresponding to the encrypted content code is in text format, the encrypted content code is converted into sensitive content using UTF-8 encoding;
[0194] Step S494: If the sensitive content corresponding to the encrypted content code is in image format, the encrypted content code is converted into sensitive content through the Pillow library.
[0195] In this application, if a corresponding calculation formula appears, the above calculation formula is dimensionless and its numerical calculation is performed. The weight coefficient, proportional coefficient and other coefficients in the formula are set to a result value obtained by quantifying each parameter. Regarding the size of the weight coefficient and the proportional coefficient, as long as it does not affect the proportional relationship between the parameter and the result value, it is acceptable.
[0196] Example 2
[0197] See also Figure 2 Based on another concept of the same invention, a security protection system for sensitive data is proposed, comprising a data acquisition module, a data analysis module, a first protection module, a second protection module, and a server, wherein the data acquisition module, the data analysis module, the first protection module, and the second protection module are respectively connected to the server, and the server controls the data acquisition module, the data analysis module, the first protection module, and the second protection module respectively;
[0198] The data acquisition module acquires the real-time content data of the platform and extracts the sensitive data in the real-time content data of the platform to obtain real-time sensitive data;
[0199] Acquire the platform content data generated by the target data platform in real time to obtain the platform real-time content data;
[0200] It should be noted here that:
[0201] The platform content data defined herein specifically refers to various information and data generated, stored, and managed on digital platforms (such as social media, e-commerce, content sharing websites, etc.). Specific data includes but is not limited to text content, image content, and audio content.
[0202] Divide the platform's real-time content data into text format content data, audio format content data, image format content data, and video format content data according to file format;
[0203] Wherein, the text format content data includes text data stored in the form of images;
[0204] converting the audio in the audio format content data and the video format content data into text format content data by performing speech recognition on the audio in the audio format content data and the video format content data, and naming the text format content data as first processed data;
[0205] Converting images in the video format content data into picture format content data by intercepting the images frame by frame on the video format content data, and defining the picture format content data as second processed data;
[0206] It should be noted here that:
[0207] In this application, the file format corresponding to the first processed data is a text format, and the file format corresponding to the second processed data is a picture format;
[0208] By performing feature analysis on the image in the second processed data, the second processed data is further refined into types;
[0209] The details are as follows:
[0210] naming the images in the second processed data as the first processed image to the jth processed image in the order of generation time;
[0211] It should be noted here that:
[0212] The j involved here is the number of images in the second processed data, and j is an integer greater than 0;
[0213] Performing feature analysis on the first processed image to obtain an image feature analysis coefficient corresponding to the first processed image;
[0214] The details are as follows:
[0215] Recognize the text in the first processed image by an OCR scanning device, and name the recognized text as a first recognized text to an i-th recognized text respectively;
[0216] It should be noted here that:
[0217] In the application, i is the number of characters corresponding to the first processed image, and i is an integer greater than 0;
[0218] A first annotation line is obtained by drawing a line parallel to the upper edge of the image through the upper edge point of the first recognized character, a second annotation line is obtained by drawing a line parallel to the lower edge of the image through the lower edge point of the first recognized character, a third annotation line is obtained by drawing a line parallel to the left edge of the image through the left edge point of the first recognized character, and a fourth annotation line is obtained by drawing a line parallel to the right edge of the image through the right edge point of the first recognized character;
[0219] The rectangle enclosed by the first, second, third, and fourth annotation lines is named a first character rectangle, and the area of the first character rectangle is obtained to obtain a first character area value.
[0220] Obtaining area values of the character rectangles corresponding to the second recognized character to the i-th recognized character respectively, to obtain the second to i-th area values;
[0221] Sum the first to the i-th area values to obtain the area value of the processed image text;
[0222] The area outside the text rectangle in the first processed image is marked as the background image area, and the first background marking point to the pth background marking point are respectively selected in the background image area;
[0223] It should be noted here that:
[0224] The p involved here is the number value corresponding to the corresponding background annotation points in the first processed image;
[0225] Obtain pixel depth values corresponding to the first background annotation point to the p-th background annotation point respectively, and obtain the first pixel depth value to the p-th pixel depth value;
[0226] Calculate the average pixel depth values from the first to the pth pixel to obtain the marked average pixel depth;
[0227] Calculate the variance of the first pixel depth value to the p-th pixel depth value to obtain the pixel depth change variance;
[0228] The image feature analysis coefficient is obtained by calculating the area value of the processed image text, the average pixel depth of the annotation, and the variance of the pixel depth change;
[0229] Calculate the image feature analysis coefficient. The specific formula is as follows:
[0230]
[0231] Among them, Tzx1 is the image feature analysis coefficient, Wmj is the area value of the processed image text, Sup is the average pixel depth of the annotation, and Scf is the variance of the pixel depth change;
[0232] Obtaining image feature analysis coefficients corresponding to the second processed image to the j-th processed image respectively to obtain j image feature analysis coefficients;
[0233] Obtaining an image feature analysis coefficient threshold, and numerically comparing j image feature analysis coefficients with the image feature analysis coefficient threshold respectively;
[0234] It should be noted here that:
[0235] The image feature analysis coefficient threshold involved here is the maximum image feature analysis coefficient corresponding to the second processed data. In actual situations, it needs to be set according to the specific second processed data.
[0236] The details are as follows:
[0237] When the image feature analysis coefficient is greater than or equal to the image feature analysis coefficient threshold, the corresponding image is reclassified into the first processing data;
[0238] When the image feature analysis coefficient is less than the image feature analysis coefficient threshold, the corresponding image is used as the second processing data;
[0239] Extracting sensitive data from the first processed data to obtain real-time sensitive data corresponding to the first processed data;
[0240] The details are as follows:
[0241] In the process of extracting sensitive data from text data, m sensitive keywords are set and marked as the first sensitive keyword to the mth sensitive keyword respectively;
[0242] It should be noted here that:
[0243] In this application, the first sensitive keyword may be "amount", the second sensitive keyword may be "ID number", and the third sensitive keyword may be "bank account number";
[0244] The sensitive words mentioned above are just examples. In actual applications, sensitive keywords can be set according to actual conditions, or text characters existing in the historical sensitive data of the target data platform can be used.
[0245] Performing text matching on the first processed data with the first to mth sensitive keywords. If the matching results are consistent, marking the matching text as sensitive content, and obtaining the web address of the network interface where the sensitive content is located to obtain real-time sensitive data corresponding to the first processed data;
[0246] It should be noted here that:
[0247] The network interface mentioned here includes but is not limited to web pages, download file display interfaces and
[0248] For example, there are a first sample network interface, a second sample network interface, and a third sample network interface. If the first sample network interface contains the first sensitive keyword "amount", the second sample network interface contains the second sensitive keyword "ID number", and the third sample network interface contains the third sensitive keyword "bank account number", then the web addresses corresponding to the first sample network interface, the second sample network interface, and the third sample network interface are the first real-time sensitive data;
[0249] Extracting sensitive data from the second processed data to obtain real-time sensitive data corresponding to the second processed data;
[0250] The details are as follows:
[0251] Acquire multiple historical images generated by the target data platform respectively to obtain the platform historical image data;
[0252] By manually marking sensitive areas of the platform's historical image data, sensitive marked image data is obtained;
[0253] The sensitive labeled image data is divided into a model test set and a model training set according to the test-training ratio;
[0254] It should be noted here that:
[0255] In this application, the test-training ratio is the ratio of the number of images in the model test set to the number of images in the model training set. Here, the test-training ratio can be 3:7. In real applications, the test-training ratio can be specifically set according to actual conditions.
[0256] Create an image recognition model using an existing artificial intelligence platform, train the image recognition model using a model training set, and after all images in the model training set have completed training, perform a recognition test on the image recognition model using a model test set, and obtain the recognition success rate to obtain the model recognition success rate;
[0257] It should be noted here that:
[0258] In this application, the artificial intelligence platform involved here may be TensorFlow;
[0259] Obtain the preset image recognition success rate. If the model recognition success rate is greater than or equal to the preset image recognition success rate, the model training is completed and a sensitive recognition image model is obtained. If the model recognition success rate is less than the preset image recognition success rate, continue to use the model training set to repeatedly train the image recognition model until the model recognition success rate is greater than or equal to the preset image recognition success rate.
[0260] Performing image recognition on the second processed data using a sensitive recognition image model, defining images with sensitive areas as sensitive content, obtaining the web address of the network interface where the sensitive content is located, and obtaining real-time sensitive data corresponding to the second processed data;
[0261] The data acquisition module acquires real-time sensitive data and transmits it to the data analysis module and the second protection module;
[0262] The data analysis module calculates the first to mth sensitivity coefficients by analyzing the real-time sensitive data, obtains the sensitivity coefficient threshold, and compares the values with the first to mth sensitivity coefficients respectively. Based on the comparison results, the web address of the network interface where the sensitive content is located is divided into a first protection zone and a second protection zone to obtain protection zone data;
[0263] Acquire real-time sensitive data, and acquire the web addresses of the network interfaces where each sensitive content is located according to the real-time sensitive data, and mark them as first web addresses to mth web addresses respectively;
[0264] It should be noted here that:
[0265] Here, m is the number of web addresses in the real-time sensitive data, and m is an integer greater than 0;
[0266] Performing sensitive content analysis on a network interface corresponding to the first web address to obtain a first sensitivity coefficient;
[0267] The details are as follows:
[0268] Obtaining the number of characters corresponding to the sensitive content in the network interface to obtain a first character number, obtaining the total number of characters in the network interface to obtain a second character number, and calculating a ratio of the first character number to the second character number to obtain a sensitive character number ratio;
[0269] Obtain the number of images corresponding to the sensitive content in the network interface to obtain the first number of images, obtain the total number of images in the network interface to obtain the second number of images, and calculate the ratio of the first number of images to the second number of images to obtain the sensitive image number ratio;
[0270] Take the current time as the reference time point, obtain the time point corresponding to the feature monitoring duration before the reference time point as the detection start time point, and take the time period between the detection start time point and the reference time point as the sensitive detection period;
[0271] It should be noted here that:
[0272] The specific time value corresponding to the feature monitoring duration here needs to be set according to the actual situation;
[0273] This involves dynamic updates of sensitive detection periods in real time as the baseline time point changes;
[0274] Obtain the number of times the first web address is accessed by users during the sensitive detection period to obtain the user's period visit volume;
[0275] The first sensitivity coefficient is obtained by calculating the number of first characters, the number of first images, the ratio of the number of sensitive characters, the ratio of the number of sensitive images, and the number of visits by users during a period of time;
[0276] Calculate the first sensitivity coefficient. The specific formula is as follows:
[0277] Mg1=[(Zf1+Tp1)+(Zfb+Tpb)]×Fwl;
[0278] Wherein, Mg1 is the first sensitivity coefficient, Zf1 is the number of first characters, Tp1 is the number of first pictures, Zfb is the ratio of the number of sensitive characters, Tpb is the ratio of the number of sensitive pictures, and Fwl is the number of visits by the user during the period;
[0279] Performing sensitive content analysis on the network interfaces corresponding to the second Web address to the mth Web address respectively to obtain second sensitivity coefficients to mth sensitivity coefficients;
[0280] Obtaining a sensitivity coefficient threshold, performing a numerical comparison between the first sensitivity coefficient and the sensitivity coefficient threshold, and dividing the first web address into a first protection interval and a second protection interval according to the comparison result;
[0281] The details are as follows:
[0282] Obtaining respectively a first character quantity threshold, a first image quantity threshold, a sensitive character quantity ratio threshold, a sensitive image quantity ratio threshold, and a user time period visit volume threshold;
[0283] It should be noted here that:
[0284] In this application, the first character number threshold, the first image number threshold, and the user period visit threshold involved here can be specifically set according to the number of characters and the number of pictures of different types of display interfaces. Here, if there is a display interface with both the number of characters and the number of pictures being 100, then the first character number threshold and the first image number threshold are both set to 30, and the user period visit threshold is set to 300 here;
[0285] The sensitive character quantity ratio threshold is the ratio of the first character quantity threshold to the second character quantity, and the sensitive image quantity ratio threshold is the ratio of the first image quantity threshold to the second image quantity;
[0286] The above-mentioned first character number threshold, first image number threshold, and user time period visit threshold are only applicable to this embodiment. In actual applications, the first character number threshold, first image number threshold, and user time period visit threshold can be specifically set according to the actual content.
[0287] The sensitivity coefficient threshold is obtained by calculating the first character quantity threshold, the first image quantity threshold, the sensitive character quantity ratio threshold, the sensitive image quantity ratio threshold, and the user time period visit threshold;
[0288] Calculate the sensitivity coefficient threshold. The specific formula is as follows:
[0289] Mgy=[(Zfy+Tpy)+(Zfy+Tpy)]×Fwy;
[0290] Among them, Mgy is the sensitivity coefficient threshold, Zfy is the first character number threshold, Tpy is the first picture number threshold, Zfy is the sensitive character number ratio threshold, Tpy is the sensitive picture number ratio threshold, and Fwy is the user time period visit threshold;
[0291] When the first sensitivity coefficient is greater than or equal to the sensitivity coefficient threshold, dividing the first Web address into a first protection interval;
[0292] When the first sensitivity coefficient is less than the sensitivity coefficient threshold, dividing the first Web address into a second protection interval;
[0293] Comparing the second sensitivity coefficient to the mth sensitivity coefficient with the sensitivity coefficient threshold respectively, and dividing the second Web address to the mth Web address into a first protection interval and a second protection interval;
[0294] The web addresses corresponding to the first protection zone and the second protection zone are defined as protection zone data;
[0295] The data analysis module acquires the protection interval data and transmits it to the first protection module and the second protection module;
[0296] The first protection module performs security protection on the Web address in the first protection zone according to the protection zone data;
[0297] Obtaining protection interval data, and obtaining a Web address in a first protection interval according to the protection interval data;
[0298] The target data platform obtains security user information and establishes a security access directory;
[0299] It should be noted here that:
[0300] The security user information involved here refers to the user information that is allowed to access the web address. The security user information here needs to be entered manually;
[0301] The user sends a SYN packet to the target data platform to indicate that a connection needs to be established with the target data platform;
[0302] The target data platform obtains the SYN packet and obtains the user information corresponding to the user end through the SYN packet. The target data platform searches the user information in its own security access directory. If the corresponding user information exists in the security access directory, the target data platform creates a SYN-ACK packet, encrypts the SYN-ACK packet, obtains an encrypted SYN-ACK packet, and transmits the encrypted SYN-ACK packet to the user end.
[0303] The specific code for encrypting the SYN-ACK packet is as follows:
[0304] from cryptography.hazmat.primitives.ciphers import Cipher,algorithms,modes
[0305] from cryptography.hazmat.backends import default_backend
[0306] import os
[0307] #Generate AES key and IV
[0308] key = os.urandom(16) #AES-128 key; 16 bytes
[0309] iv=os.urandom(16) #16-byte IV
[0310] #Plain text to be encrypted (illustrative)
[0311] plaintext=b"This is a sample SYN-ACK payload data."
[0312] #Padding plaintext
[0313] def pad(data):
[0314] block_size=algorithms.AES.block_size / / 8
[0315] pad_len=block_size-len(data)%block_size
[0316] return data+bytes([pad_len]*pad_len)
[0317] padded_plaintext=pad(plaintext)
[0318] #Create an AES encryptor and encrypt
[0319] cipher=Cipher(algorithms.AES(key),modes.CBC(iv),backend=default_backend())
[0320] encryptor=cipher.encryptor()
[0321] ciphertext=encryptor.update(padded_plaintext)+encryptor.finalize()
[0322] # Display the results
[0323] print("Key:",key.hex())
[0324] print("IV:",iv.hex())
[0325] print("Ciphertext:",ciphertext.hex());
[0326] After receiving the encrypted SYN-ACK packet, the user end needs to decrypt the encrypted SYN-ACK. If the decryption is complete, the user end sends an ACK packet to the target data platform again to confirm the connection. If the decryption is not complete, the user end cannot send an ACK packet to the target data platform again.
[0327] Decrypt the encrypted SYN-ACK as follows:
[0328] #Decryption
[0329] decryptor=cipher.decryptor()
[0330] decrypted_padded_plaintext=decryptor.update(ciphertext)+decryptor.finalize()
[0331] #Remove filling
[0332] def unpad(data):
[0333] pad_len = data[-1]
[0334] return data[:-pad_len]
[0335] decrypted_plaintext=unpad(decrypted_padded_plaintext)
[0336] #Show the decrypted result
[0337] print("Decrypted Plaintext:",decrypted_plaintext);
[0338] When the target data platform receives the ACK packet sent by the user, it allows the user to access the Web address;
[0339] It should be noted here that:
[0340] The encryption algorithm used to encrypt the SYN-ACK packet here is the AES symmetric encryption algorithm;
[0341] If the target data platform does not receive the ACK packet sent by the user, it will not allow the user to access the web address;
[0342] The second protection module performs security protection on the Web addresses in the second protection zone according to the protection zone data;
[0343] Obtaining protection interval data, and obtaining a web address in a second protection interval based on the protection interval data;
[0344] Obtain real-time sensitive data, obtain real-time sensitive data, and obtain sensitive content corresponding to the web address in the second protection zone based on the real-time sensitive data;
[0345] Generating two 128-bit character strings randomly by random character generation to obtain a first random character string and a second random character string, marking the first random character string as a text encryption key, and marking the first random character string as an initialization vector;
[0346] If the encrypted content is in text format, the encrypted content is converted into byte format through UTF-8 encoding to obtain the encrypted content encoding;
[0347] If the encrypted content is in image format, the Pillow library is used to convert the encrypted content into byte format to obtain the encrypted content code.
[0348] Divide the encrypted content into data blocks of n characteristic bytes in length, and mark them as the first data block to the mth data block respectively;
[0349] It should be noted here that:
[0350] In this application, n is the number value corresponding to the data block, and n is an integer greater than 0;
[0351] UTF-8 is a variable-length character encoding that can represent all characters in the Unicode character set. UTF-8 is one of the most commonly used encodings on the Internet.
[0352] Pillow is a powerful image processing library for the Python programming language. It is a fork of PIL. Pillow provides a range of functions for creating, processing, and manipulating image files.
[0353] The characteristic byte length involved here is specifically 16 bytes. If the number of codes corresponding to the encrypted content code involved here is not divisible by 16, PKCS#7 is used to pad the encrypted content code.
[0354] Perform an XOR operation on the first data block and the initial vector to obtain a first encryption code, perform an XOR operation on the first encryption code and the second data block to obtain a second encryption code, perform an XOR operation on the second encryption code and the third data block to obtain a third encryption code, and repeat this process until performing an XOR operation on the (n-1)th encryption code and the nth data block to obtain an nth encryption code;
[0355] Display sensitive content in an encrypted format on the display interface corresponding to the web address;
[0356] The user end decrypts the encrypted code by obtaining the text encryption key, thereby accessing the sensitive content;
[0357] Decrypt the encrypted code as follows:
[0358] Perform an XOR operation on the nth encrypted code and the text encryption key to obtain the nth data block, perform an XOR operation on the n-1th encrypted code and the nth data block to obtain the n-1th encrypted code, and repeat this process until the first data block is obtained;
[0359] Convert the first to nth data blocks into byte format to obtain encrypted content code;
[0360] If the sensitive content corresponding to the encrypted content encoding is in text format, the encrypted content encoding is converted into sensitive content using UTF-8 encoding;
[0361] If the sensitive content corresponding to the encrypted content encoding is in image format, the encrypted content encoding is converted into sensitive content through the Pillow library.
[0362] The preferred embodiments of the present invention disclosed above are intended only to help illustrate the present invention. These preferred embodiments do not exhaustively describe all details, nor do they limit the present invention to specific embodiments. Obviously, many modifications and variations are possible based on the contents of this specification. These embodiments are selected and described in detail in this specification to better explain the principles and practical applications of the present invention, thereby enabling those skilled in the art to better understand and utilize the present invention. The present invention is limited only by the claims and their full scope and equivalents.
Claims
1. A security protection method for sensitive data, characterized in that: include: Step S1: Acquire real-time content data of the platform, divide and merge the real-time content data of the platform into file formats to obtain first processed data and second processed data, and extract sensitive data from the first processed data and the second processed data respectively to obtain real-time sensitive data; Step S2: Calculate first to mth sensitivity coefficients by analyzing real-time sensitive data, obtain sensitivity coefficient thresholds, perform numerical comparisons with the first to mth sensitivity coefficients, and divide the web address of the network interface where the sensitive content is located into a first protection zone and a second protection zone based on the comparison results to obtain protection zone data; The first sensitivity coefficient is obtained as follows: Obtaining the number of characters corresponding to the sensitive content in the network interface to obtain a first character number, obtaining the total number of characters in the network interface to obtain a second character number, and calculating a ratio of the first character number to the second character number to obtain a sensitive character number ratio; Obtain the number of images corresponding to the sensitive content in the network interface to obtain the first number of images, obtain the total number of images in the network interface to obtain the second number of images, and calculate the ratio of the first number of images to the second number of images to obtain the sensitive image number ratio; Take the current time as the reference time point, obtain the time point corresponding to the feature monitoring duration before the reference time point as the detection start time point, and take the time period between the detection start time point and the reference time point as the sensitive detection period; Obtain the number of times the first web address is accessed by users during the sensitive detection period to obtain the user's period visit volume; The first sensitivity coefficient is obtained by calculating the number of first characters, the number of first images, the ratio of the number of sensitive characters, the ratio of the number of sensitive images, and the number of visits by users during a period of time; Step S3: Obtain the web address of the first protection interval based on the protection interval data, perform access authentication on the user terminal through the target data platform, and send an encrypted SYN-ACK packet to the authenticated user terminal. The user terminal decrypts the encrypted SYN-ACK packet to access the web address. Step S4: encrypting the sensitive content linked to the web address in the second protection zone according to the protection zone data to obtain an encrypted code. The user terminal decrypts the encrypted code to access the sensitive content. The step S1 further includes the following specific steps: Step S11: acquiring platform content data generated by the target data platform in real time to obtain real-time platform content data; Step S12: dividing the platform real-time content data into text format content data, audio format content data, picture format content data, and video format content data according to the file format; Step S13: converting the audio format content data into text format content data by performing speech recognition on the audio format content data, and naming the text format content data as first processed data; Step S14: converting the video format content data into picture format content data by intercepting the video format content data frame by frame, and defining the picture format content data as second processed data; Step S15: further classifying the second processed data into different types by performing feature analysis on the images in the second processed data; Step S16: extracting sensitive data from the first processed data to obtain real-time sensitive data corresponding to the first processed data; Step S17: extracting sensitive data from the second processed data to obtain real-time sensitive data corresponding to the second processed data; The step S15 further includes the following specific steps: Step S151: naming the images in the second processed data as the first processed image to the jth processed image in the order of generation time; Step S152: performing feature analysis on the first processed image to obtain image feature analysis coefficients corresponding to the first processed image; Calculate the image feature analysis coefficient. The specific formula is as follows: Among them, Tzx1 is the image feature analysis coefficient, Wmj is the area value of the processed image text, Sup is the average pixel depth of the annotation, and Scf is the variance of the pixel depth change; Step S153: acquiring image feature analysis coefficients corresponding to the second processed image to the j-th processed image respectively, to obtain j image feature analysis coefficients; Step S154: obtaining an image feature analysis coefficient threshold, and comparing the j image feature analysis coefficients with the image feature analysis coefficient threshold respectively; The step S154 further includes the following specific steps: Step S1541: when the image feature analysis coefficient is greater than or equal to the image feature analysis coefficient threshold, the corresponding image is reclassified into first processed data; Step S1542: When the image feature analysis coefficient is less than the image feature analysis coefficient threshold, the corresponding image is used as the second processed data.
2. A method for protecting sensitive data according to claim 1, characterized in that: The step S152 further includes the following specific steps: Step S1521: Recognize the text in the first processed image by an OCR scanning device, and name the recognized text as first recognized text to i-th recognized text respectively; Step S1522: Draw a line through the upper edge of the first recognized character and parallel to the upper edge of the image to obtain a first annotation line; draw a line through the lower edge of the first recognized character and parallel to the lower edge of the image to obtain a second annotation line; draw a line through the left edge of the first recognized character and parallel to the left edge of the image to obtain a third annotation line; draw a line through the right edge of the first recognized character and parallel to the right edge of the image to obtain a fourth annotation line; Step S1523: naming the rectangle enclosed by the first, second, third, and fourth annotation lines as a first character rectangle, obtaining the area of the first character rectangle, and obtaining a first character area value; Step S1524: acquiring area values of the character rectangles corresponding to the second recognized character to the i-th recognized character respectively, to obtain the second to i-th area values; Step S1525: summing the first to i-th area values to obtain the area value of the processed image text; Step S1526: Marking the area outside the text rectangle in the first processed image as the background image area, and selecting the first background annotation point to the pth background annotation point in the background image area; Step S1527: respectively obtaining pixel depth values corresponding to the first background annotation point to the p-th background annotation point, to obtain the first pixel depth value to the p-th pixel depth value; Step S1528: Calculate the average of the pixel depth values from the first pixel to the p-th pixel to obtain a labeled average pixel depth, and calculate the variance of the pixel depth value from the first pixel to the p-th pixel to obtain a pixel depth variation variance; Step S1529: Calculate the image feature analysis coefficients based on the area value of the processed image text, the average pixel depth of the annotation, and the variance of the pixel depth change.
3. A method for protecting sensitive data according to claim 2, characterized in that: The step S16 further includes the following specific steps: Step S161: in the process of extracting sensitive data from text data, m sensitive keywords are set and marked as first sensitive keyword to mth sensitive keyword respectively; Step S162: Perform text matching on the first processed data with the first to mth sensitive keywords. If the matching results are consistent, mark the matching text as sensitive content, and obtain the web address of the network interface where the sensitive content is located to obtain real-time sensitive data corresponding to the first processed data.
4. A method for protecting sensitive data according to claim 2, characterized in that: The step S17 further includes the following specific steps: Step S171: Acquire multiple historical images generated by the target data platform to obtain platform historical image data; Step S172: Marking the sensitive areas of the platform's historical image data to obtain sensitive marked image data; Step S173: Divide the sensitive labeled image data into a model test set and a model training set according to the test-training ratio; Step S174: Create an image recognition model using an existing artificial intelligence platform, train the image recognition model using the model training set, and after all images in the model training set have been trained, perform a recognition test on the image recognition model using the model test set, and obtain the recognition success rate to obtain the model recognition success rate; Step S175: Obtain a preset image recognition success rate. If the model recognition success rate is greater than or equal to the preset image recognition success rate, the model training is completed and a sensitive recognition image model is obtained. If the model recognition success rate is less than the preset image recognition success rate, the image recognition model is repeatedly trained using the model training set until the model recognition success rate is greater than or equal to the preset image recognition success rate. Step S176: Use the sensitive recognition image model to perform image recognition on the second processed data, define the picture with sensitive areas as sensitive content, obtain the web address of the network interface where the sensitive content is located, and obtain real-time sensitive data corresponding to the second processed data.
5. A method for protecting sensitive data according to claim 1, characterized in that: The step S2 further includes the following specific steps: Step S21: obtaining real-time sensitive data, obtaining the web address of each network interface where the sensitive content is located according to the real-time sensitive data, and marking them as the first web address to the mth web address respectively; Step S22: performing sensitive content analysis on the network interface corresponding to the first web address to obtain a first sensitivity coefficient; Step S23: performing sensitive content analysis on the network interfaces corresponding to the second Web address to the mth Web address respectively to obtain the second sensitivity coefficient to the mth sensitivity coefficient; Step S24: obtaining a sensitivity coefficient threshold, performing a numerical comparison between the first sensitivity coefficient and the sensitivity coefficient threshold, and dividing the first Web address into a first protection interval and a second protection interval according to the comparison result; Step S25: numerically comparing the second sensitivity coefficient to the mth sensitivity coefficient with the sensitivity coefficient threshold, and dividing the second web address to the mth web address into a first protection interval and a second protection interval; Step S26: defining the Web addresses corresponding to the first protection zone and the second protection zone respectively as protection zone data.
6. A method for protecting sensitive data according to claim 1, characterized in that: Calculate the first sensitivity coefficient. The specific formula is as follows: Mg1=[(Zf1+Tp1)+(Zfb+Tpb)]×Fwl; Among them, Mg1 is the first sensitivity coefficient, Zf1 is the first number of characters, Tp1 is the first number of pictures, Zfb is the ratio of the number of sensitive characters, Tpb is the ratio of the number of sensitive pictures, and Fwl is the number of visits by users in a certain period of time.
7. A method for protecting sensitive data according to claim 5, characterized in that: The step S24 further includes the following specific steps: Step S241: respectively obtaining a first character quantity threshold, a first image quantity threshold, a sensitive character quantity ratio threshold, a sensitive image quantity ratio threshold, and a user time period visit volume threshold; Step S242: Calculating the first character quantity threshold, the first image quantity threshold, the sensitive character quantity ratio threshold, the sensitive image quantity ratio threshold, and the user time period visit volume threshold to obtain a sensitivity coefficient threshold; Step S243: When the first sensitivity coefficient is greater than or equal to the sensitivity coefficient threshold, the first web address is divided into a first protection interval; Step S244: When the first sensitivity coefficient is less than the sensitivity coefficient threshold, the first Web address is divided into a second protection interval.
8. A method for protecting sensitive data according to claim 1, characterized in that: The step S3 further includes the following specific steps: Step S31: obtaining protection interval data, and obtaining a Web address in a first protection interval according to the protection interval data; Step S32: The target data platform obtains security user information and establishes a security access directory; Step S33: The user terminal sends a SYN packet to the target data platform to indicate that a connection needs to be established with the target data platform; Step S34: The target data platform obtains the SYN packet and obtains the user information corresponding to the user terminal through the SYN packet. The target data platform searches the user information in its own security access directory. If the corresponding user information exists in the security access directory, the target data platform creates a SYN-ACK packet, encrypts the SYN-ACK packet, obtains an encrypted SYN-ACK packet, and transmits the encrypted SYN-ACK packet to the user terminal. Step S35: After receiving the encrypted SYN-ACK packet, the user terminal needs to decrypt the encrypted SYN-ACK. If the decryption is complete, the user terminal sends an ACK packet to the target data platform again to confirm the connection. If the decryption is not complete, the user terminal cannot send an ACK packet to the target data platform again. Step S36: When the target data platform receives the ACK packet sent by the user terminal, it allows the user terminal to access the Web address.
9. A method for protecting sensitive data according to claim 1, characterized in that: The step S4 further includes the following specific steps: Step S41: obtaining protection interval data, and obtaining a Web address in a second protection interval according to the protection interval data; Step S42: Acquire real-time sensitive data, obtain the real-time sensitive data, and acquire sensitive content corresponding to the web address in the second protection zone based on the real-time sensitive data; Step S43: randomly generating two 128-bit character strings by random character generation to obtain a first random character string and a second random character string, marking the first random character string as a text encryption key, and marking the first random character string as an initialization vector; Step S44: If the encrypted content is in text format, the encrypted content is converted into byte format using UTF-8 encoding to obtain the encrypted content code; Step S45: If the encrypted content is in image format, the encrypted content is converted into byte format through the Pillow library to obtain the encrypted content code; Step S46: Divide the encrypted content into data blocks of n characteristic bytes in length, and mark them as the first data block to the mth data block respectively; Step S47: performing an XOR operation on the first data block and the initial vector to obtain a first encryption code, performing an XOR operation on the first encryption code and the second data block to obtain a second encryption code, performing an XOR operation on the second encryption code and the third data block to obtain a third encryption code, and repeating this process until performing an XOR operation on the n-1th encryption code and the nth data block to obtain an nth encryption code; Step S48: Displaying the sensitive content in an encrypted format on the display interface corresponding to the Web address; Step S49: The user terminal decrypts the encrypted code by obtaining the text encryption key, thereby accessing the sensitive content; The step S49 further includes the following specific steps: Step S491: XOR the nth encrypted code with the text encryption key to obtain the nth data block, XOR the n-1th encrypted code with the nth data block to obtain the n-1th encrypted code, and repeat this process until the first data block is obtained; Step S492: Convert the first to nth data blocks into byte format to obtain encrypted content code; Step S493: If the sensitive content corresponding to the encrypted content code is in text format, the encrypted content code is converted into sensitive content using UTF-8 encoding; Step S494: If the sensitive content corresponding to the encrypted content code is in image format, the encrypted content code is converted into sensitive content through the Pillow library.
10. A security protection system for sensitive data, applicable to a security protection method for sensitive data according to any one of claims 1 to 9, characterized in that: The specific working process of each module of the safety protection system is as follows: Data acquisition module: used to obtain real-time content data of the platform and extract sensitive data from the real-time content data of the platform to obtain real-time sensitive data; Data analysis module: used to divide the web address of the network interface where the sensitive content is located into a first protection zone and a second protection zone by analyzing the real-time sensitive data, and obtain protection zone data; The first protection module is used to provide security protection for Web addresses in the first protection interval according to the protection interval data; The second protection module is used to perform security protection on the sensitive content corresponding to the Web address in the second protection interval according to the protection interval data.
Citation Information
Patent Citations
Sensitive data processing method and device, electronic equipment and storage medium
CN110928931A
Data protection method and device, computer equipment and storage medium
CN115238286A