Model training method, recommendation method, device, electronic device and storage medium

By using the first model to screen the subset of features to train the second model, the resource waste and response delay problems caused by feature explosion in the recommendation system are solved, and more efficient recommendation effects and resource utilization are achieved.

CN114117198BActive Publication Date: 2025-04-25BEIJING SHAREIT INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202111225950.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-10-21
Publication Date
2025-04-25
Estimated Expiration
2041-10-21

AI Technical Summary

Technical Problem

In the face of massive data, existing recommendation systems are difficult to effectively utilize features, resulting in features explosions, waste of computing resources, response delays and increased labor costs.

Method used

By using the trained first model, the subset of features with the greatest impact on its weight is selected as an online training sample for training the second model. The method includes receiving feature filtering parameters sent by the first model, selecting online training samples corresponding to N features, and training the second model online with the first predicted value and the online training sample as training data.

Benefits of technology

This method effectively reduces the number of features input from the second model, saves machine resources, reduces response delay and labor costs, and improves the accuracy of the output probability value when recommended.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114117198B_ABST
    Figure CN114117198B_ABST
Patent Text Reader

Abstract

The present disclosure is about a model training method, a recommendation method, an apparatus, an electronic device and a storage medium, the method comprising: receiving a feature screening parameter sent by a first model, wherein the feature screening parameter indicates: the N features of the M features of the offline training sample that have the greatest influence on the weight of the first model; the M is greater than the N, and the N is a positive integer greater than or equal to 1, and the M is a positive integer greater than or equal to 2; according to the feature screening parameter, selecting the online training samples corresponding to the N features; obtaining the first prediction value output by the first model based on the online training sample; and online training the second model using the first prediction value and the online training sample as training data. The method of the embodiment of the present disclosure is conducive to improving the accuracy of the output probability value during recommendation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of data processing technology, and in particular to a model training method, a recommendation method, a device, an electronic device and a storage medium. Background Art

[0002] With the rapid development of information, the amount of data has also increased exponentially, and people have become helpless in the face of massive data. It is precisely to solve the problem of information explosion that the recommendation system came into being. Recommendation is essentially a kind of information processing logic. After obtaining the interaction information between users and content, all information (features) are processed according to a certain logic (model) to generate recommendation results. In order to obtain better recommendation results, it is inseparable from the training of the model. Summary of the invention

[0003] The present disclosure provides a model training method, a recommendation method, an apparatus, an electronic device and a storage medium.

[0004] According to a first aspect of an embodiment of the present disclosure, a model training method is provided, the method comprising:

[0005] Receive a feature screening parameter sent by a first model, wherein the first model is trained offline using an offline training sample and label data of the offline training sample, wherein the feature screening parameter indicates: N features of the M features of the offline training sample that have the greatest impact on the weight of the first model; M is greater than N, and N is a positive integer greater than or equal to 1, and M is a positive integer greater than or equal to 2;

[0006] Selecting online training samples corresponding to the N features according to the feature screening parameters;

[0007] Obtaining a first prediction value output by the first model based on the online training sample;

[0008] The second model is trained online using the first predicted value and the online training sample as training data.

[0009] In some embodiments, the features in the offline training samples and / or the online training samples include at least one of the following: image features, video features, and user features.

[0010] In some embodiments, the online training of the second model using the first prediction value and the online training sample as training data includes:

[0011] Obtaining a second prediction value output by the second model based on the online training sample;

[0012] Determining the loss of the second model according to the label data of the online training sample and the second prediction value;

[0013] determining a distillation loss according to the first predicted value and the second predicted value;

[0014] The network parameters of the second model are updated according to the loss of the second model, the distillation loss and the loss ratio.

[0015] In some embodiments, determining the distillation loss according to the first predicted value and the second predicted value includes:

[0016] Obtaining a regression value of the first predicted value; wherein the regression value of the first predicted value is a value obtained by performing a logistic regression process on the first predicted value;

[0017] Performing logistic regression processing on the second predicted value to obtain a regression value of the second predicted value;

