CN111259302B - Information pushing method and device and electronic equipment - Google Patents

Information pushing method and device and electronic equipment Download PDF

Info

Publication number
CN111259302B
CN111259302B CN202010061742.0A CN202010061742A CN111259302B CN 111259302 B CN111259302 B CN 111259302B CN 202010061742 A CN202010061742 A CN 202010061742A CN 111259302 B CN111259302 B CN 111259302B
Authority
CN
China
Prior art keywords
data
heat
value
array
read
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010061742.0A
Other languages
Chinese (zh)
Other versions
CN111259302A (en
Inventor
张绍亮
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Yayue Technology Co ltd
Original Assignee
Shenzhen Yayue 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 Shenzhen Yayue Technology Co ltd filed Critical Shenzhen Yayue Technology Co ltd
Priority to CN202010061742.0A priority Critical patent/CN111259302B/en
Publication of CN111259302A publication Critical patent/CN111259302A/en
Application granted granted Critical
Publication of CN111259302B publication Critical patent/CN111259302B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/55Push-based network services
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The application discloses an information pushing method and device and electronic equipment, and relates to the technical field of artificial intelligence. Wherein, the method comprises the following steps: acquiring a data pair comprising first data and second data, wherein the first data comprises a real heat value and a predicted heat value of one sample information, the second data comprises a real heat value and a predicted heat value of another sample information, and the real heat value in the first data is larger than the real heat value in the second data; determining the number of the acquired data pairs as a first number; determining the number of the target data pairs in the obtained data pairs as a second number, wherein the target data pairs are data pairs of which the predicted heat value of the first data is greater than that of the second data; and acquiring the ratio of the second quantity to the first quantity, and if the ratio reaches a target value, configuring the prediction model in the information push platform. Therefore, the information pushing platform can be ensured to accurately determine the heat of the information to be pushed, and the accuracy of the pushed information is improved.

Description

Information pushing method and device and electronic equipment
Technical Field
The present application relates to the technical field of artificial intelligence, and in particular, to an information pushing method and apparatus, and an electronic device.
Background
Currently, many applications involve information push. A commonly used pushing manner is to predict the heat of the user to the information to be pushed, and push the information to be pushed with a higher predicted heat to the user. However, it is generally difficult to determine whether the predicted heat is accurate, and if the predicted heat is not accurate, selecting information to push based on the predicted heat will result in poor accuracy of the pushed information.
Disclosure of Invention
The application provides an information pushing method and device and electronic equipment, and aims to solve the problems.
In a first aspect, an embodiment of the present application provides an information pushing method, including: acquiring a data pair, wherein the data pair comprises first data and second data, the first data comprises a real heat value of one sample information and a predicted heat value of a prediction model for the sample information, the second data comprises a real heat value of another sample information and a predicted heat value of the prediction model for the another sample information, and the real heat value in the first data is larger than the real heat value in the second data; determining the number of the acquired data pairs as a first number; determining the number of target data pairs from the acquired data pairs as a second number, wherein the target data pairs are data pairs of which the predicted heat value in the first data is larger than that in the second data; and acquiring the ratio of the second quantity to the first quantity, and if the ratio reaches a target value, configuring the prediction model in an information pushing platform, wherein the information pushing platform is used for selecting the information to be pushed to push according to the prediction heat value of the information to be pushed of the prediction model.
In a second aspect, an embodiment of the present application provides an information pushing method, including: the device comprises an acquisition module, a determination module and a pushing module. The acquisition module is used for acquiring a data pair, the data pair comprises first data and second data, the first data comprises a true heat value of one sample information and a predicted heat value of the prediction model for the sample information, the second data comprises a true heat value of another sample information and a predicted heat value of the prediction model for the another sample information, and the true heat value in the first data is larger than the true heat value in the second data. The determining module is used for determining the number of the acquired data pairs as a first number; and determining the number of target data pairs from the acquired data pairs as a second number, wherein the target data pairs are data pairs of which the predicted heat value in the first data is larger than that in the second data. The pushing module is used for acquiring the ratio of the second quantity to the first quantity, if the ratio reaches a target value, the prediction model is configured in the information pushing platform, and the information pushing platform is used for selecting the information to be pushed according to the prediction heat value of the information to be pushed of the prediction model and pushing the information.
In a third aspect, an embodiment of the present application provides an electronic device, including: one or more processors; a memory; one or more programs. Wherein one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the methods described above.
In a fourth aspect, the present application provides a computer-readable storage medium, in which program code is stored, and the program code can be called by a processor to execute the method described above.
According to the scheme, a data pair comprising first data and second data is obtained, the first data comprises a true heat value of one sample information and a predicted heat value of a prediction model for the sample information, and the second data comprises a true heat value of another sample information and a predicted heat value of the prediction model for the another sample information. The number of pairs of acquired data is determined as a first number. And determining the number of target data pairs as a second number from the acquired data pairs, wherein the target data pairs refer to data pairs of which the predicted heat value in the first data is larger than that in the second data. And if the ratio of the first data to the second data reaches a target value, configuring the prediction model in the information pushing platform, so that the information pushing platform selects the information to be pushed to push according to the prediction heat value of the information to be pushed of the prediction model. Through the process, the accuracy of the prediction heat value of the information to be pushed, which is determined in the information pushing process, can be ensured, so that the accuracy of the pushed information is improved.
These and other aspects of the present application will be more readily apparent from the following description of the embodiments.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 shows a schematic application environment of an embodiment of the present application.
Fig. 2 shows a flowchart of an information pushing method according to an embodiment of the present application.
Fig. 3 shows a schematic view of the substeps of S110 in fig. 1.
Fig. 4 shows a schematic diagram of the sub-steps of S112 in fig. 3 in one embodiment.
Fig. 5 is a schematic diagram showing a data processing procedure of the flow shown in fig. 4.
Fig. 6 shows a schematic diagram of the sub-steps of S112 in another embodiment in fig. 3.
Fig. 7 is a diagram showing a data processing procedure of the flow shown in fig. 6.
Fig. 8 shows a schematic diagram of the sub-steps of S112 in fig. 3 in a further embodiment.
Fig. 9 shows a schematic diagram of the sub-step of S130 in the embodiment shown in fig. 2.
Fig. 10 shows a schematic flow chart of S131 in fig. 9 in one embodiment.
Fig. 11 is a diagram showing a data processing procedure of the flow shown in fig. 10.
FIG. 12 is a schematic diagram of a tree array.
Fig. 13 is an interface schematic diagram of a social platform according to an embodiment of the present disclosure.
Fig. 14 is a block diagram of an electronic device according to an embodiment of the present application.
Fig. 15 is a block diagram of an information pushing apparatus according to an embodiment of the present application.
Fig. 16 is a storage unit according to an embodiment of the present application, configured to store or carry program code for implementing a method according to an embodiment of the present application.
Detailed Description
In order to make the technical solutions better understood by those skilled in the art, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application.
Currently, many applications involve information push. In some cases, the application provider may want as much information pushed to the user as possible to be viewed. Therefore, a commonly used pushing method is to predict the heat of the user to the information to be pushed by using a trained prediction model, and then select the information to be pushed with a higher predicted heat to push to the user. However, it is often difficult to determine whether the predicted heat is accurate, and if the predicted heat is not accurate, it will result in inaccurate information pushed based on the predicted heat.
The predictive model may be obtained by machine learning. Machine Learning is a branch of artificial intelligence technology, and can be classified into Supervised Learning (SL), unsupervised Learning (UL), reinforcement Learning (RL), and the like according to different Learning modes, where Reinforcement Learning may also be referred to as Reinforcement Learning.
In some scenarios, the prediction model may be obtained by training in a reinforcement learning manner. Reinforcement learning means that an Agent (Agent) interacts with an environment through executing an Action (Action), and under the Action of the Action and the environment, the Agent generates a new State (State) and the environment generates an instant Reward (Reward). By constantly interacting with the environment, the agent may generate large amounts of data and may adjust its own Policy (Policy) of performing actions based on the generated data, the goal of which is to maximize the rewards earned by the agent. In the embodiment of the present application, the machine model trained by the reinforcement learning method may be referred to as a reinforcement learning model.
One of the parameters of the reinforcement learning model is a state-action price function Q (s, a), which can be regarded as a prediction result of the reinforcement learning model, such as the predicted heat value mentioned above. Where s represents a particular state, a represents an action, and Q (s, a) represents a long-term reward that may be obtained by performing action a in state s.
It has been found that, in some embodiments, for the reinforcement learning model, a real operating environment of the reinforcement learning model is simulated online, so as to observe and evaluate the quality of the reinforcement learning model, so as to determine whether a prediction result of the reinforcement learning model is accurate, and thus determine whether subsequent processing can be performed based on the prediction result of the reinforcement learning model. However, the simulated environment is usually greatly different from the real operating environment, so that the accuracy of the prediction result of the reinforcement learning model cannot be reliably judged based on the method.
Furthermore, one of the more common prediction models is a classification model for predicting classes, such as a binary classification model. In other embodiments, AUC (Area under the surface or receiver operating characteristic Curve) is often used to determine the accuracy of the prediction results of the classification model. The binary classification model is used for outputting a predicted value according to the input data, if the predicted value is larger than or equal to a set threshold value, the input data is predicted to be positive, otherwise, the input data is predicted to be negative.
The probability of AUC is defined as: randomly selecting a positive sample (actually positive sample) and a negative sample (actually negative sample), and using the binary model to determine the probability that the predicted value of the positive sample is greater than that of the negative sample, i.e., AUC = P (P) Positive sample >P Negative sample ). Based on the definition of AUC, it can be determined that the AUC is used for evaluation, which requires that the target to be evaluated of the evaluated model has a definite positive and negative classification, i.e. AUC generally only applies to a two-classification model, while for a model whose target to be evaluated is not definitely classified into two classifications, such as the above prediction model for predicting heat, it is difficult to evaluate by AUC directly.
One typical implementation of the prediction model for predicting popularity is a CTR (Click-Through-Rate) prediction model for advertisement information. In other embodiments, in order to determine the accuracy of the prediction result of the CTR prediction model by using AUC, the following method is generally adopted:
defining the information pushed and clicked by the user as positive samples, defining the information pushed but not clicked by the user as negative samples, and then calculating the AUC of the prediction model based on the defined positive samples and negative samples. However, in this way, all pushed and clicked advertisements are directly classified into one category, and the obtained AUC cannot reflect the prediction accuracy of the click through rate of the CTR prediction model for different advertisements in the category. In other words, the AUC obtained by forcibly dividing the true heat value of different information into two categories cannot accurately reflect the accuracy of the predicted heat value of the prediction model, and may cause an error in the information pushed according to the predicted heat value of the prediction model.
The inventor provides an information pushing method, an information pushing device and electronic equipment through long-term research, and can ensure that the heat of information to be pushed is predicted more accurately in the information pushing process, so that the pushed information is more accurate. This will be explained below.
Referring to fig. 1, fig. 1 is a schematic view of an application environment suitable for an information push method provided in an embodiment of the present application. The electronic device 100 and the user terminal 200 are respectively in communication connection with the information push platform 300, the user terminal 200 is installed with a client 210, and the client 210 can be recorded to the information push platform 300 through an account and the like to obtain and display information pushed by the information push platform 300.
The electronic device 100 may be a server, a Personal Computer (PC), a notebook Computer, or the like, and the server may be an independent physical server, or a server cluster or a distributed system formed by a plurality of physical servers.
In some cases, the electronic device 100 may be a device that communicates with a server running the information push platform 300, and in other cases, the electronic device 100 may be one of the servers running the information push platform 300.
In this embodiment, the information pushing platform 300 may be a content interaction platform, a shopping platform, a social platform with an information pushing function, or the like.
Referring to fig. 2, fig. 2 is a flowchart illustrating an information pushing method according to an embodiment of the present disclosure, where the method may be applied to the electronic device 100 shown in fig. 1. The steps involved in the method are explained below.
And S110, acquiring a data pair, wherein the data pair comprises first data and second data, the first data comprises a true heat value of one sample information and a predicted heat value of the prediction model for the sample information, the second data comprises a true heat value of another sample information and a predicted heat value of the prediction model for the another sample information, and the true heat value in the first data is greater than that in the second data.
In this embodiment, the type of the sample information depends on an application scenario of the information pushing method, for example, in a case of being applied to a news platform, a video platform, a music platform, and the like, the sample information may be information pushed by the corresponding platform, such as one or more of video information, image information, audio information, and text information. As another example, in the case of application to a shopping platform, the sample information may be shopping information. As another example, in the case of being applied to an advertisement push system, the sample information may be advertisement information. It is to be appreciated that the aforementioned shopping information and advertising information can be presented in at least one of video, image, text, audio, and the like.
In this embodiment, the heat value of the sample information refers to any value of data that can represent the heat of the sample information, and may be, for example, a click rate, a click number, a download number, a collection number, a purchase number, and the like. Further, taking the example that the sample information is media information (e.g., audio information, video information or text information) file or advertisement information, the heat value may be, for example, the click rate or the number of clicks of the media information or the advertisement information in a future period of time. Taking the example that the sample information is the application installation package, the hot value may be, for example, a download rate or a download number of the application installation package in a future period of time. Taking the example that the sample information is the commodity information, the heat value may be, for example, a purchase rate or a purchase number of the commodity represented by the commodity information in a future period of time.
In this embodiment, the predicted heat value of the sample refers to a value obtained by predicting the heat of the sample information in a future period of time through a prediction model, and the actual heat value of the sample refers to a value of the actually monitored heat of the sample information in the future period of time. Optionally, the popularity value may be a number of clicks, a click rate, a favorite number, or a like number, which is not limited in this embodiment.
According to research, for any two pieces of sample information, if the prediction heat value of the prediction model to the sample information with a larger real heat value is also larger, the information to be pushed and pushed to a user can be more accurately selected based on the prediction heat value of the prediction model to the information to be pushed. Described from a probabilistic perspective, that is: randomly selecting two sample information i and j, and obtaining the true heat value R of the sample information i i True heat value R greater than sample information j j In the case of (1), the predicted heat value Q of the sample information i i Predicted heat value Q also larger than sample information j j The probability of (c). The greater this probability, the more accurate the predicted heat value of the prediction model, based on whichThe more accurate the information selected for pushing. The mathematical expression for this probability may be as follows:
P=P(Q i >Q j |R i >R j )
wherein i and j are positive integers, R i Representing the true heat value, Q, of the sample information i i A predicted heat value, R, representing sample information i j Representing the true heat value, Q, of the sample information j j Represents the predicted heat value of the sample information j.
Based on this, in this embodiment, the accuracy of the predicted heat value of the prediction model can be determined through the probability, so that the sample information i with a larger true heat value and the sample information j with a smaller true heat value can be paired, where the true heat value R of the sample information i with a larger true heat value i And predicted heat value Q i Can be used as the first data (R) i ,Q i ) True heat value R of sample information j with smaller true heat value j And predicted heat value Q j Can be used as the second data (R) j ,Q j ) First data (R) i ,Q i ) And second data (R) j ,Q j ) One data pair < (R) in this embodiment may be composed i ,Q i ),(R j ,Q j )>. Thus, a large amount of R can be obtained i >R j Wherein the data in any two data pairs are not all identical.
At R i >R j In the case of sufficient data pairs, Q i >Q j In all R i >R j The ratio of the data pairs of (a) will be very close to the probability P. Therefore, the accuracy of the predicted heat value of the prediction model can be judged by adopting the proportion, and whether information pushing can be carried out based on the predicted heat value of the prediction model is further judged.
It should be noted that the actual heat value of the sample information is usually a value that can vary within a certain range of values. For example, the real heat value may be any value in an integer range, or for example, the real heat value may be any value in a real number range, or for example, the real heat value may be any value in a (0, 1) interval. The present embodiment is not limited thereto.
S120, determining the number of the acquired data pairs as a first number.
Wherein the first number refers to the acquired data pairs<(R i ,Q i ),(R j ,Q j )>Of each data pair, R i >R j
And S130, determining the number of target data pairs from the acquired data pairs as a second number, wherein the target data pairs are data pairs of which the predicted heat value in the first data is larger than that in the second data.
Wherein, the target data pair refers to all the acquired data pairs<(R i ,Q i ),(R j ,Q j )>In, Q i >Q j The data pair of (1). Correspondingly, the second number refers to Q in all data pairs acquired i >Q j The number of data pairs of (c).
It can be understood that, in the flow shown in fig. 1, S120 and S130 may not have a strict execution order limitation, for example, S120 and S130 may be executed in parallel, or may be executed sequentially according to an arbitrary order, which is not limited in this embodiment.
S140, acquiring the ratio of the second quantity to the first quantity.
After obtaining the first number and the second number, in one manner, the electronic device 100 may divide the second number by the first number to obtain the ratio. In another way, the second number and the first number may be sent to other devices, and the ratio of the second number to the first number may be calculated.
The obtained ratio is Q i >Q j In all R i >R j The ratio of the data pair (b) in (c) may represent the probability P, and may be used to represent the accuracy of the predicted calorific value of the prediction model.
S150, if the ratio reaches the target value, configuring the prediction model in an information pushing platform, wherein the information pushing platform is used for selecting the information to be pushed to push according to the prediction heat value of the information to be pushed of the prediction model.
The target value may be flexibly set, for example, may be set according to experience or statistical data, and may be any value between 0.7 and 0.8, for example.
Under the condition that the ratio reaches the target value, the accuracy of the prediction heat value of the prediction model is in accordance with the expectation, so that the prediction model can be configured in the corresponding information pushing platform, the heat of the information to be pushed can be predicted based on the prediction model, the information pushed to the client side is selected from the information to be pushed based on the predicted heat, and the accuracy of the pushed information is improved. Optionally, the information to be pushed is determined in different ways according to different information pushing platforms 300. For example, in the case that the information push platform 300 is a social platform with an information push function, the information to be pushed corresponding to the account a may be information clicked, collected, downloaded or sent by other accounts having a friend relationship with the account a.
In the case that the information push platform 300 is a content interaction platform, the information to be pushed corresponding to the account a may be information clicked, collected, or sent by the account B actively associated with the account a. Wherein, account a may click on a "focus" tab or the like on a display interface of its client, for example, to achieve active association to account B.
In the case where the information push platform 300 is a shopping platform, the information to be pushed corresponding to account a may be, for example, advertisement information or the like matching the user characteristic data of account a. Correspondingly, the prediction model used by the information push platform at this time may be, for example, the CTR prediction model described above.
It is to be understood that the above description of information push platform 300 is by way of example only and is not intended to limit the present application.
In this embodiment, the larger the ratio is, the higher the accuracy of the predicted heat value of the prediction model is, and the magnitude relationship between the predicted heat values of different information obtained by the prediction model and the magnitude relationship between the true heat values of the different information have a higher similarity degree, so that a more accurate basis is provided for the subsequent processing based on the predicted heat value.
In some scenes, different information needs to be sequenced according to the predicted heat value of the prediction model, and the information is selected according to the sequencing result to be pushed, the scenes pay attention to the magnitude relation of the predicted heat value of each information rather than the specific value of the predicted heat value of each information, if the predicted heat value of different information is predicted by the prediction model with higher accuracy determined by the information pushing method in the embodiment of the application in the scenes, the similarity between the magnitude relation of the predicted heat value and the magnitude relation of the real heat value is high, and therefore the information participating in the subsequent processing can be selected more accurately.
In other scenes, for example, in a scene in which the prediction model is a reinforcement learning model, online simulation of a real operating environment is not required by the information push method provided by the embodiment of the application, and the problem that the accuracy of the prediction model cannot be reliably judged due to the fact that the real operating environment cannot be restored, so that the prediction model with low accuracy is configured in the information push platform, and the information pushed by the information push platform is inaccurate is solved.
Referring again to fig. 2, the detailed implementation of the steps shown in fig. 2 will be further described.
In S110, there may be various ways to obtain the data pairs. In one embodiment, at least two data pairs may be collected in advance and stored in a storage device, and the data of any two data pairs in each obtained data pair is not all the same. Before the prediction model needs to be configured in the information push platform to be used for predicting the heat value of the information to be pushed, the electronic device 100 may directly read the at least two data pairs from the storage device.
In another embodiment, consider R in the above scheme j >R i The more data pairs there are, the more the ratio finally calculated approaches the probability P, so in order to obtain a ratio that reflects as true as possible the accuracy of the predicted calorific value of the predictive model, it is generally necessary to obtain as many data pairs as possible,so that it is necessary to collect as many real heat values and predicted heat values of the sample as possible. In order to reduce the time consumption of the acquisition process, the at least two data pairs may be acquired, for example, by the steps shown in fig. 3, which are described in detail below with respect to fig. 3.
And S111, respectively obtaining heat data of at least two pieces of sample information, wherein the heat data of each piece of sample information comprises a true heat value of the piece of sample information and a predicted heat value of the prediction model on the piece of sample information.
The at least two pieces of sample information are different from each other, the heat data of the at least two pieces of sample information may be stored in a storage device, and before the prediction model needs to be configured on the information push platform, the electronic device 100 may acquire the at least two pieces of heat data from the storage device.
And S112, respectively pairing the heat data of each sample information with the heat data of each other sample information with the real heat value larger than the sample information to form a data pair, wherein the heat data with the larger real heat value is the first data, and the heat data with the smaller real heat value is the second data.
In this embodiment, the real heat value of the heat data refers to the real heat value in the heat data.
For convenience of description, it is assumed that the number of the at least two pieces of sample information described in S111 is N, and N is a positive integer, the number of acquired heat data is N.
For the heat data i (i is greater than or equal to 1 and less than or equal to N, i is an integer), the electronic device 100 may determine at least one heat data j (j is greater than or equal to 1 and less than or equal to N, i is not equal to j, j is an integer) from the N heat data, and the true heat value in the heat data j is greater than the true heat value in the heat data i. For each determined heat data j, the electronic device 100 may pair the heat data j with the heat data i into one data pair. In the data pair, the true heat value in the heat data j is larger, so the heat data j is the first data, and correspondingly, the heat data i is the second data. In this manner, multiple data pairs may be obtained.
Through the process shown in fig. 3, more data pairs can be combined by using the heat data of less sample information, and the time required for acquiring the heat data of the sample information is reduced. Particularly, in the case that the prediction model is the reinforcement learning model, since the true heat value of the reinforcement learning model cannot be obtained in advance, the action a to be measured needs to be executed in the state s to be measured and can be acquired after a period of time, the acquisition of the heat data for evaluating the reinforcement learning model is time-consuming. The flow shown in fig. 3 reduces the number of acquired heat data required for obtaining the ratio with the same accuracy, and shortens the time required for determining the accuracy of the predicted heat value of the prediction model, so that whether the prediction model is suitable for the information push platform can be quickly determined.
In this embodiment, in order to quickly determine, for each heat data i, all the heat data j having a true heat value greater than the true heat value in the heat data i, the electronic device 100 may implement S112 in different manners according to whether at least two acquired data are different from each other.
In a case, the actual heat values in at least two obtained heat data may be different from each other, that is, the actual heat values in any two obtained heat data are not equal, in which case S112 may be implemented by the flow shown in fig. 4, which is described in detail below.
S112-1, sorting the heat data of at least two pieces of sample information according to the size of the real heat value.
And S112-2, sequentially reading the heat data of each sample information according to the sequence of the real heat values from large to small.
In this embodiment, the heat data of the plurality of sample information may be sorted according to the order from the large true heat value to the small true heat value, or the heat data of at least two sample information may be sorted according to the order from the small true heat value to the large true heat value, which is not limited in this respect. As long as the reading order of at least two heat data is the order of the real heat values from large to small.
And S112-3, after reading the heat data of one sample information each time, respectively pairing the read heat data with each heat data in the reading sequence before the read heat data to form a data pair.
When each heat data is read according to the sequence from the large true heat value to the small true heat value, for the currently read heat data, the true heat value of each heat data in the reading sequence before the currently read heat data is larger than the currently read heat data, so that each heat data in the reading sequence before the currently read heat data and the currently read heat data can be directly used as a data pair. Therefore, for each heat data, the complex process of searching the heat data with the real heat value larger than the real heat value in the heat data can be omitted, and the time consumption of the evaluation process is saved.
Referring to fig. 5, a data processing procedure of the flow shown in fig. 4 will be described by taking N pieces of heat data as an example. Wherein the real heat value in the heat data 1 is the largest, the real heat value in the heat data N is the smallest, and the change trends of the real heat values contained in the heat data 1 and the heat data N are reduced in sequence from the heat data N to the heat data N.
In the implementation process, firstly, the heat data 1 is read, and referring to the processing process (1) shown in fig. 5, since the true heat value in the heat data 1 is the largest, there is no situation that the true heat value in any one heat data is greater than the true heat value in the heat data 1, pairing cannot be performed, and the number of the obtained data pairs is 0.
The electronic device 100 reads the next heat data, i.e., heat data 2. Referring to the processing procedure (2) shown in fig. 5, after reading the heat data 2, since the electronic apparatus 100 sequentially reads the heat data in the order of the real heat values from large to small, the heat data having the real heat value larger than the real heat value in the heat data 2 among the N heat data is: the heat data 1 in the order before the heat data 2 is read. Then, the electronic apparatus 100 may directly acquire the heat data 1 and pair the heat data 1 and the heat data 2 into one data pair. In this way, 1 data pair can be obtained, and in this data pair, heat data 1 is the first data and heat data 2 is the second data.
The electronic device 100 reads the next heat data, i.e., heat data 3. Referring to process (3) shown in fig. 5, after reading heat data 3, electronic device 100 may determine that the heat data having a true heat value greater than the true heat value in heat data 3 is: the heat data 1 and the heat data 2 preceding the heat data 3 in this order are read. The electronic device 100 may pair the heat data 1 and the heat data 3 into one data pair, where the heat data 1 is the first data and the heat data 3 is the second data; the heat data 2 and 3 are paired into one data pair, and in the data pair, the heat data 2 is the first data, and the heat data 3 is the second data. Thus, 2 data pairs can be obtained.
The electronic device 100 continues to read each of the heat data in the order of the real heat value from large to small. Referring to process (i) shown in fig. 5, after reading the heat data i, it may be determined that the heat data having a true heat value greater than the true heat value in the heat data i is: and reading heat data 1 to i-1 which are sequentially before the heat data i. Therefore, the electronic device 100 can pair each of the heat data 1 to i-1 with the heat data j as a data pair, and thus, i-1 data pairs can be obtained. The heat data 1 to i-1 are first data in the data pairs where the data are located, and the heat data i is second data.
The electronic device 100 continues processing according to the flow shown in fig. 5 until the processing of the heat data N is completed, and 1+2+ \8230 ++ 8230, + (N-2) + (N-1) data pairs can be obtained, that is, the number of obtained data pairs is (N-1) N/2. Therefore, for each heat data, all other heat data with the real heat value larger than the real heat value in the heat data can be determined very quickly, and the efficiency of acquiring data pairs is improved.
In another case, at least two acquired heat data may have the same true heat value. Referring to fig. 6, fig. 6 shows an implementation manner of S112 in this case, in which S112 includes S112-1 and S112-2 described above, and S112 further includes S112-4, S112-5, and S112-6.
The detailed process of the electronic device 100 performing S112-1 and S112-2 is the same as the corresponding steps in the embodiment shown in fig. 4, and is not repeated here, and after performing S112-2, the following steps are performed:
and S112-4, after the heat data of one sample information is read each time, determining the size relationship between the heat data read this time and the heat data read last time.
And S112-5, if the real heat value in the heat data read this time is not equal to the real heat value in the heat data read last time, respectively pairing the heat data read this time and each heat data in the reading sequence before the heat data read this time into a data pair.
And S112-6, if the real heat value in the heat data read this time is equal to the real heat value in the heat data read last time, not matching the heat data read this time with the heat data with the reading sequence before the heat data read this time.
Referring to fig. 7, fig. 7 shows a data processing procedure after the heat data i-1, i and i +1 are sequentially read in the order from the large true heat value to the small true heat value. The real heat values in the heat data i-1 and i are equal, the real heat value in the heat data i-2 is larger than the real heat values in the heat data i-1 and i, and the real heat value in the heat data i +1 is smaller than the real heat values in the heat data i-1 and i.
In the implementation process, the processing procedure after the electronic device 100 reads the heat data i-1 is the same as the processing procedure shown in fig. 5, and is not described herein again.
Referring to processing procedure (i) in fig. 7, after the electronic device 100 reads the heat data i, if it is determined that the true heat value in the heat data i read this time is equal to the true heat value in the heat data i-1 read last time, the pairing is not performed, or the number of data pairs obtained by the pairing this time may be regarded as 0.
The electronic apparatus 100 reads the next heat data i +1. Referring to a processing procedure (i + 1) shown in fig. 7, after the electronic device 100 reads the heat data i +1, it is determined that a true heat value in the heat data i +1 read this time is not equal to (smaller than) a true heat value in the heat data i read last time, then the heat data 1 to i in the reading sequence before the heat data i +1 are respectively paired with the heat data i +1, and the number of data pairs obtained by the pairing this time is i.
Through the process shown in fig. 7, not only can the heat data with the real heat value larger than the real heat value in the heat data be quickly determined for each heat data, and the time consumption of the judgment process for the prediction accuracy of the prediction model be reduced, but also the pairing of two heat data with the same real heat value can be avoided, so that the obtained ratio can more accurately reflect the prediction accuracy of the prediction model.
Optionally, in another implementation manner, the step S112-6 may also be replaced by the following step:
and respectively pairing the hot data read this time and each hot data which is in the reading sequence before the hot data read this time and has a true hot value larger than that in the hot data read this time into a data pair. For example, in the scenario shown in fig. 7, the heat data i and the heat data 1 to i-2 may be respectively paired into data pairs. In this manner, the number of data pairs obtained can be increased.
Referring to fig. 8, fig. 8 shows another implementation manner of S112 in a case that there is heat data having the same true heat value among a plurality of heat data. Wherein, S112 may include the above-mentioned S112-1, S112-2 and S112-4, and S112 further includes S112-7 and S112-8. The process shown in fig. 8 is applicable to both the case where the true heat values of a plurality of heat data are different from each other and the case where there is heat data with the same true heat value, and can quickly determine, for each heat data, heat data having a true heat value greater than the true heat value in the heat data. The detailed description is as follows.
The detailed process of the electronic device 100 performing S112-1, S112-2 and S112-4 can refer to the description of the corresponding steps, and is not repeated herein.
And S112-7, if the real heat value in the heat data read this time is equal to the real heat value in the heat data read last time, caching the heat data read this time, and reading the heat data of the next sample information.
S112-8, if the real heat value in the heat data read this time is not equal to the real heat value in the heat data read last time, respectively pairing the heat data cached at present and each heat data read in the current cache before each heat data cached at present to form a data pair, deleting the cached heat data, caching the heat data read this time, and reading the heat data of the next sample information.
Referring to fig. 7 again, fig. 7 also shows the processing procedure of the heat data i-2 read before the heat data i-1, and the data processing procedure of the step shown in fig. 7 is explained.
It can be understood that when the electronic device 100 reads the hot data i-1, the currently cached hot data is i-2. Then, after reading the heat data i-1, the electronic device 100 determines that the true heat value in the heat data i-1 is not equal to the true heat value in the heat data i-2 read last time, and may pair the currently cached heat data i-2 with the heat data 1 to i-3 in the reading order before the heat data i-2 as data pairs to obtain i-3 data pairs, respectively, with reference to the processing procedure (i-2) of fig. 7. Then, the cached heat data i-2 is deleted, the heat data i-1 is cached, and the next heat data i is read.
After the electronic device 100 reads the heat data i, if the real heat value in the heat data i is determined to be equal to the real heat value in the heat data i-1 read last time, the heat data i is directly cached. At this time, the electronic device 100 currently caches the heat data i-1 and i. Then, the electronic apparatus 100 reads the next heat data i +1.
After the electronic device 100 reads the heat data i +1, determining that the real heat value in the heat data i +1 is not equal to the real heat value in the heat data i read last time, determining the heat data i-1 and i cached at present, and pairing the heat data i-1 with the heat data 1 to i-2 in the reading sequence before the heat data i-1 and i to form a data pair respectively by referring to the processing procedure (i-1) of fig. 7 to obtain i-2 data pairs; the heat data i may be paired with heat data 1 to i-2 in the reading order prior to both heat data i-1 and i, respectively, as data pairs, resulting in i-2 data pairs, referring to process (i) of fig. 7.
Based on the pairing method shown in any one of fig. 4, 6, and 8, in this embodiment, the electronic device 100 may determine, as the third number, the number of data pairs obtained by pairing the heat data read this time with the heat data read this time in the reading order of the heat data read this time for each time of the heat data read; the third quantities respectively determined for the heat data read each time are summed, and the total quantity of the acquired data pairs, i.e. the first quantity, is obtained. Therefore, the third quantity corresponding to each heat data can be quickly determined, so that the first quantity is quickly determined, and the evaluation efficiency is improved.
Wherein, according to whether the true heat value in the heat data read each time is unique in the true heat values of the at least two acquired heat data, the third number determined for the heat data read this time may be different.
For example, if there is no heat data with a true heat value equal to the true heat value in the heat data read this time in the at least two acquired heat data, the third quantity determined for the heat data read this time is: the number of the heat data in the order before the heat data read this time is read.
For another example, if there is heat data with a true heat value equal to the true heat value in the heat data read this time in the at least two acquired heat data, the heat data are paired two by two according to the flow shown in fig. 6 or fig. 8.
Based on the flow shown in FIG. 6, for at least two heat data having the same true heat value (e.g., the heat data i-1 and i described above), the third number determined for the heat data (e.g., the heat data i-1) of which the first is read is the number of heat data preceding the heat data in the reading order; the third number determined for the other heat data (e.g., heat data i) is 0.
Based on the flow shown in fig. 8, the third number determined for each of the at least two heat data having the same true heat value is equal to the number of heat data in the reading order before the at least two heat data.
In implementation, a first variable may be set, an initial value of the first variable may be 0, for example, and each time a third number is determined for one heat data, the determined third number is accumulated to the first variable, so that after the third numbers corresponding to all the heat data are determined, the value of the first variable is the first number.
Alternatively, based on the manner of acquiring the data pairs shown in fig. 4, fig. 6, and fig. 8, in this embodiment, the electronic device 100 may obtain the second number through the flow shown in fig. 9. In other words, S130 may include the following steps shown in fig. 9:
s131, for each read heat data, determining the number of target data pairs as a fourth number from data pairs obtained by pairing the heat data prior to the heat data read this time in the reading order with the heat data read this time.
S132, summing the fourth quantities respectively determined for each read heat data to obtain the second quantities.
When the third number determined for the heat data read this time is 0, the fourth number determined for the heat data read this time is also 0.
In a case that the third number determined for the currently read heat data is not 0, in an embodiment, the electronic device 100 may acquire first data and second data from each data pair obtained by pairing the currently read heat data and the read order in the currently read heat data, compare the acquired first data with the acquired second data, and determine the data pair as the target data pair if it is determined that the predicted heat value in the first data is greater than the predicted heat value in the second data. In this way, all target data pairs may be identified from the third number of data pairs obtained by the pairing, and the number of identified target data pairs, that is, the fourth number, may be determined.
In implementation, the electronic device 100 may set a second variable, where an initial value of the second variable may be 0, for example, and each time a fourth number is determined for one heat data, the determined fourth number is added to the second variable, so that when the fourth number is determined for all the heat data, a value of the second variable is the number of target data pairs in all the acquired data pairs, that is, the second number.
Optionally, in order to reduce the time complexity for determining the fourth quantity and improve the efficiency for determining the fourth quantity, the information pushing method provided in this embodiment may further include S910 and S920 shown in fig. 10. The detailed description is as follows.
S910, at least two subintervals included in the target interval are obtained, the at least two subintervals correspond to array elements in a first array one by one according to the sequence from small to large, and the array elements in the first array have initial values.
S920, after reading the heat data of one sample information each time, setting a first element corresponding to the currently read heat data in the first array as a target value, where the first element is an array element corresponding to a subinterval where a predicted heat value in the currently read heat data is located.
In the present embodiment, the predicted heat value of each sample information (i.e., the predicted heat value in each heat data) generally belongs to the target section. It is to be understood that in some cases, the output value of the prediction model belongs to the target interval, for example, when the output value of the prediction model is the click rate, the click through rate, or the like, the output value belongs to the (0, 1) interval, and in this case, the output value of the prediction model may be directly taken as the predicted calorific value in the present embodiment. In other cases, the output value of the prediction model does not belong to a specific interval, for example, when the output value of the prediction model is the number of clicks, the collection number, the like, the output value may be generally any integer of a real number range, and in this case, the output value of the prediction model may be mapped into the target interval, and the mapped value may be used as the predicted calorific value in the present embodiment. Illustratively, the output value of the prediction model may be mapped to a (0, 1) interval by a sigmoid function. The expression of the sigmoid function may be, for example, the following expression:
Figure BDA0002374728480000161
where x is an output value of the prediction model, sigmoid (x) is an obtained mapping value, and the mapping value may be used as the prediction heat value in this embodiment.
Optionally, in this embodiment, the number of subintervals included in the target interval may be flexibly set, and in order to reduce the probability that the predicted heat value of more than one piece of sample information falls into the same subinterval, the number of subintervals included in the target interval may be at least greater than the number of at least two pieces of sample information in S111. For example, in some application scenarios, the target interval may include between three and five million sub-intervals, e.g., 450 ten million sub-intervals.
Referring to fig. 11, fig. 11 shows a data processing procedure of the steps shown in fig. 10. Wherein the heat data i comprises a real heat value r i And predicted heat value Q i
Taking the predicted heat value in the heat data belonging to the (0, 1) interval as an example, based on S920, after the electronic device 100 reads the heat data i, the predicted heat value Q in the heat data i can be determined i Belongs to the t-th sub-interval in the target interval (0, 1), the t-th sub-interval and the array element A [ t ] in the first array A]Corresponding, then array element A [ t ]]Is the first element corresponding to the heat data i, array element A [ t ]]Will be set as the target value. Wherein t is more than or equal to 1 and less than or equal to N, and t is an integer.
In this embodiment, when a plurality of acquired heat data are different from each other, the heat data 1 to i-1 in the reading order are paired with the heat data i to form a data pair. Then, of the heat data 1 to i-1, the number of heat data having a predicted heat value larger than the predicted heat value of the heat data i is the fourth number (assumed to be K) for the heat data i i ). Correspondingly, the heat data i is matched with the heat data 1 to i-1 to obtain dataThe above-mentioned fourth number K can be obtained by subtracting, from the third number of pairs (i.e., i-1), the number of heat data having a predicted heat value smaller than that of the heat data i among the heat data 1 to i-1 i
For convenience of description, among the heat data 1 to i-1, heat data having a predicted heat value smaller than that of the heat data i is given as heat data x, (1. Ltoreq. X.ltoreq.i-1, x being an integer).
S910 and S920 provide a basis for determining the number of the heat data x in the heat data 1 to i-1. Referring to fig. 11, the detailed principle is described as follows.
Since the electronic device 100 sequentially reads each of the heat data in the order from the largest to the smallest of the real heat values in the heat data, after the heat data i is read, the values of the array elements corresponding to the heat data 1 to i-1 are set as the target values. Further, the first element corresponding to the heat data x is A [1]]To A [ t-1]]Is set to the target value. Thus, the first element A [ t ]]The previous array elements A [1]]To A [ t-1]]The number Sum of array elements set as the target value t-1 The number of heat data x in the heat data 1 to i-1 is shown. Based on this, the third quantity determined for the heat data i minus Sum is used t-1 To obtain a fourth quantity K i
Thus, based on S910 and S920, S131 can be implemented by S131-1, S131-2, and S131-3 shown in FIG. 10. The detailed description is as follows.
S131-1, acquiring a sequence identifier of a first element corresponding to the currently read heat data in the first array, and using the sequence identifier as a first identifier.
The order of the array elements identifies the order in which the array elements are characterized in the array in which they are located. Alternatively, in this embodiment, the sequence identifier may be a sequence number or a subscript of an array element, for example, the sequence identifier of A [1] is 1, the sequence identifier of A [2] is 2, and the sequence identifier of A [ t ] is t.
S131-2, determining array elements in sequence before the first element corresponding to the currently read heat data from the first array according to the first identifier.
Taking the first element as a [ t ] for example, and the first identifier as t, then each array element determined from the first array according to the first identifier t is: in the first array, all array elements less than t, namely array elements A [1] through A [ t-1], are identified sequentially.
And S131-3, obtaining the fourth quantity according to the third quantity determined after the heat data is read at this time and the values of the array elements.
Optionally, in the process of implementing the foregoing S131-1, in order to obtain the sequential identifier (i.e., the first identifier) of the first element corresponding to the heat data read each time, it is generally necessary to maintain the correspondence between the heat data and the array elements in the first array, and to search the correspondence according to the heat data read this time. In order to quickly acquire the first identifier, before performing S112-2, the information pushing method provided in this embodiment may further include the following steps:
determining a subinterval where the predicted heat value in each heat data is located, determining an array element corresponding to the subinterval from a first array, taking the array element as a first element corresponding to the heat data, and replacing the predicted heat value in the heat data with the sequence identifier of the first element.
After replacing the predicted heat value with the sequence identifier of the corresponding first element in the heat data, the electronic device 100 may directly obtain the sequence identifier in the heat data read this time as the first identifier, thereby implementing S131-1 described above. Therefore, additional corresponding relation does not need to be maintained, and additional searching operation does not need to be carried out, so that the efficiency of obtaining the first identifier is improved.
Optionally, in this embodiment, S131-3 shown in fig. 10 may have various implementations.
In one embodiment, the electronic apparatus 100 may identify the number of heat data having a value of the target value from among the heat data read sequentially before the heat data read this time. For example, for the heat data i read this time, the electronic device 100 may identify the current time from the heat data 1 to i-1The number of heat data having the target value is the above-mentioned number Sum t-1 . Then, the electronic device 100 may determine the third number M of the heat data read this time i And number Sum t-1 Is obtained as a fourth quantity K i
In this embodiment, there is no limitation on specific values of the target values and the initial values of the array elements in the first array, as long as the two values are different.
In another embodiment, the initial value of the array elements in the first array may be set to 0 and the target value may be set to 1. In this case, S131-3 may be implemented by the following procedure:
determining the sum of the values of the array elements;
and determining a difference value between the third quantity determined after the reading of the heat data and the sum of the values of the array elements, and taking the difference value as the fourth quantity.
Referring to the example shown in fig. 11 above, for the heat data i read this time, the respective array elements determined by S131-2 are: array element A [1]]To A [ t-1]]. The heat data having a predicted heat value smaller than the predicted heat value in the heat data i among the heat data 1 to i-1 is represented as heat data x. And array element A [1]]To A [ t-1]]If the value of the array element corresponding to the middle and hot data x is already set to 1 and the values of the other array elements are still 0, then the array element A [1]]To A [ t-1]]Is equal to the number Sum of heat data x t-1
It is to be noted that, in the case where there is heat data having the same true heat value among the acquired at least two heat data, such as the heat data i-1 and i shown in fig. 7, assuming that the first element corresponding to the heat data i-1 is set as the target value before the fourth number is determined for the heat data i, if the predicted heat value in the heat data i-1 is greater than the predicted heat value in the heat data i, the finally calculated fourth number K is obtained i A data pair consisting of heat data i-1 and i will be included, but heat data i-1 and i are not grouped into a data pair, which may result in an error in the resulting second quantity.
For this error, in one implementation, the error is negligible if enough pairs of data are acquired. In another implementation manner, after the fourth number corresponding to each of the heat data with the same true heat value is determined, the first element corresponding to each of the heat data may be set as the target value, so that the error may be eliminated.
Optionally, to reduce Sum Sum of values of the elements of the above-mentioned array t-1 In this embodiment, the electronic device 100 may further maintain a second array, where the second array is a tree array corresponding to the first array. The value of each array element in the second array is equal to the sum of the values of at least some array elements in the first array. Through the tree array, the time complexity of the sum of the values of all array elements between any two array elements in the first array is queried to be o (n).
Illustratively, assuming that the first array A includes N array elements, A [ t ] (1 ≦ t ≦ N, t being an integer) is used to represent the array elements in the first array A. Correspondingly, the second array C also includes N array elements, and in this embodiment, C [ t ] is used to represent the array elements in the second array C.
Since the second array is a tree array, the value of the array element C [ t ] is equal to the sum of the respective values of the array elements A [ t-lowbit (t) +1] to A [ t ] in the first array.
Wherein the lowbit (t) is as follows: and after t is converted into binary number, the decimal number corresponding to the binary number is formed by the value of the first non-0 bit appearing from the lowest bit and the value of each data bit lower than the first non-0 bit. The value of the non-0 bit is 1, and the value of the data bit lower than the first non-0 bit is 0.
The lowbit (t) is explained by some examples, for example, when t =1, its binary form is 0001, its lowest bit is not 0 bit, and the decimal number 1 represented by the value 1 of the lowest bit of 0001 is the value of lowbit (1). Correspondingly, C [1] = a [1]. For another example, when t =2 is defined as 0010 in binary form, the second bit from the lowest bit is the first non-0 bit, and the lowest bit is a data bit lower than the first non-0 bit, then the decimal number 2 corresponding to the binary number represented by the value 10 of the two lowest data bits of 0010 is the value of lowbit (2). Correspondingly, C [2] = a [1] + a [2]. Similarly, when t =3, its binary form is 0011, then lowbit (3) =1. Correspondingly, C [3] = a [3].
Referring to fig. 12, taking the first array a and the second array C respectively including 8 array elements as an example, the corresponding relationship between the first array a and the second array C is exemplarily shown. Wherein, C [1] = a [1], C [2] = a [1] + a [2], C [3] = a [3], C [4] = a [1] + a [2] + a [3] + a [4], C [5] = a [5], C [6] = a [5] + a [6], C [7] = a [7], C [8] = a [1] + a [2] + a [3] + a [4] + a [5] + a [6] + a [7] + a [8].
As can be seen, the Sum Sum of the values of the array elements for the first t-1 items of the first array A t-1 It can be calculated by the following expression:
sum t-1 =∑ i C[t i ],
wherein i is an integer greater than or equal to 1, t i Is an integer greater than 0, t 1 =t-1,t i+1 =t i -lowbit(t i ). For example, in the scenario shown in fig. 10, if t-1=6, sum 6 =C[6]+C[4]. If t-1=7, sum 7 =C[7]+C[6]. If t-1=8, sum 8 =C[8]。
In the case where the second array is maintained, the electronic device 100 may update the values of the corresponding array elements in the second array after setting the array elements in the first array as the target values. In other words, after S910 is executed, the information pushing method provided in this embodiment may further include the following steps:
accessing a second array;
an array element corresponding to the first element set as the target value is determined from the second array, as a second element, and the value of the second element is updated according to the target value.
In this embodiment, each array element in the tree array may be regarded as a node, and the array element C [ t ] may also be referred to as a node t. Wherein, the node t + lowbit (t) is a father node of the node t.
Then, assuming that the first element set as the target value is a [ t ], the parent nodes of the current node may be sequentially searched with the node t in the second array as the starting node until the root node is found. And finding array elements corresponding to all the nodes, namely second elements corresponding to the first elements A [ t ]. For example, in the scenario shown in FIG. 12, the second element corresponding to the first element A [4] is: c4, C8; the second element corresponding to the first element A [5] is: c5, C6, C8; the second element corresponding to the first element A [6] is: c6 and C8.
Electronic device 100, after determining a second element corresponding to the first element, may accumulate the target value over a current value of the second element. Based on this, after reading the heat data of one sample information each time, the electronic device 100 may determine the sum of the values of the array elements sequentially before the first element corresponding to the heat data read this time by the following procedure:
the sum of the values of the array elements is queried from the second array.
The following describes a detailed process for querying the sum of values of array elements from the second array.
In this embodiment, the child nodes of the node t may be represented as: node t-lowbit (t). For example, assuming that each array element is the first t-1 array elements in the first array, the child nodes of the current node may be sequentially searched by using the node t-1 in the second array as the starting node until the searched child nodes do not exist. The electronic device 100 may read the values of the array elements corresponding to the searched nodes from the second array, and Sum the read values to obtain a Sum, which is Sum of the values of the array elements t-1
For example, in the scenario shown in fig. 12, if the elements of the first array are sequentially a [1] before the first element corresponding to the currently read heat data]To A < 6 >]If the array elements corresponding to the child nodes found from the second array include: c6]、C[4]. Logarithmic element C6]And C4]Sum to obtain Sum 6 . If in the first arrayThe array elements in the sequence before the first element corresponding to the heat data read this time are respectively A [1]]To A < 3>]If the array elements corresponding to the child nodes found from the second array include: c3]、C[2]. Logarithmic group element C3]And C2]Sum of the values of (c) to obtain Sum 3
Compared with the method of directly summing the values of the first t-1 array elements in the first array, the method has the advantages that the number of the array elements needing to be read and the data quantity needing to be calculated are reduced, time complexity is reduced, and calculation efficiency is improved through the second array.
In order to make the technical solutions more clear to those skilled in the art, the following describes the information pushing method provided in the embodiments of the present application with a specific example.
Referring to fig. 13, client display interfaces 1201 and 1202 of a social platform W are shown, where the social platform W may predict the number of clicks of information to be pushed (such as video information, audio information, text information, image information, and the like) of a target account within a period of time after a current time through a prediction model (also referred to as a "reinforcement learning model") trained in a reinforcement learning manner, and may select the information to be pushed according to the obtained number of predicted clicks and push the information to be pushed to a client corresponding to the target account.
Taking the account of the user U1 as a target account as an example, when the user U1 logs in to the social platform W through the account and enters the display interface 1201, "see-at-a-glance" on the display interface 1201 may be clicked, the information push function of the social platform W is triggered, and the information push function enters the display interface 1202. The social platform W may push the to-be-pushed information corresponding to the account of the user U1 to the client corresponding to the account of the user U1, and display the to-be-pushed information on the display interface 1202 of the client, for example, the display interface 1202 of the client may display: "XXX announcement" and "XXX news" clicked by a user A1 having a friend relationship with the user U1, "YYYY" clicked by a user A2 having a friend relationship with the user U1, "ZZZZ" clicked by a user A3 having a friend relationship with the user U1, and the like.
When the user U1 clicks any information (e.g., XXX announcement) displayed on the display interface 1202, other users (e.g., A1, A2, A3, etc.) having a friend relationship with the user U1 can view the information of "XXX announcement" through the display interface 1202 of the respective clients, where the user A1 has clicked on the "XXX announcement" and the users A2 and A3 can click on the "XXX announcement" displayed on the display interface 1202 of the respective clients.
In detail, the social platform W may determine information to be pushed according to the account of the user U1, and predict the predicted click number of each information to be pushed through a reinforcement learning model. The predicted click times are times that the information to be pushed may be clicked within a preset time period if the user U1 clicks the information to be pushed displayed on the display interface 1202 in a state of entering or refreshing the display interface 1202. The information to be pushed may be information that is clicked on the display interface 1202 of the client by another user having a friend relationship with the user U1.
The social platform W may sort the predicted click times of each piece of information to be pushed, and sequentially select a preset number (which may be 5 to 10, for example, 8) of pieces of information to be pushed to the client corresponding to the account of the user U1 according to the order from large to small of the predicted click times, so that the selected preset number of pieces of information to be pushed may be displayed on the display interface 1202. After the preset time period, the real click times of each pushed information to be pushed in the preset time period can be determined.
Assume that a plurality of popularity data are obtained by internal measurement and the like, and each popularity data includes a real click frequency of a certain information pushed by the social platform W and a predicted click frequency of the information obtained by the reinforcement learning model. Taking 6 pieces of heat data as an example, the information push method provided by the embodiment of the present application may include the following processes:
s001, the electronic device 100 reads 6 pieces of heat data from the device storing the heat data, maps the predicted number of clicks in each piece of heat data to a predicted heat value in a (0, 1) interval through a sigmoid function, and modifies the predicted number of clicks in the piece of heat data to the mapped predicted heat value.
The electronic device 100 divides the (0, 1) interval into 8 sub-intervals, and the electronic device 100 maintains a first array A, wherein array elements A [ t ] (t is more than or equal to 1 and less than or equal to 8, and 8 is an integer) correspond to the t-th sub-interval. The initial value of the array element A [ t ] is 0.
The electronic device 100 also maintains a second array C, which is a tree array corresponding to the first array a, including 8 array elements. The array elements of the second array C may be denoted as C [ t ]. The initial value of the array element C [ t ] is 0.
And S002, for each modified heat data, determining a subinterval where the predicted heat value in the heat data is located in the (0, 1) interval, and replacing the predicted heat value in the heat data with the subscript of the determined subinterval.
And S003, sorting the modified and replaced 6 heat data according to the sequence of the real heat values from large to small, wherein the ith heat data is represented as di.
Where 1 ≦ i ≦ 6, i is an integer, the popularity data di includes the true click number ri and the predicted popularity value qi, and r1= r2> r3> r4= r5> r6, assuming q1=8, q2=5, q3=7, q4=6, q5=3, q6=2. The real number of clicks may be regarded as the real heat value in the above embodiment.
It should be noted that, in the embodiment of the present application, for a plurality of hot degree data with the same real click number, the hot degree data may also be sorted according to the size of the predicted hot degree value, and of course, the hot degree data may also be randomly arranged, which is not limited in this embodiment.
The electronic device 100 may maintain a variable r _ last for recording the real number of clicks of the previous read heat data, and the initial value of r _ last may be any value that can be distinguished from the real number of clicks of the above 6 heat data, for example, may be a negative number, such as-1. In addition, the electronic device 100 may further maintain a temporary array temp for caching the heat data, and in an initial state, the temporary array temp is empty.
And S004, reading the heat data d1, determining that r1 is not equal to r _ last, reading the temporary array, determining that the temporary array is empty, caching the heat data d1 into the temporary array temp, and updating the value of r _ last to r1.
S005, reading the heat data d2, determining that r2 is equal to r _ last, and caching the heat data d2 into the temporary array temp.
S006, reading the heat data d3, determining that r3 is not equal to r _ last, and reading the heat data d1 and d2 in the temporary array temp.
S007, if the electronic device 100 determines that there is no heat data with a reading order before both d1 and d2, the third number M1 of data pairs obtained by pairing the heat data with a reading order before d1 with d1 is equal to 0, and M1 is accumulated into the first variable.
S008, according to the subscript 8 in the d1, the electronic device 100 determines a first element A [8] corresponding to the d1 in the first array A]And from the second array C, the array element C [7] is queried]、C[6]And C4]And summing the values of the three to obtain an array element A [1]]To A < 7 >]Sum of values of (Sum) 7 Subtracting Sum from the third number M1 7 A fourth quantity K1 is obtained, and K1 is accumulated into the second variable.
Wherein, sum 7 And K1 are both 0.
S009, the electronic device 100 determines that there is no heat data in the reading order before both d1 and d2, and then the third number M2 of data pairs obtained by pairing the heat data in the reading order before d2 with d2 is 0, and adds M2 to the first variable.
S010, the electronic device 100 determines a first element A [5] corresponding to d2 in the first array A according to the subscript 5 in d2]And querying array element C [4] from second array C]Is added to the value of (a) to obtain the array element A [1]]To A < 4 >]Sum of values of (Sum) 4 Subtracting Sum from the third number M2 4 A fourth quantity K2 can be derived, adding K2 to the second variable.
Where K2=0 and the current value of the second variable is 0.
S011, setting a first element A [8] corresponding to subscript 8 in d1 as 1, and accumulating 1 on the value of an array element C [8] corresponding to the array element A [8] in a second array C; the first element A [5] corresponding to subscript 5 in d2 is set to 1, and 1 is respectively added to the values of array elements C [5], C [6], C [8] corresponding to array element A [5] in the second array C.
Wherein C [5] =1, C [6] =1, C [8] =2.
S012 clears the temporary array temp, buffers the heat data d3 in the temporary array temp, and updates r _ last to r3.
And S013, reading the heat data r4, and if the r4 is not equal to r _ last, reading the heat data d3 in temp.
S014, the electronic device 100 determines that the number of heat data in the reading order before the heat data d3 is 2, and then reads a third number M3=2 of data pairs in which the heat data d1 and d2 in the reading order before the heat data d3 are respectively paired with the heat data d3, and accumulates M3 to the first variable.
Wherein the current value of the first variable is 2.
S015, the electronic device 100 determines a corresponding first element A [7] in the first array A according to the subscript 7 in d3]Then query array element C [6] in the second array C]、C[4]And the values of the two are summed to obtain the array element A [1] of the first array A]To A < 6 >]Sum of values of (1) Sum 6 Subtracting Sum from the third number M3 6 A fourth number K4 may be derived, and the fourth number K4 is accumulated to the second variable.
Wherein, sum 6 =1, the fourth quantity K4=1, and the current value of the second variable is 1.
S016, the electronic device 100 sets the first element A [7] to 1 according to the subscript 7 in d3, and adds 1 to the value of the array element C [7], C [8] corresponding to A [7] in the second array C.
Wherein C [7] =1, C [8] =3.
S017, emptying the temporary array temp, caching d4 into the temporary array temp, and updating r _ last to r4.
S018, reading the heat data d5, and if r5 is determined to be equal to r _ last, buffering the heat data d5 into the temporary array temp.
S019, reading the heat data d6, and if r6 is determined not to be equal to r _ last, reading the data in the temporary array temp.
S020, determining that the number of the heat data before d4 and d5 in the reading order is 3, determining that M4=3 is the third number of data pairs obtained by pairing d4 with the heat data before d4 in the reading order, and accumulating M3 to the first variable.
Wherein the current value of the first variable is 5.
S021, determining the corresponding first element A [6] of d4 in the first array A according to the subscript 6 of d4]Query array element C [5] from second array C]、C[4]Sum of the two values to obtain Sum 5 Subtracting Sum from the third number M3 5 A fourth number K4 may be obtained, adding K4 to the second variable.
Wherein, sum 5 =1, K4=2. The current value of the second variable is 3.
S022, if the number of heat data read in the order before d4 and d5 is determined to be 3, a third number M5=3 of data pairs obtained by pairing the heat data read in the order before d5 with d5 may be determined, and M5 may be added to the first variable.
Where the current value of the first variable is 8.
S023, determining a first element A [3] of d5 corresponding to the first array A according to the subscript 3 of d5]Query array element C [2] from second array C]To obtain Sum 2 Subtracting Sum from the third number M5 2 A fourth number K5 may be derived, and the fourth number K5 is added to the second variable.
Wherein, sum 2 K5=3, the current value of the second variable is 6.
S024, emptying the temporary array, caching d6 in the temporary array, and updating r _ last to r6.
S025, the electronic device 100 reads the data in the temporary array after determining that the reading of the heat data is finished.
S026, it is determined that the number of heat data in the reading order before d6 is 5, and then the number of data pairs M6=5 where the heat data in the reading order before d6 and d6 can be paired, and M6 is added to the first variable.
The current value of the first variable is 13, the total number of pairs of data acquired, i.e. the first number, is equal to 13.
S027, according to d62, determines the corresponding first element A [2] of d6 in the first array A]And querying array element C [1] from second array C]To obtain the Sum Sum of the values of the first 1 array elements in the first array A 1 Subtracting Sum from the third number M6 1 A fourth number K6 may be derived, which is added to the second variable. Wherein, sum 2 =0, K6=5, and the current value of the second variable is 11, i.e. the second number of target data pairs among all the acquired data pairs is 11.
S028 divides the second quantity 11 by the first quantity 13, and determines whether the obtained quotient reaches a target value. If the target value is reached, a reinforcement learning model for predicting click times is configured in the social platform W.
S029, the social platform W determines information clicked by each user with a friend relationship with the user U1 as information to be pushed corresponding to the account of the user U1, predicts click times of the information to be pushed corresponding to the account of the user U1 in a preset time period through the reinforcement learning model, sorts the predicted click times of the information to be pushed output by the prediction model, and selects 10 information to be pushed to a client corresponding to the account of the user U1 according to the descending order of the predicted click times.
For other users, the social platform W can push information by referring to the process S029, and details thereof are not described here.
For the case with more heat data, the processing can be performed with reference to the above-mentioned flow S001-S0028, which is not described herein again.
In the above example, the predicted click times of the prediction model configured in the social platform W are more accurate, so that the information pushed by the predicted click times output based on the prediction model is more accurate and more meets the user requirements.
Referring to fig. 14, fig. 14 is a block diagram of an electronic device according to an embodiment of the present disclosure. The electronic device 100 may be a smart phone, a tablet computer, an electronic book, or other electronic devices capable of running an application. The electronic device 100 in the present application may include one or more of the following components: a processor 101, a memory 102, and one or more programs, wherein the one or more programs may be stored in the memory 102 and configured to be executed by the one or more processors 101, the one or more programs configured to perform a method as described in the aforementioned method embodiments.
Processor 101 may include one or more processing cores. The processor 110 interfaces with various components throughout the electronic device 100 using various interfaces and circuitry to perform various functions of the electronic device 100 and process data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 102 and invoking data stored in the memory 102. Alternatively, the processor 101 may be implemented in hardware using at least one of Digital Signal Processing (DSP), field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 101 may integrate one or a combination of a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may not be integrated into the processor 101, but may be implemented by a communication chip.
The Memory 102 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). The memory 102 may be used to store instructions, programs, code sets, or instruction sets. The memory 102 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like. The storage data area may also store data (such as the first array and the second array) created by the electronic device 100 in use, and the like.
It will be appreciated that the configuration shown in fig. 14 is merely illustrative and that electronic device 100 may include more or fewer components than shown in fig. 1 or may have a different configuration than that shown in fig. 14.
Referring to fig. 15, a block diagram of an information pushing apparatus 1500 according to an embodiment of the present disclosure is shown. The apparatus 1500 may include: an acquisition module 1510, a determination module 1520, and a push module 1530.
The obtaining module 1510 is configured to obtain a data pair, where the data pair includes first data and second data, the first data includes a true heat value of one sample information and a predicted heat value of the prediction model for the sample information, and the second data includes a true heat value of another sample information and a predicted heat value of the prediction model for the another sample information, and the true heat value in the first data is greater than the true heat value in the second data.
Optionally, the obtaining module 1510 may include a first obtaining submodule and a pairing submodule. The first obtaining submodule is used for respectively obtaining heat data of the sample information, and the heat data of each sample comprises a true heat value of the sample information and a prediction heat value of the prediction model to the sample information.
The matching module is used for matching the heat data of each sample information and the heat estimation data of each other sample information with the real heat value larger than the sample into a data pair respectively, wherein the heat data with the larger real heat value is the first data, and the heat data with the smaller real heat value is the second data.
The pairing submodule may be specifically configured to: sorting the heat data of the at least two pieces of sample information according to the size of the real heat value; sequentially reading heat data of each sample information according to the sequence of the real heat values from large to small; after reading the heat data of one sample information each time, pairing the heat data read this time with each heat data read in the sequence before the heat data read this time to form a data pair.
The determining module 1520 is configured to determine the number of the acquired data pairs as a first number; determining, as the second number, the number of target data pairs from the acquired data pairs, the target data pairs being data pairs in which the predicted heat value in the first data is larger than the predicted heat value in the second data.
In the case where the obtaining module 1510 includes a pairing submodule, the determining module 1520 may be specifically configured to: after reading the heat data of one sample information each time, determining the number of data pairs obtained by pairing each heat data before the heat data read this time and the heat data read this time in the reading sequence as a third number; summing the third quantities respectively determined after reading the heat data of one sample information at a time, to obtain the first quantity.
The determining module 1520 may be further configured to: after reading the heat data of one sample information each time, determining the number of target data pairs as a fourth number from data pairs obtained by pairing each heat data before the heat data read this time and the heat data read this time in the reading sequence; summing the fourth quantities respectively determined after each reading of the heat data of one sample, resulting in the second quantity.
Optionally, the predicted heat value of each sample information belongs to the target interval, in this case, the obtaining module 1510 may be further configured to: the method comprises the steps of obtaining at least two subintervals included in a target interval, wherein the at least two subintervals correspond to array elements in a first array one by one according to the sequence from small to large, and the array elements in the first array have initial values.
The apparatus 1500 may further include a setting module, configured to set, after each time the heat data of one piece of sample information is read, a first element, which is in the first array and corresponds to the currently read heat data, as a target value, where the first element is an array element corresponding to a subinterval where a predicted heat value in the currently read heat data is located.
In this case, the determining module 1520 determines the number of target data pairs from data pairs obtained by pairing each of the heat data before the heat data read this time in the reading order with the heat data read this time, and as the fourth number, the method may be: acquiring a sequence identifier of a first element corresponding to the read heat data in the first array as a first identifier; determining array elements in sequence before a first element corresponding to the currently read heat data from the first array according to the first identifier; and obtaining the fourth quantity according to the third quantity determined after the heat data is read at this time and the value of each array element.
Optionally, the setting module may be further configured to, before the obtaining module 1510 sequentially reads each piece of heat data, determine a subinterval where a predicted heat value in each piece of heat data is located, determine an array element corresponding to the subinterval from the first array, serve as a first element corresponding to the piece of heat data, and replace the predicted heat value in the piece of heat data with an order identifier of the first element.
The determining module 1520 obtains the sequential identifier of the first element corresponding to the currently read heat data, and the manner of the sequential identifier as the first identifier may be: and acquiring a sequence identifier in the hot data read this time as the first identifier.
Alternatively, the initial value of the first array may be 0 and the target value may be 1. In this case, the determining module 1520, according to the third quantity determined after the reading of the heat data this time and the value of each array element, may obtain the fourth quantity by: determining the sum of the values of the array elements; and determining a difference value between the third quantity determined after the reading of the heat data and the sum of the values of the array elements, and taking the difference value as the fourth quantity.
Optionally, the apparatus 1500 may further include an updating module, where the updating module is configured to, after the setting module sets, as the target value, the first element in the first array corresponding to the heat data read this time, access a second array, where the second array is a tree array corresponding to the first array, and a value of each array element in the second array is a sum of values of at least some array elements in the first array; an array element corresponding to the first element set as the target value is determined from the second array as a second element, and the value of the second element is updated according to the target value.
Correspondingly, the manner of determining the sum of the values of the array elements by the second obtaining module may be: and inquiring the sum of the values of the array elements from the second array.
Optionally, the manner that the obtaining module 1510 pairs the heat data of each sample information with the heat data of each other sample information whose true heat value is greater than that of the sample information into a data pair may be: after reading the heat data of one sample each time, if the real heat value in the heat data read this time is larger than the real heat value in the heat data read last time, triggering and executing the step of taking the heat data read this time and each heat data read in the sequence before the heat data read this time as a data pair; if the real heat value in the currently read heat data is equal to the real heat value in the previously read heat data, the heat data with the real heat value larger than the real heat value in the currently read heat data, which are included in the heat data before the currently read heat data in the reading sequence, are respectively used as a data pair with the currently read heat data.
The prediction model in the embodiment of the present application may be a reinforcement learning model.
The pushing module 1530 is configured to obtain a ratio of the second quantity to the first quantity, and if the ratio reaches a target value, configure the prediction model in an information pushing platform, where the information pushing platform is configured to select the information to be pushed to push according to a prediction heat value of the information to be pushed by the prediction model.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described apparatuses and modules may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, the coupling or direct coupling or communication connection between the modules shown or discussed may be through some interfaces, and the indirect coupling or communication connection between the devices or modules may be in an electrical, mechanical or other form. In addition, functional modules in the embodiments of the present application may be integrated into one processing module, or each of the modules may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode.
Referring to fig. 16, a block diagram of a computer-readable storage medium according to an embodiment of the present application is shown. The computer readable medium 1600 has stored therein program code that can be invoked by a processor to perform the methods described in the method embodiments above.
The computer-readable storage medium 1600 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Optionally, computer-readable storage medium 1600 includes non-transitory computer-readable medium. The computer readable storage medium 1600 has storage space for program code 1610 for performing any of the method steps of the method described above. The program code can be read from and written to one or more computer program products. Program code 1610 may be compressed, for example, in a suitable form.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (15)

