An intelligent recommendation method and system based on multi-source data fusion and knowledge graph
By constructing a dynamic heterogeneous knowledge graph and employing reinforcement learning strategies, the problem of heterogeneous modeling of multimodal data is solved, enabling high-quality intelligent recommendations and improving the accuracy and transparency of recommendation systems. This approach is applicable to fields such as government affairs and public services.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HENAN HAOZHIDE INFORMATION TECH CO LTD
- Filing Date
- 2026-05-28
- Publication Date
- 2026-07-31
AI Technical Summary
Existing intelligent recommendation systems lack effective alignment mechanisms when processing multimodal product information, resulting in representations of different modalities existing in a heterogeneous space, making collaborative modeling difficult and affecting the accurate characterization of the essential features of items. Furthermore, knowledge graph-based path recommendation methods fail to distinguish between high-noise and high-semantic-support paths, easily introducing erroneous reasoning chains and leading to recommendation bias or inaccuracy.
We construct a dynamic heterogeneous knowledge graph that integrates user behavior, text description, and external knowledge base. We achieve cross-modal semantic alignment through modality-specific encoding and graph structure reconstruction, calculate the semantic uncertainty entropy value of the reasoning path, dynamically adjust the contrastive learning weights and causal reasoning correction strength, generate meta-path templates using a large language model, select the optimal path through reinforcement learning, and generate a comprehensive recommendation score.
It achieves unified representation and high-quality recommendation of multi-source heterogeneous data, improves the reliability and robustness of recommendation results, enhances the transparency and user trust of the recommendation process, and is applicable to scenarios such as government affairs, public services, and resource allocation.
Smart Images

