Scoring Prediction Model Training Method, Device, Electronic Device and Storage Medium
By establishing a two-part graph and extracting a one-hop subgraph, the scoring prediction model is trained, and the prediction efficiency problem caused by frequent training in the prior art is solved, and stable scoring prediction is achieved.
Patent Information
- Application Number
- CN202210673055.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-15
- Publication Date
- 2025-08-05
- Estimated Expiration
- 2042-06-15
AI Technical Summary
In the prior art, the prediction model of the user's propensity to objects requires frequent training, resulting in inefficient prediction.
By establishing a two-part graph, using the user and object's feature vectors and scores, extracting the first-hop subgraph and edge weights, performing model training, and obtaining a stable scoring prediction model.
Frequent training is avoided, the efficiency of score prediction is improved, and the stability and accuracy of the model are ensured.
Smart Images

Figure CN114926227B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of machine learning, and in particular, to a method, device, electronic device, and storage medium for training a scoring prediction model. Background Art
[0002] With the development of information technology, the richness of objects that operators can provide to users is also increasing day by day. Users have a great degree of freedom in the ways and intensities of using the network, voice, and information objects through mobile phones. In such an environment, users have formed their own diverse needs and usage habits for mobile phone objects, and due to cost considerations, users have different degrees of preference for the objects provided by operators. How to predict the degree of preference of users for objects is of great help for accurately pushing suitable objects to users.
[0003] In the related art, a prediction model is trained based on user subscription records to predict the degree of preference of users for objects. However, in actual applications, new subscription records will continue to be generated, and the prediction model needs to be frequently trained, which seriously affects the prediction efficiency. Summary of the Invention
[0004] This application provides a method, device, electronic device, and storage medium for training a scoring prediction model, which is used to improve the efficiency of scoring prediction.
[0005] In a first aspect, this application provides a method for training a scoring prediction model, including: establishing a bipartite graph according to the feature vector of a user, the feature vector of an object, and the score of the user for the object, where the nodes in the bipartite graph include user nodes corresponding to the user and object nodes corresponding to the object, and the connection edge between the user node and the object node represents that there is a subscription relationship between the user represented by the user node and the object represented by the object node, and the weight of the connection edge represents the score of the user for the object; obtaining training data based on the bipartite graph, where the training data includes a one-hop subgraph of the first user node and the first object node with a connection edge in the bipartite graph and the weight of the connection edge corresponding to the one-hop subgraph; where the one-hop subgraph is a subset extracted from the bipartite graph that is one-hop adjacent to the first user node and the first object node; performing model training according to the training data to obtain the trained scoring prediction model, and the scoring prediction model is used to output the score of the second user for the second object according to the one-hop subgraph corresponding to the second user and the second object without a subscription relationship.
[0006] In a possible implementation, the model training based on the training data to obtain the trained scoring prediction model includes: dividing the training data into a training set and a validation set; training an initial scoring prediction model based on the training set; inputting the validation set into the initial scoring prediction model, and obtaining an average error according to multiple first predicted scores output by the scoring prediction model and the corresponding scores, until the average error no longer decreases, then it is considered that the current average error reaches stability, and the trained scoring prediction model is obtained.
[0007] In a possible implementation, the method further includes: obtaining the user characteristics of a user and the object characteristics of an object; respectively performing normalization processing on the feature vectors belonging to continuous variables for the user characteristics and the object characteristics, and converting the feature vectors belonging to discrete variables into one-hot vectors, to obtain the feature vectors of the user and the feature vectors of the object.
[0008] In a possible implementation, the method further includes: extracting, according to the ordering record of the user, the cumulative ordering duration of the user under each object, the start time of the first order, and the end time of the last order; obtaining the score of the user for the object according to the cumulative ordering duration, the start time of the first order, and the end time of the last order, and the score reflects the continuity of the user's continuous ordering of the object.
[0009] In a possible implementation, the method further includes: obtaining a one-hop subgraph corresponding to a second user and a second object without an ordering relationship; inputting the one-hop subgraph corresponding to the second user and the second object into the scoring prediction model, and obtaining the score of the second user for the second object output by the scoring prediction model.
[0010] In a possible implementation, the scoring prediction model includes a relational graph convolutional network, an aggregation layer, and a multi-layer neural network; wherein, the relational graph convolutional network is used to traverse and accumulate the feature vectors of the currently reached nodes along the edges according to preset different hop numbers for the user node corresponding to the second user until reaching the object node corresponding to the second object, to obtain the accumulated feature vectors at different hop numbers; the accumulated feature vectors include user feature vectors and object feature vectors; the aggregation layer is used to perform aggregation processing on the user feature vectors and object feature vectors at different hop numbers to obtain the representation vector of the one-hop subgraph; the multi-layer neural network is used to output the corresponding score according to the representation vector of the one-hop subgraph.
[0011] Second aspect, the present application provides a scoring prediction model training device, including: a building module, configured to build a bipartite graph according to the feature vector of a user, the feature vector of an object, and the score given by the user to the object, where the nodes in the bipartite graph include user nodes corresponding to the users and object nodes corresponding to the objects, and the edges between the user nodes and the object nodes represent that there is an ordering relationship between the user represented by the user node and the object represented by the object node, and the weight of the edge represents the score given by the user to the object; a data module, configured to obtain training data based on the bipartite graph, where the training data includes the one-hop subgraph of the first user node and the first object node with edges in the bipartite graph and the weight of the edge corresponding to the one-hop subgraph; wherein, the one-hop subgraph is a subset extracted from the bipartite graph that is one-hop adjacent to the first user node and the first object node; a training module, configured to perform model training according to the training data to obtain the trained scoring prediction model, and the scoring prediction model is configured to output the score given by the second user to the second object according to the one-hop subgraph corresponding to the second user and the second object without an ordering relationship.
[0012] In a possible implementation manner, the training module is specifically configured to divide the training data into a training set and a validation set; the training module is further specifically configured to train an initial scoring prediction model based on the training set; the training module is further specifically configured to input the validation set into the initial scoring prediction model and obtain an average error according to multiple first predicted scores output by the scoring prediction model and the corresponding scores, and until the average error no longer decreases, it is considered that the current average error reaches stability, and the trained scoring prediction model is obtained.
[0013] In a possible implementation manner, the device further includes: an acquisition module, configured to acquire the user features of the user and the object features of the object; a processing module, configured to respectively perform normalization processing on the feature vectors belonging to continuous variables and convert the feature vectors belonging to discrete variables into one-hot vectors for the user features and the object features, so as to obtain the feature vector of the user and the feature vector of the object.
[0014] In a possible implementation manner, the device further includes: an acquisition module, configured to extract the cumulative ordering duration of the user under each object, the start time of the first order, and the end time of the last order according to the ordering record of the user; a processing module, configured to obtain the score given by the user to the object according to the cumulative ordering duration, the start time of the first order, and the end time of the last order, and the score reflects the continuity of the user's continuous ordering of the object.
[0015] In a possible implementation manner, the device further includes: an obtaining module, configured to obtain a one-hop subgraph corresponding to a second user and a second object without an ordering relationship; a processing module, configured to input the one-hop subgraph corresponding to the second user and the second object into the scoring prediction model, and obtain the score of the second user for the second object output by the scoring prediction model.
[0016] In a possible implementation manner, the scoring prediction model includes a relational graph convolutional network, an aggregation layer, and a multi-layer neural network; wherein, the relational graph convolutional network is configured to, for a user node corresponding to the second user, traverse along the connected edges according to preset different hop numbers and accumulate the feature vectors of the currently reached nodes until reaching the object node corresponding to the second object, and obtain the accumulated feature vectors under different hop numbers; the accumulated feature vectors include user feature vectors and object feature vectors; the aggregation layer is configured to perform aggregation processing on the user feature vectors and object feature vectors under different hop numbers to obtain a characterization vector of the one-hop subgraph; the multi-layer neural network is configured to output a corresponding score according to the characterization vector of the one-hop subgraph.
[0017] In a third aspect, the present application provides an electronic device, including: a processor, and a memory communicatively connected to the processor; the memory stores computer execution instructions; the processor executes the computer execution instructions stored in the memory to implement the method according to any one of the first aspects.
[0018] In a fourth aspect, the present application provides a computer-readable storage medium, in which computer execution instructions are stored, and the computer execution instructions are executed by a processor to implement the method according to any one of the first aspects.
[0019] The scoring prediction model training method, device, electronic device, and storage medium provided by the present application establish a bipartite graph according to the feature vectors of users, the feature vectors of objects, and the scores of the users for the objects; based on the bipartite graph, training data is obtained, and the training data includes a one-hop subgraph of a first user node and a first object node with connected edges in the bipartite graph and the weight of the connected edge corresponding to the one-hop subgraph; model training is performed according to the training data to obtain the trained scoring prediction model. The above solution can obtain a relatively stable scoring prediction model by establishing a bipartite graph with the feature vectors of users and objects to train the scoring prediction model, avoid retraining of the scoring prediction model, and improve the scoring prediction efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The drawings here are incorporated into the specification and form a part of this specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.
[0021] Figure 1 Schematic diagram of an application scenario of a method for training a scoring prediction model provided by an embodiment of the present application;
[0022] Figure 2 Schematic flowchart of a method for training a scoring prediction model provided by Embodiment 1 of the present application;
[0023] Figure 3 Example of training a scoring prediction model provided by an embodiment of the present application;
[0024] Figure 4 Schematic diagram of the structure of a device for training a scoring prediction model provided by Embodiment 2 of the present application;
[0025] Figure 5 Block diagram of a device for training a scoring prediction model provided by Embodiment 3 of the present application;
[0026] Figure 6 Schematic diagram of the structure of an electronic device provided by Embodiment 4 of the present application.
[0027] Through the above-mentioned drawings, specific embodiments of the present application have been shown, and there will be more detailed descriptions hereinafter. These drawings and textual descriptions are not intended to limit the scope of the concept 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 implementation manners
[0028] Here, exemplary embodiments will be described in detail, and examples are shown in the drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementation manners described in the following exemplary embodiments do not represent all implementation manners consistent with the present application. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0029] First, the terms involved are explained:
[0030] Bipartite graph: That is, the vertex set can be divided into two non-overlapping subsets, and each edge in the graph adheres to two vertices that belong to these two non-overlapping subsets respectively, and the vertices within the two subsets are not adjacent.
[0031] Figure 1 Schematic diagram of an application scenario of a method for training a scoring prediction model provided by an embodiment of the present application, as Figure 1 shown.
[0032] An example is given in combination with the illustrated scenario: According to the order record, the known ratings of the ordered objects by the user can be obtained. Based on the user's feature vector, the object's feature vector, and the known ratings of the ordered objects by the user, a bipartite graph can be constructed. The one-hop subgraphs of the user and the ordered objects and the corresponding ratings are extracted from the bipartite graph for training the rating prediction model, and the rating prediction model can identify the relationship between the one-hop subgraphs and the corresponding ratings. Through the trained rating prediction model, the ratings of the unordered objects by the user can be predicted. The one-hop subgraphs of the user and the unordered objects are extracted from the bipartite graph and input into the trained rating prediction model. The rating prediction model outputs the predicted ratings corresponding to the one-hop subgraphs of the unordered objects according to the identified relationship between the one-hop subgraphs and the corresponding ratings.
[0033] The technical solutions of this application will be described in detail below with specific embodiments. These specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. In the description of this application, unless otherwise clearly specified and limited, each term should be understood in a broad sense in the art. The embodiments of this application will be described below in conjunction with the accompanying drawings.
[0034] Embodiment 1
[0035] Figure 2 It is a schematic flowchart of a method for training a rating prediction model provided in Embodiment 1 of this application. The method includes the following steps:
[0036] S101. Establish a bipartite graph according to the user's feature vector, the object's feature vector, and the rating of the object by the user. The nodes in the bipartite graph include the user nodes corresponding to the users and the object nodes corresponding to the objects. The edges between the user nodes and the object nodes represent the existence of an order relationship between the user represented by the user node and the object represented by the object node, and the weight of the edge represents the rating of the object by the user.
[0037] S102. Based on the bipartite graph, obtain training data, which includes the one-hop subgraphs of the first user nodes and the first object nodes with edges in the bipartite graph and the weights of the corresponding edges; wherein, the one-hop subgraph is a subset extracted from the bipartite graph that is one-hop adjacent to the first user nodes and the first object nodes.
[0038] S103. Perform model training according to the training data to obtain the trained rating prediction model, which is used to output the rating of the second object by the second user according to the one-hop subgraphs corresponding to the second user and the second object without an order relationship.
[0039] As an example, the execution entity of this embodiment can be a scoring prediction model training device, and there are various ways to implement this scoring prediction model training device. For example, it can be a program software, or a medium storing relevant computer programs, such as a USB flash drive, etc.; or, this device can also be an entity device integrated or installed with relevant computer programs, such as a chip, a smart terminal, a computer, a server, etc.
[0040] In one example, before S101, it further includes: obtaining the user characteristics of the user and the object characteristics of the object; respectively performing normalization processing on the feature vectors belonging to continuous variables for the user characteristics and the object characteristics, and converting the feature vectors belonging to discrete variables into one-hot vectors to obtain the feature vectors of the user and the feature vectors of the object.
[0041] Specifically, the user characteristics include but are not limited to the account opening time, mobile phone model, age, gender, average user income value, historical Internet traffic demand, historical call times, historical SMS / MMS demand, etc. The object characteristics include but are not limited to fees, timeliness, service type (Internet-related / call-related / SMS-related), the mobile phone types targeted, the user types targeted, etc.
[0042] As an implementable manner, respectively perform normalization processing on the feature vectors belonging to continuous variables for the user characteristics and the object characteristics, and convert the feature vectors belonging to discrete variables into one-hot vectors to obtain the preliminary feature vectors of the user and the preliminary feature vectors of the object. Let the length of the preliminary feature vector of the user be l u , and the length of the preliminary feature vector of the object be l v , then finally each preliminary feature vector needs to be padded with zeros to a length of (l u + l v ), where the preliminary feature vector of the user is padded with zeros after the last existing bit to obtain the feature vector of the user, and the preliminary feature vector of the object is padded with zeros before the first existing bit to obtain the feature vector of the object. By the method of padding with zeros, it can be ensured that the obtained feature vectors of the user and the object have the same dimension.
[0043] Combined with the scenario example, the historical user characteristics and object characteristics have certain rules, and the user characteristics are related to the user's own needs, usage habits and object characteristics. For example, users with a large demand for Internet access are more inclined to objects with more traffic. Users with a large demand for calls are more inclined to objects with a long call time. If the user's mobile phone supports 5G services, then the user is more inclined to 5G-related objects. The feature vectors of the user and the object constructed by the historical user characteristics and object characteristics contain the rules of the user's tendency degree towards the object, and can be used to predict the user's tendency degree towards the object in the future.
[0044] Based on the above embodiments, the feature vectors of the user and the object extracted from the user characteristics and object characteristics can more comprehensively reflect the degree of the user's preference for the object compared to only extracting information from the purchase records.
[0045] In one example, before S101, it further includes: according to the user's order records, extracting the cumulative order duration of the user under each object, the start time of the first order, and the end time of the last order; according to the cumulative order duration, the start time of the first order, and the end time of the last order, obtaining the score of the user for the object, and the score reflects the continuity of the user's continuous order of the object.
[0046] As an implementable way, establish a dictionary T = {} to store the order duration, establish a dictionary S = {} to store the start time of the service of the first order, and establish a dictionary W = {} to store the final score; traverse all order records, extract the user u, the object v, the order duration t, and the service start time s, accumulate t in T[(u, v)], and record s in S[(u, v)] (if and only if s is less than the recorded value S[(u, v)]); traverse all (user, object) pairs in T to calculate the final score:
[0047]
[0048] where e is the end time of the order record, tmin v is the single service duration of the object v, and the final score W[(u, v)] is an integer from 1 to 5.
[0049] Specifically, accumulating t in T[(u, v)] is to count the total historical order duration. Recording s in S[(u, v)] (if and only if s is less than the recorded value S[(u, v)]) is to obtain the earliest order start time. For example, if the current time recorded in S[(u, v)] is March 9th, when s is March 12th, then s is not recorded in S[(u, v)], and when s is March 7th, at this time the value of s is less than the current time recorded in S[(u, v)], then s is recorded in S[(u, v)], and the new S[(u, v)] is March 7th.
[0050] More specifically, T[(u, v)] reflects the time when the user actually orders the object, and e - S[(u, v)] reflects the time when the user can order the object. If the user only orders an object once, then T[(u, v)] = tmin v , at this time T[(u, v)] - tmin v = 0, and the calculated W[(u, v)] = 1.
[0051] Taking the scenario example, if the time when the user actually orders an object is closer to the time when the user can order the object, it reflects a higher degree of continuity in the user's consecutive ordering of the object, indicating a higher tendency of the user towards the product and repeated ordering of the object, and the final score calculated is also higher.
[0052] Based on the above implementation, the score calculated through the ordering record can accurately reflect the degree of continuity of the user's ordered object, thereby establishing an accurate bipartite graph.
[0053] In one example, S102 includes: determining the node pair (u, v) for which a one-hop subgraph needs to be extracted from the bipartite graph, and establishing an initial weighted graph; obtaining the feature vector of the user and the feature vector record of the object from the bipartite graph and recording them into the weighted graph; constructing a data set according to the weighted graph and the score.
[0054] As an implementable approach, determine the node pair (u, v) for which a one-hop subgraph needs to be extracted, and establish an initial weighted graph G=(V, E, X, W), where V represents the node pair, V={u, v}. E represents the connecting edges of the one-hop subgraph. X represents the feature vector. x u represents the feature vector of the user, and x v represents the feature vector of the object. W represents the mapping relationship from the edge to the score. Traverse all the neighbor nodes v j ∈N r (u), add the node v j to V, add the edge (u, v j ) to E, add the column vector to X, and record the score of the edge (u, v j ) to W. Traverse all the neighbor nodes u of v i ∈N r (v), add the node u i to V, add the edge (u i , v) to E, add the column vector to X, and record the score of the edge (u i , v) to W. Traverse all the neighbor nodes of u and all the neighbor nodes of v, query whether the edge (u i , v j ) exists, if it exists, add it to E and record the score to W; add the constructed (G, r uv ) to the data set as a training data entry, where r uv represents the score of the node pair. Traverse all the (u, v) pairs that appear in the ordering record, and the construction of the data set is completed after the traversal.
[0055] Based on the above embodiments, a dataset constructed by establishing a weighted graph can introduce the feature vectors of users and objects, and obtain a dataset that accurately reflects the degree of user preference.
[0056] In one example, S103 includes: dividing the training data into a training set and a validation set; training an initial scoring prediction model based on the training set; inputting the validation set into the initial scoring prediction model, and obtaining an average error according to multiple first predicted scores output by the scoring prediction model and the corresponding scores. When the average error no longer decreases, it is considered that the current average error reaches stability, and a trained scoring prediction model is obtained.
[0057] In practical applications, the training data can be randomly extracted according to a preset ratio to obtain a training set and a validation set.
[0058] As an implementable way, as Figure 3 shown, Figure 3 is an example of training a scoring prediction model. The input of the scoring prediction model is a one-hop subgraph, and the output is the score of the user-object node pair corresponding to the one-hop subgraph predicted by the scoring prediction model. The training set is constructed based on the nodes of users and objects with an ordering relationship in the bipartite graph. The initial scoring prediction model obtained based on the training set can obtain the relationship between the one-hop subgraph and the corresponding score. Next, input the one-hop subgraph of the validation set into the initial scoring prediction model, and output the predicted score corresponding to the one-hop subgraph predicted by the initial scoring prediction model. Calculate the error between the score corresponding to the one-hop subgraph and the predicted score corresponding to the one-hop subgraph. The error characterizes the prediction accuracy of the initial scoring prediction model. Calculate the average error of multiple errors. When the average error reaches stability, it means that the current initial scoring prediction model reaches the best training effect, and the training is completed. The current initial scoring prediction model is the trained scoring prediction model.
[0059] As another implementable way, when the average error is less than a preset error threshold, it is considered that the current initial scoring prediction model meets the user's requirements, and the training is completed. The current initial scoring prediction model is the trained scoring prediction model.
[0060] It should be noted that the above embodiments can be combined. Specifically, when the average error is less than the preset error threshold, calculate the average error of consecutive multiple errors less than the preset error threshold. When the average error reaches stability, it means that the current initial scoring prediction model reaches the best training effect, and the training is completed. This embodiment does not limit the specific judgment criteria for completing the training.
[0061] Taking a scenario example, the scoring model for predicting scores based on training data in this embodiment is learned from historical records. This scoring model is related to the long-term needs and usage habits of users, so this scoring model is relatively stable.
[0062] Based on the above implementation, the scoring prediction model trained by a relatively stable scoring model avoids retraining of the scoring prediction model and improves the scoring prediction efficiency.
[0063] To illustrate the application process of the scoring prediction model, in one example, the scoring prediction model training method further includes: obtaining a one-hop subgraph corresponding to a second user and a second object without an ordering relationship; inputting the one-hop subgraph corresponding to the second user and the second object into the scoring prediction model to obtain the score of the second user for the second object output by the scoring prediction model.
[0064] As an implementable manner, the first user node and the first object node with an edge connection in the bipartite graph represent the first user and the first object with an ordering relationship. The second user node and the second object node without an edge connection in the bipartite graph represent the second user and the second object without an ordering relationship. For the first user node and the first object node, the score of the first user for the first object is known, and the scoring prediction model is trained through the one-hop subgraph of the first user node and the first object node and the score corresponding to the one-hop subgraph. For the second user node and the second object node, the score of the second user for the second object is unknown. The one-hop subgraph of the second user node and the second object node is input into the scoring prediction model to output the predicted score of the second user for the second object.
[0065] Taking a scenario example, the first user has subscribed to the first object. According to the subscription record, the score of the first user for the first object can be calculated. The scoring prediction model trained through the one-hop subgraph corresponding to the first user and the first object and the score of the first user for the first object can identify the relationship between user features, object features, and scores. The second user has not subscribed to the second object, so there is no score of the second user for the second object. The score of the second user for the second object can be predicted based on the relationship between user features, object features, and scores identified by the scoring prediction model.
[0066] In practical applications, predicting the score of the second user for the second object can be used to push the second object to the second user for the second user to choose.
[0067] Based on the above implementation, the scoring prediction model obtained through training can accurately predict the scores of all second users without an ordering relationship for the second object, improving the scoring prediction efficiency.
[0068] In order to identify the relationship between user features, object features and ratings, in one example, a rating prediction model includes a relational graph convolutional network, an aggregation layer and a multi-layer neural network; wherein the relational graph convolutional network is used to traverse along the edge and accumulate the feature vector of the currently reached node according to different preset hop numbers for the user node corresponding to the second user until the object node corresponding to the second object is reached, thereby obtaining the accumulated feature vectors under different hop numbers; the accumulated feature vector includes a user feature vector and an object feature vector; the aggregation layer is used to aggregate the user feature vectors and object feature vectors under different hop numbers to obtain the representation vector of the one-hop subgraph; the multi-layer neural network is used to output the corresponding rating based on the representation vector of the one-hop subgraph.
[0069] As an implementable approach, the expression of the rating prediction model for predicting ratings through a one-hop subgraph is:
[0070]
[0071]
[0072] g=concat(h u , h v )…………………………………………(3)
[0073]
[0074] in, Represents the input of the graph convolutional network of node i in layer l, N r (i) represents the set of adjacent nodes of node i in the one-hop subgraph. Formula (1) represents that the graph convolutional network accumulates the feature vectors of the adjacent nodes of the second user node. Formula (2) represents that the aggregation layer aggregates multiple layers of user feature vectors into one feature vector, and the aggregation layer aggregates multiple layers of object feature vectors into one feature vector. Formula (3) represents that the aggregation layer aggregates the aggregated user feature vector and the aggregated object feature vector into one feature vector. Formula (4) represents that the multi-layer neural network predicts the corresponding score based on the feature vector obtained by formula (3).
[0075] Based on the above implementation, through the multi-layer rating prediction model, the correspondence between one-hop subgraphs and ratings can be identified, thereby accurately predicting ratings.
[0076] In the method for training a scoring prediction model provided in this embodiment, a bipartite graph is established according to the feature vector of a user, the feature vector of an object, and the score given by the user to the object; based on the bipartite graph, training data is obtained, and the training data includes the one-hop subgraph of the first user node and the first object node with an edge connection in the bipartite graph and the weight of the edge connection corresponding to the one-hop subgraph; model training is performed according to the training data to obtain the trained scoring prediction model. Through the above solution, a bipartite graph is established by using the feature vectors of the user and the object to train the scoring prediction model, and a relatively stable scoring prediction model can be obtained, avoiding the retraining of the scoring prediction model and improving the scoring prediction efficiency.
[0077] Embodiment 2
[0078] Figure 4 As shown in the structural schematic diagram of a scoring prediction model training device provided in Embodiment 2 of this application, Figure 5 as shown, the scoring prediction model training device includes:
[0079] A building module 61, configured to establish a bipartite graph according to the feature vector of a user, the feature vector of an object, and the score given by the user to the object, where the nodes in the bipartite graph include the user nodes corresponding to the users and the object nodes corresponding to the objects, and the edge connection between the user nodes and the object nodes represents that there is an ordering relationship between the user represented by the user node and the object represented by the object node, and the weight of the edge connection represents the score given by the user to the object;
[0080] A data module 62, configured to obtain training data based on the bipartite graph, where the training data includes the one-hop subgraph of the first user node and the first object node with an edge connection in the bipartite graph and the weight of the edge connection corresponding to the one-hop subgraph; where the one-hop subgraph is a subset extracted from the bipartite graph that is one-hop adjacent to the first user node and the first object node;
[0081] A training module 63, configured to perform model training according to the training data to obtain the trained scoring prediction model, and the scoring prediction model is used to output the score given by the second user to the second object according to the one-hop subgraph corresponding to the second user and the second object without an ordering relationship.
[0082] In an example, the scoring prediction model training device further includes: an acquisition module 64, configured to acquire the user features of the user and the object features of the object; a processing module 65, which respectively performs normalization processing on the feature vectors belonging to continuous variables and converts the feature vectors belonging to discrete variables into one-hot vectors for the user features and the object features, to obtain the feature vector of the user and the feature vector of the object.
[0083] Specifically, user characteristics include but are not limited to account opening time, mobile phone model, age, gender, average user income value, historical Internet traffic demand, historical call times, historical SMS / MMS demand, etc. Object characteristics include but are not limited to cost, timeliness, service type (Internet-related / call-related / SMS-related), targeted mobile phone type, targeted user type, etc.
[0084] As an implementable manner, the processing module 65 respectively performs normalization processing on the feature vectors belonging to continuous variables for the user characteristics and the object characteristics, and converts the feature vectors belonging to discrete variables into one-hot vectors, obtaining the preliminary feature vector of the user and the preliminary feature vector of the object. Suppose the length of the preliminary feature vector of the user is l u , and the length of the preliminary feature vector of the object is l v , then finally, each preliminary feature vector needs to be padded with zeros to a length of (l u + l v ), where the preliminary feature vector of the user is padded with zeros after the last existing bit to obtain the feature vector of the user, and the preliminary feature vector of the object is padded with zeros before the first existing bit to obtain the feature vector of the object. By the method of padding with zeros, it can be ensured that the obtained feature vectors of the user and the object have the same dimension.
[0085] Combined with the scenario example, historical user characteristics and object characteristics have certain rules, and user characteristics are related to the user's own needs, usage habits and object characteristics. For example, users with a high demand for Internet access tend to prefer objects with more traffic. Users with a high demand for calls tend to prefer objects with a long call time. If the user's mobile phone supports 5G services, the user will tend to prefer 5G-related objects. The feature vectors of the user and the object constructed from historical user characteristics and object characteristics contain the rules of the user's tendency degree towards the object, and can be used to predict the user's tendency degree towards the object in the future.
[0086] Based on the above implementation manner, the feature vectors of the user and the object extracted from user characteristics and object characteristics can more comprehensively reflect the user's tendency degree towards the object compared to only extracting information from purchase records.
[0087] In an example, the scoring prediction model training device further includes: an acquisition module 64, configured to extract the cumulative subscription duration of the user under each object, the start time of the first subscription, and the end time of the last subscription according to the user's subscription records; a processing module 65, configured to obtain the score of the user for the object according to the cumulative subscription duration, the start time of the first subscription, and the end time of the last subscription, and the score reflects the degree of continuity of the user's continuous subscription to the object.
[0088] As an implementable manner, establish a dictionary T = {} for storing the subscription duration, establish a dictionary S = {} for storing the start time of the service subscribed for the first time, and establish a dictionary W = {} for storing the final score; the acquisition module 64 traverses all subscription records, extracts the user u, the object v, the subscription duration t, and the service start time s, accumulatively records t in T[(u, v)], and records s in S[(u, v)] (if and only if s is less than the recorded value S[(u, v)]); traverse all (user, object) pairs in T to calculate the final score:
[0089]
[0090] where e is the end time of the subscription record, and tmin v is the duration of a single service of the object v, and the final score W[(u, v)] is an integer from 1 to 5.
[0091] Specifically, accumulatively recording t in T[(u, v)] is to count the total historical subscription duration. Recording s in S[(u, v)] (if and only if s is less than the recorded value S[(u, v)]) is to obtain the earliest subscription start time. For example, if the time recorded in the current S[(u, v)] is March 9th, when s is March 12th, then s is not recorded in S[(u, v)], and when s is March 7th, at this time the value of s is less than the time recorded in the current S[(u, v)], then s is recorded in S[(u, v)], and the new S[(u, v)] is March 7th.
[0092] More specifically, T[(u, v)] reflects the time when the user actually subscribes to the object, and e - S[(u, v)] reflects the time when the user can subscribe to the object. If the user subscribes to an object only once, then T[(u, v)] = tmin v At this time, T[(u, v)] - tmin v = 0, and it is calculated that W[(u, v)] = 1.
[0093] Combined with the scenario example, if the time when the user actually subscribes to the object is closer to the time when the user can subscribe to the object, it reflects a higher degree of continuity of the user's continuous subscription to the object, indicating a higher tendency of the user towards the product, repeatedly subscribing to the object, and the calculated final score is also higher.
[0094] Based on the above implementation manner, the score calculated through the subscription record can accurately reflect the degree of continuity of the user's subscription to the object, thereby establishing an accurate bipartite graph.
[0095] In one example, the data module 62 is used to determine node pairs (u, v) in a bipartite graph that require extracting one-hop subgraphs, and establish an initialized weighted graph; obtain the feature vectors of users and the feature vectors of objects from the bipartite graph and record them in the weighted graph; construct a data set based on the weighted graph and scores.
[0096] As an implementable manner, the data module 62 determines node pairs (u, v) that require extracting one-hop subgraphs, and establishes an initialized weighted graph G = (V, E, X, W), where V represents node pairs, V = {u, v}. E represents the connecting edges of one-hop subgraphs. X represents feature vectors. x u represents the feature vector of a user, and x v represents the feature vector of an object. W represents the mapping relationship from edges to scores. Traverse all neighbor nodes v j ∈N r (u), add node v j to V, add edge (u, v j ) to E, add a column vector to X, and record the score of edge (u, v j ) to W. Traverse all neighbor nodes u of v i ∈N r (v), add node u i to V, add edge (u i , v) to E, add a column vector to X, and record the score of edge (u i , v) to W. Traverse all neighbor nodes of u and all neighbor nodes of v, query whether edge (u i , v j ) exists. If it exists, add it to E and record the score to W; add the constructed (G, r uv ) to the data set as a piece of training data, where r uv represents the score of the node pair. Traverse all (u, v) pairs that appear in the order records. After the traversal is completed, the construction of the data set is completed.
[0097] Based on the above implementation, the data set constructed by establishing a weighted graph can introduce the feature vectors of users and the feature vectors of objects, and obtain a data set that accurately reflects the user's preference degree.
[0098] In one example, the training module 63 is specifically configured to divide the training data into a training set and a validation set; the training module 63 is further specifically configured to train an initial scoring prediction model based on the training set; the training module 63 is further specifically configured to input the validation set into the initial scoring prediction model, and obtain an average error based on multiple first predicted scores output by the scoring prediction model and the corresponding scores, until the average error no longer decreases, then it is considered that the current average error reaches stability, and a trained scoring prediction model is obtained.
[0099] In practical applications, the training data can be randomly extracted according to a preset ratio to obtain a training set and a validation set.
[0100] As an implementable manner, as Figure 3 shown, Figure 3 is an example for training a scoring prediction model. The input of the scoring prediction model is a one-hop subgraph, and the output is the score of the user-object node pair corresponding to the one-hop subgraph predicted by the scoring prediction model. The training set is constructed based on the nodes of users and objects with an ordering relationship in the bipartite graph. The initial scoring prediction model obtained based on the training set can obtain the relationship between the one-hop subgraph and the corresponding score. Next, the one-hop subgraph of the validation set is input into the initial scoring prediction model, and the predicted score corresponding to the one-hop subgraph predicted by the initial scoring prediction model is output. Calculate the error between the score corresponding to the one-hop subgraph and the predicted score corresponding to the one-hop subgraph. The error characterizes the prediction accuracy of the initial scoring prediction model. Calculate the average error of multiple errors. When the average error reaches stability, it means that the current initial scoring prediction model reaches the best training effect, then the training is completed, and the current initial scoring prediction model is the trained scoring prediction model.
[0101] As another implementable manner, when the average error is less than a preset error threshold, it is considered that the current initial scoring prediction model meets the user's requirements, then the training is completed, and the current initial scoring prediction model is the trained scoring prediction model.
[0102] It should be noted that the above embodiments can be combined. Specifically, when the average error is less than the preset error threshold, calculate the average error of multiple consecutive errors less than the preset error threshold. When the average error reaches stability, it means that the current initial scoring prediction model reaches the best training effect, then the training is completed. This embodiment does not limit the specific judgment criteria for completing the training.
[0103] Combined with the scenario example, the scoring mode for predicting scores based on training data in this embodiment is learned from historical records. This scoring mode is related to the long-term user requirements and user usage habits, so this scoring mode is relatively stable.
[0104] Based on the above embodiments, the scoring prediction model trained through a relatively stable scoring mode avoids the retraining of the scoring prediction model and improves the scoring prediction efficiency.
[0105] To illustrate the application process of the scoring prediction model, in one example, an acquisition module 64 is used to acquire a one-hop subgraph corresponding to a second user and a second object without an ordering relationship; a processing module 65 is used to input the one-hop subgraph corresponding to the second user and the second object into the scoring prediction model, and obtain the score of the second user for the second object output by the scoring prediction model.
[0106] As an implementable manner, the first user node and the first object node with an edge connection in the bipartite graph represent the first user and the first object with an ordering relationship. The second user node and the second object node without an edge connection in the bipartite graph represent the second user and the second object without an ordering relationship. For the first user node and the first object node, the score of the first user for the first object is known, and the scoring prediction model is trained through the one-hop subgraph of the first user node and the first object node and the score corresponding to the one-hop subgraph. For the second user node and the second object node, the score of the second user for the second object is unknown, and the one-hop subgraph of the second user node and the second object node is input into the scoring prediction model to output the predicted score of the second user for the second object.
[0107] Taking a scenario example, the first user has ordered the first object, and the score of the first user for the first object can be calculated according to the order record. The scoring prediction model trained through the one-hop subgraph corresponding to the first user and the first object and the score of the first user for the first object can identify the relationship between user features, object features, and scores. The second user has not ordered the second object, so there is no score of the second user for the second object. The score of the second user for the second object can be predicted according to the relationship between user features, object features, and scores identified by the scoring prediction model.
[0108] In practical applications, predicting the score of the second user for the second object can be used to push the second object to the second user for the second user to choose.
[0109] Based on the above embodiments, the scoring prediction model obtained through training can accurately predict the scores of all second users without an ordering relationship for the second object, and improve the scoring prediction efficiency.
[0110] In order to identify the relationship between user features, object features, and scores, in one example, the score prediction model includes a relational graph convolutional network, an aggregation layer, and a multi-layer neural network. Among them, the relational graph convolutional network is used to traverse along the edges and accumulate the feature vectors of the currently reached nodes according to preset different hop counts for the user node corresponding to the second user until reaching the object node corresponding to the second object, and obtain the accumulated feature vectors at different hop counts. The accumulated feature vectors include user feature vectors and object feature vectors. The aggregation layer is used to perform aggregation processing on the user feature vectors and object feature vectors at different hop counts to obtain the representation vector of the one-hop subgraph. The multi-layer neural network is used to output the corresponding score according to the representation vector of the one-hop subgraph.
[0111] As an implementable way, the expression of the score prediction model for predicting scores through one-hop subgraphs is:
[0112]
[0113]
[0114] g = concat(h u , h v )……………………………………(3)
[0115]
[0116] Among them, represents the input of the relational graph convolutional network of node i at the l-th layer, and N r (i) represents the set of adjacent nodes of node i in the one-hop subgraph. Formula (1) represents that the relational graph convolutional network accumulates the feature vectors of the adjacent nodes of the second user node. Formula (2) represents that the aggregation layer aggregates multiple layers of user feature vectors into one feature vector, and the aggregation layer aggregates multiple layers of object feature vectors into one feature vector. Formula (3) represents that the aggregation layer aggregates the aggregated user feature vectors and the aggregated object feature vectors into one feature vector. Formula (4) represents that the multi-layer neural network predicts the corresponding score according to the feature vector obtained from Formula (3).
[0117] Based on the above implementation, through the multi-layer score prediction model, the corresponding relationship between the one-hop subgraph and the score can be identified, so as to accurately predict the score.
[0118] In the scoring prediction model training device provided in this embodiment, a building module is configured to build a bipartite graph based on the feature vectors of users, the feature vectors of objects, and the scores given by the users to the objects; a data module is configured to obtain training data based on the bipartite graph, where the training data includes the one-hop subgraphs of the first user nodes and the first object nodes with connected edges in the bipartite graph and the weights of the connected edges corresponding to the one-hop subgraphs; a training module is configured to perform model training based on the training data to obtain the trained scoring prediction model. According to the above solution, by building a bipartite graph using the feature vectors of users and objects to train the scoring prediction model, a relatively stable scoring prediction model can be obtained, avoiding the retraining of the scoring prediction model and improving the scoring prediction efficiency.
[0119] Embodiment III
[0120] Figure 5 It is a block diagram of a scoring prediction model training device shown according to an exemplary embodiment. The device can be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.
[0121] Device 800 may include one or more of the following components: a processing component 802, a memory 804, a power supply component 806, a multimedia component 808, an audio component 810, an input / output interface 812, a sensor component 814, and a communication component 816.
[0122] The processing component 802 generally controls the overall operation of the device 800, such as operations associated with display, telephone calls, data communication, 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 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.
[0123] The memory 804 is configured to store various types of data to support the operation of 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, and the like. 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, a magnetic disk, or an optical disk.
[0124] The power supply component 806 provides power to various components of the device 800. The power supply component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the device 800.
[0125] 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 can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can not only sense the boundaries of touch or swipe actions but also detect the duration and pressure associated with the touch or swipe 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 can receive external multimedia data. Each of the front camera and the rear camera can be a fixed optical lens system or have a focal length and optical zoom capabilities.
[0126] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC). When the device 800 is in an operation mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive external audio signals. The received audio signals can be further stored in the memory 804 or transmitted via the communication component 816. In some embodiments, the audio component 810 further includes a speaker for outputting audio signals.
[0127] The input / output interface 812 provides an interface between the processing component 802 and a peripheral interface module, and the peripheral interface module may be a keyboard, a click wheel, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a power button, and a lock button.
[0128] The sensor component 814 includes one or more sensors for providing an assessment of the state of the device 800 in various aspects. For example, the sensor component 814 can detect the on / off state of the device 800, the relative positioning of components, such as the display and the keypad of the device 800. The sensor component 814 can also detect a change in the position 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 component 814 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor component 814 can also include a light sensor, such as a complementary metal oxide semiconductor (CMOS) image sensor or a charge-coupled device (CCD), for use in imaging applications. In some embodiments, the sensor component 814 can further include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
[0129] The communication component 816 is configured to facilitate communication, either wired or wirelessly, between the device 800 and other devices. The device 800 may access a wireless network based on a communication standard, such as WiFi, the 2nd-Generation Communication Technology (2G), the 3rd-Generation Communication Technology (3G), the 4th-Generation Communication Technology (4G), or the 5th-Generation Communication Technology (5G), 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 further includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology, and other technologies.
[0130] 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 Process Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above-described method.
[0131] 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 above - mentioned instructions can be executed by a processor 820 of a device 800 to complete the above - mentioned method. For example, the non - transitory computer - readable storage medium can be a ROM, a random access memory (RAM), a CD - ROM, magnetic tape, a floppy disk, and an optical data storage device, etc.
[0132] Embodiment 4
[0133] Figure 6 As shown in the structural schematic diagram of an electronic device provided in an embodiment of the present application, Figure 6 as shown, the electronic device includes:
[0134] A processor 291, and the electronic device further includes a memory 292; it may also include a communication interface 293 and a bus 294. Among them, the processor 291, the memory 292, and the communication interface 293 can communicate with each other through the bus 294. The communication interface 293 can be used for information transmission. The processor 291 can call the logical instructions in the memory 292 to execute the method of the above - mentioned embodiment.
[0135] In addition, when the logical instructions in the above - mentioned memory 292 are implemented in the form of a software functional unit and sold or used as an independent entity, they can be stored in a computer - readable storage medium.
[0136] The memory 292, as a computer - readable storage medium, can be used to store software programs and computer - executable programs, such as the program instructions / modules corresponding to the method in an embodiment of the present application. The processor 291 executes the functions and data processing by running the software programs, instructions, and modules stored in the memory 292, that is, to implement the method in the above - mentioned method embodiment.
[0137] The memory 292 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the terminal device, etc. In addition, the memory 292 can include a high - speed random - access memory and can also include a non - volatile memory.
[0138] An embodiment of the present application provides a non - transitory computer - readable storage medium, in which computer - executable instructions are stored, and when the computer - executable instructions are executed by a processor, they are used to implement the method as described in the foregoing embodiment.
[0139] Other embodiments of the present application will be readily apparent to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present application, which follow the general principles of the present application and include known common knowledge or conventional technical means in the technical field not disclosed in the present application. The specification and examples are only regarded as exemplary, and the true scope and spirit of the present application are pointed out by the following claims.
[0140] It should be understood that the present application is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope. The scope of the present application is only limited by the appended claims.
Claims
1. A rating prediction model training method, characterized in that: include: Establishing a bipartite graph based on a user's feature vector, an object's feature vector, and the user's rating of the object, wherein the nodes in the bipartite graph include a user node corresponding to the user and an object node corresponding to the object, an edge between the user node and the object node represents an ordering relationship between the user represented by the user node and the object represented by the object node, and a weight of the edge represents the user's rating of the object; Based on the bipartite graph, training data is obtained, the training data including a one-hop subgraph of a first user node and a first object node having an edge in the bipartite graph and a weight of the edge corresponding to the one-hop subgraph; wherein the one-hop subgraph is a subset extracted from the bipartite graph and is one-hop adjacent to the first user node and the first object node; Model training is performed based on the training data to obtain the trained rating prediction model, and the rating prediction model is used to output the rating of the second user for the second object based on the one-hop subgraph corresponding to the second user and the second object that do not have a subscription relationship, wherein the rating prediction model includes a relational graph convolutional network, an aggregation layer and a multi-layer neural network; the relational graph convolutional network is used to traverse along the edge and accumulate the feature vector of the currently arrived node according to different preset hop numbers for the user node corresponding to the second user until the object node corresponding to the second object is reached, to obtain the accumulated feature vectors under different hop numbers; the accumulated feature vector includes a user feature vector and an object feature vector; the aggregation layer is used to aggregate the user feature vectors and the object feature vectors under the different hop numbers to obtain the representation vector of the one-hop subgraph; the multi-layer neural network is used to output the corresponding rating based on the representation vector of the one-hop subgraph; Extract the user's cumulative subscription duration, the start time of the first subscription, and the end time of the last subscription for each object based on the user's subscription record; The user's rating of the object is obtained based on the cumulative ordering duration, the start time of the first order, and the end time of the last order. The rating reflects the degree of continuity of the user's continuous ordering of the object.
2. The method according to claim 1, characterized in that The performing model training according to the training data to obtain the trained rating prediction model includes: Dividing the training data into a training set and a validation set; Based on the training set, an initial rating prediction model is trained; The validation set is input into the initial rating prediction model, and the average error is obtained based on the multiple first predicted ratings and corresponding ratings output by the rating prediction model. When the average error no longer decreases, it is considered that the current average error has reached stability, and a trained rating prediction model is obtained.
3. The method according to claim 1, characterized in that The method further comprises: Get user characteristics of the user and object characteristics of the object; For the user features and the object features, normalization processing is performed on the feature vectors belonging to continuous variables, and the feature vectors belonging to discrete variables are converted into one-hot vectors to obtain the feature vectors of the user and the feature vectors of the object.
4. The method according to claim 1, wherein The method further comprises: Obtain a one-hop subgraph corresponding to the second user and the second object, which do not have a subscription relationship; The one-hop subgraph corresponding to the second user and the second object is input into the rating prediction model to obtain the rating of the second user for the second object output by the rating prediction model.
5. A scoring prediction model training device, characterized in that: include: An establishment module is configured to establish a bipartite graph based on a feature vector of a user, a feature vector of an object, and a score of the object given by the user, wherein the nodes in the bipartite graph include a user node corresponding to the user and an object node corresponding to the object, an edge between the user node and the object node represents an ordering relationship between the user represented by the user node and the object represented by the object node, and the weight of the edge represents the score of the object given by the user; A data module is configured to obtain training data based on the bipartite graph, the training data comprising a one-hop subgraph of the first user node and the first object node in the bipartite graph, where an edge exists between the first user node and the first object node, and a weight of the edge corresponding to the one-hop subgraph; wherein the one-hop subgraph is a subset extracted from the bipartite graph and is one-hop adjacent to the first user node and the first object node; A training module is used to perform model training based on the training data to obtain the trained rating prediction model, wherein the rating prediction model is used to output the rating of the second user for the second object based on the one-hop subgraph corresponding to the second user and the second object that do not have a subscription relationship, wherein the rating prediction model includes a relational graph convolutional network, an aggregation layer and a multi-layer neural network; the relational graph convolutional network is used to traverse along the edge and accumulate the feature vector of the currently reached node according to different preset hop numbers for the user node corresponding to the second user until the object node corresponding to the second object is reached, thereby obtaining the accumulated feature vectors under different hop numbers; the accumulated feature vector includes a user feature vector and an object feature vector; the aggregation layer is used to aggregate the user feature vectors and the object feature vectors under different hop numbers to obtain the representation vector of the one-hop subgraph; the multi-layer neural network is used to output the corresponding rating based on the representation vector of the one-hop subgraph; An acquisition module, configured to extract, based on the user's order records, the cumulative order duration, the start time of the first order, and the end time of the last order for each object; The processing module is used to obtain the user's score for the object based on the cumulative ordering time, the start time of the first order and the end time of the last order, wherein the score reflects the continuity of the user's continuous ordering of the object.
6. The device according to claim 5, characterized in that The training module is specifically used to divide the training data into a training set and a validation set; The training module is further configured to train an initial score prediction model based on the training set; The training module is specifically used to input the verification set into the initial rating prediction model, and obtain the average error based on the multiple first predicted ratings and corresponding ratings output by the rating prediction model, until the average error no longer decreases, it is considered that the current average error has reached stability, and a trained rating prediction model is obtained.
7. The device according to claim 5, characterized in that The device further comprises: An acquisition module, used to acquire user features of a user and object features of an object; The processing module is used to normalize the feature vectors belonging to continuous variables for the user features and the object features, and convert the feature vectors belonging to discrete variables into one-hot vectors to obtain the feature vectors of the user and the object.
8. The device according to claim 5, characterized in that The device further comprises: An acquisition module, configured to acquire a one-hop subgraph corresponding to a second user and a second object that do not have a subscription relationship; A processing module is configured to input the one-hop subgraph corresponding to the second user and the second object into the rating prediction model to obtain a rating of the second user for the second object output by the rating prediction model.
9. An electronic device, characterized in that: include: a processor, and a memory communicatively connected to the processor; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory to implement the method according to any one of claims 1 to 4.
10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 4 when executed by a processor.
11. A computer program product, characterized in that The computer program product stores computer-executable instructions, which are used to implement the method according to any one of claims 1 to 4 when executed by a processor.
Citation Information
Patent Citations
Deep learning recommendation system and method based on graph model
CN112100486A
Recommendation model training method and device and recommendation method and device
CN114491263A