[0018] The distillation loss is determined according to the regression value of the first predicted value and the regression value of the second predicted value.

[0019] According to a second aspect of an embodiment of the present disclosure, a recommendation method is provided, the method comprising:

[0020] Obtain a second model obtained by the model training method described in the embodiment of the first aspect;

[0021] According to the feature screening parameters sent by the first model, target features corresponding to N features are selected from content features of the content to be recommended and user features of the target user;

[0022] Inputting the online target features corresponding to the N features into the second model to obtain a probability value output by the second model;

[0023] According to the probability value, it is determined whether to recommend the content to be recommended to the target user.

[0024] According to a third aspect of an embodiment of the present disclosure, a model training device is provided, the device comprising:

[0025] A first acquisition module is used to receive a feature screening parameter sent by a first model, wherein the first model is trained offline using an offline training sample and label data of the offline training sample, wherein the feature screening parameter indicates: N features of the M features of the offline training sample that have the greatest influence on the weight of the first model; M is greater than N, and N is a positive integer greater than or equal to 1, and M is a positive integer greater than or equal to 2;

[0026] A first selection module, configured to select online training samples corresponding to the N features according to the feature screening parameters;

[0027] A second acquisition module, used to acquire a first prediction value output by the first model based on the online training sample;

[0028] A training module is used to train a second model online using the first prediction value and the online training sample as training data.

[0029] In some embodiments, the features in the offline training samples and / or the online training samples include at least one of the following: image features, video features, and user features.

[0030] In some embodiments, the training module is further used to:

[0031] Obtaining a second prediction value output by the second model based on the online training sample;

[0032] Determining the loss of the second model according to the label data of the online training sample and the second prediction value;

[0033] determining a distillation loss according to the first predicted value and the second predicted value;

[0034] The network parameters of the second model are updated according to the loss of the second model, the distillation loss and the loss ratio.

[0035] In some embodiments, the training module is further used to:

[0036] Obtaining a regression value of the first predicted value; wherein the regression value of the first predicted value is a value obtained by performing a logistic regression process on the first predicted value;

[0037] Performing logistic regression processing on the second predicted value to obtain a regression value of the second predicted value;

[0038] The distillation loss is determined according to the regression value of the first predicted value and the regression value of the second predicted value.

[0039] According to a fourth aspect of an embodiment of the present disclosure, a recommendation device is provided, the device comprising:

[0040] A third acquisition module, used to acquire a second model obtained by the model training method described in the embodiment of the first aspect;

[0041] A second selection module is used to select target features corresponding to N features from content features of the content to be recommended and user features of the target user according to the feature screening parameters sent by the first model;

[0042] A calculation module, used for inputting the online target features corresponding to the N features into the second model to obtain a probability value output by the second model;

[0043] A recommendation module is used to determine whether to recommend the content to be recommended to the target user according to the probability value.

[0044] According to a fifth aspect of an embodiment of the present disclosure, there is provided an electronic device, comprising a processor, a memory, and an executable program stored in the memory and capable of being run by the processor, wherein when the processor runs the executable program, the processor executes the steps of the model training method described in the embodiment of the first aspect, or the steps of the recommendation method described in the embodiment of the second aspect.

[0045] According to the sixth aspect of the embodiments of the present disclosure, a storage medium is provided, on which an executable program is stored, characterized in that when the executable program is executed by a processor, the steps of the model training method described in the first aspect embodiment, or the steps of the recommendation method described in the second aspect embodiment are implemented.

[0046] The technical solution provided by the embodiments of the present disclosure may have the following beneficial effects:

[0047] It can be seen from the above embodiments that in the disclosed embodiments, the feature screening parameters obtained by the trained first model are used to determine the online training samples, and the second model is trained based on the online training samples and the first prediction value output by the first model. Since the online training samples are the feature subsets screened out after the first model is trained, the number of features input into the second model is reduced, which is beneficial to saving machine resources, reducing the manpower cost of screening features, and also beneficial to reducing the response delay phenomenon. Moreover, the online training samples are obtained by dynamic screening of the first model, and change with the changes of the first model. When encountering feature explosion, there is no need to manually screen and reduce features, which reduces the manpower cost of screening features. Not only that, the features in the offline training samples of the first model during offline training are richer than those in the online training samples. Using the first model to assist the training of the second model can enable the second model to obtain more feature information. When the second model is trained, fewer features can still achieve the effect of more features, reducing the drift fluctuation of the second model training, and also beneficial to improving the accuracy of the output probability value during recommendation.

[0048] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0050] Figure 1 is one of the flowcharts of a model training method according to an exemplary embodiment;

[0051] Figure 2 is a flowchart of a recommendation method according to an exemplary embodiment;

[0052] Figure 3 is one of the structural schematic diagrams of a model training device according to an exemplary embodiment;

[0053] Figure 4 is a second flowchart of a model training method according to an exemplary embodiment;

[0054] Figure 5 is a schematic structural diagram of a recommendation device according to an exemplary embodiment;

[0055] Figure 6 It is a structural block diagram of a composition of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0056] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices consistent with some aspects of the present disclosure as detailed in the appended claims.

[0057] In the disclosed embodiments, both the model training method and the recommendation method can be applied to electronic devices, which can be clients or servers. The clients include, but are not limited to, mobile phones, tablet computers, laptop computers, drones, wearable electronic devices, desktop computers, or televisions. The server can be a server that provides services to the client's application program by connecting to the client through a wireless network or a limited network. The server can be a single server or a server cluster or distributed system consisting of multiple servers.

[0058] Figure 1 is a flow chart of a model training method according to an exemplary embodiment. Figure 1 As shown, a first aspect of an embodiment of the present disclosure provides a model training method, the method comprising:

[0059] Step S110, receiving a feature screening parameter sent by a first model, wherein the first model is trained offline using an offline training sample and label data of the offline training sample, wherein the feature screening parameter indicates: N features of the M features of the offline training sample that have the greatest influence on the weight of the first model; M is greater than N, and N is a positive integer greater than or equal to 1, and M is a positive integer greater than or equal to 2;

[0060] Step S120: selecting online training samples corresponding to the N features according to the feature screening parameters;

[0061] Step S130, obtaining a first prediction value output by the first model based on the online training sample;

[0062] Step S140: online training a second model using the first prediction value and the online training sample as training data.

[0063] In the disclosed embodiment, the first model is used to assist the training of the second model; the second model is used for online prediction to provide recommendation services for the client. The first model is equivalent to the teacher model, and the second model is equivalent to the student model.

[0064] The recommendation service may be a service for articles, videos, or products, but is not limited thereto.

[0065] Before training the second model, the first model is trained using the offline training samples to ensure the guiding effect of the first model on the second model and improve the training effect. In some embodiments, the method includes: offline training the first model based on the offline training samples and the label data of the offline training samples.

[0066] The sets of the 1st to Nth features are sorted from large to small according to their weight influence on the first model, and form online training samples.

[0067] In practical applications, in order to improve the accuracy of recommendations, more and more features will be used. When there are more and more features, it may cause feature explosion, increase computing resources and costs. At the same time, because the complexity of features increases, the online response delay is prominent, which also means that the online service response of the recommendation model slows down. If the same traffic is carried, the degree of online service parallelism needs to be increased, which will increase cost resources. When the features explode to a certain extent, the manpower investment cost will be very high. If the features are artificially reduced when the features explode, although certain methods can be relied on for screening, the features will remain unchanged after selection, and people will need to continue to screen features according to the target in the later stage.

[0068] In the disclosed embodiment, the feature screening parameters are determined based on the partial features in the offline training samples that have the greatest impact on the weight of the first model. Thus, the online training samples determined based on the feature screening parameters are a subset of the offline training samples. When the second model is trained using the online training samples, the number of features input into the second model can be reduced, which is beneficial to saving machine resources, reducing the labor cost of screening features, and also beneficial to reducing response delays. Moreover, the online training samples are obtained by dynamic screening of the first model, and change with the changes of the first model. When encountering feature explosion, there is no need to manually screen and reduce features, which reduces the labor cost of screening features and is also beneficial to reducing response delays.

