A Personalized Webpage Ranking Method and System Based on Linear Algebra

By representing graph data as an adjacency matrix and performing algebraic calculations, and utilizing parallel matrix computation methods, the high concurrency problem of personalized webpage ranking algorithms on graph data is solved, achieving efficient personalized webpage ranking calculations.

CN116226525BActive Publication Date: 2025-10-28BEIJING INST OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310194387.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-03-02
Publication Date
2025-10-28
Estimated Expiration
2043-03-02

AI Technical Summary

Technical Problem

Existing personalized webpage ranking algorithms struggle to achieve high concurrency on graph data, primarily because the irregularity of graph data leads to uneven load during parallel computation, affecting the computational efficiency of strongly connected components.

Method used

The graph is represented as an adjacency matrix and algebraic calculations are performed. Mature parallel matrix computation methods are used to find strongly connected components with 1 node through the Trim-1 method. The algebraic FW-BW algorithm and the label propagation algorithm of matrix multiplication are used to find the largest strongly connected component. Finally, the PM algorithm is used to calculate personalized webpage rankings on the reconstructed directed acyclic graph.

Benefits of technology

It achieves good parallelism and efficient personalized webpage ranking calculation on graph data, overcomes the high concurrency problem, and realizes data-level parallel computing by utilizing the high concurrency of matrix operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116226525B_ABST
    Figure CN116226525B_ABST
Patent Text Reader

Abstract

This invention discloses a personalized webpage ranking method and system based on linear algebra. It represents the graph as an adjacency matrix and performs algebraic calculations, achieving good parallelism for efficient personalized webpage ranking. Specifically, it uses the original graph data corresponding to a set of webpages as the input webpage set, with the initial webpage set being a subset of the input webpage set. A graph adjacency matrix is ​​constructed based on the original graph data. The algebraic Trim-1 method is used on the graph adjacency matrix to discover strongly connected components with one node, and the adjacency matrix is ​​reconstructed to obtain a graph represented using the reconstructed adjacency matrix. An algebraic FW-BW algorithm based on algebraic breadth-first search is used to find the largest strongly connected component in the graph. An algebraic label propagation algorithm based on matrix multiplication is used to find strongly connected components in the graph represented using the adjacency matrix. The PM algorithm is used on the reconstructed directed acyclic graph to calculate personalized webpage rankings, indicating the degree of association between the webpage and the initial webpage set.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of network analysis technology, specifically to a personalized webpage ranking method and system based on linear algebra. Background Technology

[0002] In the field of web analytics, personalized web page ranking is of great significance. Personalized PageRank (PPR) is a special application of PageRank, used to measure the relevance of each node in a graph to a given set of starting nodes. PPR has a wide range of applications. For example, on social networks, users may want to know which friends are more important to them; on business networks, merchants also want to know which products are more relevant to their products in order to improve their business strategies.

[0003] The classic personalized webpage ranking algorithm is the PM (Power method) iterative algorithm. The PM algorithm continuously iterates and calculates an approximate PPR vector in each iteration, which is used as the input value for the next iteration. Then, based on the edge relationships in the graph, a new approximate PPR vector is calculated until convergence, and the final PPR vector is returned as the result.

[0004] While the PM algorithm guarantees high accuracy, its high complexity and computational cost make it less efficient. Therefore, an improved strategy involves first calculating strongly connected components, then using these components to calculate the reachable subgraph of the initial node set, and finally applying the PM algorithm to this smaller reachable subgraph to calculate personalized webpage rankings. However, efficiently parallelizing the computation of strongly connected components remains a challenge. Most existing techniques rely on adjacency lists for computation, but the irregularities in graph data lead to uneven load distribution during parallel computation, resulting in poor parallelism and impacting the efficiency of strongly connected component computation.

[0005] Therefore, current personalized webpage ranking algorithms based on strongly connected components have difficulty achieving high concurrency on graph data. Summary of the Invention

[0006] In view of this, the present invention provides a personalized webpage ranking method and system based on linear algebra. By representing the graph as an adjacency matrix and performing algebraic calculations, mature parallel matrix calculation methods can be fully utilized to achieve good parallelism, quickly obtain strongly connected components, and thus efficiently calculate personalized webpage rankings.

[0007] To achieve the above objectives, the technical solution of the present invention includes the following steps:

[0008] Step 1: Using the original graph data corresponding to a set of web pages as the input web page set, and the starting web page set as a subset of the input web page set, construct a graph adjacency matrix based on the original graph data.

[0009] Step 2: Use the algebraic Trim-1 method on the graph adjacency matrix to find strongly connected components with 1 node and reconstruct the adjacency matrix to obtain the graph represented by the reconstructed adjacency matrix.

[0010] Step 3: Use the algebraic FW-BW algorithm based on algebraic breadth-first search to find the largest strongly connected component in the graph represented by the reconstructed adjacency matrix.

[0011] Step 4: Use the matrix multiplication-based algebraic label propagation algorithm to find strongly connected components in the graph represented by the adjacency matrix.

[0012] Step 5: Calculate personalized webpage rankings using the PM algorithm on the reconstructed directed acyclic graph. The ranking value of each webpage indicates the degree of association between the webpage and the initial webpage set.

[0013] Furthermore, a graph adjacency matrix is ​​constructed based on the original graph data. The specific steps are as follows:

