Diversified cloud native service recommendation method based on cross-view comparative learning

Through cross-view comparison learning method in cloud native service recommendation, the shortcomings of diversified service recommendation requirements in the existing technology are solved, the diversity and accuracy of recommendation results are improved, and the user experience is optimized.

CN119271879APending Publication Date: 2025-01-07CHINA JILIANG UNIV
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411271158.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-11
Publication Date
2025-01-07

AI Technical Summary

Technical Problem

The existing technology lacks effective methods in cloud-native service recommendations, and it is difficult to provide diversified cloud-native services while taking into account the accuracy and relevance of recommendations. It is also impossible to effectively handle service discovery, service calls and service combinations, and ignore the problem of The interference of stock, structure and modality on developers.

Method used

Using a cross-view comparison learning method, by extracting multiple graph structures, diversified recommended views, using graph encoder to convert graph structures into vectors, construct user and service vectors, conduct cross-view comparison learning, and ultimately based on service recommendations Diversified service recommendations are provided for scores and similarities within the list.

Benefits of technology

It improves the diversity and user experience of service recommendation results, effectively expresses service interaction and combination relationships, fully extracts graph structure characteristics, and optimizes the diversity and accuracy of service recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119271879A_ABST
    Figure CN119271879A_ABST
Patent Text Reader

Abstract

A diversified cloud native service recommendation method based on cross-view comparative learning comprises the steps that firstly, a service data set is created, graph structures including a user-service graph, a user-combination graph and a combination-service graph are extracted, and then diversified recommendation view division is carried out; aiming at a graph structure in the diversified recommendation view, encoding by utilizing a graph encoder, and constructing a user vector and a cloud native service vector of a single service view and a user vector, a cloud native service vector and a service combination vector of a combined service view; carrying out data enhancement operation on the user and cloud native service vectors in the single service view and the combined service view, constructing a user sample pair and a service sample pair, and carrying out cross-view comparative learning based on the user sample pair and the service sample pair; and calculating service recommendation scores and in-list similarities, and performing diversified service recommendation according to the service recommendation scores and the in-list similarities. The service recommendation experience is optimized, and the diversity degree of service recommendation results is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the fields of service computing, cloud computing and cloud native services, and relates to a diversified cloud native service recommendation method. Background Art

[0002] The development of service computing and cloud computing is driving the arrival of the cloud-native era. Cloud-native refers to the software method of building, deploying and managing modern applications in cloud scenarios (private cloud, hybrid cloud, multi-cloud, etc.). In order to build applications with strong scalability, loose coupling and elastic load, modern organizations and enterprises usually adopt software as a service, function as a service, infrastructure as a service, platform as a service and other models to encapsulate computing resources, applications and business logic into cloud-native services to meet the ever-changing needs of users. For example, the Chinese patent number is: CN202110119460.6, and the name is: A method for implementing shared configuration resources for cloud-native services in a Kubernetes environment, using tag detection and gateway routing to update configuration data parsing rules, and solving the problem of repeated updates of the same configuration resources by adding distributed locks to API configuration. The Chinese patent number is: CN202110867082.X, and the name is: A user-plane function microservice system for cloud-native, which realizes the elastic and dynamic cloud-based orchestration of network element functions, and provides a basic user-plane function platform for the promotion of cloud-native concepts. The Chinese patent number is: CN202311654058.3, and the name is: A data service publishing method and system based on cloud native architecture, which designs service script debugging, compilation, persistence and other processes, thereby reducing the cost and difficulty of service development and enhancing the high concurrency and high availability of services.

[0003] The above three patents have solved the problems of service system deployment, service release, service resource configuration, etc. in the cloud-native context to a certain extent, but they still have the following defects and shortcomings:

[0004] (1) Service discovery, service invocation, and service composition are not included in the cloud-native service lifecycle.

[0005] (2) They ignore the interference that the inventory, structure, and modality of cloud-native services bring to developers and fail to consider the problem of service information filtering.

[0006] Service recommendation technology can quickly and effectively find services that meet the needs of developers from massive, heterogeneous, and multimodal cloud native services, which is conducive to filtering redundant service information and improving service discovery efficiency. In recent years, it has received widespread attention from academia and industry. For example, the Chinese patent number is CN202010322193.8, and its name is a QoS prediction method based on a graph model applied in cloud service recommendation. It proposes a full graph model containing multi-source information to model the service scenario. By considering the impact of multi-source information on QoS, it adaptively integrates local and global features to improve the prediction accuracy of QoS. The Chinese patent number is CN201510004844.8, and its name is a service recommendation method, device, and system for cloud platform applications. According to the service status information, a service matching the target service type is obtained, and the service is used as a service to be recommended, thereby improving the development efficiency of the application and improving the matching degree between the recommended service and the target application. The above method improves the accuracy and relevance of service recommendations, but lacks consideration of the diverse service recommendation needs.

[0007] Currently, there is still no effective method to recommend diverse cloud-native services to developers while taking into account both recommendation accuracy and relevance. Summary of the invention

[0008] In order to overcome the shortcomings of the existing technology, optimize the service recommendation experience, and improve the diversity of service recommendation results, the present invention proposes a diversified cloud native service recommendation method based on cross-view comparative learning. The method first extracts a variety of different graph structures from the service data set and performs diversified recommendation view division; secondly, the graph encoder is used to convert the graph structure in the diversified recommendation view into user vectors, cloud native service vectors, and service combination vectors. Then, user sample pairs and service sample pairs are constructed, and cross-view comparative learning is performed; finally, diversified service recommendations are performed based on service recommendation scores and similarities within the list.

[0009] The technical solution adopted by the present invention to solve its technical problem is:

[0010] A diversified cloud native service recommendation method based on cross-view contrastive learning, the method comprising the following steps:

[0011] Step 1: Create a service dataset and extract graph structures, including user-service graph, user-combination graph, and combination-service graph, and then perform diversified recommendation view division;

[0012] Step 2: Use the graph encoder to encode the graph structure in the diversified recommendation view, and construct the user vector and cloud native service vector of the single service view, as well as the user vector, cloud native service vector, and service combination vector of the combined service view;

[0013] Step 3: Perform data enhancement operations on the user and cloud-native service vectors in the single service view and the combined service view, construct user sample pairs and service sample pairs, and conduct cross-view comparative learning based on the user sample pairs and service sample pairs;

[0014] Step 4: Calculate the service recommendation scores and similarity within the list based on SU, SA, MU, MA, and MM, and make diversified service recommendations based on the service recommendation scores and similarity within the list.

[0015] Further, the process of step 1 is as follows:

[0016] 1.1. Create a service data set: Use crawlers to collect cloud native services, service combinations, and user information, and perform data preprocessing on the collected results to form a service data set;

[0017] 1.2. Extract user-service graph: Extract the interaction information between users and cloud-native services from the service dataset and convert it into a user-service graph;

[0018] 1.3. Extracting user-combination graph: Extract the interaction information between users and service combinations from the service dataset and convert it into a user-combination graph;

[0019] 1.4. Extract composition-service graph: Extract the composition relationship between cloud native services and service compositions from the service dataset and convert it into a composition-service graph;

[0020] 1.5. Diversified recommendation view division: Divide the extracted user-service graph, user-combination graph and combination-service graph into single service view and combined service view. A view is a collection relationship. The data in the same view has similar characteristics. The diversified recommendation view is composed of a single service view and a combined service view. In step 1.1, the service data set includes the following information:

[0021] 1.1.1. Cloud native service: a service-oriented application programming interface (API) deployed and delivered on private cloud, hybrid cloud, or multi-cloud scenarios. Its attributes and functions are described by service description documents and service tags, and are represented by symbol a.

[0022] 1.1.2. Service-oriented: The process of publishing cloud native services in the form of SOAP, RESTful, etc. is called service-oriented;

[0023] 1.1.3. Service description document: a document that describes and specifies the message types, operations, and port information in cloud native services, represented by the symbol w;

[0024] 1.1.4. Service tag: a short text describing the type of cloud native service function in natural language, represented by the symbol t;

[0025] 1.1.5. Service composition: A service formed by combining two or more cloud native services, represented by the symbol m;

[0026] 1.1.6 Combination relationship: If two or more cloud native services constitute a service combination, there is a combination relationship between such cloud native services and the service combination;

[0027] 1.1.7. User: A developer who calls a cloud native service or service combination, represented by the symbol u;

[0028] 1.1.8. Data preprocessing: reorder, deduplicate, and fill in missing values ​​for the data collected by the crawler program;

[0029] 1.1.9, Interaction relationship: refers to the calling relationship between the user and the cloud native service or service combination. In step 1.2, the construction process of the user-service graph is as follows:

[0030] 1.2.1. Create a user-service graph, using symbol G ua Indicates that G ua The point set is symbolized by V ua Indicates that G ua The edge set of E ua express;

[0031] 1.2.2. Traverse the service data set and record the user obtained for the i-th time as u i ;

[0032] 1.2.3. Traverse the service data set and record the service obtained for the jth time as a j ;

[0033] 1.2.4. If u i and a j If there is an interaction relationship between them, jump to step 1.2.5, otherwise jump to step 1.2.2;

[0034] 1.2.5. Will u i Convert to node v i ;

[0035] 1.2.6、a j Convert to node v j ;

[0036] 1.2.7. Establish a connection v i and v j The undirected edge is denoted by e ij express;

[0037] 1.2.8 If V ua Does not contain vi , then v i Join V ua If V ua Does not contain v j , then v j Join V ua middle;

[0038] 1.2.9, if E ua Does not contain e ij , then e ij Join E ua middle;

[0039] 1.2.10. Return the constructed G ua .

[0040] In step 1.3, the process of constructing the user-combination graph is as follows:

[0041] 1.3.1. Create a user-combination graph, using symbol G um Indicates that G um The point set is symbolized by V um express,

[0042] G um The edge set of E um express;

