Industrial software component recommendation method and system

By obtaining the text description and interaction data of industrial service APIs, using text feature vectors and interaction matrices for similarity matching, and combining graph convolution and collaborative filtering processing, the problem of poor recommendation effect in existing technologies is solved, and efficient and accurate industrial software component recommendations are achieved.

CN117194742BActive Publication Date: 2025-09-23GUANGDONG UNIV OF TECH +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310976178.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-03
Publication Date
2025-09-23
Estimated Expiration
2043-08-03

AI Technical Summary

Technical Problem

Existing industrial software component recommendation methods are based on rigid logic of specific indicators, resulting in poor recommendation results and failure to meet user needs.

Method used

By obtaining the text description and interaction data of industrial service APIs, using text feature vectors and interaction matrices for similarity matching, and combining graph convolution and collaborative filtering processing, efficient and accurate recommendation results are generated.

Benefits of technology

It achieves efficient and accurate recommendation of industrial software components based on user needs, improving the accuracy and applicability of recommendations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117194742B_ABST
    Figure CN117194742B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for recommending industrial software components. The method includes: obtaining text descriptions and interaction data of each industrial service API to be recommended, and obtaining a target API request; converting the text descriptions of each industrial service API into a text feature vector, performing similarity matching based on the text feature vector and the target API request to obtain an initial recommendation list of the industrial service API; generating an interaction matrix based on the interaction data, and dividing the interaction matrix into a data set and a training set based on a preset ratio; performing graph convolution processing on the data set to obtain a result set; performing collaborative filtering processing on the training set to obtain a supervision set; and performing weighted processing on the initial recommendation list based on the result set and the supervision set to obtain a target recommendation result. The embodiments of the present invention can efficiently and accurately recommend industrial software components and can be widely used in the field of computer technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to an industrial software component recommendation method and system. Background Art

[0002] As digital technology continues to mature, the digital economy and the real economy are increasingly intertwined. This technological growth has brought about many new concepts. In the industrial sector, many companies have already invested in research on the Industrial Internet. The Industrial Internet represents a new type of infrastructure, application model, and industrial ecosystem that deeply integrates next-generation information and communication technologies with the industrial economy. By comprehensively connecting people, machines, objects, and systems, it builds a new manufacturing and service system that covers the entire industrial chain and value chain. This provides a path for the digitalization, networking, and intelligent development of industry and beyond, and is a key cornerstone of the Fourth Industrial Revolution. With the development of the Industrial Internet, a growing number of microservice components, including models, knowledge, and businesses, are converging. How to better meet diverse user needs has become a key focus in the development of Industrial Internet platforms. Service recommendation is a crucial task, helping users find the most suitable service based on their needs. However, existing service recommendation methods are mostly based on rigid logic based on specific indicators, resulting in poor results and a failure to tailor recommendations to specific scenarios. Summary of the Invention

[0003] In view of this, an embodiment of the present invention provides an industrial software component recommendation method and system, which can efficiently and accurately recommend industrial software components.

[0004] In one aspect, an embodiment of the present invention provides an industrial software component recommendation method, comprising:

[0005] Obtain text descriptions and interaction data of each industrial service API to be recommended, and obtain target API requests;

[0006] Convert the text description of each industrial service API into a text feature vector. Based on the text feature vector and the target API request, perform similarity matching to obtain an initial recommendation list of industrial service APIs.

[0007] Generate an interaction matrix based on the interaction data, and divide the interaction matrix into a data set and a training set based on a preset ratio;

[0008] Perform graph convolution on the data set to obtain the result set;

[0009] Perform collaborative filtering on the training set to obtain the supervision set;

[0010] Based on the result set and the supervision set, the initial recommendation list is weighted to obtain the target recommendation result.

[0011] Optionally, the text description of each industrial service API is converted into a text feature vector, including:

[0012] Preprocess the text descriptions of each industrial service API; this preprocessing includes removing special characters, punctuation marks, and HTML tags, as well as converting the text format;

[0013] Using the pre-trained word vector model, we vectorize the pre-processed text descriptions of each industrial service API to obtain the text feature vectors of each industrial service API.

[0014] Among them, the word vector model is generated by training the FastText model based on preset training conditions, and the preset training conditions include pre-set word vector dimensions and number of training iterations.

[0015] Optionally, similarity matching is performed based on the text feature vector and the target API request to obtain an initial recommendation list of industrial service APIs, including:

[0016] Convert the target API request into a request feature vector;

[0017] The cosine similarity function is used to determine the similarity between the text feature vector and the request feature vector of each industrial service API;

[0018] Based on a preset number, several industrial service APIs with the highest similarity are obtained as an initial recommendation list.

[0019] Optionally, an interaction matrix is ​​generated based on the interaction data, including:

[0020] Transform interaction data into interaction feature vectors; where the interaction data is obtained based on the interaction logs between different target objects and various industrial service APIs;

[0021] Based on the interaction feature vector, an interaction matrix is ​​constructed; the rows of the interaction matrix represent each target object, and the columns of the interaction matrix represent each industrial service API.

[0022] Optionally, perform graph convolution on the dataset to obtain a result set, including:

[0023] The Light-GCN model is used to perform graph convolution on the dataset, and the result set is obtained through two layers of convolution.

[0024] Optionally, the dataset is in the format of an interaction matrix; graph convolution is performed on the dataset to obtain a result set including:

[0025] Perform the first convolution processing between the rows or columns of the interaction matrix of the data set, and obtain the embedding vector through interactive learning of similar information;

[0026] A second convolution process is performed between the rows and columns of the interaction matrix of the data set, and the result set is obtained by learning the correlation of interactions between different types of information based on the embedding vector.

[0027] Optionally, collaborative filtering is performed on the training set to obtain a supervision set, including:

[0028] The Item-KNN model is used to perform collaborative filtering on the training set, and the supervision set is obtained based on the similarity determined by cosine similarity.

[0029] Optionally, the training set is in the format of an interaction matrix; performing collaborative filtering on the training set to obtain a supervision set includes:

[0030] Based on the correlation between rows and columns in the interaction matrix of the training set, assign values ​​to each item in the matrix;

[0031] The assigned matrix is ​​transposed to obtain a transposed matrix. The cosine similarity of the transposed matrix is ​​then calculated to determine the similarity between the interaction behaviors of various industrial service APIs, and the supervision set is obtained.

