CN113010564B - Model training and information recommendation method and device - Google Patents

Model training and information recommendation method and device Download PDF

Info

Publication number
CN113010564B
CN113010564B CN202110280660.XA CN202110280660A CN113010564B CN 113010564 B CN113010564 B CN 113010564B CN 202110280660 A CN202110280660 A CN 202110280660A CN 113010564 B CN113010564 B CN 113010564B
Authority
CN
China
Prior art keywords
information
recommendation
sample information
sequence
sample
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110280660.XA
Other languages
Chinese (zh)
Other versions
CN113010564A (en
Inventor
廖国钢
石晓文
吴晓旭
崔同
王永康
王兴星
张硕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Sankuai Network Technology Co ltd
Beijing Sankuai Online Technology Co Ltd
Original Assignee
Beijing Sankuai Online Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Sankuai Online Technology Co Ltd filed Critical Beijing Sankuai Online Technology Co Ltd
Priority to CN202110280660.XA priority Critical patent/CN113010564B/en
Publication of CN113010564A publication Critical patent/CN113010564A/en
Application granted granted Critical
Publication of CN113010564B publication Critical patent/CN113010564B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2457Query processing with adaptation to user needs
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • G06F18/241Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches
    • G06F18/2415Classification techniques relating to the classification model, e.g. parametric or non-parametric approaches based on parametric or probabilistic models, e.g. based on likelihood ratio or false acceptance rate versus a false rejection rate

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Probability & Statistics with Applications (AREA)
  • Computational Linguistics (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The specification discloses a method and a device for model training and information recommendation. And then, at least one sample information sequence can be selected from the plurality of sample information sequences, the characteristic information corresponding to the at least one sample information sequence is input into a preset prediction model, and at least one to-be-recommended sample information sequence is determined from the plurality of sample information sequences. The service platform can determine the proportion of the first sample information in each sample information sequence to be recommended as a comprehensive proportion, and train the prediction model by taking the deviation between the minimized comprehensive proportion and the first set proportion as an optimization target. After the prediction model is trained, the service platform can determine how to recommend information to the user through the prediction model, so that the development efficiency is improved.

Description

Model training and information recommendation method and device
Technical Field
The specification relates to the technical field of machine learning, in particular to a method and a device for model training and information recommendation.
Background
In practical application, a user can browse recommendation information recommended to the user by the service platform through the terminal, for example, in a takeout service, when the user needs to check each takeout merchant through the terminal, the service platform can sort merchant information according to a certain sequence and display the merchant information to the user.
In the prior art, after a service platform determines information to be recommended to a user, the information to be recommended includes first recommendation information and second recommendation information, the recommendation cost of the first recommendation information is high, and the recommendation cost of the second recommendation information is low. The service platform can perform various permutation and combination on the information to be recommended to obtain various candidate recommendation information sequences, that is, the sequence of the information to be recommended in different candidate recommendation information sequences is different. The service platform can select a proper candidate recommendation information sequence from the candidate recommendation information sequences through a machine learning model to serve as a target recommendation information sequence for information recommendation. In order to control the cost of information recommendation for users, in the prior art, a plurality of machine learning models with different model parameters can be trained, and a simulation test is performed to determine the overall proportion of the first recommendation information in each recommendation information displayed to the user after information recommendation is performed to each user through each machine learning model.
Through the information recommendation method in the prior art, after model training, simulation testing is required, so that development efficiency is reduced, and a certain development cost may be lost.
Disclosure of Invention
The present specification provides a method and apparatus for model training and information recommendation, so as to partially solve the above problems in the prior art.
The technical scheme adopted by the specification is as follows:
the present specification provides a method of model training, comprising:
obtaining a plurality of sample information sequences, wherein the sample information sequences comprise first sample information and second sample information, and the first sample information has higher recommendation cost than the second sample information;
selecting at least one sample information sequence from the plurality of sample information sequences, and inputting the characteristic information corresponding to the selected at least one sample information sequence into a preset prediction model so as to determine at least one to-be-recommended sample information sequence from the plurality of sample information sequences through the prediction model;
determining the ratio of the first sample information in the at least one sample information sequence to be recommended as a comprehensive ratio;
and training the prediction model by taking the minimization of the deviation between the at least one sample information sequence to be recommended and a target sample information sequence contained in the plurality of sample information sequences and the minimization of the deviation between the comprehensive ratio and a first set ratio as optimization targets.
Optionally, the method for determining the at least one to-be-recommended sample information sequence from the plurality of sample information sequences through the prediction model by inputting the selected feature information corresponding to the at least one sample information sequence into a preset prediction model specifically includes:
inputting the selected characteristic information corresponding to the at least one sample information sequence into the prediction model to obtain the predicted information recommendation degree corresponding to the sample information sequence for each sample information sequence in the selected at least one sample information sequence;
and determining at least one to-be-recommended sample information sequence from the plurality of sample information sequences according to the predicted information recommendation degree corresponding to each sample information sequence.
Optionally, determining at least one to-be-recommended sample information sequence from the plurality of sample information sequences according to the predicted information recommendation degree corresponding to each sample information sequence, specifically including:
and determining a sample information sequence with the highest information recommendation degree from the at least one selected sample information sequence as a to-be-recommended sample information sequence contained in the at least one selected sample information sequence.
The present specification provides a method for information recommendation, including:
receiving a service request sent by a user;
determining each piece of information to be recommended corresponding to the user according to the service request, wherein each piece of information to be recommended comprises first recommendation information and second recommendation information, and the recommendation cost of the first recommendation information is higher than that of the second recommendation information;
determining each candidate recommendation information sequence according to the information to be recommended, and inputting the characteristic information corresponding to each candidate recommendation information sequence into a pre-trained prediction model to determine a target recommendation information sequence from each candidate recommendation information sequence, wherein the prediction model is obtained by training through the model training method;
and recommending information to the user according to the target recommendation information sequence.
Optionally, the feature information corresponding to each candidate recommendation information sequence is input into a pre-trained prediction model to obtain a target recommendation information sequence in each candidate recommendation information sequence, and the method specifically includes:
inputting the characteristic information corresponding to each candidate recommendation information sequence into the prediction model, and determining the information recommendation degree corresponding to each candidate recommendation information sequence aiming at each candidate recommendation information sequence;
and determining a target recommendation information sequence in each candidate recommendation information sequence according to the information recommendation degree corresponding to each candidate recommendation information sequence.
Optionally, before recommending the information to be recommended to the user according to the target recommendation information sequence, the method further includes:
if the proportion of the first recommendation information in the target recommendation sequence in the target recommendation information sequence is determined to exceed a second set proportion, determining recommendation information matched with the user as supplementary recommendation information according to the historical behavior data of the user, wherein the supplementary recommendation information belongs to second recommendation information;
and replacing the first recommendation information contained in the target recommendation information sequence with the supplementary recommendation information.
The present specification provides an apparatus for model training, comprising:
the device comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a plurality of sample information sequences, the sample information sequences comprise first sample information and second sample information, and the first sample information is higher than the second sample information in corresponding recommendation cost;
the prediction module is used for selecting at least one sample information sequence from the plurality of sample information sequences and inputting the characteristic information corresponding to the selected at least one sample information sequence into a preset prediction model so as to determine at least one to-be-recommended sample information sequence from the plurality of sample information sequences through the prediction model;
the determining module is used for determining the ratio of the first sample information in the at least one to-be-recommended sample information sequence as a comprehensive ratio;
and the training module is used for training the prediction model by taking the minimum deviation between the at least one sample information sequence to be recommended and a target sample information sequence contained in the plurality of sample information sequences and the minimum deviation between the comprehensive ratio and a first set ratio as optimization targets.
This specification provides an apparatus for information recommendation, including:
the receiving module is used for receiving a service request sent by a user;
the determining module is used for determining each piece of information to be recommended corresponding to the user according to the service request, wherein each piece of information to be recommended comprises first recommendation information and second recommendation information, and the recommendation cost of the first recommendation information is higher than that of the second recommendation information;
the prediction module is used for determining each candidate recommendation information sequence according to the information to be recommended, inputting the characteristic information corresponding to each candidate recommendation information sequence into a pre-trained prediction model so as to determine a target recommendation information sequence from each candidate recommendation information sequence, and the prediction model is obtained by training through the model training method;
and the recommending module is used for recommending information to the user according to the target recommending information sequence.
The present specification provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the above-described method of model training or information recommendation.
The present specification provides an electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the above method of model training or information recommendation when executing the program.
The technical scheme adopted by the specification can achieve the following beneficial effects:
in the method and apparatus for model training and information recommendation provided in this specification, a service platform may obtain a plurality of sample information sequences, where the sample information sequences mentioned herein include first sample information and second sample information, and the recommendation cost of the first sample information is higher than that of the second sample information. Then, the service platform may select at least one sample information sequence from the plurality of sample information sequences, and input the feature information corresponding to the selected at least one sample information sequence into a preset prediction model, so as to determine at least one to-be-recommended sample information sequence from the plurality of sample information sequences through the prediction model. The service platform can determine the proportion of the first sample information in at least one sample information sequence to be recommended as a comprehensive proportion, and train the prediction model by taking the minimum deviation between the at least one sample information sequence to be recommended and a target sample information sequence contained in a plurality of sample information sequences and the minimum deviation between the comprehensive proportion and the first set proportion as optimization targets. After the prediction model is trained, the service platform can determine how to recommend information to the user through the prediction model.
It can be seen from the above method that, when the service platform trains the prediction model, the optimization target set by the prediction model not only enables the prediction model to determine the required sample information sequence, but also enables the proportion of the first sample information with higher recommendation cost in each sample information sequence determined by the prediction model to meet the proportion of the expected first recommendation information in each recommendation information.
Drawings
The accompanying drawings, which are included to provide a further understanding of the specification and are incorporated in and constitute a part of this specification, illustrate embodiments of the specification and together with the description serve to explain the specification and not to limit the specification in a non-limiting sense. In the drawings:
FIG. 1 is a schematic flow chart of a method of model training in the present specification;
FIG. 2 is a schematic diagram of a prediction model provided herein;
FIG. 3 is a flow chart illustrating a method for information recommendation provided herein;
FIG. 4 is a schematic diagram of an apparatus for model training in the present specification;
FIG. 5 is a schematic diagram of an apparatus for information recommendation in the present specification;
fig. 6 is a schematic diagram of an electronic device corresponding to fig. 1 or fig. 3 provided in the present specification.
Detailed Description
In order to make the objects, technical solutions and advantages of the present disclosure more clear, the technical solutions of the present disclosure will be clearly and completely described below with reference to the specific embodiments of the present disclosure and the accompanying drawings. It is to be understood that the embodiments described are only a few embodiments of the present disclosure, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present specification without any creative effort belong to the protection scope of the present specification.
The technical solutions provided by the embodiments of the present description are described in detail below with reference to the accompanying drawings.
Fig. 1 is a schematic flow chart of a model training method in this specification, which specifically includes the following steps:
s101: the method comprises the steps of obtaining a plurality of sample information sequences, wherein the sample information sequences comprise first sample information and second sample information, and the first sample information is high in recommendation cost compared with the second sample information.
S102: selecting at least one sample information sequence from the plurality of sample information sequences, and inputting the characteristic information corresponding to the selected at least one sample information sequence into a preset prediction model, so as to determine at least one to-be-recommended sample information sequence from the plurality of sample information sequences through the prediction model.
In practical application, when a service platform recommends information for a user, a plurality of pieces of information to be recommended which can be displayed for the user can be determined, a plurality of permutation and combination aiming at the information to be recommended are determined, each candidate recommendation information sequence is obtained, and a proper recommendation information sequence is selected from the candidate recommendation information sequences to be used as a target recommendation information sequence for recommending the information for the user.
For example, in a take-out service, a service platform may show, in a list form, merchant information recommended to a user, and each time the service platform shows, to the user, a set of merchant information, which is a target recommendation information sequence selected from a predetermined candidate recommendation information sequence.
Generally, the service platform needs to select each candidate recommendation information sequence through a machine learning model, and therefore, the service platform needs to perform model training in advance. Specifically, the service platform may obtain a plurality of sample information sequences, where each sample information sequence includes first sample information and second sample information, where the recommendation cost of the first sample information mentioned herein is higher than that of the second sample information. Then, the service platform may select at least one sample information sequence from the plurality of sample information sequences, and input the feature information corresponding to the selected at least one sample information sequence into a preset prediction model, so as to determine at least one to-be-recommended sample information sequence from the sample information sequences through the prediction model.
The at least one sample information sequence selected from the plurality of sample information sequences may be one sample information sequence or a plurality of sample information sequences.
If the feature information corresponding to a plurality of sample information sequences is input into the prediction model each time, the feature information which can be in a matrix form is input into the prediction model, that is, the feature information of each row in one matrix is the feature information corresponding to one sample information sequence. When feature information is input to the prediction model once, the prediction model can select a to-be-recommended sample information sequence from a plurality of sample information sequences corresponding to the feature information, at least one sample information sequence can be selected from the plurality of sample information sequences for a plurality of times, and the feature information corresponding to the sample information sequence selected each time is input to the prediction model, so that all the to-be-recommended sample information sequences can be determined from the plurality of sample information sequences.
In this specification, after inputting the feature information corresponding to the selected at least one sample information sequence into the prediction model, the service platform obtains, for each sample information sequence in the selected at least one sample information sequence, the predicted information recommendation degree corresponding to the sample information sequence, and determines at least one to-be-recommended sample information sequence from the plurality of sample information sequences according to the predicted information recommendation degree corresponding to each sample information sequence.
The information recommendation degree corresponding to the predicted sample information sequence may refer to a plurality of information, for example, the information recommendation degree corresponding to the sample information sequence may refer to the benefit obtained by the service platform after the sample information sequence is shown to the user, which is predicted by the prediction model. For another example, the information recommendation degree corresponding to the sample information sequence may also be a click rate of the user for the sample information included in the sample information sequence, which is predicted by the prediction model.
The service platform may select at least one information sequence of samples to be recommended according to the predicted information recommendation degree corresponding to each information sequence of samples. For example, after the service platform predicts the information recommendation degree corresponding to each sample information sequence in at least one sample information sequence through the prediction model, the sample information sequence with the highest information recommendation degree can be determined to serve as the selected to-be-recommended sample information sequence. For another example, after the service platform predicts the information recommendation degree corresponding to each sample information sequence in the at least one sample information sequence through the prediction model, a sample information sequence with the information recommendation degree not less than the set recommendation degree may be selected as the to-be-recommended sample information sequence in the at least one sample information.
S103: and determining the proportion of the first sample information in the at least one to-be-recommended sample information sequence as an integrated proportion.
After the service platform selects at least one to-be-recommended sample information sequence through the prediction model, the ratio of the first sample information in the to-be-recommended sample information sequences can be determined to serve as the comprehensive ratio.
It should be noted that, there are various ways to determine the proportion of the first sample information in the sample information sequences to be recommended. For example, for a sample information sequence to be recommended, the proportion of the first sample information in the sample information sequence to be recommended may be simply determined as the proportion of the total number of sample information contained in the sample information sequence to be recommended by the number of the first sample information as the proportion of the first sample information in the sample information sequence to be recommended.
For another example, for a sample information sequence to be recommended, the proportion of the first sample information in the sample information sequence to be recommended may also be determined by combining the position of the first sample information in the sample information sequence to be recommended and the number of the first sample information included in the sample information sequence to be recommended.
Assuming that each sample information sequence contains 3 pieces of sample information, according to the importance degree of the sample information sequence in the sample information sequence, the ratio corresponding to the sample information arranged at the first position is preset to be 0.4, the ratio corresponding to the sample information arranged at the second position is preset to be 0.35, the ratio corresponding to the sample information arranged at the third position is preset to be 0.25, one sample information sequence to be recommended contains 1 piece of first sample information and 2 pieces of second sample information, the first sample information is arranged at the first position, and the second sample information is respectively arranged at the 2 nd position and the 3 rd position, so that the ratio of the first sample information in the sample information sequence to be recommended is 0.4.
When determining the above-mentioned comprehensive ratio, the service platform may determine the ratio of the first sample information in each information sequence of the sample to be recommended, and then count the average ratio of the first sample information in each information sequence of the sample to be recommended as the comprehensive ratio.
S104: and training the prediction model by taking the minimization of the deviation between the at least one sample information sequence to be recommended and a target sample information sequence contained in the plurality of sample information sequences and the minimization of the deviation between the comprehensive ratio and a first set ratio as optimization targets.
After the service platform determines the comprehensive ratio, the service platform can train the prediction model by taking the minimum deviation between at least one sample information sequence to be recommended and a target sample information sequence contained in a plurality of sample information sequences and the minimum deviation between the comprehensive ratio and the first set ratio as optimization targets. The first set ratio mentioned here may be determined according to actual needs.
The minimum deviation between the information sequence of the sample to be recommended and the information sequence of the target sample included in the plurality of sample information sequences is expected to predict the accurate information recommendation degree corresponding to each sample information sequence by the prediction model, so that the information sequence of the sample to be recommended is selected according to the accurate information recommendation degree. And minimizing the deviation between the comprehensive ratio and the first set ratio is an optimization target, and the ratio of the first recommendation information selected by the prediction model in each sample information sequence to be recommended is expected to be an appropriate ratio.
The reason is that in the actual service, the prediction model is required to select the recommendation information sequence shown to the user, and by aiming at the optimization goal of the comprehensive proportion, the proportion of the first recommendation information shown to each user in all the recommendation information shown to each user in the actual service scene can be selected as a proper proportion by the prediction model.
Therefore, by aiming at the optimization target of the comprehensive occupation ratio, the cost of each piece of recommendation information recommended to the user can be controlled in an actual service scene, and the occupation ratio of the first recommendation information displayed to each user in all pieces of recommendation information can be controlled, so that the first recommendation information viewed by each user cannot be too little or too much.
In the present specification, the structure of the prediction model is shown in fig. 2.
Fig. 2 is a schematic structural diagram of a prediction model provided in this specification.
In fig. 2, the feature information input into the prediction model is the feature information corresponding to at least one sample information sequence selected from a plurality of sample information sequences, and it can be seen that the feature information input into the prediction model in fig. 2 is the feature information corresponding to 3 sample information sequences, therefore, the prediction model can determine the information recommendation degree corresponding to each of the 3 sample information sequences, and select the sample information sequence with the highest information recommendation degree from the 3 sample information sequences as the sample information sequence to be recommended according to the information recommendation degree. The feature information input to the prediction model at one time may not be the feature information corresponding to all of the plurality of sample information sequences, and therefore, the above process may be repeated a plurality of times until the information recommendation degrees corresponding to all of the sample information sequences are predicted. Then, a loss function may be determined according to a ratio of the first sample information in the sample information sequence to be recommended and the predicted information recommendation degree corresponding to each sample information sequence, where the loss function may be specifically determined by the following formula.
Figure BDA0002978193310000101
In the above formula, xiRepresenting the characteristic information input once to the prediction model, which may be characteristic information corresponding to a plurality of sample information sequences, aiRepresents a sample information sequence, h (x)i,ai) To predicted aiCorresponding information recommendation, yiTo aim at aiActual information recommendation marked, res (x)i) For determined xiAnd in each corresponding sample information sequence, the proportion of the first sample information in the sample information sequence with the highest information recommendation degree. restargetIs a first preset ratio. N is the number of times characteristic information is input to the prediction model.
Wherein res (x) is determinedi) Then, the softargmax mode can be determined to determine xiThe sample information sequence with the highest information recommendation degree in the corresponding sample information sequences is determined to be res (x) by the ratio of the first sample information in the sample information sequencei). In practical application, feature information input under different service scenarios may be different, taking a take-away scenario as an example, if merchant information needs to be recommended to a user, for a sample information sequence, the feature information corresponding to the sample information sequence is the merchant information, the user information, the time, the location, the arrangement order of the merchant information in the sample information sequence, and the like included in the sample information sequence.
It should be noted that the sample information sequence may include sample information already shown to the user and sample information not shown to the user (in a recommendation scene, recommendation information already shown to the user and recommendation information not shown to the user), and the optimization target for the information recommendation degree in the loss function may be calculated only by the predicted information recommendation degree corresponding to the sample information already shown to the user and the information recommendation degree of the sample information in practice. The time and place mentioned here may refer to the time when the sample information sequence is selected to be recommended to the user in the actual service scene, and the place where the user is located at that time.
In this specification, the above description is a process of training a prediction model, and after the prediction model is trained in an actual application, the service platform may apply the prediction model in a scene of information recommendation, as shown in fig. 3.
Fig. 3 is a schematic flow chart of an information recommendation method provided in this specification, specifically including the following steps:
s301: and receiving a service request sent by a user.
S302: and determining each piece of information to be recommended corresponding to the user according to the service request, wherein each piece of information to be recommended comprises first recommendation information and second recommendation information, and the recommendation cost of the first recommendation information is higher than that of the second recommendation information.
In practical application, after receiving a service request sent by a user, a service platform can determine information to be recommended corresponding to the user according to the service request, wherein the information to be recommended includes first recommendation information and second recommendation information, and the recommendation cost of the first recommendation information is higher than that of the second recommendation information. For example, the recommendation cost corresponding to one piece of information to be recommended may refer to a cost required for a service object (such as a merchant) corresponding to the information to be recommended to make a service platform recommend the information to be recommended. For another example, the recommendation cost corresponding to one piece of information to be recommended may also refer to a cost required by the service platform to recommend the information to be recommended.
S303: and determining each candidate recommendation information sequence according to the information to be recommended, inputting the characteristic information corresponding to each candidate recommendation information sequence into a pre-trained prediction model to determine a target recommendation information sequence from each candidate recommendation information sequence, and training the prediction model by the model training method to obtain the target recommendation information sequence.
S304: and recommending information to the user according to the target recommendation information sequence.
After the service platform determines each piece of information to be recommended, each candidate recommendation information sequence can be determined according to each piece of information to be recommended, and the feature information corresponding to each candidate recommendation information sequence is input into a pre-trained prediction model to determine a target recommendation information sequence from each candidate recommendation information sequence, wherein the prediction model mentioned here is obtained by training through the model training method mentioned above.
In this way, the target recommendation information sequence used by the service platform in information recommendation is determined by adding the prediction model trained according to the optimization target of the comprehensive ratio, so that the ratio of the first recommendation information seen by each user in the recommendation information sequence shown to each user can be made to meet the first set ratio to a certain extent by selecting the recommendation information sequence shown to each user through the prediction model in information recommendation.
In this specification, similar to the training process, when determining the target recommendation information sequence, the service platform may input feature information corresponding to each candidate recommendation information sequence into the prediction model, determine, for each candidate recommendation information sequence, an information recommendation degree corresponding to the candidate recommendation information sequence, and determine, through the information recommendation degree corresponding to each candidate recommendation information sequence, the target recommendation information sequence in each candidate recommendation information sequence. For example, a candidate recommended information sequence with the highest information recommendation degree may be selected from the candidate recommended information sequences, and the candidate recommended information sequence may be used as the target recommended information sequence.
In this specification, the service platform may further control a ratio of the first recommendation information in the selected target recommendation information sequence, and specifically, if it is determined that the ratio of the first recommendation information in the target recommendation information sequence exceeds a second set ratio, the service platform may determine recommendation information matched with the user according to historical behavior data of the user, and use the recommendation information as supplementary recommendation information, and replace the first recommendation information included in the target recommendation information with the supplementary recommendation information, where the supplementary recommendation information belongs to the second recommendation information.
The second setting ratio may be set according to an actual demand, and for example, if the first setting ratio is 0.3, the second setting ratio may be set to a value slightly higher than the first setting ratio according to the actual demand. For example, the second setting duty is set to 0.5. When the service platform determines that the proportion of the first recommendation information in the target recommendation information sequence exceeds the second set proportion, a certain amount of target recommendation information can be selected according to the second set proportion, and the amount of the first recommendation information contained in the target recommendation information is replaced by the target recommendation information, of course, the second set proportion can also be consistent with the first set proportion.
It can be seen from the above method that, when the service platform performs model training on the prediction model, the optimization target can be set as the information recommendation degree corresponding to each sample information sequence that can be accurately predicted by the prediction model, and the proportion of the first sample information in the sample information sequence selected by the prediction model is approximately close to the first set proportion required in the actual demand, so that the service platform can complete the model training stage, and the purpose of constraining the recommendation cost of each recommendation information displayed in the service scene and achieving the purpose of enabling the first recommendation information included in each recommendation information viewed by the user to be neither too much nor too little is achieved.
Based on the same idea, the present specification further provides a corresponding apparatus for model training and information recommendation, as shown in fig. 4 and 5.
Fig. 4 is a schematic diagram of a model training apparatus provided in this specification, which specifically includes:
an obtaining module 401, configured to obtain a plurality of sample information sequences, where each sample information sequence includes first sample information and second sample information, and recommendation cost of the first sample information is higher than recommendation cost of the second sample information;
the prediction module 402 is configured to select at least one sample information sequence from the plurality of sample information sequences, and input feature information corresponding to the selected at least one sample information sequence into a preset prediction model, so as to determine at least one to-be-recommended sample information sequence from the plurality of sample information sequences through the prediction model;
a determining module 403, configured to determine a ratio of the first sample information in the at least one to-be-recommended sample information sequence as a comprehensive ratio;
a training module 404, configured to train the prediction model with a goal of minimizing a deviation between the at least one to-be-recommended sample information sequence and a target sample information sequence included in the plurality of sample information sequences, and minimizing a deviation between the comprehensive proportion and a first set proportion as an optimization goal.
Optionally, the predicting module 402 is specifically configured to input the feature information corresponding to the selected at least one sample information sequence into the prediction model, so as to obtain, for each sample information sequence in the selected at least one sample information sequence, a predicted information recommendation degree corresponding to the sample information sequence; and determining at least one to-be-recommended sample information sequence from the plurality of sample information sequences according to the predicted information recommendation degree corresponding to each sample information sequence.
Optionally, the predicting module 402 is specifically configured to determine, from the at least one selected sample information sequence, a sample information sequence with the highest information recommendation degree as a to-be-recommended sample information sequence included in the at least one selected sample information sequence.
Fig. 5 is a schematic diagram of an information recommendation apparatus provided in this specification, specifically including:
a receiving module 501, configured to receive a service request sent by a user;
a determining module 502, configured to determine, according to the service request, each piece of information to be recommended corresponding to the user, where the each piece of information to be recommended includes first recommendation information and second recommendation information, and recommendation cost of the first recommendation information is higher than recommendation cost of the second recommendation information;
the prediction module 503 is configured to determine each candidate recommendation information sequence according to each piece of information to be recommended, and input feature information corresponding to each candidate recommendation information sequence into a pre-trained prediction model to determine a target recommendation information sequence from each candidate recommendation information sequence, where the prediction model is obtained by training through the model training method;
and a recommending module 504, configured to recommend information to the user according to the target recommendation information sequence.
Optionally, the prediction module 503 is specifically configured to input the feature information corresponding to each candidate recommended information sequence into the prediction model, and determine, for each candidate recommended information sequence, an information recommendation degree corresponding to the candidate recommended information sequence; and determining a target recommendation information sequence in each candidate recommendation information sequence according to the information recommendation degree corresponding to each candidate recommendation information sequence.
Optionally, before the recommending module 504 recommends the information to be recommended to the user according to the target recommendation information sequence, the recommending module 504 is further configured to, if it is determined that the ratio of the first recommendation information in the target recommendation information sequence in the target recommendation sequence exceeds a second set ratio, determine recommendation information matched with the user as supplementary recommendation information according to historical behavior data of the user, where the supplementary recommendation information belongs to second recommendation information; and replacing the first recommendation information contained in the target recommendation information sequence with the supplementary recommendation information.
The present specification also provides a computer-readable storage medium storing a computer program, which can be used to execute the method for model training and information recommendation shown in fig. 1 or fig. 3.
This specification also provides a schematic block diagram of the electronic device shown in fig. 6. As shown in fig. 6, at the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, but may also include hardware required for other services. The processor reads a corresponding computer program from the non-volatile memory into the memory and then runs the computer program to implement the model training and information recommendation method described in fig. 1 or 3 above. Of course, besides the software implementation, the present specification does not exclude other implementations, such as logic devices or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, and may be hardware or logic devices.
In the 90 s of the 20 th century, improvements in a technology could clearly distinguish between improvements in hardware (e.g., improvements in circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements in process flow). However, as technology advances, many of today's process flow improvements have been seen as direct improvements in hardware circuit architecture. Designers almost always obtain a corresponding hardware circuit structure by programming an improved method flow into the hardware circuit. Thus, it cannot be said that an improvement in the process flow cannot be realized by hardware physical modules. For example, a Programmable Logic Device (PLD), such as a Field Programmable Gate Array (FPGA), is an integrated circuit whose Logic functions are determined by programming the Device by a user. A digital system is "integrated" on a PLD by the designer's own programming without requiring the chip manufacturer to design and fabricate application-specific integrated circuit chips. Furthermore, nowadays, instead of manually making an Integrated Circuit chip, such Programming is often implemented by "logic compiler" software, which is similar to a software compiler used in program development and writing, but the original code before compiling is also written by a specific Programming Language, which is called Hardware Description Language (HDL), and HDL is not only one but many, such as abel (advanced Boolean Expression Language), ahdl (alternate Hardware Description Language), traffic, pl (core universal Programming Language), HDCal (jhdware Description Language), lang, Lola, HDL, laspam, hardward Description Language (vhr Description Language), vhal (Hardware Description Language), and vhigh-Language, which are currently used in most common. It will also be apparent to those skilled in the art that hardware circuitry that implements the logical method flows can be readily obtained by merely slightly programming the method flows into an integrated circuit using the hardware description languages described above.
The controller may be implemented in any suitable manner, for example, the controller may take the form of, for example, a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro) processor, logic gates, switches, an Application Specific Integrated Circuit (ASIC), a programmable logic controller, and an embedded microcontroller, examples of which include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320, the memory controller may also be implemented as part of the control logic for the memory. Those skilled in the art will also appreciate that, in addition to implementing the controller as pure computer readable program code, the same functionality can be implemented by logically programming method steps such that the controller is in the form of logic gates, switches, application specific integrated circuits, programmable logic controllers, embedded microcontrollers and the like. Such a controller may thus be considered a hardware component, and the means included therein for performing the various functions may also be considered as a structure within the hardware component. Or even means for performing the functions may be regarded as being both a software module for performing the method and a structure within a hardware component.
The systems, devices, modules or units illustrated in the above embodiments may be implemented by a computer chip or an entity, or by a product with certain functions. One typical implementation device is a computer. In particular, the computer may be, for example, a personal computer, a laptop computer, a cellular telephone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
For convenience of description, the above devices are described as being divided into various units by function, and are described separately. Of course, the functions of the various elements may be implemented in the same one or more software and/or hardware implementations of the present description.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
As will be appreciated by one skilled in the art, embodiments of the present description may be provided as a method, system, or computer program product. Accordingly, the description may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the description may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
This description may be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media including memory storage devices.
All the embodiments in the present specification are described in a progressive manner, and the same and similar parts among the embodiments are referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is substantially similar to the method embodiment, the description is simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only an example of the present specification, and is not intended to limit the present specification. Various modifications and alterations to this description will become apparent to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present specification should be included in the scope of the claims of the present specification.

