A service recommendation method and system based on cross-modal knowledge graph contrast learning

By dividing the relationships in a knowledge graph into descriptive attributes and structural connections, and combining them with cross-modal contrastive learning, the problems of information overload and neglect of modal supervision signals in existing technologies are solved, thus achieving more accurate service recommendations.

CN116257696BActive Publication Date: 2026-05-01SHANDONG UNIV +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANDONG UNIV
Filing Date
2022-12-30
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing service recommendation methods suffer from information overload, and most studies ignore descriptive information in knowledge graphs and supervisory signals between different modalities, resulting in insufficient recommendation accuracy.

Method used

By dividing the relationships in the knowledge graph into descriptive attributes and structural connections, and combining cross-modal contrastive learning, node representation and service recommendation are performed to maximize the mutual information between the descriptive view and the structural view, and the final recommendation is made using an interaction prediction function.

Benefits of technology

It improves the accuracy and performance of service recommendations by capturing entity features and supervising them across different modalities, thereby enhancing the consistency of recommendation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116257696B_ABST
    Figure CN116257696B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of information recommendation, and provides a service recommendation method and system based on cross-modal knowledge graph contrast learning. Knowledge representation is performed according to acquired information, an ontology model is constructed, the ontology model is processed, a knowledge graph is formed, and description attributes and structural connections are distinguished. Nodes of the knowledge graph are described and encoded in a view. Nodes of the knowledge graph are encoded in a structure view. Cross-modal contrast learning is performed based on the constructed description view encoding and structure view encoding, and mutual information between the description view and the structure view is maximized. Based on the result of the cross-modal contrast learning, an interaction prediction function is used to calculate an interaction probability of a to-be-recommended demand task and each service preset, and final service recommendation is performed according to the interaction probability. The application divides traditional relations into descriptive attributes and structural attribute connections, and combines cross-modal contrast learning to obtain more effective node representation and service recommendation results.
Need to check novelty before this filing date? Find Prior Art

Description

A service recommendation method and system based on cross-modal knowledge graph comparative learning Technical Field

[0001] This invention belongs to the field of information recommendation technology, and relates to a service recommendation method and system based on cross-modal knowledge graph comparative learning. Background Technology

[0002] The statements in this section are merely background information related to the present invention and do not necessarily constitute prior art.

[0003] With the widespread adoption of service-oriented computing models such as cloud computing, web services, and microservices, more and more enterprises are providing users with a variety of service-oriented products in cloud environments, and the number of cloud services is growing rapidly. Users can choose suitable services to integrate into their application systems according to their needs, saving development costs and time. However, with the rapid growth of cloud service scale, there is an increasing number of homogeneous services. How to recommend the most suitable service to users from a large-scale service resource pool has been a major concern for researchers and industry practitioners.

[0004] Most current service recommendation methods focus on content-based or collaborative filtering-based recommendations. Content-based service recommendation primarily uses contextual information such as user needs and service descriptions to recommend services, while collaborative filtering-based recommendations mainly rely on the preferences of groups with similar needs or shared business scenarios.

[0005] However, existing research on service recommendation may suffer from severe information overload. Furthermore, most current knowledge graph-based service recommendation research only utilizes the structural information within the knowledge graph, neglecting descriptive information or failing to consider the meaningful supervisory signals that different modalities can provide to each other. Summary of the Invention

[0006] To address the aforementioned problems, this invention proposes a service recommendation method and system based on cross-modal knowledge graph contrastive learning. This invention divides traditional relationships into descriptive attributes and structural attributes, and combines cross-modal contrastive learning to obtain more effective node representations and service recommendation results, resulting in accurate recommendations.

[0007] According to some embodiments, the present invention adopts the following technical solution:

[0008] A service recommendation method based on cross-modal knowledge graph comparative learning includes the following steps:

[0009] Based on the acquired information, knowledge representation is performed, an ontology model is constructed, the ontology model is processed to form a knowledge graph, and descriptive attributes and structural connections are distinguished.

[0010] Descriptive view encoding is performed on the nodes of the knowledge graph;

[0011] Structural view encoding is performed on the nodes of the knowledge graph;

[0012] Cross-modal contrastive learning is performed based on the constructed descriptive view encoding and structural view encoding to maximize the mutual information between the descriptive view and the structural view.

[0013] Based on the results of cross-modal contrastive learning, the interaction prediction function is used to calculate the interaction probability between the required task to be recommended and each preset service. Based on the interaction probability, the final service recommendation is made.

