Model training and recommendation method, device, electronic device and storage medium
By obtaining feature data from different business scenarios for splicing and embedding representation, it is used to train the model tower, which solves the problem of poor model training results caused by single feature data, and achieves more efficient model training and recommendation accuracy.
Patent Information
- Application Number
- CN202210686951.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-16
- Publication Date
- 2025-06-06
- Estimated Expiration
- 2042-06-16
AI Technical Summary
During the training of existing models, the feature data is single, resulting in poor model training results, such as low accuracy of recommended videos.
By obtaining feature data from different business scenarios, splicing and embedding representations, rich splicing data are formed to train the model tower, thereby improving the effect of model training.
By using a multi-tower model and combining feature data from different business scenarios, the feature data of model training is enriched, and the effectiveness of model training and recommendation accuracy is improved.
Smart Images

Figure CN115080789B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent analysis technology, and in particular to a model training and recommendation method, device, electronic equipment and storage medium. Background Art
[0002] At present, multi-task learning based on neural networks is widely used in the industry. The feature data of neural network model training determines the effect of model training. The richer the feature data of model training, the better the effect of model training. In the existing model training process, for a business scenario, the feature data corresponding to this business scenario is used to train the model. This method may have the problem of a single feature data required for model training, resulting in poor effect of the trained model. For example, the model is used to recommend content to users, such as recommending videos, and the accuracy of the recommendations of the trained model is low. Summary of the invention
[0003] The purpose of the embodiments of the present invention is to provide a model training and recommendation method, device, electronic device and storage medium to improve the effect of model training. The specific technical solution is as follows:
[0004] In a first aspect of an embodiment of the present invention, a model training method is first provided, the method comprising:
[0005] Acquire first characteristic data of a first business scenario and second characteristic data of a second business scenario, wherein the business objectives of the first business scenario and the second business scenario are consistent;
[0006] Splicing the first feature data and the second feature data to obtain spliced data;
[0007] A first model tower corresponding to the first business scenario is trained based on the spliced data, and / or a second model tower corresponding to the second business scenario is trained based on the spliced data; the first model tower is used to sort the first content to be recommended and make recommendations based on the sorting results, and the second model tower is used to sort the second content to be recommended and make recommendations based on the sorting results.
[0008] Optionally, the splicing the first feature data and the second feature data to obtain spliced data includes:
[0009] embedding the first feature data and the second feature data into a representation;
[0010] The first feature data after the embedded representation and the second feature data after the embedded representation are concatenated to obtain concatenated data.
[0011] Optionally, the first business scenario is an intent recognition scenario; the second business scenario is a film library recommendation scenario;
[0012] The obtaining of first characteristic data of the first business scenario and second characteristic data of the second business scenario includes:
[0013] Obtaining query data in the intent recognition scenario and recommended data corresponding to the query data;
[0014] Obtaining user behavior data in the film library recommendation scenario;
[0015] The embedding the first feature data and the second feature data into a representation comprises:
[0016] The query data and the recommended data are respectively embedded and represented, and features of the embedded query data and the embedded recommended data are cross-referenced to obtain cross-reference features;
[0017] Embedding the user behavior data to obtain embedded user behavior data;
[0018] The step of splicing the first feature data after embedding the representation and the second feature data after embedding the representation to obtain spliced data includes:
[0019] splicing the user behavior data after embedding representation, the query data after embedding representation, and the cross-features to obtain the spliced data;
[0020] The training of the first model tower corresponding to the first business scenario based on the spliced data includes:
[0021] Training the intent tower corresponding to the intent recognition scenario based on the spliced data, where the intent tower corresponding to the intent recognition scenario is the first model tower;
[0022] The training of the second model tower corresponding to the second business scenario based on the spliced data includes:
[0023] A film library tower corresponding to the film library recommended scene is trained based on the spliced data, and the film library tower corresponding to the film library recommended scene is the second model tower.
[0024] Optionally, the method further includes: acquiring third feature data of a third business scenario;
[0025] concatenating the first characteristic data, the second characteristic data, and the third characteristic data;
[0026] Based on the data obtained by concatenating the first feature data, the second feature data and the third feature data, a third model tower corresponding to a third business scenario is trained.
[0027] Optionally, the training of a first model tower corresponding to the first business scenario based on the spliced data includes:
[0028] Inputting the spliced data into a first initial model, adjusting the parameters of the first initial model until a first preset training end condition is met, thereby obtaining a trained first model tower;
[0029] The training of the second model tower corresponding to the second business scenario based on the spliced data includes:
[0030] The spliced data is input into a second initial model, and the parameters of the second initial model are adjusted until a second preset training end condition is met, thereby obtaining a trained second model tower.
[0031] Optionally, the intent tower includes a first feature input layer, a first convolutional layer and a first output layer; the film library tower includes a second feature data layer, a second convolutional layer and a second output layer, wherein the first feature input layer and the second feature data layer are respectively connected to the first convolutional layer.
[0032] In a second aspect of the present invention, a recommendation method is also provided, the method comprising:
[0033] Get referral requests;
[0034] Input the recommendation request into a business model corresponding to a corresponding business scenario, and obtain a recommendation result for the recommendation request through the business model, wherein the corresponding business scenario represents a business scenario corresponding to the recommendation request; the business model is obtained through the model training method described in the first aspect above;
[0035] The recommendation result is pushed to the terminal.
[0036] In a third aspect of the present invention, a model training device is provided, comprising:
[0037] A first acquisition module, used to acquire first characteristic data of a first business scenario and second characteristic data of a second business scenario, wherein the business objectives of the first business scenario and the second business scenario are consistent;
[0038] A first splicing module, used for splicing the first feature data and the second feature data to obtain spliced data;
[0039] The first training module is used to train the first model tower corresponding to the first business scenario based on the spliced data, and / or to train the second model tower corresponding to the second business scenario based on the spliced data; the first model tower is used to sort the first content to be recommended and recommend it based on the sorting result, and the second model tower is used to sort the second content to be recommended and recommend it based on the sorting result.
[0040] Optionally, the splicing module is specifically used to embed the first feature data and the second feature data into a representation; and splice the first feature data after the embedded representation and the second feature data after the embedded representation to obtain spliced data.
[0041] Optionally, the first business scenario is an intent recognition scenario; the second business scenario is a film library recommendation scenario; wherein,
[0042] The first acquisition module is specifically used to acquire query data in the intent recognition scenario and recommendation data corresponding to the query data; and acquire user behavior data in the film library recommendation scenario;
[0043] The first splicing module is specifically used to embed the query data and the recommendation data respectively, and perform feature crossover on the embedded query data and the embedded recommendation data to obtain crossover features; embed the user behavior data to obtain embedded user behavior data; and splice the embedded user behavior data, the embedded query data, and the crossover features to obtain the spliced data;
[0044] The first training module is specifically used to train the intent tower corresponding to the intent recognition scenario based on the spliced data, and / or to train the film library tower corresponding to the film library recommendation scenario based on the spliced data; the intent tower corresponding to the intent recognition scenario is the first model tower, and the film library tower corresponding to the film library recommendation scenario is the second model tower.
[0045] Optionally, the device further includes: a second acquisition module, configured to acquire third feature data of a third business scenario;
[0046] A second splicing module, used for splicing the first feature data, the second feature data and the third feature data;
[0047] The second training module is used to train the third model tower corresponding to the third business scenario based on the data spliced from the first feature data, the second feature data and the third feature data.
[0048] Optionally, the first training module is specifically used to input the spliced data into a first initial model, adjust the parameters of the first initial model until a first preset training end condition is met, and obtain a trained first model tower; and / or input the spliced data into a second initial model, adjust the parameters of the second initial model until a second preset training end condition is met, and obtain a trained second model tower.
[0049] In a fourth aspect of the present invention, a recommendation device is provided, the device comprising:
[0050] A request acquisition module is used to obtain recommendation requests;
[0051] A recommendation result obtaining module, used for inputting a recommendation request into a business model corresponding to a corresponding business scenario, and obtaining a recommendation result for the recommendation request through the business model, wherein the corresponding business scenario represents a business scenario corresponding to the recommendation request; the business model is obtained through the model training device described in the third aspect above;
[0052] The push module is used to push the recommendation result to the terminal.
[0053] According to a fifth aspect of the present invention, there is also provided an electronic device, comprising: a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus.
[0054] Memory, used to store computer programs;
[0055] The processor is used to implement any method steps described in the first aspect or the second aspect when executing the program stored in the memory.
[0056] In another aspect of the implementation of the present invention, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the model training method described in the first aspect or the recommendation method described in the second aspect is implemented.
[0057] In another aspect of the implementation of the present invention, a computer program product comprising instructions is also provided, which, when executed on a computer, enables the computer to execute the model training method described in the first aspect or the recommendation method described in the second aspect.
[0058] A model training method provided by an embodiment of the present invention obtains first feature data of a first business scenario and second feature data of a second business scenario, wherein the business objectives of the first business scenario and the second business scenario are consistent, splices the first feature data and the second feature data to obtain spliced data, trains a first model tower corresponding to the first business scenario based on the spliced data, and / or trains a second model tower corresponding to the second business scenario based on the spliced data; the first model tower is used to sort the first content to be recommended and recommend it based on the sorting result, and the second model tower is used to sort the second content to be recommended and recommend it based on the sorting result. The feature data corresponding to different business scenarios are spliced, and model training is performed based on the spliced data. Since the model tower uses not only the feature data corresponding to the current business scenario but also the feature data corresponding to other business scenarios during the model training process, the feature data required for model training is enriched. The richer the feature data used for model training, the better the effect of model training, thereby improving the effect of model training, and improving the sorting effect of the model and the accuracy of recommendation. BRIEF DESCRIPTION OF THE DRAWINGS
[0059] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.
[0060] Figure 1 The present invention is a flowchart of a model training method in an embodiment of the present invention.
[0061] Figure 2a Another flow chart of the model training method in an embodiment of the present invention.
[0062] Figure 2b This is an example diagram of an application interface corresponding to an intent recognition scenario in an embodiment of the present invention.
[0063] Figure 2c This is an example diagram of an application interface corresponding to a film library recommendation scenario in an embodiment of the present invention.
[0064] Figure 2d Schematic diagram of the training process of the model training method in an embodiment of the present invention.
[0065] Figure 3 This is another flow chart of the model training method in an embodiment of the present invention.
[0066] Figure 4 The present invention is a flowchart of a method recommended in an embodiment of the present invention.
[0067] Figure 5 Schematic diagram of a structure of a model training device in an embodiment of the present invention.
[0068] Figure 6 Schematic diagram of another structure of the model training device in an embodiment of the present invention.
[0069] Figure 7 The figure is a schematic diagram of a structure of a device recommended in an embodiment of the present invention.
[0070] Figure 8 The figure is a schematic diagram of the structure of an electronic device in an embodiment of the present invention. DETAILED DESCRIPTION
[0071] The technical solutions in the embodiments of the present invention will be described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0072] In order to solve the problem of sparse model training data, such as single data, multi-task learning based on neural networks is widely used in business scenarios such as recommendation in the industry, such as the Entire Space Multi-task Model (ESMM) and the Multi-gate Mixture-of-Experts (MMOE) that model both click-through rate and conversion rate. A major feature of this multi-task learning sharing structure is that it performs multi-task learning for multiple tasks in the same business scenario. For example, click-through rate (CTR), conversion rate (CVR), and click-through & Conversion rate (CTCVR) are three different tasks, and there is a "linear" relationship between multiple tasks, that is, conversion must be clicked first. However, this method is not applicable to independent business scenarios, that is, different business scenarios. Due to the large differences in the underlying layers, there will be conflicts or noise during model training, resulting in poor learning model results, which cannot bring about improvements in business indicators and user experience.
[0073] Based on the commonalities and characteristics of different business requirements, the embodiments of the present invention can realize the sharing of features at the embedding layer, build independent deep learning networks for different business logics, achieve better data feature learning, and improve the effect of model training.
[0074] The model training method provided by the embodiment of the present invention is described in detail below. The model training method provided by the embodiment of the present invention can be applied to electronic devices. Among them, the electronic devices may include servers, terminals, etc. For example, the terminals may include mobile phones, computers, etc.
[0075] Figure 1 FIG. 1 is a flow chart of a model training method in an embodiment of the present invention. Figure 1 As shown, the following steps are included:
[0076] Step S101, obtaining first characteristic data of a first business scenario and second characteristic data of a second business scenario.
[0077] Among them, the business scenario is that enterprises and merchants need to provide consumers with products or services that may be needed and related in a timely manner at a specific stage of the user, such as intent recognition scenarios and film library recommendation scenarios in video recommendation scenarios.
[0078] Feature data is data that is specific to a business scenario, such as the content data that the user searches for in the search box in the intent recognition scenario. There is an association between the first business scenario and the second business scenario, and the business goals are consistent. For example, the business goals of the intent recognition scenario and the film library recommendation scenario both include recommending videos to users. When a user makes a request operation on an electronic device, the electronic device obtains the user request data, and this user request data is the feature data under the corresponding business scenario.
[0079] The first business scenario and the second business scenario are related business scenarios. Specifically, the business objectives of the first business scenario and the second business scenario are consistent. For example, the first business scenario and the second business scenario are both scenarios for recommending content to users, and so on.
[0080] Step S102: splicing the first feature data and the second feature data to obtain spliced data.
[0081] Splicing the first feature data and the second feature data can also be understood as combining the first feature data and the second feature data. In one implementation, the first feature data and the second feature data can be embedded and represented; the embedded first feature data and the embedded second feature data are spliced to obtain spliced data.
[0082] The embedding representation is a dense vector representation, which can be simply understood as encoding the first feature data and the second feature data respectively. In one implementation, the first feature data and the second feature data can be embedded through an embedding layer.
[0083] Step S103: training a first model tower corresponding to a first business scenario based on the spliced data, and / or training a second model tower corresponding to a second business scenario based on the spliced data.
[0084] The first model tower is used to sort the first content to be recommended and recommend it according to the sorting result, and the second model tower is used to sort the second content to be recommended and recommend it according to the sorting result. The first content to be recommended and the second content to be recommended can be the same or different. For example, the first content to be recommended includes video 1, video 2 and video 3; the second content to be recommended can also include video 1, video 2 and video 3, or the second content to be recommended includes video 4, video 5, video 6 and video 7, etc.
[0085] In an embodiment of the present invention, a first model tower corresponding to a first business scenario can be trained based only on the spliced data, or a second model tower corresponding to a second business scenario can be trained based on the spliced data, or both the first model tower corresponding to the first business scenario can be trained based on the spliced data and the second model tower corresponding to the second business scenario can be trained based on the spliced data.
[0086] In step S103, training a first model tower corresponding to a first business scenario based on the spliced data may include: inputting the spliced data into a first initial model, adjusting the parameters of the first initial model until a first preset training end condition is met, and obtaining a trained first model tower. Training a second model tower corresponding to a second business scenario based on the spliced data may include: inputting the spliced data into a second initial model, adjusting the parameters of the second initial model until a second preset training end condition is met, and obtaining a trained second model tower.
[0087] The first initial model may be a model in which the feature data corresponding to different business scenarios are not spliced, and the feature layer of the model only contains the feature data corresponding to the current business scenario. The type of the first initial model may be a deep neural network model (Deep Neural Networks, DNN), a convolutional neural network model (Convolutional Neural Networks, CNN), etc. The second initial model is similar to the first initial model.
[0088] After the spliced data is input into the initial model, the initial model is adjusted. It can be started from the parameters that have a greater impact on the model training, while fixing other parameters. After obtaining a result, other parameters are adjusted based on this result until the model training meets the preset end condition. Among them, the preset end condition can be the preset accuracy of the model training. When the result of the model training reaches this accuracy, the model training ends. For example, the preset accuracy can be 99.9%, or it can also be that the number of training iterations reaches a preset number. The preset number can be determined according to actual needs or experience.
[0089] In an embodiment of the present invention, by obtaining first feature data of a first business scenario and second feature data of a second business scenario, wherein the business objectives of the first business scenario and the second business scenario are consistent, the first feature data and the second feature data are spliced to obtain spliced data, and the first model tower corresponding to the first business scenario is trained based on the spliced data, and / or the second model tower corresponding to the second business scenario is trained based on the spliced data; the first model tower is used to sort the first content to be recommended and recommend it based on the sorting result, and the second model tower is used to sort the second content to be recommended and recommend it based on the sorting result. The feature data corresponding to different business scenarios are spliced, and model training is performed based on the spliced data. Since the model tower uses not only the feature data corresponding to the current business scenario but also the feature data corresponding to other business scenarios during the model training process, the feature data required for model training is enriched. The richer the feature data used for model training, the better the effect of model training, which can improve the effect of model training, and can improve the sorting effect of the model and the accuracy of recommendation.
[0090] In an optional embodiment, the first business scenario may be an intent recognition scenario, and the second business scenario may be a film library recommendation scenario.
[0091] The intent recognition scenario and the film library recommendation scenario are independent of each other. A major feature of the existing task learning sharing structure is that it can bring good results in scenarios where the tasks are relatively similar or highly correlated. For example, the Entire Space Multi-task Mode (ESMM) that models based on click-through rate and conversion rate at the same time, a multi-task learning structure: Multi-gate Mixture-of-Experts (MMOE), the above ESMM, is in the same business scenario, the business goal click-through rate and conversion rate are correlated, if the user is interested after clicking, he will place an order to buy. However, for different business scenarios, this multi-task learning sharing structure cannot be reused. For example, intent recognition is a business that provides multiple video combination cards for user general demand queries, involving long videos and short videos, and uses Gradient Boosting Decision Tree (GBDT) for sorting. Film library recommendation is a scenario that provides users with personalized long video recommendations within a specified channel, and can guide user consumption by filtering tags, using Deep Interest Network (DIN) for sorting.
[0092] At present, the intent recognition sorting uses the traditional tree model, which does not take into account the user's historical behavior and interests, has insufficient personalization capabilities, and tends to sort popular results. However, the deep DIN model has been used in the film library scenario. After multiple optimization iterations, it has better modeled user behavior and interests and has a good personalization effect. Based on the commonalities and respective characteristics of intent recognition and film library personalized recommendation in business, the embodiment of the present invention proposes a multi-tower model that can support multiple business scenarios. Multiple towers are used during model training, with each business corresponding to a tower. The film library business scenario corresponds to the film library tower, and the intent recognition business scenario corresponds to the intent tower. The model corresponding to the intent scenario can also use the feature data of the film library recommendation scenario during training to achieve better data learning and improve the effect of model training.
[0093] Figure 2a FIG. 1 is another flow chart of the model training method in an embodiment of the present invention. Figure 2a As shown, the following steps are included:
[0094] Step S201, obtaining query data in an intent recognition scenario and recommendation data corresponding to the query data; obtaining user behavior data in a film library recommendation scenario.
[0095] Step S202, embedding the query data and the recommendation data respectively, and performing feature crossover on the embedded query data and the embedded recommendation data to obtain crossover features; embedding the user behavior data to obtain embedded user behavior data.
[0096] Step S203, concatenating the user behavior data after embedding the representation, the query data after embedding the representation, and the cross-features to obtain concatenated data.
[0097] Step S204: training an intent tower corresponding to an intent recognition scene based on the spliced data, and / or training a film library tower corresponding to a film library recommendation scene based on the spliced data.
[0098] The intent tower corresponding to the intent recognition scenario is the first model tower, and the film library tower corresponding to the film library recommendation scenario is the second model tower.
[0099] In step S201, the query data in the intent recognition scenario may be the content that the user searches for in the search box corresponding to the intent recognition scenario, and the recommended data may be the results recommended by the intent tower based on the content that the user searches for. Figure 2b As shown in the figure, it is a schematic diagram of the user terminal interface in the intent recognition scenario. The user enters "American drama" in the search box. The intent tower scores the recommended videos according to the "American drama" searched by the user, and displays the N recommended videos with high scores on the terminal interface for the user to choose. N is a positive integer greater than 1, and the value of N can be customized according to actual needs. Figure 2bIn the example, recommended video 1, recommended video 2, recommended video 3, and recommended video 4 are displayed on the terminal interface. The user can further click the "Click to view more recommended videos" button at the bottom of the interface to view more recommended videos.
[0100] The user behavior data in the movie library recommendation scenario can be the user's historical playback and search behavior data, such as the user's historical playback / search behavior sequence, the user's historical playback times, playback duration, click-through rate, etc., or the user's behavior data for filtering by tags in a specified channel. Specifically, Figure 2c As shown in the figure, it is a schematic diagram of the user terminal interface in the scenario of movie library recommendation. The user filters the TV series channel according to the labels such as "comprehensive sorting", "all regions", "all types", "all years", "paid", etc. The movie library tower scores the recommended videos according to the labels filtered by the user, and displays the recommended videos in the terminal interface in descending order of scores for the user to choose. Figure 2c In the example, recommended videos 1, 2, 3 and 4 are displayed on the terminal interface. Users can slide the interface to view all recommended videos. Users can also click the "Back" button to filter in other channels, such as movies and variety shows.
[0101] In step S202, feature crossover may be multiplying two or more features, for example, multiplying specific content data searched by the user in the intent recognition scenario with recommended data recommended based on the specific content searched to perform feature crossover to obtain a crossover feature.
[0102] In step S204, the spliced data can be input into an initial model, and the parameters of the initial model can be adjusted to train the intention tower. Similarly, the spliced data can be input into another initial model, and the parameters of the other initial model can be adjusted to train the film library tower. The specific training process is as follows: Figure 1 This has been described in detail in the illustrated embodiment and will not be repeated here.
[0103] In one implementation, the intent tower may include a first feature input layer, a first convolutional layer, and a first output layer; the library tower may include a second feature data layer, a second convolutional layer, and a second output layer, wherein the first feature input layer and the second feature data layer are respectively connected to the first convolutional layer. The concatenated data is input into the feature layer, and the concatenated data of the feature layer is input into the convolutional layer for model training, such as Figure 2d As shown, the feature data in the feature layer of the film library tower is input into the three-layer convolutional layer to train the film library tower, and the feature data in the feature layer of the film library tower and the feature data in the feature layer of the intent tower are input into the three-layer convolutional layer to train the intent tower. Figure 2d In the above, the feature data corresponding to the recommended scenes in the film library is input into the feature layer of the film library tower, such as Figure 2dAs shown in the “Shard feature & embedding layer”, the query data and cross-feature data in the intent recognition scenario are input into the feature layer of the intent tower, such as inputting the query data into the “Query embed” in the figure, and inputting the cross-feature data into the “Query & target Cross” in the figure.
[0104] In the embodiment of the present invention, in the scenario of personalized recommendation of long videos on a designated channel, intent recognition and film library recommendation have business relevance, and user general intent queries, such as "Andy Lau movies" and "time-travel dramas", can be converted into the form of filtering tags + channels. Therefore, when training the intent tower, the feature data corresponding to the film library recommendation scenario can be directly reused, that is, when training the intent tower, in addition to using the feature data corresponding to the intent recognition scenario, the feature data corresponding to the film library recommendation scenario can also be used. The features in the intent recognition scenario are enriched, and the effect of intent tower training can be improved. In addition, intent recognition and film library recommendation are two different businesses. In the embodiment of the present invention, since the feature data corresponding to the film library recommendation scenario can be directly reused when training the intent tower, a set of model training interfaces can be shared when training the model based on these two business scenarios, thereby reducing labor costs.
[0105] Due to the consistency of the business objectives of the intent recognition scenario and the film library recommendation scenario, the embodiment of the present invention can realize feature sharing when constructing the dual-tower model, which can save data computing resources on the one hand; on the other hand, it improves the accuracy of the models trained for different business scenarios. When the trained models are used for sorting and recommendations are made based on the sorting results, the recommendation effects of different business scenarios can be improved. For example, when the intent tower sorts the recommended videos, it will score the recommended videos, and the video results with high scores will be displayed to the user. This can not only recommend videos that users like more, improve the user experience, but also increase the length of time users stay in the application software using this model.
[0106] Figure 3 FIG. 4 is another flow chart of the model training method in the embodiment of the present invention. Figure 3 As shown, the following steps are included:
[0107] Step S301, obtaining first characteristic data of a first business scenario and second characteristic data of a second business scenario.
[0108] Step S302, obtaining third characteristic data of a third business scenario.
[0109] Step S303, concatenating the first feature data, the second feature data and the third feature data to obtain concatenated data.
[0110] The spliced data mentioned here refers to the data obtained by splicing the first feature data, the second feature data and the third feature data.
[0111] Step S304: training a first model tower corresponding to the first business scenario based on the spliced data, and / or training a second model tower corresponding to the second business scenario based on the spliced data.
[0112] Step S305: training a third model tower corresponding to a third business scenario based on the spliced data.
[0113] In step S302, when a new business scenario is added, third characteristic data of the third business scenario is obtained. The third business scenario may be associated with both the first business scenario and the second business scenario, or may be associated with the first business scenario or the second business scenario, and the association may be consistent in business objectives.
[0114] In step S303, the first feature data, the second feature data and the third feature data may be embedded and represented, and the embedded first feature data, the embedded second feature data and the embedded third feature data may be concatenated to obtain concatenated data.
[0115] Among them, splicing the feature data of the three business scenarios can be to first splice the first feature data with the second feature data and then splice them with the third feature data, or it can be to splice the second feature data with the third feature data and then splice them with the first feature data, etc.
[0116] In step S304, the feature data required for training the first model tower and the second model tower may include the third feature data. The training process of the first model tower and the second model tower is as described above. Figure 1 This has been described in detail in the illustrated embodiment and will not be repeated here.
[0117] In step S305, the feature data required for training the third model tower corresponding to the third business scenario may include the first feature data and / or the second feature data. The spliced data may be input into the third initial model, and the third initial model may be adjusted until the third preset training end condition is met to obtain a trained third model tower. The specific training process of the third model tower is the same as Figure 1 In the illustrated embodiment, the training process for the first model tower and the second model tower is similar and will not be described in detail here.
[0118] In an embodiment of the present invention, a new third business scenario is added, third feature data of the third business scenario is obtained, the first feature data, the second feature data and the third feature data are spliced to obtain spliced data, and a third model tower corresponding to the third business scenario is trained based on the spliced data without the need to redesign a set of model architectures. Feature sharing can be achieved when constructing the model tower, which saves data computing resources while improving the effects of model training corresponding to different business scenarios.
[0119] Figure 4 FIG. 1 is a flow chart of a method recommended in an embodiment of the present invention. Figure 4 As shown, the following steps are included:
[0120] Step S401, obtaining a recommendation request.
[0121] Step S402, input the recommendation request into the business model corresponding to the corresponding business scenario, and obtain the recommendation result for the recommendation request through the business model, where the corresponding business scenario represents the business scenario corresponding to the recommendation request; the business model is obtained through any of the above-mentioned model training methods.
[0122] Step S403: push the recommendation result to the terminal.
[0123] The execution subject of the embodiment of the present invention may be an electronic device, specifically a server deployed with a trained business model.
[0124] In step S401, the recommendation request may be a request triggered by a user on a terminal. When the user triggers the recommendation request on the terminal, the server may receive the recommendation request.
[0125] The recommendation request can be the specific content that the user searches for in the search box of the terminal, or it can be the user's historical playback / search behavior sequence, the user's historical playback times, playback duration, click-through rate, etc., or it can be the user's behavior data filtered by tags in a specified channel.
[0126] In step S402, in one method, the business model corresponding to the business scenario can be deployed in the form of a model tower, that is, similar to the model training process, different business scenarios correspond to different model towers, and multiple model towers share the bottom layer. The specific deployment refers to the structure of the model tower in the model training process, which will not be repeated here.
[0127] In another way, the business model corresponding to the business scenario can also be deployed separately, that is, deployed as a single task, and different business scenarios correspond to different business models.
[0128] The corresponding business scenarios can be intent recognition scenarios and film library recommendation scenarios. For example, when a user searches for "American drama" in the search box under the intent recognition scenario, the business model will recommend corresponding videos based on the "American drama" searched by the user. The business model uses not only the feature data corresponding to this business scenario but also the feature data corresponding to the film library recommendation scenario during model training.
[0129] In step S403, the recommendation result is pushed to the terminal, and specifically, the recommendation result is pushed to the client, and the client may be the terminal used by the user.
[0130] The recommendation results may be displayed in a window of a terminal used by the user for the user to make further selections.
[0131] In the embodiment of the present invention, the business models corresponding to different business scenarios can realize feature data sharing during model training, enriching the feature data required for model training and improving the effect of model training. For recommendation requests, the business model will score and sort the recommended videos, and display the high-scoring video results to the terminal, so that users can get more accurate and personalized results through the terminal, achieving the purpose of improving user experience. Since feature data can be shared, while saving data computing resources, it can also improve the recommendation effect of different business scenarios.
[0132] In the recommendation method provided by the embodiment of the present invention, since the business model not only uses the feature data corresponding to the current business scenario but also uses the feature data corresponding to other business scenarios during the model training process, the feature data required for model training is enriched. The richer the feature data used for model training, the better the effect of model training. Therefore, for recommendation requests, the business model corresponding to the corresponding business scenario can obtain more accurate and personalized results, thereby improving the user experience.
[0133] Figure 5 FIG. 1 is a schematic diagram of a structure of a model training device in an embodiment of the present invention. Figure 5 The device includes: a first acquisition module 501, a first splicing module 502 and a first training module 503, wherein:
[0134] The first acquisition module 501 is used to acquire first characteristic data of a first business scenario and second characteristic data of a second business scenario, wherein the business objectives of the first business scenario and the second business scenario are consistent.
[0135] The first splicing module 502 is used to splice the first feature data and the second feature data to obtain spliced data.
[0136] The first training module 503 is used to train a first model tower corresponding to a first business scenario based on the spliced data, and / or to train a second model tower corresponding to a second business scenario based on the spliced data; the first model tower is used to sort the first content to be recommended and make recommendations based on the sorting results, and the second model tower is used to sort the second content to be recommended and make recommendations based on the sorting results.
[0137] In an embodiment of the present invention, first feature data of a first business scenario and second feature data of a second business scenario are acquired through a first acquisition module 501, a first splicing module 502 splices the first feature data and the second feature data to obtain spliced data, a first training module 503 trains a first model tower corresponding to the first business scenario based on the spliced data, and / or trains a second model tower corresponding to the second business scenario based on the spliced data, and the feature data corresponding to different business scenarios are spliced, thereby enriching the features of the model training and improving the effect of the model training.
[0138] Optionally, the first splicing module 502 is specifically used to embed the first feature data and the second feature data into a representation; and splice the embedded first feature data and the embedded second feature data to obtain spliced data.
[0139] Optionally, the first business scenario is an intent recognition scenario; the second business scenario is a film library recommendation scenario;
[0140] The first acquisition module 501 is specifically used to acquire query data in an intent recognition scenario and recommendation data corresponding to the query data; and acquire user behavior data in a film library recommendation scenario;
[0141] The first splicing module 502 is specifically used to embed the query data and the recommendation data respectively, and perform feature crossover on the embedded query data and the embedded recommendation data to obtain crossover features; embed the user behavior data to obtain embedded user behavior data; and splice the embedded user behavior data, the embedded query data, and the crossover features to obtain spliced data;
[0142] The first training module 503 is specifically used to train an intent tower corresponding to an intent recognition scenario based on the spliced data, and / or to train a film library tower corresponding to a film library recommendation scenario based on the spliced data; the intent tower corresponding to the intent recognition scenario is the first model tower, and the film library tower corresponding to the film library recommendation scenario is the second model tower.
[0143] Alternatively, if Figure 6 As shown, the model training device also includes: a second acquisition module 601, a second splicing module 602 and a second training module 603, wherein:
[0144] The second acquisition module 601 is used to acquire third characteristic data of a third business scenario;
[0145] A second splicing module 602, used to splice the first feature data, the second feature data and the third feature data;
[0146] The second training module 603 is used to train a third model tower corresponding to a third business scenario based on data obtained by splicing the first feature data, the second feature data and the third feature data.
[0147] Optionally, the first training module 501 is specifically used to input the spliced data into the first initial model, adjust the parameters of the first initial model until the first preset training end condition is met, and obtain a trained first model tower, and / or input the spliced data into the second initial model, adjust the parameters of the second initial model until the second preset training end condition is met, and obtain a trained second model tower.
[0148] Figure 7 Schematic diagram of a structure of a device recommended in an embodiment of the present invention. Figure 7 The device includes: a request acquisition module 701, a recommendation result acquisition module 702 and a push module 703.
[0149] The request acquisition module 701 is used to acquire a recommendation request.
[0150] The recommendation result obtaining module 702 is used to input the recommendation request into the business model corresponding to the corresponding business scenario, and obtain the recommendation result for the recommendation request through the business model. The corresponding business scenario represents the business scenario corresponding to the recommendation request; the business model is obtained through any of the above-mentioned model training methods.
[0151] The push module 703 is used to push the recommendation results to the terminal.
[0152] In the embodiment of the present invention, since the business model not only uses the feature data corresponding to the current business scenario but also uses the feature data corresponding to other business scenarios during the model training process, the feature data required for model training is enriched. The richer the feature data used for model training, the better the effect of model training. Therefore, for recommendation requests, the business model corresponding to the corresponding business scenario can push more accurate and personalized results to the terminal, thereby improving user experience.
[0153] The embodiment of the present invention further provides an electronic device, such as Figure 8 As shown, it includes a processor 801, a communication interface 802, a memory 803 and a communication bus 804, wherein the processor 801, the communication interface 802, and the memory 803 communicate with each other through the communication bus 804.
[0154] Memory 803, used for storing computer programs;
[0155] The processor 801 is used to implement the method steps of the above-mentioned model training method or recommendation method when executing the program stored in the memory 803.
[0156] The communication bus mentioned in the above terminal can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0157] The communication interface is used for communication between the above terminal and other devices.
[0158] The memory may include a random access memory (RAM) or a non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.
[0159] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0160] In another embodiment provided by the present invention, a computer-readable storage medium is also provided, in which a computer program is stored. When the computer program is executed by a processor, the model training method described in any one of the above embodiments is implemented.
[0161] In another embodiment provided by the present invention, a computer program product comprising instructions is also provided, which, when executed on a computer, enables the computer to execute the model training method described in any one of the above embodiments.
[0162] In another embodiment of the present invention, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, the recommendation method described in any one of the above embodiments is implemented.
[0163] In another embodiment of the present invention, a computer program product including instructions is provided. When the computer program product is run on a computer, the computer executes any of the recommendation methods described in the above embodiments.
[0164] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented by software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present invention is generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium. For example, the computer instructions can be transmitted from a website site, computer, server or data center to another website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium can be a magnetic medium (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state hard disk Solid State Disk (SSD)), etc.
[0165] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0166] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, electronic device and storage medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0167] The above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention are included in the protection scope of the present invention.
Claims
1. A model training method, It is characterized in that The method comprises: Acquire first characteristic data of a first business scenario and second characteristic data of a second business scenario, wherein the business objectives of the first business scenario and the second business scenario are consistent; the first business scenario is an intent recognition scenario; the second business scenario is a film library recommendation scenario, and the intent recognition scenario and the film library recommendation scenario are independent of each other; the acquiring of the first characteristic data of the first business scenario and the second characteristic data of the second business scenario includes: acquiring query data in the intent recognition scenario and recommendation data corresponding to the query data; acquiring user behavior data in the film library recommendation scenario; Splicing the first feature data and the second feature data to obtain spliced data; Training a first model tower corresponding to the first business scenario based on the spliced data, and / or training a second model tower corresponding to the second business scenario based on the spliced data; the first model tower is used to sort the first content to be recommended and recommend it according to the sorting result, and the second model tower is used to sort the second content to be recommended and recommend it according to the sorting result, wherein the training of the first model tower corresponding to the first business scenario based on the spliced data includes: training the intent tower corresponding to the intent recognition scenario based on the spliced data, the intent tower corresponding to the intent recognition scenario is the first model tower; the training of the second model tower corresponding to the second business scenario based on the spliced data includes: training the film library tower corresponding to the film library recommendation scenario based on the spliced data, the film library tower corresponding to the film library recommendation scenario is the second model tower; The step of splicing the first feature data and the second feature data to obtain spliced data includes: The query data and the recommended data are respectively embedded and represented, and the embedded query data and the embedded recommended data are multiplied to perform feature crossover to obtain crossover features; Embedding the user behavior data to obtain embedded user behavior data; splicing the user behavior data after embedding representation, the query data after embedding representation, and the cross-features to obtain the spliced data; The intention tower includes a first feature input layer, a first convolutional layer and a first output layer; the film library tower includes a second feature data layer, a second convolutional layer and a second output layer, wherein the first feature input layer and the second feature data layer are respectively connected to the first convolutional layer.
2. The method according to claim 1, It is characterized in that The method further includes: acquiring third characteristic data of a third business scenario; concatenating the first feature data, the second feature data, and the third feature data; Based on the data obtained by splicing the first feature data, the second feature data and the third feature data, train a third model tower corresponding to the third business scenario.
3. The method according to claim 1, It is characterized in that The training of the first model tower corresponding to the first business scenario based on the spliced data includes: Inputting the spliced data into a first initial model, adjusting the parameters of the first initial model until a first preset training end condition is met, and obtaining a trained first model tower; The training of the second model tower corresponding to the second business scenario based on the spliced data includes: The spliced data is input into a second initial model, and the parameters of the second initial model are adjusted until a second preset training end condition is met, thereby obtaining a trained second model tower.
4. A recommendation method, It is characterized in that The method comprises: Get referral requests; Input the recommendation request into a business model corresponding to a corresponding business scenario, and obtain a recommendation result for the recommendation request through the business model, wherein the corresponding business scenario represents a business scenario corresponding to the recommendation request; the business model is obtained through the model training method according to any one of claims 1 to 3 above; The recommendation result is pushed to the terminal.
5. A model training device, It is characterized in that The device comprises: A first acquisition module is used to acquire first feature data of a first business scenario and second feature data of a second business scenario, wherein the business objectives of the first business scenario and the second business scenario are consistent; the first business scenario is an intent recognition scenario; the second business scenario is a film library recommendation scenario, and the intent recognition scenario and the film library recommendation scenario are independent of each other; the acquisition of the first feature data of the first business scenario and the second feature data of the second business scenario includes: acquiring query data in the intent recognition scenario and recommendation data corresponding to the query data; acquiring user behavior data in the film library recommendation scenario; A first splicing module, used for splicing the first feature data and the second feature data to obtain spliced data; A first training module is used to train a first model tower corresponding to the first business scenario based on the spliced data, and / or to train a second model tower corresponding to the second business scenario based on the spliced data; the first model tower is used to sort the first content to be recommended and recommend it according to the sorting result, and the second model tower is used to sort the second content to be recommended and recommend it according to the sorting result, wherein the training of the first model tower corresponding to the first business scenario based on the spliced data includes: training the intent tower corresponding to the intent recognition scenario based on the spliced data, and the intent tower corresponding to the intent recognition scenario is the first model tower; the training of the second model tower corresponding to the second business scenario based on the spliced data includes: training the film library tower corresponding to the film library recommendation scenario based on the spliced data, and the film library tower corresponding to the film library recommendation scenario is the second model tower; The first concatenation module is specifically used to embed the query data and the recommendation data respectively, and multiply the embedded query data and the embedded recommendation data to perform feature crossover to obtain crossover features; embed the user behavior data to obtain embedded user behavior data; and concatenate the embedded user behavior data, the embedded query data, and the crossover features to obtain the concatenated data; The intention tower includes a first feature input layer, a first convolutional layer and a first output layer; the film library tower includes a second feature data layer, a second convolutional layer and a second output layer, wherein the first feature input layer and the second feature data layer are respectively connected to the first convolutional layer.
6. A recommended device, It is characterized in that The device comprises: A request acquisition module is used to obtain recommendation requests; A recommendation result obtaining module, used for inputting the recommendation request into a business model corresponding to a corresponding business scenario, and obtaining a recommendation result for the recommendation request through the business model, wherein the corresponding business scenario represents a business scenario corresponding to the recommendation request; the business model is obtained through the model training device described in claim 5 above; The push module is used to push the recommendation result to the terminal.
7. An electronic device, It is characterized in that It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor is used to implement the method steps described in any one of claims 1-3 or 4 when executing a program stored in a memory.
8. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1 to 3 or 4 are implemented.
Citation Information
Patent Citations
Information recommendation model training method and device
CN110297970A
Content recommendation and sorting model training method and device, equipment and storage medium
CN114036398A