[0014] S101: Input webpage set V, webpage link relationships, starting webpage set V0, and the number of clicks on webpages in V0 L = {(v, l v )|v∈V0};l v Let n be the number of clicks on webpage v; the initial webpage set V0 contains n webpages.

[0015] S102: Construct graph G0 based on the input webpage and webpage link relationships, and mark the nodes corresponding to V0.

[0016] S103: Calculate the initial probability P of the starting page based on the number of clicks on the page = {(v, p} v )|v∈V0}, l u p represents the number of clicks on webpage u; v Let v be the initial probability of webpage v.

[0017] S104: Generate a sparse matrix FW based on graph G0, which is the graph adjacency matrix. The transpose of FW is BW. Store FW and BW in sparse compressed matrix format.

[0018] Furthermore, the method for discovering strongly connected components with 1 node using the algebraic Trim-1 method on the graph adjacency matrix is ​​as follows:

[0019] S201: Use a vector of all ones to perform sparse matrix multiplication with FW and BW respectively. The results are the in-degree f(v) and out-degree b(v) of all nodes v in the input web page set V. Record whether f(v) and b(v) are 0 using a Boolean vector.

[0020] S202: Vector addition of f(v) and b(v) based on algebraic primitives, i.e., m(v) = f(v) && b(v); m(v) is a label vector, and the nodes recorded as 0 in m(v) are the strongly connected components with a node count of 1.

[0021] S203: Multiply m(v) by FW and BW respectively, calculate whether the in-degree and out-degree f(v) and b(v) of the remaining nodes where m(v) is 1 are 0 and record them using a Boolean vector.

[0022] S204: Repeat S202 and S203 until m(v) no longer changes.

[0023] S205: Record the strongly connected component ID corresponding to the node that is recorded as 0 in m(v) as its own node number.

[0024] S206: Traverse all edges (i,j) in FW and BW, where i and j are nodes, and keep only the edges that satisfy m(i) = 1 && m(j) = 1, that is, remove the strongly connected components with 1 node from the graph, and obtain the graph after removing the strongly connected components.

[0025] Furthermore, an algebraic FW-BW algorithm based on algebraic breadth-first search is used to find strongly connected components in the graph represented by the reconstructed adjacency matrix. The specific method is as follows:

[0026] S301: Calculate the in-degree and out-degree of all nodes v in the input webpage V and multiply them to obtain the vector n(v).

[0027] S302: Sort n(v) and find the largest n(v0).

[0028] S303: Starting from v0, perform an algebraic breadth-first search based on the adjacency matrix FW to obtain the BFS tree B.

[0029] S304: Starting from v0, perform an algebraic breadth-first search based on the adjacency matrix BW to obtain the BFS tree F.

[0030] S305: The intersection S of B and F is the strongly connected component S containing v0. Remove the nodes in S from FW and BW.

[0031] Furthermore, an algebraic label propagation algorithm based on matrix multiplication is used to find strongly connected components in a graph represented by an adjacency matrix. The specific method is as follows:

[0032] S401: Node v is assigned the value minf(v) = v. It uses matrix multiplication to transmit minf(v) to its reachable neighbor nodes. The node updates minf(v) with the received minimum value. This process is repeated until minf(v) is no longer updated.

[0033] S402: Assign the value minb(v) = v to the node v that satisfies minf(v) = v, and transmit minb(v) to its neighboring nodes that are reachable from itself using matrix multiplication. The node updates its own minb(v) to the received minimum value. Repeat this process until minb(v) is no longer updated.

[0034] S403: Mark the strongly connected component ID of a group of nodes where minf(v) = minb(v) = u as u, and remove them from FW and BW.

[0035] S404: Repeat S401, S402, and S403 until FW and BW are empty.

[0036] Furthermore, the method for calculating personalized webpage rankings using the PM algorithm on the reconstructed directed acyclic graph is as follows:

[0037] S501: Reconstruct graph G0 by compressing nodes belonging to the same strongly connected component into a super node, generating new edges based on the edge relationships between strongly connected components, and obtaining a directed acyclic graph G1, which is stored in the form of an adjacency matrix.

[0038] S502: Denote the strongly connected component containing the node in V0 as the starting component, and obtain the corresponding starting component set V1 in G1.

[0039] S503: Perform algebraic breadth-first search on each node in V1, and then find the union of all the breadth-first search trees to obtain the component reachable subgraph G2.

[0040] S504: Based on the correspondence between nodes in G2 and G0, G0 is reconstructed to obtain the reachable subgraph G3.

[0041] S505: Calculate the personalized network ranking vector of V0 on G3 using the PM algorithm.

[0042] S506: Utilization Calculate the personalized network ranking of V0 Where 0 is the zero vector, and its dimension is the number of nodes in the unreachable subgraph G0\G3 of V0.

[0043] To achieve the above objectives, the present invention also provides a personalized webpage ranking system based on linear algebra, which includes the following modules:

[0044] The graph adjacency matrix construction module takes the original graph data corresponding to a set of web pages as the input web page set, and the starting web page set is a subset of the input web page set, and constructs a graph adjacency matrix based on the original graph data.

[0045] The reconstruction module is used to discover strongly connected components with 1 node on the graph adjacency matrix using the algebraic Trim-1 method and to reconstruct the adjacency matrix to obtain a graph represented by the reconstructed adjacency matrix.