1. An information pushing method, comprising:
acquiring a data pair, wherein the data pair comprises first data and second data, the first data comprises a real heat value of one sample information and a predicted heat value of a prediction model for the sample information, the second data comprises a real heat value of another sample information and a predicted heat value of the prediction model for the another sample information, and the real heat value in the first data is larger than the real heat value in the second data;
determining the number of the acquired data pairs as a first number;
determining the number of target data pairs from the acquired data pairs as a second number, wherein the target data pairs are data pairs of which the predicted heat value in the first data is larger than that in the second data;
obtaining the ratio of the second quantity to the first quantity;
if the ratio reaches the target value, the prediction model is configured in an information pushing platform, and the information pushing platform is used for selecting the information to be pushed to push according to the prediction heat value of the information to be pushed of the prediction model.
2. The method of claim 1, wherein said obtaining data pairs comprises:
respectively obtaining heat data of at least two pieces of sample information, wherein the heat data of each piece of sample information comprises a real heat value of the piece of sample information and a predicted heat value of the prediction model on the piece of sample information;
and respectively pairing the heat data of each sample information with the heat data of each other sample information with the real heat value larger than the sample information to form a data pair, wherein the heat data with the larger real heat value is the first data, and the heat data with the smaller real heat value is the second data.
3. The method according to claim 2, wherein the pairing of the heat data of each sample information with the heat data of each other sample information having a true heat value greater than the sample information into a data pair respectively comprises:
sorting the heat data of the at least two pieces of sample information according to the magnitude of the real heat value;
sequentially reading heat data of each sample information according to the sequence of the real heat values from large to small;
after reading the heat data of one sample information each time, pairing the heat data read this time with each heat data read in the sequence before the heat data read this time to form a data pair.
4. The method according to claim 3, wherein after reading the heat data of one sample information at a time, respectively pairing the heat data of the current reading with each heat data of the reading sequence before the heat data of the current reading as a data pair comprises:
after reading the heat data of one sample information each time, if the real heat value in the heat data read this time is not equal to the real heat value in the heat data read last time, triggering and executing the step of respectively pairing the heat data read this time and each heat data read in the sequence before the heat data read this time into a data pair.
5. The method according to claim 2, wherein the pairing of the heat data of each sample information with the heat data of each other sample information with the true heat value larger than that of the sample information into a data pair respectively comprises:
sorting the heat data of the at least two pieces of sample information according to the magnitude of the real heat value;
sequentially reading heat data of each sample information according to the sequence of the real heat values from large to small;
after reading the heat data of one sample information each time, if the real heat value in the read heat data is equal to the real heat value in the read heat data at the last time, caching the read heat data and reading the heat data of the next sample information;
and if the real heat value in the currently read heat data is not equal to the real heat value in the previously read heat data, respectively pairing the currently cached heat data with each heat data in the reading sequence before each currently cached heat data to form a data pair, deleting the cached heat data, caching the currently read heat data, and reading the heat data of the next sample information.
6. The method according to any one of claims 3 to 5, wherein the determining the number of pairs of acquired data as the first number comprises:
determining the number of data pairs obtained by pairing the heat data in the reading sequence before the heat data read at the time with the heat data read at the time as a third number aiming at the heat data read at each time;
summing the third quantities respectively determined for each read heat data to obtain the first quantity.
7. The method according to any one of claims 3 to 5, wherein the determining the number of target data pairs from the acquired data pairs as the second number comprises:
for each read heat data, determining the number of target data pairs as a fourth number from a data pair obtained by matching the heat data before the read heat data at the current time and the read heat data at the current time in the reading sequence;
summing the fourth quantities respectively determined for each read heat data to obtain the second quantity.
8. The method of claim 7, wherein the predicted heat value for each sample belongs to a target interval, the method further comprising:
acquiring at least two subintervals included in the target interval, wherein the at least two subintervals correspond to array elements in a first array one by one in a descending order, and the array elements in the first array have initial values;
after reading the heat data of one sample information each time, setting a first element corresponding to the currently read heat data in the first array as a target value, wherein the first element refers to an array element corresponding to a subinterval where a predicted heat value in the currently read heat data is located;
determining the number of target data pairs as a fourth number from data pairs consisting of the heat data read this time and each heat data before the heat data read this time in the reading sequence, wherein the data pairs comprise:
acquiring a sequence identifier of a first element corresponding to the read heat data in the first array as a first identifier;
determining array elements in sequence before a first element corresponding to the currently read heat data from the first array according to the first identifier;
and obtaining the fourth quantity according to the third quantity determined according to the hot data read this time and the values of the array elements.
9. The method of claim 8, wherein prior to said reading each heat data in turn, the method further comprises:
determining a subinterval where the predicted heat value in each heat data is located, determining an array element corresponding to the subinterval from the first array, taking the array element as a first element corresponding to the heat data, and replacing the predicted heat value in the heat data with a sequence identifier of the first element;
the obtaining of the sequential identifier of the first element corresponding to the currently read heat data, as the first identifier, includes:
and acquiring a sequence identifier in the hot data read this time as the first identifier.
10. The method of claim 8, wherein the initial value is 0 and the target value is 1; the obtaining the fourth quantity according to the third quantity determined for the heat data read this time and the values of the array elements includes:
determining the sum of the values of the array elements;
and determining a difference value between the third quantity determined according to the heat data read this time and the sum of the values of the array elements as the fourth quantity.
11. The method according to claim 10, wherein after the setting of the first element in the first array corresponding to the currently read heat data as a target value, the method further comprises:
accessing a second array, wherein the second array is a tree array corresponding to the first array, and the value of each array element in the second array is the sum of the values of at least part of array elements in the first array;
determining, from the second array, an array element corresponding to a first element set as the target value as a second element, the value of the second element being updated according to the target value;
the determining the sum of the values of the array elements includes:
and inquiring the sum of the values of the array elements from the second array.
12. The method according to any one of claims 8 to 11, wherein the setting, after each reading of the heat data of one sample information, a first element in the first array corresponding to the heat data read this time as a target value comprises:
if target heat data with the same real heat value as the currently read heat data exists in the heat data of the at least two pieces of sample information, after a fourth number is determined for the currently read heat data and the target heat data respectively, setting a first element corresponding to the currently read heat data in the first array as a target value.
13. An information pushing apparatus, comprising:
the acquisition module is used for acquiring a data pair, wherein the data pair comprises first data and second data, the first data comprises a real heat value of one sample information and a predicted heat value of a prediction model for the sample information, the second data comprises a real heat value of another sample information and a predicted heat value of the prediction model for the another sample information, and the real heat value in the first data is larger than the real heat value in the second data;
a determining module, configured to determine the number of the acquired data pairs as a first number; determining the number of target data pairs from the acquired data pairs as a second number, wherein the target data pairs are data pairs of which the predicted heat value in the first data is larger than that in the second data;
and the pushing module is used for acquiring the ratio of the second quantity to the first quantity, and if the ratio reaches a target value, the prediction model is configured in an information pushing platform, and the information pushing platform is used for selecting the information to be pushed to push according to the prediction heat value of the information to be pushed by the prediction model.
14. An electronic device, comprising:
one or more processors;
a memory;
one or more programs, wherein the one or more programs are stored in the memory and configured to be executed by the one or more processors, the one or more programs configured to perform the method of any of claims 1-12.
15. A computer-readable storage medium, characterized in that it stores a program code that can be called by a processor to execute the method according to any of claims 1-12.
CN202010061742.0A 2020-01-19 2020-01-19 Information pushing method and device and electronic equipment Active CN111259302B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010061742.0A CN111259302B (en) 2020-01-19 2020-01-19 Information pushing method and device and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010061742.0A CN111259302B (en) 2020-01-19 2020-01-19 Information pushing method and device and electronic equipment

