AI-based methods and systems for grassroots governance and smart community services
By constructing a knowledge graph of grassroots governance for semantic similarity matching and conflict detection, structured demand graph fragments are generated. Combined with forward and reverse traversal mechanisms, the problem that existing grassroots governance and community intelligent service systems cannot simultaneously take into account policy compliance and implementation feasibility is solved, and a community service strategy with self-consistent logic and feasible implementation conditions is generated.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- 江苏图治信息科技有限公司
- Filing Date
- 2026-02-09
- Publication Date
- 2026-06-30
AI Technical Summary
Existing grassroots governance and community smart service systems are unable to effectively identify potential conflicts between different policies, resulting in problems with the policy compliance and feasibility of the generated community service strategies, failing to balance both aspects.
By acquiring multimodal interaction data and resource status data from community users, AI is used to construct a knowledge graph for grassroots governance. Semantic similarity matching and conflict detection are performed to generate structured demand graph fragments. A forward traversal is conducted along the inheritance and reference relationships of policy entity nodes to generate a preliminary service strategy set. Then, a reverse traversal is conducted through the association relationship between responsible entities and resource nodes to select the optimal service strategy.
It has achieved a community service strategy that generates logically consistent and feasible implementation, ensuring that the strategy meets policy compliance and execution feasibility, and solving the problem that existing technologies cannot take into account both policy compliance and execution feasibility.
Smart Images