[0032] Optionally, based on the result set and the supervision set, the initial recommendation list is weighted to obtain the target recommendation result, including:

[0033] The Bayesian personalized ranking loss function is used to verify the correctness of the result set and the supervision set, and the verification results are combined with the initial recommendation list for weighted processing to obtain the target recommendation results.

[0034] In another aspect, an embodiment of the present invention provides an industrial software component recommendation system, comprising:

[0035] The first module is used to obtain the text description and interaction data of each industrial service API to be recommended, and obtain the target API request;

[0036] The second module is used to convert the text description of each industrial service API into a text feature vector, and perform similarity matching based on the text feature vector and the target API request to obtain an initial recommendation list of industrial service APIs;

[0037] The third module is used to generate an interaction matrix based on the interaction data and divide the interaction matrix into a data set and a training set based on a preset ratio;

[0038] The fourth module is used to perform graph convolution on the data set to obtain the result set;

[0039] The fifth module is used to perform collaborative filtering on the training set to obtain the supervision set;

[0040] The sixth module is used to perform weighted processing on the initial recommendation list based on the result set and the supervision set to obtain the target recommendation result.

[0041] In another aspect, an embodiment of the present invention provides an industrial software component recommendation system, comprising a processor and a memory;

[0042] The memory is used to store programs;

[0043] The processor executes the program to implement the above method.

[0044] On the other hand, an embodiment of the present invention provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the above method.

[0045] The present invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the above method.

[0046] The embodiment of the present invention first obtains the text description and interaction data of each industrial service API to be recommended, and obtains the target API request; converts the text description of each industrial service API into a text feature vector, performs similarity matching based on the text feature vector and the target API request, and obtains an initial recommendation list of industrial service APIs; generates an interaction matrix based on the interaction data, and divides the interaction matrix into a data set and a training set based on a preset ratio; performs graph convolution processing on the data set to obtain a result set; performs collaborative filtering processing on the training set to obtain a supervision set; and performs weighted processing on the initial recommendation list based on the result set and the supervision set to obtain a target recommendation result. The embodiment of the present invention first obtains an initial recommendation list through similarity matching screening, and for industrial scenarios, the items required for the same type of scenario are often similar. Then, the embodiment of the present invention further mines the correlation between the data through graph convolution processing of the data set based on the interaction matrix and collaborative filtering processing of the training set. In order to enhance the accuracy of matching, the recommendation result is finally determined by combining the result set, the supervision set and the initial recommendation list, and an API recommendation that better meets the needs of the relevant scenario is obtained. The embodiment of the present invention can efficiently and accurately recommend industrial software components. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0048] Figure 1 A flowchart of an industrial software component recommendation method provided by an embodiment of the present invention;

[0049] Figure 2 A schematic diagram of the process principle of combining the Light-GCN model and the Item-KNN model provided in an embodiment of the present invention;

[0050] Figure 3 A schematic diagram of the overall process of the industrial software component recommendation method provided by an embodiment of the present invention;

[0051] Figure 4 A schematic diagram of the structure of an industrial software component recommendation system provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0052] In order to make the purpose, technical solutions and advantages of the present invention more clearly understood, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.

[0053] On the one hand, referring to Figure 1 , an embodiment of the present invention provides an industrial software component recommendation method, comprising:

[0054] S100: Obtain text descriptions and interaction data of each industrial service API to be recommended, and obtain target API requests;

[0055] S200, converting the text description of each industrial service API into a text feature vector, performing similarity matching based on the text feature vector and the target API request to obtain an initial recommendation list of industrial service APIs;

[0056] It should be noted that, in some embodiments, converting the text description of each industrial service API into a text feature vector may include: preprocessing the text description of each industrial service API; wherein the preprocessing includes removing special characters, punctuation marks and HTML tags and converting the text format; using a pre-trained word vector model, vectorizing the pre-processed text description of each industrial service API to obtain the text feature vector of each industrial service API; wherein the word vector model is generated by training the FastText model based on preset training conditions, and the preset training conditions include pre-set word vector dimensions and number of training iterations.

[0057] Among them, in some embodiments, similarity matching is performed based on the text feature vector combined with the target API request to obtain an initial recommendation list of industrial service APIs, including: converting the target API request into a request feature vector; determining the similarity between the text feature vector and the request feature vector of each industrial service API through the cosine similarity function; based on a preset number, obtaining several industrial service APIs with the highest similarity as the initial recommendation list.

[0058] In some specific embodiments, step S200 can convert the text description of the industrial service API into a feature vector and match the service API with the best usage status based on the text description of the request API. This step mainly converts the complex API text description and user information text description into a text feature vector with rich semantic information, and then finds the TOP-K list of the best-used APIs based on the text features of the request API. The specific process is as follows:

[0059] First, use FastText to extract features from the industrial service API data. Then, train a FastText word embedding model. Using this trained FastText word embedding model, convert the API's text description into a corresponding text feature vector. Then, by calculating the similarity between feature vectors, the best similarity-based recommendations are found for the device. Finally, the API with the highest similarity to the target API is recommended and output.

[0060] The FastText model is a text classification model based on word vectors. It uses character-level n-gram features to represent words in a text, avoiding the problem of traditional bag-of-words models that require considering all possible word sequences. During FastText training, each word is represented as a fixed-length vector, which is then combined into a vector representation of the text, and finally classified using the softmax function. FastText's main advantage is its efficiency. It uses hierarchical softmax to accelerate training. Hierarchical softmax is a method for handling large-scale classification problems. It organizes labels into trees, so that each label only needs to be calculated with the classifier of its parent node, rather than for all possible labels. This method significantly reduces computational effort and improves training speed. In addition to hierarchical softmax, FastText also uses negative sampling to train the model. Negative sampling is a technique used to optimize word vector training. It randomly samples a certain number of words that do not appear in the current context and compares them as negative samples with the words in the current context. Negative sampling makes the model more robust and also improves training speed.

[0061] Industrial Service API data example:

[0062] API specifications in industrial service scenarios mainly describe the service, such as service name, category, interface, operations, and parameters. The following are the design requirements for providing API interfaces for different devices in industrial scenarios based on the RESTful API architecture:

[0063] (1) Define resources: First, determine what resources and operations need to be provided. In industrial scenarios, this may include device information, sensor data, control instructions, etc. For example:

[0064] Device information: / devices

[0065] Sensor data: / devices / {deviceId} / sensors

[0066] Control commands: / devices / {deviceId} / commands

[0067] {deviceId} is the unique identifier of the device, which can be represented by a number or a string.

[0068] (2) Determine the HTTP method: Next, you need to select the appropriate HTTP method based on the type of operation. Commonly used methods include GET, POST, PUT, and DELETE. For example:

[0069] Get a list of devices: GET / devices

[0070] Get the sensor data of the device: GET / devices / {deviceId} / sensors

[0071] Send control commands: POST / devices / {deviceId} / commands

[0072] (3) Design input parameters and output results: For each API interface, you need to clearly define the input parameters and output results.

[0073] For example:

[0074] Get device list: No parameters are required and the device list is returned.

[0075] Get the sensor data of the device: You need to input the parameter deviceId and return the sensor data of the device.

[0076] Send control command: You need to input parameters deviceId and command content, and return whether it is executed successfully.

[0077] (4) Handling Errors: Finally, you need to consider how to handle errors. For example, if the device the user requested doesn't exist, what error message should be returned? If the user doesn't have permission to perform a certain operation, you also need to return an appropriate error message. Common HTTP error codes include 400, 401, 404, 500, etc.

[0078] Therefore, the key to designing a RESTful API is to define resources, select appropriate HTTP methods, clearly define input parameters and output results, and handle error conditions. The following is an example of data design for a device control API:

[0079]

[0080] Get the device:

[0081] Request: GET / devices / {device_id}

[0082] The parameters are shown in Table 1:

[0083] Table 1

[0084] Parameter name type Is this field required? describe device_id string yes Unique identifier for the device

[0085] Example of a successful response:

[0086]

[0087]

[0088] This example returns data in JSON format. HTTP / 1.1 200OK: This is the HTTP status line, indicating that the server successfully processed the client's request and returned valid response data. The status code "200" indicates a successful request. Content-Type: application / json: This is the HTTP header, specifying that the response body is in JSON format. This helps the client understand how to correctly parse the data returned by the server. The JSON data section includes: "id": "device_123": indicates the device's unique identifier is "device_123." "name": "Processing Machine": indicates that the device's name is "Processing Machine," indicating that it is a machine used to process parts. "description": "A machine used to process parts. The current weather is thunderstorm, the temperature is 20 degrees Celsius, and the condition of the machine is 80%." provides a description of the device, including the current weather conditions, temperature, and condition. "manufacturer": "ABC Company": indicates that the manufacturer of the device is "ABC Company." "model": "XYZ Model": indicates that the model of the device is "XYZ Model." "serial_number":"12345":The serial number of the device is "12345". "location":{"latitude":37.7749,"longitude":-122.4194}:The location information of the device, the latitude is 37.7749, and the longitude is -122.4194. "status":"online":The status of the device is "online", indicating that the device is currently available.

[0089] This data, containing information about a processing machine, is returned to the client in JSON format. The client can parse the JSON data to obtain various device attributes, such as the device name, location, and status. This data exchange is implemented using the HTTP protocol and is commonly used for communication between web applications and APIs.

[0090] Example of a failure response:

[0091]

[0092] This example returns data in JSON format. HTTP / 1.1 404 Not Found: This is the status line of the HTTP protocol, indicating that the server cannot find the resource or data requested by the client. The status code "404" stands for "Not Found," meaning that the device requested by the client does not exist or cannot be found by the server. Content-Type: application / json: This is an HTTP header that specifies that the content type of the response body is in JSON format. This allows the client to correctly parse the data returned by the server. The JSON data section: "error": "Device not found." provides an error message indicating that the device requested by the client could not be found. Based on the client's request, the server determined that the device did not exist and therefore returned this JSON data containing the error message.

[0093] This data indicates that the server couldn't find the device requested by the client and therefore returned an HTTP 404 error response containing JSON data with an "error" field indicating that the device was not found. The client can handle this error message appropriately, such as notifying the user that the device doesn't exist or retrying to correctly send the request.

[0094] Control device: POST / devices / {device_id} / control

[0095] The parameters are shown in Table 2:

[0096] Table 2

[0097]

[0098] Successful response:

[0099]

[0100] Similar to the data type returned for a successful response, when a device needs to be controlled, if the control is successful, relevant information about the successful control will be returned in the JSON data section.

[0101] Failure response:

[0102]

[0103]

[0104] Similar to the data type returned for a successful response, when a device needs to be controlled, if the control fails, the specific reason for the failure will be returned in the JSON data section.

[0105] After the above introduction to data design, after obtaining the specific data style of the component API, in order to facilitate subsequent data processing, it is first necessary to perform feature extraction on the text of the component API.

[0106] Text feature vector conversion steps:

[0107] (1) Data preprocessing: The API text description is properly cleaned and preprocessed. This includes removing special characters, punctuation marks, and HTML tags, and converting the text to lowercase.

[0108] (2) Prepare training data: Save the preprocessed API text description into a text file, with each line representing an API text description. Ensure that each API text description and its corresponding semantic label (such as the API function category) are on the same line.

[0109] (3) Train the FastText model: Use the FastText library to load the training data and train a FastText model. You can specify the dimension of the word vectors, the number of training iterations, and other parameters. The training process will learn to generate feature vector representations of the API text descriptions.

[0110] (4) Extract feature vectors: Use the trained FastText model to convert the API text description into a corresponding feature vector representation. This can be achieved by calling the get_sentence_vector method of the FastText model.

[0111] For feature extraction, simply input JSON data, and the FastText model will extract the description field from the API and obtain and store the feature vector of the API description text in the feature_vector variable. The API feature vector generated by FastText includes word order information and character-level n-gram representations, which enables it to better capture the internal structure and context of the text. Compared with traditional word vector representation methods, FastText's feature vectors can more accurately and richly capture the semantic information of API text descriptions.

[0112] Best use of text description matching service:

[0113] Since the working hours of devices vary due to factors such as weather and the age of the device, we can divide the optimal activity description sets of different devices according to the working hours of different devices under different weather conditions and the age of the device. Based on the API call, the corresponding device optimal activity status description is used for API recommendation matching.