[0069] When faced with the problem of feature explosion, if we retain several features that have a greater impact on the label data based on the impact of each feature on the label data of the training sample, and use these features to train the first model, or use the random forest or GBDT (Gradient Boosting Decision Tree) method to screen out features to train the first model, this method will completely discard some features (the discarded features are hidden features) and lose some hidden information between the feature and other features, resulting in consistency problems. In addition, the features retained after screening require continuous human investment, and screening is performed at irregular intervals, which may cause the training to drift and fluctuate, and the final sorting result (i.e., recommendation) is neither the best nor the worst.

[0070] In the embodiment of the present disclosure, although the online training samples lack some features (also called hidden features) compared with the offline training samples, resulting in the fact that these hidden features are not explicitly used in training the second model, since these hidden features are used in training the first model, when the first model is used to assist in training the second model, the information of these hidden features can be transferred to the second model, so that the second model can also learn the information of the hidden features, and then the recommendation results obtained by using the second model for online recommendation are better, which improves the consistency problem caused by the loss of some features, reduces the drift fluctuation of the second model training, and is also beneficial to improving the accuracy of the output probability value during recommendation.

[0071] Generally, offline training samples include all features, that is, offline training samples include features that can be obtained by both offline training and online prediction.

[0072] In some embodiments, the offline training samples include online features (Online Features) and offline features (Other Features).

[0073] In some embodiments, the first model is located on a server, and the second model is located on a client; or, both the first model and the second model are located on a server; wherein the server and the client establish a communication connection via a wired network or a wireless network.

[0074] In some embodiments, the online training of the second model using the first prediction value and the online training sample as training data includes:

[0075] When the usage status of the client satisfies a preset status, the second model is trained online within a preset time using the first prediction value and the online training sample as training data; wherein the preset status includes: the battery power reaches a preset power, and / or the battery is in a charging state.

[0076] Training the second model when the preset state and preset time are met can reduce the impact on the normal use of the client due to high power consumption during model training. For example: if the client is in the use state of opening a game application, if the second model is trained at this time, it will further increase battery consumption, interrupt the game, the client will heat up significantly, and even cause the game interface to freeze.

[0077] The preset power level may be 80-100% of the total battery power.

[0078] The preset time refers to the time when the client is in a relatively idle state and there is no task with high power consumption being processed by the client. Without limitation, the preset time can be the designated sleeping time of a general user, for example, the preset time is 23:00 to 05:30 the next day. In actual applications, the preset time is determined based on the user status information uploaded to the client by the wearable device, or based on the analysis of the user's daily routine based on the client's usage status information, etc.

[0079] In some embodiments, the method further comprises:

[0080] Obtaining the usage frequency and / or usage duration of a target application program related to the target object in the client;

[0081] If the usage frequency and / or usage duration reaches a preset threshold, obtaining historical information of the client;

[0082] The historical information is updated in the offline training samples, and the first model is trained.

[0083] In this example, if the usage frequency and / or usage duration reaches a preset threshold, it indicates that the client has updated enough data, and the offline training samples can be updated in time. When the offline training samples are updated, training the first model can enable the first model to learn the newly added information in time, which is conducive to improving the accuracy of the second model prediction.

[0084] Target objects include but are not limited to articles, videos or products.

[0085] The target applications include, but are not limited to, video playback applications, shopping applications, game applications, or reading applications.

[0086] According to some other optional embodiments, the features in the offline training samples and / or the online training samples include at least one of the following: image features, video features, and user features.

[0087] Image features include but are not limited to content information contained in the image or the click rate of the image.

[0088] Video features include, but are not limited to, the number of video views, the click-through rate of the video, or the content information contained in the video.

[0089] User characteristics are non-private personal information or behavior information disclosed by users. Personal information includes but is not limited to the user's gender, age, education, income or geographical location. Behavioral information includes but is not limited to the user's usage information for target applications. For example: the user's usage time and search times for entertainment applications, shopping applications or social applications.