[0043] 1.3.2. Traverse the service data set and record the user obtained for the i-th time as u i ;

[0044] 1.3.3. Traverse the service data set and record the kth service combination as m k ;

[0045] 1.3.4. If u i and m j If there is an interaction relationship between them, jump to step 1.3.5, otherwise jump to step 1.3.2;

[0046] 1.3.5. Will u i Convert to node v i ;

[0047] 1.3.6、m k Convert to node v k ;

[0048] 1.3.7. Establish a connection v i and v k The undirected edge is denoted by e ik express;

[0049] 1.3.8 If V ua Does not contain v i, then v i Join V am If V am Does not contain v k , then v k Join V um middle;

[0050] 1.3.9 If E um Does not contain e ik , then e ik Join E um middle;

[0051] 1.3.10. Return the constructed G um ;

[0052] In step 1.4, the construction process of the bundled interaction graph structure is as follows:

[0053] 1.4.1. Create a composite-service graph, using symbol G am Indicates that G am The point set is symbolized by V am Indicates that G am The edge set of E am express;

[0054] 1.4.2. Traverse the service data set and record the service obtained for the i-th time as a i ;

[0055] 1.4.3. Traverse the service data set and record the kth service combination as m k ;

[0056] 1.4.4, if a i and m j If there is a combination relationship, jump to step 1.4.5, otherwise jump to step 1.4.2;

[0057] 1.4.5、a i Convert to node v i ;

[0058] 1.4.6、m k Convert to node v k ;

[0059] 1.4.7. Establish a connection v i and v k The undirected edge is denoted by e ik express;

[0060] 1.4.8 If V am Does not contain v i , then v i Join V am If Vam Does not contain v k , then v k Join V am middle;

[0061] 1.4.9, if E am Does not contain e ik , then e ik Join E am middle;

[0062] 1.4.10. Return the constructed G am .

[0063] In step 1.5, the construction process of the diversified recommendation view is as follows:

[0064] 1.5.1. Based on steps 1.2, 1.3 and 1.4, construct user-service graph, user-combination graph and combination graph

[0065] -Service graph, using symbol G ua , G um , G ma express;

[0066] 1.5.2. Establish a single service view, represented by the symbol Single. The single service view reflects the interaction between users and cloud native services.

[0067] 1.5.3. Establish a composite service view, represented by the symbol Multi. The composite service view reflects the interaction between users and service compositions, as well as the composite relationship between cloud native services and service compositions.

[0068] 1.5.4、G ua Join Single;

[0069] 1.5.5. G um , G ma Join Multi;

[0070] 1.5.6. Return Single and Multi as the result of building the diversified recommendation views.

[0071] Furthermore, the process of step 2 is as follows:

[0072] 2.1. Graph Encoder: Graph encoder is a graph neural network that converts the input graph structure into a vector;

[0073] 2.2. Construct user vectors and cloud native service vectors in a single service view: Use a graph encoder to encode the user-service graph in a single service view, convert user nodes into user vectors in a single service view, represented by the symbol SU, and convert cloud native service nodes into cloud native service vectors in a single service view, represented by the symbol SA;

[0074] 2.3. Construct user vectors, cloud native service vectors, and service composition vectors in the composite service view: Use the graph encoder to encode the user-composition graph and composition-service graph in the composite service view, transform the user node into the user vector in the composite service view, represented by the symbol MU, transform the cloud native service node into the cloud native service vector in the single service view, represented by the symbol MA, and transform the service composition node into the service composition vector, represented by the symbol MM;

[0075] In step 2.2, the construction process of the user vector and the cloud native service vector in the single service view is as follows:

[0076] 2.2.1. Traversing G ua The node set in , the node obtained for the i-th time is recorded as v i ;

[0077] 2.2.2, if node v i If created by step 1.2.5, it is recorded as a user node; otherwise, it is recorded as a cloud native service node;

[0078] 2.2.3. Traverse the nodes v by order i The set of N-order neighbor nodes of the same order is denoted as VN i , the neighbor node refers to the node v i Other nodes that can be reached from the start, node v i The shortest path length between a node and its neighbor is called the order, which is represented by the symbol N;

[0079] 2.2.4. Create vector su i and vector sa i , and initialize it to an empty vector;

[0080] 2.2.5、v i and VN i Input the graph encoder and get the vector e. If v i For user nodes, assign e to su i ; Otherwise, assign it to sa i ;

[0081] 2.2.6. Create a user vector SU and a cloud native service vector SA under a single service view, and initialize them to empty vectors;

[0082] 2.2.7. Vector su i Aggregate and assign the result to the user vector SU. This process can be expressed by the formula Indicates, where the symbol "=" represents the assignment operation, the symbols "(" and ")" are bracket operators in mathematics, the symbol "+" represents the addition operation, the symbol "×" represents the multiplication operation, and the symbol |su| represents a non-empty vector su i The total number, symbol |sa|

[0083] Represents a non-empty vector sa i Total number of;

[0084] 2.2.8. Vector sa i Aggregate and assign the result to the user vector SA. This process can be expressed by the formula express;

[0085] 2.2.9. Return SU and SA.

[0086] In step 2.3, the construction process of the user vector, cloud native service vector, and service combination vector in the composite service view is as follows:

[0087] 2.3.1. Traversing G um The node set in , the node obtained for the jth time is recorded as v j ;

[0088] 2.3.2. Traversing G ma The node set in , the node obtained for the kth time is recorded as v k ;

[0089] 2.3.3. If node v j If created by step 1.3.5, it is recorded as a user node; otherwise, it is recorded as a service composition node;

[0090] 2.3.4. If node v k If created by step 1.4.5, it is recorded as a cloud native service node; otherwise, it is recorded as a service composition node;

[0091] 2.3.5. Traverse the nodes v by order j The set of N-order neighbor nodes of the same order is denoted as VN j ;

[0092] 2.3.6. Create vector mu j and vector mn j , and initialize it to an empty vector;

[0093] 2.3.7、v j and VNj Input the graph encoder and get the vector e1. If v j For user nodes, assign e1 to mu j ; Otherwise, assign it to mn j ;

[0094] 2.3.8. Traverse the nodes v by order k The set of N-order neighbor nodes of the same order is denoted as VN k ;

[0095] 2.3.9. Create vector mm k and vector ma k , and initialize it to an empty vector;

[0096] 2.3.10、v k and VN k Input the graph encoder and get the vector e2. If v k For cloud native service nodes, assign e2 to ma k ; Otherwise, assign it to mm k ;

[0097] 2.3.11. Create the user vector MU, cloud native service vector MA and service combination vector MM under the composite service view, and initialize them to empty vectors;

[0098] 2.3.12 Aggregation vector mu j , assign the result to MU, and the process is expressed by the formula MU= Indicates that the symbol |mu| represents the total number of non-empty vectors mu, and the symbol

[0099] |mn| represents the total number of non-empty vectors mn;

[0100] 2.3.13 Aggregation vector ma j , assign the result to MA, and the process is done with the formula MA= Indicates that the symbol |mm| represents the total number of non-empty vectors mm, and the symbol |ma| represents the total number of non-empty vectors ma;

[0101] 2.3.14 Aggregation vector mn j , assign the result to MM_1, and the process uses the formula MM_1= express;

[0102] 2.3.15 Aggregation vector mm k , assign the result to MM_2, and the process uses the formula MM_2= express;

[0103] 2.3.16. Add MM_1 and MM_2 and assign half of the result to MM. This process is expressed as

[0104] MM=(MM_1+MM_2)÷2 means;

[0105] 2.3.17. Return MU, MA, MM.

[0106] Furthermore, the process of step 3 is as follows:

[0107] 3.1. Data enhancement: Data enhancement is a commonly used data construction method in contrastive learning, which refers to the process of constructing new data samples by masking, reversing, and scrambling the original data samples;

[0108] 3.2 User Sample Pair: The symbol “DU” represents the user vector constructed by data augmentation. DU and SU constitute the user sample pair in a single service view, and the symbol<SU,DU> DU and MU constitute a user sample pair in the combined service view, represented by<MU,DU> express;

[0109] 3.3. Service Sample Pair: The symbol “DA” represents the service vector constructed by data augmentation. DA and SA constitute the service sample pair in a single service view.<SA,DA> DA and MA constitute a service sample pair in the composite service view, represented by<MA,DA> express;

[0110] 3.4. Construct user sample pairs and service sample pairs through data enhancement operations: Use Bernoulli distribution to construct mask vector X, perform bit-by-bit AND operations on SU, SA, MU, MA and X, corresponding to steps 3.2 and 3.3, and record the generated results as DU and DA. On this basis, SU, SA, MU, MA and DU, DA form user sample pairs and service sample pairs;

[0111] 3.5. Cross-view contrastive learning based on user sample pairs and service sample pairs: Use contrastive learning loss function to<SU,DU> ,<MU,DU> ,<SA,DA> ,<MA,DA> Perform cross-view contrastive learning and use the optimizer for stochastic gradient descent.

[0112] In step 3.4, the process of constructing user sample pairs and service sample pairs through data enhancement operation is as follows:

[0113] 3.4.1. Create a mask vector X and initialize it using Bernoulli distribution. The mask probability is set to P, where P is a hyperparameter and is a real number in the interval [0,1].

[0114] 3.4.2. Create a vector DU and initialize it to an empty vector;

[0115] 3.4.3. Take the vector values ​​of SU, MU and X bit by bit, and record the vector value taken for the i-th time as SU[i].

[0116] MU[i] and X[i];

[0117] 3.4.4. If X[i] is 1, keep SU[i] and MU[i]; otherwise, modify the vector value of SU, assign SU[i] to 0, modify the vector value of MU, assign MU[i] to 0;

[0118] 3.4.5. The symbols "SU_t" and "MU_t" are used to represent the bit-by-bit modified SU and MU;