Figure CN122309772A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of artificial intelligence technology, and in particular to an AI-based method and system for grassroots governance and intelligent community services. Background Technology
[0002] Currently, for grassroots governance and community services, existing intelligent service systems typically use natural language processing (NLP) technology to extract keywords or classify intents from user-submitted voice or text information. They then use rule engines or retrieval models to match corresponding service terms or procedures from a pre-built government knowledge base and directly provide the matching results to the user. However, this existing approach relies heavily on predefined rules or shallow semantic similarity calculations, essentially operating on a static database-based "query-feedback" model. Because existing technologies only focus on textual relevance in their matching strategies, the system cannot effectively identify potential conflicts between different policies (such as overlapping jurisdictions or policy exclusions) when generating service plans. Furthermore, it cannot perform reverse verification of the plan's feasibility based on the community's current real-time personnel and material resources. This results in logically contradictory recommended strategies or failure to be implemented due to resource constraints.
[0003] Therefore, the community service strategies generated by existing grassroots governance and smart community service solutions cannot simultaneously ensure policy compliance and feasibility of implementation, resulting in poor service effectiveness for community users. Summary of the Invention
[0004] This invention provides an AI-based method and system for grassroots governance and intelligent community services, which can generate effective community service strategies that balance policy compliance and feasibility of implementation, thereby improving the service effect for community users.
[0005] One embodiment of the present invention provides an AI-based method for grassroots governance and intelligent community services, comprising: Acquire multimodal interaction data of community users and resource status data of the community; The multimodal interaction data is identified, multiple semantic fragments are extracted, and a semantic understanding result of the service needs of the community users is obtained. Each semantic fragment in the semantic understanding result is matched with the policy entity nodes in the constructed grassroots governance knowledge graph for semantic similarity and conflict detection, and the policy association and conflict relationship between the semantic fragments are identified to obtain structured demand graph fragments; Based on the structured demand graph fragments, a forward traversal is performed in the grassroots governance knowledge graph along the inheritance and reference relationships of policy entity nodes to generate a preliminary service strategy set; Based on the structured demand graph fragment and the preliminary service strategy set, a reverse traversal is performed in the grassroots governance knowledge graph along the relationship between the responsible subject and the resource node. Resource constraint verification is performed on each preliminary service strategy in the preliminary service strategy set to obtain a set of candidate service strategies that pass the verification. Based on the resource status data provided by the community, the candidate service strategy set is reordered according to execution timeliness and resource conflict resolution is performed to select the optimal service strategy. Based on the optimal service strategy, generate and output structured service descriptions for the community users.
[0006] Another embodiment of the present invention provides an AI-based grassroots governance and community intelligent service system, comprising: The acquisition module is used to acquire multimodal interaction data of community users and resource status data of the community; The extraction module is used to identify the multimodal interaction data, extract multiple semantic fragments, and obtain the semantic understanding results of the service needs of the community users. The identification module is used to perform semantic similarity matching and conflict detection between each semantic fragment in the semantic understanding result and the policy entity nodes in the constructed grassroots governance knowledge graph, identify the policy association and conflict relationship between semantic fragments, and obtain structured demand graph fragments; The forward traversal module is used to perform forward traversal along the inheritance and reference relationships of policy entity nodes in the grassroots governance knowledge graph based on the structured demand graph fragments, and generate a preliminary service strategy set; The reverse traversal module is used to perform reverse traversal along the relationship between responsible entities and resource nodes in the grassroots governance knowledge graph based on the structured demand graph fragment and the preliminary service strategy set, and to verify the resource constraints of each preliminary service strategy in the preliminary service strategy set to obtain a set of candidate service strategies that have passed the verification. The filtering module is used to perform timeliness rearrangement and resource conflict resolution on the candidate service strategy set based on the resource status data of the community, and to filter out the optimal service strategy. The output module is used to generate and output structured service description content for the community users based on the optimal service strategy.
[0007] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: By identifying multimodal interaction data to extract multiple semantic fragments, and performing semantic similarity matching and conflict detection with policy entity nodes in the constructed grassroots governance knowledge graph, a structured demand graph fragment containing policy association and conflict information is constructed to identify potential policy conflicts. Based on this structured demand graph fragment, a preliminary service strategy set is generated by forward traversal along the inheritance and reference relationships of policy entity nodes, and the logical inheritance relationship of the knowledge graph is used to ensure that the strategies meet policy compliance. Then, a reverse traversal is performed along the association relationship between responsible entities and resource nodes to verify the resource constraints of the preliminary service strategies. By matching and verifying the strategies with specific responsible entities and resource status, the feasibility of the strategies is ensured. Finally, based on the real-time resource status data of the community, the candidate service strategy set is rearranged in terms of execution timeliness and resource conflict resolution, and the optimal service strategy is selected. In summary, the embodiments of the present invention solve the problem that existing technologies cannot simultaneously consider policy compliance and implementation feasibility by constructing a structured demand graph fragment that includes conflict detection and combining it with a forward traversal generation mechanism along policy logic and a reverse traversal verification mechanism along resource constraints. This achieves the technical effect of generating a community service strategy with self-consistent logic and conditions for implementation. Attached Figure Description
[0008] Figure 1 This is a flowchart illustrating an AI-based method for grassroots governance and smart community services, provided in an embodiment of the present invention. Figure 2 This is a schematic diagram of the structure of an AI-based grassroots governance and community intelligent service system provided in an embodiment of the present invention. Detailed Implementation
[0009] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0010] See Figure 1 This is a flowchart illustrating an AI-based grassroots governance and community intelligent service method according to an embodiment of the present invention. The AI-based grassroots governance and community intelligent service method includes: S10: Obtain multimodal interaction data of community users and resource status data of the community; S11, Identify the multimodal interaction data, extract multiple semantic segments, and obtain the semantic understanding result of the service needs of the community users; S12, perform semantic similarity matching and conflict detection between each semantic fragment in the semantic understanding result and the policy entity nodes in the constructed grassroots governance knowledge graph, identify the policy association and conflict relationship between semantic fragments, and obtain structured demand graph fragments; S13, Based on the structured demand graph fragment, perform a forward traversal along the inheritance and reference relationships of policy entity nodes in the grassroots governance knowledge graph to generate a preliminary service strategy set; S14. Based on the structured demand graph fragment and the preliminary service strategy set, a reverse traversal is performed in the grassroots governance knowledge graph along the relationship between the responsible subject and the resource node. Resource constraint verification is performed on each preliminary service strategy in the preliminary service strategy set to obtain a set of candidate service strategies that have passed the verification. S15, Based on the resource status data of the community, the candidate service strategy set is reordered according to execution timeliness and resource conflict resolution, and the optimal service strategy is selected. S16. Based on the optimal service strategy, generate and output structured service description content for the community users.
[0011] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: By identifying multimodal interaction data to extract multiple semantic fragments, and performing semantic similarity matching and conflict detection with policy entity nodes in the constructed grassroots governance knowledge graph, a structured demand graph fragment containing policy association and conflict information is constructed to identify potential policy conflicts. Based on this structured demand graph fragment, a preliminary service strategy set is generated by forward traversal along the inheritance and reference relationships of policy entity nodes, and the logical inheritance relationship of the knowledge graph is used to ensure that the strategies meet policy compliance. Then, a reverse traversal is performed along the association relationship between responsible entities and resource nodes to verify the resource constraints of the preliminary service strategies. By matching and verifying the strategies with specific responsible entities and resource status, the feasibility of the strategies is ensured. Finally, based on the real-time resource status data of the community, the candidate service strategy set is rearranged in terms of execution timeliness and resource conflict resolution, and the optimal service strategy is selected. In summary, the embodiments of the present invention solve the problem that existing technologies cannot simultaneously consider policy compliance and implementation feasibility by constructing a structured demand graph fragment that includes conflict detection and combining it with a forward traversal generation mechanism along policy logic and a reverse traversal verification mechanism along resource constraints. This achieves the technical effect of generating a community service strategy with self-consistent logic and conditions for implementation.
[0012] As an example, multimodal interaction data of community users is acquired through service terminals deployed in the community. This includes various interaction data generated by users through multiple channels such as community smart interactive terminals, online service ports, and voice call devices. Specifically, this includes voice interaction data (such as voice content of users inquiring about policies and expressing their demands), text interaction data (such as applications submitted by users through online forms and opinions submitted through message boards), and a small amount of image interaction data (such as images of relevant supporting documents uploaded by users and images of on-site scene feedback). For example, voice data of users inquiring about low-income assistance applications through community smart terminals and text data of users submitting applications for elderly care services through online ports are both multimodal interaction data that need to be collected. Community resource status data is acquired in batches through preset data collection interfaces. This mainly includes real-time work status data of each responsible entity and dynamic status data of various resource nodes. Specifically, this includes the real-time task queues and on-duty status of responsible entities, as well as the occupancy status, distribution location, and available time periods of resource nodes. For example, the real-time workload of the community health service center and the occupancy status of convenient service areas are all resource status data. After data collection, the two types of data undergo preliminary format standardization to filter out invalid and redundant data, ensuring that the data format is compatible with subsequent processing procedures.
[0013] As one example, the process of identifying the multimodal interaction data, extracting multiple semantic fragments, and obtaining a semantic understanding result of the service needs of the community users includes: Acoustic features are extracted from the speech data in the multimodal interaction data, and the dialect speech signal is mapped into a standard Mandarin syllable sequence using a pre-constructed dialect phoneme mapping network to obtain standard speech text. Character-level feature fusion is performed on the text data in the multimodal interaction data and the standard speech text to obtain fused text data; Semantic analysis is performed on the fused text data to obtain multiple semantic fragments with independent semantics; Based on the multiple semantic fragments, a serialized data structure containing the multiple semantic fragments is generated, and the serialized data structure is used as the semantic understanding result.
[0014] In this embodiment, acoustic features are first extracted from the speech data in the multimodal interaction data. A pre-constructed dialect phoneme mapping network is then used to map the dialect speech signals into a standard Mandarin syllable sequence to obtain standard speech text, which can solve the problem of misunderstanding of needs caused by dialect speech recognition deviation. Next, character-level feature fusion is performed on the text data in the multimodal interaction data and the standard speech text to obtain fused text data, which can integrate multimodal information and improve the completeness of the need data. Then, semantic analysis is performed on the fused text data to obtain multiple semantic segments with independent semantics, which can achieve accurate decomposition of needs. Finally, a serialized data structure containing these semantic segments is generated as the semantic understanding result, which can make the need understanding result more organized and facilitate subsequent matching with policy entity nodes. Therefore, this embodiment achieves accurate and complete understanding of community user service needs through accurate processing and semantic decomposition of multimodal data.
[0015] Specifically, in this embodiment, the voice data in the multimodal interaction data covers audio information input by community users through scenarios such as voice consultation, request for help, and feedback. Due to the diversity of community user groups, some voice data may contain various local dialects. Direct voice recognition may easily lead to phoneme confusion and semantic deviation, affecting the accuracy of subsequent demand understanding. The MFCC algorithm is first used to extract acoustic features from the voice data. The specific process is as follows: First, the voice signal is pre-emphasized to filter out low-frequency noise and improve the recognizability of high-frequency phonemes. Then, the pre-processed voice signal is framed, dividing continuous voice into short-time frame sequences, retaining reasonable overlap between frames to avoid semantic breaks. Subsequently, a Hanning window is added to each frame to reduce spectral leakage at frame edges. Next, the time-domain voice signal is converted to a frequency-domain signal using Fast Fourier Transform to extract spectral features. Then, the spectral features are filtered using a Mel filter bank to retain features corresponding to the frequency range sensitive to the human auditory system. Finally, the filtered features are dimensionality-reduced using Discrete Cosine Transform to obtain the final acoustic feature parameters. Furthermore, a pre-constructed dialect phoneme mapping network is used. This network is built based on a CNN-LSTM hybrid deep learning structure and includes a feature input layer, a phoneme recognition layer, a mapping layer, and an output layer. During training, a sample set of common dialects and Mandarin phonemes in the community is used for supervised training. The sample set covers dialect words and their corresponding standard Mandarin pronunciations in high-frequency consultation scenarios in the community. After training, the network can accurately identify the acoustic features of the input dialect speech, map the dialect phonemes one by one to the corresponding standard Mandarin syllables, and then generate standard speech text by concatenating the syllables. This effectively solves the technical pain point of dialect speech recognition deviation and ensures that the speech data can be accurately processed in subsequent steps.
[0016] Next, character-level feature fusion is performed on the text data and standard speech text in the multimodal interaction data to obtain fused text data. The text data in the multimodal interaction data includes text inquiries directly entered by community users, text information filled in online forms, and messages on message boards. This type of text data has a standardized character format, but may suffer from fragmented information and incomplete expression. The standard speech text obtained in the previous step, while completely corresponding to the speech information, may have issues with colloquial and redundant characters. Therefore, both types of text data are preprocessed separately: invalid characters, whitespace characters, and special symbols are removed; the text undergoes a unified case conversion; and typos are corrected to ensure the consistency and standardization of the format of the two types of text data. After preprocessing, an improved character-level feature fusion algorithm is used for fusion processing. This algorithm differs from the existing simple concatenation fusion. First, the two types of text data are converted into character-level feature vectors, with each character corresponding to a feature vector of a fixed dimension. Then, an attention mechanism is introduced to assign weights to the two feature vectors. By calculating the relevance of each character to the community service needs, characters with high relevance to the needs are assigned higher weights, and characters with low relevance are assigned lower weights, thereby highlighting the core needs information. Finally, the weighted feature vectors of the two types are concatenated and fused to generate fused text data.
[0017] Then, semantic analysis was performed on the fused text data to obtain multiple semantic fragments with independent semantics. The BERT semantic analysis model was used, but it was fine-tuned and optimized for the community service needs scenario, making the model more suitable for semantic understanding related to grassroots governance. The specific process is as follows: First, the fused text data is input into the fine-tuned BERT model. The model first performs word segmentation on the fused text, and combines a high-frequency vocabulary dictionary for community services to break the text down into multiple semantic units to avoid segmentation bias. Then, the model's encoder performs semantic encoding on each semantic unit, capturing the semantic relationship between each semantic unit and its context. At the same time, it combines common demand types in grassroots governance scenarios to semantically annotate the semantic units. After that, the model calculates semantic similarity to determine whether each semantic unit has an independent semantic meaning. For semantic units that are closely related to each other and cannot express a complete demand on their own, they are integrated. For semantic units that can express a complete demand point on their own, they are treated as a separate semantic fragment. Finally, multiple semantic fragments with independent semantics are obtained. Each semantic fragment corresponds to a specific aspect of the community user's service demand. For example, when a user consults about social security enrollment and pension service application at the same time, it will be broken down into two independent semantic fragments, corresponding to two types of demand respectively, ensuring that the user's service demand can be comprehensively and accurately broken down.
[0018] Finally, the extracted independent semantic fragments are semantically ordered based on the natural logical order and semantic relevance of the user's expression. For example, if a user first inquires about the conditions for obtaining a service and then about the application process, the corresponding semantic fragments are arranged in that order, ensuring that the serialized data structure matches the user's expression logic. A serialized data structure is then constructed, which is an ordered sequence where each element corresponds to a semantic fragment. Each element contains three core pieces of information: the text content of the semantic fragment, a semantic category label, and a semantic weight. The semantic category label is categorized according to the type of need corresponding to the semantic fragment, specifically including categories such as livelihood security, policy consultation, conflict mediation, and resource application. The semantic weight uses pre-assigned weights based on an attention mechanism to indicate the priority of the need corresponding to the semantic fragment. This serialized data structure allows for the structured integration of fragmented semantic segments, forming a clear and logically coherent semantic understanding result. It preserves the independent semantic information of each semantic fragment while reflecting the logical connections between them, ensuring that subsequent steps can quickly and accurately match each semantic fragment with policy entity nodes in the grassroots governance knowledge graph.
[0019] As one example of the above scheme, the semantic fragments in the semantic understanding result are semantically similar to and conflict-detected with policy entity nodes in the constructed grassroots governance knowledge graph to identify policy relationships and conflict relationships between semantic fragments, thereby obtaining structured demand graph fragments, including: Each semantic fragment in the semantic understanding result is converted into a semantic vector, and the similarity matrix between the semantic vector and the entity vector of the policy entity node in the grassroots governance knowledge graph is calculated. Based on the maximum value matching result in the similarity matrix, an initial association pair is established between the semantic fragment and the policy entity node; Obtain the logical constraint edges of each policy entity node involved in the initial association pair in the grassroots governance knowledge graph, and detect whether there is a governance policy logical conflict between the semantic fragments in the initial association pair based on the logical constraint edges, and obtain the conflict detection result; If the conflict detection result indicates that there is a logical conflict in the governance policy, a conflict feature vector containing a conflict type identifier is generated, and the conflict feature vector is attached to the corresponding semantic fragment. The semantic fragments with the attached conflict feature vectors are connected to the corresponding policy entity nodes in a graph structure to construct graph data containing correlation and conflict information, and the graph data is used as the structured demand graph fragment.
[0020] In this embodiment, each semantic fragment in the semantic understanding result is first converted into a semantic vector, and the similarity matrix between the semantic vector and the entity vector of the policy entity node in the grassroots governance knowledge graph is calculated, which can improve the accuracy of semantic matching. Then, based on the maximum matching result in the similarity matrix, an initial association pair between the semantic fragment and the policy entity node is established, which can quickly locate the policy basis corresponding to the demand. Then, the logical constraint edges of each policy entity node involved in the initial association pair in the grassroots governance knowledge graph are obtained. Based on the logical constraint edges, it is detected whether there is a governance policy logical conflict between the semantic fragments in the initial association pair and the conflict detection result is obtained, which can identify policy conflicts in a timely manner. If a conflict exists, a conflict feature vector containing a conflict type identifier is generated and attached to the corresponding semantic fragment, which can mark the conflict information for subsequent processing. Finally, the semantic fragment with the attached conflict feature vector is connected to the corresponding policy entity node in a graph structure, and a graph data containing the relationship and conflict information is constructed as a structured demand graph fragment, which can realize the structured presentation of the relationship between demand and policy and the conflict information. Therefore, this embodiment achieves accurate relationship between demand and policy and effective identification of conflict through accurate semantic matching, conflict detection and structured modeling.
[0021] First, the semantic fragments in the semantic understanding result are converted into semantic vectors, and the similarity matrix between these semantic vectors and the entity vectors of policy entity nodes in the grassroots governance knowledge graph is calculated. The semantic understanding result is a serialized data structure containing multiple semantic fragments with independent semantics. Therefore, this serialized data structure is parsed first to extract the text content, semantic category label, and semantic weight of each semantic fragment, removing invalid and redundant fragment information to ensure the validity of the input data. This embodiment improves the semantic vector conversion process by using the Sentence-BERT model. This model is trained under supervision by incorporating high-frequency policy vocabulary and community service demand samples from the grassroots governance field, optimizing the encoder's semantic capture capability. The specific conversion process is as follows: each semantic fragment is input into the fine-tuned Sentence-BERT model. The model first performs word segmentation on the semantic fragment, corrects segmentation bias using a grassroots governance vocabulary dictionary, and then performs contextual semantic encoding on the segmented text using a bidirectional Transformer encoder. It integrates the features of semantic category labels and semantic weights to output a fixed-dimensional semantic vector, achieving accurate quantitative representation of the semantic fragments. The entity vectors of policy entity nodes in the knowledge graph of grassroots governance are pre-generated using the same fine-tuning model and parameters during the knowledge graph construction stage to ensure that the vector dimensions are consistent and the semantic space is unified.
[0022] After vector transformation, similarity is calculated using the following formula, which incorporates a semantic weight correction factor to prioritize the matching of core requirement segments. The formula is as follows: , For semantic segments, For the entity vectors of policy entity nodes in the knowledge graph of grassroots governance, Representing vectors with vector dot product, Representing vectors The length of the mold, Representing vectors The length of the mold, The semantic weight is assigned to the semantic fragment to highlight the matching priority between core demand fragments and policy entity nodes. The weight value ranges from 0 to 1. All combinations of semantic fragments and policy entity nodes are traversed, and the semantic similarity value of each group is calculated to generate a similarity matrix. The rows of this matrix correspond to each semantic fragment, and the columns correspond to each policy entity node. Each element in the matrix corresponds to the semantic similarity value between a single semantic fragment and a single policy entity node. The higher the similarity value, the closer the semantic relationship between the two.
[0023] Next, the similarity matrix is parsed row by row. For each semantic fragment in a row, the element with the highest similarity value is retrieved, and its value and corresponding column index are recorded. The policy entity node corresponding to the column index is determined, and the semantic fragment is bound to that policy entity node to establish a one-to-one initial association pair. To avoid invalid associations, a similarity threshold verification mechanism is added. The threshold is determined through statistical analysis of samples from grassroots governance scenarios. If the maximum similarity value corresponding to a semantic fragment is lower than the threshold, it is determined that the semantic fragment cannot be matched with a suitable policy entity node and is marked as pending matching. Further processing is then performed using knowledge graph traversal. If multiple policy entity nodes have the same maximum similarity value, the semantic fragment is marked as pending verification and no association is established. When establishing initial association pairs, the similarity value, semantic weight, and matching timestamp of each association pair are recorded simultaneously as auxiliary criteria for subsequent validity judgment of association relationships, ensuring the rationality of the initial association pairs. For example, if a semantic fragment corresponds to "consultation on application materials for minimum subsistence allowance", and its semantic vector and the entity vector of the entity node "minimum subsistence allowance application policy" in the knowledge graph have the highest similarity value after being calculated by the improved cosine similarity algorithm and are higher than the threshold, then an initial association pair between the two is established.
[0024] Then, the logical constraint edges of each policy entity node involved in the initial association pair in the grassroots governance knowledge graph are obtained, and based on these logical constraint edges, the logical conflicts of governance policies between semantic fragments in the initial association pair are detected to obtain the conflict detection results. Existing technologies only perform simple semantic matching and do not consider the logical constraints between policies, which easily leads to policy conflicts. This embodiment designs a multi-dimensional conflict detection algorithm based on logical constraint edges. The specific implementation process is as follows: In the grassroots governance knowledge graph, three types of logical constraint edges are predefined between policy entity nodes: mutually exclusive constraint edges (marked as...). The first part represents the fact that the policies corresponding to the two policy entity nodes cannot be applied simultaneously, and the second part represents the subordinate constraint edge (marked as...). ) represents the policy belonging to one policy entity node to another, supplementing the constraint edge (labeled as This indicates that the policies corresponding to the two policy entity nodes can complement each other.
[0025] First, all initial association pairs are traversed, and the policy entity nodes in each association pair are extracted to form a set of policy entity nodes. Then, through the indexing mechanism of the knowledge graph, each item is retrieved one by one. Logical constraint edges between each node and all other nodes are recorded, including the constraint edge type, associated node, and constraint priority, to generate a constraint edge set. Subsequently, a conflict is determined using the following conflict detection algorithm formula: , This is the collision detection value. and Let be the policy entity nodes corresponding to any two semantic fragments in the initial association pair, and , As a policy entity node and Logical constraint edges between them Let be the constraint edge mapping function, and the mapping rule is: when for hour, (Indicates a conflict); when for or hour, (Indicates no conflict); when and When there are no logical constraints between them, .
[0026] like If a conflict is found, it is determined that there is a governance policy logic conflict between the semantic fragments in the initial association pair, and the semantic fragment identifier, policy node identifier, and conflict type of the conflict are recorded in detail; if If the condition is met, then there is no conflict. For semantic segments marked as pending verification, their corresponding multiple policy entity nodes are considered together with... For the constraint edges of other nodes, calculate the corresponding constraint edges for each candidate policy entity node. Values, filter out The nodes are associated, and the final output includes conflict identification, conflict details, non-conflict association pairs, and fragments to be matched, ensuring accurate identification of policy conflicts between requirements.
[0027] Subsequently, if the conflict detection result indicates a conflict in governance policy logic, a conflict feature vector containing a conflict type identifier is generated and appended to the corresponding semantic segment. However, existing technologies do not effectively characterize conflicts, making subsequent targeted processing impossible. This embodiment achieves accurate marking and quantification of conflicts through the following dedicated conflict feature vector generation scheme. The conflict feature vector generation formula is as follows: , This is a conflict indicator; a value of 1 indicates that the semantic fragment has a policy conflict, and a value of 0 indicates that there is no conflict. The conflict type is coded, with a value of 1 corresponding to a mutual exclusion constraint conflict, a value of 2 corresponding to a scope of application conflict, and a value of 3 corresponding to a process conflict, which corresponds one-to-one with the conflict type in the conflict detection results; The weighting of conflict impact is calculated based on the constraint priority of the conflict policy entity nodes; the higher the constraint priority, the greater the impact. The larger the value, the more likely it is to be converted into a corresponding weight value through a normalization algorithm. This is a conflict association identifier, with a value that is a unique code for the conflict semantic fragment. It is used to accurately associate the corresponding conflict policy entity node, making it easier to trace the source of the conflict later.
[0028] The process of generating conflict feature vectors is as follows: first, extract the conflict details from the conflict detection results, and then determine the corresponding semantic segments of each conflict. , , The value is then converted to a value within the range of 0 to 1 based on the constraint priority of the policy entity nodes in the knowledge graph using a linear normalization algorithm. The four parameters are combined in sequence to generate a complete conflict feature vector. After generation, this vector is appended to the attribute information of the corresponding semantic segment, and stored in key-value pairs with the semantic vector, text content, and semantic weight of the semantic segment to ensure that conflict information can be quickly extracted in subsequent steps.
[0029] Finally, semantic fragments with added conflict feature vectors are connected to corresponding policy entity nodes in a graph structure to construct graph data containing association and conflict information. This graph data serves as a segment of a structured demand graph. The graph structure connection integrates scattered demand, policy, association, and conflict information, addressing the unstructured nature of existing matching results. Specifically, the process involves: using semantic fragments with added conflict feature vectors as demand nodes, each containing core attributes such as text content, semantic vectors, and conflict feature vectors; using corresponding policy entity nodes as policy nodes, each containing native attributes such as entity vectors, policy descriptions, and constraint edges; using the matching relationship between semantic fragments and policy entity nodes as association edges, with edge attributes set to similarity value and semantic weight; using the conflict relationship between conflicting semantic fragments as conflict edges, with edge attributes set to conflict feature vectors; and simultaneously, fully integrating the logical constraint edges between policy entity nodes into the graph data, preserving the original logical relationships between policies. After construction, the graph data undergoes integrity verification, removing isolated nodes and invalid edges to ensure that the graph data fully represents the association between demands and policies, the conflict relationships between semantic fragments, and the constraint relationships between policies. The data in this figure is a fragment of the structured demand map.
[0030] As one example of the above scheme, the preliminary service strategy set is generated by forward traversing the structured demand graph fragment along the inheritance and reference relationships of policy entity nodes in the grassroots governance knowledge graph, including: Map the structured demand graph fragment to the grassroots governance knowledge graph, and lock the graph index position of each policy entity node in the structured demand graph fragment; Starting from the index position of the graph, a forward traversal is performed along the inheritance relationship of the policy entity nodes to obtain the set of applicable scopes of the policy entity nodes in the hierarchical structure of the structured demand graph fragment; Based on the set of applicable scopes, a forward traversal is performed along the reference relationships of the policy entity nodes to retrieve associated service strategy elements and construct the original set of strategy elements; Using the conflict feature vector in the structured demand graph fragment, the service strategy elements in the original strategy element set that have logical mutual exclusion are pruned and filtered to remove the service strategy elements that trigger logical conflicts, and the usable strategy elements are obtained. The available strategy elements are combined according to the processing logic order to generate multiple preliminary service strategies with execution steps, and the set of the multiple preliminary service strategies is taken as the preliminary service strategy set.
[0031] In this embodiment, the structured demand graph fragment is first mapped to the grassroots governance knowledge graph, locking the graph index position of each policy entity node, which can quickly locate the policy association starting point. Then, starting from the graph index position, a forward traversal is performed along the inheritance relationship of the policy entity nodes to obtain the set of applicable scopes of the policy entity nodes in the hierarchical structure of the structured demand graph fragment, which can clarify the applicable boundaries of the policy. Then, based on the set of applicable scopes, a forward traversal is performed along the reference relationship of the policy entity nodes to retrieve the associated service strategy elements, construct the original strategy element set, and comprehensively obtain the strategy resources corresponding to the policy. The source; by utilizing the conflict feature vector in the structured demand graph fragment, the service strategy elements in the original strategy element set that have logical mutual exclusion are pruned and filtered to remove the service strategy elements that trigger logical conflicts, thereby obtaining usable strategy elements and eliminating logical contradictions between strategy elements; finally, the usable strategy elements are combined according to the processing logic order to generate multiple preliminary service strategies with execution steps and form a preliminary service strategy set, which makes the preliminary strategy executable. Therefore, this embodiment generates a preliminary service strategy set without logical conflicts and in line with the policy application scope through hierarchical forward traversal, conflict pruning and logical combination.
[0032] Specifically, in this embodiment, the structured demand graph fragment is first mapped to the grassroots governance knowledge graph, locking the graph index position of each policy entity node in the structured demand graph fragment. The structured demand graph fragment is graph data containing demand nodes, policy entity nodes, relationships, and conflict information. The policy entity nodes correspond one-to-one with the policy entity nodes in the grassroots governance knowledge graph, with conflict-related information added only to the attributes. Therefore, the structured demand graph fragment is first parsed to extract all policy entity nodes, obtaining the core identifier (such as policy number and policy name) of each policy entity node. Isolated and invalid policy nodes are removed from the graph data to ensure that all input policy entity nodes are valid nodes already existing in the grassroots governance knowledge graph. Subsequently, existing graph node matching algorithms are used to match each extracted policy entity node with the policy entity nodes in the grassroots governance knowledge graph. The matching process is based on dual verification using the core identifier and semantic vector of the policy entity node. Preliminary matching is first performed using the core identifier, and then the cosine similarity algorithm is used to verify semantic consistency, ensuring that the matching results are unbiased. After matching is completed, the indexing mechanism of the grassroots governance knowledge graph is used to obtain the unique index position of each successfully matched policy entity node in the knowledge graph. This index position is used to locate the specific position of the policy entity node in the hierarchical structure of the knowledge graph, providing a precise starting point for subsequent forward traversal, connecting with the structured demand graph fragments generated in the previous step, and ensuring that the traversal process does not deviate from the target policy node.
[0033] Next, starting from the graph index position, a forward traversal is performed along the inheritance relationship of policy entity nodes to obtain the set of applicable scopes of policy entity nodes in the hierarchical structure of the structured demand graph fragment. In the grassroots governance knowledge graph, the inheritance relationship of policy entity nodes represents the subordinate relationship between upper and lower level policies. The applicable scope of a higher-level policy entity node includes the applicable scope of a lower-level policy entity node. Forward traversal means tracing back from the current policy entity node to all its higher-level policy entity nodes, integrating the applicable scopes of all levels of policies. Therefore, a depth-first traversal algorithm is used for forward traversal. Starting from the graph index position of each policy entity node, it traverses upward through the predefined inheritance relationship edges in the knowledge graph to its direct superior policy entity nodes. Then, starting from the direct superior node, it continues to traverse its superior nodes until the top-level policy entity node of the grassroots governance knowledge graph (without superior nodes) is reached, at which point the traversal stops. During the traversal, the applicable scope information corresponding to each policy entity node is extracted simultaneously. The applicable scope information includes core content such as the community area, population type, demand scenario, and time limit to which the policy applies. The extracted applicable scope information is deduplicated and merged, and duplicate or contradictory applicable scope descriptions are removed. Finally, an applicable scope set is generated. This set clarifies the applicable boundaries of all policy levels corresponding to the current demand, providing scope constraints for subsequent retrieval of related service strategy elements, avoiding the retrieval of invalid strategy elements that are outside the policy's applicable scope, and ensuring that the traversal direction and scope are accurate and controllable.
[0034] Then, based on the set of applicable scopes, a forward traversal is performed along the reference relationships of policy entity nodes to retrieve associated service strategy elements and construct the original set of strategy elements. In the grassroots governance knowledge graph, the reference relationships of policy entity nodes represent the association between policies and service strategy elements. Each policy entity node is pre-associated with service strategy elements corresponding to its applicable scope, including core content such as demand processing procedures, required materials, processing time limits, and precautions. Therefore, a depth-first traversal algorithm is adopted to perform a forward traversal along the reference relationships of policy entity nodes. Starting from all policy entity nodes corresponding to the set of applicable scopes (including the current node and all its superior nodes), the algorithm traverses all service strategy elements referenced by each policy entity node through the predefined reference relationship edges in the knowledge graph. During the traversal, the applicable scope set is strictly checked, and service strategy elements that exceed the applicable scope are eliminated to ensure that all retrieved strategy elements comply with policy requirements. After the retrieval is completed, all extracted service strategy elements are classified and organized according to their type (such as process, material, and time limit). Duplicate strategy elements are removed, and the remaining valid strategy elements are integrated to construct an original set of strategy elements. This set contains all policy-related service strategy elements corresponding to the current needs, ensuring that the strategy elements are highly compatible with the scope of policy application.
[0035] Subsequently, using the conflict feature vectors in the structured demand graph fragments, the service strategy elements in the original strategy element set that contain logically mutually exclusive elements are pruned and filtered to remove those that trigger logical conflicts, thus obtaining usable strategy elements. However, existing technologies do not incorporate policy conflict information corresponding to the demand when filtering strategy elements, which can easily lead to generated service strategies containing logically mutually exclusive elements that cannot be executed correctly. This embodiment, on the other hand, uses a multi-dimensional pruning and filtering algorithm based on conflict feature vectors to accurately remove logically mutually exclusive strategy elements. The formula is as follows: , For mutual exclusion detection values of strategy elements, The number of policy elements in the original policy element set. This is the conflict feature vector corresponding to the i-th strategy element (derived from the conflict feature vector of the associated semantic fragment in the structured demand graph fragment). Let j be the conflict feature vector corresponding to the j-th policy element. Let be the logical association edge between the i-th strategy element and the j-th strategy element. For the mutual exclusion detection function, the mapping rule is: when and The conflict type codes are consistent, the conflict association identifiers are the same, and When they are mutually exclusive associations, (This indicates that the two are logically mutually exclusive); otherwise (This indicates that the two are not logically mutually exclusive). The process is as follows: traverse all pairwise policy elements in the original policy element set, and calculate the corresponding... The value, if a strategy element is combined with at least one other strategy element in the set... If a strategy element is determined to be the element that triggers a logical conflict, it will be removed; if a strategy element is combined with all other strategy elements... If a strategy element is found to have no logical conflict, it is retained in the set of available strategy elements. After pruning and filtering, an integrity check is performed on the set of available strategy elements to ensure that the retained elements cover the core service content corresponding to the requirements and that there are no logical contradictions among the available strategy elements.
[0036] Finally, the available strategy elements are combined according to the logical order of handling to generate multiple preliminary service strategies with execution steps. The set of these preliminary service strategies is then considered as a preliminary service strategy set. First, the available strategy elements are logically categorized and prioritized. The categorization is based on the service handling stages (e.g., consultation and guidance, material submission, review and processing, and result feedback), and the prioritization is based on the policy-required handling order and service efficiency. A topological sorting algorithm is used to arrange the available strategy elements sequentially, ensuring that the sorting result conforms to the conventional handling logic of grassroots governance services and avoiding issues such as reversed steps or logical confusion. After sorting, the available strategy elements are combined. During the combination process, the diversity of community user service needs is considered to generate multiple different combination schemes. Each combination scheme includes complete execution steps, with each execution step corresponding to one available strategy element. The execution order, core requirements, and associated policy basis of each step are clearly defined to ensure the feasibility of each preliminary service strategy. For example, for needs related to "low-income assistance application," the generated preliminary service strategy could include complete execution steps such as "policy consultation and guidance, material preparation, material submission, review and processing, and result feedback," with each step corresponding to one available strategy element. After all the combined solutions are generated, they are integrated to form a preliminary service strategy set. This set contains multiple preliminary service strategies that have execution steps, no logical conflicts, and comply with the applicable policy scope, providing diversified strategy options for subsequent resource constraint verification.
[0037] As one example of the above scheme, based on the structured demand graph fragment and the preliminary service strategy set, a reverse traversal is performed along the association between responsible entities and resource nodes in the grassroots governance knowledge graph to verify the resource constraints of each preliminary service strategy in the preliminary service strategy set, thereby obtaining a set of candidate service strategies that pass the verification, including: Analyze each preliminary service strategy in the preliminary service strategy set, and extract the target responsible entity type and target resource type required for the execution of each preliminary service strategy; Locate the responsible entity node and resource node corresponding to the target responsible entity type and the target resource type in the grassroots governance knowledge graph; Starting from the responsible entity node and the resource node, traverse backwards along the association relationship to query the current working status of the responsible entity node and the dynamic availability time window of the resource node; The preset execution duration of the initial service strategy is matched with the dynamic available time window to determine whether there is an available time segment that can accommodate the preset execution duration. If it exists, the corresponding preliminary service strategy is marked as verified, and the set of all verified preliminary service strategies is taken as the candidate service strategy set.
[0038] In this embodiment, each preliminary service strategy in the preliminary service strategy set is first analyzed to extract the target responsible entity type and target resource type required for the execution of each preliminary service strategy, thus clarifying the resource requirements for strategy execution. Next, the responsible entity node and resource node corresponding to the target responsible entity type and target resource type are located in the grassroots governance knowledge graph, which can quickly locate the relevant resource carriers. Then, starting from the responsible entity node and resource node, a reverse traversal is performed along the association relationship to query the current working status of the responsible entity node and the dynamic available time window of the resource node, which can obtain the real-time availability of resources. The preset execution duration of the preliminary service strategy is matched with the dynamic available time window to determine whether there is an available time segment that can accommodate the preset execution duration, which can verify the resource feasibility of strategy execution. If there is, the corresponding preliminary service strategy is marked as verified. The set of all verified preliminary service strategies is used as the candidate service strategy set, which can filter out strategies with resource foundation. Therefore, this embodiment uses resource constraint reverse verification to filter out the candidate service strategy set that meets the real-time resource status, thereby improving the execution feasibility of service strategies.
[0039] In this embodiment, the preliminary service strategies in the preliminary service strategy set are first analyzed to extract the target responsibility entity type and target resource type required for the execution of each preliminary service strategy. The preliminary service strategy set contains multiple preliminary service strategies with complete execution steps, all of which have had logical conflicts removed and comply with policy requirements. The extraction accuracy is improved by combining conflict feature vectors from structured demand graph fragments with policy-related information. The process is as follows: first, the strategy text of each preliminary service strategy is segmented and semantically annotated to identify execution actions, constraints, and policy adaptation requirements; then, the target type is accurately extracted using the following analytical formula: , Extract confidence scores for the target type. To determine the degree of alignment between strategic steps and policy entity nodes, The impact coefficient of conflict feature vectors in a structured demand map segment; when conflicts exist. Value increase, range 0 to 1, confidence level Extraction results below the threshold will be re-verified. This algorithm accurately extracts the target responsible entity type and target resource type required for each initial service strategy, synchronously records the priority of requirements, and binds them to the corresponding strategy, providing a basis for subsequent node positioning.
[0040] Next, the responsible entity nodes and resource nodes corresponding to the target responsible entity type and target resource type are located in the grassroots governance knowledge graph. The grassroots governance knowledge graph contains numerous node types, and existing location algorithms are prone to type confusion and insufficient adaptability. To avoid this problem, this embodiment converts the extracted target types into standardized search keywords, combines them with the multi-level indexing system of the knowledge graph, retrieves candidate nodes, and then selects the optimal matching node using the following location formula: M represents the node matching score, T represents the matching degree between the target type and the node type, A represents the adaptability of the node attributes to the strategy requirements, and W represents the type matching weight, ranging from 0 to 1, prioritizing type accuracy. Based on the matching score, the responsible entity nodes and resource nodes with the highest adaptability are selected, generating a node set. Each node is then marked with a unique identifier and core attributes to avoid positioning errors and ensure that the positioning results accurately correspond to the strategy requirements.
[0041] Then, starting from the responsible entity node and resource nodes, a reverse traversal is performed along the relationships to query the current working status of the responsible entity node and the dynamic availability time window of the resource node. By combining the weights of the associated edges to control the traversal depth, real-time status data is accurately obtained. The traversal method is as follows: E is the traversal termination threshold, n is the number of edges associated with the current node, Ei is the association strength of the i-th edge, and Wi is the edge weight, which increases with higher relevance to the real-time status and ranges from 0 to 1. Traversal stops when E reaches a preset threshold, balancing efficiency and information integrity. During traversal, the number and progress of tasks are queried along the responsible entity-current task association edge to generate a work status; the occupancy status and scheduling plan are queried along the resource node-occupancy record association edge, and unoccupied time periods are extracted to generate a dynamic available time window, binding the real-time status with the corresponding strategy.
[0042] Subsequently, the preset execution duration of the initial service strategy is matched with the dynamic available time window to determine if there is an available time segment that can accommodate the preset execution duration. The process is as follows: extract the preset execution duration of each strategy, retrieve the corresponding dynamic available time window and the working status of the responsible entity, and determine the validity of the match using the following methods: P represents the matching validity score, L represents the matching degree between the time window length and the preset execution duration, K represents the adaptability between the remaining load of the responsible entity and the policy requirements, and S represents the time matching weight, ranging from 0 to 1. If the matching validity score is higher than the threshold and there are continuous available time segments, the matching is considered successful, and the policy passes the resource constraint verification; otherwise, it fails, and the reason for failure is marked in detail.
[0043] Finally, if a suitable available time segment exists, the corresponding preliminary service strategy is marked as verified, and the set of all verified preliminary service strategies is used as the candidate service strategy set. Specifically, the verification results of all strategies are iterated and reviewed one by one. Strategies that pass verification are marked with an "verified" tag, and node information and matching time segments are recorded. Strategies that fail verification are temporarily stored in the set to be optimized. The verified strategies are then aggregated to construct the candidate service strategy set, ensuring that each strategy in the set has resource guarantees and execution feasibility.
[0044] As one example of the above scheme, the step of reordering the candidate service strategy set based on the community's resource status data and resolving resource conflicts to select the optimal service strategy includes: Obtain the resource status data of the community, and parse the resource status data to obtain the real-time task queue length of each responsible entity and the spatial distance of each resource node; For each candidate service strategy in the candidate service strategy set, the queuing cost is calculated based on the real-time task queue length, and the movement path cost is calculated based on the spatial location distance. A weighted cost function including time cost and resource cost is constructed. The weighted cost function is used to calculate the cost of each candidate service strategy in the candidate service strategy set, and the results are sorted from low to high to generate a first preferred sequence. If there is a resource occupation conflict in the first preferred sequence, a conflict resolution algorithm is started for the candidate service strategy with conflict, and the resource allocation node of the conflict strategy is adjusted. The strategy with the smallest weighted cost function value is selected from the adjusted first preferred sequence, and the selected strategy is taken as the optimal service strategy.
[0045] In this embodiment, resource status data of the community is first acquired. This data is then parsed to obtain the real-time task queue length of each responsible entity and the spatial distance between each resource node, enabling precise understanding of the real-time load and distribution of resources. Next, for each candidate service strategy in the candidate service strategy set, the queuing cost is calculated based on the real-time task queue length, and the movement path cost is calculated based on the spatial distance. A weighted cost function incorporating time and resource costs is constructed to quantify and evaluate the execution cost of each strategy. The weighted cost function is then used to calculate the cost of each candidate service strategy in the candidate service strategy set, and the calculation results are used to determine the cost. The strategies are sorted from low to high to generate a first preferred sequence, which clarifies the execution priority of the strategies. If resource conflicts exist in the first preferred sequence, a conflict resolution algorithm is initiated for the conflicting candidate service strategies. This adjusts the resource allocation nodes of the conflicting strategies, eliminating resource conflicts during strategy execution. Finally, the strategy with the smallest weighted cost function value is selected from the adjusted first preferred sequence as the optimal service strategy. This filters out the strategy with the lowest execution cost and no resource conflicts. Therefore, this embodiment uses cost quantification sorting and resource conflict resolution to filter out the optimal service strategy, improving the execution efficiency and resource utilization of the service strategy.
[0046] In this embodiment, specifically, firstly, community resource status data is acquired, and this data is parsed to obtain the real-time task queue length of each responsible entity and the spatial distance between each resource node. The community resource status data originates from community smart terminals, real-time reporting modules of responsible entities, and resource node sensors, covering multi-dimensional information such as responsible entity load, resource distribution, and scheduling records. To address the pain points of large fluctuations and a large amount of invalid data in real-time data in grassroots governance scenarios, this embodiment adopts the following solution: firstly, real-time resource status data is acquired in batches through an encrypted interface; secondly, the data undergoes format standardization processing and unified encoding specifications; and thirdly, a time-series smoothing algorithm is used to reduce noise in the data. D represents the smoothed target data (real-time task queue length / spatial distance), k is the size of the time-series data window, Di is the i-th original data point within the window, and Si is the data reliability weight, set according to the accuracy of the data acquisition equipment; higher accuracy results in a larger weight, with a value range of 0 to 1. After noise reduction, the real-time task queue length of each responsible entity (summarizing the number of currently incomplete tasks) is extracted using field extraction and association algorithms. Combined with the location coordinates of responsible entities and resource nodes in the grassroots governance knowledge graph, the spatial distance is calculated using existing simplified distance algorithms to ensure accurate and stable parsing results. The parsed data is then bound one-to-one with candidate service strategies.
[0047] Next, for each candidate service strategy in the candidate service strategy set, the queuing waiting cost and the movement path cost are calculated, and a weighted cost function is constructed. Specifically, a fusion cost algorithm based on task queue length and urgency is designed, combined with the priority of community service needs, as shown in the following formula: C1 represents the queuing cost, L represents the length of the real-time task queue for the responsible entity, and P represents the urgency coefficient of the demand corresponding to the candidate strategy. For urgent public needs, P has a higher value, ranging from 0 to 1, achieving a linkage between waiting cost and demand urgency. Furthermore, the movement path cost is calculated based on distance and resource scheduling difficulty. C2 represents the movement path cost, D represents the spatial distance, and M represents the resource scheduling difficulty coefficient, which is set according to the resource type (human resources / materials / site). The higher the scheduling difficulty, the larger the coefficient, ranging from 1 to 2. Based on the above two costs, a dynamic weighted cost function is constructed, as shown in the following formula: C represents the total cost, α(t) represents the dynamic time cost weight, and β(t) represents the dynamic resource cost weight. Both are dynamically adjusted according to the real-time load t of community resources. α(t) + β(t) = 1. When resources are scarce, β(t) increases, and when demand is high, α(t) increases. The value range of both is 0 to 1. C1 and C2 represent the queuing cost and the movement path cost, respectively.
[0048] Then, a weighted cost function is used to calculate the cost of each candidate service strategy in the candidate service strategy set, and the strategies are sorted from low to high according to the calculation results to generate a first preferred sequence. First, the candidate service strategy set is traversed one by one, substituting the queuing cost C1 and movement path cost C2 corresponding to each strategy into the weighted cost function to calculate the total cost C of each strategy, while simultaneously recording the cost composition details of each strategy. After the cost calculation is completed, a quicksort algorithm is used to sort all candidate service strategies in ascending order of total cost C, and the sorting threshold is dynamically adjusted according to the number of candidate strategies to avoid order disorder during the sorting process. After sorting, a first preferred sequence is generated, where the strategies at the top of the sequence have lower overall execution costs and higher feasibility. At the same time, the total cost, responsible entity, and resource node information corresponding to each strategy are marked, providing a clear sorting basis for subsequent conflict detection.
[0049] Subsequently, the system checks whether resource occupation conflicts exist in the first preferred sequence. If so, a conflict resolution algorithm is initiated for the conflicting candidate service strategies, adjusting the resource allocation nodes of the conflicting strategies. Resource occupation conflict refers to multiple candidate service strategies requiring the same resource node and overlapping execution times, resulting in resources being unable to simultaneously meet the execution needs of multiple strategies. Therefore, this embodiment first employs a time window overlap detection algorithm, traversing all candidate service strategies in the first preferred sequence, extracting the preset execution duration, required resource nodes, and expected execution time window for each strategy, and determining whether multiple strategies occupy the same resource node with overlapping time windows. If so, it is determined to be a resource occupation conflict, and the identifier of the conflicting strategy, the conflicting resource node, and the time window information are recorded. For conflicting strategies, an improved conflict resolution algorithm is initiated. This algorithm prioritizes retaining strategies with lower total costs. For conflicting strategies with higher total costs, it searches the grassroots governance knowledge graph for backup resource nodes with the same type as the conflicting resource node, close spatial location, and no occupation conflicts, adjusts their resource allocation nodes, and recalculates the total cost of the adjusted strategy to ensure that the adjusted strategy still has a lower execution cost. If no alternative resource node is found, the conflict strategy is temporarily stored in the set to be adjusted. It will be further optimized in the future based on the resource release situation. After the conflict is resolved, the adjusted first preferred sequence is generated to ensure that there are no resource occupation conflicts in all strategies in the sequence.
[0050] Finally, the strategy with the smallest weighted cost function value is selected from the adjusted first preferred sequence, and this selected strategy is taken as the optimal service strategy. Specifically, the adjusted first preferred sequence is first checked for completeness to confirm that all strategies in the sequence have no resource occupation conflicts, the total cost is calculated accurately, and they meet the policy requirements and resource constraints in the structured demand graph fragment. After the check is completed, all candidate service strategies in the sequence are traversed, and the strategy with the smallest weighted cost function value is selected. This strategy has the characteristics of lowest execution cost, feasible resource scheduling, no conflicts, and optimal timeliness. It can meet the service needs of community users while minimizing execution costs and improving resource utilization. After selection, this strategy is marked as the optimal service strategy, and its corresponding total cost, responsible party, resource allocation node, expected execution time, and other core information are recorded in detail.
[0051] As one example of the above solution, the step of generating and outputting structured service description content for the community users based on the optimal service strategy includes: Analyze the target service strategy and extract the service guidance content, responsible entity name, service location, and expected start time contained in the target service strategy; Fill the service guidance content, the name of the responsible entity, the service location, and the expected start time into the preset structured service description template to generate intermediate response text; The intermediate response text is encapsulated into a structured service description, and the structured service description is output to the community users as service response data.
[0052] In this embodiment, the optimal service strategy is first parsed to extract the service guidance content, responsible entity name, service location, and estimated start time, enabling precise extraction of core service information. Next, this extracted information is filled into a pre-set structured service description template to generate intermediate response text, ensuring a standardized format for the service description. Then, the intermediate response text is encapsulated into structured service description content, which is output to community users as service response data. This achieves standardized and clear transmission of service information, facilitating rapid understanding of service details by community users. Therefore, this embodiment generates and transmits clear and standardized structured service description content through precise extraction, standardized encapsulation, and output of service information, improving the service experience and information acquisition efficiency for community users.
[0053] The process begins by analyzing the optimal service strategy, extracting its service guidance content, responsible entity name, service location, and estimated start time. The optimal service strategy is the best solution selected after resource constraint verification, execution timeliness rearrangement, and resource conflict resolution. It includes complete execution steps, responsible entity allocation, resource scheduling plan, and execution time arrangement. Specifically, the optimal service strategy is input into the analysis algorithm. The algorithm first structurally decomposes the optimal service strategy, identifies the core execution links, then associates the responsible entity nodes required for strategy execution, and extracts the standard names of the responsible entities (consistent with node annotations in the knowledge graph). Combined with the resource scheduling plan, it extracts the specific service location corresponding to the service execution (associating with the location information of resource nodes). Based on the dynamic availability window of resources and the working status of the responsible entities, it extracts the accurate estimated start time, ensuring that the time information is consistent with the actual execution plan. Simultaneously, it outlines the specific service execution process and precautions, generating standardized and easy-to-understand service guidance content, clarifying the matters that community users need to cooperate with and the service process nodes. For example, if the optimal service strategy corresponds to health assistance services for the elderly, "in-home health testing" can be accurately extracted as service guidance content. The corresponding responsible entity name, the designated service location in the community, and the expected start time determined by the availability of resources can be extracted. After extraction, all types of information are verified.
[0054] Next, the extracted service guidance content, responsible entity name, service location, and estimated start time are filled into a pre-set structured service description template to generate intermediate response text. The pre-set structured service description template is a standardized template customized for various service scenarios in grassroots governance (people's livelihood security, policy consultation, convenience services, etc.). This template has dedicated fields designed for different service types, with standardized formatting and clear organization, directly adapting to the reading habits of community users and avoiding disorganized content. First, based on the service type corresponding to the optimal service strategy, the corresponding pre-set template is automatically matched to ensure a high degree of compatibility between the template and the service content. Then, a precise field filling algorithm is used to fill the extracted information into the corresponding fields of the template one by one. During the filling process, format adaptation is automatically performed to unify text expression standards and avoid problems such as formatting errors and information misalignment. After filling, intermediate response text is generated, allowing community users to quickly read key content while maintaining the integrity of the service guidance content, ensuring that users can clearly understand the service process and precautions.
[0055] Finally, the intermediate response text is encapsulated into a structured service description, which is then output to community users as service response data. A standardized data encapsulation algorithm is used to package the intermediate response text into a universal structured data format. This format is compatible with various user interaction terminals, such as community smart interactive terminals, mobile SMS, WeChat official accounts, and voice broadcasting devices, ensuring that the service description content can be displayed or broadcast correctly on different terminals. During the encapsulation process, a data verification mechanism is added to ensure the integrity and correct format of the structured service description content, avoiding encapsulation errors that could prevent proper output. After encapsulation, service response data is generated. Through a preset interaction interface, based on the community user's interaction method (such as smart terminal query, voice consultation, etc.), the corresponding output method is automatically selected to output the service response data to the community user. Simultaneously, the service description content is fed back to the corresponding responsible entity, ensuring that the responsible entity and user information are synchronized, forming a service loop.
[0056] See Figure 2 This is a schematic diagram of the structure of an AI-based grassroots governance and community intelligent service system according to an embodiment of the present invention. An AI-based grassroots governance and community intelligent service system includes: The acquisition module 10 is used to acquire multimodal interaction data of community users and resource status data of the community; Extraction module 11 is used to identify the multimodal interaction data, extract multiple semantic segments, and obtain semantic understanding results of the service needs of the community users; The identification module 12 is used to perform semantic similarity matching and conflict detection between each semantic fragment in the semantic understanding result and the policy entity nodes in the constructed grassroots governance knowledge graph, identify the policy association and conflict relationship between the semantic fragments, and obtain structured demand graph fragments. Forward traversal module 13 is used to perform forward traversal along the inheritance and reference relationships of policy entity nodes in the grassroots governance knowledge graph based on the structured demand graph fragment, and generate a preliminary service strategy set; The reverse traversal module 14 is used to perform reverse traversal along the relationship between responsible entities and resource nodes in the grassroots governance knowledge graph based on the structured demand graph fragment and the preliminary service strategy set, and to perform resource constraint verification on each preliminary service strategy in the preliminary service strategy set to obtain a set of candidate service strategies that have passed the verification. The filtering module 15 is used to perform timeliness rearrangement and resource conflict resolution on the candidate service strategy set based on the resource status data of the community, and to filter out the optimal service strategy. Output module 16 is used to generate and output structured service description content for the community users according to the optimal service strategy.
[0057] Compared with the prior art, the embodiments of the present invention have the following beneficial effects: By identifying multimodal interaction data to extract multiple semantic fragments, and performing semantic similarity matching and conflict detection with policy entity nodes in the constructed grassroots governance knowledge graph, a structured demand graph fragment containing policy association and conflict information is constructed to identify potential policy conflicts. Based on this structured demand graph fragment, a preliminary service strategy set is generated by forward traversal along the inheritance and reference relationships of policy entity nodes, and the logical inheritance relationship of the knowledge graph is used to ensure that the strategies meet policy compliance. Then, a reverse traversal is performed along the association relationship between responsible entities and resource nodes to verify the resource constraints of the preliminary service strategies. By matching and verifying the strategies with specific responsible entities and resource status, the feasibility of the strategies is ensured. Finally, based on the real-time resource status data of the community, the candidate service strategy set is rearranged in terms of execution timeliness and resource conflict resolution, and the optimal service strategy is selected. In summary, the embodiments of the present invention solve the problem that existing technologies cannot simultaneously consider policy compliance and implementation feasibility by constructing a structured demand graph fragment that includes conflict detection and combining it with a forward traversal generation mechanism along policy logic and a reverse traversal verification mechanism along resource constraints. This achieves the technical effect of generating a community service strategy with self-consistent logic and conditions for implementation.
[0058] As one example of the above scheme, the extraction module is specifically used for: Acoustic features are extracted from the speech data in the multimodal interaction data, and the dialect speech signal is mapped into a standard Mandarin syllable sequence using a pre-constructed dialect phoneme mapping network to obtain standard speech text. Character-level feature fusion is performed on the text data in the multimodal interaction data and the standard speech text to obtain fused text data; Semantic analysis is performed on the fused text data to obtain multiple semantic fragments with independent semantics; Based on the multiple semantic fragments, a serialized data structure containing the multiple semantic fragments is generated, and the serialized data structure is used as the semantic understanding result.
[0059] As one example of the above scheme, the identification module is specifically used for: Each semantic fragment in the semantic understanding result is converted into a semantic vector, and the similarity matrix between the semantic vector and the entity vector of the policy entity node in the grassroots governance knowledge graph is calculated. Based on the maximum value matching result in the similarity matrix, an initial association pair is established between the semantic fragment and the policy entity node; Obtain the logical constraint edges of each policy entity node involved in the initial association pair in the grassroots governance knowledge graph, and detect whether there is a governance policy logical conflict between the semantic fragments in the initial association pair based on the logical constraint edges, and obtain the conflict detection result; If the conflict detection result indicates that there is a logical conflict in the governance policy, a conflict feature vector containing a conflict type identifier is generated, and the conflict feature vector is attached to the corresponding semantic fragment. The semantic fragments with the attached conflict feature vectors are connected to the corresponding policy entity nodes in a graph structure to construct graph data containing correlation and conflict information, and the graph data is used as the structured demand graph fragment.
[0060] It is understood that the specific implementation methods of the above-described AI-based grassroots governance and community intelligent service system embodiments can be referred to the relevant content of the above-described AI-based grassroots governance and community intelligent service method embodiments, and will not be repeated here.
[0061] It should be noted that the system embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the system embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.
[0062] The above description represents the preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. An AI-based method for grassroots governance and intelligent community services, characterized in that, include: Acquire multimodal interaction data of community users and resource status data of the community; The multimodal interaction data is identified, multiple semantic fragments are extracted, and a semantic understanding result of the service needs of the community users is obtained. Each semantic fragment in the semantic understanding result is matched with the policy entity nodes in the constructed grassroots governance knowledge graph for semantic similarity and conflict detection, and the policy association and conflict relationship between the semantic fragments are identified to obtain structured demand graph fragments; Based on the structured demand graph fragments, a forward traversal is performed in the grassroots governance knowledge graph along the inheritance and reference relationships of policy entity nodes to generate a preliminary service strategy set; Based on the structured demand graph fragment and the preliminary service strategy set, a reverse traversal is performed in the grassroots governance knowledge graph along the relationship between the responsible subject and the resource node. Resource constraint verification is performed on each preliminary service strategy in the preliminary service strategy set to obtain a set of candidate service strategies that pass the verification. Based on the resource status data provided by the community, the candidate service strategy set is reordered according to execution timeliness and resource conflict resolution is performed to select the optimal service strategy. Based on the optimal service strategy, generate and output structured service descriptions for the community users.
2. The AI-based grassroots governance and community intelligent service method as described in claim 1, characterized in that, The process of identifying the multimodal interaction data, extracting multiple semantic fragments, and obtaining a semantic understanding result of the service needs of the community users includes: Acoustic features are extracted from the speech data in the multimodal interaction data, and the dialect speech signal is mapped into a standard Mandarin syllable sequence using a pre-constructed dialect phoneme mapping network to obtain standard speech text. Character-level feature fusion is performed on the text data in the multimodal interaction data and the standard speech text to obtain fused text data; Semantic analysis is performed on the fused text data to obtain multiple semantic fragments with independent semantics; Based on the multiple semantic fragments, a serialized data structure containing the multiple semantic fragments is generated, and the serialized data structure is used as the semantic understanding result.
3. The AI-based grassroots governance and community intelligent service method as described in claim 2, characterized in that, The process involves matching the semantic fragments from the semantic understanding results with policy entity nodes in the constructed grassroots governance knowledge graph, performing semantic similarity matching and conflict detection, identifying policy relationships and conflict relationships between semantic fragments, and obtaining structured demand graph fragments, including: Each semantic fragment in the semantic understanding result is converted into a semantic vector, and the similarity matrix between the semantic vector and the entity vector of the policy entity node in the grassroots governance knowledge graph is calculated. Based on the maximum value matching result in the similarity matrix, an initial association pair is established between the semantic fragment and the policy entity node; Obtain the logical constraint edges of each policy entity node involved in the initial association pair in the grassroots governance knowledge graph, and detect whether there is a governance policy logical conflict between the semantic fragments in the initial association pair based on the logical constraint edges, and obtain the conflict detection result; If the conflict detection result indicates that there is a logical conflict in the governance policy, a conflict feature vector containing a conflict type identifier is generated, and the conflict feature vector is attached to the corresponding semantic fragment. The semantic fragments with the attached conflict feature vectors are connected to the corresponding policy entity nodes in a graph structure to construct graph data containing correlation and conflict information, and the graph data is used as the structured demand graph fragment.
4. The AI-based grassroots governance and community intelligent service method as described in claim 3, characterized in that, The structured demand graph fragment is used to perform a forward traversal along the inheritance and reference relationships of policy entity nodes in the grassroots governance knowledge graph to generate a preliminary service strategy set, including: Map the structured demand graph fragment to the grassroots governance knowledge graph, and lock the graph index position of each policy entity node in the structured demand graph fragment; Starting from the index position of the graph, a forward traversal is performed along the inheritance relationship of the policy entity nodes to obtain the set of applicable scopes of the policy entity nodes in the hierarchical structure of the structured demand graph fragment; Based on the set of applicable scopes, a forward traversal is performed along the reference relationships of the policy entity nodes to retrieve associated service strategy elements and construct the original set of strategy elements; Using the conflict feature vector in the structured demand graph fragment, the service strategy elements in the original strategy element set that have logical mutual exclusion are pruned and filtered to remove the service strategy elements that trigger logical conflicts, and the usable strategy elements are obtained. The available strategy elements are combined according to the processing logic order to generate multiple preliminary service strategies with execution steps, and the set of the multiple preliminary service strategies is taken as the preliminary service strategy set.
5. The AI-based grassroots governance and community intelligent service method as described in claim 4, characterized in that, Based on the structured demand graph fragments and the preliminary service strategy set, a reverse traversal is performed along the relationship between responsible entities and resource nodes in the grassroots governance knowledge graph. Resource constraint verification is then performed on each preliminary service strategy in the preliminary service strategy set to obtain a set of verified candidate service strategies, including: Analyze each preliminary service strategy in the preliminary service strategy set, and extract the target responsible entity type and target resource type required for the execution of each preliminary service strategy; Locate the responsible entity node and resource node corresponding to the target responsible entity type and the target resource type in the grassroots governance knowledge graph; Starting from the responsible entity node and the resource node, traverse backwards along the association relationship to query the current working status of the responsible entity node and the dynamic availability time window of the resource node; The preset execution duration of the initial service strategy is matched with the dynamic available time window to determine whether there is an available time segment that can accommodate the preset execution duration. If it exists, the corresponding preliminary service strategy is marked as verified, and the set of all verified preliminary service strategies is taken as the candidate service strategy set.
6. The AI-based grassroots governance and community intelligent service method as described in claim 5, characterized in that, The step of reordering the candidate service strategy set based on the community's resource status data and resolving resource conflicts to select the optimal service strategy includes: Obtain the resource status data of the community, and parse the resource status data to obtain the real-time task queue length of each responsible entity and the spatial distance of each resource node; For each candidate service strategy in the candidate service strategy set, the queuing cost is calculated based on the real-time task queue length, and the movement path cost is calculated based on the spatial location distance. A weighted cost function including time cost and resource cost is constructed. The weighted cost function is used to calculate the cost of each candidate service strategy in the candidate service strategy set, and the results are sorted from low to high to generate a first preferred sequence. If there is a resource occupation conflict in the first preferred sequence, a conflict resolution algorithm is started for the candidate service strategy with conflict, and the resource allocation node of the conflict strategy is adjusted. The strategy with the smallest weighted cost function value is selected from the adjusted first preferred sequence, and the selected strategy is taken as the optimal service strategy.
7. The AI-based grassroots governance and community intelligent service method as described in claim 6, characterized in that, The step of generating and outputting structured service description content for the community users based on the optimal service strategy includes: Analyze the target service strategy and extract the service guidance content, responsible entity name, service location, and expected start time contained in the target service strategy; Fill the service guidance content, the name of the responsible entity, the service location, and the expected start time into the preset structured service description template to generate intermediate response text; The intermediate response text is encapsulated into a structured service description, and the structured service description is output to the community users as service response data.
8. An AI-based grassroots governance and community intelligent service system, characterized in that, include: The acquisition module is used to acquire multimodal interaction data of community users and resource status data of the community; The extraction module is used to identify the multimodal interaction data, extract multiple semantic fragments, and obtain the semantic understanding results of the service needs of the community users. The identification module is used to perform semantic similarity matching and conflict detection between each semantic fragment in the semantic understanding result and the policy entity nodes in the constructed grassroots governance knowledge graph, identify the policy association and conflict relationship between semantic fragments, and obtain structured demand graph fragments; The forward traversal module is used to perform forward traversal along the inheritance and reference relationships of policy entity nodes in the grassroots governance knowledge graph based on the structured demand graph fragments, and generate a preliminary service strategy set; The reverse traversal module is used to perform reverse traversal along the relationship between responsible entities and resource nodes in the grassroots governance knowledge graph based on the structured demand graph fragment and the preliminary service strategy set, and to verify the resource constraints of each preliminary service strategy in the preliminary service strategy set to obtain a set of candidate service strategies that have passed the verification. The filtering module is used to perform timeliness rearrangement and resource conflict resolution on the candidate service strategy set based on the resource status data of the community, and to filter out the optimal service strategy. The output module is used to generate and output structured service description content for the community users based on the optimal service strategy.
9. The AI-based grassroots governance and community intelligent service system as described in claim 8, characterized in that, The extraction module is specifically used for: Acoustic features are extracted from the speech data in the multimodal interaction data, and the dialect speech signal is mapped into a standard Mandarin syllable sequence using a pre-constructed dialect phoneme mapping network to obtain standard speech text. Character-level feature fusion is performed on the text data in the multimodal interaction data and the standard speech text to obtain fused text data; Semantic analysis is performed on the fused text data to obtain multiple semantic fragments with independent semantics; Based on the multiple semantic fragments, a serialized data structure containing the multiple semantic fragments is generated, and the serialized data structure is used as the semantic understanding result.
10. The AI-based grassroots governance and community intelligent service system as described in claim 9, characterized in that, The identification module is specifically used for: Each semantic fragment in the semantic understanding result is converted into a semantic vector, and the similarity matrix between the semantic vector and the entity vector of the policy entity node in the grassroots governance knowledge graph is calculated. Based on the maximum value matching result in the similarity matrix, an initial association pair is established between the semantic fragment and the policy entity node; Obtain the logical constraint edges of each policy entity node involved in the initial association pair in the grassroots governance knowledge graph, and detect whether there is a governance policy logical conflict between the semantic fragments in the initial association pair based on the logical constraint edges, and obtain the conflict detection result; If the conflict detection result indicates that there is a logical conflict in the governance policy, a conflict feature vector containing a conflict type identifier is generated, and the conflict feature vector is attached to the corresponding semantic fragment. The semantic fragments with the attached conflict feature vectors are connected to the corresponding policy entity nodes in a graph structure to construct graph data containing correlation and conflict information, and the graph data is used as the structured demand graph fragment.