[0114] The optimal service usage processing primarily focuses on the description of the current device status in the "description" field of API data. Using the aforementioned FastText model, we extract the feature vector of the API description text and calculate a similarity match between the current API and its corresponding optimal status tier API. This similarity calculation identifies other APIs similar to the current API, thereby listing the optimal service usage APIs and generating a list of optimal device status APIs.

[0115] Specific code implementation steps:

[0116] (1) Training the FastText model: First, use the FastText algorithm to perform unsupervised training on the API description text stored in the file "API_descriptions.txt". FastText is a fast text representation learning algorithm for text classification and word vector learning. Training is done using the "skipgram" model, which is used to learn word vectors.

[0117] (2) Extracting feature vectors: For a specific API response, the code extracts the "description" field, which is the description text of the API. Then, using the previously trained FastText model, the description text is converted into a feature vector. This feature vector is used to represent the description information of the API.

[0118] (3) Calculating Similarity Between APIs: We define a function compute_similarity(vector1, vector2) to calculate the similarity between two API feature vectors. Here, we use cosine similarity to measure the similarity between two vectors. Cosine similarity is a commonly used vector similarity metric.

[0119] (4) Recommendation based on similarity: Another function recommend_similar_APIs(target_API_vector, API_vectors, API_labels, top_k=5) is defined, which is used to calculate the similarity of all other APIs based on the feature vector of the target API and return the top_k API recommendation results with the highest similarity.

[0120] S300, generating an interaction matrix according to the interaction data, and dividing the interaction matrix into a data set and a training set based on a preset ratio;

[0121] It should be noted that, in some embodiments, generating an interaction matrix based on interaction data includes: converting the interaction data into an interaction feature vector; wherein the interaction data is obtained based on the interaction logs between different target objects and various industrial service APIs; constructing an interaction matrix based on the interaction feature vector; wherein the rows of the interaction matrix represent each target object, and the columns of the interaction matrix represent each industrial service API.

[0122] In some specific embodiments, step S300 can be performed by outputting the user (target object) and API interaction data into the matrix data required for Light-GCN training, and dividing it into a data set and a training set; wherein, the user and API interaction data, such as the API call records used by the user, are collected, and the user and API interaction records are output in the matrix format required by LightGCN, and randomly divided into a data set x and a training set y in a 7:3 manner. The specific process is as follows:

[0123] In this step, we also use FastText to extract API data from industrial services and generate an interaction matrix. The specific implementation steps are as follows:

[0124] (1) Collecting API data from industrial services: Collecting API data from industrial service systems, using user-API interaction logs. The collected API data is organized and preprocessed for use in FastText training and interaction matrix generation.

[0125] (2) Use FastText to train a word vector model: Use the prepared API dataset and FastText to train a word vector model. FastText provides an API for training word vectors. You can customize the training process according to the FastText documentation.

[0126] (3) Extract API feature vectors: Use the trained FastText word vector model to convert the API text description into a corresponding feature vector. You can obtain the feature vector of the API text by calling the FastText model method (such as get_sentence_vector).

[0127] (4) Generate an interaction matrix and partition the dataset: The interaction data between users and APIs (using interaction logs as the data source) is represented as a matrix, where rows represent users, columns represent APIs, and the values ​​in the matrix represent the interaction between users and APIs (for example, whether the user used the API, or the number of interactions, etc.). Then, from the constructed user-API interaction matrix, a portion of the data is used as the dataset for model evaluation and testing, while the remaining data is used as the training set for model training. Finally, it is necessary to ensure that the output data format conforms to the input format required by the Light-GCN model.

[0128] S400, performing graph convolution processing on the data set to obtain a result set;

[0129] It should be noted that, in some embodiments, step S400 may use the Light-GCN model to perform graph convolution processing on the dataset, and obtain a result set through two layers of convolution processing.

[0130] In some specific embodiments, step S400 performs graph convolution processing on the dataset x, and the dataset x can be processed using a two-layer convolution process using the Light-GCN model. The first layer is the convolution processing between users and between projects, and the second layer is the convolution processing between users and services to obtain the result set Q.

[0131] Wherein, the data set is in the format of an interaction matrix. In some embodiments, step S400 may include: performing a first convolution processing between rows or columns of the interaction matrix of the data set, and obtaining an embedding vector through similar information interaction learning; performing a second convolution processing between rows and columns of the interaction matrix of the data set, and obtaining a result set based on the embedding vector through correlation learning of different types of information interactions.

[0132] In some specific embodiments, the specific process of performing graph convolution processing on the dataset x is as follows:

[0133] like Figure 2 As shown on the left, the Light-GCN model first learns interactions between similar information, such as between users and APIs, as a single group. It then performs a weighted summation of the embedding information from different graph convolutional propagation layers to obtain the embedding vector for the user / API center node. The second step is to learn interactions between different information types, using user-API interactions to learn the correlation between users and APIs.

[0134] The first step in learning similar information is to transfer information between similar nodes. This information transfer is done by learning node representations through features on a smoothed graph, so vectors need to be repeatedly aggregated and iterated. For example, updating a user node u requires aggregating all of its connected user neighbor nodes. During the aggregation phase, the Light-GCN model changes the self-connection characteristics of most GCN models and only selects neighbor nodes to be connected. Taking the user node as an example, the GCN aggregation process is defined as:

[0135]

[0136] Where, Represents the vector after user vector contact aggregation, represent the embedding of user u1 and user i after propagation in the kth layer, Represents the set of user neighbors that interact with user u1. The AGG aggregation function is the core of the GCN operation, but GCN was originally proposed for node classification on the graph. Each node needs to perform multiple layers of nonlinear feature transformations, which is of no help to collaborative filtering of user / API interactions. Therefore, we only use a simple weighted sum aggregator and use the normalization term This can prevent the embedding vector from growing larger as the convolutional layer operates. The Light-GCN model operation is defined as follows:

[0137]

[0138]

[0139] Where, represents the embedding vector of user u1 at the K+1 layer, represents the embedding vector of the Kth layer, u1 represents user u1, i represents user i, Represents the set of user neighbors that interact with user u1. The function is to perform matrix weighted summation between user u1 and user i who interacts with user u1 in the weighted K+1 layer matrix. The role of is to weight the number of u1 that user i has interacted with, and finally through Perform a weighted sum to weight the relationship between user u1 and user i at the K+1th layer, and obtain the embedding vector of user u1 at the K+1th layer.