[0090] By using at least one of the image features, video features, and user features to train the first model and / or the second model, commodities corresponding to the image content information or the video content information can be recommended to the user, thereby improving the economic value.

[0091] According to some other optional embodiments, the online training of the second model using the first predicted value and the online training sample as training data includes:

[0092] Obtaining a second prediction value output by the second model based on the online training sample;

[0093] Determining the loss of the second model according to the label data of the online training sample and the second prediction value;

[0094] determining a distillation loss according to the first predicted value and the second predicted value;

[0095] The network parameters of the second model are updated according to the loss of the second model, the distillation loss and the loss ratio.

[0096] The second model loss reflects the error between the label data of the online training sample and the second predicted value, and the distillation loss reflects the error between the first model and the second model.

[0097] The loss ratio is generally a positive number less than 1. Using the loss ratio to adjust the loss of the second model and the influence of the distillation loss on the network parameters of the second model is conducive to improving the accuracy of the second model prediction.

[0098] According to some other optional embodiments, determining the distillation loss according to the first predicted value and the second predicted value includes:

[0099] Obtaining a regression value of the first predicted value; wherein the regression value of the first predicted value is a value obtained by performing a logistic regression process on the first predicted value;

[0100] Performing logistic regression processing on the second predicted value to obtain a regression value of the second predicted value;

[0101] The distillation loss is determined according to the regression value of the first predicted value and the regression value of the second predicted value.

[0102] Performing logistic regression processing on the first prediction value and the second prediction value respectively, and determining the distillation loss based on the first prediction value and the second prediction value after the logistic regression processing, can effectively improve the information entropy of the output result of the second model, thereby helping to improve the accuracy of the second model prediction.

[0103] The second aspect of the present disclosure provides a recommendation method, such as Figure 2 As shown, the method includes:

[0104] Step S210: Obtain a second model obtained by the model training method described in the embodiment of the first aspect;

[0105] Step S220: Select target features corresponding to N features from content features of the content to be recommended and user features of the target user according to the feature screening parameters sent by the first model;

[0106] Step S230: input the online target features corresponding to the N features into the second model to obtain a probability value output by the second model;

[0107] Step S240: Determine whether to recommend the content to be recommended to the target user according to the probability value.

[0108] In step S210, the second model is obtained by training with the first model in the embodiment of the first aspect, and the second model obtained in this way has higher prediction accuracy.

[0109] In step S220 to step S240, N target features are selected from content features and user features for structure prediction according to feature selection parameters, so that the second model does not need to use all content features during online prediction, and a probability value with higher accuracy can be obtained by using some features, thereby obtaining more reliable content to be recommended (i.e., the predicted recommendation structure) according to the probability value. This online prediction process not only improves the accuracy of the prediction, but also helps to reduce the computing resources of electronic devices or the cloud.

[0110] In actual applications, only the second model is used for online prediction, and the features input into the second model are selected by Feature Gate from the content features and user features of the content to be recommended, so as to ensure the consistency between training and prediction. Since the online features are only a subset of all features, the online resource cost is also maintained within a reasonable range.

[0111] The third aspect of the present disclosure provides a model training device, such as Figure 3 As shown, the device 300 includes:

[0112] The first acquisition module 310 is used to receive a feature screening parameter sent by a first model, wherein the first model is trained offline using an offline training sample and label data of the offline training sample, wherein the feature screening parameter indicates: N features of the M features of the offline training sample that have the greatest influence on the weight of the first model; M is greater than N, and N is a positive integer greater than or equal to 1, and M is a positive integer greater than or equal to 2;

[0113] A first selection module 320, configured to select online training samples corresponding to the N features according to the feature screening parameters;

[0114] A second acquisition module 330 is used to obtain a first prediction value output by the first model based on the online training sample;

[0115] The training module 340 is used to train the second model online using the first prediction value and the online training sample as training data.

