A risk assessment method for file transmission
By obtaining the risk duration of electronic files and setting corresponding thresholds, combined with the circular intersection set and geometric center calculation of characters, user risk behaviors can be dynamically identified and sensitive information can be accurately shielded. This solves the problem of traditional methods being unable to dynamically identify abnormal user browsing behaviors, and improves the information security and user experience of file transmission.
Patent Information
- Application Number
- CN202510436376.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-09
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2045-04-09
AI Technical Summary
In the existing file transfer process, traditional risk assessment methods are unable to dynamically identify abnormal user browsing behavior, and some important content is still left after being blocked, making it difficult to effectively solve information security problems.
By obtaining the risk duration of the free browsing part of the electronic file, setting the number threshold to determine the effectiveness of the actual number of times, combining the judgment ratio and the stay time threshold to determine the user's risk level, and using the circular intersection set and geometric center calculation of the characters to accurately shield sensitive information.
It achieves accurate identification of user risk behaviors, reduces misjudgments, improves the accuracy of sensitive information detection and blocking, and ensures information security and normal user browsing experience.
Smart Images

Figure CN119961981B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of file transmission, and in particular to a risk assessment method for file transmission. Background Art
[0002] In today's information age, electronic files have become the primary carrier of knowledge, widely used in fields such as e-books, online document management, and enterprise data sharing. However, the resulting information security issues are becoming increasingly prominent, especially during file transfers, where unauthorized access to content and information leakage require urgent resolution. In recent years, intelligent detection technologies have begun to be applied to file security management, such as risk assessment methods based on user behavior analysis. These methods primarily rely on data such as user activity patterns and duration of stay to determine risk. However, traditional protection methods, which primarily rely on static keyword filtering or permission control, suffer from two major drawbacks: first, they cannot dynamically identify abnormal user browsing behavior; second, some important content may remain after blocking.
[0003] To sum up, there is an urgent need for a risk assessment method for file transfer that can accurately identify users' risky behaviors and effectively shield sensitive content. Summary of the Invention
[0004] The present invention provides a risk assessment method for file transmission, which facilitates solving the problems mentioned in the above background technology.
[0005] The present invention provides the following technical solution: a risk assessment method for file transmission, comprising:
[0006] The duration of the risk of obtaining a free viewing portion of each electronic file;
[0007] Determine the risk level of users browsing electronic files based on the duration of the risk;
[0008] Mark keywords in risky electronic files;
[0009] Obtain the intersection set of circles corresponding to the constituent characters of each marked keyword;
[0010] Get the area to be shielded, specifically:
[0011] Get the circumference of the intersection set that needs to be shielded as a whole;
[0012] For a circle of an intersecting set that needs to be shielded as a whole, obtain the point of the center of each circle in the intersecting set of this circle, and record them as the first point, the second point, ... the Ath point, where A is equal to the number of groups in this circle;
[0013] Choose any two points from point 1, point 2, point A, and draw a straight line through the two selected points.
[0014] Determine whether other points on the browsing interface are on the same side of the drawn line, specifically:
[0015] The straight line divides the browsing interface into two areas, which are respectively recorded as the first area and the second area;
[0016] Get the number of other points in each area. If the number of other points in a certain area is 0, it is considered that the other points on the browsing interface are on the same side of the straight line.
[0017] If the number of other points in the two areas is not 0, it is determined that the other points on the browsing interface are not on the same side of the straight line;
[0018] If other points on the browsing interface are not on the same side of the drawn line, select any two points from the first point, the second point, ... point A, and draw a straight line passing through the two selected points;
[0019] If other points on the browsing interface are on the same side of the drawn line, the drawn line will be included in the line set;
[0020] Traverse all cases where two points are selected from the first point, the second point, ..., point A to form a straight line, and add all lines on the same side of the drawn line as the other points on the browsing interface into the line set;
[0021] Get the number of straight lines in the straight line set, recorded as the boundary number;
[0022] All the lines in the line set intersect to form several closed areas, and the closed areas with the number of sides equal to the number of boundaries are recorded as the areas to be shielded;
[0023] The shielded area is expanded, and the expanded area is shielded.
[0024] Optionally, the risk duration for obtaining the free browsing portion of each electronic file specifically includes:
[0025] Acquire an electronic document library, wherein the electronic document library is used to store all electronic documents;
[0026] The electronic file is a text document;
[0027] Set up a free browsing section for each electronic file;
[0028] Users can only browse the free browsing portion of the electronic files that have not been purchased;
[0029] For an electronic file, obtain the number of times all users browse the free browsing part of this electronic file, and record it as the actual number;
[0030] Set a number threshold, which is used to determine whether the actual number is valid;
[0031] If the actual number of times is greater than or equal to the number threshold, the actual number of times is deemed valid;
[0032] If the actual number of times is less than the number threshold, the actual number of times is deemed invalid;
[0033] For electronic files with actual valid times, calculate the risk duration of the free browsing portion, specifically:
[0034] Randomly select an electronic file with a valid number of times, obtain the total time of all users browsing the free browsing part of this electronic file, and record it as the total time;
[0035] The risk duration of this electronic file = total duration / actual number of times.
[0036] Optionally, the risk duration for obtaining the free browsing portion of each electronic file further includes:
[0037] For electronic files with invalid actual number of views, the risk duration of the free browsing portion is calculated as follows:
[0038] Obtain the risk duration of all valid electronic files and calculate the total risk duration, which is recorded as the overall duration.
[0039] Obtain the word count of all free browsing sections of the electronic document with valid actual number of times and calculate the total word count, and record the result as the overall word count;
[0040] Calculate the total duration / total word count, and record the result as the single word duration;
[0041] Randomly select an electronic file with an invalid actual number of views, obtain the word count of the free browsing part of this electronic file, and record it as the actual word count;
[0042] The risk duration of this electronic file = single word duration × actual number of words.
[0043] Optionally, judging the risk level of the user browsing the electronic file based on the risk duration specifically includes:
[0044] Setting a determination ratio, wherein the determination ratio is used to determine whether the total time a user spends browsing the free browsing portion of an electronic file is too long;
[0045] Obtain the user who is currently browsing electronic files in the electronic file library and record them as target users;
[0046] Obtain the electronic file currently browsed by the target user and record it as the target file;
[0047] The risk duration of obtaining the free browsing portion of the target file is recorded as the standard duration;
[0048] Get the time the target user browses the target file, recorded as browsing time;
[0049] If the browsing time ≥ standard time × judgment ratio, it is determined that the total time the target user browses the free browsing part of the electronic file is too long, which poses a risk;
[0050] If the browsing time is less than the standard time × the judgment ratio, it is determined that the total time the target user spends browsing the free browsing part of the electronic file is not too long and there is no risk.
[0051] Optionally, judging the risk level of the user browsing the electronic file based on the risk duration further includes:
[0052] Setting a stay time threshold, wherein the stay time threshold is used to determine whether the total time for a user to browse the free browsing portion of the electronic file is too long;
[0053] Get the browsing interface status of the target user when browsing the target file;
[0054] The states of the browsing interface include scrolling and static;
[0055] Obtain the duration of each browsing interface state being static, and select the longest duration as the actual duration;
[0056] If the actual duration is greater than or equal to the stay duration threshold, it is determined that the total time the target user spends browsing the free browsing portion of the electronic file is too long, and there is a risk;
[0057] If the actual duration is less than the stay duration threshold, it is determined that the total duration of the target user's browsing of the free browsing portion of the electronic file is not too long and there is no risk.
[0058] Optionally, the step of marking keywords in risky electronic files specifically includes:
[0059] Record the risky target files being browsed by the target user as blocked files;
[0060] Obtain all keywords of the shielded file through natural language processing technology, and form a keyword library of the shielded file, which is recorded as a shielded vocabulary library;
[0061] The keyword is composed of a number of characters, each character having a circumscribed square of the same area;
[0062] Get the content of the free browsing portion of the shielded files currently displayed on the browsing interface;
[0063] Determine whether the keywords in the blocked word library appear in the content of the free browsing portion of the blocked file currently displayed on the browsing interface;
[0064] If the keywords in the blocked word library do not appear in the content of the free browsing section of the blocked file currently displayed on the browsing interface, no processing will be performed;
[0065] If the keywords in the blocked word library appear in the content of the free browsing portion of the blocked file currently displayed on the browsing interface, the keywords in the blocked word library that appear in the content of the free browsing portion of the blocked file currently displayed on the browsing interface are marked in the browsing interface.
[0066] Optionally, obtaining the intersection set of circles corresponding to the constituent characters of each marked keyword specifically includes:
[0067] For each marked keyword, obtain all the characters that make up the keyword and form a character set;
[0068] The number of characters in the character set is recorded as the number of characters;
[0069] For a character, the center of the set of squares surrounding the character is the center point of the character;
[0070] Get the center point of each character in the character set, and use the center point as the center and a radius of twice the diagonal length of the square circumscribing the character as the radius to form N circles and form a circle set. Each character corresponds to a circle, where N is equal to the number of characters.
[0071] Randomly select a circle from the circle set, record it as the target circle, and determine whether there is a circle that intersects with the target circle;
[0072] If it does not exist, the number of groups on the target circle is recorded as 0;
[0073] If so, the target circle and the circle intersecting with the target circle are included in the target circle's intersection set, and it is determined whether there are other circles intersecting with the circles in the target circle's intersection set. If not, the number of target circle groups is recorded as equal to the number of circles in the target circle's intersection set; if so, the circles intersecting with the circles in the target circle's intersection set are included in the target circle's intersection set, until no new circles are included in the target circle's intersection set; and the number of target circle groups is recorded as equal to the number of circles in the target circle's intersection set;
[0074] If the elements in the intersection sets of different circles are all the same, then the intersection sets of these different circles are regarded as the same intersection set.
[0075] Optionally, obtaining the circumference of the intersection set that needs to be shielded as a whole specifically includes:
[0076] Setting a ratio threshold, wherein the ratio threshold is used to perform overall masking of characters;
[0077] Calculate the number of characters × the ratio threshold, and record the result as the number of shielding;
[0078] Get the number of groups on each circle and sort them in descending order;
[0079] Select the group with the largest value and record it as the first number;
[0080] If the first number is greater than or equal to the shielding number, then the characters corresponding to the circles in the intersection set of the circles corresponding to the first number are shielded as a whole;
[0081] If the first number is less than the shielding number, the group number with the second largest value is selected and recorded as the second number;
[0082] If the first number + the second number ≥ the shielding number, then the characters corresponding to the circles in the intersection set of the circles corresponding to the first number and the second number are shielded as a whole;
[0083] If the first number + the second number is less than the shielding number, the group number with the third largest value is selected and recorded as the third number;
[0084] If the first number + the second number + the third number ≥ the shielding number, then the characters corresponding to the circles in the intersection set of the circles corresponding to the first number, the second number, and the third number are shielded as a whole;
[0085] If the first number + the second number + the third number is less than the shielding number, then the fourth largest group number is selected and recorded as the fourth number;
[0086] This process is deduced in this way until the sum of the selected numbers is greater than or equal to the shielded number, and the characters corresponding to the circles in the intersection set of the circles corresponding to each selected number are shielded as a whole.
[0087] Optionally, the shielded area is expanded and shielded, including:
[0088] Get the geometric center of the area to be shielded, specifically:
[0089] On the browsing interface, any rectangular coordinate system is created and recorded as the first coordinate system;
[0090] Get all points on the boundary of the area to be shielded to form a point set;
[0091] Select any point from the point set and obtain its coordinates in the first coordinate system, which is recorded as ; Starting from the selected point, along the clockwise direction on the boundary of the area to be shielded, the coordinates of other points in the point set are obtained in turn, and are recorded as 、 … ; Where Z is equal to the number of points in the point set minus one;
[0092] The signed area P is calculated by the following formula:
[0093] ; where i refers to the subscript of X and Y;
[0094] The geometric center coordinates are calculated using the following formula :
[0095] ;
[0096] ;
[0097] Get the coordinates of the geometric center , recorded as the shape center;
[0098] Get each edge of the area to be masked;
[0099] For one edge of the area to be shielded, draw a ray perpendicular to this edge with the center of the shape as the endpoint. The direction of the ray is the expansion direction of this edge.
[0100] Get the extension direction of each edge;
[0101] Move the straight line of each side of the area to be masked in the direction of its extension by half the length of the diagonal of the square circumscribing the character;
[0102] All the straight lines after moving intersect to form several closed areas, and the closed areas with the number of sides equal to the number of boundaries are recorded as shielded areas;
[0103] Shield the area covered by the shielding area.
[0104] The present invention has the following beneficial effects:
[0105] 1. This risk assessment method for file transmission sets a number threshold when obtaining the risk duration of the free browsing part of each electronic file to determine whether the actual number is valid. If the actual number is less than the number threshold, it means that the sample size is small at this time, and the error of the risk duration calculated using the actual number is large, so the actual number cannot be used to calculate the risk duration. If the actual number is greater than or equal to the number threshold, it means that the sample size is large at this time, and the actual number can be used to calculate the risk duration. This mechanism effectively reduces accidental misjudgments and makes risk assessment more accurate.
[0106] 2. This file transfer risk assessment method calculates the total time all users spent browsing the free browsing portion of an electronic file with valid actual times divided by the actual number of times the electronic file was viewed. The result is the average browsing time, which is used as the risk duration. For electronic files with invalid actual times, the single-word duration of the electronic file with valid actual times is first obtained, then the actual number of electronic files with invalid actual times is obtained, and the two are multiplied together to obtain the risk duration of the electronic file with invalid actual times. Using the overall risk duration calculation method, a reasonable browsing time threshold is estimated to ensure the accuracy of risk assessment. This method can effectively reduce false alarm rates and improve the accuracy of risk identification.
[0107] 3. This risk assessment method for file transmission, when judging the risk level of a user browsing an electronic file, sets a judgment ratio and multiplies the judgment ratio by the risk duration of the electronic file. If the result is greater than the user's browsing time, it means that the user has browsed the electronic file for not too long and there is no risk; if the result is less than the user's browsing time, it means that the user has browsed the electronic file for too long and may have engaged in behaviors such as copying or memorizing, which is risky; in addition, by setting a stay time threshold and obtaining the user's actual stay time, the two are compared. If the actual stay time is greater than or equal to the stay time threshold, it means that the user has stayed on a certain part of the electronic file for too long and may have engaged in behaviors such as copying or memorizing, which is risky; otherwise, there is no risk; the combination strategy of judgment ratio + stay time threshold can not only effectively prevent information leakage, but also ensure the normal browsing experience of users. It is an efficient, accurate and adjustable intelligent security protection solution.
[0108] 4. This risk assessment method for file transmission automatically clusters characters using a circular intersection set method and performs overall shielding in combination with a ratio threshold, thereby improving the accuracy of sensitive information detection and shielding and reducing misjudgments. First, a circular set is generated for each character using twice the diagonal of the character's circumscribed square as the radius, and by calculating the intersection of the circles, characters with overlapping relationships are grouped into the same group. This method can automatically identify highly correlated character groups in the text, ensuring the integrity and accuracy of recognition even if there are gaps or misalignments between characters. Secondly, a group number sorting mechanism is introduced to sort according to the density of intersecting characters, and the character set that needs to be shielded as a whole is determined by a shielding ratio threshold. This method can prioritize shielding highly correlated character areas, ensuring that important sensitive information is not missed, while avoiding irrelevant characters from being mistakenly shielded. Compared with traditional methods based on single-character matching or fixed-area shielding, the technical solution of the present invention can dynamically adapt to different text layouts. Even if sensitive characters appear in a misaligned, spaced, or intersecting form, they can still be accurately located and shielded, thereby improving the robustness of information filtering. It can achieve precise control over the scope of information shielding, ensuring both security and the integrity of normal text display.
[0109] 5. This risk assessment method for file transmission achieves accurate expansion of the area to be shielded through geometric center calculation and boundary expansion technology, improves the shielding effect, and avoids information leakage. First, a plane rectangular coordinate system is used to obtain the boundary point set of the area to be shielded, and the geometric center coordinates are calculated by the signed area formula to ensure the accuracy of the expansion direction. Secondly, with the geometric center as the endpoint, each side of the area to be shielded is vertically expanded respectively, and the expansion amplitude is determined according to half the diagonal length of the square circumscribed by the character to ensure the rationality of the expansion range; because the determination of the area to be shielded is based on the set center of each character, the area to be shielded can only cover the part of the character that needs to be shielded, and expanding half the diagonal length of the square circumscribed by the character can ensure that each character that needs to be shielded is completely shielded; different from the traditional fixed size expansion or simple expansion method, the present invention adopts a direction adaptive expansion strategy, that is, each side is independently expanded according to its own direction, ensuring that the shielded area can accurately cover the relevant sensitive information, even if the shape of the area to be shielded is complex, it can maintain its integrity after expansion. In addition, this method determines the final shielding area by the intersection of the extended straight lines, ensuring that the shielding range is evenly expanded without information omission or excessive occlusion, thereby improving the robustness of the shielding. BRIEF DESCRIPTION OF THE DRAWINGS
[0110] Figure 1 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION
[0111] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the 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.
[0112] Example, see Figure 1 , a risk assessment method for file transmission, comprising:
[0113] The duration of the risk of obtaining a free viewing portion of each electronic file;
[0114] Determine the risk level of users browsing electronic files based on the duration of the risk;
[0115] Mark keywords in risky electronic files;
[0116] Obtain the intersection set of circles corresponding to the constituent characters of each marked keyword;
[0117] Get the area to be shielded, specifically:
[0118] Get the circumference of the intersection set that needs to be shielded as a whole;
[0119] For a circle of an intersecting set that needs to be shielded as a whole, obtain the point of the center of each circle in the intersecting set of this circle, and record them as the first point, the second point, ... the Ath point, where A is equal to the number of groups in this circle;
[0120] Choose any two points from point 1, point 2, point A, and draw a straight line through the two selected points.
[0121] Determine whether other points on the browsing interface are on the same side of the drawn line, specifically:
[0122] The straight line divides the browsing interface into two areas, which are respectively recorded as the first area and the second area;
[0123] Get the number of other points in each area. If the number of other points in a certain area is 0, it is considered that the other points on the browsing interface are on the same side of the straight line.
[0124] If the number of other points in the two areas is not 0, it is determined that the other points on the browsing interface are not on the same side of the straight line;
[0125] If other points on the browsing interface are not on the same side of the drawn line, select any two points from the first point, the second point, ... point A, and draw a straight line passing through the two selected points;
[0126] If other points on the browsing interface are on the same side of the drawn line, the drawn line will be included in the line set;
[0127] Traverse all cases where two points are selected from the first point, the second point, ..., point A to form a straight line, and add all lines on the same side of the drawn line as the other points on the browsing interface into the line set;
[0128] Get the number of straight lines in the straight line set, recorded as the boundary number;
[0129] All the lines in the line set intersect to form several closed areas, and the closed areas with the number of sides equal to the number of boundaries are recorded as the areas to be shielded;
[0130] The shielded area is expanded, and the expanded area is shielded.
[0131] The risk duration of obtaining the free browsing portion of each electronic file specifically includes:
[0132] Acquire an electronic document library, wherein the electronic document library is used to store all electronic documents;
[0133] The electronic file is a text document;
[0134] Set up a free browsing section for each electronic file;
[0135] Users can only browse the free browsing portion of the electronic files that have not been purchased;
[0136] For an electronic file, obtain the number of times all users browse the free browsing part of this electronic file, and record it as the actual number;
[0137] Set a number threshold, which is used to determine whether the actual number is valid;
[0138] If the actual number of times is greater than or equal to the number threshold, the actual number of times is deemed valid;
[0139] If the actual number of times is less than the number threshold, the actual number of times is deemed invalid;
[0140] When obtaining the risk duration of the free browsing portion of each electronic file, a number threshold is set to determine whether the actual number is valid. If the actual number is less than the number threshold, it means that the sample size is small and the error in the risk duration calculated using the actual number is large, so the actual number cannot be used to calculate the risk duration. If the actual number is greater than or equal to the number threshold, it means that the sample size is large and the actual number can be used to calculate the risk duration. This mechanism effectively reduces accidental misjudgments and makes risk assessment more accurate.
[0141] For electronic files with actual valid times, calculate the risk duration of the free browsing portion, specifically:
[0142] Randomly select an electronic file with a valid number of times, obtain the total time of all users browsing the free browsing part of this electronic file, and record it as the total time;
[0143] The risk duration of this electronic file = total duration / actual number of times.
[0144] The risk duration for obtaining the free browsing portion of each electronic file also includes:
[0145] For electronic files with invalid actual number of views, the risk duration of the free browsing portion is calculated as follows:
[0146] Obtain the risk duration of all valid electronic files and calculate the total risk duration, which is recorded as the overall duration.
[0147] Obtain the word count of all free browsing sections of the electronic document with valid actual number of times and calculate the total word count, and record the result as the overall word count;
[0148] Calculate the total duration / total word count, and record the result as the single word duration;
[0149] Randomly select an electronic file with an invalid actual number of views, obtain the word count of the free browsing part of this electronic file, and record it as the actual word count;
[0150] The risk duration of this electronic document = single word duration × actual number of words;
[0151] For electronic files with valid actual times, the total time all users spent browsing the free browsing portion of the electronic file is divided by the actual number of times the electronic file is viewed. The result is the average browsing time, which is used as the risk duration. For electronic files with invalid actual times, the single-word duration of the electronic file with valid actual times is first obtained, then the actual times of the electronic file with invalid actual times are obtained, and the two are multiplied together to obtain the risk duration of the electronic file with invalid actual times. Using the overall risk duration calculation method, a reasonable browsing time threshold is estimated to ensure the accuracy of risk assessment. This method can effectively reduce false alarm rates and improve the accuracy of risk identification.
[0152] The method of judging the risk level of a user browsing electronic files based on the risk duration specifically includes:
[0153] Setting a determination ratio, wherein the determination ratio is used to determine whether the total time a user spends browsing the free browsing portion of an electronic file is too long;
[0154] Obtain the user who is currently browsing electronic files in the electronic file library and record them as target users;
[0155] Obtain the electronic file currently browsed by the target user and record it as the target file;
[0156] The risk duration of obtaining the free browsing portion of the target file is recorded as the standard duration;
[0157] Get the time the target user browses the target file, recorded as browsing time;
[0158] If the browsing time ≥ standard time × judgment ratio, it is determined that the total time the target user browses the free browsing part of the electronic file is too long, which poses a risk;
[0159] If the browsing time is less than the standard time × the judgment ratio, it is determined that the total time the target user spends browsing the free browsing part of the electronic file is not too long and there is no risk.
[0160] The step of determining the risk level of a user browsing electronic files based on the risk duration also includes:
[0161] Setting a stay time threshold, wherein the stay time threshold is used to determine whether the total time for a user to browse the free browsing portion of the electronic file is too long;
[0162] Get the browsing interface status of the target user when browsing the target file;
[0163] The states of the browsing interface include scrolling and static;
[0164] Obtain the duration of each browsing interface state being static, and select the longest duration as the actual duration;
[0165] If the actual duration is greater than or equal to the stay duration threshold, it is determined that the total time the target user spends browsing the free browsing portion of the electronic file is too long, and there is a risk;
[0166] If the actual duration is less than the dwell time threshold, it is determined that the total duration of the target user's browsing of the free browsing portion of the electronic file is not too long and there is no risk;
[0167] When judging the risk level of a user browsing an electronic file, a judgment ratio is set and multiplied by the risk duration of the electronic file. If the result is greater than the user's browsing time, it means that the user has browsed the electronic file for not too long and there is no risk; if the result is less than the user's browsing time, it means that the user has browsed the electronic file for too long and may have engaged in behaviors such as copying or memorizing, which is risky; in addition, a stay time threshold is set and the user's actual stay time is obtained, and the two are compared. If the actual stay time threshold is greater than or equal to the stay time threshold, it means that the user has stayed on a certain part of the electronic file for too long and may have engaged in behaviors such as copying or memorizing, which is risky; otherwise, there is no risk; the combined strategy of judgment ratio + stay time threshold can not only effectively prevent information leakage, but also ensure the normal browsing experience of users. It is an efficient, accurate and adjustable intelligent security protection solution.
[0168] The marking of keywords in risky electronic files specifically includes:
[0169] Record the risky target files being browsed by the target user as blocked files;
[0170] Obtain all keywords of the shielded file through natural language processing technology, and form a keyword library of the shielded file, which is recorded as a shielded vocabulary library;
[0171] The keyword is composed of a number of characters, each character having a circumscribed square of the same area;
[0172] Get the content of the free browsing portion of the shielded files currently displayed on the browsing interface;
[0173] Determine whether the keywords in the blocked word library appear in the content of the free browsing portion of the blocked file currently displayed on the browsing interface;
[0174] If the keywords in the blocked word library do not appear in the content of the free browsing section of the blocked file currently displayed on the browsing interface, no processing will be performed;
[0175] If the keywords in the blocked word library appear in the content of the free browsing portion of the blocked file currently displayed on the browsing interface, the keywords in the blocked word library that appear in the content of the free browsing portion of the blocked file currently displayed on the browsing interface are marked in the browsing interface.
[0176] The step of obtaining the intersection set of circles corresponding to the constituent characters of each marked keyword specifically includes:
[0177] For each marked keyword, obtain all the characters that make up the keyword and form a character set;
[0178] The number of characters in the character set is recorded as the number of characters;
[0179] For a character, the center of the set of squares surrounding the character is the center point of the character;
[0180] Get the center point of each character in the character set, and use the center point as the center and a radius of twice the diagonal length of the square circumscribing the character as the radius to form N circles and form a circle set. Each character corresponds to a circle, where N is equal to the number of characters.
[0181] Randomly select a circle from the circle set, record it as the target circle, and determine whether there is a circle that intersects with the target circle;
[0182] If it does not exist, the number of groups on the target circle is recorded as 0;
[0183] If so, the target circle and the circle intersecting with the target circle are included in the target circle's intersection set, and it is determined whether there are other circles intersecting with the circles in the target circle's intersection set. If not, the number of target circle groups is recorded as equal to the number of circles in the target circle's intersection set; if so, the circles intersecting with the circles in the target circle's intersection set are included in the target circle's intersection set, until no new circles are included in the target circle's intersection set; and the number of target circle groups is recorded as equal to the number of circles in the target circle's intersection set;
[0184] If the elements in the intersection sets of different circles are all the same, then the intersection sets of these different circles are regarded as the same intersection set.
[0185] The obtaining of the circumference of the intersection set that needs to be shielded as a whole specifically includes:
[0186] Setting a ratio threshold, wherein the ratio threshold is used to perform overall masking of characters;
[0187] Calculate the number of characters × the ratio threshold, and record the result as the number of shielding;
[0188] Get the number of groups on each circle and sort them in descending order;
[0189] Select the group with the largest value and record it as the first number;
[0190] If the first number is greater than or equal to the shielding number, then the characters corresponding to the circles in the intersection set of the circles corresponding to the first number are shielded as a whole;
[0191] If the first number is less than the shielding number, the group number with the second largest value is selected and recorded as the second number;
[0192] If the first number + the second number ≥ the shielding number, then the characters corresponding to the circles in the intersection set of the circles corresponding to the first number and the second number are shielded as a whole;
[0193] If the first number + the second number is less than the shielding number, the group number with the third largest value is selected and recorded as the third number;
[0194] If the first number + the second number + the third number ≥ the shielding number, then the characters corresponding to the circles in the intersection set of the circles corresponding to the first number, the second number, and the third number are shielded as a whole;
[0195] If the first number + the second number + the third number is less than the shielding number, then the fourth largest group number is selected and recorded as the fourth number;
[0196] This process is repeated until the sum of the selected numbers is greater than or equal to the shielded number, and the characters corresponding to the circles in the intersection set of the circles corresponding to each selected number are shielded as a whole.
[0197] This approach automatically clusters characters using a circle intersection clustering method and, combined with a ratio threshold, performs overall shielding, improving the accuracy of sensitive information detection and shielding while reducing false positives. First, a circle cluster is generated for each character, using twice the diagonal of the character's circumscribed square as its radius. By calculating the intersection of these circles, overlapping characters are grouped together. This approach automatically identifies highly correlated character clusters within text, ensuring complete and accurate recognition even when there are gaps or misalignments between characters. Secondly, a clustering mechanism is introduced to sort clusters by the density of intersecting characters, and a shielding ratio threshold is used to determine the set of characters that require overall shielding. This approach prioritizes shielding of highly correlated character regions, ensuring that important sensitive information is not missed while preventing irrelevant characters from being mistakenly shielded. Compared to traditional methods based on single-character matching or fixed-area shielding, the present invention's technical solution dynamically adapts to varying text layouts, accurately locating and shielding sensitive characters even when they appear misaligned, spaced, or intersecting, thereby improving the robustness of information filtering. This allows precise control over the scope of information shielding, ensuring both security and the integrity of normal text display.
[0198] Expand the shielded area and shield the expanded area, including:
[0199] Get the geometric center of the area to be shielded, specifically:
[0200] On the browsing interface, any rectangular coordinate system is created and recorded as the first coordinate system;
[0201] Get all points on the boundary of the area to be shielded to form a point set;
[0202] Select any point from the point set and obtain its coordinates in the first coordinate system, which is recorded as ; Starting from the selected point, along the clockwise direction on the boundary of the area to be shielded, the coordinates of other points in the point set are obtained in turn, and are recorded as 、 … ; Where Z is equal to the number of points in the point set minus one;
[0203] The signed area P is calculated by the following formula:
[0204] ; where i refers to the subscript of X and Y;
[0205] The geometric center coordinates are calculated using the following formula :
[0206] ;
[0207] ;
[0208] Get the coordinates of the geometric center , recorded as the shape center;
[0209] Get each edge of the area to be masked;
[0210] For one edge of the area to be shielded, draw a ray perpendicular to this edge with the center of the shape as the endpoint. The direction of the ray is the expansion direction of this edge.
[0211] Get the extension direction of each edge;
[0212] Move the straight line of each side of the area to be masked in the direction of its extension by half the length of the diagonal of the square circumscribing the character;
[0213] All the straight lines after moving intersect to form several closed areas, and the closed areas with the number of sides equal to the number of boundaries are recorded as shielded areas;
[0214] Shielding the area covered by the shielding area;
[0215] Through geometric center calculation and boundary expansion technology, the precise expansion of the area to be shielded is achieved, the shielding effect is improved, and information leakage is avoided. First, a plane rectangular coordinate system is used to obtain the boundary point set of the area to be shielded, and the geometric center coordinates are calculated using the signed area formula to ensure the accuracy of the expansion direction. Secondly, with the geometric center as the endpoint, each side of the area to be shielded is vertically expanded, and the expansion amplitude is determined according to half the diagonal length of the character's circumscribed square to ensure the rationality of the expansion range. Because the determination of the area to be shielded is based on the set center of each character, the area to be shielded can only cover the part of the character to be shielded. Expanding by half the diagonal length of the character's circumscribed square can ensure that each character to be shielded is completely shielded. Unlike traditional fixed-size expansion or simple expansion methods, the present invention adopts a direction-adaptive expansion strategy, that is, each side is independently expanded according to its own direction, ensuring that the shielded area can accurately cover relevant sensitive information. Even if the shape of the area to be shielded is complex, the integrity of the expanded area can be maintained. In addition, this method determines the final shielding area by the intersection of the expanded straight lines, ensuring that the shielding range is evenly expanded, without information omission or excessive occlusion, thereby improving the robustness of the shielding.
[0216] It should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that includes a list of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus.
[0217] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.
Claims
1. A risk assessment method for file transmission, characterized in that: include: The duration of the risk of obtaining a free viewing portion of each electronic file; Determine the risk level of users browsing electronic files based on the duration of the risk; Mark keywords in risky electronic files; Obtain the intersection set of circles corresponding to the constituent characters of each marked keyword; Get the area to be shielded, specifically: Get the circumference of the intersection set that needs to be shielded as a whole; For a circle of an intersecting set that needs to be shielded as a whole, obtain the point of the center of each circle in the intersecting set of this circle, and record them as the first point, the second point, ... the Ath point, where A is equal to the number of groups in this circle; Choose any two points from point 1, point 2, point A, and draw a straight line through the two selected points. Determine whether other points on the browsing interface are on the same side of the drawn line, specifically: The straight line divides the browsing interface into two areas, which are respectively recorded as the first area and the second area; Get the number of other points in each area. If the number of other points in a certain area is 0, it is considered that the other points on the browsing interface are on the same side of the straight line. If the number of other points in the two areas is not 0, it is determined that the other points on the browsing interface are not on the same side of the straight line; If other points on the browsing interface are not on the same side of the drawn line, select any two points from the first point, the second point, ... point A, and draw a straight line passing through the two selected points; If other points on the browsing interface are on the same side of the drawn line, the drawn line will be included in the line set; Traverse all cases where two points are selected from the first point, the second point, ..., point A to form a straight line, and add all lines on the same side of the drawn line as the other points on the browsing interface into the line set; Get the number of straight lines in the straight line set, recorded as the boundary number; All the lines in the line set intersect to form several closed areas, and the closed areas with the number of sides equal to the number of boundaries are recorded as the areas to be shielded; Expand the shielded area and shield the expanded area; The step of obtaining the risk duration of the free browsing portion of each electronic file specifically includes: obtaining, for an electronic file, the number of times all users browse the free browsing portion of the electronic file, which is recorded as the actual number of times; Set a number threshold, which is used to determine whether the actual number is valid; If the actual number of times is greater than or equal to the number threshold, the actual number of times is deemed valid; If the actual number of times is less than the number threshold, the actual number of times is deemed invalid; For electronic files with actual valid times, calculate the risk duration of the free browsing portion, specifically: Randomly select an electronic file with a valid number of times, obtain the total time of all users browsing the free browsing part of this electronic file, and record it as the total time; The risk duration of this electronic file = total duration / actual number of times.
2. The risk assessment method for file transmission according to claim 1, characterized in that: The risk duration for obtaining the free browsing portion of each electronic file also includes: Acquire an electronic document library, wherein the electronic document library is used to store all electronic documents; The electronic file is a text document; Set up a free browsing section for each electronic file; Users can only browse the free browsing portion of the electronic file that has not been purchased.
3. The risk assessment method for file transmission according to claim 2, characterized in that: The risk duration for obtaining the free browsing portion of each electronic file also includes: For electronic files with invalid actual number of views, the risk duration of the free browsing portion is calculated as follows: Obtain the risk duration of all valid electronic files and calculate the total risk duration, which is recorded as the overall duration. Obtain the word count of all free browsing sections of the electronic document with valid actual number of times and calculate the total word count, and record the result as the overall word count; Calculate the total duration / total word count, and record the result as the single word duration; Randomly select an electronic file with an invalid actual number of views, obtain the word count of the free browsing part of this electronic file, and record it as the actual word count; The risk duration of this electronic file = single word duration × actual number of words.
4. The risk assessment method for file transmission according to claim 1, wherein: The method of judging the risk level of a user browsing electronic files based on the risk duration specifically includes: Setting a determination ratio, wherein the determination ratio is used to determine whether the total time a user spends browsing the free browsing portion of an electronic file is too long; Obtain the user who is currently browsing electronic files in the electronic file library and record them as target users; Obtain the electronic file currently browsed by the target user and record it as the target file; The risk duration of obtaining the free browsing portion of the target file is recorded as the standard duration; Get the time the target user browses the target file, recorded as browsing time; If the browsing time ≥ standard time × judgment ratio, it is determined that the total time the target user browses the free browsing part of the electronic file is too long, which poses a risk; If the browsing time is less than the standard time × the judgment ratio, it is determined that the total time the target user spends browsing the free browsing part of the electronic file is not too long and there is no risk.
5. The risk assessment method for file transmission according to claim 4, characterized in that: The step of determining the risk level of a user browsing electronic files based on the risk duration also includes: Setting a stay time threshold, wherein the stay time threshold is used to determine whether the total time for a user to browse the free browsing portion of the electronic file is too long; Get the browsing interface status of the target user when browsing the target file; The states of the browsing interface include scrolling and static; Obtain the duration of each browsing interface state being static, and select the longest duration as the actual duration; If the actual duration is greater than or equal to the stay duration threshold, it is determined that the total time the target user spends browsing the free browsing portion of the electronic file is too long, and there is a risk; If the actual duration is less than the stay duration threshold, it is determined that the total duration of the target user's browsing of the free browsing portion of the electronic file is not too long and there is no risk.
6. The risk assessment method for file transmission according to claim 1, characterized in that: The marking of keywords in risky electronic files specifically includes: Record the risky target files being browsed by the target user as blocked files; Obtain all keywords of the shielded file through natural language processing technology, and form a keyword library of the shielded file, which is recorded as a shielded vocabulary library; The keyword is composed of a number of characters, each character having a circumscribed square of the same area; Get the content of the free browsing portion of the shielded files currently displayed on the browsing interface; Determine whether the keywords in the blocked word library appear in the content of the free browsing portion of the blocked file currently displayed on the browsing interface; If the keywords in the blocked word library do not appear in the content of the free browsing section of the blocked file currently displayed on the browsing interface, no processing will be performed; If the keywords in the blocked word library appear in the content of the free browsing portion of the blocked file currently displayed on the browsing interface, the keywords in the blocked word library that appear in the content of the free browsing portion of the blocked file currently displayed on the browsing interface are marked in the browsing interface.
7. The risk assessment method for file transmission according to claim 1, characterized in that: The step of obtaining the intersection set of circles corresponding to the constituent characters of each marked keyword specifically includes: For each marked keyword, obtain all the characters that make up the keyword and form a character set; The number of characters in the character set is recorded as the number of characters; For a character, the center of the set of squares surrounding the character is the center point of the character; Get the center point of each character in the character set, and use the center point as the center and a radius of twice the diagonal length of the square circumscribing the character as the radius to form N circles and form a circle set. Each character corresponds to a circle, where N is equal to the number of characters. Randomly select a circle from the circle set, record it as the target circle, and determine whether there is a circle that intersects with the target circle; If it does not exist, the number of groups on the target circle is recorded as 0; If so, the target circle and the circle intersecting with the target circle are included in the target circle's intersection set, and it is determined whether there are other circles intersecting with the circles in the target circle's intersection set. If not, the number of target circle groups is recorded as equal to the number of circles in the target circle's intersection set; if so, the circles intersecting with the circles in the target circle's intersection set are included in the target circle's intersection set, until no new circles are included in the target circle's intersection set; and the number of target circle groups is recorded as equal to the number of circles in the target circle's intersection set; If the elements in the intersection sets of different circles are all the same, then the intersection sets of these different circles are regarded as the same intersection set.
8. The risk assessment method for file transmission according to claim 1, characterized in that: The obtaining of the circumference of the intersection set that needs to be shielded as a whole specifically includes: Setting a ratio threshold, wherein the ratio threshold is used to perform overall masking of characters; Calculate the number of characters × the ratio threshold, and record the result as the number of shielding; Get the number of groups on each circle and sort them in descending order; Select the group with the largest value and record it as the first number; If the first number is greater than or equal to the shielding number, then the characters corresponding to the circles in the intersection set of the circles corresponding to the first number are shielded as a whole; If the first number is less than the shielding number, the group number with the second largest value is selected and recorded as the second number; If the first number + the second number ≥ the shielding number, then the characters corresponding to the circles in the intersection set of the circles corresponding to the first number and the second number are shielded as a whole; If the first number + the second number is less than the shielding number, the group number with the third largest value is selected and recorded as the third number; If the first number + the second number + the third number ≥ the shielding number, then the characters corresponding to the circles in the intersection set of the circles corresponding to the first number, the second number, and the third number are shielded as a whole; If the first number + the second number + the third number is less than the shielding number, then the fourth largest group number is selected and recorded as the fourth number; This process is deduced in this way until the sum of the selected numbers is greater than or equal to the shielded number, and the characters corresponding to the circles in the intersection set of the circles corresponding to each selected number are shielded as a whole.
9. The risk assessment method for file transmission according to claim 1, characterized in that: Expand the shielded area and shield the expanded area, including: Get the geometric center of the area to be shielded, specifically: On the browsing interface, any rectangular coordinate system is created and recorded as the first coordinate system; Get all points on the boundary of the area to be shielded to form a point set; Select any point from the point set and obtain its coordinates in the first coordinate system, which is recorded as ; Starting from the selected point, along the clockwise direction on the boundary of the area to be shielded, the coordinates of other points in the point set are obtained in turn, and are recorded as 、 … ; The signed area P is calculated by the following formula: ; The geometric center coordinates are calculated using the following formula : ; ; Get the coordinates of the geometric center , recorded as the shape center; Get each edge of the area to be masked; For one edge of the area to be shielded, draw a ray perpendicular to this edge with the center of the shape as the endpoint. The direction of the ray is the expansion direction of this edge. Get the extension direction of each edge; Move the straight line of each side of the area to be masked in the direction of its extension by half the length of the diagonal of the square circumscribing the character; All the straight lines after moving intersect to form several closed areas, and the closed areas with the number of sides equal to the number of boundaries are recorded as shielded areas; Shield the area covered by the shielding area.
Citation Information
Patent Citations
Display method and device of information message
CN107992622A
Bookkeeping system for advertisement browsing benefit of online video APP
CN110189181A