A webpage browsing habit mining method with privacy protection
By using a graph-based approach to mine web browsing habits for privacy protection, this method solves the problems of high computational cost and low data utility, achieving efficient web browsing habit mining that is suitable for practical applications.
Patent Information
- Application Number
- CN202310271437.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-20
- Publication Date
- 2026-11-06
- Estimated Expiration
- 2043-03-20
AI Technical Summary
While ensuring privacy protection, existing technologies have high computational costs and low data utility in web browsing habit mining, and the noise from repeated subsequences in browsing records leads to large errors in statistical results.
A graph-based approach is used to mine frequently browsed sequences, including data preprocessing, privacy protection processing, and iterative mining of the graph structure. By initializing an undirected weighted network graph, frequent sequences are extracted using random perturbation and frequency thresholds, reducing computational overhead and improving data utility.
While ensuring privacy protection, it significantly reduces computational overhead, improves data utility, and enables more efficient web browsing habit mining, making it suitable for practical applications.
Smart Images

Figure CN116361852B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of privacy protection technology, specifically relating to a method for mining web browsing habits with privacy protection. Background Technology
[0002] With the continuous development of internet technology, browsing the web has become extremely common. Mining users' web browsing habits is a very common data mining scenario. By mining and analyzing users' web browsing habits, it's possible to better provide users with various recommendation services or further improve the browser experience. However, directly disclosing users' web browsing data to data analysts poses a serious risk of privacy breaches. For example, users' web browsing data may contain sensitive information such as their health status, location, religious beliefs, or financial situation. Therefore, data analysts must ensure that using users' web browsing data for information mining does not infringe on users' personal privacy.
[0003] When mining user web browsing habits while ensuring privacy, the most common approach is to analyze frequent sequences within the user's browsing history. However, due to the large number of web pages and user browsing records, and the varying lengths of each user's browsing history, both privacy protection processing and frequent sequence mining incur significant computational overhead. Furthermore, repetitive subsequences in the browsing records introduce noise, leading to substantial errors in the final statistical results, resulting in low data utility. Summary of the Invention
[0004] The purpose of this invention is to overcome the above-mentioned technical problems and provide a privacy-preserving web browsing habit mining method based on graph structure. This method can reduce computational overhead and improve data utility while satisfying privacy protection, and it is easy to implement and highly operable.
[0005] To achieve the above objectives, the present invention employs the following technical solution:
[0006] A privacy-preserving method for mining web browsing habits, which mines frequent browsing sequences based on graph structures while ensuring privacy, includes the following steps:
[0007] 1) Perform data preprocessing on the user's original web browsing records, clean up invalid web browsing data, and obtain valid web browsing sequence data D = {S1, S2, ..., S}. N}, where N represents the total number of users, S i This is the web browsing sequence data for the i-th user, where i = 1, 2, ..., N;
[0008] 2) Initialize a completely undirected weighted network graph G(Ω, θ), and further initialize the weight vector matrix M of graph G, where Ω represents the set of web pages and θ represents the weight vector;
[0009] 3) Under the premise of privacy protection, mine frequently browsed sequences of length k and perform l max -k+1 iterations, where l max The maximum browsing sequence length for the user;
[0010] 4) For each iteration iter∈[1, l max -k+1], for each node W v weight vector θ v Each value θ v [m], v=1, 2,…, d, m=1, 2,…, (d-1) k-1 The webpage browsing sequence data D = {S1, S2, ..., S} N The raw browsing data S for each user in} i Privacy protection processing is performed, and then the privacy-protected data from all users is used to calculate each θ. v The count value of the k-frequent sequence corresponding to [m] is denoted as For θ v [m] is updated, that is
[0011] 5) Repeat step 4) to traverse each node W of graph G. v ∈Ω, update the weight vector values of all nodes based on the user data to obtain the updated weight vector matrix.
[0012] 6) Define a frequency threshold α, and iterate through the updated weight vector matrix. Extract items from the matrix whose values are greater than a threshold α, and add the corresponding sequence to the k-frequent sequence set V. f In the middle, V f This refers to the sequence of frequently viewed web pages by users, which is essentially a set of user browsing habits.
[0013] A further improvement of the present invention is that, in step 1), the invalid webpage browsing data cleaning process includes the operations of "removing accidental operations", "removing pop-up ads" and "removing webpages that are not fully opened".
[0014] A further improvement of this invention is that, in step 1), d represents the total number of web pages, and Ω = {W} 1 W 2 ,…,W d If} represents d web pages, then the web page browsing sequence of length l for the i-th user is represented as S.i = <W i 1 →W i 2 →...→W i l >, where W i j W represents the j-th webpage in the webpage browsing sequence of the i-th user. i j ∈Ω, i=1,2,…N, j=1,2,…,l, where the length of a user's webpage browsing sequence varies in real-world scenarios. We set the maximum length of a user's browsing sequence to l. max .
[0015] A further improvement of this invention is that, in step 2), a completely undirected weighted network graph G(Ω, θ) is initialized, and Ω = {W 1 W 2 ,…,W d Each webpage in} is treated as a node in graph G, and the paths between nodes are considered as the user's webpage browsing sequence, θ v For each node W v The weight vector, v = 1, 2, ..., d, represents the weights W. v The count of all different browsing sequences starting from the specified point.
[0016] A further improvement of this invention is that, in step 2), when mining a frequently visited sequence of length k, for each vertex W of graph G... v In this regard, starting from it, there are at most (d-1) k-1 Given a browsing sequence of length k, its weight vector θ v Initialize to θ v = [0, 0, ..., 0], where (d-1) k-1 If there are zeros, then the initial weight vector matrix of graph G is:
[0017]
[0018] A further improvement of this invention is that, in step 4), the webpage browsing sequence data D = {S1, S2, ..., S} is subjected to randomized perturbation. N The browsing sequence data S for each user in} i The specific steps for privacy protection are as follows:
[0019] 401) When mining frequently viewed sequences of length k, for each user i, the original viewed sequence data S i = <W i 1 →W i 2→…→W i l The process involves taking k consecutive items in the user sequence as a unit, and then encoding all units, with each unit encoded to a length of d(d-1). k-1 The binary string B is encoded such that, in each iteration, each unit only satisfies one of the possible combinations of sequences. Therefore, the encoded binary string B has only one bit set to 1 and all the other bits set to 0, i.e., B = [0, ..., 0, 1, 0, ..., 0].
[0020] 402) Define the privacy protection parameter as ∈, and for each bit in B = [0, ..., 0, 1i0, ..., 0], based on the formula
[0021]
[0022] By performing random perturbation, we obtain Where z = 1, 2, ..., d(d-1) k-1 ;
[0023] 403) Repeat 401) and 402) to encode random perturbations for each user's data, and use the privacy-protected data of all users to calculate each θ. v The count value of the k-frequent sequence corresponding to [m] is denoted as For θ v [m] is updated, that is
[0024] A further improvement of this invention is that, in step 6), the frequency threshold α is defined as:
[0025]
[0026] Where, Φ -1 The inverse cumulative distribution function representing the standard normal distribution, n w Let be the degree of the current node, N be the total number of users, and p and q correspond to the perturbation probabilities in formula (2), i.e.
[0027] A further improvement of this invention is that, in step 6), the updated weight vector matrix is traversed. Extract items from the matrix whose values are greater than a threshold α, and add the corresponding sequence to the k-frequent sequence set V. f In the middle, V f This refers to the sequence of frequently viewed web pages by users, which is essentially a set of user browsing habits.
[0028] Compared with the prior art, the present invention has at least the following beneficial technical effects:
[0029] This invention provides a privacy-preserving method for mining web browsing habits. Addressing the issues of high computational cost and low data utility, it utilizes graph structures to mine frequent sequences of user browsing data while protecting privacy, significantly reducing computational overhead. Furthermore, by iteratively mining on the graph, it fully utilizes all user data, improving the data utility of the final mining results. Therefore, it has promising application prospects in practice and fills the gap in privacy-preserving methods for mining web browsing habits. Attached Figure Description
[0030] Figure 1 A schematic diagram illustrating scenarios for understanding web browsing habits;
[0031] Figure 2 A flowchart for a privacy-preserving method for mining web browsing habits;
[0032] Figure 3 The results of validating the Fscore on a real dataset with a fixed mining sequence length;
[0033] Figure 4 The graph shows the results of validating the Fscore on a real dataset with a fixed frequency threshold. Detailed Implementation
[0034] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided to enable a more thorough understanding of the present disclosure and to fully convey the scope of the disclosure to those skilled in the art. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other. The present invention will now be described in detail with reference to the accompanying drawings and embodiments.
[0035] refer to Figure 1 and Figure 2 This invention provides a privacy-preserving method for mining web browsing habits. This method, while ensuring privacy, mines frequently browsed sequences based on graph structures, and includes the following steps:
[0036] 1) Perform data preprocessing on the user's original web browsing history, including cleaning invalid web browsing data such as "removal of accidental operations," "removal of pop-up ads," and "removal of web pages that are not fully opened," to obtain valid web browsing sequence data D = {S1, S2, ..., S}. N}, where N represents the total number of users, S i This represents the web browsing sequence data for the i-th user; let d represent the total number of web pages, and Ω = {W} 1 W2 ,…,W d If} represents d web pages, then the web page browsing sequence of length l for the i-th user is represented as S. i = <W i 1 →W i 2 →…→W i l >, where W i j W represents the j-th webpage in the webpage browsing sequence of the i-th user. i j ∈Ω, i=1,2,…N, j=1,2,…,l. In actual scenarios, the length of a user's webpage browsing sequence may vary. Assume the maximum length of a user's browsing sequence is l. max ;
[0037] 2) Initialize a completely undirected weighted network graph G(Ω, θ), and let Ω = {W 1 W 2 ,…,W d Each webpage in} is treated as a node in graph G, and the paths between nodes are considered as the user's webpage browsing sequence, θ v For each node W v The weight vector, v = 1, 2, ..., d, represents the weights W. v The count value of all different browsing sequences starting from the origin;
[0038] When mining a frequently visited sequence of length k, for each vertex W of graph G v In this regard, starting from it, there are at most (d-1) k-1 Given a browsing sequence of length k, its weight vector θ v Initialize to θ v = [0, 0, ..., 0], where (d-1) k-1 If there are zeros, then the initial weight vector matrix of graph G is:
[0039]
[0040] 3) Because the maximum length of a user's browsing sequence is l max Therefore, when mining frequently browsed sequences of length k, l is required. max -k+1 iterations;
[0041] 4) For each iteration iter∈[1, l max -k+1], for each node W v weight vector θ v Each value θ v[m], v=1, 2,…, d, m=1, 2,…, (d-1) k-1 When mining frequently browsed sequences of length k:
[0042] Step 1: For each user i, the original browsing sequence data S i = <W i 1 →W i 2 →...→W i l The process involves taking k consecutive items in the user sequence as a unit, and then encoding all units, with each unit encoded to a length of d(d-1). k-1 The binary string B is encoded such that, in each iteration, each unit only satisfies one of the possible combinations of sequences. Therefore, the encoded binary string B has only one bit set to 1 and all the other bits set to 0, i.e., B = [0, ..., 0, 1, 0, ..., 0].
[0043] Step 2: Define the privacy protection parameter as ∈, and apply the formula to each bit in B = [0, ..., 0, 1, 0, ..., 0].
[0044]
[0045] By performing random perturbation, we obtain Where z = 1, 2, ..., d(d-1) k-1 ;
[0046] Repeat Step 1 and Step 2, encoding and randomly perturbing the data for each user, and using the privacy-protected data from all users, calculate each θ. v The count value of the k-frequent sequence corresponding to [m] is denoted as For θ v [m] is updated, that is
[0047] 5) Repeat step 4) to traverse each node W of graph G. v If ∈Ω, then the weight vector values of all nodes can be updated based on the user data to obtain the updated weight vector matrix.
[0048] 6) Define a frequency threshold α, and iterate through the updated weight vector matrix. When the value is greater than the threshold α, the sequence corresponding to that value is added to the set of k-frequent sequences V. f In the middle, V f This refers to the frequently browsed webpage sequences of users mined by this invention, i.e., the set of user browsing habits, where cases less than or equal to a threshold are not included in the mining.
[0049] Define the frequency threshold α as:
[0050]
[0051] Where, Φ -1 The inverse cumulative distribution function representing the standard normal distribution, n w Let be the degree of the current node, N be the total number of users, and p and q correspond to the perturbation probabilities in formula (2), i.e. Traverse the updated weight vector matrix Extract items from the matrix whose values are greater than a threshold α, and add the corresponding sequence to the k-frequent sequence set V. f In the middle, V f This refers to the sequence of frequently viewed web pages by users, which is essentially a set of user browsing habits.
[0052] Illustration of web browsing habit mining scenarios:
[0053] Figure 1 This diagram illustrates a scenario for mining web browsing habits, primarily involving three parties: users, servers, and data analysts. Each user uploads their web browsing data to the server. After aggregating all user data, the server performs data preprocessing. Then, the data analysts use privacy-preserving methods to perform frequent sequence mining to analyze users' browsing habits.
[0054] Simulation experiment description:
[0055] The F-score is used to verify the data utility of this invention. The larger the F-score, the higher the accuracy and the better the data utility.
[0056] Figure 3 The graph shows the Fscore results of validating this invention on a real dataset, where k=3 is fixed, meaning frequent browsing sequences of length 3 are mined. The Fscore changes were compared when the privacy parameter ∈={1, 2, 3, 4, 5} and the frequency threshold α={10, 20, 30}. Horizontally, it can be seen that when the frequency threshold remains constant, the Fscore of all three curves increases with the increase of the privacy parameter, indicating that a larger privacy parameter causes less data perturbation and thus better data utility. Vertically, it can be seen that when the privacy parameter remains constant, a smaller frequency threshold results in a larger Fscore, indicating better method utility.
[0057] Figure 4The graph shows the Fscore results for validating this invention on a real dataset. With a fixed frequency threshold α = 10, the Fscore changes were compared when the privacy parameter ∈ = {1, 2, 3, 4, 5} and the frequent sequence length k = {3, 6, 9}. Horizontally, it can be seen that when the frequent sequence length remains constant, the Fscore of all three curves increases with the increase of the privacy parameter, indicating that a larger privacy parameter causes less data perturbation and thus better data utility. Vertically, it can be seen that when the privacy parameter remains constant, a smaller frequent sequence length results in a larger Fscore, indicating better method utility.
[0058] Although the present invention has been described in detail above with general descriptions and specific embodiments, modifications or improvements can be made to it, which will be obvious to those skilled in the art. Therefore, all such modifications or improvements made without departing from the spirit of the present invention fall within the scope of protection claimed by the present invention.
Claims
1. A method for mining web browsing habits with privacy protection, characterized in that, This method, while ensuring privacy, mines frequently viewed sequences based on graph structures, including the following steps: 1) Perform data preprocessing on the user's original web browsing records, clean up invalid web browsing data, and obtain valid web browsing sequence data. ,in Represents the total number of users. For the first Web browsing sequence data of individual users ;use Represents the total number of web pages, using represent The first webpage will then be the first The length of each user is The webpage browsing sequence is represented as ,in Indicates the first The first in the web browsing sequence of the user A webpage, , , In real-world scenarios, the length of a user's webpage browsing sequence varies. Therefore, the maximum length of a user's browsing sequence is set to [value missing]. ; 2) Initialize a completely undirected weighted network graph And further initialize the graph weight vector matrix ,in Represents a collection of web pages. Represents the weight vector; initialize a completely undirected weighted network graph. ,Will Each webpage in the image The nodes are viewed as the path between the nodes, which is considered as the user's webpage browsing sequence. For each node The weight vector, The value of the weight vector represents the weight of the vector. The count value of all different browsing sequences starting from the origin; 3) Under the premise of privacy protection, the mining length is Frequently browse the sequence and perform The next iteration, in which The maximum browsing sequence length for the user; 4) For each iteration For each node weight vector Each value , , , webpage browsing sequence data Raw browsing data for each user Privacy protection processing is performed, and then the privacy-protected data from all users is used to calculate each... corresponding - The count value of frequent sequences, denoted as ,right To update, i.e. Based on randomized perturbation of web browsing sequence data Browse sequence data for each user The specific steps for privacy protection are as follows: 401) When the excavation length is When frequently browsing sequences, for each user Original browsing sequence data , to continuously Each item is treated as a unit, and then all units are encoded, with each unit encoded as having a length of [length missing]. binary string Since each unit in each iteration only fits one of the possible sequence combinations, the encoded binary string... Only one bit is 1, and all the other bits are 0, that is... ; 402) Define the privacy protection parameter as ,right Each element in the formula is based on By performing random perturbation, we obtain ,in ; 403) Repeat 401) and 402), encode random perturbations on each user's data, and use the privacy-protected data of all users to calculate each... corresponding - The count value of frequent sequences, denoted as ,right To update, i.e. ; 5) Repeat step 4) to traverse the graph. Each node The weight vector values of all nodes are updated based on user data to obtain the updated weight vector matrix. ; 6) Define the frequency threshold Iterate through the updated weight vector matrix For values in the matrix greater than a threshold Extract the items and add the corresponding sequences to the list. - Frequent sequence set middle, This refers to the sequence of frequently viewed web pages by users, which is essentially a set of user browsing habits.
2. The method for mining web browsing habits with privacy protection according to claim 1, characterized in that, In step 1), the invalid webpage browsing data cleaning process includes "removal of accidental operations", "removal of pop-up ads" and "removal of webpages that are not fully opened".
3. The method for mining web browsing habits with privacy protection according to claim 1, characterized in that, In step 2), when the excavation length is When frequently browsing sequences, for graphs Each node In other words, starting from it, there are at most The length is The browsing sequence is used, therefore its weight vector is determined. Initialize to Among them are If there are zeros, then the diagram The initial weight vector matrix is: 。 4. The method for mining web browsing habits with privacy protection according to claim 3, characterized in that, In step 6), a frequency threshold is defined. for: in, The inverse cumulative distribution function representing the standard normal distribution. This represents the degree of the current node. Total number of users and Corresponding formula The perturbation probability in, i.e. , .
5. The method for mining web browsing habits with privacy protection according to claim 4, characterized in that, In step 6), the updated weight vector matrix is traversed. For values in the matrix greater than a threshold Extract the items and add the corresponding sequences to the list. - Frequent sequence set middle, This refers to the sequence of frequently viewed web pages by users, which is essentially a set of user browsing habits.
Citation Information
Patent Citations
Localized differential privacy protection method based on label clustering
CN112559593A
Network data publishing method based on differential privacy and closeness centrality
CN115438227A