[0014] As an alternative implementation method, the specific process of processing the ontology model includes knowledge extraction, data transformation and knowledge fusion with reference to the constructed ontology model, and the initially extracted knowledge is sequentially subjected to ontology similarity matching, instance fusion and knowledge storage to form a knowledge graph.

[0015] As an alternative implementation, the specific process of distinguishing between descriptive attributes and structural connections includes storing the formed knowledge graph in the form of triples or in the form of nodes and edges, and distinguishing between descriptive attributes and structural connections by verifying the existence of the inverse relation of each relation in the knowledge graph.

[0016] Furthermore, if for any triple, if the relation r i There is an inverse relationship - i This makes the relationship Existence, h i For the head entity, t i If the entity is a tail entity, the relationship is considered a structural connection, and relationships outside of structural connections are considered descriptive attributes.

[0017] As an alternative implementation, the specific process of encoding the descriptive view of the nodes of the knowledge graph includes: accessing the relevant descriptive information set through the attribute type edge, and embedding it according to the type of the descriptive value.

[0018] Furthermore, for text-valued descriptive information, pre-trained word vectors are used to obtain descriptive text embeddings and other descriptive feature embeddings.

[0019] For numerical descriptive information, it is normalized and the values ​​are divided into multiple categories.

[0020] As an alternative implementation, the specific process of structural view encoding of nodes in a knowledge graph includes obtaining the representation of the node through its neighborhood environment and topology in the graph.

[0021] As a further step, the first-order neighbors of a node are obtained through the structural edges of the node, and the node representation after aggregating the information of the connected neighbors is obtained by aggregating the first-order neighbor information.

[0022] By utilizing information from multi-hop neighbors through higher-order connections, a representation of the node after multi-hop aggregation is obtained.

[0023] As an alternative implementation, the process of cross-modal contrastive learning includes fully utilizing the supervision signals between different modal views, maximizing the mutual information between descriptive and structural views, and maximizing the consistency between the descriptive and structural representations of target nodes in the knowledge graph.

[0024] As an alternative implementation method, the specific process of calculating the interaction probability between the recommended demand task and each preset service using the interaction prediction function based on the results of cross-modal contrastive learning includes: based on the node representation obtained from cross-modal contrastive learning, forming the final multimodal representation for each given demand task-service method pair;

[0025] A unified interaction prediction function is used to calculate the interaction probability of task-service method pairs. Based on a given task, the interaction probabilities are sorted, and corresponding services are recommended, such as Top-N recommendations.

[0026] A service recommendation system based on cross-modal knowledge graph comparative learning includes:

[0027] The knowledge graph construction module is configured to perform knowledge representation based on the acquired information, construct an ontology model, process the ontology model to form a knowledge graph, and distinguish between descriptive attributes and structural connections.

[0028] The description view encoding module is configured to perform description view encoding on the nodes of the knowledge graph;

[0029] The structured view encoding module is configured to perform structured view encoding on the nodes of the knowledge graph;

[0030] The cross-modal contrastive learning module is configured to perform cross-modal contrastive learning based on the constructed descriptive view encoding and structural view encoding, maximizing the mutual information between the descriptive view and the structural view;

[0031] The service recommendation module is configured to use an interaction prediction function to calculate the interaction probability between the required task to be recommended and each preset service based on the results of cross-modal contrastive learning, and to make the final service recommendation based on the interaction probability.

[0032] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0033] This invention analyzes the characteristics of service recommendation knowledge graphs and divides traditional knowledge graph relationships into descriptive attributes and structural connections. By effectively integrating descriptive information reflecting the specificity of entities and interaction information between entities through the processing of these two types of attributes, the performance of recommendations is further improved.

[0034] This invention captures entity features from different modalities and supervises them to obtain more effective entity representations. For service recommendation scenarios, the cross-modal contrastive learning method proposed in this invention maximizes the consistency between the descriptive and structural representations of target nodes in the knowledge graph, thereby improving the accuracy of recommendation results. Attached Figure Description

[0035] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0036] Figure 1 is a flowchart of the service recommendation method based on cross-modal knowledge graph comparative learning in Embodiment 1;

[0037] Figure 2 is a structural block diagram of the service recommendation system based on cross-modal knowledge graph comparative learning in Embodiment 2. Detailed Implementation

[0038] The present invention will be further described below with reference to the accompanying drawings and embodiments.

[0039] It should be noted that the following detailed description is illustrative and intended to provide further explanation of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0040] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0041] Where there is no conflict, the various embodiments and features in the embodiments can be combined with each other.

[0042] Example 1

