CN114997907A - Prediction model training method, information recommendation method and device - Google Patents

Prediction model training method, information recommendation method and device Download PDF

Info

Publication number
CN114997907A
CN114997907A CN202210538666.7A CN202210538666A CN114997907A CN 114997907 A CN114997907 A CN 114997907A CN 202210538666 A CN202210538666 A CN 202210538666A CN 114997907 A CN114997907 A CN 114997907A
Authority
CN
China
Prior art keywords
service
user
information
historical
recommendation information
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.)
Pending
Application number
CN202210538666.7A
Other languages
Chinese (zh)
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 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 CN202210538666.7A priority Critical patent/CN114997907A/en
Publication of CN114997907A publication Critical patent/CN114997907A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • G06Q30/0202Market predictions or forecasting for commercial activities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9535Search customisation based on user profiles and personalisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/02Marketing; Price estimation or determination; Fundraising
    • G06Q30/0201Market modelling; Market analysis; Collecting market data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0631Item recommendations

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • Development Economics (AREA)
  • Strategic Management (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Entrepreneurship & Innovation (AREA)
  • General Business, Economics & Management (AREA)
  • Marketing (AREA)
  • Economics (AREA)
  • Game Theory and Decision Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The specification discloses a training method of a prediction model, a method and a device for recommending information, and particularly discloses that a training sample is obtained, historical business data and candidate information are input into the prediction model to be trained, the probability that a user clicks the candidate information and executes a business corresponding to the candidate information is determined through the prediction model on the basis of the environment where the user executes the business corresponding to the historical business data, the probability is used as a business execution rate corresponding to the candidate information, and then the deviation between the business execution rate and the label information of the training sample is minimized to serve as an optimization target, and the prediction model is trained. Therefore, when the candidate information is recommended to the user through the service execution rate predicted by the prediction model, the influence of the environment where the user is located on the preference of the user is considered, and the accuracy of the prediction model is improved.

Description

Prediction model training method, information recommendation method and device
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for training a prediction model and recommending information.
Background
In the existing recommendation service, when a merchant is pushed to a user, the interest preference of the user is generally learned through historical service data of the user based on a pre-trained prediction model, then, the matching degree between the interest preference of the user and information to be recommended is determined, the service execution rate of the user for each information to be recommended is predicted, and the information to be recommended with high service execution rate is preferentially recommended to the user. The higher the service execution rate is, the higher the probability that the user can continue to execute the order placing service after clicking the information to be recommended is.
However, when the prediction model recommends information for the user, the prediction model only considers whether the interest preference of the user is matched with the content of the historical recommendation information, but does not consider the environment where the user is located when recommending information to the user, and influences on the recommendation information browsed and clicked by the user and the recommendation information that the user continues to execute the service after clicking.
Disclosure of Invention
The present specification provides a method for training a prediction model, and a method and an apparatus for recommending information, 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 for training a prediction model, including:
acquiring a training sample, wherein the training sample comprises historical service data of a user and candidate information recommended to the user;
inputting the historical service data and the candidate information into a prediction model to be trained, and determining the probability of assuming that the user clicks the candidate information and executes the service corresponding to the candidate information on the basis of the environment where the user executes the service corresponding to the historical service data through the prediction model, wherein the probability is used as the service execution rate corresponding to the candidate information;
and training the prediction model by taking the minimized deviation between the business execution rate and the label information of the training sample as an optimization target.
Optionally, the predictive model comprises a first network;
determining, by the prediction model, a probability that the user is assumed to click the candidate information and execute the service corresponding to the candidate information on the basis of an environment in which the user executes the service corresponding to the historical service data, as a service execution rate corresponding to the candidate information, specifically including:
according to the historical service data, determining historical recommendation information clicked by the user before recommending the candidate information to the user as first historical recommendation information and determining historical recommendation information corresponding to the service executed by the user as second historical recommendation information;
for each piece of first historical recommendation information, determining a service loss characteristic when the user is supposed to execute a service corresponding to the first historical recommendation information, and for each piece of second historical recommendation information, determining a service loss characteristic when the user executes a service corresponding to the second historical recommendation information;
and inputting the service loss characteristic corresponding to each piece of first historical recommendation information, the service loss characteristic corresponding to each piece of second historical recommendation information and the environment data of the environment where the user is located when the candidate information is recommended to the user into the first network so as to determine the service execution rate corresponding to the candidate information on the basis of the environment where the user is located when the user executes the service corresponding to the historical service data based on the first network.
Optionally, the method includes inputting, to the first network, a service loss feature corresponding to each first historical recommendation information, a service loss feature corresponding to each second historical recommendation information, and environment data of an environment in which the user is located when the candidate information is recommended to the user, so as to determine, based on the first network, a service execution rate corresponding to the candidate information on the basis of the environment in which the user is located when the user executes a service corresponding to the historical service data, and specifically includes:
for each piece of first historical recommendation information, determining the similarity between the environment where the user clicks the first historical recommendation information and the environment corresponding to the environment data, and for each piece of second historical recommendation information, determining the similarity between the environment where the user executes the second historical recommendation information and the environment corresponding to the environment data;
and determining the service execution rate corresponding to the candidate information on the basis of the environment where the user executes the service corresponding to the historical service data according to the service loss characteristic corresponding to the first historical recommendation information with the similarity meeting the preset condition and the service loss characteristic corresponding to the service loss of the second historical recommendation information with the similarity meeting the preset condition.
Optionally, the method includes inputting, to the first network, a service loss feature corresponding to each first historical recommendation information, a service loss feature corresponding to each second historical recommendation information, and environment data of an environment in which the user is located when the candidate information is recommended to the user, so as to determine, based on the first network, a service execution rate corresponding to the candidate information on the basis of the environment in which the user is located when the user executes a service corresponding to the historical service data, and specifically includes:
for each second historical recommendation information, determining the correlation between the second historical recommendation information and each first historical recommendation information;
according to the correlation between the second historical recommendation information and each first historical recommendation information, adjusting the service loss characteristics corresponding to the second historical recommendation information;
and determining the service execution rate corresponding to the candidate information on the basis of the environment in which the user executes the service corresponding to the historical service data according to the service loss characteristic corresponding to each first historical recommendation information, the adjusted service loss characteristic corresponding to each second historical recommendation information and the environment data.
Optionally, the service loss feature includes a value used for characterizing consumption of a merchant to which the history recommendation information belongs by the user and/or a distance between the merchant to which the history recommendation information belongs and the user when the history recommendation information is recommended to the user.
Optionally, the prediction network further comprises: a second network;
inputting the historical service data and the candidate information into a prediction model to be trained, so as to determine, through the prediction model, a probability that the user is supposed to click the candidate information and execute a service corresponding to the candidate information on the basis of an environment in which the user executes the service corresponding to the historical service data, as a service execution rate corresponding to the candidate information, and specifically includes:
according to the historical service data, determining historical recommendation information clicked by the user before recommending the candidate information to the user as first historical recommendation information and determining historical recommendation information corresponding to the service executed by the user as second historical recommendation information;
for each piece of first historical recommendation information, determining a distance between the user and a business to which the first historical recommendation information belongs when the user is supposed to execute a business corresponding to the first historical recommendation information as a distance corresponding to the first historical recommendation information, and for each piece of second historical recommendation information, determining a distance between the user and a business to which the second historical recommendation information belongs when the user is supposed to execute a business corresponding to the second historical recommendation information as a distance corresponding to the second historical recommendation information;
and determining the probability that the user clicks the candidate information and executes the service corresponding to the candidate information according to the distance corresponding to each piece of first historical recommendation information and the distance corresponding to each piece of second historical recommendation information, and taking the probability as the service execution rate corresponding to the candidate information.
Optionally, determining, according to a distance corresponding to each first historical recommendation information and a distance corresponding to each second historical recommendation information, a probability that the user clicks the candidate information and executes a service corresponding to the candidate information, as a service execution rate corresponding to the candidate information, specifically including:
determining the distance between the user and a merchant to which the candidate information belongs when the candidate information is recommended to the user as a target distance;
and determining the probability that the user clicks the candidate information and executes the service corresponding to the candidate information according to the similarity between the target distance and the distance corresponding to each piece of first historical recommendation information and the similarity between the target distance and the distance corresponding to each piece of second historical recommendation information, and taking the probability as the service execution rate corresponding to the candidate information.
Optionally, determining, according to a similarity between the target distance and a distance corresponding to each first historical recommendation information and a similarity between the target distance and a distance corresponding to each second historical recommendation information, a probability that the user clicks the candidate information and executes a service corresponding to the candidate information, as a service execution rate corresponding to the candidate information, specifically including:
according to the similarity between the target distance and the distance corresponding to each piece of first historical recommendation information, determining the attention weight corresponding to each piece of first historical recommendation information, and according to the similarity between the target distance and the distance corresponding to each piece of second historical recommendation information, determining the attention weight corresponding to each piece of second historical recommendation information;
according to the attention weight corresponding to each piece of first historical recommendation information, weighting the distance corresponding to each piece of first historical recommendation information to obtain the weighted distance corresponding to each piece of first historical recommendation information, and according to the attention weight corresponding to each piece of second historical recommendation information, weighting the distance corresponding to each piece of second historical recommendation information to obtain the weighted distance corresponding to each piece of second historical recommendation information;
and determining the probability that the user clicks the candidate information and executes the service corresponding to the candidate information according to the weighted distance corresponding to each first historical recommendation information and the weighted distance corresponding to each second historical recommendation information, and taking the probability as the service execution rate corresponding to the candidate information.
Optionally, determining, according to a similarity between the target distance and a distance corresponding to each first historical recommendation information and a similarity between the target distance and a distance corresponding to each second historical recommendation information, a probability that the user clicks the candidate information and executes a service corresponding to the candidate information, as a service execution rate corresponding to the candidate information, specifically including:
determining each first sub-distance sequence from a first distance sequence formed by distances corresponding to each first historical recommendation information through a preset sliding window, and determining each second sub-distance sequence from a second distance sequence formed by distances corresponding to each second historical recommendation information;
for each first sub-distance sequence, determining a distance feature between the target distance and the first sub-distance sequence according to the similarity between the target distance and the distance corresponding to each piece of first historical recommendation information contained in the first sub-distance sequence, and for each second sub-distance sequence, determining a distance feature between the target distance and the second sub-distance sequence according to the similarity between the target distance and the distance corresponding to each piece of second historical recommendation information contained in the second sub-distance sequence;
and determining the probability that the user clicks the candidate information and executes the service corresponding to the candidate information according to the distance feature corresponding to each first sub-distance sequence and the distance feature corresponding to each second sub-distance sequence, and taking the probability as the service execution rate corresponding to the candidate information.
Optionally, the historical service data and the candidate information are input into a prediction model to be trained, so that, based on an environment where the user executes a service corresponding to the historical service data, a probability that the user clicks the candidate information and executes the service corresponding to the candidate information is determined as a service execution rate corresponding to the candidate information by using the prediction model, and specifically includes:
inputting the historical service data and the candidate information into a prediction model to be trained, so that on the basis of determining the environment where the user executes the service corresponding to the historical service data, the probability of clicking the candidate information by the user is used as the predicted click rate corresponding to the candidate information, and after the user is supposed to click the candidate information, the probability of executing the candidate information by the user is used as the service conversion rate corresponding to the candidate information;
and determining the service execution rate corresponding to the candidate information according to the predicted click rate and the service conversion rate.
Optionally, before training the prediction model, with an optimization goal of minimizing a deviation between the service execution rate and the label information of the training samples, the method further includes:
predicting the probability of clicking the candidate information by the user on the basis of the environment of the user when the user executes the service corresponding to the historical service data through the prediction model, and taking the probability as the predicted click rate corresponding to the historical recommendation information;
training the prediction model by taking the minimized deviation between the business execution rate and the label information of the training sample as an optimization target, specifically comprising:
and training the prediction model by taking the minimized deviation between the predicted click rate and the click rate label and the minimized deviation between the business execution rate and the business execution rate label as optimization targets.
The present specification provides a method for information recommendation, including:
acquiring candidate information to be recommended to a user and historical service data of the user;
inputting the candidate information and the historical service data into a pre-trained prediction model aiming at each candidate information, so that the prediction model determines the probability of assuming that the user clicks the candidate information and executes the service corresponding to the candidate information on the basis of the environment where the user executes the service corresponding to the historical service data, and the probability is used as the service execution rate corresponding to the candidate information, wherein the prediction model is obtained by training through the method;
and recommending information to the user according to the service execution rate corresponding to each candidate information.
The present specification provides a training apparatus of a predictive model, including:
the acquisition module is used for acquiring a training sample, wherein the training sample comprises historical service data of a user and candidate information recommended to the user;
the service execution rate prediction module is used for inputting the historical service data and the candidate information into a prediction model to be trained, so that the probability that the user clicks the candidate information and executes the service corresponding to the candidate information is determined on the basis of the environment where the user executes the service corresponding to the historical service data through the prediction model, and the probability is used as the service execution rate corresponding to the candidate information;
and the training module is used for training the prediction model by taking the minimum deviation between the business execution rate and the label information of the training sample as an optimization target.
This specification provides an apparatus for information recommendation, including:
the acquisition module is used for acquiring each candidate information needing to be recommended to a user and historical service data of the user;
a service execution rate prediction module, configured to input, for each candidate information, the candidate information and the historical service data into a pre-trained prediction model, so that the prediction model determines, on the basis of an environment in which the user executes a service corresponding to the historical service data, a probability that the user clicks the candidate information and executes the service corresponding to the candidate information, as a service execution rate corresponding to the candidate information, where the prediction model is obtained by the above-mentioned method;
and the recommending module is used for recommending information to the user according to the service execution rate corresponding to each candidate information.
The present specification provides a computer-readable storage medium storing a computer program which, when executed by a processor, implements the above-described training method of a prediction model and information recommendation method.
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-mentioned training method of the prediction model and the information recommendation method when executing the program.
The technical scheme adopted by the specification can achieve the following beneficial effects:
in the training method of the prediction model and the information recommendation method provided by the specification, a training sample is obtained, historical business data and candidate information are input into the prediction model to be trained, and the probability that a user clicks the candidate information and executes a business corresponding to the candidate information is determined as a business execution rate corresponding to the candidate information on the basis of the environment where the user executes the business corresponding to the historical business data through the prediction model, so that the deviation between the business execution rate and the label information of the training sample is minimized as an optimization target, and the prediction model is trained. Then, when information is recommended to a user, aiming at each candidate information needing to be recommended to the user, the candidate information and historical business data of the user are input into a pre-trained prediction model, so that on the basis of the environment where the user executes the business corresponding to the historical business data, the prediction model determines the probability that the user is supposed to click the candidate information and execute the business corresponding to the candidate information, the probability is used as the business execution rate corresponding to the candidate information, and information is recommended to the user according to the business execution rate corresponding to each candidate information.
According to the method, when the candidate information is recommended to the user through the service execution rate predicted by the prediction model, the preference of the user under the environment where the user is located is considered, so that the accuracy of the prediction model is improved.
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 diagram of a prediction model referred to in this specification;
FIG. 2 is a schematic flow chart of a method for training a predictive model in the present specification;
FIG. 3 is a flow chart illustrating a method for information recommendation in the present specification;
FIG. 4 is a schematic diagram of a predictive model training apparatus provided herein;
FIG. 5 is a schematic diagram of an apparatus for information recommendation provided herein;
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 making any creative effort belong to the protection scope of the present specification.
In order to solve the problem that the service execution rate predicted by the prediction model has a large deviation due to the fact that the prediction model does not consider the environment where the user is located when recommending information to the user, the influence on the recommended information browsed and clicked by the user and the recommended information of the service which is continuously executed after the user clicks, the present specification provides a prediction model which comprises an interest sub-network, a first network, a second network and a prediction sub-network, and the prediction model is shown in fig. 1. When the prediction model is trained, a training sample is obtained, the training sample comprises historical business data of a user and candidate information recommended to the user, then the historical business data and the candidate information of the user are input into the prediction model to be trained, on the basis of the environment where the prediction model is located when the user executes business corresponding to the historical business data, the probability that the user clicks the candidate information and executes the business corresponding to the candidate information is determined and serves as the business execution rate corresponding to the candidate information, and finally the prediction model is trained by taking the minimum deviation between the business execution rate and the label information of the training sample as an optimization target.
When the service execution rate is determined, the prediction model inputs historical service data of a user, candidate information and environment data of the environment where the user is located when the candidate information is recommended to the user into an interest sub-network, determines basic preference characteristics of the user aiming at the candidate information, at the same time, inputting the historical service data of the user, the candidate information and the environment data into the first network, determining a service loss characteristic assuming that the user executes a service corresponding to the first historical recommendation information (i.e., the historical recommendation information actually clicked by the user before recommending the candidate information to the user in the historical service data), and a service loss characteristic when the user executes a service corresponding to the second historical recommendation information (i.e., the historical recommendation information corresponding to the service executed by the user before recommending the candidate information to the user in the historical service data). In addition, historical service data of the user is input into the second network, and the distance corresponding to each piece of first historical recommendation information and the distance corresponding to each piece of second historical recommendation information are determined. And finally, predicting the probability of the assumed user clicking the candidate information and executing the service corresponding to the candidate information according to the output results of the interest sub-network, the online cost preference network and the offline cost preference network, taking the probability as the service execution rate corresponding to the candidate information, and training the prediction model by taking the minimum deviation between the service execution rate and the label information of the training sample as an optimization target.
Therefore, the prediction model not only considers the matching degree between the basic preference and the candidate information of the user, but also considers the influence of the environment where the user is located on the preference of the user when the candidate information is recommended to the user, and the precision of the prediction model is improved.
The O2O service is a business model combining online and offline, and when a user places an order, the user usually selects a commodity online and goes offline to an ordering merchant to consume the purchased commodity to complete the order. As such, the costs that the user needs to incur include the cost of the user paying online and the cost of going offline. Therefore, when the service execution rate of the user for the candidate information is predicted, the prediction model considers the distance between the user and the business company To which the candidate information belongs when the candidate information is recommended To the user, so that the prediction model can be applied To O2O (Online To Offline) service which is combined Online and Offline, and can predict the service execution rate of the service corresponding To the candidate information after the user clicks the candidate information so as To recommend the information To the user.
The training scheme of the prediction model and the scheme of information recommendation provided in the present specification will be described in detail below with reference to embodiments.
Fig. 2 is a schematic flow chart of a training method of a prediction model in this specification, which specifically includes the following steps:
step S200, obtaining a training sample, wherein the training sample comprises historical service data of a user and candidate information recommended to the user.
The execution subject of the prediction model training method and the information recommendation method provided in this specification may be a terminal device such as a desktop computer, or may be a server or a service platform that provides service support for an information recommendation service. For convenience of description, the following describes a method for training a prediction model and a method for information recommendation, which are provided in this specification, with only a service platform as an execution subject.
In specific implementation, a service platform first obtains a training sample, wherein the training sample comprises historical service data of a user and candidate information recommended to the user. The candidate information may be various data such as advertisements, merchants, commodities, user comments, and the like, which need to be recommended to the user.
The service record of each service executed by the user is recorded in the historical service data of the user, and the service record comprises first historical recommendation information clicked and viewed by the user in history, the distance between a merchant to which each first historical recommendation information belongs and the user, the per-capita consumption amount corresponding to the merchant to which each first historical recommendation information belongs, the bill amount corresponding to the merchant to which each first historical recommendation information belongs, second historical recommendation information clicked and executed by the user in history, the consumption amount of the user at the merchant to which each second historical recommendation information belongs, the per-capita consumption amount corresponding to the merchant to which each second historical recommendation information belongs, the bill amount corresponding to the merchant to which each second historical recommendation information belongs, and the like.
In addition, the training sample may also include attribute information of the user, where the attribute information includes information that can embody basic characteristics of the user, such as user age, user gender, city where the user is located, and user native place, which will not be described in detail herein.
The training sample will also include environmental data of the environment in which the user was located when the information was recommended to the user. The environmental data may include: weather information of the user's location (including the current temperature (e.g., 35 ℃), and weather (e.g., rain, snow, strong wind, etc.)), city code of the user's city, device model of the terminal device used by the user, and the like.
It should be further noted that the candidate information is also historical recommendation information historically recommended to the user, and the label information of the training sample including the candidate information may be determined according to whether the user clicks the candidate information or not, and whether the user performs a service corresponding to the candidate information after clicking the candidate information.
Step S202, inputting the historical service data and the candidate information into a prediction model to be trained, and determining the probability of assuming that the user clicks the candidate information and executes the service corresponding to the candidate information on the basis of the environment where the user executes the service corresponding to the historical service data through the prediction model, wherein the probability is used as the service execution rate corresponding to the candidate information.
In this specification, the prediction model includes four networks, namely, an interest sub-network, a first network, a second network, and a prediction sub-network. In specific implementation, a service platform inputs historical service data of a user and the candidate information into a prediction model to be trained, so as to determine a basic preference characteristic of the user for the candidate information through an interest subnetwork, determine a service loss characteristic when the user executes a service corresponding to historical recommendation information through a first network, determine a distance corresponding to the historical recommendation information of the user executed the service through a second network, and finally input the basic preference characteristic, the service loss characteristic and the distance corresponding to the historical recommendation information of the user executed the service into the prediction subnetwork, so as to predict a probability that the user is supposed to click the candidate information and execute the service corresponding to the candidate information, and take the probability as a service execution rate corresponding to the candidate information.
As will be described in detail below, the process of determining the service execution rate corresponding to the candidate information.
First, the service platform needs to determine the basic preference characteristics of the user through the interest sub-network. Specifically, the service platform inputs candidate information recommended to a user, historical service data of the user, user attribute information and environment data of the environment where the user is located when the candidate information is recommended to the user into an interest sub-network, so that the interest sub-network encodes the historical service data and the user attribute information to obtain a user portrait feature U of the user, encodes the candidate information to obtain a recommended information feature S of the candidate information, and encodes the environment data to obtain an environment feature C corresponding to the environment where the user is located when the candidate information is recommended to the user. Then, the interest sub-network splices the user portrait characteristic U, the recommended information characteristic S of the candidate information and the environment characteristic C, and performs characteristic extraction through a full connection layer to obtain the interest preference characteristic b of the user for the candidate information u,s . Wherein, the interest preference characteristic b of the user aiming at the candidate information u,s Can be characterized as: b u,s ELU (MLP (concat (U, S, C))), where ELU () is the activation function and MLP () represents the processing of input data with a multi-layer perceptron.
In this specification, when encoding continuous data, it is necessary to first discretize the continuous data and then encode the data, and discrete data may be directly encoded.
Meanwhile, the service platform needs to determine, through the first network, a service loss feature corresponding to history recommendation information clicked by the user before recommending the candidate information to the user, and a service loss feature corresponding to history recommendation information corresponding to a service executed by the user.
In specific implementation, a service platform determines, according to historical service data, historical recommendation information clicked by a user before recommending candidate information to the user, as first historical recommendation information, and determines, for each piece of first historical recommendation information, a service loss characteristic when the user is assumed to execute a service corresponding to the first historical recommendation information. Meanwhile, the service platform determines historical recommendation information corresponding to the service executed by the user before the candidate information is recommended to the user as second historical recommendation information, and determines the service loss characteristic when the user executes the service corresponding to the second historical recommendation information according to each second historical recommendation information. And then, the service platform inputs the determined service loss characteristics corresponding to the first historical recommendation information, the determined service loss characteristics corresponding to the second historical recommendation information and the environment data of the environment where the user is located when the candidate information is recommended to the user into a first network in a prediction model, so that the service execution rate corresponding to the candidate information is determined on the basis of the environment where the user is located when the user executes the service corresponding to the historical service data based on the first network.
The service loss characteristics of the historical recommendation information comprise money consumed by merchants to which the historical recommendation information belongs and/or a distance between the merchants to which the historical recommendation information belongs and the user when the historical recommendation information is recommended to the user. In the actual service, in the service loss of the first historical recommendation information, the amount of money consumed by the user at the merchant to which the historical recommendation information belongs may be a counted customer order, a fee to be paid when the user executes the service, and the like. In the service loss of the second historical recommendation information, the amount of money consumed by the user in the merchant to which the historical recommendation information belongs is the actual amount of money consumed by the user.
Thus, the service loss characteristic when the user executes the service corresponding to the historical recommendation information can be characterized as follows:
Figure BDA0003647442810000131
Figure BDA0003647442810000132
the merchant identification represents a merchant to which the ith historical recommendation information belongs when the user executes a service corresponding to the ith historical recommendation information;
Figure BDA0003647442810000133
the distance between a merchant to which the ith historical recommendation information belongs and the user is specially represented when the user executes the service corresponding to the ith historical recommendation information;
Figure BDA0003647442810000134
and characterizing the amount of money consumed by the user at the merchant to which the ith historical recommendation information belongs when the user executes the service corresponding to the ith historical recommendation information.
Therefore, through the formula, the service loss characteristics corresponding to the first historical recommendation information can be determined
Figure BDA0003647442810000135
Service loss characteristics corresponding to each second historical recommendation information
Figure BDA0003647442810000136
Then, the service loss characteristics corresponding to the first historical recommendation information are obtained
Figure BDA0003647442810000137
Service loss characteristics corresponding to each second historical recommendation information
Figure BDA0003647442810000138
And inputting the information into a first network so as to determine the service execution rate corresponding to the candidate information on the basis of the environment of the user when the user executes the service corresponding to the historical service data based on the first network.
Before determining the service execution rate corresponding to the candidate information according to the service loss characteristics based on the first network, the service platform may further screen the first historical recommendation information and the second historical recommendation information respectively to determine the first historical recommendation information matched with the environmental data of the environment where the user is located when the candidate information is recommended to the user and the second historical recommendation information matched with the environmental data of the environment where the user is located when the candidate information is recommended to the user, and then determine the service execution rate corresponding to the candidate information according to the screened first historical recommendation information and the second historical recommendation information.
In specific implementation, the service platform may determine, for each first historical recommendation information, a similarity between an environment in which the user clicks the first historical recommendation information and an environment corresponding to the environment data, then screen out a service loss feature corresponding to the first historical recommendation information whose similarity satisfies a preset condition, and at the same time, determine, for each second historical recommendation information, a similarity between an environment in which the user executes the second historical recommendation information and an environment corresponding to the environment data, and then screen out a service loss feature corresponding to the second historical recommendation information whose similarity satisfies the preset condition. And then, determining a service execution rate corresponding to the candidate information on the basis of the environment where the user executes the service corresponding to the historical service data according to the service loss characteristic corresponding to the first historical recommendation information with the similarity meeting the preset condition and the service loss characteristic corresponding to the service loss of the second historical recommendation information with the similarity meeting the preset condition.
The similarity between the environment where the user clicks the first historical recommendation information and the environment corresponding to the environment data and the similarity between the environment where the user executes the second historical recommendation information and the environment corresponding to the environment data are determined, and the similarity can be achieved through a sparse self-attention mechanism.
Specifically, the specific formula of the sparse self-attention mechanism is as follows:
Figure BDA0003647442810000141
in the above formula, topk (-) represents taking the k pieces of historical recommendation information most relevant to the environmental data of the environment where the user is located when recommending the candidate information to the user;
q may be used to characterize a query;
K T transposes that can be used to characterize the key being queried;
v may be used to characterize the value of the key being queried;
Figure BDA0003647442810000151
can be used to characterize the evolution of the vector dimensions.
Thus, the service loss characteristics corresponding to the first historical recommendation information with the similarity meeting the preset condition are expressed as follows:
Figure BDA0003647442810000152
wherein Q c =σ(W c ×C+b c ) The characteristic query condition is the environmental characteristics of the environment where the user is located when the candidate information is recommended to the user;
Figure BDA0003647442810000153
representing a query key formed by service loss characteristics corresponding to each piece of first historical recommendation information;
Figure BDA0003647442810000154
a value of a key representing a query composed of service loss characteristics corresponding to each of the first historical recommendation information;
W c ,
Figure BDA0003647442810000155
and, b c ,
Figure BDA0003647442810000156
Is a learnable parameter matrix;
H c performing historical clicks for a hypothetical userThe first historical recommendation information corresponds to service loss characteristics during service.
As can be seen, the output of the spark attention is the service loss of the service corresponding to the plurality of pieces of first historical recommendation information having the highest correlation with the environmental features of the environment where the user is located when the candidate information is recommended to the user.
Similarly, the service loss characteristic corresponding to the first historical recommendation information with the similarity meeting the preset condition is expressed as:
Figure BDA0003647442810000157
wherein Q c =σ(W c ×C+b c ) The characteristic query condition is the environmental characteristics of the environment where the user is located when the candidate information is recommended to the user;
Figure BDA0003647442810000158
representing a query key formed by service loss characteristics corresponding to each second historical recommendation information;
Figure BDA0003647442810000159
a value of a key indicating a query composed of service loss characteristics corresponding to each of the second historical recommendation information;
W c ,
Figure BDA0003647442810000161
and, b c ,
Figure BDA0003647442810000162
A parameter matrix needing to be learned is obtained;
H o and recommending the service loss characteristic when the information corresponds to the service for the second history of the service which is executed by the user in history.
As can be seen, the output of the spark attention is the service loss of the service corresponding to the plurality of pieces of second historical recommendation information having the highest correlation with the environmental features of the environment where the user is located when the candidate information is recommended to the user.
In this way, the service loss characteristic corresponding to the first historical recommendation information whose similarity satisfies the preset condition may be characterized as follows:
Figure BDA0003647442810000163
wherein,
Figure BDA0003647442810000164
and characterizing the service loss characteristic when the ith first historical recommendation information in the first historical recommendation information of which the user execution similarity meets the preset condition corresponds to the service. The service loss characteristic corresponding to the second historical recommendation information with the similarity meeting the preset condition can be characterized as follows:
Figure BDA0003647442810000165
the method is characterized in that the method comprises the following steps of,
Figure BDA0003647442810000166
and characterizing the service loss characteristic when the ith first historical recommendation information in the first historical recommendation information of which the user execution similarity meets the preset condition corresponds to the service.
Therefore, the service execution rate corresponding to the candidate information is determined only by using the service loss characteristic corresponding to the first historical recommendation information with the similarity meeting the preset condition and the service loss characteristic corresponding to the first historical recommendation information with the similarity, so that the occupied resource amount can be reduced, and meanwhile, the extracted service loss characteristic is more similar to the service loss actually preferred by the current user, so that the precision of the prediction model can be improved.
Furthermore, a certain conversion rule exists between the first historical recommendation information clicked by the user in the actual service and the second historical recommendation information of the service actually executed by the user, in this specification, the correlation between the first historical recommendation information clicked by the user and the second historical recommendation information of the service executed by the user is learned through a first network to assist in determining the service execution rate corresponding to the candidate information, so as to improve the accuracy of the prediction model.
In specific implementation, the service platform determines, for each second historical recommendation information, a correlation between the second historical recommendation information and each first historical recommendation information, then adjusts a service loss characteristic corresponding to the second historical recommendation information according to the correlation between the second historical recommendation information and each first historical recommendation information, and finally determines a service execution rate corresponding to the candidate information on the basis of an environment where the user executes a service corresponding to the historical service data according to the service loss characteristic corresponding to each first historical recommendation information, the adjusted service loss characteristic corresponding to each second historical recommendation information, and the environment data.
In specific implementation, the service platform may adjust the service loss characteristic corresponding to the second historical recommendation information in the following two ways.
The method I comprises the following steps: and determining the correlation between the second historical recommendation information and each first historical recommendation information for each second historical recommendation information.
In specific implementation, for each second historical recommendation information, the service platform determines the correlation between the second historical recommendation information and each first historical recommendation information according to the service loss characteristics corresponding to the second historical recommendation information and the service loss characteristics corresponding to each first historical recommendation information. Then, according to the correlation between the second historical recommendation information and each piece of first historical recommendation information, determining an adjusting coefficient of each piece of first historical recommendation information relative to the second historical recommendation information. And finally, weighting the service loss corresponding to the first historical recommendation information according to the adjustment coefficient of the first historical recommendation information to the second historical recommendation information, and adjusting the service loss characteristic corresponding to the second historical recommendation information according to the obtained weighted service loss characteristic corresponding to each piece of first historical recommendation information to obtain the adjusted service loss characteristic corresponding to the second historical recommendation information.
The formula of the adjustment coefficient of the ith first historical recommendation information for the jth second historical recommendation information is as follows:
Figure BDA0003647442810000171
wherein,
Figure BDA0003647442810000172
representing service loss characteristics corresponding to ith first historical recommendation information in the first historical recommendation information with the similarity meeting the preset condition;
Figure BDA0003647442810000173
representing service loss characteristics corresponding to jth second historical recommendation information in the second historical recommendation information with the similarity meeting the preset conditions;
Figure BDA0003647442810000174
the correlation between the service loss characteristic corresponding to the ith first historical recommendation information clicked by the user and the service loss characteristic corresponding to the jth second historical recommendation information executed by the user is represented;
Figure BDA0003647442810000175
is the weight matrix to be learned.
Further, the adjusted service loss characteristic determination formula corresponding to the jth second historical recommendation information is as follows:
Figure BDA0003647442810000181
wherein,
Figure BDA0003647442810000182
representing service loss characteristics corresponding to ith first historical recommendation information in the first historical recommendation information with the similarity meeting the preset condition;
Figure BDA0003647442810000183
representing the service loss characteristic corresponding to the jth second historical recommendation information in the second historical recommendation information with the similarity meeting the preset condition;
Figure BDA0003647442810000184
the correlation between the service loss characteristics corresponding to the ith first historical recommendation information clicked by the user and the service loss characteristics corresponding to the jth second historical recommendation information executed by the user is represented;
Figure BDA0003647442810000185
the sum of the correlation between the service loss characteristics corresponding to the first historical recommendation information clicked by the user and the service loss characteristics corresponding to the second historical recommendation information executed by the user is represented;
Figure BDA0003647442810000186
the method comprises the steps that the correlation between service loss characteristics corresponding to ith first historical recommendation information clicked by a user and service loss characteristics corresponding to jth second historical recommendation information executed by the user is represented, and the proportion of the sum of the correlation between the service loss characteristics corresponding to the first historical recommendation information clicked by the user and the service loss characteristics corresponding to the second historical recommendation information executed by the user is occupied and is called as an adjustment coefficient of the ith first historical recommendation information for the jth second historical recommendation information;
Figure BDA0003647442810000187
the service loss characteristic corresponding to the ith first historical recommendation information after the service loss corresponding to the ith first historical recommendation information is weighted by adopting the adjustment coefficient of the ith first historical recommendation information aiming at the jth second historical recommendation information is shown;
Figure BDA0003647442810000188
and the weighted service loss characteristic corresponding to each piece of first historical recommendation information is adopted to adjust the service loss characteristic corresponding to the jth second historical recommendation information executed by the user, so that the adjusted service loss characteristic corresponding to the jth second historical recommendation information is obtained.
In the method, the overall relevance between each first merchant and each second merchant is comprehensively considered, and the relevance between the first merchant and the second merchant under the information of the merchant of the same category is determined by giving the corresponding characteristics for each merchant information in the transaction cost characteristics.
The second method comprises the following steps: and determining the correlation between each second characteristic and each second characteristic in the service loss corresponding to each first historical recommendation information according to each second characteristic in the service loss corresponding to each second historical recommendation information.
In a specific implementation, the service platform determines, for each second sub-feature in the service loss features corresponding to the second historical recommendation information, a correlation between the second sub-feature and each first sub-feature in the service loss features corresponding to each second historical recommendation information, and then determines, according to the correlation, an adjustment coefficient of each first sub-feature for each second sub-feature. And finally, weighting the first sub-feature according to the adjustment coefficient of the first sub-feature to the second sub-feature for each first sub-feature, and adjusting the second sub-feature according to each weighted first sub-feature to obtain an adjusted second sub-feature.
The service loss characteristics corresponding to the first historical recommendation information comprise three first sub-characteristics, which are respectively:
Figure BDA0003647442810000191
wherein,
Figure BDA0003647442810000192
representing each first historical recommendation information pairIn response to the merchant identification feature in the service loss feature,
Figure BDA0003647442810000193
the characteristic which represents the distance between a merchant to which the historical recommendation information belongs and the user when the historical recommendation information is recommended to the user in the service loss characteristic corresponding to each piece of first historical recommendation information,
Figure BDA0003647442810000194
and the characteristic which is used for representing the amount of money consumed by the user at the merchant to which the historical recommendation information belongs in the service loss characteristic corresponding to each piece of the first historical recommendation information is represented.
The service loss characteristics corresponding to the second historical recommendation information also comprise three second sub-characteristics which are respectively
Figure BDA0003647442810000195
Wherein,
Figure BDA0003647442810000196
indicating that each first historical recommendation information corresponds to a merchant identification feature in the service loss features,
Figure BDA0003647442810000197
the characteristic which represents the distance between the merchant to which the historical recommendation information belongs and the user when the corresponding characteristic in the service loss characteristic corresponding to each piece of first historical recommendation information is used for representing the historical recommendation information recommended to the user,
Figure BDA0003647442810000198
and the characteristic which is used for representing the amount of money consumed by the user in the merchant to which the historical recommendation information belongs in the service loss characteristic corresponding to each piece of first historical recommendation information is represented.
In this way, for a ctxi-dimension second sub-feature in the service loss features corresponding to the second historical recommendation information, a formula for determining a correlation between the ctxi-dimension feature and a ctxj-dimension first sub-feature in the service loss features corresponding to the first historical recommendation information is as follows:
Figure BDA0003647442810000199
wherein,
Figure BDA0003647442810000201
the ctxi dimension first sub-feature in the service loss feature corresponding to the first historical recommendation information is represented;
Figure BDA0003647442810000202
a ctxi dimension second sub-feature in the service loss feature corresponding to the second historical recommendation information is represented;
Figure BDA0003647442810000203
the correlation between a ctxi-dimension second sub-feature in the service loss feature corresponding to the second historical recommendation information and a ctxi-dimension first sub-feature in the service loss feature corresponding to the first historical recommendation information is represented;
Figure BDA0003647442810000204
a weight matrix to be learned.
Further, the determination formula of the adjusted transaction cost characteristic of the second merchant is as follows:
Figure BDA0003647442810000205
wherein,
Figure BDA0003647442810000206
the ctxi dimension first sub-feature in the service loss feature corresponding to the first historical recommendation information is represented;
Figure BDA0003647442810000207
represents the second history recommendation informationA ctxj-th dimension second sub-feature in the corresponding service loss feature;
Figure BDA0003647442810000208
the correlation between a ctxi-dimension first sub-feature in the service loss features corresponding to the first historical recommendation information and a ctxj-dimension second sub-feature in the service loss features corresponding to the second historical recommendation information is represented;
Figure BDA0003647442810000209
representing the sum of the correlation between each dimension first sub-feature in the service loss features corresponding to the first historical recommendation information and the ctxj dimension second sub-feature in the service loss features corresponding to the second historical recommendation information;
Figure BDA00036474428100002010
the specific gravity of the sum of the correlation between the ctxi-dimension first sub-feature in the service loss features corresponding to the first historical recommendation information and the ctxj-dimension second sub-feature in the service loss features corresponding to the second historical recommendation information is expressed and is referred to as the adjustment coefficient of the ctxi-dimension first sub-feature for the ctxj-dimension second sub-feature;
Figure BDA0003647442810000211
the ctxi dimension first sub-feature is weighted according to the adjustment coefficient of the ctxj dimension second sub-feature by adopting the ctxi dimension first sub-feature;
Figure BDA0003647442810000212
the representation is weighted and summed by adopting each weighted first sub-feature, and a ctxj dimension second sub-feature is addedAnd (5) characterizing.
For example,
Figure BDA0003647442810000213
and the correlation between the distance between the merchant to which the history recommendation information clicked by the user belongs and the user and the distance between the merchant to which the history recommendation information executed by the user belongs and the user is represented.
Figure BDA0003647442810000214
And the correlation between the distance between the merchant to which the history recommendation information clicked by the user belongs and the user and the consumption amount of the merchant to which the history recommendation information of the service executed by the user belongs is shown.
The service loss feature corresponding to the first historical recommendation information involved in the above process may be a service loss feature corresponding to each first historical recommendation information determined by the service platform from historical service data, or a service loss feature corresponding to the selected first historical recommendation information whose similarity satisfies a preset condition. Similarly, the service loss feature corresponding to the second historical recommendation information may be a service loss feature corresponding to each piece of second historical recommendation information determined by the service platform from the historical service data, or may be a service loss feature corresponding to the second historical recommendation information whose similarity satisfies a preset condition.
In actual service, the service platform may splice the adjusted service loss characteristic corresponding to the second historical recommendation information adjusted by the two adjustment methods with each adjusted second sub-characteristic, to obtain the adjusted service loss characteristic corresponding to each second historical recommendation information. And then pooling the obtained features, and determining the service execution rate corresponding to the candidate information on the basis of the environment where the user executes the service corresponding to the historical service data according to the pooled features.
In addition, the service platform also extracts the distance between the business corresponding to the first historical recommendation information and the business to which the first historical recommendation information belongs when the user executes the business corresponding to the first historical recommendation information, and the distance between the business corresponding to the second historical recommendation information and the business to which the second historical recommendation information belongs when the user executes the business corresponding to the second historical recommendation information through the second network, and determines the business execution rate corresponding to the candidate information on the basis of the environment where the user executes the business corresponding to the historical business data according to the extracted distances.
Specifically, the service platform determines, according to historical service data, historical recommendation information clicked by a user before recommending candidate information to the user as first historical recommendation information and historical recommendation information corresponding to a service executed by the user as second historical recommendation information, then, for each first historical recommendation information, determines, assuming that the user executes the service corresponding to the first historical recommendation information, a distance between the business affiliated with the first historical recommendation information and the business affiliated with the first historical recommendation information as a distance corresponding to the first historical recommendation information, and determines, for each second historical recommendation information, a distance between the business affiliated with the second historical recommendation information and the business affiliated with the second historical recommendation information when the user executes the service corresponding to the second historical recommendation information and the distance corresponding to the second historical recommendation information as a distance corresponding to the second historical recommendation information, and finally, according to the distance corresponding to each first historical recommendation information and the distance corresponding to each second historical recommendation information, and determining the probability of the user clicking the candidate information and executing the service corresponding to the candidate information as the service execution rate corresponding to the candidate information.
Specifically, the service platform may determine, when recommending the candidate information to the user, a distance between the user and a merchant to which the candidate information belongs as a target distance, and then determine, according to a similarity between the target distance and a distance corresponding to each first historical recommendation information and a similarity between the target distance and a distance corresponding to each second historical recommendation information, a probability that the user clicks the candidate information and executes a service corresponding to the candidate information.
Further, the service platform may determine the attention weight corresponding to each piece of first historical recommendation information according to the similarity between the target distance and the distance corresponding to each piece of first historical recommendation information, and determine the attention weight corresponding to each piece of second historical recommendation information according to the similarity between the target distance and the distance corresponding to each piece of second historical recommendation information. Then, according to the attention weight corresponding to each piece of first historical recommendation information, weighting the distance corresponding to each piece of first historical recommendation information to obtain a weighted distance corresponding to each piece of first historical recommendation information, and according to the attention weight corresponding to each piece of second historical recommendation information, weighting the distance corresponding to each piece of second historical recommendation information to obtain a weighted distance corresponding to each piece of second historical recommendation information. And finally, determining the probability that the user clicks the candidate information and executes the service corresponding to the candidate information according to the weighted distance corresponding to each first historical recommendation information and the weighted distance corresponding to each second historical recommendation information, and taking the probability as the service execution rate corresponding to the candidate information.
In actual service, the service platform determines each first sub-distance sequence from a first distance sequence composed of distances corresponding to each first historical recommendation information through a preset sliding window, determines each second sub-distance sequence from a second distance sequence composed of distances corresponding to each second historical recommendation information, then, for each first sub-distance sequence, determines a distance feature between a target distance and the first sub-distance sequence according to a similarity between the target distance and a distance corresponding to each first historical recommendation information included in the first sub-distance sequence, and for each second sub-distance sequence, determines a distance feature between the target distance and the second sub-distance sequence according to a similarity between the target distance and a distance corresponding to each second historical recommendation information included in the second sub-distance sequence, and finally, and determining the service execution rate corresponding to the candidate information according to the distance feature corresponding to each first sub-distance sequence and the distance feature corresponding to each second sub-distance sequence.
The distance between the merchant and the user to which the historical recommendation information belongs may be denoted as d ═ Embedding(s) dis ) If the length of the sliding window is set to be ws, the first distance sequence is divided according to the length of the sliding window to obtain a plurality of first sub-distance sequences which are recorded as ws
Figure BDA0003647442810000231
And dividing the second distance sequence into a plurality of distance sequences,obtaining a plurality of second sub-distance sequences
Figure BDA0003647442810000232
Then, the similarity between the ith first sub-range sequence and the target range can be characterized as:
Figure BDA0003647442810000233
correspondingly, the distance features between the first distance sequences may be expressed as:
Figure BDA0003647442810000234
the similarity between the ith sub-second sub-range sequence and the target range can be characterized as:
Figure BDA0003647442810000235
correspondingly, the distance features between the second distance sequences can be expressed as:
Figure BDA0003647442810000236
and finally, determining the service execution rate corresponding to the historical recommendation information according to the distance features between the first distance sequences and the distance features between the second distance sequences.
And step S204, training the prediction model by taking the minimum deviation between the business execution rate and the label information of the training sample as an optimization target.
In specific implementation, the service platform inputs historical service data and candidate information into a prediction model to be trained, so that on the basis of determining the environment where a user executes a service corresponding to the historical service data through the prediction model, the probability that the user clicks the candidate information is used as a predicted click rate corresponding to the candidate information, after the user clicks the candidate information is assumed, the probability that the user executes the candidate information is used as a service conversion rate corresponding to the candidate information, and then the product is carried out according to the predicted click rate and the service conversion rate to determine the service execution rate corresponding to the candidate information. And then, training the prediction model by taking the deviation between the minimum prediction service execution rate and the label information of the training sample as an optimization target.
When the user clicks the candidate information and executes the service corresponding to the candidate information, the label information of the training sample for the service execution rate is 1, otherwise, the label information is 0.
In actual business, in addition to training the prediction model according to the deviation between the business execution rate and the label information of the training sample, the prediction model can also be trained according to the deviation between the predicted click rate and the label information of the training sample. At this time, if the user does not click on the candidate information, the label information of the training sample for the predicted click rate is 0, and the label information of the training sample for the service execution rate is also 0. If the user clicks on the candidate information but does not execute the service corresponding to the rate candidate information, the label information of the training sample for the predicted click rate is 1, and the label information of the training sample for the service execution rate is also 0. If the user clicks the candidate information and executes the service corresponding to the candidate information, the label information of the training sample for the predicted click rate is 1, and the label information of the training sample for the service execution rate is also 1.
Through the steps, when the information to be recommended is recommended to the user, the preference of the user in the environment where the user is located and the correlation between the recommendation information of the service actually executed by the user and the recommendation information clicked by the user are considered, so that the accuracy of the prediction model is improved.
It should be noted that the service loss characteristics corresponding to the first historical recommendation information, the service loss characteristics corresponding to the second historical recommendation information whose similarity satisfies the preset condition, and the like are all sequences obtained by sorting according to a certain order (such as occurrence time). For example,
Figure BDA0003647442810000241
in (1),
Figure BDA0003647442810000242
the service loss characteristic when the user executes the service corresponding to the 1 st first historical recommendation information is shown,
Figure BDA0003647442810000243
indicating the traffic loss characteristic assuming that the user performs the service corresponding to the 2 nd first history recommendation information, … …,
Figure BDA0003647442810000244
the service loss characteristic is expressed when the user is supposed to execute the service corresponding to the jth first historical recommendation information.
Based on the prediction model trained by the training method, the present specification also provides a use method of the prediction model, which is specifically as follows.
Fig. 3 is a schematic flow chart of a method for recommending information in this specification, which specifically includes the following steps:
step S300, obtaining each candidate information needing to be recommended to the user and the historical service data of the user.
In specific implementation, when information needs to be recommended to a user, a service platform first acquires a plurality of candidate information needing to be recommended to the user and historical service data of the user. The candidate information recommended to the user and the historical recommendation information can be advertisements, merchants, commodities, user comments and the like.
In the actual service, the historical service data of the user records the service record of each service executed by the user, the business record comprises first historical recommendation information clicked and viewed by a user in history, a distance between a merchant to which each first historical recommendation information belongs and the user, a per-capita consumption amount corresponding to the merchant to which each first historical recommendation information belongs, a bill amount corresponding to the merchant to which each first historical recommendation information belongs, second historical recommendation information clicked by the user in history and executed with business, a consumption amount of the user at the merchant to which each second historical recommendation information belongs, a per-capita consumption amount corresponding to the merchant to which each second historical recommendation information belongs, a bill amount corresponding to the merchant to which each second historical recommendation information belongs, and the like.
In addition, the data input into the prediction model may also include attribute information of the user, where the attribute information includes information that can embody basic personal characteristics of the user, for example, the attribute information of the user may include: user age, user gender, city in which the user is located, native place of the user, and so forth.
In addition, in this specification, the data input into the prediction model by the service platform will also include environment data of the environment in which the user is located when recommending information to the user. The environmental data may include: weather information of the location of the user (including the temperature of the air at that time (e.g., 35 ℃), and weather (e.g., rain, snow, strong wind, etc.)), a city code of the city where the user is located, a device model of a terminal device used by the user, and the like.
Step S302, aiming at each candidate information, inputting the candidate information and the historical service data into a pre-trained prediction model, so that the prediction model determines the probability of assuming that the user clicks the candidate information and executes the service corresponding to the candidate information on the basis of the environment where the user executes the service corresponding to the historical service data, and the probability is used as the service execution rate corresponding to the candidate information.
Wherein, the prediction model is obtained by training the training method of the prediction model described above.
In specific implementation, after inputting historical service data and information into a prediction model, a service platform determines basic preference characteristics of a user, service loss characteristics corresponding to first historical recommendation information clicked by the user before recommending the candidate information to the user and service loss characteristics corresponding to second historical recommendation information corresponding to the service executed by the user according to the historical service data and the service loss characteristics corresponding to the second historical recommendation information, and inputs environment data of the environment where the user is located when recommending the candidate information to the user into a first network so as to determine the service execution rate corresponding to the candidate information on the basis of the environment where the user is located when executing the service corresponding to the historical service data based on the first network.
Specifically, the user determines, according to the historical service data, historical recommendation information clicked by the user before recommending candidate information to the user as first historical recommendation information, and historical recommendation information corresponding to a service executed by the user as second historical recommendation information. Then, for each piece of first historical recommendation information, determining a service loss characteristic when a user is supposed to execute a service corresponding to the first historical recommendation information, for each piece of second historical recommendation information, determining a service loss characteristic when the user executes a service corresponding to the second historical recommendation information, for each piece of first historical recommendation information, determining a similarity between an environment where the user clicks the first historical recommendation information and an environment corresponding to the environmental data, and for each piece of second historical recommendation information, determining a similarity between an environment where the user executes the second historical recommendation information and an environment corresponding to the environmental data, so as to screen out a service loss characteristic corresponding to the first historical recommendation information of which the similarity satisfies a preset condition, and a service loss characteristic corresponding to a service loss of the second historical recommendation information of which the similarity satisfies the preset condition,
then, for each second historical recommendation information, determining the correlation between the second historical recommendation information and each first historical recommendation information, then, according to the correlation between the second historical recommendation information and each first historical recommendation information, adjusting the service loss characteristics corresponding to the second historical recommendation information, and then, according to the service loss characteristics corresponding to each first historical recommendation information, the adjusted service loss characteristics corresponding to each second historical recommendation information, and the environment data, determining the service execution rate corresponding to the candidate information on the basis of the environment when the user executes the service corresponding to the historical service data
Meanwhile, the service platform determines, for each piece of first historical recommendation information, a distance between the service platform and a merchant to which the first historical recommendation information belongs when the user is supposed to execute the service corresponding to the first historical recommendation information as a distance corresponding to the first historical recommendation information, determines, for each piece of second historical recommendation information, a distance between the service platform and a merchant to which the second historical recommendation information belongs when the user executes the service corresponding to the second historical recommendation information as a distance corresponding to the second historical recommendation information, and determines a distance between the user and the merchant to which the candidate information belongs as a target distance when the candidate information is recommended to the user.
Then, through a preset sliding window, determining each first sub-distance sequence from a first distance sequence composed of distances corresponding to each first historical recommendation information, determining each second sub-distance sequence from a second distance sequence composed of distances corresponding to each second historical recommendation information, then, for each first sub-distance sequence, determining a distance feature between a target distance and the first sub-distance sequence according to the similarity between the target distance and the distance corresponding to each first historical recommendation information contained in the first sub-distance sequence, and for each second sub-distance sequence, determining a distance feature between the target distance and the second sub-distance sequence according to the similarity between the target distance and the distance corresponding to each second historical recommendation information contained in the second sub-distance sequence, so as to determine a distance feature between the target distance and the first sub-distance sequence according to the distance feature between the target distance and the first sub-distance sequence, and determining the service execution rate corresponding to the candidate information according to the distance characteristics between the target distance and the second sub-distance sequence. The detailed process can be referred to as a predictive model training process, and is not described in detail herein.
And step S304, recommending information to the user according to the service execution rate corresponding to each candidate information.
In specific implementation, after the service platform determines the service execution rate corresponding to each piece of information, the information can be sorted according to the size of the service execution rate corresponding to each piece of information in a descending order, then target information to be recommended to a user is selected from the information according to a sorting result, and then the target information is recommended to the user according to the arrangement condition of each display position in a page for displaying the information to the user.
In addition, the service platform can also sort the information according to the predicted visit rate corresponding to the information in the descending order, then, according to the sorting result, the information of which the service execution rate is greater than the set visit rate threshold value is taken as the target information to be recommended to the user, and then, according to the arrangement condition of each display position in the page for displaying the information to the user, the target information is recommended to the user. Of course, there are other methods for selecting the target information, which are not necessarily illustrated herein.
It should be noted that all actions of acquiring signals, information or data in this specification are performed under the premise of complying with the corresponding data protection regulation policy of the country of the location and obtaining the authorization given by the owner of the corresponding device.
Based on the same idea, the present specification further provides a training apparatus for a prediction model and an information recommendation apparatus, as shown in fig. 4 and 5.
Fig. 4 is a schematic diagram of a training apparatus for a prediction model provided in the present specification, which specifically includes:
an obtaining module 400, configured to obtain a training sample, where the training sample includes historical service data of a user and candidate information recommended to the user;
a service execution rate prediction module 401, configured to input the historical service data and the candidate information into a prediction model to be trained, so as to determine, through the prediction model, a probability that the user clicks the candidate information and executes a service corresponding to the candidate information on the basis of an environment in which the user executes a service corresponding to the historical service data, where the probability is used as a service execution rate corresponding to the candidate information;
a training module 402, configured to train the prediction model with a goal of minimizing a deviation between the service execution rate and the label information of the training samples as an optimization goal.
Optionally, the predictive model comprises a first network;
the service execution rate prediction module 401 is specifically configured to determine, according to the historical service data, historical recommendation information clicked by the user before recommending the candidate information to the user as first historical recommendation information, and historical recommendation information corresponding to a service executed by the user as second historical recommendation information; for each piece of first historical recommendation information, determining a service loss characteristic when the user is supposed to execute a service corresponding to the first historical recommendation information, and for each piece of second historical recommendation information, determining a service loss characteristic when the user executes a service corresponding to the second historical recommendation information; and inputting the service loss characteristic corresponding to each piece of first historical recommendation information, the service loss characteristic corresponding to each piece of second historical recommendation information and the environment data of the environment where the user is located when the candidate information is recommended to the user into the first network so as to determine the service execution rate corresponding to the candidate information on the basis of the environment where the user is located when the user executes the service corresponding to the historical service data based on the first network.
Optionally, the service execution rate prediction module 401 is specifically configured to determine, for each piece of first historical recommendation information, a similarity between an environment in which the user clicks the first historical recommendation information and an environment corresponding to the environment data, and determine, for each piece of second historical recommendation information, a similarity between an environment in which the user executes the second historical recommendation information and an environment corresponding to the environment data; and determining the service execution rate corresponding to the candidate information on the basis of the environment where the user executes the service corresponding to the historical service data according to the service loss characteristic corresponding to the first historical recommendation information with the similarity meeting the preset condition and the service loss characteristic corresponding to the service loss of the second historical recommendation information with the similarity meeting the preset condition.
Optionally, the service execution rate predicting module 401 is specifically configured to determine, for each piece of second historical recommendation information, a correlation between the second historical recommendation information and each piece of first historical recommendation information; according to the correlation between the second historical recommendation information and each first historical recommendation information, adjusting the service loss characteristics corresponding to the second historical recommendation information; and determining the service execution rate corresponding to the candidate information on the basis of the environment in which the user executes the service corresponding to the historical service data according to the service loss characteristic corresponding to each first historical recommendation information, the adjusted service loss characteristic corresponding to each second historical recommendation information and the environment data.
Optionally, the service loss feature includes a value used for characterizing consumption of a merchant to which the history recommendation information belongs by the user and/or a distance between the merchant to which the history recommendation information belongs and the user when the history recommendation information is recommended to the user.
Optionally, the prediction network further comprises: a second network;
the service execution rate prediction module 401 is specifically configured to determine, according to the historical service data, historical recommendation information clicked by the user before recommending the candidate information to the user as first historical recommendation information, and historical recommendation information corresponding to a service executed by the user as second historical recommendation information; for each piece of first historical recommendation information, determining a distance between the user and a business company to which the first historical recommendation information belongs when the user is supposed to execute a business corresponding to the first historical recommendation information as a distance corresponding to the first historical recommendation information, and for each piece of second historical recommendation information, determining a distance between the user and a business company to which the second historical recommendation information belongs when the user is supposed to execute a business corresponding to the second historical recommendation information as a distance corresponding to the second historical recommendation information; and determining the probability that the user clicks the candidate information and executes the service corresponding to the candidate information according to the distance corresponding to each piece of first historical recommendation information and the distance corresponding to each piece of second historical recommendation information, and taking the probability as the service execution rate corresponding to the candidate information.
Optionally, the service execution rate prediction module 401 is specifically configured to determine, when recommending the candidate information to the user, a distance between the user and a merchant to which the candidate information belongs, as a target distance; and determining the probability that the user clicks the candidate information and executes the service corresponding to the candidate information according to the similarity between the target distance and the distance corresponding to each piece of first historical recommendation information and the similarity between the target distance and the distance corresponding to each piece of second historical recommendation information, and taking the probability as the service execution rate corresponding to the candidate information.
Optionally, the service execution rate prediction module 401 is specifically configured to determine an attention weight corresponding to each first historical recommendation information according to a similarity between the target distance and a distance corresponding to each first historical recommendation information, and determine an attention weight corresponding to each second historical recommendation information according to a similarity between the target distance and a distance corresponding to each second historical recommendation information; according to the attention weight corresponding to each piece of first historical recommendation information, weighting the distance corresponding to each piece of first historical recommendation information to obtain the weighted distance corresponding to each piece of first historical recommendation information, and according to the attention weight corresponding to each piece of second historical recommendation information, weighting the distance corresponding to each piece of second historical recommendation information to obtain the weighted distance corresponding to each piece of second historical recommendation information; and determining the probability that the user clicks the candidate information and executes the service corresponding to the candidate information according to the weighted distance corresponding to each first historical recommendation information and the weighted distance corresponding to each second historical recommendation information, and taking the probability as the service execution rate corresponding to the candidate information.
Optionally, the service execution rate prediction module 401 is specifically configured to determine, through a preset sliding window, each first sub-distance sequence from a first distance sequence composed of distances corresponding to each first historical recommendation information, and determine each second sub-distance sequence from a second distance sequence composed of distances corresponding to each second historical recommendation information; for each first sub-distance sequence, determining a distance feature between the target distance and the first sub-distance sequence according to the similarity between the target distance and the distance corresponding to each piece of first historical recommendation information contained in the first sub-distance sequence, and for each second sub-distance sequence, determining a distance feature between the target distance and the second sub-distance sequence according to the similarity between the target distance and the distance corresponding to each piece of second historical recommendation information contained in the second sub-distance sequence; and determining the probability that the user clicks the candidate information and executes the service corresponding to the candidate information according to the distance feature corresponding to each first sub-distance sequence and the distance feature corresponding to each second sub-distance sequence, and taking the probability as the service execution rate corresponding to the candidate information.
Optionally, the service execution rate prediction module 401 is specifically configured to input the historical service data and the candidate information into a prediction model to be trained, so as to determine, through the prediction model, a probability that the user clicks the candidate information on the basis of an environment in which the user executes a service corresponding to the historical service data, where the environment is located, as a predicted click rate corresponding to the candidate information, and assume that after the user clicks the candidate information, the probability that the user executes the candidate information, as a service conversion rate corresponding to the candidate information; and determining the service execution rate corresponding to the candidate information according to the predicted click rate and the service conversion rate.
Optionally, the apparatus further comprises:
a click rate prediction module 403, configured to predict, before training the prediction model, a probability that the user clicks the candidate information on the basis of an environment in which the user executes a service corresponding to the historical service data through the prediction model, with a minimum deviation between the service execution rate and the label information of the training sample as an optimization target, as a predicted click rate corresponding to the historical recommendation information;
the training module 402 is specifically configured to train the prediction model with the objective of minimizing a deviation between the predicted click rate and the click rate label and minimizing a deviation between the business execution rate and the business execution rate label as optimization objectives.
Fig. 5 is a schematic diagram of an information recommendation apparatus provided in this specification, specifically including:
an obtaining module 500, configured to obtain candidate information that needs to be recommended to a user and historical service data of the user;
a service execution rate prediction module 501, configured to input the candidate information and the historical service data into a pre-trained prediction model for each candidate information, so that the prediction model determines, on the basis of an environment in which the user executes a service corresponding to the historical service data, a probability that the user clicks the candidate information and executes the service corresponding to the candidate information, as a service execution rate corresponding to the candidate information, where the prediction model is obtained by training the prediction model in the above-mentioned training method;
and the recommending module 502 is configured to recommend information to the user according to the service execution rate corresponding to each candidate information.
The present specification also provides a computer-readable storage medium storing a computer program, which can be used to execute the training method of the prediction model provided in fig. 2 or the information recommendation method provided in 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 method for training the prediction model described in fig. 2 or the method for recommending information described in fig. 3. 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 to a technology could clearly distinguish between improvements in hardware (e.g., improvements to circuit structures such as diodes, transistors, switches, etc.) and improvements in software (improvements to 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 the 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 regarded as a hardware component and the means for performing the various functions included therein may also be regarded as structures 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 flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations 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.
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 the other embodiments. In particular, as for the system embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and reference may be made to the partial description of the method embodiment for relevant points.
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 (16)

1. A method for training a predictive model, comprising:
acquiring a training sample, wherein the training sample comprises historical service data of a user and candidate information recommended to the user;
inputting the historical service data and the candidate information into a prediction model to be trained, and determining the probability of assuming that the user clicks the candidate information and executes the service corresponding to the candidate information on the basis of the environment where the user executes the service corresponding to the historical service data through the prediction model, wherein the probability is used as the service execution rate corresponding to the candidate information;
and training the prediction model by taking the minimized deviation between the business execution rate and the label information of the training sample as an optimization target.
2. The method of claim 1, wherein the predictive model comprises a first network;
determining, by the prediction model, a probability that the user is assumed to click the candidate information and execute the service corresponding to the candidate information on the basis of an environment in which the user executes the service corresponding to the historical service data, as a service execution rate corresponding to the candidate information, specifically including:
according to the historical service data, determining historical recommendation information clicked by the user before recommending the candidate information to the user as first historical recommendation information and determining historical recommendation information corresponding to the service executed by the user as second historical recommendation information;
for each piece of first historical recommendation information, determining a service loss characteristic when the user is supposed to execute a service corresponding to the first historical recommendation information, and for each piece of second historical recommendation information, determining a service loss characteristic when the user executes a service corresponding to the second historical recommendation information;
and inputting the service loss characteristic corresponding to each piece of first historical recommendation information, the service loss characteristic corresponding to each piece of second historical recommendation information and the environment data of the environment where the user is located when the candidate information is recommended to the user into the first network so as to determine the service execution rate corresponding to the candidate information on the basis of the environment where the user is located when the user executes the service corresponding to the historical service data based on the first network.
3. The method according to claim 2, wherein the service loss characteristic corresponding to each first historical recommendation information, the service loss characteristic corresponding to each second historical recommendation information, and the environment data of the environment where the user is located when the candidate information is recommended to the user are input into the first network, so as to determine, based on the first network, a service execution rate corresponding to the candidate information on the basis of the environment where the user is located when the user executes the service corresponding to the historical service data, specifically comprising:
for each piece of first historical recommendation information, determining the similarity between the environment where the user clicks the first historical recommendation information and the environment corresponding to the environment data, and for each piece of second historical recommendation information, determining the similarity between the environment where the user executes the second historical recommendation information and the environment corresponding to the environment data;
and determining the service execution rate corresponding to the candidate information on the basis of the environment where the user executes the service corresponding to the historical service data according to the service loss characteristic corresponding to the first historical recommendation information with the similarity meeting the preset condition and the service loss characteristic corresponding to the service loss of the second historical recommendation information with the similarity meeting the preset condition.
4. The method according to claim 2 or 3, wherein the service loss characteristic corresponding to each first historical recommendation information, the service loss characteristic corresponding to each second historical recommendation information, and the environment data of the environment where the user is located when recommending the candidate information to the user are input into the first network, so as to determine, based on the first network, the service execution rate corresponding to the candidate information on the basis of the environment where the user executes the service corresponding to the historical service data, specifically including:
for each second historical recommendation information, determining the correlation between the second historical recommendation information and each first historical recommendation information;
according to the correlation between the second historical recommendation information and each first historical recommendation information, adjusting the service loss characteristics corresponding to the second historical recommendation information;
and determining the service execution rate corresponding to the candidate information on the basis of the environment in which the user executes the service corresponding to the historical service data according to the service loss characteristic corresponding to each first historical recommendation information, the adjusted service loss characteristic corresponding to each second historical recommendation information and the environment data.
5. The method of claim 2, wherein the service loss characteristics comprise characteristics of the amount consumed by the merchant to which the historical recommendation information belongs and/or the distance between the merchant to which the historical recommendation information belongs and the user when the historical recommendation information is recommended to the user.
6. The method of claim 2, wherein the predictive network further comprises: a second network;
inputting the historical service data and the candidate information into a prediction model to be trained, so as to determine, through the prediction model and on the basis of an environment where the user executes a service corresponding to the historical service data, a probability that the user is supposed to click the candidate information and execute the service corresponding to the candidate information, as a service execution rate corresponding to the candidate information, specifically including:
according to the historical service data, determining historical recommendation information clicked by the user before recommending the candidate information to the user as first historical recommendation information, and determining historical recommendation information corresponding to the service executed by the user as second historical recommendation information;
for each piece of first historical recommendation information, determining a distance between the user and a business company to which the first historical recommendation information belongs when the user is supposed to execute a business corresponding to the first historical recommendation information as a distance corresponding to the first historical recommendation information, and for each piece of second historical recommendation information, determining a distance between the user and a business company to which the second historical recommendation information belongs when the user executes a business corresponding to the second historical recommendation information as a distance corresponding to the second historical recommendation information;
and determining the probability that the user clicks the candidate information and executes the service corresponding to the candidate information according to the distance corresponding to each piece of first historical recommendation information and the distance corresponding to each piece of second historical recommendation information, and taking the probability as the service execution rate corresponding to the candidate information.
7. The method according to claim 6, wherein determining, according to a distance corresponding to each first historical recommendation information and a distance corresponding to each second historical recommendation information, a probability that the user clicks the candidate information and executes the service corresponding to the candidate information as a service execution rate corresponding to the candidate information specifically includes:
determining the distance between the user and a merchant to which the candidate information belongs when the candidate information is recommended to the user as a target distance;
and determining the probability that the user clicks the candidate information and executes the service corresponding to the candidate information according to the similarity between the target distance and the distance corresponding to each piece of first historical recommendation information and the similarity between the target distance and the distance corresponding to each piece of second historical recommendation information, and taking the probability as the service execution rate corresponding to the candidate information.
8. The method according to claim 7, wherein determining, according to a similarity between the target distance and a distance corresponding to each first historical recommendation information and a similarity between the target distance and a distance corresponding to each second historical recommendation information, a probability that the user clicks the candidate information and executes the service corresponding to the candidate information as the service execution rate corresponding to the candidate information specifically includes:
according to the similarity between the target distance and the distance corresponding to each piece of first historical recommendation information, determining the attention weight corresponding to each piece of first historical recommendation information, and according to the similarity between the target distance and the distance corresponding to each piece of second historical recommendation information, determining the attention weight corresponding to each piece of second historical recommendation information;
according to the attention weight corresponding to each piece of first historical recommendation information, weighting the distance corresponding to each piece of first historical recommendation information to obtain the weighted distance corresponding to each piece of first historical recommendation information, and according to the attention weight corresponding to each piece of second historical recommendation information, weighting the distance corresponding to each piece of second historical recommendation information to obtain the weighted distance corresponding to each piece of second historical recommendation information;
and determining the probability that the user clicks the candidate information and executes the service corresponding to the candidate information according to the weighted distance corresponding to each first historical recommendation information and the weighted distance corresponding to each second historical recommendation information, and taking the probability as the service execution rate corresponding to the candidate information.
9. The method according to claim 7, wherein determining, according to a similarity between the target distance and a distance corresponding to each first historical recommendation information and a similarity between the target distance and a distance corresponding to each second historical recommendation information, a probability that the user clicks the candidate information and executes the service corresponding to the candidate information as the service execution rate corresponding to the candidate information specifically includes:
determining each first sub-distance sequence from a first distance sequence formed by distances corresponding to each first historical recommendation information through a preset sliding window, and determining each second sub-distance sequence from a second distance sequence formed by distances corresponding to each second historical recommendation information;
for each first sub-distance sequence, determining a distance feature between the target distance and the first sub-distance sequence according to the similarity between the target distance and the distance corresponding to each piece of first historical recommendation information contained in the first sub-distance sequence, and for each second sub-distance sequence, determining a distance feature between the target distance and the second sub-distance sequence according to the similarity between the target distance and the distance corresponding to each piece of second historical recommendation information contained in the second sub-distance sequence;
and determining the probability that the user clicks the candidate information and executes the service corresponding to the candidate information according to the distance feature corresponding to each first sub-distance sequence and the distance feature corresponding to each second sub-distance sequence, and taking the probability as the service execution rate corresponding to the candidate information.
10. The method according to claim 1, wherein the inputting the historical service data and the candidate information into a prediction model to be trained, so as to determine, through the prediction model, a probability that the user clicks the candidate information and executes a service corresponding to the candidate information on the basis of an environment in which the user executes the service corresponding to the historical service data, as a service execution rate corresponding to the candidate information, specifically includes:
inputting the historical service data and the candidate information into a prediction model to be trained, so that on the basis of determining the environment where the user executes the service corresponding to the historical service data through the prediction model, the probability of the user clicking the candidate information is used as the predicted click rate corresponding to the candidate information, and after the user is supposed to click the candidate information, the probability of the user executing the candidate information is used as the service conversion rate corresponding to the candidate information;
and determining the service execution rate corresponding to the candidate information according to the predicted click rate and the service conversion rate.
11. The method of claim 1 or 10, wherein before training the predictive model with the goal of minimizing a deviation between the traffic execution rate and the label information of the training samples as an optimization goal, further comprising:
predicting the probability of clicking the candidate information by the user on the basis of the environment of the user when the user executes the service corresponding to the historical service data through the prediction model, and taking the probability as the predicted click rate corresponding to the historical recommendation information;
training the prediction model by taking the minimized deviation between the business execution rate and the label information of the training sample as an optimization target, specifically comprising:
and training the prediction model by taking the minimized deviation between the predicted click rate and the click rate label and the minimized deviation between the business execution rate and the business execution rate label as optimization targets.
12. A method for information recommendation, comprising:
acquiring candidate information to be recommended to a user and historical service data of the user;
inputting the candidate information and the historical service data into a pre-trained prediction model aiming at each candidate information, so that the prediction model determines the probability of assuming that the user clicks the candidate information and executes the service corresponding to the candidate information as the service execution rate corresponding to the candidate information on the basis of the environment where the user executes the service corresponding to the historical service data, wherein the prediction model is obtained by training through the method of any one of claims 1 to 11;
and recommending information to the user according to the service execution rate corresponding to each candidate information.
13. An apparatus for training a predictive model, comprising:
the acquisition module is used for acquiring a training sample, wherein the training sample comprises historical service data of a user and candidate information recommended to the user;
the service execution rate prediction module is used for inputting the historical service data and the candidate information into a prediction model to be trained, so that the probability that the user clicks the candidate information and executes the service corresponding to the candidate information is determined on the basis of the environment where the user executes the service corresponding to the historical service data through the prediction model, and the probability is used as the service execution rate corresponding to the candidate information;
and the training module is used for training the prediction model by taking the deviation between the minimum business execution rate and the label information of the training sample as an optimization target.
14. An apparatus for information recommendation, comprising:
the acquisition module is used for acquiring candidate information needing to be recommended to a user and historical service data of the user;
a service execution rate prediction module, configured to input, for each candidate information, the candidate information and the historical service data into a pre-trained prediction model, so that the prediction model determines, as a service execution rate corresponding to the candidate information, a probability that the user clicks the candidate information and executes a service corresponding to the candidate information, based on an environment in which the user executes the service corresponding to the historical service data, where the prediction model is obtained by training according to the method of any one of claims 1 to 11;
and the recommending module is used for recommending information to the user according to the service execution rate corresponding to each candidate information.
15. 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 to 12.
16. 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 12 when executing the program.
CN202210538666.7A 2022-05-17 2022-05-17 Prediction model training method, information recommendation method and device Pending CN114997907A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210538666.7A CN114997907A (en) 2022-05-17 2022-05-17 Prediction model training method, information recommendation method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210538666.7A CN114997907A (en) 2022-05-17 2022-05-17 Prediction model training method, information recommendation method and device

Publications (1)

Publication Number Publication Date
CN114997907A true CN114997907A (en) 2022-09-02

Family

ID=83026484

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210538666.7A Pending CN114997907A (en) 2022-05-17 2022-05-17 Prediction model training method, information recommendation method and device

Country Status (1)

Country Link
CN (1) CN114997907A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116028700A (en) * 2023-03-29 2023-04-28 小米汽车科技有限公司 Off-line inquiring method and device for vehicle

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116028700A (en) * 2023-03-29 2023-04-28 小米汽车科技有限公司 Off-line inquiring method and device for vehicle

Similar Documents

Publication Publication Date Title
CN110413877B (en) Resource recommendation method and device and electronic equipment
US10915706B2 (en) Sorting text report categories
CN111488426A (en) Query intention determining method and device and processing equipment
CN113688313A (en) Training method of prediction model, information pushing method and device
CN109214436A (en) A kind of prediction model training method and device for target scene
CN112966186A (en) Model training and information recommendation method and device
CN113641896A (en) Model training and recommendation probability prediction method and device
CN111144974B (en) Information display method and device
CN111047429A (en) Probability prediction method and device
CN112733024A (en) Information recommendation method and device
CN115238826B (en) Model training method and device, storage medium and electronic equipment
CN115146731A (en) Model training method, business wind control method and business wind control device
CN114298735A (en) Model training method, information pushing method and device
CN114882311A (en) Training set generation method and device
CN115018552A (en) Method for determining click rate of product
CN114997907A (en) Prediction model training method, information recommendation method and device
CN114331602A (en) Model training method based on transfer learning, information recommendation method and device
CN113010562B (en) Information recommendation method and device
CN114119139A (en) Information recommendation method and device, storage medium and electronic equipment
CN113343085A (en) Information recommendation method and device, storage medium and electronic equipment
CN112561162A (en) Information recommendation method and device
CN113010809A (en) Information recommendation method and device
CN116308738B (en) Model training method, business wind control method and device
CN114996570A (en) Information recommendation method and device
CN115660105A (en) Model training method, business wind control method and business wind control device

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