[0119] 3.4.6. Assign SU_t to DU and create a user sample pair in a single service view<SU,DU> ; 3.4.7. Assign MU_t to DU and create a user sample pair in the combined service view<MU,DU> ; 3.4.8. Create a mask vector Y and initialize it using Bernoulli distribution. The mask probability is set to Q, where Q is a hyperparameter and is a real number in the interval [0,1].

[0120] 3.4.9. Create a vector DA and initialize it to an empty vector;

[0121] 3.4.10. Take the vector values ​​of SA, MA and Y bit by bit, and record the vector values ​​taken for the jth time as SA[j], MA[j] and Y[j];

[0122] 3.4.11. If Y[j] is 1, keep SA[j] and MA[j]; otherwise, modify the vector value of SA, assign SA[j] to 0, modify the vector value of MA, assign MA[j] to 0;

[0123] 3.4.12. The symbols “SA_t” and “MA_t” are used to represent the bit-by-bit modified SA and MA;

[0124] 3.4.13. Assign SA_t to DA and create a service sample pair in the single service view<SA,DA> ; 3.4.14. Assign MA_t to DA and create a user sample pair in the composite service view<MA,DA> ;3.4.15, return<SU,DU> ,<MU,DU> ,<SA,DA> ,<MA,DA> .

[0125] In step 3.5, the process of cross-view contrastive learning is as follows:

[0126] 3.5.1、Define optimizer;

[0127] 3.5.2. Define the contrast loss function Loss_user;

[0128] 3.5.3、Define the temperature coefficient t, t is a hyperparameter, which is a real number in the interval [0,1];

[0129] 3.5.4. Define sample pairs<SU,DU> ,<MU,DU> The similarity between them is represented by sim(SU,DU) and sim(MU,DU) respectively;

[0130] 3.5.5. Calculate the vector dot product between SU ​​and DU, then divide by their respective vector norms and assign the result to sim(SU,DU). The vector dot product refers to the standard inner product of two vectors in Euclidean space, and the vector norm refers to the length of the vector in space.

[0131] 3.5.6. Calculate the vector dot product between MU and DU, then divide by their respective vector moduli and assign the result to sim(MU,DU);

[0132] 3.5.7. Divide sim(SU,DU) by t and perform an exponential operation with the natural constant e as the base. The result is represented by the symbol exp(sim(SU,DU)÷t). The symbol exp represents the exponential operation.

[0133] 3.5.8. Divide sim(MU,DU) by t and perform an exponential operation with the natural constant e as the base. The result is represented by the symbol exp(sim(MU,DU)÷t);

[0134] 3.5.9. Divide exp(sim(SU,DU)÷t) by exp(sim(MU,DU)÷t), take the logarithm and assign it to Loss_user;

[0135] 3.5.10. Define the contrast loss function Loss_api;

[0136] 3.5.11. Define sample pairs<SA,DA> ,<MA,DA> The similarity between them is represented by sim(SA,DA) and sim(MA,DA) respectively;

[0137] 3.5.12. Calculate the vector dot product between SA and DA, then divide by their respective vector norms and assign the result to sim(SA,DA);

[0138] 3.5.13. Calculate the vector dot product between MA and DA, then divide by their respective vector norms and assign the result to sim(MA,DA);

[0139] 3.5.14. Divide sim(SA,DA) by t and perform an exponential operation with the natural constant e as the base. The result is represented by the symbol exp(sim(SA,DA)÷t);

[0140] 3.5.15. Divide sim(MA,DA) by t and perform an exponential operation with the natural constant e as the base. The result is represented by the symbol exp(sim(MA,DA)÷t);

[0141] 3.5.16. Divide exp(sim(SA,DA)÷t) by exp(sim(MA,DA)÷t), take the logarithm and assign it to Loss_api;

[0142] 3.5.17. Define the contrast loss function Loss, add Loss_user and Loss_api and assign it to Loss;

[0143] 3.5.18. Define the training batch epoch, where epoch represents the number of training times;

[0144] 3.5.19. Use optimizer to perform stochastic gradient descent to reduce the value of Loss;

[0145] 3.5.20, set epoch-1;

[0146] 3.5.21. If epoch = 0, the stochastic gradient descent process ends.

[0147] The process of step 4 is as follows:

[0148] 4.1. Service recommendation score: a real number in the interval [0,1], represented by the symbol score, which represents the probability of a cloud native service being recommended to a user. The higher the score, the greater the probability of being recommended.

[0149] 4.2. Service recommendation list: a list of cloud native services recommended to users, represented by the symbol list. The length of the list is represented by the symbol l, where l is a hyperparameter.

[0150] 4.3. Intra-list similarity: a real number in the interval [0,1], represented by the symbol "ilr", which represents the diversity of the service recommendation list. The larger the value of ilr, the higher the similarity between the cloud native services in the service recommendation list, and the worse the diversity of the service recommendation list.

[0151] 4.4. Diversity threshold: a hyperparameter, a real number in the interval [0,1], represented by the symbol "mg";

[0152] 4.5. Calculate the service recommendation score: concatenate the SU and MU vectors, concatenate the SA and MA vectors, calculate the product of the concatenated vectors, and obtain the service recommendation score;

[0153] 4.6. Recommend diversified services based on service recommendation scores and similarity within the list: Arrange the service combinations according to the service recommendation scores, take the top l cloud native services with the highest scores to form a service recommendation list, calculate the ilr of the service recommendation list, and if the ilr is less than mg, use the cloud native services in the service recommendation list as the diversified service recommendation results.

[0154] In step 4.3, the calculation process of the similarity in the list is as follows:

[0155] 4.3.1、Define the similarity within the list ilr and initialize it to 0;

[0156] 4.3.2. Define total similarity total_sim and similarity upper limit max_sim;

[0157] 4.3.3. Traverse the list and record the cloud native service obtained for the i-th time as a i ;

[0158] 4.3.4. Traverse the list and record the cloud native service obtained for the jth time as a j ;

[0159] 4.3.5 Definition a i and a j The similarity between sim(a i ,a j );

[0160] 4.3.6, splicing a i The corresponding vector SA i 、MA i and MM i , the result is represented by the symbol

[0161] express;

[0162] 4.3.7, splicing a j The corresponding vector SA j 、MA j and MM j , the result is represented by the symbol

[0163] express;

[0164] 4.3.8 Calculation and The vector dot product between them is then divided by their respective vector moduli and the result is assigned to sim(a i ,a j );

[0165] 4.3.9. If i and j are not equal, total_sim and sim(a i ,a j ) and add max_sim and 1;

[0166] 4.3.10. End the traversal, divide total_sim by max_sim, and assign the result to ilr;

[0167] 4.3.11. Return ilr.

[0168] In step 4.5, the calculation process of the service recommendation score is as follows:

[0169] 4.5.1. Define the target user for diversified service recommendation as u i ;

[0170] 4.5.2. Traverse the service data set and record the service obtained for the jth time as a j ;

[0171] 4.5.3. Will u i and a j The service recommendation score between them is defined as socre i,j ;

[0172] 4.5.4、Change u in the single service view i and a j The corresponding user vector and cloud native service vector are defined as SU i with SA i ; Change the u in the composite service view i and a j The corresponding user vector and cloud native service vector are defined as MU i with MA i ;

[0173] 4.5.5. Concatenate the SU and MU vectors and use the symbol Indicates, symbol Represents the concatenation operation of vectors;

[0174] 4.5.6. Concatenate the SA and MA vectors and use the symbol express;

[0175] 4.5.7. Yes Transpose, and use the symbol Indicates. Transpose is a mathematical operation in linear algebra that refers to exchanging rows and columns of a vector or matrix. The symbol "T" represents the transpose operation;

[0176] 4.5.8 Calculation The product of i,j ;

[0177] 4.5.9. Return service recommendation score socre i,j .

[0178] In step 4.6, the process of diversified service recommendation is as follows:

[0179] 4.6.1. Target user u i , based on step 4.5, obtain the service recommendation score;

[0180] 4.6.2. Take the l cloud native services with the highest scores to form the recommended service list. The list consisting of the remaining cloud native services is represented by the symbol "left";

[0181] 4.6.3. Calculate the ilr of list based on step 4.3;

[0182] 4.6.4. If ilr is less than mg, jump to step 4.6.8; otherwise, jump to step 4.6.5;

[0183] 4.6.5. If ilr is greater than mg and left is an empty list, jump to step 4.6.8; otherwise, jump to step 4.6.6;

[0184] 4.6.6. Randomly delete any cloud native service in the list, select the cloud native service with the highest score in the left, delete it from the left, and then add it to the list;

[0185] 4.6.7. Jump to step 4.6.3;

[0186] 4.6.8. Return the cloud native services in the list as the diversified service recommendation results to u i .

[0187] The beneficial effects of the present invention are mainly manifested in:

[0188] (1) Propose a variety of different graph structures and diversified recommendation views for service scenarios, effectively expressing service interaction relationships and service combination relationships;

[0189] (2) Combining the encoder with cross-view contrastive learning technology can fully extract graph structural features and convert them into vector representations;

[0190] (3) Service recommendation is made by using both service recommendation score and similarity within the list, which improves the diversity of service recommendation results and optimizes user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0191] Figure 1 Illustration of the process of extracting graph structure and diversifying the recommended view partitions.

[0192] Figure 2 A diagram illustrating the encoding process using a graph encoder.

[0193] Figure 3 Illustration of the process of performing data augmentation operations, constructing sample pairs, and conducting cross-view contrastive learning.

[0194] Figure 4 An illustration of the experimental dataset.

[0195] Figure 5 The figure is an illustration of the experimental results obtained by the present invention on the experimental dataset. DETAILED DESCRIPTION

[0196] The present invention will be further described below in conjunction with the accompanying drawings.

[0197] Reference Figure 1 to Figure 5 , a diversified cloud native service recommendation method based on cross-view contrastive learning, including the following steps:

[0198] Step 1: Create a service dataset and extract graph structures, including user-service graph, user-combination graph, and combination-service graph. Then, perform diversified recommendation view division. The process is as follows:

[0199] 1.1. Create a service data set: Use crawlers to collect cloud native services, service combinations, and user information, and pre-process the collected results to form a service data set. Figure 1 The A part in it represents the service data set, where u1 and u2 represent users, m1 and m2 represent service combinations, and a1, a2, and a3 represent cloud native services;

[0200] In step 1.1, the service data set includes the following information:

[0201] 1.1.1. Cloud native service: a service-oriented application programming interface (API) deployed and delivered on different cloud scenarios such as private cloud, hybrid cloud, and multi-cloud. Its properties and functions are described by service description documents and service tags, represented by symbol a.

[0202] 1.1.2. Service-oriented: The process of publishing cloud native services in SOAP, RESTful and other ways is called service-oriented;

[0203] 1.1.3. Service description document: a document that describes and specifies information such as message types, operations, ports, etc. in cloud native services, represented by the symbol w;

[0204] 1.1.4. Service tag: a short text describing the type of cloud native service function in natural language, represented by the symbol t;

[0205] 1.1.5. Service composition: A service formed by combining two or more cloud native services, represented by the symbol m;

[0206] 1.1.6 Combination relationship: If two or more cloud native services constitute a service combination, there is a combination relationship between such cloud native services and the service combination;

[0207] 1.1.7. User: A developer who calls a cloud native service or service combination, represented by the symbol u;

[0208] 1.1.8. Data preprocessing: reorder, deduplicate, and fill in missing values ​​for the data collected by the crawler program;

[0209] 1.1.9 Interaction relationship: refers to the calling relationship between users and cloud native services or service combinations;

[0210] 1.2. Extracting the user-service graph: Extract the interaction information between users and cloud-native services from the service dataset and convert it into a user-service graph. Figure 1 The connection between u1 and a1, a2 (through m1), and the connection between u2 and a2, a3 (through m2) represent the interaction information between users and cloud native services. The user-service diagram obtained by conversion is as follows: Figure 1 As shown in part B3;

[0211] In step 1.2, the process of constructing the user-service graph is as follows:

[0212] 1.2.1. Create a user-service graph, using symbol G ua Indicates that G ua The point set is symbolized by V ua Indicates that G ua The edge set of E ua express;

[0213] 1.2.2. Traverse the service data set and record the user obtained for the i-th time as u i ;

[0214] 1.2.3. Traverse the service data set and record the service obtained for the jth time as a j ;

[0215] 1.2.4. If u i and a j If there is an interaction relationship between them, jump to step 1.2.5, otherwise jump to step 1.2.2;

[0216] 1.2.5. Will ui Convert to node v i ;

[0217] 1.2.6、a j Convert to node v j ;

[0218] 1.2.7. Establish a connection v i and v j The undirected edge is denoted by e ij express;

[0219] 1.2.8 If V ua Does not contain v i , then v i Join V ua If V ua Does not contain v j , then v j Join V ua middle;

[0220] 1.2.9, if E ua Does not contain e ij , then e ij Join E ua middle;

[0221] 1.2.10. Return the constructed G ua ;

[0222] 1.3. Extracting user-combination graph: Extract the interaction information between users and service combinations from the service dataset and convert it into a user-combination graph. Figure 1 The connections between u1 and m1, and between u2 and m2 represent the interaction information between the user and service combination. The transformed user-service graph is shown in Figure 1 As shown in the B1 section;

[0223] In step 1.3, the process of constructing the user-combination graph is as follows:

[0224] 1.3.1. Create a user-service graph, using symbol G um Indicates that G um The point set is symbolized by V um express,

[0225] G um The edge set of E um express;

[0226] 1.3.2. Traverse the service data set and record the user obtained for the i-th time as u i ;

[0227] 1.3.3. Traverse the service data set and record the kth service combination as mk ;

[0228] 1.3.4. If u i and m j If there is an interaction relationship between them, jump to step 1.3.5, otherwise jump to step 1.3.2;

[0229] 1.3.5. Will u i Convert to node v i ;

[0230] 1.3.6、m k Convert to node v k ;

[0231] 1.3.7. Establish a connection v i and v k The undirected edge is denoted by e ik express;

[0232] 1.3.8 If V ua Does not contain v i , then v i Join V am If V am Does not contain v k , then v k Join V um middle;

[0233] 1.3.9, if E um Does not contain e ik , then e ik Join E um middle;

[0234] 1.3.10. Return the constructed G um ;

[0235] 1.4. Extract composition-service graph: Extract the composition relationship between cloud native services and service compositions from the service dataset and convert it into a composition-service graph. Figure 1 The connections between m1 and a1, a2, and between m2 and a2, a3 represent the interaction information between the user and the service composition. The transformed composition-service graph is shown in Figure 1 As shown in part B2;

[0236] In step 1.4, the construction process of the bundled interaction graph structure is as follows:

[0237] 1.4.1. Create a composite-service graph, using symbol G am Indicates that G am The point set is symbolized by V am express,

[0238] Gam The edge set of E am express;

[0239] 1.4.2. Traverse the service data set and record the service obtained for the i-th time as a i ;

[0240] 1.4.3. Traverse the service data set and record the k-th service combination as m;

[0241] 1.4.4, if a i and m j If there is a combination relationship, jump to step 1.4.5, otherwise jump to step 1.4.2;

[0242] 1.4.5、a i Convert to node v i ;

[0243] 1.4.6、m k Convert to node v k ;

[0244] 1.4.7. Establish a connection v i and v k The undirected edge is denoted by e ik express;

[0245] 1.4.8 If V am Does not contain v i , then v i Join V am If V am Does not contain v k , then v k Join V am middle;

[0246] 1.4.9, if E am Does not contain e ik , then e ik Join E am middle;

[0247] 1.4.10. Return the constructed G am ;

[0248] 1.5. Diversified recommendation view division: Divide the extracted user-service graph, user-combination graph, and combination-service graph into single service view and combined service view. A view is a collection relationship. The data in the same view has similar characteristics. Diversified recommendation views are composed of single service views and combined service views. Figure 1 C1 in the figure represents the composite service view, and C2 represents the single service view;

[0249] In step 1.5, the construction process of the diversified recommendation view is as follows:

[0250] 1.5.1. Based on steps 1.2, 1.3 and 1.4, construct user-service graph, user-combination graph and combination graph

[0251] -Service graph, using symbol G ua , G um , G ma express;

[0252] 1.5.2. Establish a single service view, represented by the symbol Single. The single service view reflects the interaction between users and cloud native services.

[0253] 1.5.3. Establish a composite service view, represented by the symbol Multi. The composite service view reflects the interaction between users and service compositions, as well as the composite relationship between cloud native services and service compositions.

[0254] 1.5.4、G ua Join Single;

[0255] 1.5.5. G um , G ma Join Multi;

[0256] 1.5.6. Return Single and Multi as the result of building diversified recommendation views;

[0257] Step 2: Use the graph encoder to encode the graph structure in the diversified recommendation view, and construct the user vector, cloud native service vector, and service combination vector of the single service view, as well as the user vector, cloud native service vector, and service combination vector of the combined service view. The process is as follows:

[0258] 2.1. Graph Encoder: A graph encoder is a graph neural network that is often used to convert the input graph structure into a vector. Figure 2 As shown in Part D;

[0259] 2.2. Constructing user vectors and cloud native service vectors in a single service view: Use the graph encoder to encode the user-service graph in a single service view, convert the user node into a user vector in a single service view, represented by the symbol SU, and convert the cloud native service node into a cloud native service vector in a single service view, represented by the symbol SA. The user vector and cloud native service vector in a single service view are as follows: Figure 2 As shown in E4 and E5;

[0260] In step 2.2, the process of constructing the user vector and the cloud native service vector in the single service view is as follows:

[0261] 2.2.1. Traversing G ua The node set in , the node obtained for the i-th time is recorded as v i ;

[0262] 2.2.2, if node v i If created by step 1.2.5, it is recorded as a user node; otherwise, it is recorded as a cloud native service node;

[0263] 2.2.3. Traverse the nodes v by order i The set of N-order neighbor nodes of the same order is denoted as VN i , the neighbor node refers to the node v i Other nodes that can be reached from the start, node v i The shortest path length between a node and its neighbor is called the order, which is represented by the symbol N;

[0264] 2.2.4. Create vector su i and vector sa i , and initialize it to an empty vector;

[0265] 2.2.5、v i and VN i Input the graph encoder and get the vector e. If v i For user nodes, assign e to su i ; Otherwise, assign it to sa i ;

[0266] 2.2.6. Create a user vector SU and a cloud native service vector SA under a single service view, and initialize them to empty vectors;

[0267] 2.2.7. Vector su i Aggregate and assign the result to the user vector SU. This process can be expressed by the formula Indicates, where the symbol "=" represents the assignment operation, the symbols "(" and ")" are bracket operators in mathematics, the symbol "+" represents the addition operation, and the symbol

[0268] “×” represents the multiplication operation, and the symbol |su| represents the non-empty vector su i The symbol |sa| represents a non-empty vector sa i Total number of;

[0269] 2.2.8. Vector sa i Aggregate and assign the result to the user vector SA. This process can be expressed by the formula express;

[0270] 2.2.9, return SU and SA;

[0271] 2.3. Construct user vectors, cloud native service vectors, and service composition vectors in the composite service view: Use the graph encoder to encode the user-combination graph and the composition-service graph in the composite service view, convert the user node into the user vector in the composite service view, represented by the symbol MU, convert the cloud native service node into the cloud native service vector in the single service view, represented by the symbol MA, and convert the service composition node into the service composition vector, represented by the symbol MM; the user vector, cloud native service vector, and service composition vector in the composite service view are as follows: Figure 2 As shown in E1, E2 and E3;