[0043] Example 1 introduces a service recommendation method based on cross-modal knowledge graph comparative learning.

[0044] Constructing a service recommendation knowledge graph based on historical task and service interaction information can effectively characterize and present the relationships between services and task requirements, while improving the accuracy of round-robin service recommendations. Therefore, this embodiment designs the ontology structure of the service recommendation knowledge graph based on the relationships between task requirements, services, and service creators, and constructs the knowledge graph using existing interaction records. With the constructed knowledge graph, cross-modal comparative learning can accurately recommend the most suitable service for a given task requirement.

[0045] As shown in Figure 1, a service recommendation method based on cross-modal knowledge graph comparative learning includes the following steps:

[0046] Step 1: Construct a service recommendation knowledge graph based on historical demand tasks and service interaction information. The constructed service recommendation knowledge graph is represented by G = {(h,r,t)|h∈E,r∈R,t∈E}, where G represents the constructed knowledge graph, E represents the set of entities in the graph, R represents the set of relations in the graph, and (h,r,t) represents the "head entity-relation-tail entity" in the knowledge triple.

[0047] Furthermore, the existence of the inverse relation for each relation in the graph is verified to distinguish between descriptive attributes and structural connections. The inverse relation is defined as: for any triplet If relation r i There is an inverse relationship - i This makes the relationship If it exists, then relation r i It is considered a structural connection. Relationships outside of structural connections are considered descriptive attributes.

[0048] Here, descriptive attributes ra ∈ RA represent attribute-type directed edges, and structural connections rs ∈ RS represent structural-type undirected edges. Here, R = RA ∪ RS.

[0049] Step 2: Perform descriptive view encoding on the nodes in the service recommendation knowledge graph.

[0050] Descriptive information directly describes the characteristics of a node, highlighting its uniqueness. For a node e in the service recommendation knowledge graph, its associated descriptive information set A(e) can be accessed through attribute type edges, where the set includes descriptive text and other attributes. Here, A(e) = {t|(h,r,t)∈G,r∈RA}.

[0051] Since descriptive values ​​are typically numerical or textual, they are treated as natural language. Then, descriptive text embeddings are obtained using pre-trained word vectors. t Other descriptive feature embeddings o For numerical descriptive information, we first normalize it, then multiply it by 100, and then round it to ensure that all values ​​are within the range of 0 to 100.

[0052] After that, the initial embedding s t and s o The nodes are projected into a low-dimensional vector space and concatenated to obtain a descriptive view representation of v. a =W t s t ||W o s o W t and W o This is the learnable parameter matrix.

[0053] Step 3: Perform structural view encoding on the nodes in the service recommendation knowledge graph.

[0054] Structural information describes the neighborhood environment and topology of a node in the graph, providing useful contextual information about the node. For a node e in the service recommendation knowledge graph, its first-order neighbors N(e) can be obtained through its structural edges, where N(e) = {t|(h,r,t)∈G,r∈RS}.

[0055] Intuitively, the representation of node e can be derived by aggregating information about its connected neighbors into its own representation, and can be expressed as:

[0056]

[0057] Here e (1) This is the representation of node e after aggregating first-order (i.e., one-hop) neighbor information. LeakyReLU is the activation function, and W0 represents the learnable transformation matrix. Additionally, The linear integration of the neighborhood of node e can be represented as:

[0058]

[0059] Where π(e′) controls the number of messages propagated from neighbors to distinguish the contributions of different neighbors. It can be calculated as:

[0060]

[0061] Similarly, nodes can utilize information from multi-hop neighbors through higher-order connections. The h-order neighbors of node e are represented as:

[0062]

[0063] Where e (h-1) and Let represent node e and its neighbors after (h-1) hop aggregation.

[0064] Step 4: Cross-modal contrastive learning

[0065] Through propagation and information aggregation on the service recommendation knowledge graph, the descriptive feature representation e corresponding to node e can be obtained. (a) (i.e. v) a ) and structural features represent e (s) (i.e. e) (h) In particular, unlike structural neighbors, attribute neighbors are only connected to the central node they modify. Therefore, their higher-order connections do not need to be considered.

[0066] To fully utilize the supervision signals between different modal views and maximize the mutual information between descriptive and structural views, a contrastive self-supervised strategy can be adopted to encourage consistency in node representations across different modal views. Specifically, to improve efficiency, InfoNCE is used to model the mutual information, which can be represented as:

[0067]