[0140] Same thing.

[0141] After K layers of operations, each node has K+1 embedding vectors. The embedding vectors of each layer are further combined to obtain the final embedding vectors of all central nodes. The following takes user u1 as an example:

[0142]

[0143] Where, represents the final embedding vector, Represents the current embedding vector. To avoid complicating the convolutional layer, we discard the automatic optimization parameters used in most experiments and use only a scalar Combine each layer of embedding, keep it simple, and perform the current embedding vector Calculate the mean value to get the final embedding vector

[0144] After the first step of learning between information of the same type, the second step is to learn between different types of information, that is, learning between user-API interactions to learn user-API correlations. This challenge is addressed by leveraging the high-order connectivity of interactions and stacking embedded propagation layers. The information flow of high-order connectivity between layers captures collaborative signals. For example, Figure 2 The path u←v2←u1 in the middle left indicates that user u and user u1 are similar, connected by API v2. This suggests that similarities between the two users may also exist across other APIs. The path u←v2←u1←v4 indicates that user u is likely to click on v4 because the similar user u1 has previously been associated with that API. Furthermore, the other API nodes in the third layer indicate that user u is more interested in API v4, as two paths exist between them, while v5 and v6 each have only one path to user u. In summary, multi-layer convolutional propagation layers effectively utilize connectivity information to represent collaborative filtering signals.

[0145] The code implementation of this method uses the LightGCN model to model the user-API relationship. Its data processing logic is:

[0146] (1) User-API relationship matrix: Given a dataset x, which stores the interaction relationships between users and APIs, the shape is (num_users, num_APIs). In this matrix, each row represents a user, each column represents an API, and the values ​​in the matrix are 0 or 1, where 0 indicates that the user has not interacted with the API and 1 indicates that the user has interacted with the API.

[0147] (2) Constructing a sparse matrix of users and items: Use the sp.csr_matrix function in the SciPy library to convert the dataset x into a sparse matrix adj_matrix. A sparse matrix is ​​a data structure used to represent a matrix with a large number of zero elements, which is suitable for saving memory and computing resources.

[0148] (3) Define model parameters: Define the parameters of the model, including the dimension of the latent factor (num_factors), the number of convolutional layers (num_layers), and the Dropout probability (dropout). These parameters will affect the structure and performance of the LightGCN model.

[0149] (4) Create a LightGCN model: Use the LightGCN class to create a LightGCN model instance. LightGCN is a graph convolutional network used in recommendation systems to learn the relationship between users and items.

[0150] (5) Training the model: Call the model.train(adj_matrix) method to train the LightGCN model. In this process, the model will learn the relationship between users and APIs based on the sparse matrix adj_matrix and optimize the model parameters to minimize the prediction error.

[0151] (6) Obtain the feature vector representation of the result set Z: Call the model.get_embeddings() method to obtain the feature vector representation of the result set Z of the trained model. These feature vectors represent the representation of users and APIs in the latent factor space and are used for subsequent recommendation tasks.

[0152] (7) Print the eigenvectors of the result set Z: Print the eigenvectors of the result set Z to view the representation of users and APIs in the latent factor space.

[0153] The data processing logic primarily relies on the numpy and SciPy libraries, which facilitate matrix data manipulation and sparse matrix construction. Dataset x stores user interactions with the API, which are processed to construct a sparse matrix representation suitable for the LightGCN model. Based on dataset x, a sparse matrix is ​​constructed for model training. The model training process involves data interaction within the model, optimizing the model's parameters by learning the relationship between users and APIs. Finally, by calling the model.get_embeddings() method, the learned feature vector representations of users and APIs in the latent factor space are obtained for subsequent recommendation or analysis tasks.

[0154] S500, performing collaborative filtering on the training set to obtain a supervision set;

[0155] It should be noted that, in some embodiments, step S500 may use the Item-KNN model to perform collaborative filtering on the training set, and obtain the supervision set based on the similarity determined by the cosine similarity.

[0156] In some specific embodiments, the collaborative filtering process is performed on the training set y in step S500, and the cosine similarity calculation can be performed on the training set y using the Item-KNN model to obtain the association relationship between users and items and obtain the supervision set K.

[0157] Among them, the training set is in the format of an interaction matrix. In some embodiments, step S500 may include: assigning values ​​to each item of the matrix based on the association between rows and columns in the interaction matrix of the training set; transposing the assigned matrix to obtain a transposed matrix; and then calculating the cosine similarity of the transposed matrix to determine the degree of similarity in the interaction behaviors between the various industrial service APIs, and organizing to obtain a supervision set.

[0158] In some specific embodiments, the specific process of performing collaborative filtering on the training set y is as follows:

[0159] The Item-KNN model is a classic collaborative filtering algorithm. Item-KNN is a natural extension of User-KNN, and their concepts are similar. The K in KNN refers to the K items with which the user interacts. These K items are used to determine whether an API should be recommended. Therefore, we need to calculate the similarity between items to identify the K most similar items.

[0160] The code processing mainly calculates the cosine similarity matrix between projects and constructs the supervision set K based on the similarity matrix for subsequent tasks. Its data processing logic is as follows:

[0161] (1) Training set y: Given a training set y, which stores the relationships between users and items, the shape is (num_users, num_Items). In this matrix, each row represents a user, each column represents an item, and the values ​​in the matrix are 0 or 1, where 0 indicates that the user has no relationship with the item, and 1 indicates that the user has a relationship with the item (for example, whether the user has used the item).

[0162] (2) Calculate the cosine similarity matrix between items: By calling the cosine_similarity function, we calculate the cosine similarity of the transposed matrix of the training set y and obtain a similarity matrix between items, Item_sim_matrix. Cosine similarity is a metric that measures the similarity between vectors and is used to measure the degree of similarity between items in terms of user interaction behavior.

[0163] (3) Setting the size of the supervision set K: The size of the supervision set K is defined as K, which is used to determine how many of the most similar projects will be considered as the supervision set for each project in subsequent tasks.

