Manufacturing cloud service recommendation model training method and recommendation method based on graph model
By linking forward and inverse relationships together and converting them into forward relationship vectors in the manufacturing cloud service recommendation system, the problems of low efficiency and large storage space in inverse relationship recommendation in the existing technology are solved, and efficient single model training and accurate Recommended results.
Patent Information
- Application Number
- CN202410200406.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-23
- Publication Date
- 2024-10-08
- Estimated Expiration
- 2044-02-23
AI Technical Summary
Existing manufacturing cloud service recommendation systems have low efficiency and large storage space when processing inverse relationship recommendations, and there is a lack of effective connection between positive relationships and inverse relationships, resulting in reduced training efficiency and accuracy.
By linking forward and inverse relationships together during the model training process, and converting inverse relationship vectors into positive relationship vectors, a mapping relationship is constructed to reduce storage space and improve training efficiency, and a single recommendation model can process forward and inverse relationships.
It reduces the storage space occupied by the model, improves the training efficiency and the accuracy and universality of the recommendation model, allowing the system to support both positive and inverse relationship recommendations.
Smart Images

Figure CN118133010B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a manufacturing cloud service recommendation model training method and a recommendation method based on a graph model. Background Art
[0002] Cloud manufacturing is a new networked manufacturing model that uses the Internet and cloud manufacturing service platform to organize online manufacturing resources according to user needs and provide users with various on-demand manufacturing services. Manufacturing cloud services (referred to as cloud services) are the basic elements of the manufacturing cloud platform, and are virtualized and service-oriented manufacturing resources and manufacturing capabilities on the manufacturing cloud platform. Through virtualization, Internet of Things and other technologies, manufacturing cloud services encapsulate and connect scattered manufacturing resources to the cloud platform to form a manufacturing cloud; through the manufacturing cloud, users can obtain the required personalized services on demand and respond quickly to changing market demands at a low cost, making enterprises more agile and smarter; further promoting specialized division of labor and flexible business collaboration, and revitalizing manufacturing resources in a wide range.
[0003] The recommendation system of manufacturing cloud services is generally a graph model, which takes the user's historical behavior, various needs, and specific information of the solution as nodes (sometimes also called entities) in the graph, and takes the relationships between nodes as edges to construct a directed graph for easy storage. Generally, the recommendation system starts from the needs and provides services or solutions to customers. Therefore, the recommendation process from needs to specific services or solutions can be called positive relationship recommendation. The positive relationship is the relationship actually recorded in the graph model, and the direction of the positive relationship is also the direction of the relationship itself, that is, the head entity predicts the potential tail entity. However, when it is necessary to recommend users for a certain service, it is necessary to study the relationship between the service and each need. The direction of this relationship is exactly opposite to the positive relationship defined above. Therefore, this type of relationship can be called an inverse relationship, and then the inverse relationship recommendation from specific services or solutions to needs is performed based on the inverse relationship. In the recommendation system of manufacturing cloud services, the inverse relationship and the positive relationship exist in conjugate form. They essentially represent the same edge in the graph, but the inverse relationship recommendation predicts the potential head entity from the tail entity.
[0004] At present, various manufacturing cloud service recommendation systems are generally designed for positive relationships and make recommendations for positive relationships. As for the recommendation of inverse relationships, there are generally three existing processing methods: the first method considers the conjugate of the inverse relationship, that is, its corresponding positive relationship, traverses all other nodes, and calculates whether they can establish a positive relationship link with the target node. If they can, it is equivalent to establishing a reverse relationship at the same time. However, this method requires traversing every node in the graph, which greatly reduces efficiency; the second method imitates the positive relationship reasoning method and establishes a new model specifically for inverse relationship reasoning, but this method requires additional training of the new model and additional space to store the new relationship, and ignores the connection between the positive relationship and the inverse relationship; the third method regards the inverse relationship as a new positive relationship, and then uses the model for processing the positive relationship to process the inverse relationship in the same way. This method saves time and effort, but ignores the connection between the positive relationship and the inverse relationship. Summary of the invention
[0005] The present application provides a manufacturing cloud service recommendation model training method and a recommendation method based on a graph model, which are used to solve the technical problems in the prior art that the model requires additional storage space to store positive and inverse relationships respectively, and trains the recommendation models corresponding to the two relationships separately, resulting in low training efficiency. By linking the positive and inverse relationships together during the model training process and by converting the inverse relationship vector into a function of the positive relationship vector, the storage space required for the model is reduced, and the training efficiency of the model containing positive and inverse relationships is improved.
[0006] In a first aspect, the present application provides a method for training a manufacturing cloud service recommendation model based on a graph model, comprising:
[0007] Acquire sample data; the sample data includes positive recommendation sample data and inverse recommendation sample data for training the manufacturing cloud service recommendation system, so that the trained manufacturing cloud service recommendation system supports both positive relationship recommendation and inverse relationship recommendation;
[0008] Acquire an inverse relationship conjugate to a positive relationship in a manufacturing cloud service recommendation system, and generate a mapping relationship between the positive relationship and the inverse relationship;
[0009] Performing data mapping processing on the inverse recommendation sample data according to the mapping relationship, and generating inverse recommendation model training data corresponding to the inverse recommendation sample data according to the mapped sample data and the recommendation model to be trained;
[0010] Generating positive recommendation model training data corresponding to the positive recommendation sample data according to the recommendation model and the positive recommendation sample data;
[0011] The recommendation model is trained based on the positive recommendation model training data and the negative recommendation model training data to obtain a trained manufacturing cloud service recommendation system.
[0012] Optionally, the obtaining sample data includes:
[0013] Obtain a pre-built graph model, and generate multiple sets of triple data based on two adjacent nodes in the graph model and edges between the two adjacent nodes;
[0014] For any set of triple data, the head entity and the positive relationship in the triple data are obtained as the positive recommendation sample data, and the tail entity and the positive relationship in the triple data are obtained as the negative recommendation sample data.
[0015] Optionally, the mapping relationship includes:
[0016] r -1 =d(r);
[0017] Among them, r -1 represents an inverse relationship; r represents a positive relationship; and d(r) represents a mapping function between the positive relationship and the inverse relationship.
[0018] Optionally, the mapping method includes linear model mapping; accordingly, the mapping function includes:
[0019] d(r)=Wr+b;
[0020] Among them, d(r) represents the inverse relationship; r represents the positive relationship; W represents the mapping weight; b represents the bias of the linear layer;
[0021] The mapping method includes multi-layer perceptron mapping; accordingly, the mapping function includes:
[0022] d(r) = MLP(r);
[0023] Among them, d(r) represents an inverse relationship; r represents a positive relationship; MLP() represents the model structure;
[0024] The mapping method includes convolution model mapping; accordingly, the mapping function includes:
[0025] d(r)=Conv(r);
[0026] Among them, d(r) represents the inverse relationship; r represents the positive relationship; Conv() represents the model structure;
[0027] The mapping method includes attention model mapping; accordingly, the mapping function includes:
[0028] d(r)=α(r)⊙r;
[0029] Among them, d(r) represents the inverse relationship; r represents the positive relationship; α(r) represents the attention weight; ⊙ represents the Hadamard product.
[0030] Optionally, the inverse recommendation model training data includes:
[0031] h=f(t,d(r));
[0032] Among them, f() represents the model structure of the recommendation model; h represents the head entity, that is, the training label in the inverse recommendation training process; t represents the tail entity, that is, the input entity in the inverse recommendation process; d(r) represents the inverse relationship, that is, the input relationship value in the inverse recommendation training process;
[0033] The positive recommendation model training data includes:
[0034] t=f(h,r);
[0035] Among them, f() represents the model structure of the recommendation model; t represents the tail entity, that is, the training label in the positive recommendation training process; h represents the head entity, that is, the input entity in the positive recommendation process; r represents the positive relationship, that is, the input relationship value in the positive recommendation training process.
[0036] In a second aspect, the present application provides a manufacturing cloud service recommendation method based on a graph model, comprising:
[0037] Acquire information to be processed; the information to be processed includes user needs or services to be recommended;
[0038] The user demand or the service to be recommended is input into a pre-trained manufacturing cloud service recommendation system, so that the recommendation system outputs a target recommended service corresponding to the user demand when the information to be processed is a user demand; or, when the information to be processed is a service to be recommended, the target user corresponding to the service to be recommended is output; wherein the manufacturing cloud service recommendation system is trained using the manufacturing cloud service recommendation model training method based on a graph model as described in any one of the first aspects.
[0039] In a third aspect, the present application provides a manufacturing cloud service recommendation model training device based on a graph model, the device comprising:
[0040] A sample data acquisition module, used to acquire sample data; the sample data includes positive recommendation sample data and negative recommendation sample data for training the manufacturing cloud service recommendation system, so that the trained manufacturing cloud service recommendation system supports both positive relationship recommendation and negative relationship recommendation;
[0041] A mapping relationship generation module, used to obtain the inverse relationship conjugate with the positive relationship in the manufacturing cloud service recommendation system, and generate a mapping relationship between the positive relationship and the inverse relationship;
[0042] A first training data generating module, configured to perform data mapping processing on the inverse recommendation sample data according to the mapping relationship, and generate inverse recommendation model training data corresponding to the inverse recommendation sample data according to the mapped sample data and the recommendation model to be trained;
[0043] A second training data generating module, generating positive recommendation model training data corresponding to the positive recommendation sample data according to the recommendation model and the positive recommendation sample data;
[0044] The training module is used to train the recommendation model based on the positive recommendation model training data and the negative recommendation model training data to obtain a trained manufacturing cloud service recommendation system.
[0045] In a fourth aspect, the present application provides a manufacturing cloud service recommendation device based on a graph model, the device comprising:
[0046] An information acquisition module, used to acquire information to be processed; the information to be processed includes user needs or services to be recommended;
[0047] A recommendation processing module is used to input the user demand or the service to be recommended into a pre-trained manufacturing cloud service recommendation system, so that the recommendation system outputs a target recommended service corresponding to the user demand when the information to be processed is a user demand; or, outputs a target user corresponding to the service to be recommended when the information to be processed is a service to be recommended; wherein the manufacturing cloud service recommendation system is trained using the manufacturing cloud service recommendation model training method based on a graph model as described in any one of the first aspects.
[0048] In a fifth aspect, the present application provides an electronic device, comprising: a processor, and a memory communicatively connected to the processor;
[0049] The memory stores computer-executable instructions;
[0050] The processor executes the computer-executable instructions stored in the memory to implement the method according to the first aspect and the second aspect.
[0051] In a sixth aspect, the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, they are used to implement the methods described in the first and second aspects.
[0052] In a seventh aspect, the present application provides a computer program product, including a computer program, which implements the methods described in the first and second aspects when executed by a processor.
[0053] The technical solution provided by the present application, when training the recommendation model, respectively obtains positive recommendation sample data and inverse recommendation sample data, and then constructs a mapping relationship between the positive relationship in the manufacturing cloud service recommendation system and the inverse relationship conjugate with the positive relationship, and then processes the inverse recommendation sample data according to the mapping relationship, so that the processed data can be used together with the positive recommendation sample data to train the recommendation model, thereby realizing the use of the above sample data to train a single recommendation model without adding too many additional parameters, reducing the storage space occupied by the model, and improving the training efficiency of the recommendation model; then, based on the pre-constructed model framework and the above sample data, model training data corresponding to the positive relationship and the inverse relationship are respectively formed, and the trained manufacturing cloud service recommendation system is obtained that supports both positive relationship recommendation and inverse relationship recommendation, and further realizes the processing of inverse relationship recommendation on the basis of the good processing effect of positive relationship recommendation using a single recommendation model framework, thereby improving the accuracy and universality of model recommendation. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0055] Figure 1 An application scenario diagram provided for this application;
[0056] Figure 2 A flowchart of a method for training a manufacturing cloud service recommendation model based on a graph model provided in an embodiment of the present application;
[0057] Figure 3 A schematic diagram of a process for generating training data for a recommendation model provided in an embodiment of the present application;
[0058] Figure 4 A flowchart of a method for recommending a manufacturing cloud service model based on a graph model provided in an embodiment of the present application;
[0059] Figure 5 A schematic diagram of the structure of a manufacturing cloud service recommendation model training device based on a graph model provided in an embodiment of the present application;
[0060] Figure 6 A schematic diagram of the structure of a manufacturing cloud service recommendation device based on a graph model provided in an embodiment of the present application;
[0061] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application;
[0062] Figure 8 A block diagram of an electronic device provided in an embodiment of the present application.
[0063] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0064] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0065] The recommendation system for manufacturing cloud services is generally a graph model, which takes the user's historical behavior, various needs, and specific information of the plan as nodes in the graph (sometimes also called entities), and the relationship between the nodes as edges, to build a directed graph for easy storage. For the edges in the graph, that is, the relationship between the nodes, which can also be called the links between the nodes, some edges can be directly established based on the relationship between the content corresponding to the nodes, such as the superior-subordinate relationship between services and plans, etc.; most other edges are marked according to existing historical successful plans, such as the service content corresponding to a specific need at a certain point.
[0066] In practical applications, we can determine the possible solutions or services that need to be provided according to the links between nodes and based on user needs, and obtain the final solution that meets user needs through subsequent manual screening and design, and provide suitable services. However, since these historical solutions cannot cover the relationships between all nodes, and the needs of customers and the services provided by suppliers may change over time, generating new needs or providing new services, the recommendation system needs to establish new links through algorithms to provide customers with additional recommendations beyond historical solutions, that is, to provide all candidate service solutions for each demand node. This task is also called link prediction. In order to complete the link prediction task, all nodes and edges in the graph are generally converted into vector form, and then the relationship between nodes is calculated based on a certain model. Among them, the relationship between entities (or nodes) is directional. The entity at the starting position of the relationship is generally called the "head entity" and the entity at the end position is called the "tail entity". The link prediction task is actually to find all potential tail entities corresponding to a certain head entity.
[0067] In the process of link prediction, the recommendation system will provide services or solutions to customers based on the needs. Therefore, the recommendation process from needs to specific services or solutions can be called positive relationship recommendation. The positive relationship is the relationship actually recorded in the graph model, and the direction of the positive relationship is also the direction of the relationship itself, that is, the potential tail entity is predicted by the head entity. However, when it is necessary to recommend users for a certain service, it is necessary to study the relationship between the service and each demand. The direction of this relationship is exactly opposite to the positive relationship defined above. Therefore, this type of relationship can be called an inverse relationship, and then the inverse relationship recommendation from specific services or solutions to needs is performed based on the inverse relationship. In the recommendation system of manufacturing cloud services, the inverse relationship and the positive relationship exist in conjugate form. They essentially represent the same edge in the graph, but the inverse relationship recommendation predicts the potential head entity from the tail entity.
[0068] At present, various manufacturing cloud service recommendation systems are generally designed for positive relationships and make recommendations for positive relationships. As for the recommendation of inverse relationships, there are generally three existing processing methods: the first method considers the conjugate of the inverse relationship, that is, its corresponding positive relationship, traverses all other nodes, and calculates whether they can establish a positive relationship link with the target node. If they can, it is equivalent to establishing a reverse relationship at the same time.
[0069] Specifically, assume that in the graph model, each edge and its two connected nodes can be represented by a triple (h, r, t), where h is the starting node of the relationship, i.e., the head entity, t is the ending node of the relationship, i.e., the tail entity, and r represents the relationship itself. When recommending positive relationships, it is required to find the tail entity t (there may be more than one correct answer, that is, there may be more than one content that can be recommended) based on the head entity h and the specified relationship r. This can be represented as the problem (h, r, ?), which is equivalent to finding a link that can be established for node h about the relationship r. Inverse relationship recommendation is just the opposite. It finds the head entity h based on the tail entity t and the relationship r. It can also be represented by the problem (?, r, t). Generally, the complete triple (h, r, t) is used to remove one entity as training data.
[0070] In order to solve the positive relationship recommendation problem, the existing solution can be: establish a recommendation model t = f (h, r), and assign a learnable vector to each entity and relationship, use the existing triples in the graph model as training data, and train the prediction model and each entity and relationship vector. The trained model can quickly calculate the vector of the corresponding tail entity after inputting the head entity and relationship, and then compare it with all entities in the graph model to obtain several entities with the highest matching degree as candidate tail entities. This step is equivalent to recommending several cloud manufacturing services according to user needs.
[0071] For the inverse relationship recommendation problem, the existing method 1 adopts the following method: traverse all entities in the graph except the target entity, and use the prediction model t = f (h, r) to build links to other entities for each entity, including the link to the target entity. When all entities are traversed, the inverse relationship links from the target entity to other entities can be obtained through statistics, completing the inverse relationship recommendation process.
[0072] However, the existing method 1 has the following technical problems during implementation, including: 1. High time complexity; specifically, this method needs to traverse all entities in the graph and predict a link for each entity, which consumes a lot of computing time and greatly reduces efficiency. 2. Inverse relationship data is not used during training. Specifically, this method only needs to use positive relationship recommendation (h, r, ?) problems as training data, and the inverse relationship recommendation problems (?, r, t) with the same number are not used, resulting in reduced accuracy of the trained model in subsequent applications.
[0073] The second method for dealing with inverse relationship recommendations imitates the positive relationship reasoning method and additionally establishes a new model specifically for inverse relationship reasoning.
[0074] Specifically, when making positive relationship recommendations, a recommendation model t=f(h,r) is established, and its conjugate inverse relationship recommendation model t=g(h,r) is constructed based on this model for inverse relationship recommendations, that is, the head entity is obtained with the help of the tail entity and the relationship.
[0075] During the training process, the positive relationship recommendation model uses the data of the (h, r, ?) problem for training, and the inverse relationship recommendation model uses the (?, r, t) problem as training data, and uses these positive and inverse relationship data to train a model respectively.
[0076] However, the existing method 2 has the following technical problems during implementation, including: 1. An additional model needs to be established. Specifically, an additional model t=g(h,r) is constructed, which requires a certain amount of storage space and requires additional training, reducing the overall training efficiency of the recommendation model. 2. There is a lack of connection between the positive relationship reasoning model and the inverse relationship reasoning model. Specifically, the two models should have a certain dual relationship in nature, but in fact, apart from having the same model structure, there is no other direct connection, resulting in reduced accuracy of the trained model in subsequent applications.
[0077] For the inverse relationship recommendation problem, the existing method three regards the inverse relationship as a new positive relationship and handles the inverse relationship in the same way as the positive relationship.
[0078] Specifically, assuming that the positive relation conjugate to the inverse relation can be expressed as r, we can use r -1 To express the inverse relationship, the prior art uses r-1 is regarded as a new positive relationship. The direction of the original inverse relationship is from the tail entity to the head entity, and now the new positive relationship r -1 The original tail entity is regarded as the head entity, and the original head entity is regarded as the tail entity, that is, a new triple (t, r -1 ,h), this converts the inverse relationship recommendation problem into a positive relationship recommendation problem.
[0079] During training, all newly constructed relations and corresponding triples can be added to the training data. In this way, when performing inverse relational reasoning, the original model can be used to calculate h = f (t, r -1 ), and matches it with each entity in the graph model, obtaining several entities with the highest matching degree as candidates. This step is relative to finding potential customers based on existing cloud manufacturing services.
[0080] However, the existing method three has the following technical problems during implementation, including: 1. Lack of connection between positive and inverse relations. Specifically, the inverse relation and its original conjugate positive relation are essentially the same edge in the graph, but the positive relation newly constructed based on the inverse relation has no direct connection with the original conjugate positive relation, which may cause some information to be ignored. 2. Additional space is required to store the inverse relation. Specifically, a new positive relation is constructed based on the inverse relation, which doubles the total number of relations. In addition, the number of edges that need to be stored in the graph model also doubles, and the number of triplets in the training data also doubles, so additional storage space is required, and more memory is required for training.
[0081] For reverse recommendation of cloud manufacturing services, that is, when recommending potential users for specific cloud manufacturing services, the reverse relationship is difficult to handle. This application provides a method for training a manufacturing cloud service recommendation model based on a graph model. Specifically, the recommendation model trained by the training method provided by this application links positive and negative relationships together, and converts the negative relationship vector into a function of the positive relationship vector, which reduces the storage space required for the model, and effectively utilizes the positive and negative relationship training data during the training process to achieve an improved recommendation effect of the negative relationship.
[0082] Figure 1 This is an application scenario diagram provided by this application. Figure 1 As shown, the technical solution provided in the embodiment of the present application may involve the following stages:
[0083] 1. In the model training stage, since the inverse relationship and the positive relationship have a conjugate property in the cloud manufacturing service recommendation system, and the two are essentially the same edge in the graph model, the relationship between the two must be fully considered when training the recommendation model. Based on the relationship and sample data between the two, the positive relationship model training data and the inverse relationship model training data are constructed, and then the constructed recommendation model is trained, which improves the model training processing efficiency and enables the trained recommendation model to have both positive relationship recommendation function and inverse relationship recommendation function.
[0084] 2. Positive relationship recommendation stage. In this stage, the information to be processed input into the recommendation model is user demand, and then positive relationship recommendation processing is performed on the user demand to obtain the target service or solution output by the recommendation model.
[0085] 3. Inverse relationship recommendation stage. In this stage, the information to be processed input into the recommendation model is the service to be recommended, and then the service to be recommended is processed by inverse relationship recommendation to obtain the target user output by the recommendation model.
[0086] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0087] Figure 2 A flowchart of a method for training a manufacturing cloud service recommendation model based on a graph model is provided in an embodiment of the present application. The method can be executed by a manufacturing cloud service recommendation model training device based on a graph model, which can be a server or an electronic device. The following takes an electronic device as an example for explanation. The method in this embodiment can be implemented by software, hardware, or a combination of software and hardware, such as Figure 2 As shown, the method includes the following steps.
[0088] S201. Obtain sample data; the sample data includes positive recommendation sample data and inverse recommendation sample data for training a manufacturing cloud service recommendation system, so that the trained manufacturing cloud service recommendation system supports both positive relationship recommendation and inverse relationship recommendation.
[0089] In an embodiment of the present application, data such as historical behaviors, various needs, and specific information of plans of multiple users are obtained, and a directed graph is constructed with the above data to generate sample data for training the manufacturing cloud service recommendation system.
[0090] It should be noted that the manufacturing cloud service recommendation system trained in this application supports both positive relationship recommendations and inverse relationship recommendations. Therefore, during training, it is necessary to construct positive recommendation sample data and inverse recommendation sample data separately, and perform model training based on the positive recommendation sample data and inverse recommendation sample data.
[0091] Optionally, the specific process of generating positive recommendation sample data and negative recommendation sample data in the present application may include: obtaining a pre-constructed graph model, and generating multiple groups of triple data based on two adjacent nodes in the graph model and the edges between the two adjacent nodes; for any group of triple data, obtaining the head entity and positive relationship in the triple data as the positive recommendation sample data, and obtaining the tail entity and positive relationship in the triple data as the negative recommendation sample data.
[0092] Among them, the pre-built graph model may include but is not limited to the above-mentioned pre-built directed graph. Specifically, in the directed graph, data such as historical behaviors, various requirements and specific information of the plan are used as nodes in the graph, and the relationships between the nodes are used as edges. Specifically, each edge and its two connected nodes can be represented by a triple (h, r, t), representing (head entity, relationship, tail entity). Furthermore, for any triple, the complete triple (h, r, t) can be used to remove one of the entities as sample data.
[0093] Figure 3 A flowchart of generating training data for a recommendation model provided in an embodiment of the present application. Figure 3 , the tail entity in the complete triple can be removed, and the remaining head entity and positive relationship (h, r, ?) can be input into the recommendation model as positive recommendation sample data to train the positive relationship recommendation function of the recommendation model. The head entity in the complete triple can also be removed, and the remaining tail entity and positive relationship (?, r, t) can be used as inverse recommendation sample data to train the inverse relationship recommendation function of the recommendation model.
[0094] S202: Acquire an inverse relationship that is conjugate with the positive relationship in the manufacturing cloud service recommendation system, and generate a mapping relationship between the positive relationship and the inverse relationship.
[0095] In practical applications, since the positive relationship and inverse relationship in the manufacturing cloud service recommendation system have a conjugate property, that is, the two are essentially vectors in different directions of the same edge in a directed graph, it is necessary to fully consider the relationship between the two when training the recommendation model in order to improve the accuracy of the subsequent recommendation model in recommendation processing.
[0096] For details, see Figure 3, determine the relationship r in the above triple as a positive relationship, and then obtain the inverse relationship conjugate with the positive relationship, that is, r -1 Furthermore, a mapping relationship between the positive relationship and the inverse relationship is constructed based on the conjugate relationship between the two, so as to perform data conversion on the inverse relationship in the sample data based on the mapping relationship, thereby realizing subsequent learning of two recommendation functions based on a single model, thereby improving the model training efficiency.
[0097] Specifically, the mapping relationship between the constructed positive relationship and the inverse relationship can be expressed as:
[0098] r -1 -d(r)=0;
[0099] Among them, d(r) represents a mapping function, r -1 In the above expression, the positive relationship and the inverse relationship construct a mapping, which describes the mapping relationship between the inverse relationship and the positive relationship in the form of an explicit function, that is, r -1 =d(r).
[0100] In practical applications, the mapping function plays a role in mapping the positive relationship vector, that is, the mapping function is a learnable function with a relatively small number of parameters, which reduces the storage space occupied in the recommendation model and thus improves processing efficiency.
[0101] Optionally, in the embodiment of the present application, a plurality of mapping methods may be used to express the mapping relationship between the inverse relationship and the direct relationship, and accordingly, different specific mapping functions are generated according to different mapping methods.
[0102] Optionally, the mapping method may include linear model mapping; accordingly, the mapping function includes:
[0103] d(r)=Wr+b
[0104] Wherein, d(r) represents an inverse relationship; r represents a positive relationship; W represents a mapping weight; and b represents a bias of a linear layer. Optionally, the mapping method may also include multi-layer perceptron mapping; accordingly, the mapping function includes:
[0105] d(r) = MLP(r);
[0106] Among them, d(r) represents the inverse relationship; r represents the positive relationship; MLP() represents the model structure.
[0107] Optionally, the mapping method may further include convolution model mapping; accordingly, the mapping function includes:
[0108] d(r) = Conv(r);
[0109] Among them, d(r) represents the inverse relationship; r represents the positive relationship; Conv() represents the model structure.
[0110] Optionally, the mapping method may further include attention model mapping; accordingly, the mapping function includes:
[0111] d(r)=α(r)⊙r;
[0112] Among them, d(r) represents the inverse relationship; r represents the positive relationship; α(r) represents the attention weight; ⊙ represents the Hadamard product.
[0113] It should be noted that the attention model extracts the more important parts of the input parameters. α(r) can calculate the importance of each part of the input relationship vector based on the input relationship vector and reflect it in the relationship vector in the form of product. It requires that the dimensions of the multiplied vectors or matrices are the same. It will multiply the elements in the same position of the left and right vectors, and the result is reflected in the same position of the output. Therefore, its output vector dimension is exactly the same as the input.
[0114] It should also be noted that in the embodiment of the present application, the above mapping function defines an inverse relationship r -1 As a relationship, that is, a relationship from the tail entity t to the head entity h, and a direct connection between the positive and inverse relationships is established, it means that the recommendation model trained based on this training supports both recommendation functions and improves the accuracy of the recommendation results; on this basis, the above mapping function represents the inverse relationship as a mapping form of the positive relationship r -1 =d(r), which means that the inverse relationship can be expressed by a positive relationship, reducing the storage space of the model.
[0115] S203: Perform data mapping processing on the inverse recommendation sample data according to the mapping relationship, and generate inverse recommendation model training data corresponding to the inverse recommendation sample data according to the mapped sample data and the recommendation model to be trained.
[0116] In order to reduce the number of model parameters and improve the model reuse rate, in practical applications, the same recommendation model can be used to train both positive relationship recommendations and inverse relationship recommendations, that is, a common set of learning parameters is used for positive relationship recommendations and inverse relationship recommendations. In order to input the training data of the two relationships into the same recommendation model for training, it is necessary to pre-process the inverse recommendation sample data so that the processed data is consistent with the positive recommendation sample data, that is, the two types of data can be simultaneously input into the recommendation model to be trained for training.
[0117] Specifically, since the positive recommendation sample data can be expressed as (h, r, ?), and the reverse recommendation sample data can be expressed as (?, r, t), in order to achieve data matching, the reverse recommendation sample data can be expressed as (t, r -1,? ), further, since there is a mapping relationship between the positive relationship and the inverse relationship, the inverse relationship in the inverse recommendation sample data can be mapped to the positive relationship, that is, according to r -1 =d(r)(t,r -1 ,? ) performs mapping processing on the above reverse recommendation sample data, and obtains the mapped data as (t,d(r),?).
[0118] On this basis, corresponding training labels are set for the above-mentioned positive recommendation sample data and negative recommendation sample data respectively, and then corresponding training data are generated according to the above-mentioned sample data and the corresponding training labels, and input into the recommendation model to be trained for training, so as to obtain a trained manufacturing cloud service recommendation model.
[0119] For details, see Figure 3 , the recommendation model to be trained obtained may be f(); accordingly, the inverse recommendation model training data obtained in this application includes:
[0120] h=f(t,d(r));
[0121] Among them, f() represents the model structure of the recommendation model; h represents the head entity, that is, the training label in the inverse recommendation training process; t represents the tail entity, that is, the input entity in the inverse recommendation process; d(r) represents the inverse relationship, that is, the input relationship value in the inverse recommendation training process.
[0122] It should be noted that the above data mapping process enables the recommendation model to perform inverse relationship recommendation training without the need to establish a new model or add too many new parameters. On this basis, when training the model in the future, the training data does not need to be increased according to the inverse relationship, which effectively reduces the storage space required for model training and improves the training speed.
[0123] S204: Generate positive recommendation model training data corresponding to the positive recommendation sample data according to the recommendation model and the positive recommendation sample data.
[0124] In the embodiment of the present application, the obtained recommendation model to be trained may be f(); correspondingly, see Figure 3 , the positive recommendation model training data obtained in this application includes:
[0125] t=f(h,r);
[0126] Among them, f() represents the model structure of the recommendation model; t represents the tail entity, that is, the training label in the positive recommendation training process; h represents the head entity, that is, the input entity in the positive recommendation process; r represents the positive relationship, that is, the input relationship value in the positive recommendation training process.
[0127] S205: Train the recommendation model based on the positive recommendation model training data and the negative recommendation model training data to obtain a trained manufacturing cloud service recommendation system.
[0128] In an embodiment of the present application, based on the positive recommendation model training data and the inverse recommendation model training data obtained based on the above implementation method, the positive recommendation model training data and the inverse recommendation model training data are input into the recommendation model for model training, and the training is stopped when the training stop condition is met to obtain a trained manufacturing cloud service recommendation model.
[0129] In practical applications, the recommendation model may be any one of, but not limited to, a rule model, a CNN (Convolutional Neural Network) model, a GCN (Graph Convolutional Neural Network) model, and a Transformer model.
[0130] Optionally, if the recommendation model is a rule model, in the subsequent recommendation processing, the model can assume that there is a simple rule relationship between the representation vectors of the head and tail entities and relationships, such as "head entity vector + relationship vector = tail entity vector", etc., and use machine learning methods to make the vectors of each entity relationship conform to this rule to the greatest extent, and use this rule to perform recommendation processing.
[0131] Optionally, if the recommendation model is a CNN model, in the subsequent recommendation processing, the model can use a convolutional neural network CNN to perform convolution calculations on entities and relationships, extract features, and determine recommendation results based on the extracted features.
[0132] Optionally, if the recommendation model is a GCN model, in the subsequent recommendation process, the model can extract graph features through aggregation and propagation. The model can form a representation vector for each node or edge, and perform recommendation calculations through a graph neural network to obtain recommendation results.
[0133] Optionally, if the recommendation model is a Transformer model, in the recommendation process summary, the model can accurately understand the connection between entities and relationships, and then use the attention layer to perform recommendation calculations to obtain recommendation results.
[0134] In practical applications, since positive and negative relationship recommendations share model parameters and are directly linked through mapping, the model’s excellent recommendation effect on positive relationships can be used to directly process negative relationship recommendations, thereby improving the accuracy of reasoning and effectively finding potential customers based on cloud manufacturing services.
[0135] In the above technical scheme, when training the recommendation model, positive recommendation sample data and inverse recommendation sample data are obtained respectively, and then a mapping relationship between the positive relationship in the manufacturing cloud service recommendation system and the inverse relationship conjugate with the positive relationship is constructed, and then the inverse recommendation sample data is processed according to the mapping relationship, so that the processed data can be used together with the positive recommendation sample data to train the recommendation model, so that a single recommendation model can be trained with the above sample data without adding too many additional parameters, thereby reducing the storage space occupied by the model and improving the training efficiency of the recommendation model; then, based on the pre-constructed model framework and the above sample data, model training data corresponding to the positive relationship and the inverse relationship are formed respectively, and the trained manufacturing cloud service recommendation system supports both positive relationship recommendation and inverse relationship recommendation, so that the good processing effect of positive relationship recommendation using a single recommendation model framework is achieved, and the processing of inverse relationship recommendation is further realized, thereby improving the accuracy and universality of model recommendation.
[0136] Figure 4 A flowchart of a manufacturing cloud service recommendation method based on a graph model provided in an embodiment of the present application. The method can be executed by a manufacturing cloud service recommendation device based on a graph model, which can be a server or an electronic device. The following description takes an electronic device as an example. The method in this embodiment can be implemented by software, hardware, or a combination of software and hardware, such as Figure 4 As shown, the method includes the following steps.
[0137] S402, obtaining information to be processed; the information to be processed includes user needs or services to be recommended.
[0138] S401. Input the user demand or the service to be recommended into a pre-trained manufacturing cloud service recommendation system, so that the recommendation system outputs a target recommended service corresponding to the user demand when the information to be processed is a user demand; or, outputs a target user corresponding to the service to be recommended when the information to be processed is a service to be recommended.
[0139] In an embodiment of the present application, in order to realize that the trained manufacturing cloud service recommendation system simultaneously supports recommending specific services for user needs, or recommending target users for the services to be recommended, positive recommendation sample data and inverse recommendation sample data can be obtained separately when training the recommendation model, and then a mapping relationship between the positive relationship in the manufacturing cloud service recommendation system and the inverse relationship conjugate with the positive relationship is constructed, and then the inverse recommendation sample data is processed according to the mapping relationship, so that the processed data can be used together with the positive recommendation sample data to train the recommendation model, and the above-mentioned sample data is used to train a single recommendation model, without adding too many additional parameters, reducing the storage space occupied by the model, and improving the training efficiency of the recommendation model; and then based on the pre-constructed model framework and the above-mentioned sample data, model training data corresponding to the positive relationship and the inverse relationship are respectively formed, and then the good processing effect of the positive relationship recommendation using a single recommendation model framework is achieved, and the processing of the inverse relationship recommendation is further realized, thereby improving the accuracy and universality of the model recommendation.
[0140] Figure 5 A schematic diagram of a manufacturing cloud service recommendation model training device based on a graph model provided in an embodiment of the present application. Figure 5 The training device comprises: a sample data acquisition module 51, a mapping relationship generation module 52, a first training data generation module 53, a second training data generation module 54 and a training module 55; wherein,
[0141] A sample data acquisition module, used to acquire sample data; the sample data includes positive recommendation sample data and negative recommendation sample data for training the manufacturing cloud service recommendation system, so that the trained manufacturing cloud service recommendation system supports both positive relationship recommendation and negative relationship recommendation;
[0142] A mapping relationship generation module, used to obtain the inverse relationship conjugate with the positive relationship in the manufacturing cloud service recommendation system, and generate a mapping relationship between the positive relationship and the inverse relationship;
[0143] A first training data generating module, configured to perform data mapping processing on the inverse recommendation sample data according to the mapping relationship, and generate inverse recommendation model training data corresponding to the inverse recommendation sample data according to the mapped sample data and the recommendation model to be trained;
[0144] A second training data generating module, generating positive recommendation model training data corresponding to the positive recommendation sample data according to the recommendation model and the positive recommendation sample data;
[0145] The training module is used to train the recommendation model based on the positive recommendation model training data and the negative recommendation model training data to obtain a trained manufacturing cloud service recommendation system.
[0146] Optional, sample data acquisition module, specifically used for:
[0147] Obtain a pre-built graph model, and generate multiple sets of triple data based on two adjacent nodes in the graph model and edges between the two adjacent nodes;
[0148] For any set of triple data, the head entity and the positive relationship in the triple data are obtained as the positive recommendation sample data, and the tail entity and the positive relationship in the triple data are obtained as the negative recommendation sample data.
[0149] Optionally, the mapping relationship includes:
[0150] r -1 =d(r);
[0151] Among them, r -1 represents an inverse relationship; r represents a positive relationship; and d(r) represents a mapping function between the positive relationship and the inverse relationship.
[0152] Optionally, the mapping method includes linear model mapping; accordingly, the mapping function includes:
[0153] d(r)=Wr+b;
[0154] Among them, d(r) represents the inverse relationship; r represents the positive relationship; W represents the mapping weight; b represents the bias of the linear layer;
[0155] The mapping method includes multi-layer perceptron mapping; accordingly, the mapping function includes:
[0156] d(r) = MLP(r);
[0157] Among them, d(r) represents an inverse relationship; r represents a positive relationship; MLP() represents the model structure;
[0158] The mapping method includes convolution model mapping; accordingly, the mapping function includes:
[0159] d(r) = Conv(r);
[0160] Among them, d(r) represents the inverse relationship; r represents the positive relationship; Conv() represents the model structure;
[0161] The mapping method includes attention model mapping; accordingly, the mapping function includes:
[0162] d(r)=α(r)⊙r;
[0163] Among them, d(r) represents the inverse relationship; r represents the positive relationship; α(r) represents the attention weight; ⊙ represents the Hadamard product.
[0164] Optionally, the inverse recommendation model training data includes:
[0165] h=f(t,d(r));
[0166] Among them, f() represents the model structure of the recommendation model; h represents the head entity, that is, the training label in the inverse recommendation training process; t represents the tail entity, that is, the input entity in the inverse recommendation process; d(r) represents the inverse relationship, that is, the input relationship value in the inverse recommendation training process;
[0167] The positive recommendation model training data includes:
[0168] t=f(h,r);
[0169] Among them, f() represents the model structure of the recommendation model; t represents the tail entity, that is, the training label in the positive recommendation training process; h represents the head entity, that is, the input entity in the positive recommendation process; r represents the positive relationship, that is, the input relationship value in the positive recommendation training process.
[0170] Figure 6 A schematic diagram of the structure of a manufacturing cloud service recommendation device based on a graph model provided in an embodiment of the present application. Figure 6 The recommendation device 60 includes: an information acquisition module 61 and a recommendation processing module 62; wherein,
[0171] The information acquisition module 61 is used to acquire information to be processed; the information to be processed includes user needs or services to be recommended;
[0172] The recommendation processing module 62 is used to input the user demand or the service to be recommended into a pre-trained manufacturing cloud service recommendation system, so that the recommendation system outputs the target recommended service corresponding to the user demand when the information to be processed is a user demand; or, outputs the target user corresponding to the service to be recommended when the information to be processed is a service to be recommended; wherein the manufacturing cloud service recommendation system is trained using the manufacturing cloud service recommendation model training method based on a graph model described in any of the above-mentioned embodiments.
[0173] Figure 7 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. Figure 7 As shown, the electronic device of this embodiment may include:
[0174] at least one processor 702; and
[0175] A memory 701 communicatively connected to at least one processor;
[0176] The memory 702 stores instructions that can be executed by at least one processor 701, and the instructions are executed by at least one processor 702 to enable the server to execute a method as described in any of the above embodiments.
[0177] Optionally, the memory 701 may be independent or integrated with the processor 702 .
[0178] The implementation principle and technical effects of the electronic device provided in this embodiment can be found in the aforementioned embodiments and will not be described in detail here.
[0179] An embodiment of the present application further provides a computer-readable storage medium, in which computer-executable instructions are stored. When a processor executes the computer-executable instructions, the method of any of the aforementioned embodiments is implemented.
[0180] An embodiment of the present application also provides a computer program product, including a computer program, which implements the method of any of the aforementioned embodiments when executed by a processor.
[0181] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of modules is only a logical function division, and there may be other division methods in actual implementation, such as multiple modules can be combined or integrated into another system, or some features can be ignored or not executed.
[0182] The above-mentioned integrated module implemented in the form of a software function module can be stored in a computer-readable storage medium. The above-mentioned software function module is stored in a storage medium, including a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) or a processor to perform some steps of the methods of various embodiments of the present application.
[0183] It should be understood that the above-mentioned processor can be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor, etc. The steps of the method disclosed in the application can be directly embodied as being executed by a hardware processor, or can be executed by a combination of hardware and software modules in the processor. The memory may include a high-speed RAM memory, and may also include a non-volatile storage NVM, such as at least one disk memory, and can also be a USB flash drive, a mobile hard disk, a read-only memory, a disk or an optical disk, etc.
[0184] The above storage medium can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. The storage medium can be any available medium that can be accessed by a general or special purpose computer.
[0185] An exemplary storage medium is coupled to a processor so that the processor can read information from the storage medium and write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an application specific integrated circuit (ASIC). Of course, the processor and the storage medium can also exist as discrete components in a server or a main control device.
[0186] Figure 8 A block diagram of an electronic device provided in an embodiment of the present application. Figure 8 , the device 800 may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output interface 812 , a sensor component 814 , and a communication component 816 .
[0187] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.
[0188] The memory 804 is configured to store various types of data to support operations on the device 800. Examples of such data include instructions for any application or method operating on the device 800, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.
[0189] The power supply component 806 provides power to the various components of the device 800. The power supply component 806 can include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.
[0190] The multimedia component 808 includes a screen that provides an output interface between the device 800 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the device 800 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
[0191] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the device 800 is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.
[0192] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: home button, volume button, start button, and lock button.
[0193] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the device 800. For example, the sensor assembly 814 can detect the open / closed state of the device 800, the relative positioning of components, such as the display and keypad of the device 800, and the sensor assembly 814 can also detect the position change of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration / deceleration of the device 800, and the temperature change of the device 800. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0194] The communication component 816 is configured to facilitate wired or wireless communication between the device 800 and other devices. The device 800 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.
[0195] In an exemplary embodiment, the device 800 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the above methods.
[0196] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 804 including instructions, and the instructions can be executed by the processor 820 of the device 800 to perform the above method. For example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.
[0197] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute the above method.
[0198] Those skilled in the art will readily appreciate other embodiments of the present application after considering the specification and practicing the invention disclosed herein. The present application is intended to cover any modification, use or adaptation of the present application, which follows the general principles of the present application and includes common knowledge or customary techniques in the art that are not disclosed in the present application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.
[0199] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.
Claims
1. A method for training a manufacturing cloud service recommendation model based on a graph model, characterized in that: The method comprises: Acquire sample data; the sample data includes positive recommendation sample data and inverse recommendation sample data for training a manufacturing cloud service recommendation system, so that the trained manufacturing cloud service recommendation system supports both positive relationship recommendation and inverse relationship recommendation; the acquisition of sample data includes: acquiring a pre-built graph model, and generating multiple groups of triple data based on two adjacent nodes in the graph model and the edges between the two adjacent nodes; for any group of triple data, acquiring the head entity and the positive relationship in the triple data as the positive recommendation sample data, and acquiring the tail entity and the positive relationship in the triple data as the inverse recommendation sample data; acquiring the inverse relationship conjugate with the positive relationship in the manufacturing cloud service recommendation system, and generating a mapping relationship between the positive relationship and the inverse relationship; the mapping relationship includes: -1 =d(r); where r -1 represents an inverse relationship; r represents a positive relationship; d(r) represents a mapping function between the positive relationship and the inverse relationship; The inverse recommendation sample data is subjected to data mapping processing according to the mapping relationship, and the inverse recommendation model training data corresponding to the inverse recommendation sample data is generated according to the sample data after the mapping processing and the recommendation model to be trained; the inverse recommendation model training data includes: h=f(t,d(r)); wherein f() represents the model structure of the recommendation model; h represents the head entity, i.e., the training label in the inverse recommendation training process; t represents the tail entity, i.e., the input entity in the inverse recommendation process; d(r) represents the inverse relationship, i.e., the input relationship value in the inverse recommendation training process; Generating positive recommendation model training data corresponding to the positive recommendation sample data according to the recommendation model and the positive recommendation sample data; the positive recommendation model training data includes: t=f(h,r); wherein f() represents the model structure of the recommendation model; t represents the tail entity, i.e., the training label in the positive recommendation training process; h represents the head entity, i.e., the input entity in the positive recommendation process; r represents the positive relationship, i.e., the input relationship value in the positive recommendation training process; The recommendation model is trained based on the positive recommendation model training data and the negative recommendation model training data to obtain a trained manufacturing cloud service recommendation system.
2. The method for training a manufacturing cloud service recommendation model based on a graph model according to claim 1, characterized in that: The mapping method includes linear model mapping; accordingly, the mapping function includes: d(r)=Wr+b; Among them, d(r) represents the inverse relationship; r represents the positive relationship; W represents the mapping weight; b represents the bias of the linear layer; The mapping method includes multi-layer perceptron mapping; accordingly, the mapping function includes: d(r) = MLP(r); Among them, d(r) represents an inverse relationship; r represents a positive relationship; MLP() represents the model structure; The mapping method includes convolution model mapping; accordingly, the mapping function includes: d(r)=Conv(r); Among them, d(r) represents the inverse relationship; r represents the positive relationship; Conv() represents the model structure; The mapping method includes attention model mapping; accordingly, the mapping function includes: d(r)=α(r)☉r; Among them, d(r) represents the inverse relationship; r represents the positive relationship; α(r) represents the attention weight; ⊙ represents the Hadamard product.
3. A manufacturing cloud service recommendation method based on a graph model, characterized in that: The method comprises: Acquire information to be processed; the information to be processed includes user needs or services to be recommended; The user demand or the service to be recommended is input into a pre-trained manufacturing cloud service recommendation system, so that the recommendation system outputs a target recommended service corresponding to the user demand when the information to be processed is a user demand; or, when the information to be processed is a service to be recommended, the target user corresponding to the service to be recommended is output; wherein the manufacturing cloud service recommendation system is trained using the manufacturing cloud service recommendation model training method based on a graph model as described in claim 1 or 2.
4. A manufacturing cloud service recommendation model training device based on a graph model, characterized in that: The device comprises: A sample data acquisition module is used to acquire sample data; the sample data includes positive recommendation sample data and inverse recommendation sample data for training the manufacturing cloud service recommendation system, so that the trained manufacturing cloud service recommendation system supports both positive relationship recommendation and inverse relationship recommendation; the sample data acquisition module is specifically used to: acquire a pre-constructed graph model, and generate multiple groups of triple data based on two adjacent nodes in the graph model and the edges between the two adjacent nodes; for any group of triple data, acquire the head entity and the positive relationship in the triple data as the positive recommendation sample data, and acquire the tail entity and the positive relationship in the triple data as the inverse recommendation sample data; A mapping relationship generation module is used to obtain an inverse relationship conjugate with a positive relationship in a manufacturing cloud service recommendation system, and generate a mapping relationship between the positive relationship and the inverse relationship; the mapping relationship includes: -1 =d(r); where r -1 represents an inverse relationship; r represents a positive relationship; d(r) represents a mapping function between the positive relationship and the inverse relationship; The first training data generation module is used to perform data mapping processing on the inverse recommendation sample data according to the mapping relationship, and generate inverse recommendation model training data corresponding to the inverse recommendation sample data according to the sample data after mapping processing and the recommendation model to be trained; the inverse recommendation model training data includes: h=f(t,d(r)); wherein f() represents the model structure of the recommendation model; h represents the head entity, that is, the training label in the inverse recommendation training process; t represents the tail entity, that is, the input entity in the inverse recommendation process; d(r) represents the inverse relationship, that is, the input relationship value in the inverse recommendation training process; The second training data generation module generates positive recommendation model training data corresponding to the positive recommendation sample data according to the recommendation model and the positive recommendation sample data; the positive recommendation model training data includes: t=f(h,r); wherein f() represents the model structure of the recommendation model; t represents the tail entity, i.e., the training label in the positive recommendation training process; h represents the head entity, i.e., the input entity in the positive recommendation process; r represents the positive relationship, i.e., the input relationship value in the positive recommendation training process; The training module is used to train the recommendation model based on the positive recommendation model training data and the negative recommendation model training data to obtain a trained manufacturing cloud service recommendation system.
5. A manufacturing cloud service recommendation device based on a graph model, characterized in that: The device comprises: An information acquisition module, used to acquire information to be processed; the information to be processed includes user needs or services to be recommended; A recommendation processing module, used for inputting the user demand or the service to be recommended into a pre-trained manufacturing cloud service recommendation system, so that the recommendation system outputs a target recommended service corresponding to the user demand when the information to be processed is a user demand; or, outputs a target user corresponding to the service to be recommended when the information to be processed is a service to be recommended; wherein the manufacturing cloud service recommendation system is trained using the manufacturing cloud service recommendation model training method based on a graph model as described in claim 1 or 2.
6. An electronic device, characterized in that: include: A processor and a memory communicatively connected to the processor; The memory stores computer-executable instructions; When executing the computer-executable instructions, the processor is used to implement the manufacturing cloud service recommendation model training method based on the graph model as described in claim 1 or 2, or the manufacturing cloud service recommendation method based on the graph model as described in claim 3.
7. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer execution instructions, which, when executed by a processor, are used to implement the manufacturing cloud service recommendation model training method based on a graph model as described in claim 1 or 2, or the manufacturing cloud service recommendation method based on a graph model as described in claim 3.
Citation Information
Patent Citations
Information recommendation method and device, server and readable storage medium
CN111274472A
Object recommendation method and device, model training method and device, equipment, medium and product
CN113190725A
Body verification recommendation model training method and device
CN114462502A
Recommendation model training method
CN117349513A
Online recomending system, method and apparatus for updating recommender based on meta-leaining
KR102612986B1