[0272] In step 2.3, the construction process of the user vector, cloud native service vector, and service combination vector in the composite service view is as follows:

[0273] 2.3.1. Traversing G um The node set in , the node obtained for the jth time is recorded as v j ;

[0274] 2.3.2. Traversing G ma The node set in , the node obtained for the kth time is recorded as v k ;

[0275] 2.3.3. If node v j If created by step 1.3.5, it is recorded as a user node; otherwise, it is recorded as a service composition node;

[0276] 2.3.4. If node v k If created by step 1.4.5, it is recorded as a cloud native service node; otherwise, it is recorded as a service composition node;

[0277] 2.3.5. Traverse the nodes v by order j The set of N-order neighbor nodes of the same order is denoted as VN j ;

[0278] 2.3.6. Create vector mu j and vector mn j , and initialize it to an empty vector, the vector mu created by this step j and total;

[0279] 2.3.7、v j and VN j Input the graph encoder and get the vector e1. If v j For user nodes, assign e1 to mu j ; Otherwise, assign it to mn j ;

[0280] 2.3.8. Traverse the nodes v by order k The set of N-order neighbor nodes of the same order is denoted as VN k ;

[0281] 2.3.9. Create vector mm k and vector ma k , and initialize it to an empty vector;

[0282] 2.3.10、v k and VN k Input the graph encoder and get the vector e2. k For cloud native service nodes, assign e2 to ma k ; Otherwise, assign it to mm k ;

[0283] 2.3.11. Create the user vector MU, cloud native service vector MA and service combination vector MM under the composite service view, and initialize them to empty vectors;

[0284] 2.3.12 Aggregation vector mu j , assign the result to MU. This process can be expressed by the formula MU= Indicates that the symbol |mu| represents the total number of non-empty vectors mu, and the symbol

[0285] |mn| represents the total number of non-empty vectors mn;

[0286] 2.3.13 Aggregation vector ma j , assign the result to MA. This process can be expressed by the formula MA= Indicates that the symbol |mm| represents the total number of non-empty vectors mm, and the symbol |ma| represents the total number of non-empty vectors ma;

[0287] 2.3.14. Define empty vectors MM_1 and MM_2;

[0288] 2.3.15 Aggregation vector mn j , assign the result to MM_1. This process can be expressed by the formula MM_1= express;

[0289] 2.3.16 Aggregation vector mm k , assign the result to MM_2. This process can be expressed by the formula MM_2=

[0290] express;

[0291] 2.3.17. Add MM_1 and MM_2, and assign half of the result to MM. This process can be expressed by the formula MM = (MM_1 + MM_2) ÷ 2;

[0292] 2.3.18, return MU, MA, MM;

[0293] Step 3: Perform data enhancement operations on the user and cloud-native service vectors in the single service view and the combined service view, construct user sample pairs and service sample pairs, and conduct cross-view comparative learning based on the user sample pairs and service sample pairs. The process is as follows:

[0294] 3.1. Data enhancement: Data enhancement is a commonly used data construction method in contrastive learning. It refers to the process of constructing new data samples by masking, reversing, scrambling and other operations on the original data samples;

[0295] 3.2 User Sample Pair: The symbol “DU” represents the user vector constructed by data augmentation. DU and SU constitute the user sample pair in a single service view, and the symbol<SU,DU> DU and MU constitute a user sample pair in the combined service view, represented by<MU,DU> Indicates. Sample pair<SU,DU> like Figure 3 As shown in G2 in<MU,DU> like Figure 3 As shown in G1;

[0296] 3.3. Service Sample Pair: The symbol “DA” represents the service vector constructed by data augmentation. DA and SA constitute the service sample pair in a single service view.<SA,DA> DA and MA constitute a service sample pair in the composite service view, represented by<MA,DA> Indicates that the sample<SA,DA> like Figure 3 As shown in G4 in<MA,DA> like Figure 3 As shown in G3;

[0297] 3.4. Construct user sample pairs and service sample pairs through data enhancement operation: Use Bernoulli distribution to construct mask vector X, perform bitwise AND operation on SU, SA, MU, MA and X, and record the results as DU and DA. On this basis, SU, SA, MU, MA and DU, DA form user sample pairs and service sample pairs. Data enhancement operation is as follows Figure 3 As shown in Part F;

[0298] In step 3.4, the process of constructing user sample pairs and service sample pairs through data enhancement operation is as follows:

[0299] 3.4.1. Create a mask vector X and initialize it using Bernoulli distribution. The mask probability is set to P. P is a hyperparameter, which is a real number in the interval [0,1]. Bernoulli distribution is a commonly used discrete probability distribution.

[0300] 3.4.2. Create a vector DU and initialize it to an empty vector;

[0301] 3.4.3. Take the vector values ​​of SU, MU and X bit by bit, and record the vector value taken for the i-th time as SU[i].

[0302] MU[i] and X[i];

[0303] 3.4.4. If X[i] is 1, keep SU[i] and MU[i]; otherwise, modify the vector value of SU, assign SU[i] to 0, modify the vector value of MU, assign MU[i] to 0;

[0304] 3.4.5. The symbols "SU_t" and "MU_t" are used to represent the bit-by-bit modified SU and MU;

[0305] 3.4.6. Assign SU_t to DU and create a user sample pair in a single service view<SU,DU> ;

[0306] 3.4.7. Assign MU_t to DU and create a user sample pair in the combined service view<MU,DU> ;

[0307] 3.4.8. Create a mask vector Y and initialize it using Bernoulli distribution. The mask probability is set to Q. Q is a hyperparameter and is a real number in the interval [0,1].

[0308] 3.4.9. Create a vector DA and initialize it to an empty vector;

[0309] 3.4.10. Take the vector values ​​of SA, MA and Y bit by bit, and record the vector value taken for the jth time as SA[j].

[0310] MA[j] and Y[j];

[0311] 3.4.11. If Y[j] is 1, keep SA[j] and MA[j]; otherwise, modify the vector value of SA, assign SA[j] to 0, modify the vector value of MA, assign MA[j] to 0;

[0312] 3.4.12. The symbols “SA_t” and “MA_t” are used to represent the bit-by-bit modified SA and MA;

[0313] 3.4.13. Assign SA_t to DA and create a service sample pair in the single service view<SA,DA> ;

[0314] 3.4.14. Assign MA_t to DA and create a user sample pair in the composite service view<MA,DA> ;

[0315] 3.4.15 Return<SU,DU> ,<MU,DU> ,<SA,DA> ,<MA,DA> ;

[0316] 3.5. Cross-view contrastive learning based on user sample pairs and service sample pairs: Use contrastive learning loss function to<SU,DU> ,<MU,DU> ,<SA,DA> ,<MA,DA> Conduct cross-view contrastive learning and use the optimizer for stochastic gradient descent;

[0317] In step 3.5, the process of cross-view contrastive learning is as follows:

[0318] 3.5.1、Define optimizer;

[0319] 3.5.2. Define the contrast loss function Loss_user;

[0320] 3.5.3、Define the temperature coefficient t, t is a hyperparameter, which is a real number in the interval [0,1];

[0321] 3.5.4. Define sample pairs<SU,DU> ,<MU,DU> The similarity between them is represented by sim(SU,DU) and sim(MU,DU) respectively;

[0322] 3.5.5. Calculate the vector dot product between SU ​​and DU, then divide by their respective vector norms and assign the result to sim(SU,DU). The vector dot product refers to the standard inner product of two vectors in Euclidean space. The vector norm refers to the length of the vector in space.

[0323] 3.5.6. Calculate the vector dot product between MU and DU, then divide by their respective vector moduli and assign the result to sim(MU,DU);

[0324] 3.5.7. Divide sim(SU,DU) by t and perform an exponential operation with the natural constant e as the base. The result is represented by the symbol exp(sim(SU,DU)÷t). The symbol exp represents the exponential operation.

[0325] 3.5.8. Divide sim(MU,DU) by t and perform an exponential operation with the natural constant e as the base. The result is represented by the symbol exp(sim(MU,DU)÷t);

[0326] 3.5.9. Divide exp(sim(SU,DU)÷t) by exp(sim(MU,DU)÷t), take the logarithm and assign it to Loss_user. The loss function of Loss_user is as follows: Figure 3 As shown in the H1 part;

[0327] 3.5.10. Define the contrast loss function Loss_api;

[0328] 3.5.11. Define sample pairs<SA,DA> ,<MA,DA> The similarity between them is represented by sim(SA,DA) and sim(MA,DA) respectively;

[0329] 3.5.12. Calculate the vector dot product between SA and DA, then divide by their respective vector norms and assign the result to sim(SA,DA);

[0330] 3.5.13. Calculate the vector dot product between MA and DA, then divide by their respective vector norms and assign the result to sim(MA,DA);

[0331] 3.5.14. Divide sim(SA,DA) by t and perform an exponential operation with the natural constant e as the base. The result is represented by the symbol exp(sim(SA,DA)÷t). The symbol "exp" represents the exponential operation.

[0332] 3.5.15. Divide sim(MA,DA) by t and perform an exponential operation with the natural constant e as the base. The result is represented by the symbol exp(sim(MA,DA)÷t);

[0333] 3.5.16. Divide exp(sim(SA,DA)÷t) by exp(sim(MA,DA)÷t), take the logarithm and assign it to Loss_api. The loss function of Loss_api is as follows: Figure 3 As shown in the H3 section;

[0334] 3.5.17. Define the contrast loss function Loss, add Loss_user and Loss_api and assign it to Loss. The Loss loss function is as follows: Figure 3 As shown in the H2 section;

[0335] 3.5.18. Define the training batch epoch, where epoch represents the number of training times;

[0336] 3.5.19. Use optimizer to perform stochastic gradient descent to reduce the value of Loss;

[0337] 3.5.20, set epoch-1;

