Government affair service item recommendation method and device based on graph attention mechanism

By constructing a multi-element heterogeneous graph of government services and utilizing a graph attention mechanism, the problem of insufficient utilization of multi-source data in government service recommendations was solved, generating accurate and interpretable recommendation results, and improving the efficiency and user experience of government services.

CN122133943APending Publication Date: 2026-06-02CHINESE ACAD OF SURVEYING & MAPPING

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
CHINESE ACAD OF SURVEYING & MAPPING
Filing Date
2026-01-07
Publication Date
2026-06-02

Smart Images

  • Figure CN122133943A_ABST
    Figure CN122133943A_ABST
Patent Text Reader

Abstract

This specification provides a method and apparatus for recommending government services based on a graph attention mechanism. The method includes: constructing a multi-element heterogeneous graph of government services based on comprehensive government service data; using an attention mechanism to perform representation learning on the nodes and relationships in the multi-element heterogeneous graph of government services to obtain high-quality vector representations of users and government service items; calculating the spatial reachability between users and government service items; calculating the comprehensive score of a target user for the government service items to be recommended based on the high-quality vector representations, the spatial reachability, and the preferences of similar user groups; ranking the government service items to be recommended based on the comprehensive score, and generating the final recommendation result of the government service items.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This document relates to the field of information recommendation technology, and in particular to a method and apparatus for recommending government service items based on graph attention mechanism. Background Technology

[0002] With the continuous development of digital and smart government services, users' demand for handling matters online through government service platforms is increasing. How to intelligently recommend the most suitable matters to users from among many government service items, combining users' basic attributes, historical behavior and geographical location, has become an important research direction for improving the efficiency of government services and user experience.

[0003] Existing methods for recommending government services mainly include rule-based matching and collaborative filtering. Rule-based matching typically relies on basic user information and pre-defined rules for service recommendations, lacking flexibility and unable to address the diverse needs of users. Collaborative filtering can utilize historical user behavior data to discover the preferences of similar user groups, thus achieving personalized recommendations. However, this method often relies only on a two-dimensional relationship between users and services, failing to fully leverage the multiple information elements and complex relationships within government service scenarios. Furthermore, some studies have attempted to incorporate spatial factors into the recommendation process, such as optimizing recommendations based on the geographical distance between users and government service centers. However, this approach lacks modeling of the dependencies between government services and the constraints between services and policies and regulations, resulting in shortcomings in the accuracy and interpretability of the recommendation results.

[0004] In summary, existing technologies for recommending government services suffer from the following problems: 1. They focus only on the single relationship between users and services, failing to fully utilize the multi-element and multi-relationship characteristics of government service data; 2. They lack modeling of heterogeneous relationships such as service-department, service-policy, and service-service dependencies, making it difficult for recommendation results to reflect the government logic such as processing conditions, prerequisites, and integrated processing models (e.g., low-income applications require meeting income standards, and business tax registration requires prior business registration), leading to a disconnect between recommendation results and actual government processes, affecting accuracy and usability; 3. The introduction of spatial factors is relatively simple, failing to fully reflect the differences in the processing scope of different services. In fact, the spatial attributes of government service services vary: some services have strict requirements on the location of processing, while others have achieved cross-provincial, cross-regional, and even nationwide processing. Therefore, differentiated spatial constraint modeling should be adopted for different types of services; otherwise, the recommendation results may not be optimal, affecting the rationality of actual processing and user experience; 4. The recommendations lack interpretability, making it difficult to clearly explain the reasons for the recommendations to users, affecting user trust and adoption.

[0005] Therefore, there is an urgent need for a method that can comprehensively utilize multi-source data to construct heterogeneous relationships and fully consider government service item recommendation under multiple spatial constraints, so as to improve the accuracy, rationality and interpretability of the recommendation results. Summary of the Invention

[0006] The purpose of this invention is to provide a method and apparatus for recommending government service items based on graph attention mechanism, in order to solve the above-mentioned problems in the prior art.