[0164] (4) Get the supervision set K: For each item i, the code finds the K items most similar to item i according to the item similarity matrix Item_sim_matrix and stores their indexes in the supervision set K. Each row of the supervision set K represents an item and the indexes of its most similar K items.

[0165] This data processing logic primarily involves the numpy library and the cosine_similarity function in the scikit-learn library. The numpy library allows for matrix processing and calculations, while the cosine_similarity function is used to calculate cosine similarity. The training set y is obtained by interacting with an external database or other data source. By calculating the cosine similarity matrix, the similarities between items are obtained, which is then used to construct the supervision set K.

[0166] In summary, we first calculate the cosine similarity matrix between the items in the training set y. Then, for each item i, we sort the items according to the similarity matrix, select the top K most similar items, and store them in the supervision set K. Finally, we print the supervision set K, where each row represents an item i and the index of its K most similar items. The sample output is: [[2 0 1] [2 1 0] [0 1 2]]

[0170] The above result represents the supervision set K, where each row corresponds to an item i and the indexes of its K most similar items. For example, for item 0, its supervision set K is [2,0,1], which means that the indices of the three items most similar to item 0 are 2, 0, and 1 respectively.

[0171] S600: Based on the result set and the supervision set, weight the initial recommendation list to obtain the target recommendation result.

[0172] It should be noted that, in some embodiments, step S600 may include: using the Bayesian personalized ranking loss function to verify the correctness of the result set and the supervision set, and performing weighted processing based on the verification results and the initial recommendation list to obtain the target recommendation result.

[0173] In some specific embodiments, the Light-GCN model is combined with the Item-KNN model to achieve API recommendation optimization:

[0174] The combination of the Item-KNN model and the Light-GCN model enhances the strength of KNN by allowing the Light-GCN model to learn user and API embeddings with similarity values ​​close to those calculated in the KNN model. Therefore, a new term needs to be introduced in the original BPR loss. In each training batch, the user-user cosine similarity matrix Sum-term cosine similarity matrix The squared difference between the similarity matrices calculated by LightGCN and KNN is added to L BPR Loss. L′ BPR The loss formula is as follows:

[0175]

[0176] Data output result processing code example:

[0177] import numpy as np

[0178] from sklearn.metrics import average_precision_score

[0179] #Result set Q

[0180] Q = np.array([

[0181] [0.1,0.2,0.3,...,0.16],

[0182] [0.3,0.4,0.2,...,0.11],

[0183] [0.2,0.3,0.1,...,0.25],

[0184] [0.4,0.1,0.3,...,0.18],

[0185] [0.5,0.2,0.4,...,0.09],

[0186] [0.3,0.1,0.5,...,0.14],

[0187] [0.2,0.4,0.3,...,0.21],

[0188] [0.1,0.3,0.2,...,0.12] ])

[0190] #Supervisory set KK=np.array([

[0191] [2,0,1],

[0192] [2,1,0],

[0193] [0,1,2] ])

[0195] #API TOP-K list weight

[0196] API_top_k=np.array([

[0197] [0.8,0.5,0.7],

[0198] [0.6,0.9,0.4],

[0199] [0.7,0.6,0.8],

[0200] [0.4,0.3,0.5],

[0201] [0.5,0.2,0.4],

[0202] [0.3,0.1,0.5],

[0203] [0.2,0.4,0.3],

[0204] [0.1,0.3,0.2] ])

[0206] #Weighted processing based on the API TOP-K list weighted_q = Q*API_top_k

[0207] #Calculate the average precision (MAP) as the correctness indicator

[0208] def compute_map(q,k):

[0209] map_score=np.mean([average_precision_score([1,0,1],q[i,k[i]])for iinrange(len(q))])

[0210] return map_score

[0211] # Output correctness verification results

[0212] map_score=compute_map(weighted_q,K)

[0213] print("MAP score:",map_score)

[0214] #Generate final recommendation result z

[0215] z=[]

[0216] for iin range(len(weighted_q)):

[0217] sorted_indices=np.argsort(weighted_q[i])[::-1]

[0218] z.append(sorted_indices)

[0219] #Print the final recommendation result z

[0220] print("Final recommendation result z:")

[0221] for i in range(len(z)):

[0222] print("User",i+1,":",z[i])

[0223] Example output:

[0224] MAP score:0.65

[0225] Final recommendation result z:

[0226] User 1:[2,0,1]

[0227] User 2:[1,2,0]

[0228] User 3:[1,2,0] ...

[0230] The MAP score is a correctness indicator calculated based on the average accuracy. The final recommendation result z is the API recommendation list corresponding to each user generated based on the weighted processing and sorting steps.

[0231] It's worth noting that the microservices architecture is conducive to meeting the growing demands of the Industrial Internet. It breaks down the system into small functional units, each of which can be independently deployed, maintained, and expanded. Through the microservices architecture, the platform can quickly integrate and manage a large number of service components, thereby providing more efficient, flexible, and reliable services. Regarding service recommendations, the platform can leverage machine learning, deep learning, and other AI technologies to analyze user data and predict services that users may be interested in. Based on users' historical behavior, preferences, and needs, the platform can recommend services that best meet their needs. Furthermore, the platform can leverage data on the operating hours of industrial equipment over its current lifespan, geolocation data, and other external data sources to further optimize recommendations.

[0232] In short, in the context of the Industrial Internet, the convergence of microservice components provides a strong foundation for on-demand services. By leveraging artificial intelligence technologies like machine learning and deep learning, the platform can better tailor service recommendations to user needs. This on-demand service model helps users quickly match their needs, a key focus of Industrial Internet platform development.

[0233] In some specific embodiments, Figure 3 As shown, the overall process recommended by industrial software components is as follows:

[0234] S1. Obtain industrial service API data and convert it into feature vectors using FastText to obtain the best usage list of the API;

[0235] S2. Use FastText to extract feature matrices from user and API interaction logs and divide them into data sets and training sets.

[0236] S3. Perform embedding-association convolution on the dataset x through the Light-GCN model to generate the result set Q.

[0237] S4. Use the cosine similarity calculation method of the Item-KNN model on the training set y to obtain the supervision set K;

[0238] S5. Use the BRP loss algorithm to verify the correctness of the result set Q and the supervision set K, calculate the best use TOP-k list of weighted APIs, and output the experimental result z.