[0116] In a specific embodiment, in combination Figure 4 The model training device shown, the model training method includes:

[0117] Step S410: Offline train the first model based on the offline training samples and the label data of the offline training samples, wherein the features of the offline training samples include online features (Online Features) available online and offline features (Other Features) available offline.

[0118] When the first model Model(y,X,X*) is trained using offline training samples, the update parameters of the first model are:

[0119]

[0120] Wherein, Wt represents the model parameters of the first model updated for the Qth time, Wt represents the model parameters of the first model updated for the Q-1th time, Q is a positive integer greater than or equal to 1; X represents the online feature, X* represents the offline feature, y represents the label data of the offline training sample, i.e., Label, L represents the loss function, Lt is the loss of the first model, and η is generally a positive number less than 1.

[0121] Step S420, determining feature screening parameters based on the trained first model; wherein the feature screening parameters indicate: the N features of the M features of the offline training sample that have the greatest impact on the weight of the first model; the M is greater than the N, and the N is a positive integer greater than or equal to 1, and the M is a positive integer greater than or equal to 2.

[0122] like Figure 4As shown, after the first model is trained, the model parameters of the first model are fixed and the feature screening parameters are determined. The feature screening network (Feature Gate) can be used for feature selection (Feature Select).

[0123] Step S430: Select online training samples corresponding to the N features according to the feature screening parameters.

[0124] Step S440, obtaining a first prediction value output by the first model based on the online training sample;

[0125] Step S450: online training a second model using the first prediction value and the online training sample as training data.

[0126] The model parameters and feature expressions of the first model are fixed, and the screened online training samples are input into the second model. At this time, the update of the second model is:

[0127]

[0128] Among them, the hyperparameter λ is the ratio of the loss function, which is used to control the loss ratio. Among them, Ld represents the distillation loss, Ls represents the loss of the second model, and Ws represents the model parameter parameters of the second model.

[0129] In practical applications, Ld is calculated by calculating the error between the first predicted value and the second predicted value. If the first predicted value and the second predicted value are not subjected to logistic regression processing respectively, the information entropy contained in the output results of the first model and the second model will be relatively low. In this case, logistic regression processing can be performed by the following formula:

[0130]

[0131] Where qi is the soft targets for tutor and student network learning, z is the first prediction output by the first model, or the second prediction output by the second model, and i and j are both positive integers greater than or equal to 1. The hyperparameter T is the distillation temperature, which can change the information entropy of the model output.

[0132] The technical solution of this example has at least resource advantages and feature advantages. Among them, the resource advantages include: the second model learns the richness of the features through the first model, and uses the first model to dynamically screen out features to assist the second model in training, thereby reducing the number of features of the second model. When the second model predicts online, the effect of all features can still be achieved by using some features, reducing response delays, saving machine resources, and reducing the drift fluctuations of screening features and labor costs. Feature advantages refer to: online training changes with the changes of the tutor model, so that the features of model training are no longer static and change with training. In addition, the second model can obtain information about hidden features from the first model, which not only complies with the feature consistency criterion, but also further improves the sorting effect (that is, improves the accuracy of prediction).

[0133] According to some other optional embodiments, the features in the offline training samples and / or the online training samples include at least one of the following: image features, video features, and user features.

[0134] According to some other optional embodiments, the training module is further used for:

[0135] Obtaining a second prediction value output by the second model based on the online training sample;

[0136] Determining the loss of the second model according to the label data of the online training sample and the second prediction value;

[0137] determining a distillation loss according to the first predicted value and the second predicted value;

[0138] The network parameters of the second model are updated according to the loss of the second model, the distillation loss and the loss ratio.

[0139] According to some other optional embodiments, the training module is further used for:

[0140] Obtaining a regression value of the first predicted value; wherein the regression value of the first predicted value is a value obtained by performing a logistic regression process on the first predicted value;

[0141] Performing logistic regression processing on the second predicted value to obtain a regression value of the second predicted value;

[0142] The distillation loss is determined according to the regression value of the first predicted value and the regression value of the second predicted value.