Publications (2)

Publication Number Publication Date
CN111259302A CN111259302A (en) 2020-06-09
CN111259302B true CN111259302B (en) 2023-04-07

Family

ID=70950783

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010061742.0A Active CN111259302B (en) 2020-01-19 2020-01-19 Information pushing method and device and electronic equipment

Country Status (1)

Country Link
CN (1) CN111259302B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117808900B (en) * 2024-02-29 2024-05-14 云南省农业科学院质量标准与检测技术研究所 Method and device for classifying color development intensity of maize anthocyanin

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018014764A1 (en) * 2016-07-19 2018-01-25 阿里巴巴集团控股有限公司 Method and device for selecting commodity object, and determining model and usage popularity
CN109426980A (en) * 2017-08-31 2019-03-05 腾讯科技(深圳)有限公司 Determine method, apparatus, server and the storage medium of advertisement bidding
CN110363346A (en) * 2019-07-12 2019-10-22 腾讯科技(北京)有限公司 Clicking rate prediction technique, the training method of prediction model, device and equipment

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090222321A1 (en) * 2008-02-28 2009-09-03 Microsoft Corporation Prediction of future popularity of query terms
CN105260477A (en) * 2015-11-06 2016-01-20 北京金山安全软件有限公司 Information pushing method and device
CN106548364B (en) * 2016-09-27 2020-12-11 腾讯科技(北京)有限公司 Information sending method and device
CN110634006B (en) * 2018-06-22 2024-03-19 阿里巴巴(中国)有限公司 Advertisement click rate prediction method, device, equipment and readable storage medium
CN109816196A (en) * 2018-12-04 2019-05-28 平安科技(深圳)有限公司 Evaluation value calculation method, device, equipment and the readable storage medium storing program for executing of prediction model

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018014764A1 (en) * 2016-07-19 2018-01-25 阿里巴巴集团控股有限公司 Method and device for selecting commodity object, and determining model and usage popularity
CN109426980A (en) * 2017-08-31 2019-03-05 腾讯科技(深圳)有限公司 Determine method, apparatus, server and the storage medium of advertisement bidding
CN110363346A (en) * 2019-07-12 2019-10-22 腾讯科技(北京)有限公司 Clicking rate prediction technique, the training method of prediction model, device and equipment