[0046] The Algebraic FW-BW Algorithm module uses an algebraic FW-BW algorithm based on algebraic breadth-first search to find the maximum strongly connected component in a graph represented by a reconstructed adjacency matrix.

[0047] The Algebraic Label Propagation Algorithm module uses a matrix multiplication-based algebraic label propagation algorithm to find strongly connected components in a graph represented by an adjacency matrix.

[0048] The webpage ranking module is used to calculate personalized webpage rankings on the reconstructed directed acyclic graph using the PM algorithm. The magnitude of each webpage's ranking value indicates the degree of association between the webpage and the initial set of webpages.

[0049] Furthermore, the graph adjacency matrix construction module is implemented in the following steps:

[0050] S101: Input webpage set V, webpage link relationships, starting webpage set V0, and the number of clicks on webpages in V0 L = {(v, l v )|v∈V0};l v Let n be the number of clicks on webpage v; the initial webpage set V0 contains n webpages.

[0051] S102: Construct graph G0 based on the input webpage and webpage link relationships, and mark the nodes corresponding to V0.

[0052] S103: Calculate the initial probability P of the starting page based on the number of clicks on the page = {(v, p} v )|v∈V0}, l u p represents the number of clicks on webpage u; v Let v be the initial probability of webpage v.

[0053] S104: Generate a sparse matrix FW based on graph G0, which is the graph adjacency matrix. The transpose of FW is BW. Store FW and BW in sparse compressed matrix format.

[0054] Furthermore, the module is refactored, specifically implementing the following steps:

[0055] S201: Use a vector of all ones to perform sparse matrix multiplication with FW and BW respectively. The results are the in-degree f(v) and out-degree b(v) of all nodes v in the input web page set V. Record whether f(v) and b(v) are 0 using a Boolean vector.

[0056] S202: Vector addition of f(v) and b(v) based on algebraic primitives, i.e., m(v) = f(v) && b(v); m(v) is a label vector, and the nodes recorded as 0 in m(v) are the strongly connected components with a node count of 1.

[0057] S203: Multiply m(v) by FW and BW respectively, calculate whether the in-degree and out-degree f(v) and b(v) of the remaining nodes where m(v) is 1 are 0 and record them using a Boolean vector.

[0058] S204: Repeat S202 and S203 until m(v) no longer changes.

[0059] S205: Record the strongly connected component ID corresponding to the node that is recorded as 0 in m(v) as its own node number.

[0060] S206: Traverse all edges (i, j) in FW and BW, where i and j are nodes. Only keep the edges that satisfy m(i) = 1 && m(j) = 1, that is, remove the strongly connected components with 1 node from the graph, and obtain the graph after removing the strongly connected components.

[0061] Furthermore, the algebraic FW-BW algorithm module is implemented with the following steps:

[0062] S301: Calculate the in-degree and out-degree of all nodes v in the input webpage V and multiply them to obtain the vector n(v).

[0063] S302: Sort n(v) and find the largest n(v0).

[0064] S303: Starting from v0, perform an algebraic breadth-first search based on the adjacency matrix FW to obtain the BFS tree B.

[0065] S304: Starting from v0, perform an algebraic breadth-first search based on the adjacency matrix BW to obtain the BFS tree F.

[0066] S305: The intersection S of B and F is the strongly connected component S containing v0. Remove the nodes in S from FW and BW.

[0067] Furthermore, the algebraic label propagation algorithm module is implemented with the following steps:

[0068] S401: Node v is assigned the value minf(v) = v. It uses matrix multiplication to transmit minf(v) to its reachable neighbor nodes. The node updates minf(v) with the received minimum value. This process is repeated until minf(v) is no longer updated.

[0069] S402: Assign the value minb(v) = v to the node v that satisfies minf(v) = v, and transmit minb(v) to its neighboring nodes that are reachable from itself using matrix multiplication. The node updates its own minb(v) to the received minimum value. Repeat this process until minb(v) is no longer updated.

[0070] S403: Mark the strongly connected component ID of a group of nodes where minf(v) = minb(v) = u as u, and remove them from FW and BW.

[0071] S404: Repeat S401, S402, and S403 until FW and BW are empty.

[0072] The webpage ranking module is implemented using the following steps:

[0073] S501: Reconstruct graph G0 by compressing nodes belonging to the same strongly connected component into a super node, generating new edges based on the edge relationships between strongly connected components, and obtaining a directed acyclic graph G1, which is stored in the form of an adjacency matrix.

[0074] S502: Denote the strongly connected component containing the node in V0 as the starting component, and obtain the corresponding starting component set V1 in G1.

[0075] S503: Perform algebraic breadth-first search on each node in V1, and then find the union of all the breadth-first search trees to obtain the component reachable subgraph G2.

[0076] S504: Based on the correspondence between nodes in G2 and G0, G0 is reconstructed to obtain the reachable subgraph G3.

[0077] S505: Calculate the personalized network ranking vector of V0 on G3 using the PM algorithm.

[0078] S506: Utilization Calculate the personalized network ranking of V0 Where 0 is the zero vector, and its dimension is the number of nodes in the unreachable subgraph G0\G3 of V0.

[0079] Beneficial effects:

[0080] This invention provides a personalized webpage ranking method and system based on linear algebra. By representing the graph as an adjacency matrix and performing algebraic calculations, it fully utilizes mature parallel matrix computation methods to achieve good parallelism, quickly obtains strongly connected components, and thus efficiently calculates personalized webpage rankings. This invention overcomes the problem that personalized webpage ranking algorithms based on strongly connected components struggle to achieve high concurrency on graph data. It uses an adjacency matrix as the storage format for graph data and performs calculations using linear algebra methods, thereby leveraging the high concurrency of matrix operations to achieve data-level parallelism. Attached Figure Description

[0081] Figure 1 This is a flowchart of the Trim method of the present invention;

[0082] Figure 2 This is a flowchart of the FW-BW method of the present invention;

[0083] Figure 3 This is a flowchart of the tag propagation algorithm of the present invention;

[0084] Figure 4 The present invention provides an overall flowchart of a personalized webpage ranking method based on linear algebra. Detailed Implementation

[0085] The present invention is described in detail below with reference to the accompanying drawings and embodiments.

[0086] This invention provides a personalized webpage ranking method based on linear algebra, the overall process of which is as follows: Figure 4 As shown, the process is as follows: Construct a graph adjacency matrix based on the original graph data; use the algebraic Trim-1 method on the graph adjacency matrix to find strongly connected components with 1 node and reconstruct the adjacency matrix; use the algebraic FW-BW algorithm based on algebraic breadth-first search to find the largest strongly connected component in the graph represented by the adjacency matrix; use the algebraic label propagation algorithm based on matrix multiplication to find strongly connected components in the graph represented by the adjacency matrix; and use the PM (Powermethod) algorithm on the reconstructed directed acyclic graph to calculate personalized webpage rankings.

[0087] This invention calculates personalized webpage rankings based on linear algebra methods. The following is a description of the specific implementation:

[0088] Step 1: Using the original graph data corresponding to a set of web pages as the input web page set, and the initial web page set as a subset of the input web page set, construct a graph adjacency matrix based on the original graph data; in this embodiment of the invention, Step 1 specifically includes the following steps:

[0089] S101: Input webpage set V, webpage link relationships, starting webpage set V0, and the number of clicks on webpages in V0 L = {(v, lv )|v∈V0};l v Let n be the number of clicks on webpage v; the initial webpage set V0 contains n webpages.

[0090] S102: Construct graph G0 based on the input webpage and webpage link relationships, and mark the nodes corresponding to V0;

[0091] S103: Calculate the initial probability P of the starting page based on the number of clicks on the page = {(v, p} v )|v∈V0}, l u p represents the number of clicks on webpage u; v Let v be the initial probability of webpage v.

[0092] S104: Generate a sparse matrix FW based on graph G0, which is the graph adjacency matrix. The transpose of FW is BW. Store FW and BW in a sparse compressed matrix format.

[0093] Step 2: Use the algebraic Trim-1 method on the graph adjacency matrix to find strongly connected components with 1 node and reconstruct the adjacency matrix to obtain the graph represented by the reconstructed adjacency matrix; the process of step 2 is as follows. Figure 1 As shown, specifically:

[0094] S201: Use a vector of all ones to perform sparse matrix multiplication with FW and BW respectively. The results are the in-degree f(v) and out-degree b(v) of all nodes v in the input web page set V. Record whether f(v) and b(v) are 0 using a Boolean vector.

[0095] S202: Vector addition of f(v) and b(v) based on algebraic primitives, i.e., m(v) = f(v) && b(v); m(v) is a label vector, and the nodes recorded as 0 in m(v) are the strongly connected components with a node count of 1.

[0096] S203: Multiply m(v) by FW and BW respectively, calculate whether the in-degree and out-degree f(v) and b(v) of the remaining nodes where m(v) is 1 are 0 and record them using a Boolean vector.

[0097] S204: Repeat S202 and S203 until m(v) no longer changes.

[0098] S205: Record the strongly connected component ID corresponding to the node that is recorded as 0 in m(v) as its own node number.

[0099] S206: Traverse all edges (i,j) in FW and BW, where i and j are nodes, and keep only the edges that satisfy m(i) = 1 && m(j) = 1, that is, remove the strongly connected components with 1 node from the graph, and obtain the graph after removing the strongly connected components.

[0100] Step 3: Use the algebraic FW-BW algorithm based on algebraic breadth-first search to find the largest strongly connected component in the graph represented by the reconstructed adjacency matrix; the process of step 3 is as follows: Figure 2 As shown, specifically:

[0101] S301: Calculate the in-degree and out-degree of all nodes v in the input webpage V and multiply them to obtain the vector n(v).

[0102] S302: Sort n(v) and find the largest n(v0).

[0103] S303: Starting from v0, perform an algebraic breadth-first search based on the adjacency matrix FW to obtain the BFS tree B.

[0104] S304: Starting from v0, perform an algebraic breadth-first search based on the adjacency matrix BW to obtain the BFS tree F.

[0105] S305: The intersection S of B and F is the strongly connected component S containing v0. Remove the nodes in S from FW and BW.

[0106] Step 4: Use an algebraic label propagation algorithm based on matrix multiplication to find strongly connected components in the graph represented by the adjacency matrix; the process of this step is as follows: Figure 3 As shown, specifically:

