Policy recommendation method, system and device based on dynamic graph node similarity and storage medium

By improving the Jaccard algorithm and incremental calculation method, the similarity of dynamic graph nodes is updated in real time, the problem of resource waste in traditional systems when the dynamic graph structure changes is solved, and the efficiency and accuracy of policy recommendations are improved.

CN118885667AInactive Publication Date: 2024-11-01YANGZHOU UNIV
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411055462.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-02
Publication Date
2024-11-01
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Traditional policy recommendation systems are difficult to adapt to the processing needs of large-scale dynamic graph structure data, especially when the graph structure changes, it is necessary to recalculate the similarity value of the entire graph node, resulting in waste of resources and inefficiency.

Method used

Using the incremental graph node similarity calculation method based on the improved Jaccard algorithm, the nodes and edge changes in the policy knowledge graph are monitored in real time, and only the affected parts of the similarity are updated, and the policy knowledge graph is constructed through keyword extraction and natural language processing technology. , divide policy nodes and related nodes, and calculate similarity based on weights.

Benefits of technology

It has achieved real-time and efficient update of similarities between policies under frequent changes in policy information, improving the timeliness and relevance of policy recommendations, and avoiding waste of resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118885667A_ABST
    Figure CN118885667A_ABST
Patent Text Reader

Abstract

The invention discloses a policy recommendation method, system and device based on dynamic graph node similarity and a storage medium. The method comprises the steps that policy information is acquired from a website; extracting a plurality of keywords from the policy text in each piece of policy information by using a keyword extraction method, and constructing a policy knowledge graph; initializing a graph node matrix of the policy knowledge graph, dividing nodes into policy nodes and related nodes, and calculating the similarity between the policy nodes by using an improved Jaccard algorithm; changes of nodes and edges in the policy knowledge graph are monitored in real time, an incremental graph node similarity calculation method is adopted, the similarity of newly added nodes is independently calculated according to original nodes, node similarity information is updated and stored, and updating of the policy knowledge graph is completed; recommending related policies to the user based on the policy knowledge graph according to policy information or keywords browsed by the user; the policy recommendation efficiency and accuracy can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a policy recommendation method, system, device and storage medium, and in particular to a policy recommendation method, system, device and storage medium based on dynamic graph node similarity, belonging to the field of computer technology. Background Art

[0002] Policy recommendation systems need to provide decision support based on large amounts of complex and dynamically changing data. Traditional recommendation systems are often based on static data or simple statistical models, which are difficult to adapt to the processing requirements of large-scale dynamic graph structure data. At present, graph node similarity algorithms can solve the similarity calculation problem of static graphs to a certain extent, but their application to dynamic graphs is still insufficient. If the similarity value of the entire graph node needs to be recalculated every time the graph structure changes, it will lead to a lot of resource waste. The Jaccard algorithm is a simple and effective algorithm for measuring the similarity of two sets. It determines their similarity by comparing the size of the intersection and union of two sets. It only considers the existence of elements in the two sets and ignores the weight of the elements in the sets. Summary of the invention

[0003] Purpose of the invention: The purpose of the present invention is to provide a policy recommendation method, system, device and storage medium based on dynamic graph node similarity that can improve recommendation efficiency and accuracy.

[0004] Technical solution: The policy recommendation method based on dynamic graph node similarity described in the present invention includes:

[0005] (1) Obtaining policy information from a website, wherein the policy information includes the policy text;

[0006] (2) Use keyword extraction methods to extract several keywords from the policy text in each policy information and construct a policy knowledge graph;

[0007] (3) Initialize the graph node matrix of the policy knowledge graph, divide the nodes into policy nodes and related nodes, pre-set weights according to the relationship between policy nodes and related nodes, and use the improved Jaccard algorithm to calculate the similarity between policy nodes;

[0008] (4) Monitor the changes of nodes and edges in the policy knowledge graph in real time. When new nodes and edges are detected, mark the affected original nodes and edges, use the incremental graph node similarity calculation method to calculate the similarity of the new nodes based on the original nodes, update and save the node similarity information, and complete the update of the policy knowledge graph;