[0068] Where s(·) is a function that measures the correlation between two representations using cosine similarity. τ is the temperature parameter in the softmax function. By doing so, the consistency between the descriptive and structural representations of the target node e in the knowledge graph can be maximized. (s) and v (a) The meaning and e (s) e (a) The meanings are the same, but e and v are different nodes.

[0069] Step 5: Service Recommendation and Optimization

[0070] Based on the learned node representations, for a given requirement task-service method pair e d and e m We can obtain its final multimodal representation as follows:

[0071]

[0072]

[0073] Here, || represents the concatenation operation. Then, we use a unified interaction prediction function to calculate the interaction probability of the requirement task-service method pair:

[0074]

[0075] Where the function Set as a NeuMF layer, it can unify the modeling of linear and nonlinear interactions under both views. Additionally, the sigmoid function...

[0076] To enhance recommendation accuracy, multi-task learning is utilized, and the following combined loss function is used to jointly optimize the recommendation task and cross-modal comparative learning:

[0077]

[0078] Where D is the set of demand task entities, M is the set of service entities, J is the cross-entropy function, λ1 and λ2 are hyperparameters that control the relative strength of self-supervised tasks and L2 regularization, and Θ is the parameter setting.

[0079] To verify the effectiveness of the above algorithm, we constructed a dataset containing various machine learning services and task requirements. This dataset includes 2389 machine learning services from 183 service creators, 237 task requirements, and their interaction data, forming a machine learning knowledge graph. Table 1 describes a performance comparison between the algorithm of this invention and other methods:

[0080] Table 1 Performance Comparison of Service Recommendations

[0081]

[0082] Based on the results in Table 1, the service recommendation model proposed in this embodiment outperforms other methods.

[0083] Example 2

[0084] Example 2 introduces a service recommendation system based on cross-modal knowledge graph comparative learning.

[0085] Figure 2 shows a service recommendation system based on cross-modal knowledge graph comparative learning, which includes:

[0086] The graph construction module is configured to build a service recommendation knowledge graph based on the acquired data;

[0087] The descriptive view encoding module is configured to perform descriptive view encoding on nodes based on the constructed service recommendation knowledge graph.

[0088] The structured view encoding module is configured to perform structured view encoding on nodes based on the constructed service recommendation knowledge graph.

[0089] The cross-modal contrastive learning module is configured to maximize the consistency between the descriptive and structural representations of target nodes in the knowledge graph based on cross-modal contrastive learning.

[0090] The service recommendation module is configured to predict task requirements and service interactions, and recommend services based on cross-modal comparative learning results.

[0091] The detailed steps are the same as those of the service recommendation method based on cross-modal knowledge graph comparative learning provided in Example 1, and will not be repeated here.

[0092] Example 3

[0093] Example 3 provides a computer-readable storage medium.

[0094] A computer-readable storage medium having a program stored thereon that, when executed by a processor, implements the steps of the service recommendation method based on cross-modal knowledge graph contrastive learning as described in Embodiment 1.

[0095] The detailed steps are the same as those of the service recommendation method based on cross-modal knowledge graph comparative learning provided in Example 1, and will not be repeated here.

[0096] Example 4

[0097] Example 4 provides an electronic device.

[0098] An electronic device includes a memory, a processor, and a program stored in the memory and executable on the processor. When the processor executes the program, it implements the steps in the service recommendation method based on cross-modal knowledge graph comparative learning as described in Embodiment 1.

[0099] The detailed steps are the same as those of the service recommendation method based on cross-modal knowledge graph comparative learning provided in Example 1, and will not be repeated here.

[0100] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0101] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in one or more blocks of the flowchart illustrations and / or one or more blocks of the block diagrams.

[0102] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means that implement the functions specified in one or more flowcharts and / or one or more block diagrams.

[0103] These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process, such that the instructions, which execute on the computer or other programmable apparatus, provide steps for implementing the functions specified in one or more flowcharts and / or one or more block diagrams.

[0104] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

[0105] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.

Claims

1. A service recommendation method based on cross-modal knowledge graph comparative learning, characterized in that, Includes the following steps: Based on the acquired information, knowledge representation is performed, an ontology model is constructed, the ontology model is processed to form a knowledge graph, and descriptive attributes and structural connections are distinguished. The process of representing knowledge based on the acquired information, constructing an ontology model, and processing the ontology model to form a knowledge graph includes: designing the ontology structure of the service recommendation knowledge graph based on the relationships between demand tasks, services, and service creators; constructing the service recommendation knowledge graph based on the interaction information of historical demand tasks and services; encoding descriptive views for the nodes of the knowledge graph; encoding structural views for the nodes of the knowledge graph; performing cross-modal contrastive learning based on the constructed descriptive view encoding and structural view encoding to maximize the mutual information between the descriptive view and the structural view; calculating the interaction probability between the demand task to be recommended and each preset service based on the result of cross-modal contrastive learning using an interaction prediction function; and making the final service recommendation based on the interaction probability.