[0143] A fourth aspect of the present disclosure provides a recommendation device, such as Figure 5 As shown, the device 500 includes:

[0144] A third acquisition module 510 is used to acquire a second model obtained by the model training method described in the embodiment of the first aspect;

[0145] The second selection module 520 is used to select target features corresponding to N features from content features of the content to be recommended and user features of the target user according to the feature screening parameters sent by the first model;

[0146] A calculation module 530, configured to input the online target features corresponding to the N features into the second model to obtain a probability value output by the second model;

[0147] The recommendation module 540 is used to determine whether to recommend the content to be recommended to the target user according to the probability value.

[0148] An embodiment of the fifth aspect of the present disclosure provides an electronic device, comprising a processor, a memory, and an executable program stored in the memory and capable of being run by the processor, wherein when the processor runs the executable program, the processor executes the steps of the model training method described in the embodiment of the first aspect, or the steps of the recommendation method described in the embodiment of the second aspect.

[0149] The sixth aspect of the present disclosure provides a storage medium having an executable program stored thereon, wherein when the executable program is executed by a processor, the steps of the model training method described in the first aspect or the steps of the recommendation method described in the second aspect are implemented.

[0150] The methods disclosed in several method embodiments provided in the present disclosure can be arbitrarily combined without conflict to obtain new method embodiments.

[0151] Figure 6 1 is a block diagram of an electronic device according to an exemplary embodiment. For example, the electronic device may be a mobile phone, a computer, a digital broadcast electronic device, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0152] Reference Figure 6 , the electronic device may include one or more of the following components: a processing component 802 , a memory 804 , a power component 806 , a multimedia component 808 , an audio component 810 , an input / output (I / O) interface 812 , a sensor component 814 , and a communication component 816 .

[0153] The processing component 802 generally controls the overall operation of the electronic device, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 802 may include one or more modules to facilitate the interaction between the processing component 802 and other components. For example, the processing component 802 may include a multimedia module to facilitate the interaction between the multimedia component 808 and the processing component 802.

[0154] The memory 804 is configured to store various types of data to support the operation of the electronic device. Examples of such data include instructions for any application or method operating on the electronic device, contact data, phone book data, messages, pictures, videos, etc. The memory 804 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0155] The power component 806 provides power to various components of the electronic device. The power component 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the electronic device.

[0156] The multimedia component 808 includes a screen that provides an output interface between the electronic device and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front camera and / or a rear camera. When the electronic device is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0157] The audio component 810 is configured to output and / or input audio signals. For example, the audio component 810 includes a microphone (MIC), and when the electronic device is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 804 or sent via the communication component 816. In some embodiments, the audio component 810 also includes a speaker for outputting audio signals.

[0158] I / O interface 812 provides an interface between processing component 802 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include but are not limited to: a home button, a volume button, a start button, and a lock button.

[0159] The sensor assembly 814 includes one or more sensors for providing various aspects of status assessment for the electronic device. For example, the sensor assembly 814 can detect the on / off state of the electronic device, the relative positioning of components, such as the display and keypad of the electronic device, and the sensor assembly 814 can also detect the position change of the electronic device or a component of the electronic device, the presence or absence of user contact with the electronic device, the orientation or acceleration / deceleration of the electronic device and the temperature change of the electronic device. The sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an accelerometer, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0160] The communication component 816 is configured to facilitate wired or wireless communication between the electronic device and other devices. The electronic device can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on radio frequency identification (RFID) technology, infrared data association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology and other technologies.

[0161] In an exemplary embodiment, the electronic device may be implemented by one or more application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to perform the above methods.

[0162] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0163] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A model training method, characterized in that: The method comprises: Receive a feature screening parameter sent by a first model, wherein the first model is trained offline using an offline training sample and label data of the offline training sample, wherein the feature screening parameter indicates: N features of the M features of the offline training sample that have the greatest impact on the weight of the first model; M is greater than N, and N is a positive integer greater than or equal to 1, and M is a positive integer greater than or equal to 2; According to the feature screening parameters, online training samples corresponding to the N features are selected; the features in the offline training samples and / or the online training samples include at least one of the following: image features, video features, and user features; Obtaining a first prediction value output by the first model based on the online training sample; The second model is trained online using the first predicted value and the online training sample as training data.