[0007] This invention provides a method for recommending government service items based on a graph attention mechanism, comprising: Construct a multi-element heterogeneous graph of government services based on comprehensive government service data; The attention mechanism is used to perform representation learning on the nodes and relationships in the heterogeneous graph of the government service multi-element, so as to obtain high-quality vector representations of users and government service items. Calculate the spatial reachability between users and government service items; Based on the high-quality vector representation, spatial accessibility, and similar user group preferences, calculate the target user's comprehensive score for the recommended government services. Based on the comprehensive score, the recommended government service items are ranked, and the final recommendation results for government service items are generated.

[0008] This invention provides a government service recommendation device based on a graph attention mechanism, comprising: The module is used to construct a multi-element heterogeneous graph of government services based on comprehensive government service data; The representation module is used to learn the representations of nodes and relationships in the heterogeneous graph of the multi-element government service using an attention mechanism, so as to obtain high-quality vector representations of users and government service items. The first calculation module is used to calculate the spatial reachability between users and government service items; The second calculation module is used to calculate the comprehensive score of the target user for the recommended government service items based on the high-quality vector representation, the spatial accessibility, and the preferences of similar user groups. The sorting module is used to sort the recommended government service items according to the comprehensive score and generate the final recommendation result of the government service items.

[0009] This invention also provides an electronic device, including: a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps of the above-described method for recommending government service items based on a graph attention mechanism.

[0010] This invention also provides a computer-readable storage medium storing an information transmission implementation program, which, when executed by a processor, implements the steps of the above-described method for recommending government service items based on a graph attention mechanism.

[0011] By constructing a multi-element heterogeneous graph of government services, combining multi-relationship representation learning with graph attention mechanism, and integrating spatial accessibility measurement, accurate and interpretable recommendation results are generated. This improves the accuracy, rationality, and interpretability of government service recommendations, thereby providing technical support for optimizing government service efficiency and enhancing user experience. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in one or more embodiments of this specification or in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 This is a flowchart of a government service recommendation method based on graph attention mechanism according to an embodiment of the present invention; Figure 2 This is a schematic diagram of a government service recommendation device based on graph attention mechanism according to an embodiment of the present invention; Figure 3 This is a schematic diagram of an electronic device according to an embodiment of the present invention. Detailed Implementation

[0014] To enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the technical solutions in one or more embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of the embodiments. Based on one or more embodiments of this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of this document.

[0015] Method Implementation Examples According to embodiments of the present invention, a method for recommending government service items based on a graph attention mechanism is provided. Figure 1 This is a flowchart of a government service recommendation method based on graph attention mechanism according to an embodiment of the present invention, such as... Figure 1As shown, the government service item recommendation method based on graph attention mechanism according to an embodiment of the present invention specifically includes: Step S101: Construct a multi-element heterogeneous graph of government services based on comprehensive government service data; specifically including: The various elements in the government service recommendation scenario are abstracted into different types of nodes, which specifically include: user, item, department, policy, location, and integrated service event; Determine the multi-type relationships between nodes of different types, including: user-item, item-department, item-policy, item-item dependency, item-location, and user-location; Attributes are defined for different types of nodes and multiple types of relationships. Node attributes include user profile tags, item tags, department categories, policy clause content, and geocoding; relationship attributes include interaction frequency, number of transactions, timestamps, spatial distance, or administrative division adjacency. Based on Formula 1, construct a heterogeneous graph of multiple elements of government services: Formula 1; Where V represents the set of nodes, including nodes of different types such as users, matters, departments, policies, locations, and integrated office events; E represents the set of edges, including multiple types of relationships such as user-matter, matter-department, matter-policy, matter-matter dependency, matter-location, and user-location; A represents the set of node attributes; and R represents the set of relationship types.