Claims (10)

1. A method of model training, comprising:
the method comprises the steps of obtaining a plurality of sample information sequences, wherein the sample information sequences comprise at least one of sample information displayed to a user and sample information not displayed to the user, the sample information sequences comprise first sample information and second sample information, and the first sample information is high in recommendation cost compared with the second sample information;
selecting at least one sample information sequence from the plurality of sample information sequences, inputting the characteristic information corresponding to the selected at least one sample information sequence into a preset prediction model, and determining at least one to-be-recommended sample information sequence from the plurality of sample information sequences through the prediction model, wherein the characteristic information corresponding to the sample information sequence comprises: at least one of merchant information, user information, time and place contained in the sample information sequence and the arrangement sequence of the merchant information in the sample information sequence;
determining the ratio of the first sample information in the at least one sample information sequence to be recommended as a comprehensive ratio;
training the prediction model by taking the minimization of the deviation between the at least one sample information sequence to be recommended and a target sample information sequence contained in the plurality of sample information sequences and the minimization of the deviation between the comprehensive ratio and a first set ratio as optimization targets;
the trained prediction model is used for determining a target recommendation information sequence for recommending information to a user.
2. The method according to claim 1, wherein the step of inputting the selected feature information corresponding to the at least one sample information sequence into a preset prediction model to determine at least one sample information sequence to be recommended from the plurality of sample information sequences through the prediction model specifically comprises:
inputting the selected characteristic information corresponding to the at least one sample information sequence into the prediction model to obtain the predicted information recommendation degree corresponding to the sample information sequence for each sample information sequence in the selected at least one sample information sequence;
and determining at least one to-be-recommended sample information sequence from the plurality of sample information sequences according to the predicted information recommendation degree corresponding to each sample information sequence.
3. The method according to claim 2, wherein determining at least one sample information sequence to be recommended from the plurality of sample information sequences according to the predicted information recommendation degree corresponding to each sample information sequence includes:
and determining a sample information sequence with the highest information recommendation degree from the at least one selected sample information sequence as a to-be-recommended sample information sequence contained in the at least one selected sample information sequence.
4. A method for information recommendation, comprising:
receiving a service request sent by a user;
determining each piece of information to be recommended corresponding to the user according to the service request, wherein each piece of information to be recommended comprises first recommendation information and second recommendation information, and the recommendation cost of the first recommendation information is higher than that of the second recommendation information;
determining each candidate recommendation information sequence according to the information to be recommended, and inputting the characteristic information corresponding to each candidate recommendation information sequence into a pre-trained prediction model to determine a target recommendation information sequence from each candidate recommendation information sequence, wherein the prediction model is obtained by training through the method of any one of claims 1 to 3;
and recommending information to the user according to the target recommendation information sequence.
5. The method of claim 4, wherein the feature information corresponding to each candidate recommendation information sequence is input into a pre-trained prediction model to obtain a target recommendation information sequence in each candidate recommendation information sequence, and specifically includes:
inputting the characteristic information corresponding to each candidate recommendation information sequence into the prediction model, and determining the information recommendation degree corresponding to each candidate recommendation information sequence aiming at each candidate recommendation information sequence;
and determining a target recommendation information sequence in each candidate recommendation information sequence according to the information recommendation degree corresponding to each candidate recommendation information sequence.
6. The method of claim 5, wherein before recommending the information to be recommended to the user according to the target recommendation information sequence, the method further comprises:
if the proportion of the first recommendation information in the target recommendation sequence in the target recommendation information sequence is determined to exceed a second set proportion, determining recommendation information matched with the user as supplementary recommendation information according to the historical behavior data of the user, wherein the supplementary recommendation information belongs to second recommendation information;
and replacing the first recommendation information contained in the target recommendation information sequence with the supplementary recommendation information.
7. An apparatus for model training, comprising:
the system comprises an acquisition module, a processing module and a processing module, wherein the acquisition module is used for acquiring a plurality of sample information sequences, the sample information sequences comprise at least one of sample information displayed to a user and sample information not displayed to the user, the sample information sequences comprise first sample information and second sample information, and the first sample information is higher than the second sample information in recommendation cost;
the prediction module is used for selecting at least one sample information sequence from the plurality of sample information sequences, inputting the characteristic information corresponding to the selected at least one sample information sequence into a preset prediction model, and determining at least one to-be-recommended sample information sequence from the plurality of sample information sequences through the prediction model, wherein the characteristic information corresponding to the sample information sequence comprises: at least one of merchant information, user information, time and place contained in the sample information sequence and the arrangement sequence of the merchant information in the sample information sequence;
the determining module is used for determining the proportion of the first sample information in the at least one to-be-recommended sample information sequence as a comprehensive proportion;
the training module is used for training the prediction model by taking the minimum deviation between the at least one to-be-recommended sample information sequence and a target sample information sequence contained in the plurality of sample information sequences and the minimum deviation between the comprehensive proportion and a first set proportion as optimization targets;
the trained prediction model is used for determining a target recommendation information sequence for recommending information to a user.
8. An apparatus for information recommendation, comprising:
the receiving module is used for receiving a service request sent by a user;
the determining module is used for determining each piece of information to be recommended corresponding to the user according to the service request, wherein each piece of information to be recommended comprises first recommendation information and second recommendation information, and the recommendation cost of the first recommendation information is higher than that of the second recommendation information;
the prediction module is used for determining each candidate recommendation information sequence according to each piece of information to be recommended and inputting the characteristic information corresponding to each candidate recommendation information sequence into a pre-trained prediction model so as to determine a target recommendation information sequence from each candidate recommendation information sequence, wherein the prediction model is obtained by training through the method of any one of claims 1 to 3;
and the recommending module is used for recommending information to the user according to the target recommending information sequence.
9. A computer-readable storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, implements the method of any of the preceding claims 1-3 or 4-6.
10. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein the processor implements the method of any of claims 1 to 3 or 4 to 6 when executing the program.
CN202110280660.XA 2021-03-16 2021-03-16 Model training and information recommendation method and device Active CN113010564B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110280660.XA CN113010564B (en) 2021-03-16 2021-03-16 Model training and information recommendation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110280660.XA CN113010564B (en) 2021-03-16 2021-03-16 Model training and information recommendation method and device