[0338] 3.5.21. If epoch = 0, the stochastic gradient descent process ends;

[0339] Step 4: Calculate the service recommendation score and the similarity in the list based on SU, SA, MU, MA and MM, and make diversified service recommendations based on the service recommendation score and the similarity in the list. The process is as follows:

[0340] 4.1. Service recommendation score: a real number in the interval [0,1], represented by the symbol score, which represents the probability of a cloud native service being recommended to a user. The higher the score, the greater the probability of being recommended.

[0341] 4.2. Service recommendation list: a list of cloud native services recommended to users, represented by the symbol list. The length of the list is represented by the symbol l, where l is a hyperparameter.

[0342] 4.3. Intra-list similarity: a real number in the interval [0,1], represented by the symbol "ilr", which represents the diversity of the service recommendation list. The larger the value of ilr, the higher the similarity between the cloud native services in the service recommendation list, and the worse the diversity of the service recommendation list.

[0343] In step 4.3, the calculation process of the similarity in the list is as follows:

[0344] 4.3.1、Define the similarity within the list ilr and initialize it to 0;

[0345] 4.3.2. Define total similarity total_sim and similarity upper limit max_sim;

[0346] 4.3.3. Traverse the list and record the cloud native service obtained for the i-th time as a i ;

[0347] 4.3.4. Traverse the list and record the cloud native service obtained for the jth time as a j ;

[0348] 4.3.5 Definition a i and a j The similarity between sim(a i ,a j );

[0349] 4.3.6, splicing a i The corresponding vector SA i 、MA i and MM i , the result is represented by the symbol

[0350] express;

[0351] 4.3.7, splicing a j The corresponding vector SA j 、MA j and MM j , the result is represented by the symbol

[0352] express;

[0353] 4.3.8 Calculation and The vector dot product between them is then divided by their respective vector moduli and the result is assigned to sim(a i ,a j );

[0354] 4.3.9. If i and j are not equal, total_sim and sim(a i ,a j ) and add max_sim and 1;

[0355] 4.3.10. End the traversal, divide total_sim by max_sim, and assign the result to ilr;

[0356] 4.3.11、Return ilr;

[0357] 4.4. Diversity threshold: a hyperparameter, a real number in the interval [0,1], represented by the symbol "mg";

[0358] 4.5. Calculate the service recommendation score: concatenate the SU and MU vectors, concatenate the SA and MA vectors, calculate the product of the concatenated vectors, and obtain the service recommendation score;

[0359] In step 4.5, the calculation process of the service recommendation score is as follows:

[0360] 4.5.1. Define the target user for diversified service recommendation as u i ;

[0361] 4.5.2. Traverse the service data set and record the service obtained for the jth time as a j ;

[0362] 4.5.3. Will u i and a j The service recommendation score between them is defined as socre i,j ;

[0363] 4.5.4、Change u in the single service view i and a j The corresponding user vector and cloud native service vector are defined as SU i with SA i ; Change the u in the composite service view i and a j The corresponding user vector and cloud native service vector are defined as MU i with MA i ;

[0364] 4.5.5. Concatenate the SU and MU vectors and use the symbol Indicates, symbol Represents the concatenation operation of vectors;

[0365] 4.5.6. Concatenate the SA and MA vectors and use the symbol express;

[0366] 4.5.7. Yes Transpose, and use the symbol Indicates. Transpose is a mathematical operation in linear algebra that refers to exchanging rows and columns of a vector or matrix. The symbol "T" represents the transpose operation;

[0367] 4.5.8 Calculation and The product of i,j ;

[0368] 4.5.9. Return service recommendation score socre i,j ;

[0369] 4.6. Recommend diversified services based on service recommendation scores and similarity in the list: Arrange the service combinations according to the service recommendation scores, take the first l cloud native services with the highest scores to form a service recommendation list, calculate the ilr of the service recommendation list, and if the ilr is less than mg, use the cloud native services in the service recommendation list as the diversified service recommendation results; the process is as follows:

[0370] In step 4.6, the process of diversified service recommendation is as follows:

[0371] 4.6.1. Target user u i , based on step 4.5, obtain the service recommendation score;

[0372] 4.6.2. Take the l cloud native services with the highest scores to form the recommended service list. The list of remaining cloud native services is represented by the symbol "left";

[0373] 4.6.3. Calculate the ilr of list based on step 4.3;

[0374] 4.6.4. If ilr is less than mg, jump to step 4.6.8; otherwise, jump to step 4.6.5;

[0375] 4.6.5. If ilr is greater than mg and left is an empty list, jump to step 4.6.8; otherwise, jump to step 4.6.6;

[0376] 4.6.6. Randomly delete any cloud native service in the list, select the cloud native service with the highest score in the left, delete it from the left, and then add it to the list;

[0377] 4.6.7. Jump to step 4.6.3;

[0378] 4.6.8. Return the cloud native services in the list as the diversified service recommendation results to u i .

[0379] This embodiment analyzes the actual effect of the invention with specific service data as follows:

[0380] 1) Data from the Programmable Web website from 2019 to 2020 are selected as the experimental data set. The specific information is as follows Figure 4 As shown in the figure, the dataset contains 3516 users, 6206 service combinations, 13329 cloud native services, the average length of the service description document is 42.35, and the number of service tags is 523.

[0381] 2) Four representative service recommendation methods are selected as comparison methods:

[0382] 2.1) CrossCBR method: a recommendation method based on cross-view contrastive learning.

[0383] 2.2) BundleNet method: A bundle recommendation method based on graph neural network.

[0384] 2.3) BPR-MF method: a recommendation method based on matrix decomposition.

[0385] 2.4) MBHT method: a multi-behavior recommendation method based on cross-view contrastive learning.

[0386] 3) Use HR indicators to evaluate the hit rate and accuracy of service recommendation results. The calculation method is as follows:

[0387]

[0388] Among them, HR index represents accuracy, R represents the prediction result of the service recommendation method, O represents the actual service interaction record, the symbol ∩ represents the intersection operation in mathematics, and the symbol || represents the number of elements in the set. The larger the value of HR index, the better the accuracy of the recommendation. When the length of the service recommendation list is 10 or 20, the HR index can be recorded as HR@10 or HR@20.

[0389] 4) Use the ILR indicator to evaluate the diversity of service recommendation results. The calculation method is as follows:

[0390]

[0391] Among them, ILR represents the similarity within the list, R represents the prediction result of the service recommendation method, i and j are API services in R, sim is the similarity measurement function, and cosine similarity is used as the implementation. The larger the ILR index, the worse the diversity of the recommendation results.

[0392] 5) Randomly select 80% of the data in the service experiment set for training, and the remaining 20% ​​of the data is used as test samples. Figure 5 As shown in Figure 5 Use underscores to mark.

[0393] analyze Figure 5 It can be seen that compared with the CrossCBR method, BundleNet method, BPR-MF method and MBHT method, the service recommendation quality of the present invention is better. From the indicator point of view, the HR@10 indicator of the present invention reached 0.5437, and the HR@20 indicator reached 0.5546, ranking first among all the comparison methods. At the same time, the ILR indicator of the present invention is 0.6535, the lowest among all the comparison methods. The lower the ILR indicator, the better the diversity of the service recommendation results. In summary, it can be considered that the present invention has higher recommendation accuracy and recommendation diversity.

Claims

1. A diversified cloud native service recommendation method based on cross-view contrastive learning, characterized in that: The method comprises the following steps: Step 1: Create a service dataset and extract graph structures, including user-service graph, user-combination graph, and combination-service graph, and then perform diversified recommendation view division; Step 2: Use the graph encoder to encode the graph structure in the diversified recommendation view, and construct the user vector and cloud native service vector of the single service view, as well as the user vector, cloud native service vector, and service combination vector of the combined service view; Step 3: Perform data enhancement operations on the user and cloud-native service vectors in the single service view and the combined service view, construct user sample pairs and service sample pairs, and conduct cross-view comparative learning based on the user sample pairs and service sample pairs; Step 4: Calculate the service recommendation scores and similarity within the list based on SU, SA, MU, MA, and MM, and make diversified service recommendations based on the service recommendation scores and similarity within the list.

2. The method for recommending diversified cloud native services based on cross-view contrastive learning according to claim 1, characterized in that: The process of step 1 is as follows: 1.

1. Create a service data set: Use crawlers to collect cloud native services, service combinations, and user information, and perform data preprocessing on the collected results to form a service data set; 1.

2. Extract user-service graph: Extract the interaction information between users and cloud-native services from the service dataset and convert it into a user-service graph; 1.

3. Extracting user-combination graph: Extract the interaction information between users and service combinations from the service dataset and convert it into a user-combination graph; 1.

4. Extract composition-service graph: Extract the composition relationship between cloud native services and service compositions from the service dataset and convert it into a composition-service graph; 1.

5. Diversified recommendation view division: The extracted user-service graph, user-combination graph and combination-service graph are divided into single service view and combination service view. A view is a collection relationship. The data in the same view has similar characteristics. Diversified recommendation views are composed of single service views and combination service views.

3. The method for recommending diversified cloud native services based on cross-view contrastive learning according to claim 2, characterized in that: In step 1.1, the service data set includes the following information: 1.1.

1. Cloud native service: a service-oriented application programming interface (API) deployed and delivered on private cloud, hybrid cloud, or multi-cloud scenarios. Its attributes and functions are described by service description documents and service tags, and are represented by symbol a. 1.1.

2. Service-oriented: The process of publishing cloud native services in SOAP, RESTful and other ways is called service-oriented; 1.1.

3. Service description document: a document that describes and specifies the message types, operations, and port information in cloud native services, represented by the symbol w; 1.1.

4. Service tag: a short text describing the type of cloud native service function in natural language, represented by the symbol t; 1.1.

5. Service composition: A service formed by combining two or more cloud native services, represented by the symbol m; 1.1.6 Combination relationship: If two or more cloud native services constitute a service combination, there is a combination relationship between such cloud native services and the service combination; 1.1.