[0009] (5) Recommend relevant policies to users based on the policy knowledge graph and policy information or keywords that users have browsed.

[0010] Furthermore, the policy information in step (1) also includes the policy title, policy release time and policy release department.

[0011] Furthermore, the keyword extraction method in step (2) is TF-IDF or TextRank or LDA.

[0012] Furthermore, the types of related nodes of the policy knowledge graph include keywords, release time and release department, and the edges of the policy knowledge graph represent the relationship between policy nodes and related nodes.

[0013] Furthermore, in step (3), the improved Jaccard algorithm is used to calculate the similarity between policy nodes, specifically:

[0014]

[0015] Where u and v represent policy nodes, q represents related nodes directly connected to the policy node, N(u) represents the set of related nodes directly connected to the policy node u, N(v) represents the set of related nodes directly connected to the policy node v, w(u, q) represents the weight of the edge between nodes u and q, and w(v, q) represents the weight of the edge between nodes v and q.

[0016] Furthermore, in step (4), the incremental graph node similarity calculation method is used to calculate the similarity of the newly added nodes separately based on the original nodes, specifically:

[0017] (41) marking newly added nodes and edges in the graph;

[0018] (42) For newly added nodes, the following formula is used to calculate the similarity between the newly added nodes and the existing nodes:

[0019]

[0020] δ i and δ u Represent the increment of the weight sum of intersection and union respectively;

[0021] (43) Update and save the node similarity information to complete the update of the policy knowledge graph.

[0022] Furthermore, the step (5) is specifically as follows:

[0023] Obtain the graph node information of the policy from the policy knowledge graph based on the browsed policy information, return the node information related to the policy node, recommend it to the user in descending order of relevance, and save the user's newly browsed information;

[0024] According to the keyword information searched by the user, the graph node information of the keyword is obtained from the policy knowledge graph, and the policy graph node information related to the keyword and the policy graph node information similar to the policy graph node information are returned, and recommended to the user in descending order of similarity.

[0025] Based on the same inventive concept, the present invention also provides a policy recommendation system based on dynamic graph node similarity, comprising:

[0026] An information collection module, used to obtain policy information from a website, wherein the policy information includes the policy text;

[0027] A graph construction module is used to extract a number of keywords from the policy text in each policy information using a keyword extraction method and construct a policy knowledge graph;

[0028] The calculation module is used to initialize the graph node matrix of the policy knowledge graph, divide the nodes into policy nodes and related nodes, pre-set weights according to the relationship between policy nodes and related nodes, and use the improved Jaccard algorithm to calculate the similarity between policy nodes;

[0029] The incremental update module is used to monitor the changes of nodes and edges in the policy knowledge graph in real time. When new nodes and edges are monitored, the affected original nodes and edges are marked, and the incremental graph node similarity calculation method is used to calculate the similarity of the new nodes based on the original nodes. The node similarity information is updated and saved to complete the update of the policy knowledge graph.

[0030] The recommendation module is used to recommend relevant policies to users based on the policy knowledge graph according to the policy information or keywords that the users have browsed.

[0031] Based on the same inventive concept, the present invention also provides a computing device, comprising: one or more processors, one or more memories and one or more programs, wherein the programs are stored in the memories and configured to be executed by the processors, and when the programs are loaded into the processors, the steps of the policy recommendation method based on dynamic graph node similarity as described in any one of the above items are implemented.

[0032] Based on the same inventive concept, the present invention also provides a storage medium, which stores a computer program, and the computer program includes program instructions. When the program instructions are executed by a processor, the processor executes the steps of the policy recommendation method based on dynamic graph node similarity according to any of the above items.

[0033] Beneficial effects: Compared with the prior art, the present invention takes policy recommendation as the implementation environment. When the nodes and edges in the policy knowledge graph change, an incremental similarity calculation method is adopted to update only the similarity of the affected part, avoiding recalculating the similarity of the entire graph. This process can update the similarity between policies in real time and efficiently when policy information changes frequently, provide accurate policy recommendations, and improve the timeliness and relevance of policy recommendations. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 The present invention is a flow chart of the method. DETAILED DESCRIPTION