[0239] In summary, the present invention mainly involves extracting data features from industrial service APIs, using FastText to perform feature matching on the text description of the API, selecting the TOP-K recommendation list of the best working state of the API, and then using FastText to perform matrix data extraction on the interaction data between users and APIs. The extracted data is then selected using the graph neural network model Light-GCN model and the collaborative filtering model Item-KNN model for recommendation selection, thereby realizing service recommendation based on the similarity between users.

[0240] In terms of service recommendations, comparative verification has shown that in the Light-GCN model, when transferring information between users and APIs, the first convolutional layer only transmits information to adjacent neighboring nodes. For example, for each API, only the information about users who have used it is known. After the second convolutional layer, additional information is transmitted, including information about users who have shared interaction history with the target user. In the second layer, Light-GCN learns pairwise relationships, which is equivalent to the pairwise similarity of the Item-KNN model. Therefore, as shown in the figure below, the prediction results of the Item-KNN model can be added before the BRP loss personalized ranking loss function to supervise the Light-GCN model's predictions and improve the accuracy of the predictions. The combination of these two models leverages the advantages of pairwise associations, optimizing recommendation learning for closely related relationships and enhancing recommendation accuracy. This is suitable for industrial applications where devices are closely connected. Furthermore, by combining API textual description data, it fully considers the impact of weather conditions and device age on device operating time, thereby recommending higher-quality API services to users.

[0241] The present invention relates to microservice-based processing of device functional components in the form of Restful APIs within industrial internet scenarios, and provides users with accurate service recommendations from a large number of microservices. FastText word embedding technology is used to extract expected service function features from the specifications of Restful API services. For service recommendations, a graph neural network model and collaborative filtering model are used to calculate service function data, recommending service function groups based on different user needs. The Light-GCN model is used to extract service function data features, and its powerful embedding association learning is used to perform preliminary data processing and preliminary result prediction. Furthermore, based on the paired associations between users and service function groups in industrial scenarios, the Item-KNN model prediction method, which uses pairwise similarity calculation, is combined with comparisons based on textual descriptions of the operating efficiency of the corresponding API type of equipment to select a list of currently suitable APIs as the final prediction result. This achieves high recommendation accuracy and solves the technical problem of complex and time-consuming industrial system construction due to the large size of the system in industrial scenarios.

[0242] On the other hand, Figure 4 As shown, an embodiment of the present invention provides an industrial software component recommendation system 700, including: a first module 710, used to obtain text descriptions and interaction data of each industrial service API to be recommended, and obtain a target API request; a second module 720, used to convert the text descriptions of each industrial service API into a text feature vector, perform similarity matching based on the text feature vector combined with the target API request, and obtain an initial recommendation list of industrial service APIs; a third module 730, used to generate an interaction matrix based on the interaction data, and divide the interaction matrix into a data set and a training set based on a preset ratio; a fourth module 740, used to perform graph convolution processing on the data set to obtain a result set; a fifth module 750, used to perform collaborative filtering processing on the training set to obtain a supervision set; a sixth module 760, used to perform weighted processing on the initial recommendation list based on the result set and the supervision set to obtain a target recommendation result.

[0243] The contents of the method embodiments of the present invention are all applicable to the system embodiments. The functions specifically implemented by the system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above methods.

[0244] Another aspect of an embodiment of the present invention further provides an industrial software component recommendation system, comprising a processor and a memory;

[0245] The memory is used to store programs;

[0246] The processor executes the program to implement the method described above.

[0247] The contents of the method embodiments of the present invention are all applicable to the system embodiments. The functions specifically implemented by the system embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above methods.

[0248] Another aspect of the embodiments of the present invention further provides a computer-readable storage medium, wherein the storage medium stores a program, and the program is executed by a processor to implement the method described above.

[0249] The contents of the method embodiments of the present invention are all applicable to the computer-readable storage medium embodiments. The functions specifically implemented by the computer-readable storage medium embodiments are the same as those of the above method embodiments, and the beneficial effects achieved are also the same as those achieved by the above method embodiments.

[0250] The present invention also discloses a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device can read the computer instructions from the computer-readable storage medium and execute the computer instructions, causing the computer device to perform the above method.

[0251] In some optional embodiments, the function / operation mentioned in the block diagram may not occur in the order mentioned in the operation diagram. For example, depending on the function / operation involved, the two boxes shown in succession can actually be executed substantially simultaneously or the boxes can sometimes be executed in reverse order. In addition, the embodiment presented and described in the flow chart of the present invention is provided in an exemplary manner for the purpose of providing a more comprehensive understanding of the technology. The disclosed method is not limited to the operation and logic flow presented herein. Optional embodiments are contemplated in which the order of the various operations is changed and the sub-operations described as a part of a larger operation are performed independently.

[0252] Furthermore, although the present invention is described in the context of functional modules, it should be understood that, unless otherwise indicated, one or more of the functions and / or features described may be integrated into a single physical device and / or software module, or one or more functions and / or features may be implemented in separate physical devices or software modules. It will also be understood that a detailed discussion of the actual implementation of each module is not necessary for understanding the present invention. More specifically, given the properties, functions, and internal relationships of the various functional modules in the devices disclosed herein, the actual implementation of the module will be understood within the ordinary skill of an engineer. Therefore, a person skilled in the art using ordinary skill will be able to implement the present invention set forth in the claims without undue experimentation. It will also be understood that the specific concepts disclosed are merely illustrative and are not intended to limit the scope of the present invention, which is determined by the full scope of the appended claims and their equivalents.

[0253] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0254] The logic and / or steps represented in the flowcharts or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing the logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution apparatus, device, or apparatus (e.g., a computer-based apparatus, a device including a processor, or other apparatus that can fetch instructions from and execute instructions on an instruction execution apparatus, device, or apparatus). For purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by, or in conjunction with, an instruction execution apparatus, device, or apparatus.

[0255] More specific examples (a non-exhaustive list) of computer-readable media include the following: an electrical connection with one or more wires (electronic devices), a portable computer disk cartridge (magnetic devices), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disc read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically, for example, by optically scanning the paper or other medium, followed by editing, deciphering, or processing in another suitable manner as necessary, and then stored in a computer memory.