7. User: A developer who calls a cloud native service or service combination, represented by the symbol u; 1.1.

8. Data preprocessing: reorder, deduplicate, and fill in missing values ​​for the data collected by the crawler program; 1.1.

9. Interaction relationship: refers to the calling relationship between the user and the cloud native service or service combination. In step 1.2, the construction process of the user-service graph is as follows: 1.2.

1. Create a user-service graph, using symbol G ua Indicates that G ua The point set is symbolized by V ua Indicates that G ua The edge set of E ua express; 1.2.

2. Traverse the service data set and record the user obtained for the i-th time as u i ; 1.2.

3. Traverse the service data set and record the service obtained for the jth time as a j ; 1.2.

4. If u i and a j If there is an interaction relationship between them, jump to step 1.2.5, otherwise jump to step 1.2.2; 1.2.

5. Will u i Convert to node v i ; 1.2.6、a j Convert to node v j ; 1.2.

7. Establish a connection v i and v j The undirected edge is denoted by e ij express; 1.2.8 If V ua Does not contain v i , then v i Join V ua If V ua Does not contain v j , then v j Join V ua middle; 1.2.9, if E ua Does not contain e ij , then e ij Join E ua middle; 1.2.

10. Return the constructed G ua ; In step 1.3, the process of constructing the user-combination graph is as follows: 1.3.

1. Create a user-combination graph, using symbol G um Indicates that G um The point set is symbolized by V um Indicates that G um The edge set of E um express; 1.3.

2. Traverse the service data set and record the user obtained for the i-th time as u i ; 1.3.

3. Traverse the service data set and record the kth service combination as m k ; 1.3.

4. If u i and m j If there is an interaction relationship between them, jump to step 1.3.5, otherwise jump to step 1.3.2; 1.3.

5. Will u i Convert to node v i ; 1.3.6、m k Convert to node v k ; 1.3.

7. Establish a connection v i and v k The undirected edge is denoted by e ik express; 1.3.8 If V ua Does not contain v i , then v i Join V am If V am Does not contain v k , then v k Join V um middle; 1.3.9 If E um Does not contain e ik , then e ik Join E um middle; 1.3.

10. Return the constructed G um ; In step 1.4, the construction process of the bundled interaction graph structure is as follows: 1.4.

1. Create a composite-service graph, using symbol G am Indicates that G am The point set is symbolized by V am express, G am The edge set of E am express; 1.4.

2. Traverse the service data set and record the service obtained for the i-th time as a i ; 1.4.

3. Traverse the service data set and record the kth service combination as m k ; 1.4.4, if a i and m j If there is a combination relationship, jump to step 1.4.5, otherwise jump to step 1.4.2; 1.4.5、a i Convert to node v i ; 1.4.6、m k Convert to node v k ; 1.4.

7. Establish a connection v i and v k The undirected edge is denoted by e ik express; 1.4.8 If V am Does not contain v i , then v i Join V am If V am Does not contain v k , then v k Join V am middle; 1.4.9, if E am Does not contain e ik , then e ik Join E am middle; 1.4.

10. Return the constructed G am ; In step 1.5, the construction process of the diversified recommendation view is as follows: 1.5.

1. Based on steps 1.2, 1.3 and 1.4, construct the user-service graph, user-combination graph and combination-service graph, using symbols G respectively. ua , G um , G ma express; 1.5.

2. Establish a single service view, represented by the symbol Single. The single service view reflects the interaction between users and cloud native services. 1.5.

3. Establish a composite service view, represented by the symbol Multi. The composite service view reflects the interaction between users and service compositions, as well as the composite relationship between cloud native services and service compositions. 1.5.4、G ua Join Single; 1.5.

5. G um , G ma Join Multi; 1.5.

6. Return Single and Multi as the result of building the diversified recommendation views.

4. The method for recommending diversified cloud native services based on cross-view contrastive learning according to any one of claims 1 to 3, wherein the process of step 2 is as follows: 2.

1. Graph Encoder: Graph encoder is a graph neural network that converts the input graph structure into a vector; 2.

2. Construct user vectors and cloud native service vectors in a single service view: Use a graph encoder to encode the user-service graph in a single service view, convert user nodes into user vectors in a single service view, represented by the symbol SU, and convert cloud native service nodes into cloud native service vectors in a single service view, represented by the symbol SA; 2.

3. Construct user vectors, cloud native service vectors, and service composition vectors in the composite service view: Use the graph encoder to encode the user-combination graph and composition-service graph in the composite service view, convert user nodes into user vectors in the composite service view, represented by the symbol MU, convert cloud native service nodes into cloud native service vectors in the single service view, represented by the symbol MA, and convert service composition nodes into service composition vectors, represented by the symbol MM.

5. The method for recommending diversified cloud native services based on cross-view contrastive learning according to claim 4, characterized in that in step 2.2, the process of constructing the user vector and the cloud native service vector in the single service view is as follows: 2.2.

1. Traversing G ua The node set in , the node obtained for the i-th time is recorded as v i ; 2.2.2, if the node v i If created by step 1.2.5, it is recorded as a user node; otherwise, it is recorded as a cloud native service node; 2.2.

3. Traverse the nodes v by order i The set of N-order neighbor nodes of the same order is denoted as VN i , the neighbor node refers to the node v i Other nodes that can be reached from the start, node v i The shortest path length between a node and its neighbor is called the order, which is represented by the symbol N; 2.2.

4. Create vector su i and vector sa i , and initialize it to an empty vector; 2.2.5、v i and VN i Input the graph encoder and get the vector e. If v i For user nodes, assign e to su i ; Otherwise, assign it to sa i ; 2.2.

6. Create a user vector SU and a cloud native service vector SA under a single service view, and initialize them to empty vectors; 2.2.

7. Vector su i Aggregate and assign the result to the user vector SU. This process can be expressed by the formula Indicates, where the symbol "=" represents the assignment operation, the symbols "(" and ")" are bracket operators in mathematics, the symbol "+" represents the addition operation, the symbol "×" represents the multiplication operation, and the symbol |su| represents a non-empty vector su i The symbol |sa| represents a non-empty vector sa i Total number of; 2.2.

8. Vector sa i Aggregate and assign the result to the user vector SA. This process can be expressed by the formula express; 2.2.

9. Return SU and SA.

6. The method for recommending diversified cloud native services based on cross-view contrastive learning according to claim 4, characterized in that: In step 2.3, the construction process of the user vector, cloud native service vector, and service combination vector in the composite service view is as follows: 2.3.

1. Traversing G um The node set in , the node obtained for the jth time is recorded as v j ; 2.3.

2. Traversing G ma The node set in , the node obtained for the kth time is recorded as v k ; 2.3.

3. If node v j If created by step 1.3.5, it is recorded as a user node; otherwise, it is recorded as a service composition node; 2.3.

4. If node v k If created by step 1.4.5, it is recorded as a cloud native service node; otherwise, it is recorded as a service composition node; 2.3.

5. Traverse the node v by order j The set of N-order neighbor nodes of the same order is denoted as VN j ; 2.3.

6. Create vector mu j and vector mn j , and initialize it to an empty vector; 2.3.7、v j and VN j Input the graph encoder and get the vector e1. If v j For user nodes, assign e1 to mu j ; Otherwise, assign it to mn j ; 2.3.

8. Traverse the nodes v by order k The set of N-order neighbor nodes of the same order is denoted as VN k ; 2.3.

9. Create vector mm k and vector ma k , and initialize it to an empty vector; 2.3.10、v k and VN k Input the graph encoder and get the vector e2. If v k It is a cloud-native service node. Then assign e2 to ma k ; Otherwise, assign it to mm k ; 2.3.

11. Create the user vector MU, cloud native service vector MA and service combination vector MM under the composite service view, and initialize them to empty vectors; 2.3.12 Aggregation vector mu j , assign the result to MU, and the process is expressed as Indicates that the symbol |mu| represents the total number of non-empty vectors mu, and the symbol |mn| represents the total number of non-empty vectors mn; 2.3.13 Aggregation vector ma j , and assign the result to MA. The process is expressed as Indicates that the symbol |mm| represents the total number of non-empty vectors mm, and the symbol |ma| represents the total number of non-empty vectors ma; 2.3.14 Aggregation vector mn j , assign the result to MM_1, and the process is done by formula express; 2.3.15 Aggregation vector mm k , assign the result to MM_2, and the process is expressed as express; 2.3.

16. Add MM_1 and MM_2 and assign half of the result to MM. This process is expressed as MM=(MM_1+MM_2)÷2 means; 2.3.

17. Return MU, MA, MM.

7. The method for recommending diversified cloud native services based on cross-view contrastive learning according to any one of claims 1 to 3, characterized in that: The process of step 3 is as follows: 3.

1. Data enhancement: Data enhancement is a commonly used data construction method in contrastive learning, which refers to the process of constructing new data samples by masking, reversing, and scrambling the original data samples; 3.2 User sample pair: The symbol "DU" represents the user vector constructed by data augmentation. DU and SU constitute the user sample pair in a single service view, and the symbol<SU,DU> DU and MU constitute a user sample pair in the combined service view, represented by<MU,DU> express; 3.

3. Service sample pair: The symbol "DA" represents the service vector constructed by data augmentation. DA and SA constitute the service sample pair in a single service view, and the symbol<SA,DA> DA and MA constitute a service sample pair in the composite service view, represented by<MA,DA> express; 3.

4. Construct user sample pairs and service sample pairs through data enhancement operations: Use Bernoulli distribution to construct mask vector X, perform bit-by-bit AND operations on SU, SA, MU, MA and X, corresponding to steps 3.2 and 3.3, and record the generated results as DU and DA. On this basis, SU, SA, MU, MA and DU, DA form user sample pairs and service sample pairs; 3.