[0035] The technical solution of the present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0036] As attached Figure 1 As shown, the policy recommendation method based on dynamic graph node similarity of this embodiment includes:

[0037] (1) Obtaining policy information from a website, wherein the policy information includes the policy text;

[0038] (2) Use keyword extraction methods to extract several keywords from the policy text in each policy information and construct a policy knowledge graph;

[0039] (3) Initialize the graph node matrix of the policy knowledge graph, divide the nodes into policy nodes and related nodes, pre-set weights according to the relationship between policy nodes and related nodes, and use the improved Jaccard algorithm to calculate the similarity between policy nodes;

[0040] (4) Monitor the changes of nodes and edges in the policy knowledge graph in real time. When new nodes and edges are detected, mark the affected original nodes and edges, use the incremental graph node similarity calculation method to calculate the similarity of the new nodes based on the original nodes, update and save the node similarity information, and complete the update of the policy knowledge graph;

[0041] (5) Recommend relevant policies to users based on the policy knowledge graph and policy information or keywords that users have browsed.

[0042] Specifically, step (1) obtains policy information from government websites;

[0043] In this embodiment, policy information is crawled from the government website through crawler software to obtain policy information, including policy title, policy text, policy release time, and policy release department. For example: Title information: "Opinions of the Municipal Government on Implementing Employment Priority Policies and Further Stabilizing Employment", policy release time: 2020-8-5, policy release department: Municipal People's Government.

[0044] Step (2) extract 5 keywords from each policy text using the keyword extraction method based on the policy text information and construct a policy knowledge graph;

[0045] In this embodiment, a keyword extraction method, such as a natural language processing technology such as a TF_IDF algorithm, a TextRank algorithm, or an LDA algorithm, is used to extract 5 keywords from the policy text information. For example, five keywords are extracted from the "Implementation Opinions of the Municipal Government on Implementing Employment Priority Policies and Further Doing a Good Job in Stabilizing Employment": employment, entrepreneurship, enterprises, graduates, and subsidies, and the policy title information, keyword information, policy release time, and policy release department information are used to construct a knowledge graph. The node types in the graph include policies, keywords, release time, and release departments. The edges represent the relationship between the policy nodes and the remaining nodes. For example, the release time of the policy "Implementation Opinions of the Municipal Government on Implementing Employment Priority Policies and Further Doing a Good Job in Stabilizing Employment" is 2020-8-5, then the release time node named 2020-8-5 is directly connected to the policy title node named "Implementation Opinions of the Municipal Government on Implementing Employment Priority Policies and Further Doing a Good Job in Stabilizing Employment". A policy title node is connected to at most one release time node, five keyword nodes, and one release department. Release time nodes, keyword nodes, and release department nodes can only be connected to policy nodes, and at least one policy title node.

[0046] Step (3) Initialize the graph node matrix of the policy knowledge graph, set weights according to the relationship between policy nodes and related nodes, and use the improved Jaccard algorithm to calculate the policy node similarity;

[0047] In this embodiment, the graph node matrix is ​​initialized by using the node data in the knowledge graph. For example, there are M nodes in the policy knowledge graph, and node 1 is a policy node connected to node 2, a keyword node. In the M×M matrix, the data in the first row and second column is α. According to the above steps, the remaining edges are assigned values ​​to the matrix in turn according to the formula to complete the matrix initialization. The graph node matrix is ​​used to calculate the relevance of the policy node, as shown below:

[0048]

[0049] Among them, u and v represent policy nodes, q represents related nodes directly connected to the policy node, N(u) represents the set of related nodes directly connected to the policy node u, N(v) represents the set of related nodes directly connected to the policy node v, w(u, q) represents the weight of the edge between nodes u and q, and w(v, q) represents the weight of the edge between nodes v and q; and it is saved as an N×3 matrix, the first and second columns represent policy nodes, and the third column represents similarity.

[0050] Step (4) monitors the changes of nodes and edges in the graph in real time. When the graph changes, the affected nodes and edges are marked, and an incremental graph node similarity calculation method is used to calculate the node similarity based on the existing nodes.