[0107] S401: Node v is assigned the value minf(v) = v. It uses matrix multiplication to transmit minf(v) to its reachable neighbor nodes. The node updates minf(v) with the received minimum value. This process is repeated until minf(v) is no longer updated.

[0108] S402: Assign the value minb(v) = v to the node v that satisfies minf(v) = v, and transmit minb(v) to its neighboring nodes that are reachable from itself using matrix multiplication. The node updates its own minb(v) to the received minimum value. Repeat this process until minb(v) is no longer updated.

[0109] S403: Mark the strongly connected component ID of a group of nodes where minf(v) = minb(v) = u as u, and remove them from FW and BW.

[0110] S404: Repeat S401, S402, and S403 until FW and BW are empty.

[0111] Step 5: Calculate personalized webpage rankings using the PM algorithm on the reconstructed directed acyclic graph. The ranking value of each webpage indicates the degree of association between the webpage and the initial webpage set.

[0112] S501: Reconstruct graph G0 by compressing nodes belonging to the same strongly connected component into a super node, generating new edges based on the edge relationships between strongly connected components, and obtaining a directed acyclic graph G1, which is stored in the form of an adjacency matrix.

[0113] S502: Denote the strongly connected component containing the node in V0 as the starting component, and obtain the corresponding starting component set V1 in G1.

[0114] S503: Perform algebraic breadth-first search on each node in V1, and then find the union of all the breadth-first search trees to obtain the component reachable subgraph G2.

[0115] S504: Based on the correspondence between nodes in G2 and G0, G0 is reconstructed to obtain the reachable subgraph G3.

[0116] S505: Calculate the personalized network ranking vector of V0 on G3 using the PM algorithm.

[0117] S506: Utilization Calculate the personalized network ranking of V0 Where 0 is the zero vector, and its dimension is the number of nodes in the unreachable subgraph G0\G3 of V0.

[0118] The present invention also provides a personalized webpage ranking system based on linear algebra, characterized in that the system includes the following modules:

[0119] The graph adjacency matrix construction module takes the original graph data corresponding to a set of web pages as the input web page set, and the starting web page set is a subset of the input web page set, and constructs a graph adjacency matrix based on the original graph data.

[0120] The reconstruction module is used to discover strongly connected components with 1 node on the graph adjacency matrix using the algebraic Trim-1 method and to reconstruct the adjacency matrix to obtain a graph represented by the reconstructed adjacency matrix.

[0121] The Algebraic FW-BW Algorithm module uses an algebraic FW-BW algorithm based on algebraic breadth-first search to find the maximum strongly connected component in a graph represented by a reconstructed adjacency matrix.

[0122] The Algebraic Label Propagation Algorithm module uses a matrix multiplication-based algebraic label propagation algorithm to find strongly connected components in a graph represented by an adjacency matrix.

[0123] The webpage ranking module is used to calculate personalized webpage rankings on the reconstructed directed acyclic graph using the PM algorithm. The magnitude of each webpage's ranking value indicates the degree of association between the webpage and the initial set of webpages.

[0124] The graph adjacency matrix construction module is implemented in the following steps:

[0125] S101: Input webpage set V, webpage link relationships, starting webpage set V0, and the number of clicks on webpages in V0 L = {(v, l v )|v∈V0};l v Let n be the number of clicks on webpage v; the initial webpage set V0 contains n webpages.

[0126] S102: Construct graph G0 based on the input webpage and webpage link relationships, and mark the nodes corresponding to V0.

[0127] S103: Calculate the initial probability P of the starting page based on the number of clicks on the page = {(v, p} v )|v∈V0}, l u p represents the number of clicks on webpage u; v Let v be the initial probability of webpage v.

[0128] S104: Generate a sparse matrix FW based on graph G0, which is the graph adjacency matrix. The transpose of FW is BW. Store FW and BW in a sparse compressed matrix format.

[0129] The module was refactored, and the specific steps are as follows:

[0130] S201: Use a vector of all ones to perform sparse matrix multiplication with FW and BW respectively. The results are the in-degree f(v) and out-degree b(v) of all nodes v in the input web page set V. Record whether f(v) and b(v) are 0 using a Boolean vector.

[0131] S202: Vector addition of f(v) and b(v) based on algebraic primitives, i.e., m(v) = f(v) && b(v); m(v) is a label vector, and the nodes recorded as 0 in m(v) are the strongly connected components with a node count of 1.

[0132] S203: Multiply m(v) by FW and BW respectively, calculate whether the in-degree and out-degree f(v) and b(v) of the remaining nodes where m(v) is 1 are 0 and record them using a Boolean vector.

[0133] S204: Repeat S202 and S203 until m(v) no longer changes.

[0134] S205: Record the strongly connected component ID corresponding to the node that is recorded as 0 in m(v) as its own node number.

[0135] S206: Traverse all edges (i, j) in FW and BW, where i and j are nodes. Only keep the edges that satisfy m(i) = 1 && m(j) = 1, that is, remove the strongly connected components with 1 node from the graph, and obtain the graph after removing the strongly connected components.

[0136] The algebraic FW-BW algorithm module is implemented in the following steps:

[0137] S301: Calculate the in-degree and out-degree of all nodes v in the input webpage V and multiply them to obtain the vector n(v).

[0138] S302: Sort n(v) and find the largest n(v0).

[0139] S303: Starting from v0, perform an algebraic breadth-first search based on the adjacency matrix FW to obtain the BFS tree B.