2. The service recommendation method based on cross-modal knowledge graph comparative learning as described in claim 1, characterized in that, The specific process of processing the ontology model includes knowledge extraction, data transformation and knowledge fusion with reference to the constructed ontology model. The initially extracted knowledge is then subjected to ontology similarity matching, instance fusion and knowledge storage to form a knowledge graph.

3. The service recommendation method based on cross-modal knowledge graph comparative learning as described in claim 1, characterized in that, The specific process of distinguishing between descriptive attributes and structural connections includes storing the resulting knowledge graph in the form of triples or in the form of nodes and edges, and distinguishing between descriptive attributes and structural connections by verifying the existence of the inverse relation of each relation in the knowledge graph.

4. The service recommendation method based on cross-modal knowledge graph comparative learning as described in claim 3, characterized in that, If for any triple, if the relation There is a reverse relationship This makes the relationship exist, For the head entity, If the entity is a tail entity, the relationship is considered a structural connection, and relationships outside of structural connections are considered descriptive attributes.

5. The service recommendation method based on cross-modal knowledge graph comparative learning as described in claim 1, characterized in that, The specific process of encoding descriptive views for nodes in a knowledge graph includes: accessing the relevant descriptive information set through attribute type edges and embedding it according to the type of descriptive value; for text-value descriptive information, using pre-trained word vectors to obtain descriptive text embeddings and other descriptive feature embeddings; for numerical descriptive information, normalizing it and classifying the values ​​into multiple categories.

6. The service recommendation method based on cross-modal knowledge graph comparative learning as described in claim 1, characterized in that, The specific process of structural view encoding of nodes in a knowledge graph includes obtaining the node's representation through its neighborhood environment and topology in the graph.

7. The service recommendation method based on cross-modal knowledge graph comparative learning as described in claim 6, characterized in that, The first-order neighbors of a node are obtained through the structural edges of the node. The representation of the node after aggregating the information of the connected neighbors is obtained by aggregating the information of the first-order neighbors. The representation of the node after multi-hop aggregation is obtained by using information from multi-hop neighbors through higher-order connections.

8. The service recommendation method based on cross-modal knowledge graph comparative learning as described in claim 6, characterized in that, The process of cross-modal contrastive learning includes making full use of the supervision signals between different modal views, maximizing the mutual information between descriptive and structural views, and maximizing the consistency between the descriptive and structural representations of target nodes in the knowledge graph.

9. The service recommendation method based on cross-modal knowledge graph comparative learning as described in claim 6, characterized in that, Based on the results of cross-modal contrastive learning, the specific process of calculating the interaction probability between the demand task to be recommended and the preset services using the interaction prediction function includes: based on the node representation obtained from cross-modal contrastive learning, forming the final multimodal representation for each given demand task-service method pair; using a unified interaction prediction function to calculate the interaction probability of the demand task-service method pair; and sorting the interaction probabilities according to the given demand task before making corresponding service recommendations.

10. A service recommendation system based on cross-modal knowledge graph comparative learning, characterized in that, include: The knowledge graph construction module is configured to perform knowledge representation based on the acquired information, construct an ontology model, process the ontology model to form a knowledge graph, and distinguish between descriptive attributes and structural connections. The process of representing knowledge based on the acquired information, constructing an ontology model, and processing the ontology model to form a knowledge graph includes: designing the ontology structure of the service recommendation knowledge graph based on the relationships between demand tasks, services, and service creators; constructing the service recommendation knowledge graph based on the interaction information of historical demand tasks and services; a description view encoding module configured to encode the nodes of the knowledge graph using description views; a structure view encoding module configured to encode the nodes of the knowledge graph using structure views; a cross-modal contrastive learning module configured to perform cross-modal contrastive learning based on the constructed description view encoding and structure view encoding to maximize the mutual information between the description view and the structure view; and a service recommendation module configured to calculate the interaction probability between the demand task to be recommended and each preset service based on the results of cross-modal contrastive learning using an interaction prediction function, and making the final service recommendation based on the interaction probability.

Citation Information

Patent Citations

  • An API knowledge graph construction method based on a reference document

    CN109739994A

  • Personalized recommendation method based on knowledge graph

    CN114461927A