[0051] In this embodiment, when an existing node is modified in the graph, the affected nodes and edges are marked, and the similarity between the modified node and the original node is calculated using the following formula:

[0052]

[0053] δ i and δ u Represent the changes in the weights and sums of the intersection and union respectively.

[0054] In this embodiment, when a new node is added to the graph, the affected nodes and edges are marked, and weights are assigned to the newly added edges: the weight is set to α for the edge between the policy node and each keyword node, the weight is set to β for the edge between the policy node and the release time node, and the weight is set to γ ​​for the edge between the policy node and the release department node.

[0055] Update and save the graph node similarity information. In this embodiment, the graph node similarity information is an N×3 matrix.

[0056] Step (5) recommends relevant policies to the user based on the policy information or keywords that the user has browsed.

[0057] In this embodiment, according to the policy information that the user has browsed or the keywords that the user has searched, recommending relevant policies to the user includes: obtaining the graph node information of the policy from the graph according to the browsed policy information, returning the remaining node information related to the policy node, recommending to the user in descending order of relevance, and saving the user's newly browsed information. For example, if the user has browsed the graph node number a of the policy information, the remaining graph node information similar to number a and the relevance between node a and the remaining similar nodes are screened in the graph, and recommended to the user in descending order of similarity, and saving the user's new browsing record; according to the keyword information searched by the user, obtaining the graph node information of the keyword from the graph, returning the policy graph node information related to the keyword, and the policy graph node information similar to the policy graph node information, and recommending to the user in descending order of similarity. For example, if the user searches for the keyword employment and its graph node number is b, the policy node information directly connected to number b is screened in the graph, and is recommended to the user first, and other policies similar to the priority recommended policies are recommended.

[0058] Based on the same inventive concept, the present invention also provides a policy recommendation system based on dynamic graph node similarity, comprising:

[0059] An information collection module, used to obtain policy information from a website, wherein the policy information includes the policy text;

[0060] A graph construction module is used to extract a number of keywords from the policy text in each policy information using a keyword extraction method and construct a policy knowledge graph;

[0061] The calculation module is used to initialize the graph node matrix of the policy knowledge graph, divide the nodes into policy nodes and related nodes, pre-set weights according to the relationship between policy nodes and related nodes, and use the improved Jaccard algorithm to calculate the similarity between policy nodes;

[0062] The incremental update module is used to monitor the changes of nodes and edges in the policy knowledge graph in real time. When new nodes and edges are monitored, the affected original nodes and edges are marked, and the incremental graph node similarity calculation method is used to calculate the similarity of the new nodes based on the original nodes. The node similarity information is updated and saved to complete the update of the policy knowledge graph.

[0063] The recommendation module is used to recommend relevant policies to users based on the policy knowledge graph according to the policy information or keywords that the users have browsed.

[0064] Based on the same inventive concept, the present invention also provides a computing device, comprising: one or more processors, one or more memories and one or more programs, wherein the programs are stored in the memories and configured to be executed by the processors, and when the programs are loaded into the processors, the steps of the policy recommendation method based on dynamic graph node similarity as described in any one of the above items are implemented.

[0065] Based on the same inventive concept, the present invention also provides a storage medium, which stores a computer program, and the computer program includes program instructions. When the program instructions are executed by a processor, the processor executes the steps of the policy recommendation method based on dynamic graph node similarity according to any of the above items.

Claims

1. A policy recommendation method based on dynamic graph node similarity, characterized in that: include: (1) Obtaining policy information from a website, wherein the policy information includes the policy text; (2) Use keyword extraction methods to extract several keywords from the policy text in each policy information and construct a policy knowledge graph; (3) Initialize the graph node matrix of the policy knowledge graph, divide the nodes into policy nodes and related nodes, pre-set weights according to the relationship between policy nodes and related nodes, and use the improved Jaccard algorithm to calculate the similarity between policy nodes; (4) Monitor the changes of nodes and edges in the policy knowledge graph in real time. When new nodes and edges are detected, mark the affected original nodes and edges, use the incremental graph node similarity calculation method to calculate the similarity of the new nodes based on the original nodes, update and save the node similarity information, and complete the update of the policy knowledge graph; (5) Recommend relevant policies to users based on the policy knowledge graph and policy information or keywords that users have browsed.