[0016] 4. Step S102: Utilize an attention mechanism to perform representation learning on the nodes and relationships in the heterogeneous graph of government services to obtain high-quality vector representations of users and government service items; specifically including: According to Formula 2, the graph attention mechanism (GAT) is used to learn the representations of nodes and relationships in the heterogeneous graph of government services to obtain high-quality vector representations of users and government service items. The graph attention mechanism is then used to weighted aggregate the features of the neighboring nodes of each node in the heterogeneous graph, where the importance of different neighboring nodes is determined by learnable attention weights. According to Formula 3, attention parameters are defined separately for each relationship type in the heterogeneous graph of government services. An attention mechanism is used to aggregate various relationships, incorporating timestamps, interaction frequency, or number of actions into the edge features as the basis for calculating attention weights in the attention mechanism. Relationship weights for each type of relationship are calculated during the aggregation process. Formula 2; in, For nodes The update representation, i.e., the target node The updated feature vector is used to integrate neighbor node and multi-relationship information. Neighbor node characteristics, representing the relationship with the node Connected neighbor nodes The input feature vector; This is a relation type used to identify nodes. With nodes Relationship types; This is a relation weight matrix, representing the relation type. The corresponding feature mapping matrix; Let be the set of edges, representing the set of all directed edges contained in the heterogeneous graph. Each edge is composed of triples Representation, i.e., node with neighboring nodes By relation type Connected; It is a non-linear activation function used to perform non-linear transformations on the aggregation results; Attention weights are used to measure attention across relation types. Next, neighboring nodes For the target node The extent of the impact; Formula 2; in, This is a relation-level attention parameter vector, representing a weighted combination of features for the attention score under each relation type r; The timestamp feature of the edge is used to reflect the temporal attributes of the interaction; The interaction frequency or number of actions of the edge is used to reflect the interaction intensity; || represents the vector concatenation operation, which introduces timestamp and interaction frequency features into the attention calculation; LeakyReLU(·) is a linear rectified activation function with leakage coefficient. It is a normalization operation; The node embedding vector is obtained through multi-layer attention propagation and aggregation. Embedded vectors of government service items ; The similarity between users is calculated based on the user profile, and regularization constraints are introduced to maintain the consistency of the embedding vector representation of similar users.

[0017] Step S103, calculate the spatial reachability between the user and the government service item; specifically including: According to formulas 3 and 4, the spatial accessibility between users and matters is calculated based on user location information and government service handling location information, wherein the spatial accessibility is used to constrain the rationality and feasibility of the recommendation; Formula 3; Formula 4; in, For user coordinates, The coordinates of the service hall; Let the triples from the edge set represent the events. With the service hall There is a relationship Here, "relationship" refers to matters. Can be found in the service hall Processing; Indicates the distance result. The attenuation coefficient is... This is a spatial accessibility weight, used to reflect the ease with which users can handle certain matters.