Figure CN122489751A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent recommendation system technology, and in particular to an intelligent recommendation method and system based on multi-source data fusion and knowledge graph. Background Technology
[0002] Intelligent recommendation systems are a technology that utilizes artificial intelligence, machine learning, and big data analytics to automatically understand user interests and needs, and then select the content or products most likely to match user preferences from a massive pool of candidates for personalized recommendations. By modeling user behavior, item attributes, and the complex interactions between the two, it achieves accurate matching and prediction. It is widely used in e-commerce, content platforms, social networks, online advertising, and other fields, aiming to improve user experience, increase platform conversion rates, and optimize resource distribution efficiency.
[0003] When processing multimodal product information such as images and text, existing methods often lack effective alignment mechanisms. The representations of different modalities are in a heterogeneous space, making it difficult to coordinate modeling and affecting the accurate characterization of the essential features of the project. Furthermore, existing path recommendation methods based on knowledge graphs often treat all paths equally, failing to distinguish between high-noise, low-confidence paths and paths with high semantic support, which can easily introduce erroneous reasoning chains, leading to recommendation bias or inaccuracy. Summary of the Invention
[0004] In view of the aforementioned existing problems, the present invention is proposed.
[0005] Therefore, this invention provides an intelligent recommendation method based on multi-source data fusion and knowledge graphs. This solves the problem that existing methods often lack effective alignment mechanisms when processing multimodal product information such as images and text. The representations of different modalities are in a heterogeneous space, making it difficult to coordinate modeling and affecting the accurate characterization of the essential features of the items. Furthermore, existing path recommendation methods based on knowledge graphs often treat all paths the same, failing to distinguish between high-noise, low-confidence paths and paths with high semantic support, which can easily introduce erroneous reasoning chains and lead to recommendation bias or inaccuracy.
[0006] To solve the above-mentioned technical problems, the present invention provides the following technical solution:
[0007] In a first aspect, the present invention provides an intelligent recommendation method based on multi-source data fusion and knowledge graph, comprising:
[0008] Construct a dynamic heterogeneous knowledge graph that integrates user behavior, text descriptions, and external knowledge bases;
[0009] Based on dynamic heterogeneous knowledge graphs, modality-specific encoding is performed on multi-source heterogeneous data, and cross-modal semantic alignment and graph structure reconstruction are jointly optimized to generate unified node representations with semantic alignment.
[0010] For each inference path from the user node to the candidate project node, the semantic uncertainty entropy value of the inference path is calculated based on the entity type distribution, relationship frequency and semantic consistency characteristics in the path.
[0011] Based on the semantic uncertainty entropy value, the contrastive learning weights in the cross-modal alignment optimization process and the correction strength of counterfactual intervention in the causal reasoning process are dynamically adjusted.
[0012] A meta-path template is generated by combining a large language model with domain knowledge, and instantiated into a set of inference paths in a dynamic heterogeneous knowledge graph. The optimal subset of inference paths is selected through a reinforcement learning strategy.
[0013] Based on the dynamically adjusted causal correction weights and the selected optimal reasoning path subset, the comprehensive recommendation score of the candidate items is calculated and the recommendation result is output.
[0014] As a preferred embodiment of the intelligent recommendation method based on multi-source data fusion and knowledge graph described in this invention, the specific steps for constructing a dynamic heterogeneous knowledge graph that integrates user behavior, text description, and external knowledge base are as follows:
[0015] Extract user identifiers, project identifiers, and interaction types from user interaction logs to form a set of behavior triples. Each triple represents a user node, a behavior relationship, and a project node.
[0016] The project description text or policy document is structured and parsed to extract fields such as applicable objects, application conditions, support types, and validity period. Unstructured project description text is segmented and semantic units are extracted. The extraction results are mapped to the corresponding entity nodes in the predefined ontology to form a set of text attribute triples. Each triple represents a project node, attribute relationship, and ontology entity.
[0017] Call the external general knowledge base interface to obtain triple data covering policies and regulations, public affairs rules, qualification standards or public services. Through string matching and semantic similarity calculation, align the local ontology entities with the corresponding entities in the external knowledge base and establish cross-source entity links.
[0018] Assign a unique global identifier and a clear type label to all nodes, and assign a relationship type label and a timestamp to all edges to build a graph database structure that supports incremental updates, historical snapshot backtracking, and efficient path querying.
[0019] As a preferred embodiment of the intelligent recommendation method based on multi-source data fusion and knowledge graph described in this invention, the specific steps of performing modality-specific encoding on multi-source heterogeneous data and jointly optimizing cross-modal semantic alignment and graph structure reconstruction are as follows:
[0020] Input the user's historical behavior sequence into the temporal modeling network, use the text embedding vector as the input sequence element, and output the user behavior context-aware embedding vector;
[0021] Initialize the node features in the graph neural network. The initial features of the project node are composed of its text embedding vector, and the initial features of the user node are its behavior embedding vector.
[0022] Perform multi-level graph message passing operations. In each level, each node aggregates the feature information of its first-order neighbors. The aggregation process uses normalized adjacency weights.
[0023] During training, cross-modal alignment and graph structure reconstruction objectives are simultaneously optimized. The overall training loss function is a weighted combination of two sub-losses, expressed as follows:
[0024] ;
[0025] in, Indicates total training loss. This represents the cross-modal alignment loss, used to bridge the gap between different sources of descriptions of the same project in a unified representation space. This represents the graph link prediction loss, used to reconstruct missing or implicit edges in the original graph. It is a balance coefficient and its value ranges from zero to one;
[0026] By minimizing this loss function, we can achieve alignment of multi-source heterogeneous data in a unified semantic space and collaborative reconstruction of graph structures.
[0027] As a preferred embodiment of the intelligent recommendation method based on multi-source data fusion and knowledge graph described in this invention, the specific steps for calculating the semantic uncertainty entropy value of the reasoning path are as follows:
[0028] Traverse all inference paths that start from the user node, end at the candidate project node, and have a length not exceeding a preset limit.
[0029] For each reasoning path, the global frequency of each type of relation appearing in the path is counted in the entire knowledge graph. The lower the frequency, the sparser the relation.
[0030] Count the number of entity types involved in the path; the more types, the more dispersed the semantics of the path.
[0031] After normalizing the two indicators, a linear weighted average is taken to obtain the semantic confidence score of the path. The calculation expression is as follows:
[0032] ;
[0033] in, Representing a path The semantic confidence score, Representing a path The minimum frequency of all relation types appearing in the entire graph. Representing a path The number of different entity types involved Representing a path number of sides ,
[0034] Confidence score Take the negative logarithm to generate the semantic uncertainty entropy value. The higher the entropy value, the lower the path reliability.
[0035] As a preferred embodiment of the intelligent recommendation method based on multi-source data fusion and knowledge graph described in this invention, the specific steps of dynamically adjusting the contrastive learning weights in the cross-modal alignment optimization process and the correction intensity of counterfactual intervention in the causal reasoning process based on the semantic uncertainty entropy value are as follows:
[0036] During the cross-modal contrastive learning training phase, if a sample of a certain item appears in a high-entropy path, its weight in the batch contrastive loss is set to... This is used to reduce the interference of noisy samples on the unified representation space;
[0037] During the causal reasoning phase, a backdoor adjustment is performed on each path to eliminate confounding biases, with the counterfactual intervention's correction strength set to... That is, the low-entropy path obtains stronger causal effect correction;
[0038] In the reward design of reinforcement learning strategies, the immediate reward for a selected path includes... The weighted terms guide the policy network to prioritize exploring semantically clear and structurally reliable reasoning paths.
[0039] As a preferred embodiment of the intelligent recommendation method based on multi-source data fusion and knowledge graph described in this invention, the specific steps are as follows: Generating meta-path templates using a large language model combined with domain knowledge, instantiating them into a set of inference paths in a dynamic heterogeneous knowledge graph, and selecting the optimal subset of inference paths through a reinforcement learning strategy.
[0040] The set of legal entity types and the set of legal relations in the domain ontology are predefined to form the syntactic constraints for meta-path generation;
[0041] Construct structured prompt words and explicitly require the large language model to use only predefined types and relations to generate legal path patterns from user nodes to item nodes;
[0042] Receive the metapath string output by the large language model, parse it into an alternating sequence of type relations, and verify each item to see if it conforms to the ontology rules;
[0043] Remove invalid templates that contain circular references, illegal jumps, type mismatches, or exceed the length threshold;
[0044] The retained valid meta-path templates are instantiated in the dynamic heterogeneous knowledge graph. All node combinations that satisfy type sequence matching are traversed in the graph to generate a specific set of inference path instances.
[0045] Construct a reinforcement learning agent whose state is the current path prefix and whose action is to select the next legal neighbor node. The reward function comprehensively considers whether the path endpoint is the target item, the path semantic confidence score, and the user's historical preference matching degree.
[0046] The agent is trained using a policy gradient algorithm, enabling it to efficiently search for subsets of high-value paths in an exponential path space.
[0047] As a preferred embodiment of the intelligent recommendation method based on multi-source data fusion and knowledge graph described in this invention, the specific steps for calculating the comprehensive recommendation score of candidate items and outputting the recommendation result based on the dynamically adjusted causal correction weights and the selected optimal reasoning path subset are as follows:
[0048] For each inference path selected by the reinforcement learning strategy, obtain its corresponding causal correction weights. With regulatory factors ;
[0049] Multiplying the causal correction weight by the adjustment factor yields the contribution of this path to the target project.
[0050] For each candidate project The overall recommendation score for this project is calculated by summing the contribution values of all paths ending at it. The formula is as follows:
[0051] ;
[0052] in, Indicates candidate projects The overall recommendation score, This represents the subset of optimal inference paths selected by the reinforcement learning strategy. Representing a path The endpoint;
[0053] All candidate projects are sorted in descending order based on their comprehensive recommendation scores, and the top N projects are selected to form the final recommendation list.
[0054] For each recommended item, the reasoning path that contributes the most to its score is selected, the metastructure and specific entity names of that path are extracted, and they are substituted into a preset natural language template to generate an interpretable statement. The recommended list and the corresponding interpretable statement are then returned to the user terminal.
[0055] Secondly, this invention provides an intelligent recommendation system based on multi-source data fusion and knowledge graphs, comprising:
[0056] The module includes a dynamic heterogeneous knowledge graph construction module, a unified node representation generation module, a reasoning path semantic evaluation module, a causal correction intensity control module, a meta-path guidance path search module, and a comprehensive recommendation score calculation module.
[0057] The dynamic heterogeneous knowledge graph construction module is used to extract structured triple information from user behavior logs, project description text and external knowledge bases, and integrate them to construct a dynamic heterogeneous knowledge graph that supports incremental updates and efficient queries.
[0058] The unified node representation generation module is used to perform feature-specific encoding on multi-source heterogeneous data such as text descriptions and user behavior sequences, and generate a semantically consistent and structure-aware unified node embedding representation by jointly optimizing semantic alignment loss and graph link prediction loss.
[0059] The inference path semantic evaluation module is used to traverse all feasible inference paths from user nodes to candidate project nodes, and calculate the semantic confidence score and its corresponding semantic uncertainty entropy value for each path based on the frequency of relations, diversity of entity types and semantic consistency features in the path.
[0060] The causal correction intensity control module is used to dynamically generate adjustment factors based on the semantic uncertainty entropy value of the reasoning path, and adjust the sample weights in contrastive learning and the correction intensity of counterfactual intervention in causal reasoning accordingly, so as to achieve an adaptive balance between noise suppression and causal effect enhancement.
[0061] The meta-path guidance path search module is used to generate legal meta-path templates under the constraints of domain ontology using a large language model, instantiate them into a set of specific reasoning paths in the knowledge graph, and select the optimal subset of high-value and high-reliability paths from them through reinforcement learning strategies.
[0062] The comprehensive recommendation score calculation module is used to combine the dynamically adjusted causal correction weights with the selected optimal reasoning path subset, weighted summation of the contribution of each path, generate a comprehensive recommendation score for candidate items, and output a recommendation list and corresponding interpretable statements in sorted order of scores.
[0063] Thirdly, the present invention provides a computer device, including a memory and a processor, wherein the memory stores a computer program, wherein: when the computer program is executed by the processor, it implements any step of the intelligent recommendation method based on multi-source data fusion and knowledge graph as described in the first aspect of the present invention.
[0064] Fourthly, the present invention provides a computer-readable storage medium having a computer program stored thereon, wherein: when the computer program is executed by a processor, it implements any step of the intelligent recommendation method based on multi-source data fusion and knowledge graph as described in the first aspect of the present invention.
[0065] The beneficial effects of this invention are as follows: By constructing a dynamic heterogeneous knowledge graph that integrates user behavior, project text descriptions, and external authoritative knowledge bases, and combining it with a large language model to generate meta-path templates under domain constraints, accurate and intelligent matching for policy, service, or funding projects is achieved. A unified and structure-aware node representation is generated using semantic alignment and graph structure collaborative optimization mechanisms, effectively integrating multi-source heterogeneous information. A dynamic adjustment strategy based on the entropy value of semantic uncertainty in reasoning paths is introduced to adaptively adjust the weights of contrastive learning and the intensity of causal correction, significantly improving the reliability and robustness of the recommendation results. Simultaneously, through a reinforcement learning-guided high-value path search and interpretable generation mechanism, not only is the accuracy of project matching improved, but the transparency and user trust in the recommendation process are also enhanced, providing efficient, reliable, and interpretable intelligent decision support for scenarios such as government affairs, public services, and resource allocation. Attached Figure Description
[0066] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0067] Figure 1 This is a flowchart of the intelligent recommendation method based on multi-source data fusion and knowledge graph in Example 1.
[0068] Figure 2 This is a schematic diagram of the intelligent recommendation system based on multi-source data fusion and knowledge graph in Example 1. Detailed Implementation
[0069] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0070] Many specific details are set forth in the following description in order to provide a full understanding of the invention. However, the invention may also be practiced in other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of the invention. Therefore, the invention is not limited to the specific embodiments disclosed below.
[0071] Secondly, the term "one embodiment" or "embodiment" as used herein refers to a specific feature, structure, or characteristic that may be included in at least one implementation of the present invention. The phrase "in one embodiment" appearing in different places in this specification does not necessarily refer to the same embodiment, nor is it a single or selective embodiment that is mutually exclusive with other embodiments.
[0072] Example 1, referring to Figure 1 and Figure 2 This is one embodiment of the present invention, which provides an intelligent recommendation method based on multi-source data fusion and knowledge graph, including the following steps:
[0073] S1. Construct a dynamic heterogeneous knowledge graph that integrates user behavior, text descriptions, and external knowledge bases.
[0074] Furthermore, user identifiers, project identifiers, and interaction types are extracted from user interaction logs to form a set of behavior triples, where each triple represents a user node, behavior relationship, and project node. The project description text or policy document is then structured and parsed to extract fields such as applicable objects, application conditions, support types, and validity period. Unstructured project description text is then segmented into sentences and semantic units are extracted. The extraction results are mapped to corresponding entity nodes in a predefined ontology to form a set of text attribute triples, where each triple represents a project node, attribute relationship, and ontology entity.
[0075] By calling the interface of an external general knowledge base, triple data covering policies and regulations, public affairs rules, qualification standards, or public services are obtained. Through string matching and semantic similarity calculation, the local ontology entities are aligned with the corresponding entities in the external knowledge base to establish cross-source entity links. A unique global identifier and explicit type label are assigned to all nodes, and a relationship type label and timestamp are assigned to all edges to build a graph database structure that supports incremental updates, historical snapshot backtracking, and efficient path query.
[0076] It should be noted that by integrating multi-source heterogeneous data to construct a dynamic heterogeneous knowledge graph, not only is deep association modeling of users and items in a multi-dimensional semantic space achieved, but a structured, scalable, and time-aware knowledge base is also provided for subsequent cross-modal alignment, path reasoning, and explainable recommendation, enhancing the system's ability to understand complex user intentions and item attributes.
[0077] In particular, this step, by unifying user behavior, product image and text information, social interaction, and external common sense knowledge into a graph modeling framework, not only solves the data silo problem in traditional recommendation systems, but also extends the connection between users and items beyond explicit interactions to multiple cognitive dimensions such as semantics, vision, society, and common sense. This multi-source fusion graph structure naturally supports incremental updates and time evolution modeling, providing a basic architectural guarantee for the system to continuously learn and adapt to dynamic scenarios, thereby fundamentally improving the completeness and timeliness of knowledge representation.
[0078] S2. Based on dynamic heterogeneous knowledge graphs, modality-specific encoding is performed on multi-source heterogeneous data, and cross-modal semantic alignment and graph structure reconstruction are jointly optimized to generate a unified node representation with semantic alignment.
[0079] Furthermore, the user's historical behavior sequence is input into the temporal modeling network, with text embedding vectors as input sequence elements, and the output is a user behavior context-aware embedding vector; the node features in the graph neural network are initialized, the initial features of item nodes are composed of their text embedding vectors, and the initial features of user nodes are their behavior embedding vectors; multi-layer graph message passing operations are performed, in each layer, each node aggregates the feature information of its first-order neighbors, and the aggregation process uses normalized adjacency weights.
[0080] During training, cross-modal alignment and graph structure reconstruction objectives are simultaneously optimized. The overall training loss function is a weighted combination of two sub-losses, expressed as follows:
[0081] ;
[0082] in, Indicates total training loss. This represents the cross-modal alignment loss, used to bridge the gap between different sources of descriptions of the same project in a unified representation space. This represents the graph link prediction loss, used to reconstruct missing or implicit edges in the original graph. The loss function is a balancing coefficient with a value between zero and one. By minimizing this loss function, the alignment of multi-source heterogeneous data in a unified semantic space and the collaborative reconstruction of the graph structure are achieved.
[0083] It should be noted that the use of modality-specific encoding and joint optimization mechanism effectively bridges the semantic gap between text, images and behavior sequences. While preserving the specificity of each modality, it achieves semantic consistency in a unified representation space, enabling graph neural networks to more accurately capture high-order dependencies between nodes, thereby improving the overall representation quality and the generalization performance of downstream recommendation tasks.
[0084] Specifically, this step employs modality-specific encoders to process data from different sources and achieves deep fusion of cross-modal information during message passing in the graph neural network. The underlying logic is as follows: first, the original semantic characteristics of each modality are preserved, and then a joint optimization mechanism guided by the graph structure is used to promote semantic alignment between different modalities in the shared space. This strategy of separating and then combining avoids information mixing caused by simple splicing. At the same time, the graph link reconstruction task is used to feed back into representation learning, so that node embedding not only reflects its own attributes but also implies its role in the global relational network, thereby providing a high-quality, structure-aware semantic foundation for subsequent high-order reasoning.
[0085] S3. For each inference path from the user node to the candidate project node, calculate the semantic uncertainty entropy value of the inference path based on the distribution of entity types, frequency of relationship occurrence, and semantic consistency characteristics in the path.
[0086] Furthermore, it iterates through all reasoning paths that start from the user node, end at the candidate project node, and have a length not exceeding a preset limit. For each reasoning path, it counts the global frequency of each relation type appearing in the path in the entire knowledge graph. The lower the frequency, the sparser the relation. It also counts the number of entity types involved in the path. The more types, the more dispersed the semantics of the path.
[0087] After normalizing the two indicators, a linear weighted average is taken to obtain the semantic confidence score of the path. The calculation expression is as follows:
[0088] ;
[0089] in, Representing a path The semantic confidence score, Representing a path The minimum frequency of all relation types appearing in the entire graph. Representing a path The number of different entity types involved Representing a path number of sides , Confidence score Take the negative logarithm to generate the semantic uncertainty entropy value. The higher the entropy value, the lower the path reliability.
[0090] It should be noted that by comprehensively considering dimensions such as the sparsity of relationships, the diversity of entity types, and multimodal consistency in the path, the semantic reliability of the reasoning path can be quantitatively evaluated. This can effectively identify and suppress unreliable reasoning chains caused by noise or sparse connections, providing a reliable basis for subsequent causal correction and path selection, and enhancing the robustness and rationality of the recommendation logic.
[0091] In particular, this step introduces a path-level semantic uncertainty assessment mechanism. Its core is to treat the reasoning path as a whole semantic unit rather than a stack of isolated edges. By analyzing the sparsity of relationships, type diversity, and multimodal consistency within the path, its credibility is characterized from multiple perspectives. This design stems from a deep understanding of the prevalence of noisy paths in real recommendation scenarios. It can effectively distinguish between reliable paths with strong semantic support and weakly associated paths with accidental connections, providing fine-grained and interpretable confidence basis for subsequent dynamic adjustment mechanisms, thereby improving the robustness of the entire reasoning process.
[0092] S4. Based on the semantic uncertainty entropy value, dynamically adjust the contrastive learning weights in the cross-modal alignment optimization process and the correction strength of counterfactual intervention in the causal reasoning process.
[0093] Furthermore, during the cross-modal contrastive learning training phase, if a sample of a certain item appears in a high-entropy path, its weight in the batch contrastive loss is set to... This is used to reduce the interference of noisy samples on the unified representation space; during the causal inference phase, a backdoor adjustment is performed on each path to eliminate confounding bias, and the correction strength of the counterfactual intervention is set to... This means that low-entropy paths receive stronger causal effect correction; in the reward design of reinforcement learning strategies, the immediate reward for selecting a path includes... The weighted terms guide the policy network to prioritize exploring semantically clear and structurally reliable reasoning paths.
[0094] It should be noted that by dynamically adjusting the contrastive learning weights and causal intervention intensity based on semantic uncertainty, the model can adaptively focus on high-confidence paths during training and inference. This reduces the interference of low-quality samples on representation learning and strengthens the expression of causal effects on reliable paths, thereby improving recommendation accuracy while ensuring the causal rationality of the decision-making process.
[0095] In particular, this step transforms semantic uncertainty into an adjustable learning signal, which runs through the three key stages of representation learning, causal inference, and policy exploration. Its implementation logic is based on the reasonable assumption that high-uncertainty paths should be suppressed and low-uncertainty paths should be reinforced. By synchronously influencing the contrastive learning weights, causal correction strength, and reinforcement learning rewards through a unified adjustment factor, the system can adaptively focus on high-quality evidence chains in both the training and inference stages. This not only improves the model's noise resistance but also enhances the reliability of causal inference, making recommendation decisions closer to real user intentions.
[0096] S5. Generate meta-path templates by combining large language models with domain knowledge, and instantiate them into a set of inference paths in a dynamic heterogeneous knowledge graph. Select the optimal subset of inference paths through reinforcement learning strategies.
[0097] Furthermore, a predefined set of legal entity types and legal relation sets in the domain ontology constitutes the syntactic constraints for meta-path generation; structured prompt words are constructed, explicitly requiring the large language model to use only predefined types and relations to generate legal path patterns from user nodes to project nodes; the meta-path strings output by the large language model are received, parsed into alternating sequences of type relations, and each item is verified to conform to the ontology rules; invalid templates containing circular references, illegal jumps, type mismatches, or exceeding the length threshold are removed; the retained valid meta-path templates are instantiated in a dynamic heterogeneous knowledge graph, and all node combinations that satisfy type sequence matching in the graph are traversed to generate a specific set of inference path instances.
[0098] Construct a reinforcement learning agent whose state is the current path prefix and whose action is to select the next legitimate neighbor node. The reward function comprehensively considers whether the path endpoint is the target item, the path semantic confidence score, and the user's historical preference matching degree. Train the agent through the policy gradient algorithm so that it learns to efficiently search for a subset of high-value paths in the exponential path space.
[0099] It should be noted that by using a large language model to generate meta-path templates that conform to domain ontology constraints, and combining reinforcement learning to efficiently search for high-quality reasoning paths in a large-scale graph, not only can the limitations of manually designed path rules be overcome, but also the automatic discovery and utilization of complex user-item association patterns can be achieved, thereby improving the flexibility, coverage and interpretability of the recommendation system.
[0100] In particular, this step innovatively combines the language generation capabilities of a large language model with the structural constraints of a domain ontology, enabling the automatic conversion from natural language prompts to legitimate meta-path templates. This solves the bottleneck of traditional methods that rely on experts manually defining path patterns. On this basis, through reinforcement learning, a goal-oriented search is performed in the instantiated path space, enabling the system to dynamically select the most predictive reasoning logic based on the current user state. This retains the structural advantages of knowledge graphs while giving the recommendation process a high degree of flexibility and context awareness.
[0101] S6. Based on the dynamically adjusted causal correction weights and the selected optimal reasoning path subset, calculate the comprehensive recommendation score of the candidate items and output the recommendation results.
[0102] Furthermore, for each inference path selected by the reinforcement learning strategy, its corresponding causal correction weights are obtained. With regulatory factors Multiply the causal correction weight by the adjustment factor to obtain the contribution value of the path to the target project.
[0103] For each candidate project The overall recommendation score for this project is calculated by summing the contribution values of all paths ending at it. The formula is as follows:
[0104] ;
[0105] in, Indicates candidate projects The overall recommendation score, This represents the subset of optimal inference paths selected by the reinforcement learning strategy. Representing a path The endpoint.
[0106] All candidate items are sorted in descending order based on their comprehensive recommendation scores, and the top N items are selected to form the final recommendation list. For each recommended item, the reasoning path that contributes the most to its score is selected, the metastructure and specific entity names of the path are extracted, and they are substituted into a preset natural language template to generate an interpretable statement. The recommendation list and the corresponding interpretable statement are then returned to the user terminal.
[0107] It should be noted that by weighting and aggregating the dynamically corrected path contributions to generate the final recommendation score and simultaneously outputting a natural language explanation based on the optimal inference path, not only is the high relevance and personalization of the recommendation results ensured, but also clear and credible reasons for the recommendations are provided to users, thereby improving the human-computer interaction experience and users' trust in the system.
[0108] Specifically, this step uses the causally corrected path contribution as the core calculation unit for the recommendation score. Its design philosophy is to base the final decision on a traceable and verifiable reasoning chain. Each path not only contributes a score but also carries complete semantic explanation information, making the recommendation results naturally interpretable. At the same time, by aggregating the weighted contributions of multiple high-value paths, the system can integrate various recommendation reasons to achieve a more comprehensive, balanced, and personalized recommendation output, effectively improving user acceptance and system transparency.
[0109] This embodiment also provides an intelligent recommendation system based on multi-source data fusion and knowledge graph, including:
[0110] The system includes a dynamic heterogeneous knowledge graph construction module, a unified node representation generation module, a reasoning path semantic evaluation module, a causal correction intensity control module, a meta-path guidance path search module, and a comprehensive recommendation score calculation module.
[0111] The dynamic heterogeneous knowledge graph construction module is used to extract structured triple information from user behavior logs, project description text, and external knowledge bases, and integrate them to construct a dynamic heterogeneous knowledge graph that supports incremental updates and efficient queries.
[0112] The unified node representation generation module is used to perform feature-specific encoding on multi-source heterogeneous data such as text descriptions and user behavior sequences, and generate a semantically consistent and structure-aware unified node embedding representation by jointly optimizing semantic alignment loss and graph link prediction loss.
[0113] The inference path semantic evaluation module is used to traverse all feasible inference paths from user nodes to candidate project nodes, and calculate the semantic confidence score and its corresponding semantic uncertainty entropy value for each path based on the frequency of relations, diversity of entity types and semantic consistency features in the path.
[0114] The causal correction intensity control module is used to dynamically generate adjustment factors based on the semantic uncertainty entropy value of the reasoning path, and adjust the sample weights in contrastive learning and the correction intensity of counterfactual intervention in causal reasoning accordingly, so as to achieve an adaptive balance between noise suppression and causal effect enhancement.
[0115] The meta-path guidance path search module is used to generate legitimate meta-path templates under the constraints of domain ontology using a large language model, instantiate them into a set of specific reasoning paths in the knowledge graph, and select the optimal subset of high-value and high-reliability paths from them through reinforcement learning strategies.
[0116] The comprehensive recommendation score calculation module is used to combine the dynamically adjusted causal correction weights with the selected optimal reasoning path subset, weighted summation of the contribution of each path, generate a comprehensive recommendation score for candidate items, and output a recommendation list and corresponding interpretable statements in sorted order of scores.
[0117] This embodiment also provides a computer device applicable to the intelligent recommendation method based on multi-source data fusion and knowledge graph, including: a memory and a processor; the memory is used to store computer-executable instructions, and the processor is used to execute the computer-executable instructions to implement the intelligent recommendation method based on multi-source data fusion and knowledge graph proposed in the above embodiment.
[0118] This embodiment also provides a storage medium storing a computer program that, when executed by a processor, implements the intelligent recommendation method based on multi-source data fusion and knowledge graphs as proposed in the above embodiments. The storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as Static Random Access Memory (SRAM), Electrically Erasable Programmable Read-Only Memory (EEPROM), Erasable Programmable Read Only Memory (EPROM), Programmable Red-Only Memory (PROM), Read-Only Memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.
[0119] In summary, this invention constructs a dynamic heterogeneous knowledge graph that integrates user behavior, project text descriptions, and external authoritative knowledge bases. Combined with a large language model to generate domain-constrained meta-path templates, it achieves accurate and intelligent matching for policy, service, or funding projects. Utilizing semantic alignment and graph structure collaborative optimization mechanisms, it generates unified and structure-aware node representations, effectively integrating multi-source heterogeneous information. By introducing a dynamic adjustment strategy based on the entropy value of semantic uncertainty in inference paths, it adaptively adjusts the weights of contrastive learning and the intensity of causal correction, significantly improving the reliability and robustness of recommendation results. Furthermore, through reinforcement learning-guided high-value path search and interpretable generation mechanisms, it not only improves the accuracy of project matching but also enhances the transparency and user trust in the recommendation process, providing efficient, reliable, and interpretable intelligent decision support for scenarios such as government affairs, public services, and resource allocation.
[0120] It should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. An intelligent recommendation method based on multi-source data fusion and knowledge graph, characterized in that: include: Construct a dynamic heterogeneous knowledge graph that integrates user behavior, text descriptions, and external knowledge bases; Based on dynamic heterogeneous knowledge graphs, modality-specific encoding is performed on multi-source heterogeneous data, and cross-modal semantic alignment and graph structure reconstruction are jointly optimized to generate unified node representations with semantic alignment. For each inference path from the user node to the candidate project node, the semantic uncertainty entropy value of the inference path is calculated based on the entity type distribution, relationship frequency and semantic consistency characteristics in the path. Based on the semantic uncertainty entropy value, the contrastive learning weights in the cross-modal alignment optimization process and the correction strength of counterfactual intervention in the causal reasoning process are dynamically adjusted. A meta-path template is generated by combining a large language model with domain knowledge, and instantiated into a set of inference paths in a dynamic heterogeneous knowledge graph. The optimal subset of inference paths is selected through a reinforcement learning strategy. Based on the dynamically adjusted causal correction weights and the selected optimal reasoning path subset, the comprehensive recommendation score of the candidate items is calculated and the recommendation result is output. 2.The intelligent recommendation method based on multi-source data fusion and knowledge graph of claim 1, wherein: The specific steps for constructing a dynamic heterogeneous knowledge graph that integrates user behavior, text description, and external knowledge base are as follows: Extract user identifiers, project identifiers, and interaction types from user interaction logs to form a set of behavior triples. Each triple represents a user node, a behavior relationship, and a project node. The project description text or policy document is structured and parsed to extract fields such as applicable objects, application conditions, support types, and validity period. Unstructured project description text is segmented and semantic units are extracted. The extraction results are mapped to the corresponding entity nodes in the predefined ontology to form a set of text attribute triples. Each triple represents a project node, attribute relationship, and ontology entity. Call the external general knowledge base interface to obtain triple data covering policies and regulations, public affairs rules, qualification standards or public services. Through string matching and semantic similarity calculation, align the local ontology entities with the corresponding entities in the external knowledge base and establish cross-source entity links. Assign a unique global identifier and a clear type label to all nodes, and assign a relationship type label and a timestamp to all edges to build a graph database structure that supports incremental updates, historical snapshot backtracking, and efficient path querying. 3.The intelligent recommendation method based on multi-source data fusion and knowledge graph of claim 2, characterized in that: The specific steps for performing modality-specific encoding on multi-source heterogeneous data and jointly optimizing cross-modal semantic alignment and graph structure reconstruction are as follows: Input the user's historical behavior sequence into the temporal modeling network, use the text embedding vector as the input sequence element, and output the user behavior context-aware embedding vector; Initialize the node features in the graph neural network. The initial features of the project node are composed of its text embedding vector, and the initial features of the user node are its behavior embedding vector. Perform multi-level graph message passing operations. In each level, each node aggregates the feature information of its first-order neighbors. The aggregation process uses normalized adjacency weights. During training, cross-modal alignment and graph structure reconstruction objectives are simultaneously optimized. The overall training loss function is a weighted combination of two sub-losses, expressed as follows: ; wherein, represents the total training loss, represents the cross-modal alignment loss, which is used to pull the distance of the same item in different source descriptions in the unified representation space, represents the graph link prediction loss, which is used to reconstruct the missing or implicit edges in the original graph, is a balance coefficient and has a value range of zero to one; By minimizing this loss function, we can achieve alignment of multi-source heterogeneous data in a unified semantic space and collaborative reconstruction of graph structures. 4.The intelligent recommendation method based on multi-source data fusion and knowledge graph of claim 3, characterized in that: The specific steps for calculating the semantic uncertainty entropy value of the reasoning path are as follows: Traverse all inference paths that start from the user node, end at the candidate project node, and have a length not exceeding a preset limit. For each reasoning path, the global frequency of each type of relation appearing in the path is counted in the entire knowledge graph. The lower the frequency, the sparser the relation. Count the number of entity types involved in the path; the more types, the more dispersed the semantics of the path. After normalizing the two indicators, a linear weighted average is taken to obtain the semantic confidence score of the path. The calculation expression is as follows: ; wherein, semantic confidence score of the path , minimum value of the frequency of occurrence of all relation types in the path , number of different entity types involved in the path , number of edges of the path , , are non-negative weight coefficients; Confidence score Take the negative logarithm to generate the semantic uncertainty entropy value. The higher the entropy value, the lower the path reliability.
5. The intelligent recommendation method based on multi-source data fusion and knowledge graph as described in claim 4, characterized in that: The specific steps for dynamically adjusting the contrastive learning weights in the cross-modal alignment optimization process and the correction strength of counterfactual intervention in the causal inference process based on the semantic uncertainty entropy value are as follows: During the cross-modal contrastive learning training phase, if a sample of a certain item appears in a high-entropy path, its weight in the batch contrastive loss is set to... This is used to reduce the interference of noisy samples on the unified representation space; During the causal reasoning phase, a backdoor adjustment is performed on each path to eliminate confounding biases, with the counterfactual intervention's correction strength set to... That is, the low-entropy path obtains stronger causal effect correction; In the reward design of reinforcement learning strategies, the immediate reward for a selected path includes... The weighted terms guide the policy network to prioritize exploring semantically clear and structurally reliable reasoning paths.
6. The intelligent recommendation method based on multi-source data fusion and knowledge graph as described in claim 5, characterized in that: The process involves generating meta-path templates using a large language model combined with domain knowledge, instantiating them into a set of inference paths within a dynamic heterogeneous knowledge graph, and selecting the optimal subset of inference paths through a reinforcement learning strategy. The specific steps are as follows: The set of legal entity types and the set of legal relations in the domain ontology are predefined to form the syntactic constraints for meta-path generation; Construct structured prompt words and explicitly require the large language model to use only predefined types and relations to generate legal path patterns from user nodes to item nodes; Receive the metapath string output by the large language model, parse it into an alternating sequence of type relations, and verify each item to see if it conforms to the ontology rules; Remove invalid templates that contain circular references, illegal jumps, type mismatches, or exceed the length threshold; The retained valid meta-path templates are instantiated in the dynamic heterogeneous knowledge graph. All node combinations that satisfy type sequence matching are traversed in the graph to generate a specific set of inference path instances. Construct a reinforcement learning agent whose state is the current path prefix and whose action is to select the next legal neighbor node. The reward function comprehensively considers whether the path endpoint is the target item, the path semantic confidence score, and the user's historical preference matching degree. The agent is trained using a policy gradient algorithm, enabling it to efficiently search for subsets of high-value paths in an exponential path space.
7. The intelligent recommendation method based on multi-source data fusion and knowledge graph as described in claim 6, characterized in that: The steps for calculating the comprehensive recommendation score of candidate items and outputting the recommendation result based on the dynamically adjusted causal correction weights and the selected optimal reasoning path subset are as follows: For each inference path selected by the reinforcement learning strategy, obtain its corresponding causal correction weights. With regulatory factors ; Multiplying the causal correction weight by the adjustment factor yields the contribution of this path to the target project. For each candidate project The overall recommendation score for this project is calculated by summing the contribution values of all paths ending at it. The formula is as follows: ; in, Indicates candidate projects The overall recommendation score, This represents the subset of optimal inference paths selected by the reinforcement learning strategy. Representing a path The endpoint; All candidate projects are sorted in descending order based on their comprehensive recommendation scores, and the top N projects are selected to form the final recommendation list. For each recommended item, the reasoning path that contributes the most to its score is selected, the metastructure and specific entity names of that path are extracted, and they are substituted into a preset natural language template to generate an interpretable statement. The recommended list and the corresponding interpretable statement are then returned to the user terminal.
8. An intelligent recommendation system based on multi-source data fusion and knowledge graph, based on the intelligent recommendation method based on multi-source data fusion and knowledge graph as described in any one of claims 1 to 7, characterized in that: include: The module includes a dynamic heterogeneous knowledge graph construction module, a unified node representation generation module, a reasoning path semantic evaluation module, a causal correction intensity control module, a meta-path guidance path search module, and a comprehensive recommendation score calculation module. The dynamic heterogeneous knowledge graph construction module is used to extract structured triple information from user behavior logs, project description text and external knowledge bases, and integrate them to construct a dynamic heterogeneous knowledge graph that supports incremental updates and efficient queries. The unified node representation generation module is used to perform feature-specific encoding on multi-source heterogeneous data such as text descriptions and user behavior sequences, and generate a semantically consistent and structure-aware unified node embedding representation by jointly optimizing semantic alignment loss and graph link prediction loss. The inference path semantic evaluation module is used to traverse all feasible inference paths from user nodes to candidate project nodes, and calculate the semantic confidence score and its corresponding semantic uncertainty entropy value for each path based on the frequency of relations, diversity of entity types and semantic consistency features in the path. The causal correction intensity control module is used to dynamically generate adjustment factors based on the semantic uncertainty entropy value of the reasoning path, and adjust the sample weights in contrastive learning and the correction intensity of counterfactual intervention in causal reasoning accordingly, so as to achieve an adaptive balance between noise suppression and causal effect enhancement. The meta-path guidance path search module is used to generate legal meta-path templates under the constraints of domain ontology using a large language model, instantiate them into a set of specific reasoning paths in the knowledge graph, and select the optimal subset of high-value and high-reliability paths from them through reinforcement learning strategies. The comprehensive recommendation score calculation module is used to combine the dynamically adjusted causal correction weights with the selected optimal reasoning path subset, weighted summation of the contribution of each path, generate a comprehensive recommendation score for candidate items, and output a recommendation list and corresponding interpretable statements in sorted order of scores.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, it implements the steps of the intelligent recommendation method based on multi-source data fusion and knowledge graph as described in any one of claims 1 to 7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by the processor, it implements the steps of the intelligent recommendation method based on multi-source data fusion and knowledge graph as described in any one of claims 1 to 7.