Publications (2)

Publication Number Publication Date
CN113010564A CN113010564A (en) 2021-06-22
CN113010564B true CN113010564B (en) 2022-06-10

Family

ID=76408180

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110280660.XA Active CN113010564B (en) 2021-03-16 2021-03-16 Model training and information recommendation method and device

Country Status (1)

Country Link
CN (1) CN113010564B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019174395A1 (en) * 2018-03-13 2019-09-19 阿里巴巴集团控股有限公司 Method and apparatus for information recommendation, and device
CN110674408A (en) * 2019-09-30 2020-01-10 北京三快在线科技有限公司 Service platform, and real-time generation method and device of training sample
CN111552888A (en) * 2020-05-29 2020-08-18 腾讯科技(深圳)有限公司 Content recommendation method, device, equipment and storage medium
CN112418920A (en) * 2020-11-11 2021-02-26 北京三快在线科技有限公司 Training method of information recommendation model, information recommendation method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11030664B2 (en) * 2018-12-27 2021-06-08 Honeywell International Inc. Methods and systems for dynamically determining and adapting to cost impact during a flight

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2019174395A1 (en) * 2018-03-13 2019-09-19 阿里巴巴集团控股有限公司 Method and apparatus for information recommendation, and device
CN110674408A (en) * 2019-09-30 2020-01-10 北京三快在线科技有限公司 Service platform, and real-time generation method and device of training sample
CN111552888A (en) * 2020-05-29 2020-08-18 腾讯科技(深圳)有限公司 Content recommendation method, device, equipment and storage medium
CN112418920A (en) * 2020-11-11 2021-02-26 北京三快在线科技有限公司 Training method of information recommendation model, information recommendation method and device