2. The policy recommendation method based on dynamic graph node similarity according to claim 1 is characterized in that: The policy information in step (1) also includes the policy title, policy release time and policy release department.

3. The policy recommendation method based on dynamic graph node similarity according to claim 1 is characterized in that: The keyword extraction method in step (2) is TF-IDF or TextRank or LDA.

4. The policy recommendation method based on dynamic graph node similarity according to claim 1, characterized in that: The types of related nodes of the policy knowledge graph include keywords, release time and release department, and the edges of the policy knowledge graph represent the relationship between policy nodes and related nodes.

5. The policy recommendation method based on dynamic graph node similarity according to claim 1 is characterized in that: In step (3), the improved Jaccard algorithm is used to calculate the similarity between policy nodes, specifically: Where u and v represent policy nodes, q represents related nodes directly connected to the policy node, N(u) represents the set of related nodes directly connected to the policy node u, N(v) represents the set of related nodes directly connected to the policy node v, w(u, q) represents the weight of the edge between nodes u and q, and w(v, q) represents the weight of the edge between nodes v and q.

6. The policy recommendation method based on dynamic graph node similarity according to claim 1 is characterized in that: In step (4), the incremental graph node similarity calculation method is used to calculate the similarity of the newly added nodes based on the original nodes, specifically: (41) marking newly added nodes and edges in the graph; (42) For newly added nodes, the following formula is used to calculate the similarity between the newly added nodes and the existing nodes: δ i and δ u Represent the increment of the weight sum of intersection and union respectively; (43) Update and save the node similarity information to complete the update of the policy knowledge graph.

7. The policy recommendation method based on dynamic graph node similarity according to claim 1 is characterized in that: The step (5) is specifically as follows: Obtain the graph node information of the policy from the policy knowledge graph based on the browsed policy information, return the node information related to the policy node, recommend it to the user in descending order of relevance, and save the user's newly browsed information; According to the keyword information searched by the user, the graph node information of the keyword is obtained from the policy knowledge graph, and the policy graph node information related to the keyword and the policy graph node information similar to the policy graph node information are returned, and recommended to the user in descending order of similarity.

8. A policy recommendation system based on dynamic graph node similarity, characterized in that: include: An information collection module, used to obtain policy information from a website, wherein the policy information includes the policy text; A graph construction module is used to extract a number of keywords from the policy text in each policy information using a keyword extraction method and construct a policy knowledge graph; The calculation module is used to initialize the graph node matrix of the policy knowledge graph, divide the nodes into policy nodes and related nodes, pre-set weights according to the relationship between policy nodes and related nodes, and use the improved Jaccard algorithm to calculate the similarity between policy nodes; The incremental update module is used to monitor the changes of nodes and edges in the policy knowledge graph in real time. When new nodes and edges are monitored, the affected original nodes and edges are marked, and the incremental graph node similarity calculation method is used to calculate the similarity of the new nodes based on the original nodes. The node similarity information is updated and saved to complete the update of the policy knowledge graph. The recommendation module is used to recommend relevant policies to users based on the policy knowledge graph according to the policy information or keywords that the users have browsed.

9. A computing device, characterized in that include: One or more processors, one or more memories, and one or more programs, wherein the programs are stored in the memories and configured to be executed by the processors, and when the programs are loaded into the processors, the steps of the policy recommendation method based on dynamic graph node similarity according to any one of claims 1 to 7 are implemented.

10. A storage medium, characterized in that: The storage medium stores a computer program, which includes program instructions. When the program instructions are executed by a processor, the processor executes the steps of the policy recommendation method based on dynamic graph node similarity according to any one of claims 1 to 7.

Citation Information

Cited By

  • Government affair digital human dynamic interaction method and system based on multi-modal large model

    CN120821813A