[0018] Step S104: Based on the high-quality vector representation, spatial reachability, and preferences of similar user groups, calculate the comprehensive score of the target user for the recommended government service item; specifically including: According to Formula 5, based on the high-quality vector representation, spatial accessibility, and similar user group preferences, the comprehensive score of the target user for the recommended government service item is calculated: Formula 5; From edge set , indicating user With matters Through relation types Connected, This represents attention weight, specifically referring to the user. With matters ; Represents a measure of spatial reachability; Indicates user With matters The following are the relevance scores: Each item The final embedded representation; This indicates a group-based signal enhancement based on similar users. , This indicates all matters that have been handled. m The user set, sim ( u , For users who have learned With users Similarity; Indicates user Regarding the matter The frequency of processing.

[0019] Step S105: Based on the comprehensive score, the recommended government service items are ranked, and a final recommendation result for the government service items is generated. Specifically, this includes: The recommended government service items are sorted from high to low according to their comprehensive scores, and the top N recommended government service items are selected as candidate recommendations. The candidate recommendation results are filtered and constrained according to the requirements for handling government services, eliminating items that users do not meet the conditions for handling, and prioritizing items that can be handled or can be handled online in the user's area, thus generating preliminary recommendation results.

[0020] The preliminary recommendation results are optimized for diversity to avoid recommending too many items on the same topic or from the same department; fairness is optimized to ensure that users from different groups or regions can obtain reasonably covered recommendation results; policy priority is optimized to increase the ranking weight of items related to people's livelihood or key policies, thus obtaining the final recommendation results and generating recommendation explanation information for the final recommendation results.

[0021] The technical solutions described above in the embodiments of the present invention will be explained in detail below.

[0022] The government service recommendation method based on graph attention mechanism provided in this embodiment of the invention specifically includes the following steps: Step 1: Construction of a heterogeneous graph of multiple elements of government services.

[0023] In this step, based on government service item data, user registration data, and user service behavior data, a multi-element heterogeneous graph is constructed, integrating users, items, departments, policies, locations, and integrated service events. The heterogeneous graph is formally defined as follows:

[0024] in, This represents a collection of nodes, including different types of nodes such as users, items, departments, policies, locations, and integrated office events; This represents a set of edges, encompassing various relationship types such as user-item, item-department, item-policy, item-item dependency, item-location, and user-location. Represents a collection of node attributes; This represents a set of relationship types. This modeling approach enables a unified representation of multi-element, multi-relationship information in government services.

[0025] Step 1 specifically includes: Node Construction: Multiple elements in the government service recommendation scenario are abstracted into different types of nodes, including: User nodes are formed from the registration information of natural persons or legal persons. Natural person nodes include attributes such as gender, age, occupation, place of residence, marital status, and geographical location; legal person nodes include attributes such as business scope, enterprise type, industry, enterprise size, and registered address. Item Node: Includes the attributes and service information of government service items, including item name, handling department, service recipients, handling location, handling conditions, item theme, handling process, handling time limit, user feedback rating, etc. Department node: The competent department or service agency representing the matter; Policy nodes: Represent the relevant laws, regulations, or policy provisions related to the matter; Location nodes: represent the geographical location of administrative divisions and government service centers; Integrated Office Event Nodes: These represent events related to user processing needs, such as integrated office processes and "one-stop services," as well as events throughout their entire lifecycle.

[0026] Relationship modeling: Introducing multiple types of relationships into heterogeneous graphs to maintain semantic differences between different features, including but not limited to: User-Item Relationship: This refers to the actions of a user in handling, consulting, making appointments, or saving items between the user and the item. Item-Department Relationship: Indicates the competent department for the item; Item-Policy Relationship: Indicates the legal, regulatory, or policy provisions upon which the item is based; Item-item dependency: Represents the dependency, precondition, postcondition, or similarity relationship between items; User-location relationship: indicates the administrative division or geographical location of the user; Item-Location Relationship: Indicates the geographical location of the government service center, self-service machine, or agency where the item can be processed; User-Event Relationship: Represents a user's potential service needs arising from a specific event.

[0027] Attribute definition: Attach attributes to nodes and relationships to enhance modeling effectiveness: Node attributes include user profile tags, item tags, department categories, policy clause content, and geocoding, etc. Relationship attributes include interaction frequency, number of transactions, timestamps, spatial distance, or adjacency of administrative divisions.

[0028] Through the above modeling steps, multi-source and multi-dimensional government service information is unified into a heterogeneous graph structure. This structure maintains the diversity of various elements and relationships, providing important input for subsequent graph attention mechanisms that can distinguish different relational semantics, thereby more accurately capturing the potential associations between users and matters.

[0029] Step 2: Attention representation of heterogeneous relationships in government services.

[0030] In this step, based on the heterogeneous graph of government services constructed in step 1, the graph attention mechanism (GAT) is used to learn the representations of nodes and their relationships to obtain high-quality vector representations of users and government service items. The core calculation process of the heterogeneous relationship attention representation of government services is shown in formula (1):

[0031] in: For nodes The update representation, i.e., the target node The updated feature vector is used to integrate neighbor nodes and multi-relationship information.

[0032] Neighbor node characteristics, representing the relationship with the node Connected neighbor nodes The input feature vector.

[0033] This is a relation type used to identify nodes. With nodes The relationships can be categorized into different types, such as "user-item," "item-policy," or "item-department." Different relationship types correspond to different semantic spaces, which are modeled separately in the model.

[0034] This is a relation weight matrix, representing the relation type. The corresponding feature mapping matrix is ​​used to map node features to a relation-specific semantic space. This is achieved by defining independent features for each relation. The model can adaptively learn the importance of various relationships to the final task.

[0035] Let be the set of edges, representing the set of all directed edges contained in the heterogeneous graph. Each edge is composed of triples Representation, i.e., node with neighboring nodes By relation type Connected; It is a non-linear activation function used to perform non-linear transformations on the aggregation results (such as ReLU, ELU, etc.) to enhance the model's expressive power and prevent linear feature degradation.

[0036] Attention weights are used to measure attention across relation types. Next, neighboring nodes For the target node The degree of impact. The calculation method is as follows:

[0037] in: This is a relation-level attention parameter vector, representing the parameters for each relation type. The feature weighted combination of attention scores; The timestamp feature of the edge is used to reflect the temporal attributes of the interaction; The frequency of interactions or the number of actions on the edge are used to reflect the intensity of the interaction; || represents the vector concatenation operation.

[0038] Introducing timestamps and interaction frequency features into attention computation allows the model to consider both static attributes and dynamic behaviors, thereby enhancing its ability to express relational semantics.

[0039] LeakyReLU(·) is a linear rectified activation function with a leakage coefficient.

[0040] It is a normalization operation.

[0041] Step 2 specifically includes the following processing: Neighbor information aggregation: For a target node (such as a user node or an event node), an attention mechanism is used to aggregate the features of its neighboring nodes in a weighted manner; the importance of different neighbors is determined by learnable attention weights, thereby avoiding noise interference caused by indiscriminate averaging.

[0042] Relationship-level attention modeling: In heterogeneous graphs, due to the existence of multiple relationship types (user-item, item-department, item-policy, etc.), attention parameters are defined separately for each relationship type, and the weights of each type of relationship are calculated separately during the aggregation process; then, the contributions of different relationships are integrated through a relationship-level attention mechanism to obtain a comprehensive representation of the target node.

[0043] Introduction of time and frequency features: Introduce attributes such as timestamps, interaction frequency, or number of behaviors into the features of the edges as inputs for attention weight calculation, thereby emphasizing recent user behavior and focusing on modeling high-frequency interaction relationships.

[0044] User and event representation generation: Through multi-layer attention propagation and aggregation, the embedding vector of user nodes is obtained. Embedding vectors of item nodes This vector can comprehensively reflect user profile information, behavior characteristics, and the relationship between the attributes of the matter and its context.

[0045] Similarity regularization (optional): During training, the similarity between users can be calculated based on the user profile and regularization constraints can be introduced to ensure that the embedding representations of similar users remain consistent, thereby further improving the personalization and rationality of recommendations.

[0046] Through the above representation process, differentiated modeling of multiple types of nodes and multiple types of relationships in the heterogeneous graph of government services is realized, enabling the model to adaptively distinguish the importance of different relationships and effectively capture the potential semantic associations between users and government service items.

[0047] Step 3, User-Event Space Reachability Measurement.

[0048] In this step, based on user location information and the location information for handling government services, the spatial accessibility between the user and the service is calculated to constrain the rationality and feasibility of the recommendations. Specifically, this includes:

[0049] in, For users coordinate, For the service hall The coordinates are all derived from the node attribute set A; Let the triples from the edge set represent the events. With the service hall There is a relationship Here, "relationship" refers to matters. Can be found in the service hall Processing.

[0050] The above distance results are converted into spatial reachability weights. This is used to reflect the ease with which users can handle certain matters.

[0051] in, This is the attenuation coefficient, used to control the impact of distance on accessibility.

[0052] By incorporating spatial factors into the government service recommendation model through the above steps, the recommendation results not only consider the semantic relevance between users and matters, but also take into account actual accessibility and ease of processing, thereby improving the practicality of the recommendation results and user satisfaction.

[0053] By incorporating spatial factors into the government service recommendation model through the above steps, the recommendation results not only consider the semantic relevance between users and matters, but also take into account actual accessibility and ease of processing, thereby improving the practicality of the recommendation results and user satisfaction.

[0054] Step 4: Calculate the recommended scores.

[0055] In this step, the target user is calculated by combining the user-item relevance score generated by the graph attention mechanism, the spatial accessibility weight between users and items, and the preferences of similar user groups. Treatment of Recommendations Overall score:

[0056] in, From edge set , indicating user With matters Through relation types Connected, This represents the attention weights, corresponding to those in step 2. This specifically refers to users. With matters ; The spatial reachability metric is derived from step 3; This represents the adjustment parameter used to balance the group enhancement signal with the individual correlation; Indicates user With matters The relevance score is calculated based on the embedding vector obtained in step 2, and takes the following form:

[0057] in Each item The final embedded representation; The signal is a group enhancement signal based on similar users, calculated using the following formula:

[0058] This indicates all matters that have been handled. Based on the user learned in step 2 With users The similarity (which can be calculated using cosine similarity); Indicates user Regarding the matter The frequency of processing (or binary indication).

[0059] Step 5: Generation and optimization of recommendation results.

[0060] In this step, the candidate government service items are ranked based on the comprehensive score obtained in step 4, and the final recommendation results are generated. Specifically, this includes: Sorting and filtering: Sort by comprehensive score from high to low, and select the top N items as candidate recommendations.

[0061] Business rule constraints: Based on the sorting, filtering and constraints are applied in conjunction with the requirements for handling government services, including: removing items that users do not meet the conditions for handling, and prioritizing the recommendation of items that can be handled or can be handled online in the user's area.

[0062] Results optimization: To improve user experience and fairness, the initial recommendation results are optimized, including diversity optimization, fairness optimization, and policy priority optimization.

[0063] Diversity optimization: Avoid recommending too many items on the same topic or from the same department; Fairness optimization: Ensure that users from different groups or regions receive recommendation results with reasonable coverage; Policy Priority Optimization: Increase the ranking weight of matters involving people's livelihood or key policy issues.

[0064] Explanatory information generation: Based on the attention mechanism, weights and heterogeneous relationship paths are used to generate recommended explanatory information.

[0065] By following the steps above, we can ensure that the recommended results are not only accurate and personalized, but also interpretable and practically feasible, thereby increasing users' trust in and usage of the government service recommendation system.

[0066] In summary, this invention addresses the problems of existing government service recommendation methods, such as the lack of multi-source information heterogeneous relationship modeling, the simplistic representation of spatial factors, and insufficient interpretability of results. By constructing a multi-element heterogeneous graph of government services, combining multi-relationship representation learning with graph attention mechanism, and integrating spatial accessibility measurement, it generates accurate and interpretable recommendation results. This improves the accuracy, rationality, and interpretability of government service recommendations, thereby providing technical support for optimizing government service efficiency and enhancing user experience.

[0067] Device Example 1 According to embodiments of the present invention, a government service recommendation device based on a graph attention mechanism is provided. Figure 2 This is a schematic diagram of a government service recommendation device based on a graph attention mechanism according to an embodiment of the present invention, such as... Figure 2 As shown, the government service recommendation device based on graph attention mechanism according to an embodiment of the present invention specifically includes: Module 20 is used to construct a multi-element heterogeneous graph of government services based on comprehensive government service data; The representation module 22 is used to perform representation learning on the nodes and relationships in the heterogeneous graph of the government service multi-element using an attention mechanism, so as to obtain high-quality vector representations of users and government service items. The first calculation module 24 is used to calculate the spatial reachability between users and government service items; The second calculation module 26 is used to calculate the comprehensive score of the target user for the recommended government service items based on the high-quality vector representation, the spatial accessibility, and the preferences of similar user groups. The sorting module 28 is used to sort the recommended government service items according to the comprehensive score and generate the final recommendation result of the government service items.

[0068] The embodiments of the present invention are device embodiments corresponding to the above method embodiments. The specific operation of each module can be understood with reference to the description of the method embodiments, and will not be repeated here.

[0069] Device Example 2 This invention provides an electronic device, such as... Figure 3 As shown, it includes: a memory 30, a processor 32, and a computer program stored in the memory 30 and executable on the processor 32, wherein the computer program, when executed by the processor 32, performs the steps as described in the method embodiment.

[0070] Device Example 3 This invention provides a computer-readable storage medium storing an information transmission implementation program, which, when executed by a processor 32, performs the steps described in the method embodiment.

[0071] The computer-readable storage media described in this embodiment include, but are not limited to, ROM, RAM, disk, or optical disk.

[0072] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for recommending government service items based on graph attention mechanism, characterized in that, include: Construct a multi-element heterogeneous graph of government services based on comprehensive government service data; The attention mechanism is used to perform representation learning on the nodes and relationships in the heterogeneous graph of the government service multi-element, so as to obtain high-quality vector representations of users and government service items. Calculate the spatial reachability between users and government service items; Based on the high-quality vector representation, spatial accessibility, and similar user group preferences, calculate the target user's comprehensive score for the recommended government services. Based on the comprehensive score, the recommended government service items are ranked, and the final recommendation results for government service items are generated.

2. The method according to claim 1, characterized in that, Constructing a multi-element heterogeneous graph of government services based on comprehensive government service data specifically includes: The various elements in the government service recommendation scenario are abstracted into different types of nodes, which specifically include: user, item, department, policy, location, and integrated service event; Determine the multi-type relationships between nodes of different types, including: user-item, item-department, item-policy, item-item dependency, item-location, and user-location; Attributes are defined for different types of nodes and multiple types of relationships. Node attributes include user profile tags, item tags, department categories, policy clause content, and geocoding; relationship attributes include interaction frequency, number of transactions, timestamps, spatial distance, or administrative division adjacency. Based on Formula 1, construct a heterogeneous graph of multiple elements of government services: Official 1; Where V represents the set of nodes, including nodes of different types such as users, matters, departments, policies, locations, and integrated office events; E represents the set of edges, including multiple types of relationships such as user-matter, matter-department, matter-policy, matter-matter dependency, matter-location, and user-location; A represents the set of node attributes; and R represents the set of relationship types.

3. The method according to claim 1, characterized in that, The method of using an attention mechanism to learn representations of nodes and relationships in the heterogeneous graph of multi-element government services, and obtaining high-quality vector representations of users and government service items, specifically includes: According to Formula 2, the graph attention mechanism (GAT) is used to learn the representations of nodes and relationships in the heterogeneous graph of government services to obtain high-quality vector representations of users and government service items. The graph attention mechanism is then used to weighted aggregate the features of the neighboring nodes of each node in the heterogeneous graph, where the importance of different neighboring nodes is determined by learnable attention weights. According to Formula 3, attention parameters are defined separately for each relationship type in the heterogeneous graph of government services. An attention mechanism is used to aggregate various relationships, incorporating timestamps, interaction frequency, or number of actions into the edge features as the basis for calculating attention weights in the attention mechanism. Relationship weights for each type of relationship are calculated during the aggregation process. Official 2; in, For nodes The update representation, i.e., the target node The updated feature vector is used to integrate neighbor node and multi-relationship information. The neighbor node features represent the relationship with the node. Connected neighbor nodes The input feature vector; This is a relation type used to identify nodes. With nodes Relationship types; This is a relation weight matrix, representing the relation type. The corresponding feature mapping matrix; Let be the set of edges, representing the set of all directed edges contained in the heterogeneous graph. Each edge is composed of triples Representation, i.e., node with neighboring nodes By relation type Connected; It is a non-linear activation function used to perform non-linear transformations on the aggregation results; Attention weights are used to measure attention across relation types. Next, neighboring nodes For the target node The extent of the impact; Official 2; in, This is a relation-level attention parameter vector, representing a weighted combination of features for the attention score under each relation type r; The timestamp feature of the edge is used to reflect the temporal attributes of the interaction; The interaction frequency or number of actions of the edge is used to reflect the interaction intensity; || represents the vector concatenation operation, which introduces timestamp and interaction frequency features into the attention calculation; LeakyReLU(·) is a linear rectified activation function with leakage coefficient. It is a normalization operation; The node embedding vector is obtained through multi-layer attention propagation and aggregation. Embedded vectors of government service items ; The similarity between users is calculated based on the user profile, and regularization constraints are introduced to maintain the consistency of the embedding vector representation of similar users.

4. The method according to claim 1, characterized in that, Calculating the spatial accessibility between users and government services specifically includes: According to formulas 3 and 4, the spatial accessibility between users and matters is calculated based on user location information and government service handling location information, wherein the spatial accessibility is used to constrain the rationality and feasibility of the recommendation; Official 3; Official 4; in, For user coordinates, The coordinates of the service hall; Let the triples from the edge set represent the events. With the service hall There is a relationship Here, "relationship" refers to matters. Can be found in the service hall Processing; Indicates the distance result. The attenuation coefficient is... This is a spatial accessibility weight, used to reflect the ease with which users can handle certain matters.

5. The method according to claim 1, characterized in that, Based on the high-quality vector representation, spatial accessibility, and preferences of similar user groups, the comprehensive score for the target user regarding the recommended government services is calculated, specifically including: According to Formula 5, based on the high-quality vector representation, spatial accessibility, and similar user group preferences, the comprehensive score of the target user for the recommended government service item is calculated: Official 5; From edge set , indicating user With matters Through relation types Connected, This represents attention weight, specifically referring to the user. With matters ; Represents a measure of spatial reachability; This represents the adjustment parameter used to balance the group enhancement signal with the individual correlation; Indicates user With matters The following are the relevance scores: Each item The final embedded representation; This indicates a group-based signal enhancement based on similar users. , This indicates all matters that have been handled. m The user set, sim ( u , For users who have learned With users Similarity; Indicates user Regarding the matter The frequency of processing.

6. The method according to claim 1, characterized in that, Based on the comprehensive score, the recommended government service items are ranked, and the final recommendation results for government service items are generated, specifically including: The recommended government service items are sorted from high to low according to their comprehensive scores, and the top N recommended government service items are selected as candidate recommendations. The candidate recommendation results are filtered and constrained according to the requirements for handling government services, eliminating items that users do not meet the conditions for handling, and prioritizing items that can be handled or can be handled online in the user's area, thus generating preliminary recommendation results.

7. The method according to claim 6, characterized in that, The method further includes: The preliminary recommendation results are optimized for diversity to avoid recommending too many items on the same topic or from the same department; fairness is optimized to ensure that users from different groups or regions can obtain reasonably covered recommendation results; policy priority is optimized to increase the ranking weight of items related to people's livelihood or key policies, thus obtaining the final recommendation results and generating recommendation explanation information for the final recommendation results.

8. A government service recommendation device based on graph attention mechanism, characterized in that, include: The module is used to construct a multi-element heterogeneous graph of government services based on comprehensive government service data; The representation module is used to learn the representations of nodes and relationships in the heterogeneous graph of the multi-element government service using an attention mechanism, so as to obtain high-quality vector representations of users and government service items. The first calculation module is used to calculate the spatial reachability between users and government service items; The second calculation module is used to calculate the comprehensive score of the target user for the recommended government service items based on the high-quality vector representation, the spatial accessibility, and the preferences of similar user groups. The sorting module is used to sort the recommended government service items according to the comprehensive score and generate the final recommendation result of the government service items.

9. An electronic device, characterized in that, include: The memory, the processor, and the computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the steps of the government service item recommendation method based on the graph attention mechanism as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores an implementation program for information transmission, which, when executed by a processor, implements the steps of the government service item recommendation method based on graph attention mechanism as described in any one of claims 1 to 7.