[0140] S304: Starting from v0, perform an algebraic breadth-first search based on the adjacency matrix BW to obtain the BFS tree F.

[0141] S305: The intersection S of B and F is the strongly connected component S containing v0. Remove the nodes in S from FW and BW.

[0142] The algebraic label propagation algorithm module is implemented in the following steps:

[0143] S401: Node v is assigned the value minf(v) = v. It uses matrix multiplication to transmit minf(v) to its reachable neighbor nodes. The node updates minf(v) with the received minimum value. This process is repeated until minf(v) is no longer updated.

[0144] S402: Assign the value minb(v) = v to the node v that satisfies minf(v) = v, and transmit minb(v) to its neighboring nodes that are reachable from itself using matrix multiplication. The node updates its own minb(v) to the received minimum value. Repeat this process until minb(v) is no longer updated.

[0145] S403: Mark the strongly connected component ID of a group of nodes where minf(v) = minb(v) = u as u, and remove them from FW and BW.

[0146] S404: Repeat S401, S402, and S403 until FW and BW are empty.

[0147] The webpage ranking module is implemented using the following steps:

[0148] S501: Reconstruct graph G0 by compressing nodes belonging to the same strongly connected component into a super node, generating new edges based on the edge relationships between strongly connected components, and obtaining a directed acyclic graph G1, which is stored in the form of an adjacency matrix.

[0149] S502: Denote the strongly connected component containing the node in V0 as the starting component, and obtain the corresponding starting component set V1 in G1.

[0150] S503: Perform algebraic breadth-first search on each node in V1, and then find the union of all the breadth-first search trees to obtain the component reachable subgraph G2.

[0151] S504: Based on the correspondence between nodes in G2 and G0, G0 is reconstructed to obtain the reachable subgraph G3.

[0152] S505: Calculate the personalized network ranking vector of V0 on G3 using the PM algorithm.

[0153] S506: Utilization Calculate the personalized network ranking of V0 Where 0 is the zero vector, and its dimension is the number of nodes in the unreachable subgraph G0\G3 of V0.

[0154] This embodiment provides a personalized webpage ranking system based on linear algebra, which can be implemented using the following device: a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor is configured with four functional modules according to the above-mentioned functions: an attribute graph construction module, a graph connectivity-independent node selection module, a graph density-related node selection module, and a friend recommendation module. When the processor executes the program, it can realize personalized webpage ranking based on linear algebra.

[0155] Furthermore, the method steps of this application can be implemented not only by a data processing program but also by hardware, such as logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Therefore, such hardware capable of implementing the method of this application can also constitute this application.

[0156] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments disclosed in this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those shown in the drawings. For example, two blocks shown connectedly may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in a block diagram or flowchart, and combinations of blocks in a block diagram or flowchart, may be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0157] In summary, the above are merely preferred embodiments of the present invention. Those skilled in the art will understand that the features described in the various embodiments and / or claims of this disclosure can be combined and / or combined in various ways, even if such combinations or combinations are not explicitly stated in this application. In particular, without departing from the spirit and teachings of this application, the features described in the various embodiments and / or claims of this application can be combined and / or combined in various ways, and all such combinations and / or combinations fall within the scope of this application.

Claims

1. A personalized webpage ranking method based on linear algebra, characterized in that, The method includes the following steps: Step 1: Using the original graph data corresponding to a set of web pages as the input web page set, the initial web page set is a subset of the input web page set. Construct a graph adjacency matrix based on the original graph data. Step 2: Use the algebraic Trim-1 method on the graph adjacency matrix to find strongly connected components with 1 node and reconstruct the adjacency matrix to obtain the graph represented by the reconstructed adjacency matrix; The algebraic Trim-1 method is as follows: S201: Perform sparse matrix multiplication using a vector of all ones with sparse matrices FW and BW respectively. The results are the in-degree f(v) and out-degree b(v) of all nodes v in the input web page set V, respectively. Record whether f(v) and b(v) are 0 using a Boolean vector. FW is a sparse matrix generated based on graph G0, which is the graph adjacency matrix. The transpose of FW is BW. Construct graph G0 based on the input web page set V and the web page link relationships. S202: Vector addition of f(v) and b(v) based on algebraic primitives, i.e., m(v) = f(v) && b(v); m(v) is a label vector, and the nodes recorded as 0 in m(v) are the strongly connected components with 1 node. Step 3: Use the algebraic FW-BW algorithm based on algebraic breadth-first search to find the largest strongly connected component in the graph represented by the reconstructed adjacency matrix; Step 4: Use the algebraic label propagation algorithm based on matrix multiplication to find strongly connected components in the graph represented by the adjacency matrix; Step 5: Reconstruct graph G0 by compressing nodes belonging to the same strongly connected component into a super node, generating new edges based on the edge relationships between strongly connected components, and obtaining a directed acyclic graph G1, which is stored in the form of an adjacency matrix; calculate personalized webpage rankings on the directed acyclic graph using the PM algorithm, where the ranking value of each webpage indicates the degree of association between the webpage and the initial webpage set.