Also Published As

Publication number Publication date
CN111259302A (en) 2020-06-09

Similar Documents

Publication Publication Date Title
CN110321422B (en) Method for training model on line, pushing method, device and equipment
TWI769754B (en) Method and device for determining target business model based on privacy protection
US20210256403A1 (en) Recommendation method and apparatus
CN109919316B (en) Method, device and equipment for acquiring network representation learning vector and storage medium
CN110119474B (en) Recommendation model training method, prediction method and device based on recommendation model
US9864951B1 (en) Randomized latent feature learning
CN110413867B (en) Method and system for content recommendation
CN112836125B (en) Recommendation method and system based on knowledge graph and graph convolution network
CN113536097A (en) Recommendation method and device based on automatic feature grouping
CN111259302B (en) Information pushing method and device and electronic equipment
CN115879508A (en) Data processing method and related device
CN113656699B (en) User feature vector determining method, related equipment and medium
CN113254795A (en) Training method and device for recommendation model
JP2024508502A (en) Methods and devices for pushing information
Meshram et al. A hidden Markov restless multi-armed bandit model for playout recommendation systems
CN112541556A (en) Model construction optimization method, device, medium, and computer program product
CN113449176A (en) Recommendation method and device based on knowledge graph
CN115438755A (en) Incremental training method and device of classification model and computer equipment
CN115756821A (en) Online task processing model training and task processing method and device
CN108848152A (en) A kind of method and server of object recommendation
CN115114442A (en) Knowledge graph updating method and device, storage medium and electronic equipment
CN112199571A (en) Artificial intelligence information processing system, method and readable storage medium
CN111582456A (en) Method, apparatus, device and medium for generating network model information
CN113569126A (en) Multimedia file recommendation method and device and server
CN113205369B (en) User consumption duration prediction method and device, electronic equipment and storage medium

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
REG Reference to a national code

Ref country code: HK

Ref legal event code: DE

Ref document number: 40023253

Country of ref document: HK

TA01 Transfer of patent application right

Effective date of registration: 20221117

Address after: 1402, Floor 14, Block A, Haina Baichuan Headquarters Building, No. 6, Baoxing Road, Haibin Community, Xin'an Street, Bao'an District, Shenzhen, Guangdong 518000

Applicant after: Shenzhen Yayue Technology Co.,Ltd.

Address before: 35th floor, Tencent building, Keji Zhongyi Road, high tech Zone, Nanshan District, Shenzhen City, Guangdong Province

Applicant before: TENCENT TECHNOLOGY (SHENZHEN) Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant