Data service recommendation result diversification method based on determinant point process
By constructing a service recommendation method based on determinant point processes, combining service recommendation scores and similarity matrices, and utilizing Choleski decomposition optimization, the balance between diversity and accuracy in service recommendation is resolved, thereby improving the diversity of recommendation results and user experience.
Patent Information
- Application Number
- CN202311071839.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-23
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2043-08-23
AI Technical Summary
Existing service recommendation technologies struggle to balance accuracy and diversity, leading to suboptimal results. Furthermore, collaborative filtering and content-based methods suffer from long-tail problems and popularity bias during the recommendation process, failing to effectively meet diverse user needs.
A data service recommendation method based on determinant point processes is adopted. By constructing an auxiliary matrix for service recommendation scores and an auxiliary matrix for service function similarity, and combining it with Choleski decomposition, the calculation process is optimized. By adjusting parameters, correlation and diversity are balanced to generate diverse service recommendation results.
Based on the existing service recommendation model, diversified processing is implemented to optimize the functional relevance and diversity between services, reduce computational consumption, and improve the novelty of the recommendation list and user experience.
Smart Images

Figure CN117194977B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of data service recommendation and relates to a method for diversifying data service recommendation results based on a row-column point process for cloud-native scenarios. Background Technology
[0002] In today's cloud-native era, cloud adoption has become a default practice for many companies. The emergence of the cloud-native concept eliminates the need for enterprises to build their own infrastructure. Adapting to cloud components and effectively utilizing cloud elasticity and compute-storage separation have become crucial. Traditional vendors need to undergo digital transformation, facing the need for internet-based business operations. Solving high concurrency and high throughput challenges necessitates adopting an internet architecture. More and more enterprises are choosing to provide service-based applications. With the advent of the digital age, massive amounts of data are generated, collected, and stored, possessing immense value for organizations and enterprises. The goal of data services is to provide effective methods for managing, analyzing, and utilizing this data to meet user needs. "DAAS" stands for "Data as a Service." It is a cloud computing model where data providers offer data access and management services to customers through a cloud platform. It provides a new way to process and manage data, eliminating the need for users to purchase, configure, and maintain hardware and software infrastructure themselves. Data as a Service providers store data on cloud platforms and provide data access and management functions over the network. With services at their core, they provide developers with computing and data resources and offer enterprises mature cloud software solutions. By leveraging open service platforms, developers can quickly meet complex user needs by combining reusable and replaceable third-party services.
[0003] Mashup services are a typical service composition pattern that generates new APIs by quickly combining existing Web APIs. Their high efficiency and ease of use have made them popular with developers and led to rapid development. However, the rapid increase in the number of candidate APIs and the abundance of services with similar functionalities have made it more difficult for developers to choose suitable APIs. To address these challenges, service recommendation technologies have emerged. Most existing service recommendation technologies focus on the accuracy of recommendations. Collaborative filtering-based methods define user behavior based on user-item interaction information, while content-based methods focus on the relevance between items, achieving recommendation methods oriented towards association and replacement. These methods are essentially recommendation methods based on the similarity of performance. However, these similarity-based methods often lead to suboptimal results. Content-based recommendation methods tend to provide items that meet the user's current needs while ignoring the breadth of item topics, and collaborative filtering-based methods are affected by the long-tail problem, selecting popular items to satisfy accuracy. Currently, diversity is also considered an important factor in improving user satisfaction. Diverse recommendation results can broaden the range of projects users encounter, increasing the likelihood of them discovering items that interest them. On the other hand, diverse results can help businesses or service providers increase product visibility and uncover potential user interests. In real-world service recommendation scenarios, the need for diverse recommendations is also crucial.
[0004] For diversified recommendations, diversity can be reflected at both the individual and aggregate levels. For service recommendations, to improve the user experience when choosing services, the focus should be on the individual level, specifically the diversity of service functions included in a single recommendation result. Increasing individual diversity enhances the novelty of items in the recommendation list, ultimately increasing the probability of users seeing potentially desired items. To achieve a balance between relevance and diversity in the existing recommendation list, the most common approach is a heuristic post-processing method, which involves reordering the existing service recommendation sequence based on service function information, considering both relevance and diversity. Summary of the Invention
[0005] To overcome the shortcomings of existing technologies and better discover users' potential interests, this invention provides a method for diversifying data service recommendation results based on a determinant-based point process in cloud-native scenarios, building upon existing service recommendation sequence results. First, based on existing service function information, two service data auxiliary matrices are designed. Then, the kernel matrix necessary for the determinant-based point process is constructed, and adjustment parameters are used to control the correlation and diversity between services. Considering the high time complexity of the determinant-based point process under conventional greedy computation strategies, a fast iterative method based on Cholsky decomposition is used to process the service recommendation sequence, thus achieving diversified service recommendation results.
[0006] The technical solution adopted in this invention is:
[0007] A method for diversifying recommendation results for data services based on a matrix point process, the method comprising the following steps:
[0008] The first step is to construct an auxiliary matrix for service recommendation scores and an auxiliary matrix for service function similarity.
[0009] The second step involves constructing the kernel matrix of service information required for the determinant point process calculation, processing the determinant calculation results, and optimizing the calculation process. The process is as follows:
[0010] 2.1 The determinant-based point process is a probabilistic model used to model discrete point sets with repulsive properties. It calculates subset selection probabilities based on the kernel matrix and the feature of the element set, utilizing the service recommendation score auxiliary matrix H. m With service similarity auxiliary matrix By combining determinant point processes, a determinant point process kernel matrix for service recommendation is constructed.
[0011]
[0012] Where exp represents applying the natural exponent to all elements of the matrix. This is an adjustment parameter for the relevance and diversity indicators, used to balance these two indicators in subsequent processing of the recommendation list;
[0013] 2.2 Let A′ be the set of APIs whose subset probabilities are to be calculated, and let A′ be a subset of the overall candidate API set A. Based on the calculation method of the determinant point process, the subset probability calculation method is defined as follows:
[0014]
[0015] Where P represents probability information, det() represents the determinant calculation process, ∝ represents proportionality, and the original kernel matrix is... It contains relevance and diversity information of all candidate APIs, with a size of |A|×|A|, where |A| represents the number of elements in set A, and the subscripts of the matrix elements in the kernel matrix correspond to the API indices; This represents the kernel matrix. The submatrix is a submatrix that retains the matrix elements related to the APIs existing in set A′, that is, it retains the matrix formed by the elements whose subscripts contain the API indexes in A′;
[0016] 2.3 Calculate the logarithm of the determinant result to compare the probabilities of subsets:
[0017]
[0018] Where log() represents the base-10 logarithmic operation. This indicates that the original similarity matrix is retained. The similarity submatrix is formed by including the subscripts of the elements in the API set A′.
[0019] 2.4 Using the subset probability comparison method given in step 2.3, the calculation process for each round of the corresponding greedy strategy is presented:
[0020]
[0021] Where Ra m Da represents the original recommended sequence. m Represents a service recommendation sequence that features diverse reordering. Ra m \Da m It indicates that it exists in Ra m It does not exist in Da m The elements in This means that in each round, the API with the largest calculated value is taken as the output;
[0022] 2.5 Da m Initialize to an empty set;
[0023] 2.6 Perform the calculation process of step 2.4, and output 'a' for each round. map Store Da m In, and will a map From Ra m Take it out from the middle;
[0024] 2.7 Repeat step 2.6 until Da m The number of elements and Ra m same;
[0025] The third step involves using Choleski decomposition to quickly determine the optimal service recommendation results during the greedy iteration process, generating diverse re-ranking options.
[0026] Furthermore, the process of the first step is as follows:
[0027] 1.1 Define the initial service recommendation result set, including the combined service Mashup m and the set of individual recommendation results APIs Ra corresponding to m. m ={a1, a2, ..., a |Ra|}, where a represents the API and |Ra| represents the total number of recommended APIs;
[0028] 1.2 Let the feature representation of Mashup m be se m The feature representation of API a is set as se a ;
[0029] 1.3 Calculate the service recommendation score between Mashup m and API a using vector multiplication:
[0030] f m,a =se m T se a
[0031] Where T represents the transpose operation of a vector;
[0032] 1.4 Calculate the average of all API scores corresponding to the Mashup combined service call sequence, and normalize all scores:
[0033]
[0034] 1.5 Constructing the Service Recommendation Score Auxiliary Matrix H m :
[0035]
[0036] Where Diag represents a diagonal matrix, the diagonal elements of which are the normalized association scores between Mashup m and the recommended API a.
[0037] 1.6 Calculate the training similarity between services, using the dot product of the embedding vectors of the two API or Mashup services as the similarity calculation result:
[0038]
[0039]
[0040] Where a1 and a2 represent any two different APIs. This represents the training similarity between APIs a1 and a2. m1 and m2 represent any two different Mashup services. This represents the training similarity between Mashup m1 and m2;
[0041] 1.7 Calculate the prior information similarity between services. Using service description documents and service function tags as the basis for similarity calculation, calculate the similarity between service description documents. First, calculate the similarity between API service description documents, then calculate the similarity between Mashup service description documents:
[0042]
[0043]
[0044] Where cos() represents the cosine similarity. This represents the service function representation corresponding to API a, calculated using a language model. This represents the prior information similarity between APIs a1 and a2. Representing vectors The model. This represents the service function representation corresponding to Mashup m, calculated by the language model. This represents the prior information similarity between Mashup m1 and m2. Representing vectors The model;
[0045] 1.8 Calculate the similarity between API service tags and the similarity between Mashup service tags respectively:
[0046]
[0047]
[0048] Where, m tag A collection of functional tags representing a Mashup. tag Represents the set of tags for an API, |m tag | indicates the number of Mashup feature tags, |a tag | Indicates the number of API function tags;
[0049] 1.9 The larger result between functional description similarity and label similarity is used as the prior information similarity between services:
[0050]
[0051]
[0052] in This represents the normalized similarity result;
[0053] 1.10 The larger of the training similarity and prior information similarity between services is taken as the overall similarity information between services:
[0054]
[0055]
[0056] 1.11 Based on the similarity calculation results in step 1.10, construct an auxiliary service similarity matrix between APIs.
[0057]
[0058]
[0059] A flexible maximization method was used to normalize the similarity information, and the results were then processed in the form of... This is represented. Flexibility maximization is a commonly used vector processing method used to transform raw data into vectors representing the probabilities of each class. Where a... c ∈Ra m The matrix stores the processed similarity results between the APIs corresponding to the row and column numbers at the corresponding positions.
[0060] Furthermore, the process of the third step is as follows:
[0061] 3.1 Set the factorization factor storage set D, and set it to an empty set;
[0062] 3.2 For the API set Ra corresponding to a single recommendation result m ={a1, a2, ..., a |Ra| Iterate through the APIs and set the current API as 'a'. i , where i represents the index of the API in the set;
[0063] 3.3 for a i Calculate the decomposition factor Its value is Representation of service information kernel matrix The value of the element at position (i, i);
[0064] 3.4 Store in set D, and repeat step 3.3 until the traversal is complete;
[0065] 3.5 Set up a row vector storage set C, initially as an empty set;
[0066] 3.6 pairs of Ra m ={a1, a2, ..., a |Ra|} Iterate through the APIs and set the currently iterated API as a.i 'i' represents the index of the API in the set. Let a... i Corresponding row vector c i Store in C, c i Initially set to an empty vector;
[0067] 3.7 Complete the traversal and initialize the set C;
[0068] 3.8 Setting up a diverse set of rearranged sequences Da′ m Initially set to an empty set;
[0069] 3.9 Set the maximum sequence number j for each round, initialize it to 1, and set the increment set E, initialize it to an empty set;
[0070] 3.10 Traversing Ra m The element in the current API is set to a. i ;
[0071] 3.11 against a i Calculate the incremental value e i and e i Store in set E:
[0072]
[0073] Where T represents the vector transpose, c j T c i Represents the product of two vectors. This represents the value of the element at position (j, i);
[0074] 3.12 Complete the traversal and output the set of incremental values E;
[0075] 3.13 Traverse set E, setting the current traversal increment to e. i , i represents the sequence number;
[0076] 3.14 According to e i Update the factorization factor and row vector corresponding to the API with the corresponding index:
[0077] c i =[c i e i ]
[0078]
[0079] Where [c] i e i ] indicates that the increment value e i Add to the original vector c i end;
[0080] 3.15 End the traversal and complete the update;
[0081] 3.16 Based on the updated decomposition factors, find the result with the largest logarithmic value:
[0082]
[0083] Where Ra m \Da′ m It indicates that it exists in Ra m It does not exist in Da′ m In the elements, log() represents the logarithmic operation to base 10. Indicates that for those existing in Ra m It does not exist in Da′ m Iterate through the elements in the list, perform calculations, and output the API with the largest calculated value;
[0084] 3.17 Assign the index corresponding to the API output in step 3.16 to j, and store the API into the sequence set Da′. m ;
[0085] 3.18 Repeat steps 3.10 to 3.17 until Da′ m The number of elements and Ra m same;
[0086] 3.19 Output Service Recommendation Sequence Diversification Rearrangement Results Da′ m This allows for diversified processing of service recommendation results.
[0087] The beneficial effects of this invention are mainly reflected in the following aspects: (1) It grasps the diverse needs in the service recommendation scenario and, as a post-processing method, can perform diversified processing based on the existing service recommendation model. (2) It uses the determinant point process method for service recommendation optimization to design a service information kernel matrix based on two auxiliary matrices, while considering the functional correlation and diversity between services. (3) It uses an optimized solution method based on decomposition factors and row vectors to optimize the diversification process and reduce the computational consumption of each iteration. (4) It supplements the existing service recommendation algorithm that uses recommendation accuracy as an indicator by recommending diverse needs. Attached Figure Description
[0088] Figure 1 This is a diagram illustrating the coordinate relationship between the accuracy and diversity results of various service recommendation methods. Detailed Implementation
[0089] The present invention will now be further described with reference to the accompanying drawings.
[0090] Reference Figure 1A method for diversifying data service recommendation results based on a matrix-based point process, the method comprising the following steps:
[0091] The first step is to construct an auxiliary matrix for service recommendation scores and an auxiliary matrix for service function similarity. The process is as follows:
[0092] 1.1 Define the initial service recommendation result set, including the combined service Mashup m and the set of individual recommendation results APIs Ra corresponding to m. m ={a1, a2, ..., a |Ra|}, where a represents the API, and |Ra| represents the total number of recommended APIs. The initial service recommendation result set can be generated by common service recommendation algorithms, such as content-based service recommendation methods and collaborative filtering-based service recommendation methods. Currently, these methods generally only consider recommendation accuracy in terms of recommendation metrics.
[0093] 1.2 Precision-based service recommendation models can learn the functional feature representations of services. Using the service recommendation models exemplified in step 1.1, feature representations of Mashup services and APIs can be obtained. Let the feature representation of Mashup m be set as se. m The feature representation of API a is set as se a ;
[0094] 1.3 Calculate the service recommendation score between Mashup m and API a using vector multiplication:
[0095] f m,a =se m T se a
[0096] Where T represents the transpose operation of a vector;
[0097] 1.4 Calculate the average of all API scores corresponding to the Mashup combined service call sequence, and normalize all scores:
[0098]
[0099] 1.5 Constructing the Service Recommendation Score Auxiliary Matrix H m :
[0100]
[0101] Where Diag represents a diagonal matrix, the diagonal elements of which are the normalized association scores between Mashup m and the recommended API a.
[0102] 1.6 Calculate the training similarity between services, using the dot product of the embedding vectors of the two API or Mashup services as the similarity calculation result:
[0103]
[0104]
[0105] Where a1 and a2 represent any two different APIs. This represents the training similarity between APIs a1 and a2, where m1 and m2 represent any two different Mashup services. This represents the training similarity between Mashup m1 and m2;
[0106] 1.7 Calculate the prior information similarity between services. Using service description documents and service function tags as the basis for similarity calculation, calculate the similarity between service description documents. First, calculate the similarity between API service description documents, then calculate the similarity between Mashup service description documents:
[0107]
[0108]
[0109] Where cos() represents the cosine similarity. This represents the service function representation corresponding to API a, calculated using a language model. This represents the prior information similarity between APIs a1 and a2. Representing vectors The model, This represents the service function representation corresponding to Mashup m, calculated by the language model. This represents the prior information similarity between Mashup m1 and m2. Representing vectors Existing language models, such as BERT, all have the ability to convert text documents into vectors for computation.
[0110] 1.8 Calculate the similarity between API service tags and the similarity between Mashup service tags respectively:
[0111]
[0112]
[0113] Where, m tag A collection of functional tags representing a Mashup. tag Represents the set of tags for an API, |m tag| indicates the number of Mashup feature tags, |a tag | Indicates the number of API function tags;
[0114] 1.9 The larger result between functional description similarity and label similarity is used as the prior information similarity between services:
[0115]
[0116]
[0117] in This represents the normalized similarity result;
[0118] 1.10 The larger of the training similarity and prior information similarity between services is taken as the overall similarity information between services:
[0119]
[0120]
[0121] 1.11 Based on the similarity calculation results in step 1.10, construct an auxiliary service similarity matrix between APIs.
[0122]
[0123]
[0124] A flexible maximization method was used to normalize the similarity information, and the results were then processed in the form of... Representation is performed. Flexibility maximization is a commonly used vector processing method used to transform raw data into vectors representing the probabilities of each class, where a... c ∈Ra m The matrix stores the processed similarity results between the APIs corresponding to the row and column numbers at the corresponding positions;
[0125] The second step involves constructing the kernel matrix of service information required for the determinant point process calculation, processing the determinant calculation results, and optimizing the calculation process. The process is as follows:
[0126] 2.1 The determinant-based point process is a probabilistic model used to model discrete point sets with repulsive properties. It calculates subset selection probabilities based on the kernel matrix and the features of the element set, utilizing the service recommendation score auxiliary matrix H generated in step 1.5. m The service similarity auxiliary matrix generated in step 1.11 By combining determinant point processes, a determinant point process kernel matrix for service recommendation is constructed.
[0127]
[0128] Where exp represents applying the natural exponent to all elements of the matrix. This is an adjustment parameter for the relevance and diversity indicators, used to balance these two indicators in subsequent processing of the recommendation list;
[0129] 2.2 Let A′ be the set of APIs whose subset probabilities are to be calculated, and let A′ be a subset of the overall candidate API set A. Based on the calculation method of the determinant point process, the subset probability calculation method is defined as follows:
[0130]
[0131] Where P represents probability information, det() represents the determinant calculation process, ∝ represents proportionality, and the original kernel matrix is... It contains relevance and diversity information for all candidate APIs, and has a size of |A|×|A|, where |A| represents the number of elements in set A. The matrix element indices in the kernel matrix correspond to the API indices. This represents the kernel matrix. The submatrix is a submatrix that retains the matrix elements related to the APIs existing in set A′, that is, it retains the matrix formed by the elements whose subscripts contain the API indexes in A′;
[0132] 2.3 Calculate the logarithm of the determinant result to compare the probabilities of subsets:
[0133]
[0134] Where log() represents the base-10 logarithmic operation. This indicates that the original similarity matrix is retained. The similarity submatrix is formed by including the subscripts of the elements in the API set A′.
[0135] 2.4 Using the subset probability comparison method given in step 2.3, the calculation process for each round of the corresponding greedy strategy is presented:
[0136]
[0137] Where Ra m Da represents the original recommended sequence. m Ra represents a service recommendation sequence that is reordered in a diversified manner. m \Da m It indicates that it exists in Ra m It does not exist in Da m The elements in This means that in each round, the API with the largest calculated value is taken as the output;
[0138] 2.5 Da m Initialize to an empty set;
[0139] 2.6 Perform the calculation process of step 2.4, and output 'a' for each round. map Store Da m In, and will a map From Ra m Take it out from the middle;
[0140] 2.7 Repeat step 2.6 until Da m The number of elements and Ra m same;
[0141] The third step involves using Choleski decomposition to quickly determine and generate diversified re-ranked service recommendation results during the greedy iteration process. The process is as follows:
[0142] 3.1 Set the factorization factor storage set D, and set it to an empty set;
[0143] 3.2 For the API set Ra corresponding to a single recommendation result m ={a1, a2, ..., a |Ra| Iterate through the APIs and set the current API as 'a'. i , where i represents the index of the API in the set;
[0144] 3.3 for a i Calculate the decomposition factor Its value is Representation of service information kernel matrix The value of the element at position (i, i);
[0145] 3.4 Store in set D, and repeat step 3.3 until the traversal is complete;
[0146] 3.5 Set up a row vector storage set C, initially as an empty set;
[0147] 3.6 pairs of Ra m ={a1, a2, ..., a |Ra|} Iterate through the APIs and set the currently iterated API as a. i , where i represents the index of Api in set 2. Let a... i Corresponding row vector c i Store in C, c i Initially set to an empty vector;
[0148] 3.7 Complete the traversal and initialize the set C;
[0149] 3.8 Setting up a diverse set of rearranged sequences Da′ m Initially set to an empty set;
[0150] 3.9 Set the maximum sequence number j for each round, initialized to 1. Set the increment set E, initialized to an empty set;
[0151] 3.10 Traversing Ra m The element in the current API is set to a. i ;
[0152] 3.11 against a i Calculate the incremental value e i and e i Store in set E:
[0153]
[0154] Where T represents the vector transpose, c j T c i Represents the product of two vectors. This represents the value of the element at position (j, i);
[0155] 3.12 Complete the traversal and output the set of incremental values E;
[0156] 3.13 Traverse set E, setting the current traversal increment to e. i , i represents the sequence number;
[0157] 3.14 According to e i Update the factorization factor and row vector corresponding to the API with the corresponding index:
[0158] c i =[c i e i ]
[0159]
[0160] Where [c] i e i ] indicates that the increment value e i Add to the original vector c i end;
[0161] 3.15 End the traversal and complete the update;
[0162] 3.16 Based on the updated decomposition factors, find the result with the largest logarithmic value:
[0163]
[0164] Where Ra m \Da′m It indicates that it exists in Ra m It does not exist in Da′ m In the elements, log() represents the logarithmic operation to base 10. Indicates that for those existing in Ra m It does not exist in Da′ m Iterate through the elements in the list, perform calculations, and output the API with the largest calculated value;
[0165] 3.17 Assign the index corresponding to the API output in step 3.16 to j, and store the API into the sequence set Da′. m ;
[0166] 3.18 Repeat steps 3.10 to 3.17 until Da′ m The number of elements and Ra m same;
[0167] 3.19 Output Service Recommendation Sequence Diversification Rearrangement Results Da′ m This allows for diversified processing of service recommendation results.
[0168] The following analysis uses specific service data to examine the actual effectiveness of the invention. The steps are as follows:
[0169] 1) Select the Mashup combination and API dataset, the contents of which are shown in Table 1. This includes 1423 Mashups and 1032 candidate APIs with which they have calling relationships. For each Mashup and API, collect corresponding functional description documents and tags, and perform pre-segmentation on the description information, converting it into dense vectors using a BERT pre-trained language model.
[0170]
[0171] Table 1
[0172] 2) Use the cross-validation method, divide all services into 5 parts using 20% of the Mashup services, and use one part as the test set for validation each time.
[0173] 3) Use multiple indicators to evaluate the effectiveness of service recommendations. Hit rate (HR):
[0174]
[0175] Among them, RecA m This represents the list of recommended APIs for Mashup m, ObsA mm represents the list of API calls observable based on real data. Normalized Discounted Cumulative Gain (NDCG) metric:
[0176]
[0177] Where N represents the number of recommended services, n represents the service at the nth position in the recommendation list, and IDCG is the sum of the DCG values obtained from all recommendations. Intra-list average distance (ILAD) is calculated by averaging the functional dissimilarity of all items in the recommendation list to reflect the overall diversity. The calculation is as follows:
[0178]
[0179] Where mean represents the average value, Ra is the corresponding recommendation list, and Sim represents the normalized similarity between APIs. The diversity of items in the list is represented by the calculation of 1-Sim. The intra-list minimal distance (ILMD) is calculated by the minimum dissimilarity of items in each list to evaluate the lower bound of the diversity of the recommendation list. The calculation is expressed as follows:
[0180]
[0181] Where min represents taking the minimum value.
[0182] 4) Provide basic comparison methods to evaluate the effectiveness of the methods in this invention.
[0183] Service-KNN: This method uses a language model to vectorize service function descriptions and leverages similarity calculation methods for recommendations. It is a typical similarity-based recommendation method.
[0184] MMR: Maximum Boundary Relevance algorithm, which modifies the order of items in the service recommendation results to consider the balance between relevance and diversity.
[0185] RTM+AFM: Utilizes factorization product combined with Relation Topic Model to learn the inter-service relationship information and feature representation.
[0186] PMF+α+β: This method considers three parts simultaneously: the relationship between APIs, the relationship between Mashup and APIs, and the degree of diversity among APIs. It uses two hyperparameters, α and β, to control the strength of each part in the objective function.
[0187] NGCF: A recommendation method based on collaborative filtering and graph neural networks, with the model training objective being higher recommendation accuracy.
[0188] 5) Table 2 shows the effects of the present invention on various indicators.
[0189]
[0190] Table 2
[0191] The method proposed in this invention has achieved good results. Compared with NGCF, which also learns graph structure information, the diversity optimization method proposed in this invention significantly improves the diversity of recommendation results, increasing the ILAD and ILMD metrics by 11.6% and 13.9% respectively, while also improving the HR and NDCG metrics by 4.2% and 4.5% respectively, demonstrating the feature learning ability of the model proposed in this invention.
[0192] To demonstrate the effect more intuitively, Figure 1 A coordinate graph showing the accuracy and diversity metrics for each method is provided, where the horizontal axis represents the ILAD value to indicate diversity, and the vertical axis represents the HR value to indicate accuracy. The result coordinate point corresponding to the method of this invention is located in the upper right corner of the graph, indicating that the method achieves good results in both diversity and accuracy, and maintains a good balance between the two metrics.
Claims
1. A method for diversifying data service recommendation results based on a matrix-based point process, characterized in that, The method includes the following steps: The first step is to construct an auxiliary matrix for service recommendation scores and an auxiliary matrix for service function similarity. The second step involves constructing the kernel matrix of service information required for the determinant point process calculation, processing the determinant calculation results, and optimizing the calculation process. The process is as follows: 2.1 The determinant-based point process is a probabilistic model used to model discrete point sets with repulsive properties. It calculates subset selection probabilities based on the kernel matrix and the feature of the element set, utilizing the service recommendation score auxiliary matrix H. m Service similarity auxiliary matrix By combining determinant point processes, a determinant point process kernel matrix for service recommendation is constructed. : Where exp represents applying the natural exponent to all elements of the matrix. This is an adjustment parameter for the relevance and diversity indicators, used to balance these two indicators in subsequent processing of the recommendation list; 2.2 Let A ′ Let A be the set of APIs for which the subset probabilities are to be calculated. ′ For a subset of the overall candidate API set A, based on the calculation idea of the determinant point process, the method for calculating the probability of the subset is set as follows: Where P represents probability information, det() represents the determinant calculation process, ∝ represents proportionality, and the original kernel matrix is... It contains relevance and diversity information of all candidate APIs, with a size of |A|×|A|, where |A| represents the number of elements in set A, and the subscripts of the matrix elements in the kernel matrix correspond to the API indices; This represents the kernel matrix. A submatrix that preserves the subsets of set A. ′ The submatrix containing API-related matrix elements, that is, the submatrix containing A in the element index. ′ A matrix formed by the elements of the API serial numbers; 2.3 Calculate the logarithm of the determinant result to compare the probabilities of subsets: Where log() represents the base-10 logarithmic operation. This indicates that the original similarity matrix is retained. The element index contains the API collection A ′ The similarity submatrix is formed by taking the elements with the existing API serial numbers; 2.4 Using the subset probability comparison method given in step 2.3, the calculation process for each round of the corresponding greedy strategy is given: Where Ra m Da represents the original recommended sequence. m Ra represents a service recommendation sequence that is reordered in a diversified manner. m \Da m It indicates that it exists in Ra m It does not exist in Da m The elements in This means that in each round, the API with the largest calculated value is taken as the output; 2.5 Da m Initialize to an empty set; 2.6 Perform the calculation process of step 2.4, and output 'a' for each round. map Store Da m In, and will a map From Ra m Take it out from the middle; 2.7 Repeat step 2.6 until Da m The number of elements and Ra m same; The third step involves using Choleski decomposition to quickly determine the optimal service recommendation results during the greedy iteration process, generating diverse re-ranking options.
2. The method for diversifying data service recommendation results based on a matrix point process as described in claim 1, characterized in that, The process of the first step is as follows: 1.1 Define the initial service recommendation result set, including the combined service Mashup m and the set of individual recommendation results APIs Ra corresponding to m. m ={a1,a2,…,a |Ra| }, where a represents the API and |Ra| represents the total number of recommended APIs; 1.2 Let the feature representation of Mashup m be se m The feature representation of API a is set as se a ; 1.3 Calculate the service recommendation score between Mashup m and API a using vector multiplication: f m,a =se m T from a Where T represents the transpose operation of a vector; 1.4 Calculate the average of all API scores corresponding to the Mashup combined service call sequence, and normalize all scores: 1.5 Constructing the Service Recommendation Score Auxiliary Matrix H m : Where Diag represents a diagonal matrix, the diagonal elements of which are the normalized association scores between Mashup m and the recommended API a. 1.6 Calculate the training similarity between services, using the dot product of the embedding vectors of the two API or Mashup services as the similarity calculation result: Where a1 and a2 represent any two different APIs. Let a represent the training similarity between Apia1 and a2, and m1 and m2 represent any two different Mashup services. This represents the training similarity between Mashup m1 and m2; 1.7 Calculate the prior information similarity between services. Using service description documents and service function tags as the basis for similarity calculation, calculate the similarity between service description documents. First, calculate the similarity between API service description documents, then calculate the similarity between Mashup service description documents: Where cos() represents the cosine similarity. This represents the service function representation corresponding to API a, calculated using a language model. This represents the prior information similarity between APIs a1 and a2. Representing vectors The model, This represents the service function representation corresponding to Mashup m, calculated by the language model. This represents the prior information similarity between Mashup m1 and m2. Representing vectors The model; 1.8 Calculate the similarity between API service tags and the similarity between Mashup service tags respectively: in, m tag A collection of functional tags representing a Mashup. tag Represents the set of tags for an API, |m tag | indicates the number of Mashup feature tags, |a tag | Indicates the number of API function tags; 1.9 The larger result between functional description similarity and label similarity is used as the prior information similarity between services: in This represents the normalized similarity result; 1.10 The larger of the training similarity and prior information similarity between services is taken as the overall similarity information between services: 1.11 Based on the similarity calculation results in step 1.10, construct an auxiliary service similarity matrix between APIs. : A flexible maximization method was used to normalize the similarity information, and the results were then processed in the form of... In this representation, flexibility maximization is a commonly used vector processing method used to transform raw data into vectors representing the probabilities of each class, where a c ∈Ra m The matrix stores the processed similarity results between the APIs corresponding to the row and column numbers at the corresponding positions.
3. The method for diversifying data service recommendation results based on a matrix point process as described in claim 1 or 2, characterized in that, The process of the third step is as follows: 3.1 Set the factorization factor storage set D, and set it to an empty set; 3.2 For the API set Ra corresponding to a single recommendation result m ={a1,a2,…,a |Ra| Iterate through the APIs and set the current API as 'a'. i , where i represents the index of the API in the set; 3.3 for a i Calculate the decomposition factor Its value is Representation of service information kernel matrix The value of the element at position (i, i); 3.4 Store in set D, and repeat step 3.3 until the traversal is complete; 3.5 Set up a row vector storage set C, initially as an empty set; 3.6 pairs of Ra m ={a1,a2,…,a |Ra| } Iterate through the APIs and set the currently iterated API as 'a'. i , i represents the index of the API in the set, and a i Corresponding row vector c i Store in C, c i Initially set to an empty vector; 3.7 Complete the traversal and initialize the set C; 3.8 Setting up a diverse set of rearranged sequences Da′ m Initially set to an empty set; 3.9 Set the maximum sequence number j for each round, initialize it to 1, and set the increment set E, initialize it to an empty set; 3.10 Traversing Ra m The element in the current API is set to a. i ; 3.11 against a i Calculate the incremental value e i and e i Store in set E: Where T represents the vector transpose, c j T c i Represents the product of two vectors. This represents the value of the element at position (j, i). 3.12 Complete the traversal and output the set of incremental values E; 3.13 Traverse set E, setting the current traversal increment to e. i ; 3.14 According to e i Update the factorization factor and row vector corresponding to the API with the corresponding index: Where [c] i e i ] indicates that the increment value e i Add to the original vector c i end; 3.15 End the traversal and complete the update; 3.16 Based on the updated decomposition factors, find the result with the largest logarithmic value: Where Ra m \Da′ m It indicates that it exists in Ra m It does not exist in Da′ m In the elements, log() represents the logarithmic operation to base 10. Indicates that for those existing in Ra m It does not exist in Da′ m Iterate through the elements in the list, perform calculations, and output the API with the largest calculated value; 3.17 Assign the index corresponding to the API output in step 3.16 to j, and store the API into the sequence set Da′. m ; 3.18 Repeat steps 3.10 to 3.17 until Da′ m The number of elements and Ra m same; 3.19 Output Service Recommendation Sequence Diversification Rearrangement Results Da′ m This allows for diversified processing of service recommendation results.
Citation Information
Patent Citations
Article recommendation method and device
CN110781377A
SaaS-oriented Web Api diversity recommendation method fused with restart random walk algorithm
CN115599980A