2. The personalized webpage ranking method based on linear algebra according to claim 1, characterized in that, The specific steps for constructing the graph adjacency matrix based on the original graph data are as follows: S101: Input webpage set V, webpage link relationships, starting webpage set V0, and the number of clicks on webpages in V0 L = {(v,l v )|v∈V0};l v The number of clicks on webpage v; the initial webpage set V0 contains n webpages; S102: Construct graph G0 based on the input webpage set V and the webpage link relationship, and mark the nodes corresponding to V0; S103: Calculate the initial probability P of the starting page based on the number of clicks on the page = {(v, p...} v )|v∈V0}, l u p represents the number of clicks on webpage u; v Let v be the initial probability of webpage v; S104: Generate a sparse matrix FW based on graph G0, which is the graph adjacency matrix. The transpose of FW is BW. Store FW and BW in sparse compressed matrix format.

3. The personalized webpage ranking method based on linear algebra according to claim 2, characterized in that, Step two, following S202, further includes the following steps: S203: Multiply m(v) by FW and BW respectively, calculate whether the in-degree and out-degree f(v) and b(v) of the remaining nodes where m(v) is 1 are 0 and record them using a Boolean vector; S204: Repeat S202 and S203 until m(v) no longer changes; S205: Record the strongly connected component ID corresponding to the node that is recorded as 0 in m(v) as its own node number; S206: Traverse all edges (i,j) in FW and BW, where i and j are nodes, and keep only the edges that satisfy m(i) = 1 && m(j) = 1, that is, remove the strongly connected components with 1 node from the graph, and obtain the graph after removing the strongly connected components.

4. The personalized webpage ranking method based on linear algebra according to claim 3, characterized in that, The algebraic breadth-first search-based FW-BW algorithm is used to find the maximum strongly connected component in the graph represented by the reconstructed adjacency matrix. The specific method is as follows: S301: Calculate the in-degree and out-degree of all nodes v in the input web page set V and multiply them to obtain the vector n(v); S302: Sort n(v) and find the largest n(v0); S303: Starting from v0, perform an algebraic breadth-first search based on the adjacency matrix FW to obtain the BFS tree B; S304: Starting from v0, perform an algebraic breadth-first search based on the adjacency matrix BW to obtain the BFS tree F; S305: The intersection S of B and F is the strongly connected component S containing v0. Remove the nodes in S from FW and BW.

5. The personalized webpage ranking method based on linear algebra according to claim 4, characterized in that, The algebraic label propagation algorithm based on matrix multiplication is used to find strongly connected components in a graph represented by an adjacency matrix. The specific method is as follows: S401: Node v is assigned the value minf(v) = v, and minf(v) is transmitted to its reachable neighbor nodes using matrix multiplication. The node updates minf(v) with the received minimum value. This process is repeated until minf(v) is no longer updated. S402: Assign the value minb(v) = v to the node v that satisfies minf(v) = v, and transmit minb(v) to its neighboring nodes that are reachable from itself using matrix multiplication. The node updates its own minb(v) to the received minimum value. Repeat this process until minb(v) is no longer updated. S403: Mark the strongly connected component ID of a group of nodes where minf(v) = minb(v) = u as u, and remove them from FW and BW; S404: Repeat S401, S402, and S403 until FW and BW are empty.

6. The personalized webpage ranking method based on linear algebra according to claim 5, characterized in that, The method for calculating personalized webpage ranking using the PM algorithm on a reconstructed directed acyclic graph is as follows: S501: Reconstruct graph G0 by compressing nodes belonging to the same strongly connected component into a super node, generating new edges based on the edge relationships between strongly connected components, and obtaining a directed acyclic graph G1, which is stored in the form of an adjacency matrix. S502: Record the strongly connected component containing the node in V0 as the starting component, and obtain the corresponding starting component set V1 in G1; S503: Perform algebraic breadth-first search on each node in V1, and then find the union of all the breadth-first search trees to obtain the component reachable subgraph G2. S504: Based on the correspondence between nodes in G2 and G0, G0 is reconstructed to obtain the reachable subgraph G3; S505: Calculate the personalized network ranking vector of V0 on G3 using the PM algorithm. S506: Utilization Calculate the personalized network ranking of V0 Where 0 is the zero vector, and its dimension is the number of nodes in the unreachable subgraph G0\G3 of V0.

7. A personalized webpage ranking system based on linear algebra, characterized in that, The system includes the following modules: The graph adjacency matrix construction module uses the original graph data corresponding to a set of web pages as the input web page set, and the starting web page set is a subset of the input web page set. It constructs a graph adjacency matrix based on the original graph data. The reconstruction module is used to discover strongly connected components with one node on the graph adjacency matrix using the algebraic Trim-1 method and to reconstruct the adjacency matrix, obtaining a graph represented by the reconstructed adjacency matrix; the algebraic Trim-1 method is as follows: S201: Perform sparse matrix multiplication using a vector of all ones with sparse matrices FW and BW respectively. The results are the in-degree f(v) and out-degree b(v) of all nodes v in the input web page set V, respectively. Record whether f(v) and b(v) are 0 using a Boolean vector. FW is a sparse matrix generated based on graph G0, which is the graph adjacency matrix. The transpose of FW is BW. Construct graph G0 based on the input web page set V and the web page link relationships. S202: Vector addition of f(v) and b(v) based on algebraic primitives, i.e., m(v) = f(v) && b(v); m(v) is a label vector, and the nodes recorded as 0 in m(v) are the strongly connected components with 1 node. The Algebraic FW-BW algorithm module uses the Algebraic FW-BW algorithm based on algebraic breadth-first search to find the maximum strongly connected component in a graph represented by a reconstructed adjacency matrix. The algebraic label propagation algorithm module uses a matrix multiplication-based algebraic label propagation algorithm to find strongly connected components in a graph represented by an adjacency matrix. The webpage ranking module reconstructs graph G0 by compressing nodes belonging to the same strongly connected component into a super node, generating new edges based on the edge relationships between strongly connected components, and obtaining a directed acyclic graph G1, which is stored in the form of an adjacency matrix. The PM algorithm is used to calculate personalized webpage rankings on the directed acyclic graph, and the size of each webpage ranking value indicates the degree of association between the webpage and the initial webpage set.

