Method and device for pushing target virtual resources, storage medium and electronic device
By combining the behavioral characteristic data of the first historical cycle and the current cycle, the target information gain is calculated and the target decision tree model is input, the problem of low push accuracy in the existing technology is solved, and higher accuracy is achieved.
Patent Information
- Application Number
- CN202210963373.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-11
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2042-08-11
AI Technical Summary
In the process of pushing target virtual resources, the existing technology cannot effectively reflect the model effect because it only relies on the behavioral feature data of the current cycle, resulting in a low push accuracy.
By obtaining the behavioral feature set of the first historical cycle and the behavioral feature set of the current cycle, combining the historical classification results, the target information gain is calculated, and a target decision tree model based on state transition is input to improve the accuracy of push.
By using the behavioral feature data of the historical cycle, the information integrity of the decision tree model is enhanced, the accuracy of classification effect is improved, and the technical effect of improving the accuracy of target virtual resource push is achieved.
Smart Images

Figure CN115269993B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent recommendation technology, and in particular to a method and device for pushing target virtual resources, a storage medium and an electronic device. Background Art
[0002] With the development and popularization of Internet technology, a large amount of network information has been brought to users, and recommending network information to users based on their needs or interests has become a trend. For example, in the designated driver recommendation service, coupons are pushed to users based on the user's historical data of calling a designated driver. By pushing coupons, the number of orders for the designated driver service APP can be increased.
[0003] In the related technology, it is usually based on the current data of users in the designated driver service, for example, the user's rating data for songs, and iterative grouping is performed by constructing the maximum inter-group variance to find the optimal grouping, so as to optimally classify the users according to their song ratings.
[0004] However, since the data features collected in the designated driver service involve a lot of delayed log data, building a model using only current data features cannot effectively reflect the model effect, that is, it is impossible to accurately recommend target virtual resources (for example, coupons) to users. Furthermore, the problem of data feature delay may also cause low accuracy in the process of pushing target virtual resources.
[0005] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention
[0006] The embodiments of the present invention provide a method and device for pushing a target virtual resource, a storage medium and an electronic device, so as to at least solve the technical problem of low accuracy occurring during the process of pushing the target virtual resource.
[0007] According to one aspect of an embodiment of the present invention, a method for pushing a target virtual resource is provided, comprising: obtaining behavior characteristics of a first account set in a first historical period to obtain a first behavior characteristic set, obtaining behavior characteristics of a second account set in a current period to obtain a second behavior characteristic set, and obtaining historical classification results of the first account set in the first historical period to obtain a first historical classification result set, wherein the current period is the next period of the first historical period, and the historical classification results of the first account set are used to indicate whether each account in the first account set has executed a target event; determining a target information gain under the target behavior characteristics and the first historical classification result set according to the first behavior characteristic set, the second behavior characteristic set, and the first historical classification result set, wherein the first behavior characteristic set and the second behavior characteristic set are The feature set includes target behavior features; the target information gain is input into a target decision tree model based on state transition to obtain a target classification result corresponding to the target behavior features, wherein the target decision tree model is a model obtained by training an initial decision tree model using a training sample set, and the training sample set includes a second sample behavior feature set in a second historical period, a first sample behavior feature set in a first historical period, and a first sample classification result set in the first historical period, and the first historical period is the next period of the second historical period; when the target classification result indicates that it is allowed to push target virtual resources to an account corresponding to the target behavior features in the second account set, the target virtual resources are pushed to the account corresponding to the target behavior features in the second account set, and the target virtual resources are virtual resources allowed to be used in executing target events.
[0008] Optionally, the above-mentioned determining the target information gain under the target behavior feature and the first historical classification result set according to the first behavior feature set, the second behavior feature set and the first historical classification result set includes: determining the conditional information entropy of the target behavior feature set under the first historical classification result set according to the first behavior feature set, the second behavior feature set and the first historical classification result set, wherein the target behavior feature set includes the first behavior feature set and the second behavior feature set; determining V behavior feature subsets corresponding to the target behavior feature in the target behavior feature set, and determining the information entropy of the V behavior feature subsets under the first historical classification result set according to the V behavior feature subsets and the first historical classification result set, wherein V is a positive integer greater than or equal to 1; determining the target information gain according to the conditional information entropy of the target behavior feature set and the information entropy of the V behavior feature subsets. Optionally, the above-mentioned determining the conditional information entropy of the target behavior feature set under the first historical classification result set based on the first behavior feature set, the second behavior feature set and the first historical classification result set includes: when each historical classification result in the first historical classification result set is one of N results, determining the joint probability of each behavior feature subset in the target behavior feature set and each result in the N results, as well as the probability of each result, wherein N is a positive integer greater than or equal to 2; determining the conditional information entropy of the target behavior feature set under the first historical classification result set based on the joint probability of each behavior feature subset and each result, as well as the probability of each result.
[0009] Optionally, the above-mentioned determining the conditional information entropy of the target behavior feature set under the first historical classification result set according to the joint probability of each behavior feature subset and each result, and the probability of each result, includes: determining the conditional information entropy of the target behavior feature set under the first historical classification result set by the following formula:
[0010] Where D represents the target behavior feature set, p(D j ,i) represents the i-th result in N results and the j-th behavior feature subset D in the target behavior feature set j The joint probability of, p(i) represents the probability of the i-th result, D j Represents the behavior feature subset corresponding to the jth behavior feature in the target behavior feature set.
[0011] Optionally, the determining of V behavior feature subsets corresponding to the target behavior feature in the target behavior feature set includes:
[0012] According to the V values of the target behavior feature, V behavior feature subsets corresponding to the target behavior feature are determined in the target behavior feature set, wherein the value of the target behavior feature in each of the V behavior feature subsets is the same value corresponding to the V values.
[0013] Optionally, the above-mentioned determining the target information gain based on the conditional information entropy of the target behavior feature set and the information entropy of V behavior feature subsets includes: obtaining the number of accounts corresponding to the V behavior feature subsets respectively, obtaining the number of V accounts, and obtaining the number of target accounts corresponding to the target behavior feature set; determining the target information gain based on the number of V accounts, the number of target accounts, the conditional information entropy of the target behavior feature set, and the information entropy of the V behavior feature subsets.
[0014] Optionally, determining the target information gain according to the number of V accounts, the number of target accounts, the conditional information entropy of the target behavior feature set, and the information entropy of the V behavior feature subsets includes: determining the target information gain by the following formula:
[0015]
[0016] Among them, a l represents the target behavior characteristics, Y t-1 ∈{0,1} means that each historical classification result in the first historical classification result set is one of the two results. t-1 ) represents the conditional information entropy of the target behavior feature set under the first historical classification result set, G(D,a l |Y t-1 ) represents the target information gain, |D| represents the number of target accounts, and D v Indicates that the target behavior feature a l The vth behavior feature subset among the V behavior feature subsets under v |Y t-1 ) represents the vth behavior feature subset D under the first historical classification result set v Information entropy.
[0017] Optionally, the above method also includes: determining the sample information gain under the sample behavior characteristics and the first sample classification result set according to the training sample set, wherein the second sample behavior feature set includes the behavior characteristics of the second sample account set in the second historical period, the first sample behavior feature set includes the behavior characteristics of the first sample account set in the first historical period, and the first sample classification result set includes the historical classification results of the first sample account set in the first historical period, and the historical classification results of the first sample account set are used to indicate whether each account in the first sample account set has executed the target event; inputting the sample information gain into the initial decision tree model to be trained to obtain the sample classification result corresponding to the sample behavior feature, wherein the sample classification result is used to indicate whether it is allowed to push the target virtual resource to the account corresponding to the target behavior feature in the second account set; when the sample classification result and the actual classification result corresponding to the sample behavior feature obtained in advance do not meet the preset loss condition, adjusting the threshold parameter used to determine the sample classification result in the initial decision tree model; when the sample classification result and the actual classification result meet the loss condition, ending the training to obtain the target information gain.
[0018] According to another aspect of an embodiment of the present invention, a device for pushing a target virtual resource is provided, comprising: a first processing unit, configured to obtain behavioral features of a first account set in a first historical period to obtain a first behavioral feature set, obtain behavioral features of a second account set in a current period to obtain a second behavioral feature set, and obtain historical classification results of the first account set in the first historical period to obtain a first historical classification result set, wherein the current period is the next period of the first historical period, and the historical classification results of the first account set are used to indicate whether each account in the first account set has executed a target event; a second processing unit, configured to determine a target information gain under the target behavioral features and the first historical classification result set according to the first behavioral feature set, the second behavioral feature set and the first historical classification result set, wherein the first behavioral feature set and the second behavioral feature set include Target behavior characteristics; a third processing unit, used to input the target information gain into a target decision tree model based on state transition to obtain a target classification result corresponding to the target behavior characteristics, wherein the target decision tree model is a model obtained by training an initial decision tree model using a training sample set, and the training sample set includes a second sample behavior feature set in a second historical period, a first sample behavior feature set in the first historical period, and a first sample classification result set in the first historical period, and the first historical period is the next period of the second historical period; a first push unit, used to push the target virtual resource to the account corresponding to the target behavior characteristic in the second account set when the target classification result indicates that the target virtual resource is allowed to be pushed to the account corresponding to the target behavior characteristic in the second account set, and the target virtual resource is a virtual resource allowed to be used in executing the target event.
[0019] Optionally, the above-mentioned second processing unit includes: a first processing module, used to determine the conditional information entropy of the target behavior feature set under the first historical classification result set based on the first behavior feature set, the second behavior feature set and the first historical classification result set, wherein the target behavior feature set includes the first behavior feature set and the second behavior feature set; a second processing module, used to determine V behavior feature subsets corresponding to the target behavior features in the target behavior feature set, and determine the information entropy of the V behavior feature subsets under the first historical classification result set respectively based on the V behavior feature subsets and the first historical classification result set, wherein V is a positive integer greater than or equal to 1; a third processing module, used to determine the target information gain based on the conditional information entropy of the target behavior feature set and the information entropy of the V behavior feature subsets.
[0020] Optionally, the above-mentioned first processing module includes: a first processing submodule, used to determine the joint probability of each behavior feature subset in the target behavior feature set and each result in the N results, as well as the probability of each result when each historical classification result in the first historical classification result set is one of the N results, wherein N is a positive integer greater than or equal to 2; a second processing submodule, used to determine the conditional information entropy of the target behavior feature set under the first historical classification result set based on the joint probability of each behavior feature subset and each result, as well as the probability of each result.
[0021] Optionally, the above-mentioned second processing module includes: a third processing sub-module, used to determine V behavior feature subsets corresponding to the target behavior feature in the target behavior feature set based on the V values of the target behavior feature, wherein the value of the target behavior feature in each behavior feature subset in the V behavior feature subsets is the same value corresponding to the V values.
[0022] According to another aspect of the embodiments of the present invention, a computer-readable storage medium is provided, in which a computer program is stored, wherein the computer program is configured to execute the above-mentioned method for pushing target virtual resources when running.
[0023] According to another aspect of an embodiment of the present invention, a computer program product is provided, including a computer program / instruction, which implements the steps of the above method when executed by a processor.
[0024] According to another aspect of an embodiment of the present invention, there is provided an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor is configured to execute the method for pushing the target virtual resource through the computer program.
[0025] In an embodiment of the present invention, the target information gain under the target behavior feature and the first classification result set is determined by using the first behavior feature set in the first historical period, the second behavior feature set in the current period, and the first historical classification result set in the first historical period; the target information gain is input into the target decision tree model based on the state transition to obtain the target classification result corresponding to the target behavior feature, and finally, when the push condition is met, the target virtual resource is pushed to the account corresponding to the target behavior feature in the second account set. In other words, by using the first behavior feature set of the previous period, the second behavior feature set of the current period, and the first historical classification result set, the target information gain of the state transition is determined, and the target decision tree model is predicted to obtain the target classification result corresponding to the target behavior feature, so that when the push condition is met, the target virtual resource is pushed to the account corresponding to the target behavior feature, thereby improving the integrity of the sample data, improving the accuracy of the classification effect of the target decision tree model, and achieving the technical effect of improving the accuracy of pushing the target virtual resource. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:
[0027] Figure 1 is a schematic diagram of an optional method for pushing target virtual resources according to an embodiment of the present invention;
[0028] Figure 2 is a flow chart of an optional method for pushing target virtual resources according to an embodiment of the present invention;
[0029] Figure 3 is a schematic diagram of an optional method for pushing target virtual resources according to an embodiment of the present invention;
[0030] Figure 4 is a schematic diagram of another optional method for pushing target virtual resources according to an embodiment of the present invention;
[0031] Figure 5 is a schematic diagram of an optional target decision tree model according to an embodiment of the present invention;
[0032] Figure 6 is a schematic diagram of an optional method for calculating a joint probability according to an embodiment of the present invention;
[0033] Figure 7 is an overall flow chart of an optional method for pushing target virtual resources according to an embodiment of the present invention;
[0034] Figure 8 is a schematic structural diagram of an optional device for pushing target virtual resources according to an embodiment of the present invention;
[0035] Fig. 9 It is a schematic structural diagram of an optional electronic device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0036] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0037] First, the terms used or related in the embodiments of the present invention are described as follows. It can be understood that the following description is an explanation of the terms but not the only explanation:
[0038] (1) Information gain: Assume the probability distributions of discrete random variables P and Q, and their information gain is defined as: Among them, distributions P and Q must be probability distributions, and for any P(i)>0, there must be Q(i)>0. When P(i)=0, the value of the formula is 0. From the formula, the information gain is the weighted average of the logarithmic difference between P and Q with distribution P as the weight.
[0039] (2) Information entropy: If an event has n possible values: U1…Ui…Un, the corresponding probability is: P 1 …P i …P n , and the appearance of various symbols is independent of each other. Then the information entropy is defined as
[0040] (3) Conditional information entropy based on state transition: An information entropy model based on the state of the previous cycle. The model is as follows:
[0041] (4) Information gain based on state transition: An information gain model based on the state of the previous cycle. The model is as follows:
[0042] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0043] According to one aspect of an embodiment of the present invention, a method for pushing a target virtual resource is provided. As an optional implementation, the method for pushing a target virtual resource can be applied to, but is not limited to, Figure 1 The application scenario shown in Figure 1 In the application scenario shown, the terminal device 102 may, but is not limited to, communicate with the server 106 via the network 104, and the server 106 may, but is not limited to, perform operations on the database 108, such as write data operations or read data operations. The above-mentioned terminal device 102 may, but is not limited to, include a human-computer interaction screen, a processor, and a memory. The above-mentioned human-computer interaction screen may, but is not limited to, be used to display a picture containing a target virtual resource on the terminal device 102. The above-mentioned processor may, but is not limited to, be used to respond to the above-mentioned human-computer interaction operation, perform a corresponding operation, or generate a corresponding instruction, and send the generated instruction to the server 106. The above-mentioned memory is used to store relevant processing data, such as target classification results, a first historical classification result set, target information gain, etc.
[0044] As an optional method, the following steps in the method for pushing the target virtual resource can be performed on the terminal device 102: step S102, obtaining the behavior characteristics of the first account set in the first historical period to obtain the first behavior characteristic set, obtaining the behavior characteristics of the second account set in the current period to obtain the second behavior characteristic set, and obtaining the historical classification results of the first account set in the first historical period to obtain the first historical classification result set, wherein the current period is the next period of the first historical period, and the historical classification results of the first account set are used to indicate whether each account in the first account set has executed the target event; step S104, determining, according to the first behavior characteristic set, the second behavior characteristic set and the first historical classification result set, The target information gain under the target behavior feature and the first historical classification result set is determined, wherein the first behavior feature set and the second behavior feature set include the target behavior feature; step S106, inputting the target information gain into the target decision tree model based on state transition to obtain the target classification result corresponding to the target behavior feature; step S108, the target loss value is the loss value determined according to the first generative adversarial loss value corresponding to the first initial discriminator; when the target classification result indicates that the target virtual resource is allowed to be pushed to the account corresponding to the target behavior feature in the second account set, the target virtual resource is pushed to the account corresponding to the target behavior feature in the second account set, and the target virtual resource is a virtual resource allowed to be used in executing the target event.
[0045] As an optional example, this embodiment does not limit the execution entity of the above steps S102 to S108. For example, the above steps S102 to S108 can all be executed on the terminal device 102 or the server 106, or can be partially executed on the terminal device 102 and partially executed on a computing server that communicates with the server 106.
[0046] By adopting the above method, the target information gain of the state transition is determined by utilizing the first behavior feature set of the previous cycle, the second behavior feature set of the current cycle, and the first historical classification result set, and the target decision tree model is predicted to obtain the target classification result corresponding to the target behavior feature, so that when the push conditions are met, the target virtual resource is pushed to the account corresponding to the target behavior feature, thereby improving the integrity of the sample data, improving the accuracy of the classification effect of the target decision tree model, and achieving the technical effect of improving the accuracy of pushing the target virtual resource.
[0047] In order to more clearly understand the method for pushing target virtual resources in the embodiment of the present invention, before describing the embodiment of the present invention, the specific implementation process of the method for pushing target virtual resources in the related art is described as follows:
[0048] In the related art, taking the use of variance analysis based on user scores to recommend songs by category in the Internet of Vehicles as an example, the specific process of category recommendation includes:
[0049] S21, when the number of categories K=2 (classification into two categories), randomly select the first song id (songid) and its corresponding user rating data sequence {songid i :[r i1 ,r i2 ,...,r in ]} as the first group (Group 1), and the user ratings of the remaining m-1 songs as the second group (Group 2);
[0050] S22, calculate the between-group variance of group 1 and group 2 under category 2 When K=2, randomly select a song from the remaining m-1 songs and add it to group 1. The user ratings of the remaining m-2 songs are used as the second group. Calculate the inter-group variance of group 1 and group 2 in the second iteration.
[0051] S23, and so on, when classification K = 2, the inter-group variance sequence of group 1 and group 2 is obtained Among them, i 2 It represents the i-th iteration calculation in the case of 2 groups. When the classification K=2, the total number of variances between groups is: Wherein, m! = m·(m-1)…1;
[0052] S24, determine the number of categories K = 3 (classify into three categories), randomly select a song id and its corresponding user rating {songid i :[r i1 ,r i2 ,...,r in ]} as group 1, randomly select a song id and its corresponding user rating {songid l :[r l1 ,r l2 ,...,r ln ]} as group 2, and the remaining m-2 songs as group 3, so as to calculate the inter-group variance of group 1, group 2, and group 3, and obtain the inter-group variance of the three groups in the first iteration Among them, 1 3 Indicates the i-th iteration calculation in the case of 2 groups;
[0053] S25, randomly select a song from m-2 songs and its user rating and add it to group 1, randomly select a song from the remaining m-3 songs and its user rating and add it to group 2, and the remaining m-4 songs are group 3. Calculate the inter-group variance of the second iteration when grouping K=3 By analogy, we get the inter-group variance when grouping K=3. Among them, i 3 It represents the i-th iteration calculation under the condition of 3 groups. When the classification K=3, the total number of variances between groups is:
[0054] S26, according to the above iterative grouping method, when K = k (k ≤ m-1) classes, the inter-group variance sequence is obtained Among them, i k It represents the i-th iteration calculation when the classification is divided into k groups. When the classification K=k, the total number of variances between groups is:
[0055] S27, construct the inter-group variance matrix of all categories, and select the largest inter-group variance and the corresponding group M in the inter-group variance matrix to achieve optimal classification, where,
[0056] Through the above steps, it can be concluded that the relevant technology only uses the behavioral feature data of the current cycle for model training, testing and prediction, and iterative grouping is performed by constructing the maximum inter-group variance to obtain the optimal grouping. However, since the collected behavioral feature data in the designated driver service involves a lot of delayed log data, only using the behavioral feature data of the current cycle to build the model cannot effectively reflect the classification effect of the model, resulting in a technical problem of low accuracy in the push process of the target virtual resources.
[0057] In order to solve the above problems, the embodiment of the present invention provides a method for executing a planned task based on blockchain. Figure 2 This is a flowchart of a method for executing a planned task based on blockchain according to an embodiment of the present invention, and the process includes the following steps:
[0058] Step S202, obtaining behavior features of a first account set in a first historical period to obtain a first behavior feature set, obtaining behavior features of a second account set in a current period to obtain a second behavior feature set, and obtaining historical classification results of the first account set in the first historical period to obtain a first historical classification result set, wherein the current period is the next period of the first historical period, and the historical classification results of the first account set are used to indicate whether each account in the first account set has executed a target event;
[0059] like Figure 3 As shown in the figure, assume that the total sample data set D includes 1000 behavioral feature data of period t-2, period t-1, and period t, and randomly select 100 data from the behavioral feature data of period t-2, period t-1, and period t as the data subset D v, where the behavior characteristic data of period t can be understood as, but not limited to, the behavior characteristic data of the current cycle, the behavior characteristic data of period t-1 can be understood as, but not limited to, the historical behavior data of the previous cycle, and the behavior characteristic data of period t-2 can be understood as, but not limited to, the historical behavior characteristic data of the previous cycle of period t-1. For example, assuming that the current date is July 20, and the preset time interval is one day, the behavior characteristic data of the current cycle is the behavior characteristic data of July 20, and the behavior characteristic data of the first historical cycle is the behavior characteristic data of July 19, etc.
[0060] In order to better understand the embodiments of the present invention, the method for pushing the target virtual resource is described below by taking a designated driver service as an example.
[0061] exist Figure 3 The data subset D v The 100 randomly selected behavior feature data may be, but are not limited to, behavior feature data of different users (accounts) who have used the designated driver service. For example, the behavior feature data in period t-1 is the designated driver service feature data of the first account set, and the behavior feature data in period t is the designated driver service feature data of the second account set.
[0062] It should be noted that the accounts included in the account set corresponding to the behavioral characteristic data of period t-2, the account set corresponding to the behavioral characteristic data of period t-1, and the account set corresponding to the behavioral characteristic data of period t may be the same or different, or may be partially the same and partially different, and this is not limited in the present embodiment.
[0063] For example, assuming that the current period is July 20 and the target event is whether a designated driver is called, 100 designated driver service feature data of the first account set on July 19 and 100 designated driver service feature data of the second account set on July 20 are randomly obtained, and at the same time, the first historical classification result set of whether each account in the first account set called a designated driver on July 19 is obtained. That is, Figure 3 The 100 pieces of behavioral characteristic data in period t-1 include but are not limited to the behavioral characteristic data of each account in the first account set clicking on the designated driver service APP, browsing the designated driver service page, checking the designated driver service coupons on July 19, and whether the designated driver was finally called; the 100 pieces of behavioral characteristic data in period t include but are not limited to the behavioral characteristic data of each account in the second account set clicking on the designated driver service APP, browsing the designated driver service page, and checking the designated driver service coupons on July 20, but do not include the behavioral characteristic data of whether the designated driver was finally called.
[0064] It is easy to understand that the designated driver service characteristic data is the account behavior characteristic data used to construct training samples and test samples. In this embodiment, the behavior characteristic data includes but is not limited to the user's clicks, favorites, comments, usage times, payment data, frequency of calling the designated driver service, frequency of canceling the call for the designated driver service, etc. in the designated driver service APP.
[0065] Step S204, determining a target information gain under a target behavior feature and the first historical classification result set according to the first behavior feature set, the second behavior feature set, and the first historical classification result set, wherein the first behavior feature set and the second behavior feature set include the target behavior feature;
[0066] like Figure 3 As shown, using a data subset D including a first behavior feature set, a second behavior feature set, and a first historical classification result set v , calculate the target behavior feature and the target information gain under the first historical classification result set, wherein the target behavior feature can be but is not limited to a customized behavior feature, for example, browsing the designated driver service page for more than 1 minute, choosing to call a designated driver when the coupon amount is greater than 20 yuan, etc.
[0067] Obviously, in step S204, when calculating the target behavior feature and the target information gain under the first historical classification result set, the first behavior feature set in the previous historical period (t-1 period) and the historical classification results of the first account set in the previous historical period entropy are used. The specific process of calculating the target information gain will be described in detail below in conjunction with specific embodiments, and will not be repeated here.
[0068] Step S206, inputting the target information gain into the target decision tree model based on the state transition, and obtaining the target classification result corresponding to the target behavior feature, wherein the target decision tree model is a model obtained by training the initial decision tree model using the training sample set, and the training sample set includes the second sample behavior feature set in the second historical period, the first sample behavior feature set in the first historical period, and the first sample classification result set in the first historical period, and the first historical period is the next period of the second historical period;
[0069] In step S208, the target loss value is a loss value determined based on the first generative adversarial loss value corresponding to the first initial discriminator; when the target classification result indicates that it is allowed to push the target virtual resource to the account corresponding to the target behavior feature in the second account set, the target virtual resource is pushed to the account corresponding to the target behavior feature in the second account set, and the target virtual resource is a virtual resource allowed to be used in executing the target event.
[0070] As an optional example, the target decision tree model can be but is not limited to: Figure 3 As shown, the target information gain Gain(D,a l |Y t-1 ) Input the target decision tree model and compare the target information gain Gain(D,a l |Y t-1 ) and the threshold parameter Th of the sample classification result, in the target information gain Gain(D,a l |Y t-1 ) is greater than the threshold parameter Th of the sample classification result, the coupon is pushed to the account corresponding to the target behavior feature in the second account set; otherwise, the coupon is not pushed to the account corresponding to the target behavior feature.
[0071] It should be noted that the target behavior feature can be but is not limited to any of the above-mentioned designated driver service behavior features. For example, if the duration of browsing the designated driver service page exceeds 1 minute, then the target information gain Gain (D, a l |Y t-1 ) is greater than 1, the coupon will be pushed to the account that browses the designated driver service page for more than 1 minute; otherwise, no coupon will be pushed.
[0072] The second account set may be, but is not limited to, a set of accounts that browsed the designated driver service page for more than 1 minute in the current period (eg, July 20).
[0073] In addition, if the measurement index does not meet the standard, it is necessary to resample the sample data and then recalculate the target information gain Gain (D, a l |Y t-1 ) until the calculated measurement index meets the standard, wherein the measurement index may be but is not limited to the threshold parameter Th of the sample classification result. The training process of the decision tree model will be described in detail below in conjunction with specific embodiments.
[0074] It can be seen from steps S202 to S208 that in the classification recommendation method for the designated driver service in the embodiment of the present application, not only the behavioral feature data of the current period is taken into consideration, but also the behavioral feature data of the previous historical period and the first historical classification result are utilized, so that the behavioral feature information expressed by the target decision tree model is more complete, thereby making the prediction result based on the behavioral feature data of the current period more accurate, solving the technical problem of low accuracy in the process of pushing target virtual resources and achieving the technical effect of improving the accuracy of pushing target virtual resources.
[0075] As an optional implementation, the above-mentioned determining the target information gain under the target behavior feature and the first historical classification result set according to the first behavior feature set, the second behavior feature set and the first historical classification result set includes:
[0076] Determine, according to the first behavior feature set, the second behavior feature set and the first historical classification result set, the conditional information entropy of the target behavior feature set under the first historical classification result set, wherein the target behavior feature set includes the first behavior feature set and the second behavior feature set;
[0077] Determine V behavior feature subsets corresponding to the target behavior feature in the target behavior feature set, and determine the information entropy of the V behavior feature subsets under the first historical classification result set according to the V behavior feature subsets and the first historical classification result set, where V is a positive integer greater than or equal to 1;
[0078] The target information gain is determined based on the conditional information entropy of the target behavior feature set and the information entropy of V behavior feature subsets.
[0079] In this embodiment, it is assumed that the target behavior feature set under the first historical classification result set is divided into V different behavior feature subsets according to the category of behavior features. For example, the behavior features of browsing the designated driver service page for more than 1 minute are divided into one subset, and the behavior features of calling a designated driver more than 4 times a month are divided into another subset, and so on.
[0080] According to the V behavior feature subsets and the first historical classification result set, the information entropy Ent(D) of the V behavior feature subsets under the first historical classification result set is calculated. v |Y t-1 ), where information entropy Ent(D v |Y t-1 ) represents the state data subset D in period t-1 V The information entropy of the target behavior feature set and the information entropy of the V behavior feature subsets Ent(D v |Y t-1 ), determine the target information gain.
[0081] Specifically, Figure 4 and Figure 5 As shown in the figure, before calculating the target information gain, it is necessary to first calculate the conditional information entropy Ent(D|Y t-1 ), and calculate the information entropy Ent(D v |Y t-1 ), and then according to the conditional information entropy Ent(D|Y t-1) and the information entropy Ent(D v |Y t-1 ), determine the target information gain.
[0082] As an optional example, the conditional information entropy of the target behavior feature set under the first historical classification result set is determined by the following formula (1):
[0083]
[0084] Where D represents the target behavior feature set, p(D j , i) represents the i-th result in the N results and the j-th behavior feature subset D in the target behavior feature set j The joint probability of p(i) represents the probability of the i-th result, D j Represents the behavior feature subset corresponding to the j-th behavior feature in the target behavior feature set.
[0085] As an optional example, the above-mentioned determining the conditional information entropy of the target behavior feature set under the first historical classification result set according to the first behavior feature set, the second behavior feature set and the first historical classification result set includes:
[0086] When each historical classification result in the first historical classification result set is one of N results, determining the joint probability of each behavior feature subset in the target behavior feature set and each result in the N results, and the probability of each result, where N is a positive integer greater than or equal to 2;
[0087] The conditional information entropy of the target behavior feature set under the first historical classification result set is determined according to the joint probability of each behavior feature subset and each result, and the probability of each result.
[0088] like Figure 6 As shown, suppose there are different users X 1 , X 2 ...X 8 , and user X 1 ~X 4 With target behavior feature j, user X 5 ~X 8 It does not have the target behavior feature j, where the target behavior feature j may include but is not limited to the behavior feature of browsing the designated driver service page for more than 1 minute, the behavior feature of calling a designated driver more than 4 times per month, etc.
[0089] By the joint probability P(D j ,i), and then calculate the target behavior feature j and no 1Joint probability of sending coupons Calculate the target behavior feature j and the user X 2 Joint probability of sending coupons Calculate the number of users who do not have the target behavior feature j and 5 Joint probability of sending coupons wait.
[0090] Based on the joint probability of each behavior feature subset and each result, and the probability of each result, and then combined with the above formula (1), the conditional information entropy of the target behavior feature set under the first historical classification result set can be obtained.
[0091] It is easy to understand that by calculating the joint probability of each behavior feature subset and each result in the above-mentioned target behavior feature set, it is possible to obtain more complete behavior feature information of each classification result corresponding to different target behavior features in the first historical classification result set, and then use the acquired behavior feature information to train and predict the decision tree model, so that the classification effect of the target decision tree model is better, thereby achieving the technical effect of improving the accuracy of pushing target virtual resources.
[0092] As an optional implementation, the above-mentioned determining V behavior feature subsets corresponding to the target behavior feature in the target behavior feature set includes:
[0093] According to the V values of the target behavior feature, V behavior feature subsets corresponding to the target behavior feature are determined in the target behavior feature set, wherein the value of the target behavior feature in each of the V behavior feature subsets is the same value corresponding to the V values.
[0094] As an optional implementation, the target information gain is determined based on the conditional information entropy of the target behavior feature set and the information entropy of the V behavior feature subsets, including:
[0095] Obtain the number of accounts corresponding to each of the V behavioral feature subsets, obtain the number of V accounts, and obtain the number of target accounts corresponding to the target behavioral feature set;
[0096] The target information gain is determined based on the number of V accounts, the number of target accounts, the conditional information entropy of the target behavior feature set, and the information entropy of the V behavior feature subsets.
[0097] In this embodiment, assuming that D is the total behavioral feature data set, the number of target accounts corresponding to the target behavioral feature set is |D|, and the data set D is divided into V behavioral feature subsets, where each feature subset in the V behavioral feature subsets corresponds to one account number. Assuming that the number of V accounts corresponding to the V behavioral feature subsets is |D v|.
[0098] Based on the number of V accounts | D v |, number of target accounts |D|, conditional information entropy Ent(D|Y t-1 ), and the information entropy of V behavior feature subsets to determine the target information gain.
[0099] As an optional example, the target information gain is determined based on the number of V accounts, the number of target accounts, the conditional information entropy of the target behavior feature set, and the information entropy of the V behavior feature subsets, including:
[0100] The target information gain is determined by the following formula (2):
[0101]
[0102] Among them, a l represents the target behavior characteristics, Y t-1 ∈{0,1} means that each historical classification result in the first historical classification result set is one of the two results. t-1 ) represents the conditional information entropy of the target behavior feature set under the first historical classification result set, G(D,a l |Y t-1 ) represents the target information gain, |D| represents the number of target accounts, and D v Indicates that the target behavior feature a l The vth behavior feature subset among the V behavior feature subsets under v |Y t-1 ) represents the vth behavior feature subset D under the first historical classification result set v Information entropy.
[0103] In the above manner, the target information gain model is determined by utilizing the difference between the conditional information entropy of the target behavior feature set and the information entropy of V behavior feature subsets, and a decision tree model based on first-order state transition can be obtained. The decision tree model is used to predict the classification result of the designated driver service in the current cycle, wherein the decision tree model is a decision tree model associated with the first historical cycle t-1.
[0104] From the above analysis, it can be seen that since the behavioral characteristic data of the designated driver service in the previous cycle is taken into account in the process of training the decision tree model, the trained decision tree model can reflect more comprehensive behavioral characteristic information, thereby improving the classification effect of the decision tree model.
[0105] The following is an explanation of the training process of the decision tree model:
[0106] Determine, according to the training sample set, a sample information gain under the sample behavior feature and the first sample classification result set, wherein the second sample behavior feature set includes the behavior features of the second sample account set in the second historical period, the first sample behavior feature set includes the behavior features of the first sample account set in the first historical period, the first sample classification result set includes the historical classification results of the first sample account set in the first historical period, and the historical classification results of the first sample account set are used to indicate whether each account in the first sample account set has executed the target event;
[0107] Inputting the sample information gain into the initial decision tree model to be trained to obtain a sample classification result corresponding to the sample behavior feature, wherein the sample classification result is used to indicate whether to allow the target virtual resource to be pushed to the account corresponding to the target behavior feature in the second account set;
[0108] When the sample classification result and the actual classification result corresponding to the sample behavior feature obtained in advance do not meet the preset loss condition, adjusting the threshold parameter used to determine the sample classification result in the initial decision tree model;
[0109] When the sample classification result and the actual classification result meet the loss condition, the training is terminated and the target information gain is obtained.
[0110] The specific steps include:
[0111] (1) Obtain sample data;
[0112] Specifically, suppose the behavioral characteristic data of the designated driver service in periods t-2, t-1, and t are input And input the status data (classification result set) Y of t-2 and t-1 t-2 , Y t-1 .
[0113] For the above t-1 period behavior characteristic data and t-2 period state data Y t-2 , randomly divided into training samples (ratio is а) and test samples (ratio is 1-а) according to a certain ratio. For example, according to common experience, the samples are randomly divided into training samples: test samples = 8:2 (that is, the training samples and test samples are randomly divided into 8:2 ratio).
[0114] Among them, the second sample behavior feature set in the second historical period t-2, the first sample behavior feature set in the first historical period t-1, and the first sample classification result set Y in the first historical period t-1 t-1 Constitute a training sample set.
[0115] (2) determining, based on the training sample set, sample behavior characteristics and sample information gain under the first sample classification result set;
[0116] For example, the conditional information entropy Ent(D|Y t-1 ), and then the sample information gain G(D,a) under the first sample classification result set is calculated by formula (2) l |Y t-1 ).
[0117] (3) Inputting the sample information gain into the initial decision tree model to be trained to obtain the sample classification result corresponding to the sample behavior characteristics;
[0118] (4) determining whether the sample classification result and the actual classification result in the first historical classification result set meet a preset loss condition;
[0119] Assume that there is a l A class of users with behavioral characteristics (for example, there are 10 users in total), where a l The behavior feature can be, but is not limited to, browsing the designated driver service page for more than 2 minutes. The sample information gain is input into the initial decision tree model to be trained, and the predicted classification results show that 8 users will call for a designated driver, while the number of users who actually called for a designated driver in the first historical classification result set is 5, that is, the prediction accuracy is Less than the preset loss condition Then adjust the threshold parameters used to determine the sample classification results in the initial decision tree model (such as Figure 3 Th) shown in , for example, browsing the designated driver service page for more than 2 minutes is adjusted to browsing the designated driver service page for more than 3 minutes.
[0120] Then the sample data is resampled, and the training sample set is re-determined. Then the sample information gain is calculated, and the sample classification results are compared with the actual classification results corresponding to the sample behavior characteristics again to determine whether the preset loss conditions are met.
[0121] It is easy to understand that the preset loss conditions and threshold parameters of sample classification results in this embodiment are only examples and are not limited thereto. For example, the threshold parameters of sample classification results may also be that the cumulative number of times the designated driver was actually called in the previous historical period is greater than 4, the time of using the designated driver service is between 22:00 and 24:00, etc.
[0122] (5) When the preset loss condition is met, stop training and obtain the target information gain.
[0123] From the above analysis, it can be seen that the initial decision tree model is trained using the second sample behavior feature set in the second historical period, the first sample behavior feature set in the first historical period, and the first sample classification result set in the first historical period, and when the preset loss condition is not met, the threshold parameters for determining the sample classification results in the initial decision tree model are adjusted. In this process, due to the use of the behavioral feature data in the historical periods of the designated driver service, the trained target decision tree model can reflect more complete information, thereby ensuring the effective classification of the sample data in the current period and improving the accuracy of the sample classification results.
[0124] In order to more clearly understand the above-mentioned push method of the target virtual resource, the following Figure 7 The complete flow chart shown is further described, specifically, comprising the following steps:
[0125] S702, data input stage;
[0126] Enter the characteristic data of the T-2 period, T-1 period, and T period designated driver service Enter the status data Y of period T-2 and period T-1 t-2 , Y t-1 .in,
[0127] S704, sample construction stage;
[0128] Input the behavior characteristic data in step S702 and state transfer data For the above T-1 period behavior characteristic data and T-2 period status data Y t-2 , randomly divided into training samples (ratio is а) and test samples (ratio is 1-а) according to a certain ratio. For example, according to common experience, the samples are randomly divided into training samples: test samples = 8:2 (that is, the training samples and test samples are randomly divided into 8:2 ratio).
[0129] S706, a stage of constructing an information entropy model based on first-order state transfer;
[0130] Construct a conditional information entropy model for first-order state transition:
[0131]
[0132] Where D represents the entire data set, p(D j ,i) represents D of state i and jth data subset j The joint probability of, p(i) represents the probability of the i-th state, D j Represents the data subset under the jth feature.
[0133] S708, information gain model construction phase based on first-order state transfer.
[0134] Construct an information gain model based on first-order state transfer:
[0135]
[0136] Among them, a l represents the lth feature in the data set, Y t-1 ∈{0,1} represents the two classification states in period t-1, Ent(D|Y t-1 ) indicates that in Y t-1 The conditional information entropy of the root node, G(D,a l |Y t-1 ) represents the lth feature and Y t-1 The information gain under |D| represents the total number of users, D v Indicates feature a l The data subset of the vth group, V represents the number of groups, Ent(D v |Y t-1 ) represents the data subset D in the t-1 period state v Information entropy.
[0137] S710, model training and testing phase;
[0138] Input the training sample in step S704, and substitute it into the conditional information entropy model based on the first-order state transition in step S706, and substitute it into the information gain model based on the first-order state transition in step S708, so as to obtain the decision tree model based on the first-order state transition. Substitute the test sample, if the evaluation index meets the standard, save the model, otherwise repeat steps S704 to S710 until the final decision tree model T based on the first-order state transition is obtained. t-1 until.
[0139] S712, model prediction stage;
[0140] Input the decision tree model T based on the first-order state transition obtained in step S710 t-1 And the predicted sample data of period T in step S704, perform model prediction, and obtain the predicted classification status of the designated driver service.
[0141] S714, performing classification recommendation based on target information gain and target decision tree model;
[0142] The predicted classification status in step S712 is recommended, and classification recommendation is performed for users whose classification is 1, for example, coupon recommendation for designated driver service.
[0143] Through the above-mentioned embodiments provided by the present application, the information gain model based on the first-order state transition is constructed using the behavioral feature data in the historical period, which can effectively improve the classification effect of the target decision tree model; and through the above-mentioned steps S702 to S714, a complete model training, testing and prediction can be formed, so that the target decision tree model has generalization, and the scope of application of the target virtual resource push method is improved.
[0144] In addition, compared with the recommendation method (steps S21 to S27) in the above-mentioned related art of iteratively grouping by constructing the maximum inter-group variance to obtain the optimal grouping, the above-mentioned method for pushing the target virtual resource provided by the present application has at least the following advantages:
[0145] 1) The initial decision tree model is trained using the behavior feature data of the historical cycle and the behavior feature data of the current cycle, so that the decision tree model can reflect more complete chauffeur service information and improve the classification effect of the decision tree model;
[0146] 2) Only by constructing the conditional information entropy model of the first-order state transfer and the information gain entropy model based on the first-order state transfer, the training, testing and prediction of the decision tree model can be realized, avoiding the use of computational search methods to calculate the inter-group variance and the use of search methods to search the inter-group variance matrix for the maximum inter-group variance and the optimal grouping, reducing the amount of calculation, saving computing resources and storage resources, and improving computing efficiency;
[0147] 3) The information gain index is constructed for the behavioral features that affect the designated driver service and grouped. This can not only form a model for model training and prediction, but also calculate the information entropy and information gain of the target behavioral feature set corresponding to the full set of users and the subsets of the full set of users each time, thereby obtaining data on the features of the same dimension within different user ranges, improving the generalization of the model and the accuracy of prediction and classification.
[0148] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity, they are all described as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0149] According to another aspect of the embodiment of the present invention, there is also provided Figure 8 A device for pushing a target virtual resource is shown, the device comprising:
[0150] The first processing unit 802 is used to obtain the behavior characteristics of the first account set in the first historical period to obtain the first behavior characteristic set, obtain the behavior characteristics of the second account set in the current period to obtain the second behavior characteristic set, and obtain the historical classification results of the first account set in the first historical period to obtain the first historical classification result set, wherein the current period is the next period of the first historical period, and the historical classification results of the first account set are used to indicate whether each account in the first account set has executed the target event;
[0151] like Figure 3 As shown in the figure, assume that the total sample data set D includes 1000 behavioral feature data of period t-2, period t-1, and period t, and randomly select 100 data from the behavioral feature data of period t-2, period t-1, and period t as the data subset D v , where the behavior characteristic data of period t can be understood as, but not limited to, the behavior characteristic data of the current cycle, the behavior characteristic data of period t-1 can be understood as, but not limited to, the historical behavior data of the previous cycle, and the behavior characteristic data of period t-2 can be understood as, but not limited to, the historical behavior characteristic data of the previous cycle of period t-1. For example, assuming that the current date is July 20, and the preset time interval is one day, the behavior characteristic data of the current cycle is the behavior characteristic data of July 20, and the behavior characteristic data of the first historical cycle is the behavior characteristic data of July 19, etc.
[0152] In order to better understand the embodiments of the present invention, the method for pushing the target virtual resource is described below by taking a designated driver service as an example.
[0153] exist Figure 3 The data subset D v The 100 randomly selected behavior feature data may be, but are not limited to, behavior feature data of different users (accounts) who have used the designated driver service. For example, the behavior feature data in period t-1 is the designated driver service feature data of the first account set, and the behavior feature data in period t is the designated driver service feature data of the second account set.
[0154] It should be noted that the accounts included in the account set corresponding to the behavioral characteristic data of period t-2, the account set corresponding to the behavioral characteristic data of period t-1, and the account set corresponding to the behavioral characteristic data of period t may be the same or different, or may be partially the same and partially different, and this is not limited in the present embodiment.
[0155] For example, assuming that the current period is July 20 and the target event is whether a designated driver is called, 100 designated driver service feature data of the first account set on July 19 and 100 designated driver service feature data of the second account set on July 20 are randomly obtained, and at the same time, the first historical classification result set of whether each account in the first account set called a designated driver on July 19 is obtained. That is, Figure 3 The 100 pieces of behavioral characteristic data in period t-1 include but are not limited to the behavioral characteristic data of each account in the first account set clicking on the designated driver service APP, browsing the designated driver service page, checking the designated driver service coupons on July 19, and whether the designated driver was finally called; the 100 pieces of behavioral characteristic data in period t include but are not limited to the behavioral characteristic data of each account in the second account set clicking on the designated driver service APP, browsing the designated driver service page, and checking the designated driver service coupons on July 20, but do not include the behavioral characteristic data of whether the designated driver was finally called.
[0156] It is easy to understand that the designated driver service characteristic data is the account behavior characteristic data used to construct training samples and test samples. In this embodiment, the behavior characteristic data includes but is not limited to the user's clicks, favorites, comments, usage times, payment data, frequency of calling the designated driver service, frequency of canceling the call for the designated driver service, etc. in the designated driver service APP.
[0157] A second processing unit 804 is used to determine a target information gain under a target behavior feature and the first historical classification result set according to the first behavior feature set, the second behavior feature set, and the first historical classification result set, wherein the first behavior feature set and the second behavior feature set include the target behavior feature;
[0158] like Figure 3 As shown, using a data subset D including a first behavior feature set, a second behavior feature set, and a first historical classification result set v , calculate the target behavior feature and the target information gain under the first historical classification result set, wherein the target behavior feature can be but is not limited to a customized behavior feature, for example, browsing the designated driver service page for more than 1 minute, choosing to call a designated driver when the coupon amount is greater than 20 yuan, etc.
[0159] Obviously, in step S204, when calculating the target behavior feature and the target information gain under the first historical classification result set, the first behavior feature set in the previous historical period (t-1 period) and the historical classification results of the first account set in the previous historical period entropy are used. The specific process of calculating the target information gain will be described in detail below in conjunction with specific embodiments, and will not be repeated here.
[0160] The third processing unit 806 is used to input the target information gain into the target decision tree model based on the state transition to obtain the target classification result corresponding to the target behavior feature, wherein the target decision tree model is a model obtained by training the initial decision tree model using the training sample set, and the training sample set includes the second sample behavior feature set in the second historical period, the first sample behavior feature set in the first historical period, and the first sample classification result set in the first historical period, and the first historical period is the next period of the second historical period;
[0161] The first pushing unit 808 is used to push the target virtual resource to the account corresponding to the target behavior feature in the second account set when the target classification result indicates that the target virtual resource is allowed to be pushed to the account corresponding to the target behavior feature in the second account set, and the target virtual resource is a virtual resource allowed to be used in executing the target event.
[0162] As an optional example, the target decision tree model can be but is not limited to: Figure 3 As shown, the target information gain Gain(D,a l |Y t-1 ) Input the target decision tree model and compare the target information gain Gain(D,a l |Y t-1 ) and the threshold parameter Th of the sample classification result, in the target information gain Gain(D,a l |Y t-1 ) is greater than the threshold parameter Th of the sample classification result, the coupon is pushed to the account corresponding to the target behavior feature in the second account set; otherwise, the coupon is not pushed to the account corresponding to the target behavior feature.
[0163] It should be noted that the target behavior feature can be but is not limited to any of the above-mentioned designated driver service behavior features. For example, if the duration of browsing the designated driver service page exceeds 1 minute, then the target information gain Gain (D, a l |Y t-1 ) is greater than 1, the coupon will be pushed to the account that browses the designated driver service page for more than 1 minute; otherwise, no coupon will be pushed.
[0164] The second account set may be, but is not limited to, a set of accounts that browsed the designated driver service page for more than 1 minute in the current period (eg, July 20).
[0165] In addition, if the measurement index does not meet the standard, it is necessary to resample the sample data and then recalculate the target information gain Gain (D, a l |Y t-1) until the calculated measurement index meets the standard, wherein the measurement index may be but is not limited to the threshold parameter Th of the sample classification result. The training process of the decision tree model will be described in detail below in conjunction with specific embodiments.
[0166] It can be seen from steps S202 to S208 that in the classification recommendation method for the designated driver service in the embodiment of the present application, not only the behavioral feature data of the current period is taken into consideration, but also the behavioral feature data of the previous historical period and the first historical classification result are utilized, so that the behavioral feature information expressed by the target decision tree model is more complete, thereby making the prediction result based on the behavioral feature data of the current period more accurate, solving the technical problem of low accuracy in the process of pushing target virtual resources and achieving the technical effect of improving the accuracy of pushing target virtual resources.
[0167] Optionally, the above device further includes:
[0168] A first processing module is used to determine the conditional information entropy of the target behavior feature set under the first historical classification result set according to the first behavior feature set, the second behavior feature set and the first historical classification result set, wherein the target behavior feature set includes the first behavior feature set and the second behavior feature set;
[0169] A second processing module is used to determine V behavior feature subsets corresponding to the target behavior feature in the target behavior feature set, and determine the information entropy of the V behavior feature subsets under the first historical classification result set according to the V behavior feature subsets and the first historical classification result set, wherein V is a positive integer greater than or equal to 1;
[0170] The third processing module is used to determine the target information gain according to the conditional information entropy of the target behavior feature set and the information entropy of the V behavior feature subsets.
[0171] Optionally, the first processing module includes:
[0172] A first processing submodule, configured to determine, when each historical classification result in the first historical classification result set is one of N results, a joint probability of each behavior feature subset in the target behavior feature set and each result in the N results, and a probability of each result, wherein N is a positive integer greater than or equal to 2;
[0173] The second processing submodule is used to determine the conditional information entropy of the target behavior feature set under the first historical classification result set according to the joint probability of each behavior feature subset and each result, and the probability of each result.
[0174] Optionally, the second processing module includes:
[0175] The third processing submodule is used to determine V behavior feature subsets corresponding to the target behavior feature in the target behavior feature set according to the V values of the target behavior feature, wherein the value of the target behavior feature in each behavior feature subset in the V behavior feature subsets is the same value corresponding to the V values.
[0176] Optionally, the first processing module further includes:
[0177] The fourth processing submodule is used to determine the conditional information entropy of the target behavior feature set under the first historical classification result set by using the following formula:
[0178]
[0179] Where D represents the target behavior feature set, p(D j ,i) represents the i-th result in N results and the j-th behavior feature subset D in the target behavior feature set j The joint probability of, p(i) represents the probability of the i-th result, D j Represents the behavior feature subset corresponding to the jth behavior feature in the target behavior feature set.
[0180] Optionally, the third processing module includes:
[0181] The first acquisition submodule is used to acquire the number of accounts corresponding to the V behavior feature subsets, obtain the number of V accounts, and acquire the number of target accounts corresponding to the target behavior feature set;
[0182] The fifth processing submodule is used to determine the target information gain according to the number of V accounts, the number of target accounts, the conditional information entropy of the target behavior feature set, and the information entropy of the V behavior feature subsets.
[0183] Optionally, the third processing module further includes:
[0184] The sixth processing submodule is used to determine the target information gain by the following formula:
[0185]
[0186] Among them, a l represents the target behavior characteristics, Y t-1 ∈{0,1} means that each historical classification result in the first historical classification result set is one of the two results. t-1 ) represents the conditional information entropy of the target behavior feature set under the first historical classification result set, G(D,a l |Y t-1 ) represents the target information gain, |D| represents the number of target accounts, and Dv Indicates that the target behavior feature a l The vth behavior feature subset among the V behavior feature subsets under v |Y t-1 ) represents the vth behavior feature subset D under the first historical classification result set v Information entropy.
[0187] Optionally, the above device further includes:
[0188] a fourth processing unit, configured to determine, based on the training sample set, a sample information gain under the sample behavior feature and the first sample classification result set, wherein the second sample behavior feature set includes the behavior features of the second sample account set in the second historical period, the first sample behavior feature set includes the behavior features of the first sample account set in the first historical period, the first sample classification result set includes the historical classification results of the first sample account set in the first historical period, and the historical classification results of the first sample account set are used to indicate whether each account in the first sample account set has executed the target event;
[0189] a fifth processing unit, configured to input the sample information gain into the initial decision tree model to be trained, and obtain a sample classification result corresponding to the sample behavior feature, wherein the sample classification result is used to indicate whether to allow the target virtual resource to be pushed to the account corresponding to the target behavior feature in the second account set;
[0190] An adjustment unit, used to adjust a threshold parameter used to determine a sample classification result in an initial decision tree model when the sample classification result and the actual classification result corresponding to the sample behavior feature obtained in advance do not meet a preset loss condition;
[0191] The sixth processing unit is used to end the training and obtain the target information gain when the sample classification result and the actual classification result meet the loss condition.
[0192] By applying the above-mentioned device to determine the target information gain of state transition and predicting the target decision tree model, the target classification result corresponding to the target behavior feature is obtained, so that when the push conditions are met, the target virtual resource is pushed to the account corresponding to the target behavior feature, thereby improving the integrity of the sample data, improving the accuracy of the classification effect of the target decision tree model, and achieving the technical effect of improving the accuracy of pushing the target virtual resource.
[0193] It should be noted that the embodiment of the device for pushing the target virtual resource here can refer to the embodiment of the method for pushing the target virtual resource mentioned above, which will not be described in detail here.
[0194] According to another aspect of the embodiment of the present application, an electronic device for implementing the above-mentioned method for pushing target virtual resources is also provided. The electronic device may be Fig. 9 The terminal device shown in FIG. This embodiment is described by taking the electronic device as a background device as an example. Fig. 9 As shown, the electronic device includes a memory 902 and a processor 904. The memory 902 stores a computer program, and the processor 904 is configured to execute the steps in any of the above method embodiments through the computer program.
[0195] Optionally, in this embodiment, the electronic device may be located in at least one network device among a plurality of network devices of a computer network.
[0196] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:
[0197] S1, obtaining behavior features of a first account set in a first historical period to obtain a first behavior feature set, obtaining behavior features of a second account set in a current period to obtain a second behavior feature set, and obtaining historical classification results of the first account set in the first historical period to obtain a first historical classification result set, wherein the current period is a period next to the first historical period, and the historical classification results of the first account set are used to indicate whether each account in the first account set has executed a target event;
[0198] S2, determining a target information gain under a target behavior feature and the first historical classification result set according to the first behavior feature set, the second behavior feature set, and the first historical classification result set, wherein the first behavior feature set and the second behavior feature set include the target behavior feature;
[0199] S3, inputting the target information gain into a target decision tree model based on state transition to obtain a target classification result corresponding to the target behavior feature, wherein the target decision tree model is a model obtained by training an initial decision tree model using a training sample set, the training sample set includes a second sample behavior feature set in a second historical period, a first sample behavior feature set in the first historical period, and a first sample classification result set in the first historical period, and the first historical period is a period next to the second historical period;
[0200] S4. When the target classification result indicates that the target virtual resource is allowed to be pushed to the account corresponding to the target behavior feature in the second account set, the target virtual resource is pushed to the account corresponding to the target behavior feature in the second account set, and the target virtual resource is a virtual resource allowed to be used in executing the target event.
[0201] Alternatively, a person skilled in the art may understand that: Fig. 9 The structure shown is for illustration only, and the electronic device may also be a target terminal such as a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, and a mobile Internet device (MID), a PAD, etc. Fig. 9 The electronic device and the electronic equipment described above are not limited in structure. Fig. 9 More or fewer components (such as network interfaces, etc.) as shown in, or with Fig. 9 Different configurations are shown.
[0202] Among them, the memory 902 can be used to store software programs and modules, such as the program instructions / modules corresponding to the method and device for pushing target virtual resources in the embodiments of the present application. The processor 904 executes various functional applications and data processing by running the software programs and modules stored in the memory 902, that is, to implement the above-mentioned method for pushing target virtual resources. The memory 902 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 902 may further include a memory remotely arranged relative to the processor 904, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof. Among them, the memory 902 may be specifically, but not limited to, used to store target classification results, a first historical classification result set, target information gain, etc. As an example, such as Fig. 9 As shown, the memory 902 may include, but is not limited to, the first processing unit 802, the second processing unit 804, the third processing unit 806, and the first pushing unit 808 in the target virtual resource pushing device. In addition, it may also include, but is not limited to, other module units in the base target virtual resource pushing device, which will not be repeated in this example.
[0203] Optionally, the transmission device 906 is used to receive or send data via a network. Specific examples of the above-mentioned network may include a wired network and a wireless network. In one example, the transmission device 906 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices and routers via a network cable so as to communicate with the Internet or a local area network. In one example, the transmission device 906 is a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0204] In addition, the electronic device further comprises: a display 908 for displaying the target virtual resources allowed to be pushed; and a connection bus 910 for connecting various module components in the electronic device.
[0205] In other embodiments, the target terminal or server may be a node in a distributed system, wherein the distributed system may be a blockchain system, and the blockchain system may be a distributed system formed by connecting the multiple nodes in the form of network communication. Among them, the nodes may form a peer-to-peer (P2P) network, and any form of computing device, such as a server, terminal or other electronic device, may become a node in the blockchain system by joining the peer-to-peer network.
[0206] According to one aspect of the present application, a computer program product or computer program is provided, the computer program product or computer program includes computer instructions, and the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method for pushing target virtual resources provided in various optional implementations of the above-mentioned server verification processing and other aspects, wherein the computer program is configured to execute the steps of any of the above-mentioned method embodiments when running.
[0207] Optionally, in this embodiment, the computer-readable storage medium may be configured to store a computer program for performing the following steps:
[0208] S1, obtaining behavior features of a first account set in a first historical period to obtain a first behavior feature set, obtaining behavior features of a second account set in a current period to obtain a second behavior feature set, and obtaining historical classification results of the first account set in the first historical period to obtain a first historical classification result set, wherein the current period is a period next to the first historical period, and the historical classification results of the first account set are used to indicate whether each account in the first account set has executed a target event;
[0209] S2, determining a target information gain under a target behavior feature and the first historical classification result set according to the first behavior feature set, the second behavior feature set, and the first historical classification result set, wherein the first behavior feature set and the second behavior feature set include the target behavior feature;
[0210] S3, inputting the target information gain into a target decision tree model based on state transition to obtain a target classification result corresponding to the target behavior feature, wherein the target decision tree model is a model obtained by training an initial decision tree model using a training sample set, wherein the training sample set includes a second sample behavior feature set in a second historical period, a first sample behavior feature set in the first historical period, and a first sample classification result set in the first historical period, wherein the first historical period is a period next to the second historical period;
[0211] S4. When the target classification result indicates that the target virtual resource is allowed to be pushed to the account corresponding to the target behavior feature in the second account set, the target virtual resource is pushed to the account corresponding to the target behavior feature in the second account set, and the target virtual resource is a virtual resource allowed to be used in executing the target event.
[0212] Optionally, in this embodiment, a person of ordinary skill in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing the hardware related to the target terminal through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc.
[0213] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0214] If the integrated units in the above embodiments are implemented in the form of software functional units and sold or used as independent products, they can be stored in the above computer-readable storage medium. Based on such an understanding, the technical solution of the present invention, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling one or more computer devices (which can be personal computers, servers or network devices, etc.) to perform all or part of the steps of the methods of various embodiments of the present invention.
[0215] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0216] In the several embodiments provided in the present application, it should be understood that the disclosed client can be implemented in other ways. Among them, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, for example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.
[0217] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0218] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0219] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A method for pushing a target virtual resource, characterized in that: include: Obtaining behavior features of a first set of accounts in a first historical period to obtain a first behavior feature set, obtaining behavior features of a second set of accounts in a current period to obtain a second behavior feature set, and obtaining historical classification results of the first set of accounts in the first historical period to obtain a first historical classification result set, wherein the current period is a period next to the first historical period, and the historical classification results of the first set of accounts are used to indicate whether each account in the first set of accounts has executed a target event; Determine a target information gain under a target behavior feature and the first historical classification result set according to the first behavior feature set, the second behavior feature set, and the first historical classification result set, wherein the first behavior feature set and the second behavior feature set include the target behavior feature; Inputting the target information gain into a target decision tree model based on state transition to obtain a target classification result corresponding to the target behavior feature, wherein the target decision tree model is a model obtained by training an initial decision tree model using a training sample set, the training sample set includes a second sample behavior feature set in a second historical period, a first sample behavior feature set in the first historical period, and a first sample classification result set in the first historical period, and the first historical period is a period next to the second historical period; When the target classification result indicates that the target virtual resource is allowed to be pushed to the account corresponding to the target behavior feature in the second account set, the target virtual resource is pushed to the account corresponding to the target behavior feature in the second account set, and the target virtual resource is a virtual resource allowed to be used in executing the target event.
2. The method according to claim 1, characterized in that The determining, according to the first behavior feature set, the second behavior feature set, and the first historical classification result set, a target information gain under a target behavior feature and the first historical classification result set includes: Determine, according to the first behavior feature set, the second behavior feature set, and the first historical classification result set, a conditional information entropy of a target behavior feature set under the first historical classification result set, wherein the target behavior feature set includes the first behavior feature set and the second behavior feature set; Determine V behavior feature subsets corresponding to the target behavior feature in the target behavior feature set, and determine the information entropy of the V behavior feature subsets under the first historical classification result set according to the V behavior feature subsets and the first historical classification result set, where V is a positive integer greater than or equal to 1; The target information gain is determined according to the conditional information entropy of the target behavior feature set and the information entropy of the V behavior feature subsets.
3. The method according to claim 2, characterized in that The determining, according to the first behavior feature set, the second behavior feature set and the first historical classification result set, the conditional information entropy of the target behavior feature set under the first historical classification result set includes: When each historical classification result in the first historical classification result set is one of N results, determining a joint probability of each behavior feature subset in the target behavior feature set and each result in the N results, and a probability of each result, wherein N is a positive integer greater than or equal to 2; The conditional information entropy of the target behavior feature set under the first historical classification result set is determined according to the joint probability of each behavior feature subset and each result, and the probability of each result.
4. The method according to claim 3, characterized in that The determining, according to the joint probability of each behavior feature subset and each result, and the probability of each result, the conditional information entropy of the target behavior feature set under the first historical classification result set includes: The conditional information entropy of the target behavior feature set under the first historical classification result set is determined by the following formula: , Wherein, D represents the target behavior feature set, represents the i-th result in the N results and the j-th behavior feature subset in the target behavior feature set The joint probability of, the joint probability of, represents the probability of the i-th result, Represents the behavior feature subset corresponding to the j-th behavior feature in the target behavior feature set.
5. The method according to claim 2, characterized in that: The determining V behavior feature subsets corresponding to the target behavior feature in the target behavior feature set includes: According to the V values of the target behavior feature, V behavior feature subsets corresponding to the target behavior feature are determined in the target behavior feature set, wherein the value of the target behavior feature in each behavior feature subset of the V behavior feature subsets is the same value corresponding to the V values.
6. The method according to claim 2, characterized in that The determining the target information gain according to the conditional information entropy of the target behavior feature set and the information entropy of the V behavior feature subsets includes: Obtain the number of accounts corresponding to the V behavior feature subsets respectively, to obtain V number of accounts, and obtain the number of target accounts corresponding to the target behavior feature set; The target information gain is determined according to the number of the V accounts, the number of the target accounts, the conditional information entropy of the target behavior feature set, and the information entropy of the V behavior feature subsets.
7. The method according to claim 6, characterized in that The determining the target information gain according to the number of the V accounts, the number of the target accounts, the conditional information entropy of the target behavior feature set, and the information entropy of the V behavior feature subsets includes: The target information gain is determined by the following formula: , in, represents the target behavior characteristics, Indicates that each historical classification result in the first historical classification result set is one of the two results, represents the conditional information entropy of the target behavior feature set under the first historical classification result set, represents the target information gain, Indicates the number of target accounts, Indicates the target behavior characteristics The vth behavior feature subset among the V behavior feature subsets under represents the vth behavior feature subset under the first historical classification result set Information entropy.
8. The method according to claim 1, characterized in that The method further comprises: Determine, based on the training sample set, a sample information gain under the sample behavior feature and the first sample classification result set, wherein the second sample behavior feature set includes the behavior features of the second sample account set in the second historical period, the first sample behavior feature set includes the behavior features of the first sample account set in the first historical period, the first sample classification result set includes the historical classification results of the first sample account set in the first historical period, and the historical classification results of the first sample account set are used to indicate whether each account in the first sample account set has executed a target event; Inputting the sample information gain into the initial decision tree model to be trained to obtain a sample classification result corresponding to the sample behavior feature, wherein the sample classification result is used to indicate whether to allow pushing the target virtual resource to the account corresponding to the target behavior feature in the second account set; When the sample classification result and the actual classification result corresponding to the sample behavior feature obtained in advance do not meet the preset loss condition, adjusting the threshold parameter used to determine the sample classification result in the initial decision tree model; When the sample classification result and the actual classification result satisfy the loss condition, the training is terminated to obtain the target information gain.
9. A device for pushing a target virtual resource, characterized in that: include: a first processing unit, configured to obtain behavior features of a first account set in a first historical period to obtain a first behavior feature set, obtain behavior features of a second account set in a current period to obtain a second behavior feature set, and obtain historical classification results of the first account set in the first historical period to obtain a first historical classification result set, wherein the current period is a period next to the first historical period, and the historical classification results of the first account set are used to indicate whether each account in the first account set has executed a target event; A second processing unit, configured to determine a target information gain under a target behavior feature and the first historical classification result set according to the first behavior feature set, the second behavior feature set, and the first historical classification result set, wherein the first behavior feature set and the second behavior feature set include the target behavior feature; a third processing unit, configured to input the target information gain into a target decision tree model based on state transition, to obtain a target classification result corresponding to the target behavior feature, wherein the target decision tree model is a model obtained by training an initial decision tree model using a training sample set, the training sample set comprising a second sample behavior feature set in a second historical period, a first sample behavior feature set in the first historical period, and a first sample classification result set in the first historical period, the first historical period being a period next to the second historical period; The first pushing unit is used to push the target virtual resource to the account corresponding to the target behavior feature in the second account set when the target classification result indicates that the target virtual resource is allowed to be pushed to the account corresponding to the target behavior feature in the second account set, and the target virtual resource is a virtual resource allowed to be used in executing the target event.
10. The device according to claim 9, characterized in that The second processing unit comprises: A first processing module, configured to determine, based on the first behavior feature set, the second behavior feature set, and the first historical classification result set, a conditional information entropy of a target behavior feature set under the first historical classification result set, wherein the target behavior feature set includes the first behavior feature set and the second behavior feature set; A second processing module is used to determine V behavior feature subsets corresponding to the target behavior feature in the target behavior feature set, and determine the information entropy of the V behavior feature subsets under the first historical classification result set according to the V behavior feature subsets and the first historical classification result set, wherein V is a positive integer greater than or equal to 1; The third processing module is used to determine the target information gain according to the conditional information entropy of the target behavior feature set and the information entropy of the V behavior feature subsets.
11. The device according to claim 10, characterized in that The first processing module comprises: a first processing submodule, for determining, when each historical classification result in the first historical classification result set is one of N results, a joint probability of each behavior feature subset in the target behavior feature set and each result in the N results, and a probability of each result, wherein N is a positive integer greater than or equal to 2; The second processing submodule is used to determine the conditional information entropy of the target behavior feature set under the first historical classification result set according to the joint probability of each behavior feature subset and each result, and the probability of each result.
12. The device according to claim 10, characterized in that The second processing module comprises: The third processing submodule is used to determine V behavior feature subsets corresponding to the target behavior feature in the target behavior feature set according to the V values of the target behavior feature, wherein the value of the target behavior feature in each behavior feature subset of the V behavior feature subsets is the same value corresponding to the V values.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein the program is executed by a processor to perform the method according to any one of claims 1 to 8.
14. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
15. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 8 through the computer program.
Citation Information
Patent Citations
Resource pushing method and device, storage medium and electronic device
CN112182460A
Decision tree model generation method and data recommendation method based on decision tree model
CN114418035A