[0256] It should be understood that various parts of the present invention can be implemented using hardware, software, firmware, or a combination thereof. In the above-described embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution device. For example, if implemented using hardware, as in another embodiment, any one of the following technologies known in the art or a combination thereof can be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application-specific integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.

[0257] Throughout this specification, reference to terms such as "one embodiment," "some embodiments," "examples," "specific examples," or "some examples" means that a specific feature, structure, material, or characteristic described in conjunction with that embodiment or example is included in at least one embodiment or example of the present invention. In this specification, schematic representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.

[0258] While embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions, and variations may be made to the embodiments without departing from the principles and spirit of the invention, and that the scope of the invention is defined by the claims and their equivalents.

[0259] The above is a specific description of the preferred implementation of the present invention, but the present invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of the present invention.

Claims

1. A method for recommending industrial software components, characterized in that: include: Obtain text descriptions and interaction data of each industrial service API to be recommended, and obtain target API requests; Converting the text description of each of the industrial service APIs into a text feature vector, performing similarity matching based on the text feature vector and the target API request to obtain an initial recommendation list of the industrial service APIs; generating an interaction matrix according to the interaction data, and dividing the interaction matrix into a data set and a training set based on a preset ratio; Performing graph convolution processing on the data set to obtain a result set; The data set is in the format of the interaction matrix; and performing graph convolution on the data set to obtain a result set includes: Performing a first convolution process between rows or columns of the interaction matrix of the data set to obtain an embedding vector through interactive learning of similar information; Performing a second convolution process between rows and columns of the interaction matrix of the data set, and obtaining a result set by learning the correlation of interactions between different types of information based on the embedding vector; Perform collaborative filtering on the training set to obtain a supervision set, including: Performing collaborative filtering on the training set using the Item-KNN model, and obtaining a supervision set based on the degree of similarity determined by cosine similarity; The training set is in the format of the interaction matrix; and performing collaborative filtering on the training set to obtain a supervision set includes: Assigning values ​​to each item of the interaction matrix based on the association between rows and columns in the interaction matrix of the training set; Transpose the assigned matrix to obtain a transposed matrix; then calculate the cosine similarity of the transposed matrix to determine the similarity between the interaction behaviors of the industrial service APIs, and obtain a supervision set; Based on the result set and the supervision set, weighting the initial recommendation list to obtain a target recommendation result includes: The Bayesian personalized ranking loss function is used to verify the correctness of the result set and the supervision set, and weighted processing is performed based on the verification result and the initial recommendation list to obtain the target recommendation result.

2. The industrial software component recommendation method according to claim 1, characterized in that: The converting the text description of each of the industrial service APIs into a text feature vector includes: Preprocessing the text description of each of the industrial service APIs; wherein the preprocessing includes removing special characters, punctuation marks, and HTML tags and converting the text format; Using a pre-trained word vector model, vectorize the pre-processed text description of each industrial service API to obtain a text feature vector of each industrial service API; The word vector model is generated by training the FastText model based on preset training conditions, and the preset training conditions include preset word vector dimensions and number of training iterations.

3. The industrial software component recommendation method according to claim 1, characterized in that: The performing similarity matching based on the text feature vector and the target API request to obtain an initial recommendation list of the industrial service API includes: Convert the target API request into a request feature vector; Determining the similarity between the text feature vector of each industrial service API and the request feature vector using a cosine similarity function; Based on a preset number, a number of the industrial service APIs with the highest similarity are obtained as an initial recommendation list.

4. The industrial software component recommendation method according to claim 1, characterized in that: Generating an interaction matrix according to the interaction data includes: Converting the interaction data into an interaction feature vector; wherein the interaction data is obtained based on interaction logs between different target objects and each of the industrial service APIs; An interaction matrix is ​​constructed based on the interaction feature vector; wherein the rows of the interaction matrix represent each of the target objects, and the columns of the interaction matrix represent each of the industrial service APIs.

5. The industrial software component recommendation method according to claim 1, characterized in that: The performing graph convolution processing on the data set to obtain a result set includes: The Light-GCN model is used to perform graph convolution processing on the dataset, and the result set is obtained through two layers of convolution processing.

6. An industrial software component recommendation system, characterized in that: include: The first module is used to obtain the text description and interaction data of each industrial service API to be recommended, and obtain the target API request; A second module is configured to convert the text description of each industrial service API into a text feature vector, perform similarity matching based on the text feature vector and the target API request, and obtain an initial recommendation list of the industrial service API; A third module is configured to generate an interaction matrix based on the interaction data, and divide the interaction matrix into a data set and a training set based on a preset ratio; The fourth module is used to perform graph convolution processing on the data set to obtain a result set; The data set is in the format of the interaction matrix; and performing graph convolution on the data set to obtain a result set includes: Performing a first convolution process between rows or columns of the interaction matrix of the data set to obtain an embedding vector through interactive learning of similar information; Performing a second convolution process between rows and columns of the interaction matrix of the data set, and obtaining a result set by learning the correlation of interactions between different types of information based on the embedding vector; The fifth module is used to perform collaborative filtering on the training set to obtain a supervision set; The performing collaborative filtering on the training set to obtain a supervision set includes: Performing collaborative filtering on the training set using the Item-KNN model, and obtaining a supervision set based on the degree of similarity determined by cosine similarity; The training set is in the format of the interaction matrix; and performing collaborative filtering on the training set to obtain a supervision set includes: Assigning values ​​to each item of the interaction matrix based on the association between rows and columns in the interaction matrix of the training set; Transpose the assigned matrix to obtain a transposed matrix; then calculate the cosine similarity of the transposed matrix to determine the similarity between the interaction behaviors of the industrial service APIs, and obtain a supervision set; A sixth module is configured to perform weighted processing on the initial recommendation list based on the result set and the supervision set to obtain a target recommendation result; The step of performing weighted processing on the initial recommendation list based on the result set and the supervision set to obtain a target recommendation result includes: The Bayesian personalized ranking loss function is used to verify the correctness of the result set and the supervision set, and weighted processing is performed based on the verification result and the initial recommendation list to obtain the target recommendation result.

Citation Information

Patent Citations

  • Session recommendation method based on theme guidance and double global attention

    CN113935811A

  • De-biased user multi-interest recommendation method and device and storage medium

    CN115982467A