8. A personalized webpage ranking system based on linear algebra according to claim 7, characterized in that, The graph adjacency matrix construction module specifically implements the following steps: S101: Input webpage set V, webpage link relationships, starting webpage set V0, and the number of clicks on webpages in V0 L = {(v,l v )|v∈V0};l v The number of clicks on webpage v; the initial webpage set V0 contains n webpages; S102: Construct graph G0 based on the input webpage set V and the webpage link relationship, and mark the nodes corresponding to V0; S103: Calculate the initial probability P of the starting page based on the number of clicks on the page = {(v, p...} v )|v∈V0}, l u p represents the number of clicks on webpage u; v Let v be the initial probability of webpage v; S104: Generate a sparse matrix FW based on graph G0, which is the graph adjacency matrix. The transpose of FW is BW. Store FW and BW in a sparse compressed matrix format.

9. A personalized webpage ranking system based on linear algebra according to claim 8, characterized in that, The reconstruction module specifically implements the following steps: S201: Use a vector of all ones to perform sparse matrix multiplication with FW and BW respectively. The results are the in-degree f(v) and out-degree b(v) of all nodes v in the input web page set V. Record whether f(v) and b(v) are 0 using a Boolean vector. S202: Vector addition of f(v) and b(v) based on algebraic primitives, i.e., m(v) = f(v) && b(v); m(v) is a label vector, and the nodes recorded as 0 in m(v) are the strongly connected components with 1 node. S203: Multiply m(v) by FW and BW respectively, calculate whether the in-degree and out-degree f(v) and b(v) of the remaining nodes where m(v) is 1 are 0 and record them using a Boolean vector; S204: Repeat S202 and S203 until m(v) no longer changes; S205: Record the strongly connected component ID corresponding to the node that is recorded as 0 in m(v) as its own node number; S206: Traverse all edges (i,j) in FW and BW, where i and j are nodes, and keep only the edges that satisfy m(i) = 1 && m(j) = 1, that is, remove the strongly connected components with 1 node from the graph, and obtain the graph after removing the strongly connected components.

10. A personalized webpage ranking system based on linear algebra according to claim 9, characterized in that, The algebraic FW-BW algorithm module is implemented in the following steps: S301: Calculate the in-degree and out-degree of all nodes v in the input web page set V and multiply them to obtain the vector n(v); S302: Sort n(v) and find the largest n(v0); S303: Starting from v0, perform an algebraic breadth-first search based on the adjacency matrix FW to obtain the BFS tree B; S304: Starting from v0, perform an algebraic breadth-first search based on the adjacency matrix BW to obtain the BFS tree F; S305: The intersection S of B and F is the strongly connected component S where v0 is located. Remove the nodes in S from FW and BW. The algebraic label propagation algorithm module is implemented in the following steps: S401: Node v is assigned the value minf(v) = v, and minf(v) is transmitted to its reachable neighbor nodes using matrix multiplication. The node updates minf(v) with the received minimum value. This process is repeated until minf(v) is no longer updated. S402: Assign the value minb(v) = v to the node v that satisfies minf(v) = v, and transmit minb(v) to its neighboring nodes that are reachable from itself using matrix multiplication. The node updates its own minb(v) to the received minimum value. Repeat this process until minb(v) is no longer updated. S403: Mark the strongly connected component ID of a group of nodes where minf(v) = minb(v) = u as u, and remove them from FW and BW; S404: Repeat S401, S402, and S403 until FW and BW are empty; The webpage ranking module is implemented using the following steps: S501: Reconstruct graph G0 by compressing nodes belonging to the same strongly connected component into a super node, generating new edges based on the edge relationships between strongly connected components, and obtaining a directed acyclic graph G1, which is stored in the form of an adjacency matrix. S502: Record the strongly connected component containing the node in V0 as the starting component, and obtain the corresponding starting component set V1 in G1; S503: Perform algebraic breadth-first search on each node in V1, and then find the union of all the breadth-first search trees to obtain the component reachable subgraph G2. S504: Based on the correspondence between nodes in G2 and G0, G0 is reconstructed to obtain the reachable subgraph G3; S505: Calculate the personalized network ranking vector of V0 on G3 using the PM algorithm. S506: Utilization Calculate the personalized network ranking of V0 Where 0 is the zero vector, and its dimension is the number of nodes in the unreachable subgraph G0\G3 of V0.

Citation Information

Patent Citations

  • Differentiation webpage ranking method based on PageRank

    CN108460158A

  • Quick retrieval method and system for personalized webpage ranking on uncertain graph

    CN114861058A