5. Cross-view contrastive learning based on user sample pairs and service sample pairs: Use contrastive learning loss function to<SU,DU> ,<MU,DU> ,<SA,DA> ,<MA,DA> Perform cross-view contrastive learning and use the optimizer for stochastic gradient descent.

8. The method for recommending diversified cloud native services based on cross-view contrastive learning according to claim 7, characterized in that: In step 3.4, the process of constructing user sample pairs and service sample pairs through data enhancement operation is as follows: 3.4.

1. Create a mask vector X and initialize it using Bernoulli distribution. The mask probability is set to P, where P is a hyperparameter and is a real number in the interval [0,1]. 3.4.

2. Create a vector DU and initialize it to an empty vector; 3.4.

3. Take the vector values ​​of SU, MU and X bit by bit, and record the vector values ​​taken for the i-th time as SU[i], MU[i] and X[i]; 3.4.

4. If X[i] is 1, keep SU[i] and MU[i]; otherwise, modify the vector value of SU, assign SU[i] to 0, modify the vector value of MU, assign MU[i] to 0; 3.4.

5. The symbols "SU_t" and "MU_t" are used to represent the bit-by-bit modified SU and MU; 3.4.

6. Assign SU_t to DU and create a user sample pair in a single service view<SU,DU> ; 3.4.

7. Assign MU_t to DU and create a user sample pair in the combined service view<MU,DU> ; 3.4.

8. Create a mask vector Y and initialize it using Bernoulli distribution. The mask probability is set to Q, where Q is a hyperparameter and is a real number in the interval [0,1]. 3.4.

9. Create a vector DA and initialize it to an empty vector; 3.4.

10. Take the vector values ​​of SA, MA and Y bit by bit, and record the vector values ​​taken for the jth time as SA[j], MA[j] and Y[j]; 3.4.

11. If Y[j] is 1, keep SA[j] and MA[j]; otherwise, modify the vector value of SA, assign SA[j] to 0, modify the vector value of MA, assign MA[j] to 0; 3.4.

12. The symbols "SA_t" and "MA_t" are used to represent the bit-by-bit modified SA and MA; 3.4.

13. Assign SA_t to DA and create a service sample pair in the single service view<SA,DA> ; 3.4.

14. Assign MA_t to DA and create a user sample pair in the composite service view<MA,DA> ; 3.4.15 Return<SU,DU> ,<MU,DU> ,<SA,DA> ,<MA,DA> ; In step 3.5, the process of cross-view contrastive learning is as follows: 3.5.1、Define optimizer; 3.5.

2. Define the contrast loss function Loss_user; 3.5.3、Define the temperature coefficient t, t is a hyperparameter, which is a real number in the interval [0,1]; 3.5.

4. Define sample pairs<SU,DU> ,<MU,DU> The similarity between them is represented by sim(SU,DU) and sim(MU,DU) respectively; 3.5.

5. Calculate the vector dot product between SU ​​and DU, then divide by their respective vector norms and assign the result to sim(SU,DU). The vector dot product refers to the standard inner product of two vectors in Euclidean space, and the vector norm refers to the length of the vector in space. 3.5.

6. Calculate the vector dot product between MU and DU, then divide by their respective vector moduli and assign the result to sim(MU,DU); 3.5.

7. Divide sim(SU,DU) by t and perform an exponential operation with the natural constant e as the base. The result is represented by the symbol exp(sim(SU,DU)÷t). The symbol exp represents the exponential operation. 3.5.

8. Divide sim(MU,DU) by t and perform an exponential operation with the natural constant e as the base. The result is represented by the symbol exp(sim(MU,DU)÷t); 3.5.

9. Divide exp(sim(SU,DU)÷t) by exp(sim(MU,DU)÷t), take the logarithm and assign it to Loss_user; 3.5.

10. Define the contrast loss function Loss_api; 3.5.

11. Define sample pairs<SA,DA> ,<MA,DA> The similarity between them is represented by sim(SA,DA) and sim(MA,DA) respectively; 3.5.

12. Calculate the vector dot product between SA and DA, then divide by their respective vector norms and assign the result to sim(SA,DA); 3.5.

13. Calculate the vector dot product between MA and DA, then divide by their respective vector norms and assign the result to sim(MA,DA); 3.5.

14. Divide sim(SA,DA) by t and perform an exponential operation with the natural constant e as the base. The result is represented by the symbol exp(sim(SA,DA)÷t); 3.5.

15. Divide sim(MA,DA) by t and perform an exponential operation with the natural constant e as the base. The result is represented by the symbol exp(sim(MA,DA)÷t); 3.5.

16. Divide exp(sim(SA,DA)÷t) by exp(sim(MA,DA)÷t), take the logarithm and assign it to Loss_api; 3.5.

17. Define the contrast loss function Loss, add Loss_user and Loss_api and assign it to Loss; 3.5.

18. Define the training batch epoch, where epoch represents the number of training times; 3.5.

19. Use optimizer to perform stochastic gradient descent to reduce the value of Loss; 3.5.20, set epoch – 1; 3.5.

21. If epoch = 0, the stochastic gradient descent process ends.

9. The method for recommending diversified cloud native services based on cross-view contrastive learning according to any one of claims 1 to 3, characterized in that: The process of step 4 is as follows: 4.

1. Service recommendation score: a real number in the interval [0,1], represented by the symbol score, which represents the probability of a cloud native service being recommended to a user. The higher the score, the greater the probability of being recommended. 4.

2. Service recommendation list: a list of cloud native services recommended to users, represented by the symbol list. The length of the list is represented by the symbol l, where l is a hyperparameter. 4.

3. Intra-list similarity: a real number in the interval [0,1], represented by the symbol "ilr", which represents the diversity of the service recommendation list. The larger the value of ilr, the higher the similarity between the cloud native services in the service recommendation list, and the worse the diversity of the service recommendation list. 4.

4. Diversity threshold: a hyperparameter, a real number in the interval [0,1], represented by the symbol "mg"; 4.

5. Calculate the service recommendation score: concatenate the SU and MU vectors, concatenate the SA and MA vectors, calculate the product of the concatenated vectors, and obtain the service recommendation score; 4.

6. Recommend diversified services based on service recommendation scores and similarity within the list: Arrange the service combinations according to the service recommendation scores, take the top l cloud native services with the highest scores to form a service recommendation list, calculate the ilr of the service recommendation list, and if the ilr is less than mg, use the cloud native services in the service recommendation list as the diversified service recommendation results.

10. The method for recommending diversified cloud native services based on cross-view contrastive learning according to claim 9, characterized in that: In step 4.3, the calculation process of the similarity in the list is as follows: 4.3.1、Define the similarity within the list ilr and initialize it to 0; 4.3.

2. Define total similarity total_sim and similarity upper limit max_sim; 4.3.

3. Traverse the list and record the cloud native service obtained for the i-th time as a i ; 4.3.

4. Traverse the list and record the cloud native service obtained for the jth time as a j ; 4.3.5 Definition a i and a j The similarity between sim(a i ,a j ); 4.3.6, splicing a i The corresponding vector SA i 、MA i and MM i , the result is represented by the symbol express; 4.3.7, splicing a j The corresponding vector SA j 、MA j and MM j , the result is represented by the symbol express; 4.3.8 Calculation and The vector dot product between them is then divided by their respective vector moduli and the result is assigned to sim(a i ,a j ); 4.3.

9. If i and j are not equal, total_sim and sim(a i ,a j ) and add max_sim and 1; 4.3.

10. End the traversal, divide total_sim by max_sim, and assign the result to ilr; 4.3.11、Return ilr; In step 4.5, the calculation process of the service recommendation score is as follows: 4.5.

1. Define the target user for diversified service recommendation as u i ; 4.5.

2. Traverse the service data set and record the service obtained for the jth time as a j ; 4.5.

3. Will u i and a j The service recommendation score between them is defined as socre i,j ; 4.5.4、Change u in the single service view i and a j The corresponding user vector and cloud native service vector are defined as SU i with SA i ; Change the u in the composite service view i and a j The corresponding user vector and cloud native service vector are defined as MU i with MA i ; 4.5.

5. Concatenate the SU and MU vectors and use the symbol Indicates, symbol Represents the concatenation operation of vectors; 4.5.

6. Concatenate the SA and MA vectors and use the symbol express; 4.5.

7. Yes Transpose, and use the symbol Indicates. Transpose is a mathematical operation in linear algebra, which refers to exchanging rows and columns of vectors or matrices. The symbol "T" represents the transpose operation; 4.5.8 Calculation The product of i,j ; 4.5.

9. Return service recommendation score socre i,j ; In step 4.6, the process of diversified service recommendation is as follows: 4.6.

1. Target user u i , based on step 4.5, obtain the service recommendation score; 4.6.

2. Take the l cloud native services with the highest scores to form the recommended service list, and the list of remaining cloud native services is represented by the symbol "left"; 4.6.

3. Calculate the ilr of list based on step 4.3; 4.6.

4. If ilr is less than mg, jump to step 4.6.8; otherwise, jump to step 4.6.5; 4.6.

5. If ilr is greater than mg and left is an empty list, jump to step 4.6.8; otherwise, jump to step 4.6.6; 4.6.

6. Randomly delete any cloud native service in the list, select the cloud native service with the highest score in the left, delete it from the left, and then add it to the list; 4.6.

7. Jump to step 4.6.3; 4.6.

8. Return the cloud native services in the list as the diversified service recommendation results to u i .

Citation Information

Patent Citations

  • Service recommendation methods, devices and systems for cloud platform applications

    CN104615661B

  • Graph model-based QoS prediction method applied to cloud service recommendation

    CN111553401A

  • A method for implementing shared configuration resources for cloud native services in a Kubernetes environment

    CN112783654B

  • Cloud-oriented native user plane function micro-service system

    CN113852939A

  • A data service publishing method and system based on cloud native architecture

    CN117354114B