2. The method according to claim 1, characterized in that The online training of the second model using the first predicted value and the online training sample as training data comprises: Obtaining a second prediction value output by the second model based on the online training sample; Determining the loss of the second model according to the label data of the online training sample and the second prediction value; determining a distillation loss according to the first predicted value and the second predicted value; The network parameters of the second model are updated according to the loss of the second model, the distillation loss and the loss ratio.

3. The method according to claim 2, characterized in that The step of determining the distillation loss according to the first predicted value and the second predicted value includes: Obtaining a regression value of the first predicted value; wherein the regression value of the first predicted value is a value obtained by performing a logistic regression process on the first predicted value; Performing logistic regression processing on the second predicted value to obtain a regression value of the second predicted value; The distillation loss is determined according to the regression value of the first predicted value and the regression value of the second predicted value.

4. A recommendation method, characterized in that: The method comprises: Obtain a second model obtained by the model training method according to any one of claims 1 to 3; According to the feature screening parameters sent by the first model, select online target features corresponding to N features from the content features of the content to be recommended and the user features of the target user; Inputting the online target features corresponding to the N features into the second model to obtain a probability value output by the second model; According to the probability value, it is determined whether to recommend the content to be recommended to the target user.

5. A model training device, characterized in that: The device comprises: A first acquisition module is used to receive a feature screening parameter sent by a first model, wherein the first model is trained offline using an offline training sample and label data of the offline training sample, wherein the feature screening parameter indicates: N features of the M features of the offline training sample that have the greatest influence on the weight of the first model; M is greater than N, and N is a positive integer greater than or equal to 1, and M is a positive integer greater than or equal to 2; A first selection module is used to select online training samples corresponding to the N features according to the feature screening parameters; the features in the offline training samples and / or the online training samples include at least one of the following: image features, video features, and user features; A second acquisition module, used to acquire a first prediction value output by the first model based on the online training sample; A training module is used to train a second model online using the first prediction value and the online training sample as training data.

6. The device according to claim 5, characterized in that The training module is also used for: Obtaining a second prediction value output by the second model based on the online training sample; Determining the loss of the second model according to the label data of the online training sample and the second prediction value; determining a distillation loss according to the first predicted value and the second predicted value; The network parameters of the second model are updated according to the loss of the second model, the distillation loss and the loss ratio.

7. The device according to claim 6, characterized in that The training module is also used for: Obtaining a regression value of the first predicted value; wherein the regression value of the first predicted value is a value obtained by performing a logistic regression process on the first predicted value; Performing logistic regression processing on the second predicted value to obtain a regression value of the second predicted value; The distillation loss is determined according to the regression value of the first predicted value and the regression value of the second predicted value.

8. A recommendation device, characterized in that: The device comprises: A third acquisition module, used to acquire a second model obtained by the model training method according to any one of claims 1 to 3; A second selection module is used to select online target features corresponding to N features from content features of the content to be recommended and user features of the target user according to the feature screening parameters sent by the first model; A calculation module, used for inputting the online target features corresponding to the N features into the second model to obtain a probability value output by the second model; A recommendation module is used to determine whether to recommend the content to be recommended to the target user according to the probability value.

9. An electronic device comprising a processor, a memory, and an executable program stored in the memory and capable of being run by the processor, characterized in that: When the processor runs the executable program, it executes the steps of the model training method according to any one of claims 1 to 3, or the steps of the recommendation method according to claim 4.

10. A storage medium having an executable program stored thereon, characterized in that: When the executable program is executed by a processor, the steps of the model training method according to any one of claims 1 to 3, or the steps of the recommendation method according to claim 4 are implemented.

Citation Information

Patent Citations

  • Chinese text classification method based on attention mechanism and interference word deletion

    CN112749274A