Also Published As

Publication number Publication date
CN113010564A (en) 2021-06-22

Similar Documents

Publication Publication Date Title
CN114202370A (en) Information recommendation method and device
CN109062782B (en) Regression test case selection method, device and equipment
CN113011483B (en) Method and device for model training and business processing
CN110378400B (en) Model training method and device for image recognition
CN108985489B (en) Risk prediction method, risk prediction device and terminal equipment
CN107066518B (en) Data processing method and system
CN112966186A (en) Model training and information recommendation method and device
CN113688313A (en) Training method of prediction model, information pushing method and device
CN115238826B (en) Model training method and device, storage medium and electronic equipment
CN110826894A (en) Hyper-parameter determination method and device and electronic equipment
CN114332873A (en) Training method and device for recognition model
CN114997472A (en) Model training method, business wind control method and business wind control device
CN111241391A (en) Task recommendation method and device
CN111507726B (en) Message generation method, device and equipment
CN113010564B (en) Model training and information recommendation method and device
CN113325855B (en) Model training method for predicting obstacle trajectory based on migration scene
CN115758141A (en) Method and device for model training and business wind control
CN113626342B (en) Model online testing method and device
CN114120273A (en) Model training method and device
CN110704742B (en) Feature extraction method and device
CN113205377A (en) Information recommendation method and device
CN114926706A (en) Data processing method, device and equipment
CN109903165B (en) Model merging method and device
CN114119139A (en) Information recommendation method and device, storage medium and electronic equipment
CN108733564B (en) Browser performance testing method, device and equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20221025

Address after: 100102 4th floor 01, building 6, courtyard 6, Wangjing East Road, Chaoyang District, Beijing

Patentee after: Beijing Sankuai Network Technology Co.,Ltd.

Patentee after: BEIJING SANKUAI ONLINE TECHNOLOGY Co.,Ltd.

Address before: 100080 2106-030, 9 North Fourth Ring Road, Haidian District, Beijing.

Patentee before: BEIJING SANKUAI ONLINE TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right