User type prediction model training method, resource allocation method, medium and device

Through the user type prediction model training and screening important features, social platforms can allocate electronic resources more accurately, solving the problem of resource allocation mismatch, and improving user stability and activity.

CN113988152BActive Publication Date: 2024-12-27BEIJING DAJIA INTERNET INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111115626.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-23
Publication Date
2024-12-27
Estimated Expiration
2041-09-23

AI Technical Summary

Technical Problem

Social platforms fail to effectively match user needs when allocating electronic resources, resulting in no significant improvement in user stability.

Method used

The user type prediction model training method is adopted to obtain the importance of candidate attribute characteristics, and the characteristics that affect the electronic resource requirements of the user account are selected, the user type prediction model is trained, and matching electronic resources are allocated to the users.

Benefits of technology

It improves the accuracy of user type prediction and the matching degree of resource allocation, reduces additional resource expenditure, and enhances user activity and stability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113988152B_ABST
    Figure CN113988152B_ABST
Patent Text Reader

Abstract

The present disclosure provides a user type prediction model training method, a resource allocation method, a medium and a device, which obtain the importance of multiple candidate attribute features respectively; obtain attribute features whose importance is greater than or equal to a first threshold from multiple candidate attribute features; obtain sample data sets corresponding to multiple sample user accounts respectively, the sample data sets include attribute values ​​of the attribute features corresponding to the sample user accounts, and use the sample data sets corresponding to the multiple sample user accounts as the input of the machine learning model, and use the labeled user types corresponding to the multiple sample user accounts as the training targets to train the user type prediction model. If the importance of the candidate attribute feature is less than or equal to the first threshold, it means that the candidate attribute feature has little effect on determining the user type of the sample user account. Therefore, using the sample data set to train the machine learning model reduces the amount of training data and improves the accuracy of the output user type.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a user type prediction model training method, a resource allocation method, a medium and a device. Background Art

[0002] In the related art, in order to prevent users from becoming unstable factors, social platforms can allocate electronic resources to users to improve user stability.

[0003] The applicant discovered during the research of the invention that the social platform did not allocate electronic resources to users in accordance with user needs, resulting in the allocated electronic resources not matching user needs and the user's stability not being significantly improved. How to allocate electronic resources matching user needs is a problem that those skilled in the art need to solve. Summary of the invention

[0004] The present disclosure provides a method, device, server, medium and product for determining an electronic resource allocation strategy, so as to at least solve the problem in the related art of how to allocate electronic resources to users to better improve the user's activity and reduce the additional expenditure of electronic resources. The technical solution of the present disclosure is as follows:

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

[0006] Obtaining importance levels corresponding to a plurality of candidate attribute features, respectively, wherein the importance levels corresponding to the candidate attribute features represent the degree to which the candidate attribute features affect the demand of the user account for electronic resources, wherein the candidate attribute features include behavior features representing the use behavior of the user account for the client, and electronic resource allocation features representing the electronic resources allocated to the user account;

[0007] Obtaining an attribute feature whose importance is greater than or equal to a first threshold from the plurality of candidate attribute features;

[0008] Acquire sample data sets corresponding to a plurality of sample user accounts respectively, wherein the sample data sets include attribute values ​​of the attribute features corresponding to the sample user accounts;

[0009] The sample data sets corresponding to multiple sample user accounts are taken as the input of the machine learning model, and the annotated user types corresponding to the multiple sample user accounts are taken as the training targets. The user type prediction model is obtained through training. The annotated user types of the sample user accounts are the degree of demand for electronic resources by the sample user accounts.

[0010] In combination with the first aspect, in a first possible implementation manner, the step of obtaining importance levels corresponding to a plurality of candidate attribute features includes:

[0011] Acquire candidate data sets corresponding to a plurality of sample user accounts respectively, wherein the candidate data sets include attribute values ​​of a plurality of candidate attribute features corresponding to the sample user accounts;

[0012] The candidate data sets corresponding to the multiple sample user accounts are taken as inputs of the boosted tree model, and the annotated user types corresponding to the multiple sample user accounts are taken as training targets, and an importance prediction model is obtained through training, wherein the importance prediction model includes a decision tree, and the decision tree includes non-leaf nodes and leaf nodes, wherein the non-leaf nodes are associated with the candidate attribute features, and the leaf nodes are associated with the annotated user types;

[0013] Based on the decision tree included in the importance prediction model, the importance levels respectively corresponding to the multiple candidate attribute features are obtained.

[0014] In combination with the first aspect, in a second possible implementation manner, the step of obtaining importance levels corresponding to a plurality of candidate attribute features includes:

[0015] Acquire a plurality of candidate attribute features and at least one preset interference attribute feature, wherein the interference attribute feature is a feature that is irrelevant to the degree of demand for electronic resources by the user account;

[0016] Acquire candidate data sets corresponding to a plurality of sample user accounts respectively, wherein the candidate data sets of the sample user accounts include attribute values ​​of a plurality of candidate attribute features corresponding to the sample user accounts and an attribute value of the at least one interference attribute feature;

[0017] The candidate data sets corresponding to the multiple sample user accounts are taken as inputs of the boosted tree model, and the annotated user types corresponding to the multiple sample user accounts are taken as training targets, and an importance prediction model is obtained through training, wherein the importance prediction model includes a decision tree, and the decision tree includes a first non-leaf node, a second non-leaf node, and a leaf node, wherein the first non-leaf node is associated with the candidate attribute feature, the second non-leaf node is associated with the interference attribute feature, and the leaf node is associated with the annotated user type;

[0018] Based on the decision tree included in the importance prediction model, the importance levels corresponding to the plurality of candidate attribute features and the importance level corresponding to the interference attribute feature are obtained.

[0019] In combination with the first aspect, in a third possible implementation manner, the step of obtaining the attribute feature whose importance is greater than or equal to the first threshold from the multiple candidate attribute features includes:

[0020] Based on the importance of the interference attribute feature, obtaining the first threshold;

[0021] The attribute feature whose importance is greater than the first threshold is obtained from the plurality of candidate attribute features.

[0022] In combination with the first aspect, in a fourth possible implementation manner, setting the attribute feature as the candidate attribute feature or the interference attribute feature, and obtaining the importance of the set attribute feature based on the decision tree included in the importance prediction model includes:

[0023] Obtaining a target non-leaf node associated with the set attribute feature from a decision tree included in the importance prediction model;

[0024] Obtaining a first value, where the first value represents a probability corresponding to a data set of the target non-leaf node, where the data set of the target non-leaf node includes multiple sample user accounts, and the probability corresponding to the data set is a probability that the annotated user types respectively corresponding to the multiple sample user accounts included in the data set do not belong to the same annotated user type;

[0025] Obtaining a second value, where the second value is the sum of the probabilities of the data sets corresponding to the child nodes of the target non-leaf node, where the sample user accounts contained in the data set corresponding to each child node are sample user accounts in the data set of the target non-leaf node that meet the corresponding set conditions associated with the set attribute feature, and different child nodes correspond to different set conditions;

[0026] The difference between the first value and the second value is determined as the importance of the set attribute feature.

[0027] In combination with the first aspect, in a fifth possible implementation manner, the at least one interference attribute feature includes a first interference attribute feature corresponding to a candidate attribute feature belonging to a discrete variable and / or a second interference attribute feature corresponding to a candidate attribute feature belonging to a continuous variable; the step of obtaining the attribute feature having an importance greater than the first threshold from the plurality of candidate attribute features includes:

[0028] From a plurality of candidate attribute features belonging to discrete variables, obtain the attribute feature whose importance is greater than a first threshold corresponding to the candidate attribute feature belonging to the discrete variable, the first threshold corresponding to the candidate attribute feature belonging to the discrete variable being the importance of the first interfering attribute feature; and / or,

[0029] From multiple candidate attribute features belonging to the continuous variable, the attribute feature whose importance is greater than a first threshold corresponding to the candidate attribute feature belonging to the continuous variable is obtained, and the first threshold corresponding to the candidate attribute feature belonging to the continuous variable is the importance of the second interference attribute feature.

[0030] In combination with the first aspect, in a sixth possible implementation manner, the step of obtaining multiple candidate attribute features includes:

[0031] Get multiple pending attribute features;

[0032] A plurality of linearly independent undetermined attribute features among the plurality of undetermined attribute features are determined as the candidate attribute features.

[0033] In combination with the first aspect, in a seventh possible implementation manner, the step of determining multiple linearly independent undetermined attribute features among the multiple undetermined attribute features as the candidate attribute features includes:

[0034] If the multiple undetermined attribute features include multiple linearly correlated undetermined attribute features, remove at least one undetermined attribute feature from the multiple linearly correlated undetermined attribute features, and retain the linearly independent target undetermined attribute feature;

[0035] The target undetermined attribute feature is determined as the candidate attribute feature.

[0036] According to a second aspect of an embodiment of the present disclosure, a resource allocation method is provided, including:

[0037] Acquire a data set to be tested of the user account to be tested, wherein the data set to be tested includes attribute values ​​of attribute features corresponding to the user account to be tested;

[0038] Inputting the data set to be tested into a user type prediction model, obtaining the user type of the user account to be tested through the user type prediction model, wherein the user type prediction model is trained using the user type prediction model training method according to any one of claims 1 to 9;

[0039] Based on the user type of the user account to be tested, electronic resources are allocated to the user account to be tested.

[0040] In conjunction with the second aspect, in a first possible implementation manner, the step of obtaining a set of test data of a test user account includes:

[0041] Obtaining attribute values ​​of multiple original attribute features corresponding to the user account to be tested;

[0042] Based on the attribute values ​​of the multiple original attribute features corresponding to the user account to be tested, obtaining the attribute values ​​of multiple derived attribute features, wherein the derived attribute features are derived from at least one of the original attribute features;

[0043] Filtering out attribute values ​​of a plurality of preset candidate attribute features from the attribute values ​​of the plurality of original attribute features and the attribute values ​​of the plurality of derived attribute features, wherein the plurality of preset candidate attribute features are linearly independent;

[0044] Obtaining the importance levels respectively corresponding to the plurality of candidate attribute features from the preset correspondence relationship between the candidate attribute features and the importance levels;

[0045] From the attribute values ​​of the plurality of candidate attribute features, the attribute values ​​of the attribute features whose importance is greater than or equal to the first threshold are screened out.

[0046] In conjunction with the second aspect, in a second possible implementation manner, the user type prediction model is a logistic regression model, and the resource allocation method further includes:

[0047] Based on the user type prediction model, obtaining the influence degree of the attribute feature, the influence degree represents the user type that the attribute feature affects the user account tendency;

[0048] Obtaining a target attribute feature from the attribute features whose influence degree is greater than or equal to a second threshold;

[0049] Acquire change rule information, where the change rule information represents the association between the marked user type of the user account and the target attribute feature;

[0050] If the user type of the user account to be tested is a user type with a demand for electronic resources higher than or equal to a preset threshold, determining the indicator attribute characteristics through the change rule information;

[0051] Among them, the indicator attribute characteristics include a first target attribute characteristic and / or a second target attribute characteristic, the first target attribute characteristic is a target attribute characteristic that affects the tendency of the user account to be tested to be a user type with a demand for electronic resources lower than the preset threshold, and the attribute value of the first target attribute characteristic of the user account to be tested is lower than the preset third threshold, the second target attribute characteristic is a target attribute characteristic that affects the tendency of the user account to be tested to be a user type with a demand for electronic resources higher than or equal to the preset threshold, and the attribute value of the second target attribute characteristic of the user account to be tested is higher than the preset fourth threshold.

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

[0053] A first acquisition module is configured to acquire importances corresponding to a plurality of candidate attribute features, wherein the importances corresponding to the candidate attribute features represent the degree to which the candidate attribute features affect the user's demand for electronic resources, and the candidate attribute features include any one of a behavior feature representing the user account's usage behavior for the client and an electronic resource allocation feature representing the client's allocation of electronic resources to the user account;

[0054] A second acquisition module is configured to obtain the attribute feature whose importance is greater than or equal to the first threshold from the multiple candidate attribute features;

[0055] A third acquisition module is configured to acquire sample data sets corresponding to a plurality of sample user accounts respectively, wherein the sample data sets include attribute values ​​of the attribute features corresponding to the sample user accounts;

[0056] The training module is configured to use the sample data sets corresponding to multiple sample user accounts as the input of the machine learning model, and the annotated user types corresponding to the multiple sample user accounts as the training targets, and train to obtain the user type prediction model, wherein the annotated user types of the sample user accounts are the degree of demand for electronic resources by the sample user accounts.

[0057] In conjunction with the third aspect, in a first possible implementation manner, the first acquisition module is specifically configured as follows:

[0058] A first acquisition unit is configured to acquire candidate data sets corresponding to a plurality of sample user accounts respectively, wherein the candidate data sets include attribute values ​​of a plurality of candidate attribute features corresponding to the sample user accounts;

[0059] A first training unit is configured to use the candidate data sets corresponding to the multiple sample user accounts as inputs of the boosted tree model, use the annotated user types corresponding to the multiple sample user accounts as training targets, and train to obtain an importance prediction model, wherein the importance prediction model includes a decision tree, the decision tree includes non-leaf nodes and leaf nodes, the non-leaf nodes are associated with the candidate attribute features, and the leaf nodes are associated with the annotated user types;

[0060] The second acquisition unit is configured to obtain the importance levels respectively corresponding to the plurality of candidate attribute features based on the decision tree included in the importance prediction model.

[0061] In combination with the third aspect, in a second possible implementation manner, the first acquisition module is specifically configured as follows:

[0062] A third acquisition unit is configured to acquire a plurality of candidate attribute features and at least one preset interference attribute feature, wherein the interference attribute feature is a feature that is irrelevant to the degree of demand for the electronic resource by the user account;

[0063] a fourth acquisition unit, configured to acquire candidate data sets corresponding to a plurality of sample user accounts respectively, wherein the candidate data sets of the sample user accounts include attribute values ​​of a plurality of candidate attribute features corresponding to the sample user accounts and an attribute value of the at least one interference attribute feature;

[0064] A second training unit is configured to use the candidate data sets corresponding to the multiple sample user accounts as inputs of the boosted tree model, use the annotated user types corresponding to the multiple sample user accounts as training targets, and train to obtain an importance prediction model, wherein the importance prediction model includes a decision tree, the decision tree includes a first non-leaf node, a second non-leaf node, and a leaf node, the first non-leaf node is associated with the candidate attribute feature, the second non-leaf node is associated with the interference attribute feature, and the leaf node is associated with the annotated user type;

[0065] The fifth acquisition unit is configured to obtain the importance levels corresponding to the plurality of candidate attribute features and the importance level corresponding to the interference attribute feature based on the decision tree included in the importance prediction model.

[0066] In conjunction with the third aspect, in a third possible implementation manner, the second acquisition module is specifically configured to:

[0067] A sixth acquisition unit is configured to obtain the first threshold based on the importance of the interference attribute feature;

[0068] The seventh acquisition unit is configured to obtain the attribute feature whose importance is greater than the first threshold from the plurality of candidate attribute features.

[0069] In combination with the third aspect, in a fourth possible implementation manner, the attribute feature is set to the candidate attribute feature or the interference attribute feature, and the second acquisition unit or the fifth acquisition unit is specifically configured as follows:

[0070] A first acquisition subunit is configured to obtain a target non-leaf node associated with the set attribute feature from a decision tree included in the importance prediction model;

[0071] A second acquisition subunit is configured to obtain a first value, wherein the first value represents a probability corresponding to a data set of the target non-leaf node, wherein the data set of the target non-leaf node includes a plurality of sample user accounts, and the probability corresponding to the data set is a probability that the annotated user types respectively corresponding to the plurality of sample user accounts included in the data set do not belong to the same annotated user type;

[0072] A third acquisition subunit is configured to obtain a second value, wherein the second value is the sum of probabilities of data sets corresponding to child nodes of the target non-leaf node, and the sample user accounts contained in the data set corresponding to each child node are sample user accounts in the data set of the target non-leaf node that meet the corresponding set conditions associated with the set attribute feature, and different child nodes correspond to different set conditions;

[0073] The first determining subunit is configured to determine the difference between the first value and the second value as the importance of the set attribute feature.

[0074] In combination with the third aspect, in a fifth possible implementation manner, the at least one interference attribute feature includes a first interference attribute feature corresponding to a candidate attribute feature belonging to a discrete variable and / or a second interference attribute feature corresponding to a candidate attribute feature belonging to a continuous variable; the seventh acquisition unit is specifically configured as follows:

[0075] a fourth acquisition subunit, configured to obtain, from a plurality of candidate attribute features belonging to the discrete variable, the attribute feature whose importance is greater than a first threshold corresponding to the candidate attribute feature belonging to the discrete variable, the first threshold corresponding to the candidate attribute feature belonging to the discrete variable being the importance of the first interference attribute feature; and / or,

[0076] The fifth acquisition subunit is configured to obtain the attribute feature whose importance is greater than a first threshold corresponding to the candidate attribute feature belonging to the continuous variable from multiple candidate attribute features belonging to the continuous variable, and the first threshold corresponding to the candidate attribute feature belonging to the continuous variable is the importance of the second interference attribute feature.

[0077] In combination with the third aspect, in a sixth possible implementation manner, it is characterized by further comprising:

[0078] A fourth acquisition module is configured to acquire a plurality of undetermined attribute features;

[0079] The first determining module is configured to determine a plurality of linearly independent undetermined attribute features among a plurality of undetermined attribute features as the candidate attribute features.

[0080] In combination with the third aspect, the seventh possible implementation manner further includes:

[0081] A screening module is configured to remove at least one of the multiple linearly correlated undetermined attribute features if the multiple undetermined attribute features include multiple linearly correlated undetermined attribute features, and retain the linearly independent target undetermined attribute feature;

[0082] The second determination module is configured to determine the target undetermined attribute feature as the candidate attribute feature.

[0083] According to a fourth aspect of an embodiment of the present disclosure, a resource allocation device is provided, including:

[0084] A fifth acquisition module is configured to acquire a set of test data of the user account to be tested, wherein the set of test data includes attribute values ​​of attribute features corresponding to the user account to be tested;

[0085] a sixth acquisition module, configured to input the test data set into a user type prediction model, and obtain the user type of the test user account through the user type prediction model, wherein the user type prediction model is trained using the user type prediction model training method described in the first aspect;

[0086] The resource allocation module is configured to allocate electronic resources to the user account to be tested based on the user type of the user account to be tested.

[0087] In conjunction with the fourth aspect, in a first possible implementation manner, the fifth acquisition module is specifically configured as follows:

[0088] a tenth obtaining unit, configured to obtain attribute values ​​of a plurality of original attribute features corresponding to the user account to be tested;

[0089] an eleventh obtaining unit, configured to obtain attribute values ​​of a plurality of derived attribute features based on the attribute values ​​of the plurality of original attribute features corresponding to the user account to be tested, wherein the derived attribute features are derived from at least one of the original attribute features;

[0090] A first screening unit is configured to screen out attribute values ​​of a plurality of preset candidate attribute features from the attribute values ​​of the plurality of original attribute features and the attribute values ​​of the plurality of derived attribute features, wherein the plurality of preset candidate attribute features are linearly independent;

[0091] A twelfth obtaining unit is configured to obtain the importance levels respectively corresponding to the plurality of candidate attribute features from a preset correspondence relationship between the candidate attribute features and the importance levels;

[0092] The second screening unit is configured to screen out the attribute values ​​of the attribute features whose importance is greater than or equal to the first threshold from the attribute values ​​of the plurality of candidate attribute features.

[0093] In conjunction with the fourth aspect, in a second possible implementation manner, the user type prediction model is a logistic regression model, and the resource allocation device further includes:

[0094] A seventh acquisition module is configured to obtain the influence degree of the attribute feature based on the user type prediction model, wherein the influence degree represents the user type to which the attribute feature affects the user account tendency;

[0095] An eighth acquisition module is configured to obtain a target attribute feature whose influence degree is greater than or equal to a second threshold from the attribute features;

[0096] a ninth acquisition module, configured to acquire change rule information, wherein the change rule information represents an association between a marked user type of a user account and the target attribute feature;

[0097] The control module is configured to determine the indicator attribute characteristics through the change rule information if the user type of the user account to be tested is a user type whose demand for electronic resources is higher than or equal to a preset threshold;

[0098] Among them, the indicator attribute characteristics include a first target attribute characteristic and / or a second target attribute characteristic, the first target attribute characteristic is a target attribute characteristic that affects the tendency of the user account to be tested to be a user type with a demand for electronic resources lower than the preset threshold, and the attribute value of the first target attribute characteristic of the user account to be tested is lower than the preset third threshold, the second target attribute characteristic is a target attribute characteristic that affects the tendency of the user account to be tested to be a user type with a demand for electronic resources higher than or equal to the preset threshold, and the attribute value of the second target attribute characteristic of the user account to be tested is higher than the preset fourth threshold.

[0099] According to a fifth aspect of an embodiment of the present disclosure, a server is provided, including:

[0100] processor;

[0101] a memory for storing instructions executable by the processor;

[0102] Wherein, the processor is configured to execute the instructions to implement the user type prediction model training method described in the first aspect, or to implement the resource allocation method described in the second aspect.

[0103] According to the sixth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided. When the instructions in the computer-readable storage medium are executed by a processor of a server, the server is enabled to execute the user type prediction model training method as described in the first aspect, or the server is enabled to execute the resource allocation method as described in the second aspect.

[0104] According to the seventh aspect of an embodiment of the present disclosure, a computer program product is provided, comprising a computer program / instruction, characterized in that when the computer program / instruction is executed by a processor, the user type prediction model training method described in the first aspect is implemented, or when the computer program / instruction is executed by a processor, the resource allocation method described in the second aspect is implemented.

[0105] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:

[0106] In the disclosed embodiment, the importance of multiple candidate attribute features is obtained, and the importance of the candidate attribute features represents the degree to which the candidate attribute features affect the demand for electronic resources of the user account; the attribute features with an importance greater than or equal to the first threshold are obtained from the multiple candidate attribute features; the sample data sets corresponding to multiple sample user accounts are obtained, and the sample data sets include the attribute values ​​of the attribute features corresponding to the sample user accounts. The sample data sets corresponding to the multiple sample user accounts are used as the input of the machine learning model, and the labeled user types corresponding to the multiple sample user accounts are used as the training targets to train the user type prediction model. Since the sample data sets of the sample user accounts for training the machine learning model are the attribute values ​​of the attribute features, the importance of the attribute features is greater than or equal to the first threshold. The candidate attribute features with lower importance are not beneficial to the training of the machine learning model. If the importance of the candidate attribute features is less than or equal to the first threshold, it means that the candidate attribute features have no effect or little effect on determining the user type of the sample user account. If the machine learning model is trained using the sample data set containing the candidate attribute features with an importance less than or equal to the first threshold, not only will the accuracy of the user type output by the machine learning model be reduced, but also the amount of data in the process of training the machine learning model will be increased. Therefore, multiple attribute features with an importance greater than the first threshold are selected from multiple candidate attribute features, and a sample data set containing multiple attribute features is used to train the machine learning model, which greatly reduces the amount of data in the process of training the machine learning model and improves the accuracy of the user type output by the machine learning model. Since the user type prediction model outputs a relatively accurate user type, accurate user needs can be obtained, thereby achieving the purpose of allocating electronic resources that match user needs.

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

[0108] The drawings herein are incorporated into and constitute a part of the specification, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0109] Figure 1 is a schematic diagram of a hardware environment involved in an embodiment of the present disclosure according to an exemplary embodiment;

[0110] Figure 2 is a flowchart of a user type prediction model training method according to an exemplary embodiment;

[0111] Figure 3 is a structural diagram of an implementation method of an importance prediction model according to an exemplary embodiment;

[0112] Figure 4 is a structural diagram of another implementation of an importance prediction model according to an exemplary embodiment;

[0113] Figure 5 A flowchart of a resource allocation method provided in an embodiment of the present application;

[0114] Figure 6 is a block diagram of a user type prediction model training device according to an exemplary embodiment;

[0115] Figure 7 is a block diagram of a resource allocation device according to an exemplary embodiment;

[0116] Figure 8 The invention is a block diagram of a server according to an exemplary embodiment. DETAILED DESCRIPTION

[0117] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0118] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure 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 disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0119] The embodiments of the present disclosure provide a user type prediction model training method, a resource allocation method, an apparatus, a server, a computer-readable storage medium, and a computer program product. Before introducing the technical solution provided by the embodiments of the present disclosure, the hardware environment involved in the embodiments of the present disclosure is first introduced.

[0120] Figure 1 1 is a schematic diagram of a hardware environment involved in an embodiment of the present disclosure according to an exemplary embodiment. The hardware environment includes: a server 11 and at least one electronic device 12.

[0121] Exemplarily, the electronic device 12 can be any electronic product that can interact with a user through one or more methods such as a keyboard, touchpad, touch screen, remote control, voice interaction or handwriting device, such as a mobile phone, tablet computer, PDA, personal computer, wearable device, smart TV, etc.

[0122] Exemplarily, the server 11 may be a single server, or a server cluster consisting of multiple servers, or a cloud computing service center.

[0123] Exemplarily, the electronic device 12 and the server 11 may establish a connection and communicate via a wireless network.

[0124] It should be noted that Figure 1 For example only, Figure 1 Two electronic devices and one server are shown in the figure. By way of example, the number of electronic devices and servers may be determined based on actual conditions, and the embodiments of the present disclosure do not limit the number of electronic devices and servers.

[0125] The electronic device 12 is used to run a client, and the client can be an application client or a web client, for example. A user can log in to the client through a user account and operate the client.

[0126] Exemplarily, the client may be any one of a video client, a short video client, a news client, a novel client, a payment client, and a shopping client.

[0127] Exemplarily, a user may operate on an object displayed by a client running on an electronic device. Exemplarily, different types of clients display different objects. Exemplarily, if the client is a video client, the object is a video, and if the client is a news client, the object is news.

[0128] In an optional implementation, the user can perform various operations on the objects displayed by the client running the electronic device, so that the server 11 can obtain various features through the client. The embodiment of the present application provides but is not limited to the following three features.

[0129] The first type is viewing behavior features that characterize viewing behavior of an object displayed by a client.

[0130] Exemplarily, viewing behavior features characterizing viewing behavior for objects displayed on a client include, but are not limited to, at least one of the following: the total number of objects viewed within a preset time period, the total duration of viewing objects within a preset time period, the total duration of using the client within a preset time period, the type of objects viewed within a preset time period, changes in the number of objects viewed within a preset time period over time, changes in the duration of viewing objects within a preset time period over time, and changes in the type of objects viewed within a preset time period over time.

[0131] Exemplarily, the type of an object is related to the specific content of the object. For example, if the object is a video, the type of the object may be a classification label of the video, such as variety show type, time-travel drama type, or family ethics drama type. Exemplarily, if the object is news, the type of the object may be a current affairs type or an entertainment gossip type.

[0132] The second type is a social behavior feature that characterizes the social behavior of the object displayed to the client.

[0133] Exemplarily, the social behavior characteristics characterizing the social behavior of the objects displayed by the client include but are not limited to at least one of the following: the total number of objects downloaded within a preset time period, the total number of objects collected within a preset time period, the total number of objects shared within a preset time period, the total number of authors who follow the production objects within a preset time period, the total number of comments on the objects within a preset time period, the total number of likes on the objects within a preset time period, the total number of times other users' personal homepages are viewed within a preset time period, changes in the number of downloaded objects over time within a preset time period, changes in the number of objects collected over time within a preset time period, changes in the number of objects shared over time within a preset time period, changes in the number of authors who follow the production objects over time within a preset time period, changes in the number of comments on the objects over time within a preset time period, changes in the number of likes on the objects over time within a preset time period, and changes in the number of other users' personal homepages over time within a preset time period.

[0134] The third type is production behavior characteristics that characterize the production behavior of the object displayed on the client.

[0135] Exemplarily, the production behavior characteristics characterizing the production behavior of the object displayed to the client include but are not limited to at least one of the following: the total number of uploaded objects within a preset time period, the frequency of uploading videos within a preset time period, and the change in the number of uploaded objects within a preset time period over time.

[0136] Exemplarily, the preset time period may be [current time - fixed time, current time]. As time passes, the current time is constantly changing, so the preset time period is constantly changing. Exemplarily, the preset time period may be [registration time when the user registers the client, current time].

[0137] In the embodiment of the present application, the above three characteristics are collectively referred to as "behavioral characteristics of the user account's usage behavior with respect to the client."

[0138] In the embodiment of the present application, the three types of features are divided into original attribute features and derived attribute features.

[0139] Among them, the original attribute features refer to the statistical features of the user account's operation behavior on the client, which are related to the user account's operation behavior and have nothing to do with the specific objects operated by the user account, for example, the total number of objects viewed within a preset time period, the total time for viewing objects within a preset time period, the total time for using the client, the total number of objects downloaded within a preset time period, the total number of objects collected within a preset time period, the total number of objects shared within a preset time period, the total number of authors who follow the production objects within a preset time period, the total number of comments on the objects within a preset time period, the total number of likes for the objects within a preset time period, the total number of times other users' personal homepages are viewed within a preset time period, the total number of objects uploaded within a preset time period, and the frequency of uploading videos within a preset time period. These features in the embodiments of the present application are original attribute features.

[0140] The derived attribute feature refers to an analysis feature for analyzing an object operated by a client according to a user account. Exemplarily, the derived attribute feature is derived based on at least one or more original attribute features.

[0141] For example, the derived attribute features may be: the type of objects viewed within a preset time period, the change in the number of objects viewed within a preset time period over time, the change in the duration of objects viewed within a preset time period over time, the change in the type of objects viewed within a preset time period over time, the change in the number of downloaded objects within a preset time period over time, the change in the number of favorite objects within a preset time period over time, the change in the number of shared objects within a preset time period over time, the change in the number of authors who follow the generated object within a preset time period over time, the change in the number of comments on the object within a preset time period over time, the change in the number of likes for the object within a preset time period over time, the change in the number of times other users' personal homepages are viewed within a preset time period over time, and the change in the number of uploaded objects within a preset time period.

[0142] The following examples illustrate the derived attribute features and original attribute features. The derived attribute feature "how the number of objects viewed during a preset time period changes over time" is obtained through the original attribute feature "the total number of objects viewed during a preset time period". Because the total number of objects viewed during a preset time period = the sum of the numbers viewed at each time, the derived attribute feature "how the number of objects viewed during a preset time period changes over time" can be obtained based on the number viewed at each time.

[0143] In the embodiment of the present application, the original attribute features and the derived attribute features are collectively referred to as pending attribute features.

[0144] It can be understood that there may be multiple linearly correlated pending attribute features among the multiple pending attribute features. Since the multiple linearly correlated pending attribute features can characterize each other, at least one of the multiple linearly correlated pending attribute features can be removed, and the linearly independent target pending attribute features can be retained.

[0145] In the embodiment of the present application, a plurality of linearly independent target undetermined attribute features are referred to as candidate attribute features, that is, the candidate attribute features are linearly independent undetermined attribute features among the plurality of undetermined attribute features.

[0146] Assume that the multiple pending attribute features include: pending attribute feature 1, pending attribute feature 2, pending attribute feature 3, and pending attribute feature 4.

[0147] Assume that pending attribute feature 4 is linearly independent from pending attribute feature 1, pending attribute feature 2, and pending attribute feature 3, and there are coefficients a, b, and c that are not all zero, so that a*pending attribute feature 1+b*pending attribute feature 2+c*pending attribute feature 3=0, then pending attribute feature 1, pending attribute feature 2, and pending attribute feature 3 are linearly dependent. If after deleting pending attribute feature 3, there are no coefficients d and e that are not all zero, so that d*pending attribute feature 1+e*pending attribute feature 2=0, that is, pending attribute feature 1 and pending attribute feature 2 are linearly independent, then pending attribute feature 1, pending attribute feature 2, and pending attribute feature 4 are target pending attribute features, and these three features are all candidate attribute features.

[0148] In an optional implementation, a user can log in to his or her user account based on a client running on an electronic device, and view the electronic resources he or she has obtained by logging in to the client with the user account, that is, the client can obtain the electronic resource allocation characteristics that represent the electronic resources allocated to the user account.

[0149] Exemplarily, the electronic resource allocation characteristics that characterize the electronic resources allocated to a user account include but are not limited to at least one of the following: the total number of electronic resources obtained within a preset time period, the number of times a user visits an electronic resource page within a preset time period, the total number of times a first type of electronic resource is exchanged for a second type of electronic resource within a preset time period, and the change in the number of electronic resources obtained within a preset time period over time.

[0150] For the description of the preset time period, please refer to the above description of the preset time period, which will not be repeated here.

[0151] Exemplarily, the first type of electronic resources and the second type of electronic resources have a certain conversion ratio.

[0152] Exemplarily, the electronic resource may be a virtual property.

[0153] Exemplarily, the electronic resource allocation characteristics that characterize the electronic resources allocated to the user account can also be divided into two categories: original attribute characteristics and derived attribute characteristics. Exemplarily, the original attribute characteristics include: the total number of electronic resources obtained within a preset time period, the number of times the user visits the electronic resource page within the preset time period, and the total number of times the first type of electronic resources are exchanged for the second type of electronic resources within the preset time period; the derived attribute characteristics include: the change in the number of electronic resources obtained within the preset time period over time.

[0154] In the embodiment of the present application, the candidate attribute features also include: linearly independent features in the above-mentioned electronic resource allocation features that characterize the electronic resources allocated to the user account.

[0155] In the embodiment of the present application, each candidate attribute feature has an importance, and the importance represents the degree to which the candidate attribute feature affects the user account's demand for electronic resources. In one example, the greater the importance, the greater the degree to which the candidate attribute feature affects the user account's demand for electronic resources, and the smaller the importance, the smaller the degree to which the candidate attribute feature affects the user account's demand for electronic resources.

[0156] In the embodiment of the present application, the candidate attribute features whose importance is greater than or equal to the first threshold are referred to as attribute features.

[0157] In an optional implementation, the client running on the electronic device 12 may obtain a data set corresponding to a user account that logs into the client, where the data set includes attribute values ​​of attribute features.

[0158] It can be understood that if the user account is a sample user account, the data set is a sample data set; if the user account is a user account to be tested, the data set is a data set to be tested.

[0159] The following example illustrates the attribute value of the attribute feature.

[0160] For different user accounts, the attribute values ​​of the same attribute feature may be different or the same.

[0161] If the attribute feature is the total time of viewing the object within the preset time period, assuming that the total time of viewing the object within the preset time period by account A is 3 hours, and the total time of viewing the object within the preset time period by user account B is 4 hours, then the attribute value of the attribute feature corresponding to user account A is 3, and the attribute value of the attribute feature corresponding to user account B is 4.

[0162] Exemplarily, the attribute value of any of the above-mentioned “change conditions” may be gradually decreasing, or gradually increasing, or stable.

[0163] Exemplarily, if any of the above “change situations” conforms to a certain probability distribution, the attribute value of the “change situation” may be an element on the curve of the probability distribution.

[0164] Exemplarily, the client running on the electronic device 12 may send a data set corresponding to a user account that logs into the client to the server 11 .

[0165] The server 11 may receive data sets corresponding to one or more user accounts, and for each user account, input the data set corresponding to the user account into a user type prediction model to obtain a user type corresponding to the user account, wherein the user type refers to the degree of demand for electronic resources by the user account.

[0166] Exemplarily, the degree of demand for electronic resources of a user account can be represented by a number. Exemplarily, the numerical range of the degree of demand for electronic resources of a user account is [0, 1], where 0 represents that the user account has no demand for electronic resources (i.e., the user account does not use the client for electronic resources), and 1 represents that the degree of demand for electronic resources of the user account is 100% (i.e., the user account uses the client for electronic resources).

[0167] Exemplarily, the above numerical range can be divided to obtain multiple sub-ranges, each sub-range corresponding to a user type. For example, the above numerical range is divided into two sub-ranges, namely [0, preset threshold) and (preset threshold, 1]. If the value output by the user type prediction model belongs to [0, preset threshold), the user account corresponds to user type 0 (i.e., a user type with a lower degree of demand for electronic resources). If the value output by the user type prediction model belongs to (preset threshold, 1] (i.e., a user type with a higher degree of demand for electronic resources), the user account corresponds to user type 1.

[0168] Exemplarily, the preset threshold may be determined based on actual conditions.

[0169] In an optional implementation, the server 11 may allocate electronic resources to the user account based on the user type of the user account.

[0170] Exemplarily, the server for training the user type prediction model and the server for allocating resources to the user account may be the same server or different servers.

[0171] Those skilled in the art should understand that the above-mentioned electronic devices and storage devices are only examples, and other existing or future electronic devices or storage devices that are applicable to the present disclosure should also be included in the protection scope of the present disclosure and are included here by reference.

[0172] The solution provided by the embodiment of the present disclosure is described below with reference to the accompanying drawings.

[0173] Figure 2 is a flowchart of a method for training a user type prediction model according to an exemplary embodiment. Figure 2 As shown, the user type prediction model training method can be used in the server 11, and the method includes the following steps S21 to S24 during implementation.

[0174] In step S21, the importance levels corresponding to a plurality of candidate attribute features are obtained.

[0175] The importance degree corresponding to the candidate attribute feature represents the degree to which the candidate attribute feature affects the user account's demand for electronic resources. The candidate attribute feature includes a behavior feature that represents the user account's usage behavior for the client, and an electronic resource allocation feature that represents the electronic resources allocated to the user account.

[0176] Exemplarily, the candidate attribute features may include at least one of a behavior feature characterizing the usage behavior of the user account for the client and an electronic resource allocation feature characterizing the electronic resources allocated to the user account.

[0177] In step S22, the attribute feature whose importance is greater than or equal to the first threshold is obtained from the plurality of candidate attribute features.

[0178] In step S23, sample data sets corresponding to a plurality of sample user accounts are obtained, wherein the sample data sets include attribute values ​​of the attribute features corresponding to the sample user accounts.

[0179] In step S24, the sample data sets corresponding to the multiple sample user accounts are collectively used as inputs of the machine learning model, and the annotated user types corresponding to the multiple sample user accounts are used as training targets, so as to obtain the user type prediction model through training.

[0180] The marked user type of the sample user account is the degree of demand for electronic resources by the sample user account.

[0181] The greater the importance of the candidate attribute feature, the more the candidate attribute feature can reflect the user type to which the user account belongs. The following example is used to illustrate this.

[0182] Assume that the total number of multiple user accounts is 15, as shown in Table 1, which is the specific situation of 15 user accounts.

[0183] Table 1 Details of sample user accounts

[0184]

[0185] As shown in Table 1, user type 0 represents a user type with a lower demand for electronic resources, and user type 1 represents a user type with a higher demand for electronic resources.

[0186] Among the 15 sample user accounts, 6 sample user accounts belong to user type 0, and 9 sample user accounts belong to user type 1, which means that the user types corresponding to the 15 sample user accounts are inconsistent. As can be seen from Table 1, the candidate attribute features corresponding to the 15 sample user accounts include: age, monthly income and gender, a total of three candidate attribute features. As can be seen from Table 1, compared with the candidate attribute feature "age", the candidate attribute feature "monthly income" is less important than the candidate attribute feature "age" and the candidate attribute feature "monthly income". The reasons are as follows:

[0187] The 15 user accounts can be divided into two user account sets by the candidate attribute feature "monthly income", that is, the user accounts with the attribute value of the candidate attribute feature "monthly income" of "≥1W" belong to user account set A, that is, user account set A is {user account 1, user account 2, user account 5, user account 6, user account 7, user account 15}; the user accounts with the attribute value of the candidate attribute feature "monthly income" of "<1W" belong to user account set B, that is, user account set B is {user account 3, user account 4, user account 8, user account 9, user account 10, user account 11, user account 12, user account 13, user account 14}. All user accounts in user account set A belong to user type 0; all user accounts in user account set B belong to user type 1. Therefore, the candidate attribute feature "monthly income" can reflect the user type to which the user account belongs.

[0188] When the attribute value of the candidate attribute feature "age" is youth, middle-aged, or elderly, although the 15 user accounts can be divided into two user account sets, the user types of the user accounts in each user account set are not consistent. The following takes the attribute value of the candidate attribute feature "age" as youth as an example for explanation.

[0189] The user accounts whose attribute value of the candidate attribute feature "age" is youth belong to the user account set C, that is, the user account set C is {user account 1, user account 2, user account 3, user account 4, user account 5}, and the user accounts whose attribute value of the candidate attribute feature "age" is non-youth (i.e., middle-aged or elderly) belong to the user account set D, that is, the user account set D is {user account 6, user account 7, user account 8, user account 9, user account 10, user account 11, user account 12, user account 13, user account 14, user account 15}, and the user types of the user accounts in the user account set C or the user account set D are not consistent. However, the user types of the user accounts contained in the user account set D and the user account set C are more concentrated than the user types of the 15 user accounts in Table 1, such as the sum of the Gini impurity of the user account set C and the user account set D is less than the Gini impurity of the set shown in Table 1.

[0190] The attribute value of the candidate attribute feature "gender" is male or female. The user account with the attribute value of the candidate attribute feature "gender" being male belongs to the user account set E, that is, the user account set E is {user account 2, user account 4, user account 6, user account 9, user account 11, user account 13, user account 15}; the user account with the attribute value of the candidate attribute feature "gender" being female belongs to the user account set F, that is, the user account set F is {user account 1, user account 3, user account 5, user account 7, user account 8, user account 10, user account 12, user account 14}. The user types to which the user accounts in the user account set E or the user account set F belong are not consistent. Moreover, the user types to which the user accounts contained in the user account set E and the user account set F respectively belong are more dispersed than the user types to which the 15 user accounts belong in Table 1, or the concentration degree is the same (the sum of the Gini impurities of the user account set E and the user account set F is greater than or equal to the Gini impurity of the set shown in Table 1), indicating that the candidate attribute feature "gender" cannot represent the category to which the user account belongs. That is, the user category to which the user account belongs, regardless of the gender of the user account.

[0191] In summary, the importance of the candidate attribute feature "gender" is less than the importance of the candidate attribute feature "age" and less than the importance of the candidate attribute feature "monthly income".

[0192] It is understandable that candidate attribute features with lower importance are not beneficial to the training of machine learning models. For example, the candidate attribute feature "gender" mentioned above is irrelevant to the user type of the user account, that is, the candidate attribute feature "gender" has no effect on the user type of the user account. If the importance of the candidate attribute feature is less than or equal to the first threshold, it means that the candidate attribute feature has no effect or little effect on determining the user type of the sample user account. If a sample data set containing candidate attribute features with an importance less than or equal to the first threshold is used to train a machine learning model, not only will the accuracy of the user type output by the machine learning model be reduced, but the amount of data in the process of training the machine learning model will also be increased. Therefore, multiple attribute features with an importance greater than the first threshold are selected from multiple candidate attribute features, and a sample data set containing multiple attribute features is used to train the machine learning model, which greatly reduces the amount of data in the process of training the machine learning model and improves the accuracy of the user type output by the machine learning model.

[0193] In the disclosed embodiment, the importance of multiple candidate attribute features is obtained, and the importance of the candidate attribute features represents the degree to which the candidate attribute features affect the demand for electronic resources of the user account; the attribute features with an importance greater than or equal to the first threshold are obtained from the multiple candidate attribute features; the sample data sets corresponding to multiple sample user accounts are obtained, and the sample data sets include the attribute values ​​of the attribute features corresponding to the sample user accounts. The sample data sets corresponding to the multiple sample user accounts are used as the input of the machine learning model, and the labeled user types corresponding to the multiple sample user accounts are used as the training targets to train the user type prediction model. Since the sample data sets of the sample user accounts for training the machine learning model are the attribute values ​​of the attribute features, the importance of the attribute features is greater than or equal to the first threshold. The candidate attribute features with lower importance are not beneficial to the training of the machine learning model. If the importance of the candidate attribute features is less than or equal to the first threshold, it means that the candidate attribute features have no effect or little effect on determining the user type of the sample user account. If the machine learning model is trained using the sample data set containing the candidate attribute features with an importance less than or equal to the first threshold, not only will the accuracy of the user type output by the machine learning model be reduced, but also the amount of data in the process of training the machine learning model will be increased. Therefore, multiple attribute features with an importance greater than the first threshold are selected from multiple candidate attribute features, and a sample data set containing multiple attribute features is used to train the machine learning model, which greatly reduces the amount of data in the process of training the machine learning model and improves the accuracy of the user type output by the machine learning model. Since the user type prediction model outputs a relatively accurate user type, accurate user needs can be obtained, thereby achieving the purpose of allocating electronic resources that match user needs.

[0194] In an optional implementation, there are multiple implementations of step S21, and the embodiments of the present disclosure provide but are not limited to the following two methods.

[0195] The first implementation of step S21 includes the following steps A11 to A13.

[0196] In step A11, candidate data sets corresponding to a plurality of sample user accounts are obtained, wherein the candidate data sets include attribute values ​​of the plurality of candidate attribute features corresponding to the sample user accounts.

[0197] For the description of the attribute values ​​of the candidate attribute features, please refer to the description of the attribute values ​​of the attribute features, which will not be repeated here.

[0198] In step A12, the candidate data sets corresponding to the multiple sample user accounts are respectively taken as the input of the boosting tree model, and the labeled user types corresponding to the multiple sample user accounts are taken as the training targets, and the importance prediction model is trained to obtain the importance prediction model, wherein the importance prediction model includes a decision tree, and the decision tree includes non-leaf nodes and leaf nodes, wherein the non-leaf nodes are associated with the candidate attribute features, and the leaf nodes are associated with the labeled user types.

[0199] In step A13, based on the decision tree included in the importance prediction model, the importance levels respectively corresponding to the multiple candidate attribute features are obtained.

[0200] Exemplarily, the boosted tree model may be any one of an XgBoost model, a GBDT (Gradient Boosting Decision Tree) model, a boosting tree model, and a random forest model.

[0201] Exemplarily, the decision tree is a CART tree (Classification And Regression Tree), and exemplary, the CART tree may be a binary tree.

[0202] In an optional implementation, the method for training a boosted tree model includes: obtaining at least one decision tree based on multiple candidate attribute features. Each decision tree includes non-leaf nodes and leaf nodes. Each non-leaf node in the decision tree is associated with a candidate attribute feature, and each leaf node in the decision tree is associated with a user type. It is understandable that the child nodes of a non-leaf node may be leaf nodes or non-leaf nodes. Each node (non-leaf node or leaf node) corresponds to a data set, and the data set includes multiple sample user accounts.

[0203] The relationship between a non-leaf node and its child nodes (a child node of a non-leaf node refers to a lower-level node of the non-leaf node, excluding a grandchild node of the non-leaf node) is as follows: the data set corresponding to the non-leaf node is divided according to the attribute value A of the candidate attribute feature A associated with the non-leaf node to obtain a data set corresponding to each child node. For example, the sample user accounts whose attribute value of the candidate attribute feature A is attribute value A among the multiple sample user accounts contained in the data set corresponding to the non-leaf node are divided into the data set corresponding to the left child node, and the sample user accounts whose attribute value of the candidate attribute feature A is not attribute value A among the multiple sample user accounts are divided into the data set corresponding to the right child node.

[0204] Exemplarily, there are many methods for obtaining a decision tree, for example, a greedy algorithm or an approximate algorithm in XgBoost, or an optimal feature selection method in a CART classification tree algorithm. The optimal feature selection method in a CART classification tree algorithm is used as an example for explanation below. For each decision tree, the implementation method for obtaining the decision tree includes the following steps B1 to B6.

[0205] In step B1, a data set corresponding to the current node is obtained, where the data set includes one or more sample user accounts.

[0206] It is understandable that, in the process of executing step B1 to step B6 for the first time, the node mentioned in step B1 is the root node of the decision tree. The data set corresponding to the root node includes all sample user accounts.

[0207] In the process of executing step B1 to step B6 for the Nth time, N is a positive integer greater than or equal to 2, and the node mentioned in step B1 is a child node or a grandchild node of the root node.

[0208] In step B2, if the number of sample user accounts contained in the data set determined in step B1 is less than or equal to the preset third threshold, or the candidate attribute feature contained in the remaining feature set corresponding to the current node is 0, or the probability that the labeled user types corresponding to the sample user accounts contained in the data set corresponding to the current node do not belong to the same labeled user type is less than or equal to the preset fourth threshold, the current node is determined to be a leaf node, and the current node stops splitting, otherwise execute step B3.

[0209] Exemplarily, the third threshold may be determined based on actual conditions, which will not be described in detail here. For example, the third threshold may be 5, and if the number of sample user accounts included in the data set is less than or equal to 5, the splitting is stopped.

[0210] Exemplarily, the probability that the labeled user types corresponding to the sample user accounts contained in the data set do not belong to the same labeled user type can be represented by the Gini index, or entropy, or information gain. The Gini index is used as an example for explanation. Exemplarily, the calculation formula of the Gini index is as follows:

[0211] Where k is the number of forks in the decision tree. For example, if the decision tree is a binary tree, k = 2; if the decision tree is a ternary tree, k = 3. i It is the ratio of the number of sample user accounts belonging to the i-th category in the data set corresponding to the current node to the total number of all sample user accounts contained in the data set corresponding to the current node.

[0212] Still taking Table 1 as an example, the number of sample user accounts belonging to user type 1 (assuming i=1) is 9, and the number of sample user accounts belonging to user type 0 (assuming i=2) is 6, then k=2, P1=9 / 15, P2=6 / 15.

[0213] Exemplarily, the fourth threshold may be determined based on actual conditions, which is not limited in the embodiments of the present disclosure. For example, the fourth threshold may be 0.2. If the Gini impurity of the data set corresponding to the current node is less than or equal to 0.2, the current node stops splitting.

[0214] Exemplarily, the remaining feature set includes candidate attribute features other than the candidate attribute features corresponding to the predecessor node of the current node among the multiple candidate attribute features.

[0215] Exemplarily, the predecessor nodes of the current node include: the parent node of the current node, the parent node of the parent node of the current node, ..., until the root node.

[0216] Assume that the predecessor nodes of the current node include: the parent node A of the current node and the parent node B of the parent node A. Assume that the parent node B is the root node. The parent node A corresponds to the candidate attribute feature A, and the parent node B corresponds to the candidate attribute feature B. Assume that the multiple candidate attribute features include: the candidate attribute feature A, the candidate attribute feature B, and the candidate attribute feature C, then the remaining feature set corresponding to the current node includes the candidate attribute feature C.

[0217] In step B3, for each candidate attribute feature included in the remaining feature set, after dividing the data set obtained in step B1 based on the dividing point of the candidate attribute feature, the probability that the labeled user types corresponding to the sample user accounts contained in the data set corresponding to the child nodes of the current node do not belong to the same labeled user type is obtained.

[0218] In the embodiment of the present application, “the probability that the labeled user types corresponding to the sample user accounts included in the data set do not belong to the same labeled user type” is referred to as probability for short.

[0219] The following is an explanation of the relationship between the attribute values ​​and split points of the candidate attribute features. A candidate attribute feature corresponds to one or more attribute values. For example, the attribute value corresponding to the candidate attribute feature "gender" is male or female. For gender, if it is not male, it is female, so the split point of the candidate attribute feature "gender" is "male" or "female". For another example, the attribute value corresponding to the candidate attribute feature "age" is "middle-aged", or "elderly", or "youth". Then the split point of the candidate attribute feature is "youth", or the split point is "middle-aged", or the split point is "elderly".

[0220] In step B4, for each candidate attribute feature's split point, the sum of the probabilities corresponding to the data sets of the child nodes of the current node divided based on the candidate attribute feature's split point is calculated (hereinafter collectively referred to as impurity) to obtain the impurity corresponding to the split point of each candidate attribute feature. From each impurity, determine the optimal candidate attribute feature and the optimal split point corresponding to the minimum impurity.

[0221] For any candidate attribute feature, an example of obtaining the optimal split point of the candidate attribute feature is as follows:

[0222] The 15 sample user accounts shown in Table 1 belong to the data set of the root node. If the current node is the root node, the data set corresponding to the current node can be divided based on the split point "youth" of the candidate attribute feature "age". The sample user accounts with the split point "youth" are divided into data set A1, and the sample user accounts with the split point "non-youth" are divided into data set A2. The impurity corresponding to the split point "youth" of the candidate attribute feature "age" = the probability corresponding to data set A1 + the probability corresponding to data set A2; the data set corresponding to the current node is divided based on the split point "middle-aged" of the candidate attribute feature "age". The sample user accounts with the split point "middle-aged" are divided into The account is divided into data set A3, and the sample user account with the split point of "non-middle-aged" is divided into data set A4. The impurity corresponding to the split point "middle-aged" of the candidate attribute feature "age" = the probability corresponding to data set A3 + the probability corresponding to data set A4; based on the split point "elderly" of the candidate attribute feature "age", the data set corresponding to the current node is divided, and the sample user account with the split point "elderly" is divided into data set A5, and the sample user account with the split point "non-elderly" is divided into data set A6. The impurity corresponding to the split point "elderly" of the candidate attribute feature "age" = the probability corresponding to data set A5 + the probability corresponding to data set A6.

[0223] Find the minimum impurity from the above three impurities. Assuming that the impurity corresponding to the split point "youth" of the candidate attribute feature "age" is the minimum impurity, the optimal split point is "youth".

[0224] The method for obtaining the best candidate attribute feature from multiple candidate attribute features is to obtain the candidate attribute feature corresponding to the minimum impurity from the impurities corresponding to the optimal split points corresponding to multiple candidate attribute features, which is the best candidate attribute feature.

[0225] Exemplarily, the type of the candidate attribute feature may be a discrete variable or a continuous variable. For example, if the candidate attribute feature is gender, the candidate attribute feature is a discrete variable, and if the candidate attribute feature is the total time of viewing the object per unit time, the candidate attribute feature is a continuous variable.

[0226] Exemplarily, if the type of the candidate attribute feature is a discrete variable, the number of segmentation points corresponding to the candidate attribute feature is the total number of attribute values ​​that the candidate attribute feature can obtain. For example, the value range of the attribute value of the candidate attribute feature is {character 1, character 2, character 3}, then the candidate attribute feature corresponds to 3 segmentation points, and the 3 segmentation points are character 1, character 2, and character 3 respectively.

[0227] For example, if the type of the candidate attribute feature is a continuous variable, the continuous variable can be discretized. The following example is used to illustrate. Assume that there are m values ​​of the candidate attribute feature of the type of continuous variable corresponding to n sample user accounts, where n is greater than or equal to m, and assume that the m values ​​are a1, a2, ..., a1 in ascending order. m , the average of every two adjacent values ​​can be used as the split point, there are a total of m-1 split points, where the i-th split point Ti is expressed as: Ti = (a i +a i+1 ) / 2, thus achieving the discretization of continuous variables. Calculate the impurities corresponding to these m-1 split points respectively. The split point with the smallest impurity is the optimal split point for the candidate attribute feature. For example, the split point with the smallest impurity is a t , then the attribute value of the candidate attribute feature is less than a t The sample user accounts are divided into data set 1, and the attribute value of the candidate attribute feature is greater than a t The sample user accounts are divided into dataset 2.

[0228] In an optional implementation, the multiple candidate attribute features include candidate attribute features belonging to discrete variables and candidate attribute features belonging to continuous variables.

[0229] Exemplarily, for candidate attribute features that are discrete variables, the candidate attribute features need to be dummy-varied.

[0230] Dummy variables, also known as virtual variables, fictitious variables or nominal variables, are artificially created variables, usually with a value of 0 or 1, to reflect the different attributes of a candidate attribute feature. For candidate attribute features with L categories, it is usually necessary to select 1 category as a reference, so L-1 dummy variables can be generated, where L is a positive integer greater than or equal to 2.

[0231] The following example illustrates the process of dummy variableization. Assuming that the candidate attribute feature is occupation, there are five categories of occupation: students, farmers, workers, civil servants, and others. For the candidate attribute feature of occupation, four dummy variables can be set: students, farmers, workers, and civil servants. For the category of "others", when the values ​​of the four dummy variables are all 0, the attribute value of the occupation is "others".

[0232] For example, for the candidate attribute features of the attribute continuous variable, it may not be necessary to dummy-variable the candidate attribute features.

[0233] Exemplarily, for the candidate attribute features of the attribute continuous variable, it may also be necessary to dummy-variable the candidate attribute features.

[0234] The following example illustrates the process of dummy variable conversion.

[0235] Assume that the candidate attribute feature is age, and the maximum value of age is 60. Age is a continuous variable, so age can be discretized. For example, it can be divided into 10-year age groups, such as [0,10], [11,20], [21,30], [31,40], [41,50], [51,60]. Each group of ranges is assigned 1, 2, 3, 4, 5, 6, that is, age is divided into 6 categories.

[0236] Exemplarily, in the embodiments of the present disclosure, dummy variables are performed on the candidate attribute features, which can be applied to the process of training the boosted tree model.

[0237] In step B5, it is determined that the candidate attribute feature corresponding to the current node is the optimal candidate attribute feature, and the segmentation point corresponding to the current node is the optimal segmentation point of the optimal candidate attribute feature.

[0238] In step B6, the data set corresponding to the current node is divided according to the optimal splitting point of the optimal candidate attribute feature to obtain data sets corresponding to the two child nodes of the current node. For each child node, the child node is returned to step B1 as the current node.

[0239] The following example illustrates the process of obtaining the decision tree. The following example illustrates multiple candidate attribute features including age, gender, and the number of times a user account accesses an electronic resource page within a preset time period, assuming that the number of multiple sample user accounts is 15. The data set D of the root node of the decision tree is shown in Table 2.

[0240] Table 2 Dataset D

[0241]

[0242] In the embodiment of the present disclosure, “the probability that the labeled user types corresponding to the sample user accounts included in the data set do not belong to the same labeled user type” is used as an example for explanation.

[0243] Assume that the third threshold is 3 and the fourth threshold is 0.1 for example.

[0244] For the root node, in step B1, the current node is the root node, and the data set corresponding to the root node is data set D; in step B2, the number of sample user accounts contained in data set D is 15, which is greater than the third threshold, and the remaining feature set corresponding to the root node includes candidate attribute features: age, gender, and the number of times the user account visits the electronic resource page within a preset time period. The Gini index corresponding to data set D is greater than the fourth threshold, so it needs to continue splitting.

[0245] For the root node, in step B3, the Gini index of the above three candidate attribute features is calculated, with A1 representing age, A2 representing gender, and A3 representing the number of times the user account visits the electronic resource page within a preset time period.

[0246] The attribute value A1=1 represents age as youth, the attribute value A1=2 represents age as middle-aged, the attribute value A1=3 represents age as old, the attribute value A2=1 represents gender as female, the attribute value A2=2 represents gender as male, the attribute value A3=1 represents the number of times the user account visits the electronic resource page within a preset time period as low, and the attribute value A3=2 represents the number of times the user account visits the electronic resource page within the preset time period as high.

[0247] Calculate the Gini index of candidate attribute feature A1 for data set D:

[0248] Gini(D,A1=1)=0.44

[0249] Gini (D, A1 = 2) = 0.48;

[0250] Gini(D,A1=3)=0.44

[0251] Obtain the Gini index of the candidate attribute feature A2 for the data set D. Since the candidate attribute feature A2 corresponds to a cut-off point, for example, male or female, Gini(D, A2=1)=Gini(D, A2=2)=0.32.

[0252] The Gini index of the candidate attribute feature A3 for the data set D is obtained. Since the candidate attribute feature A3 corresponds to a cut-off point, for example, high or low, Gini(D, A3=1)=Gini(D, A3=2)=0.27.

[0253] For the root node, in step B4 and step B5, among the above three candidate attribute features, Gini(D,A3=1)=0.27 is the smallest, so candidate attribute feature A3 is the optimal candidate attribute feature corresponding to the root node, and since candidate attribute feature A3 has only one split point, i.e. high or low, this split point is the optimal split point.

[0254] For the root node, in step B6, the root node is split into two child nodes, the data set D1 corresponding to child node 1 with A3=1 is shown in Table 3, and the data set D2 corresponding to child node 2 with A3=2 is shown in Table 4. Child node 1 and child node 2 are respectively used as current nodes and returned to step B1.

[0255] Table 3 Dataset D1

[0256]

[0257]

[0258] Table 4 Dataset D2

[0259]

[0260] For child node 1, in step B1, data set D1 is obtained. In step B2, the number of sample user accounts contained in data set D1 is 9, which is greater than the third threshold. The remaining feature set corresponding to child node 1 includes: gender, age, and the Gini index of data set D1 corresponding to child node 1 is greater than the fourth threshold, so the splitting continues.

[0261] For child node 1, in step B3, the Gini index of candidate attribute feature A1 for data set D1 is calculated:

[0262]

[0263] Calculate the Gini index of candidate attribute feature A2 for data set D1:

[0264] Gini(D1,A2=1)=Gini(D1,A2=2)=0;

[0265] For child node 1, in step B4 and step B5, among candidate attribute features A1 and candidate attribute features A2, since Gini(D1,A2=1)=0 is the smallest, candidate attribute feature A2 is selected as the optimal candidate attribute feature. Since candidate attribute feature A2 has only one splitting point, namely male or female, the optimal splitting point is male or female, so child node 1 is split into two child nodes, among which the data set D3 corresponding to child node 3 with A2=1 includes {sample user account 1, sample user account 2, sample user account 5, sample user account 6, sample user account 7, sample user account 15}, and the data set D4 corresponding to child node 4 with A2=2 includes {sample user account 3, sample user account 13, sample user account 14}; child node 3 and child node 4 are respectively used as current nodes and returned to step B1.

[0266] For child node 2, in step B1, the data set D2 corresponding to child node 2 is obtained. In step B2, since all sample user accounts contained in data set D2 belong to the same category, the Gini index corresponding to data set D2 is 0, which is less than the fourth threshold, so the splitting is stopped and the child node 2 is a leaf node.

[0267] After the calculations from step B1 to step B6, both child node 3 and child node 4 are leaf nodes, thereby obtaining a decision tree.

[0268] Exemplarily, the boosted tree model may include one or more decision trees. If multiple decision trees are included, then the multiple decision trees are integrated together to form a strong classifier.

[0269] Figure 3 It is a structural diagram of an implementation method of an importance prediction model according to an exemplary embodiment.

[0270] Figure 3 The importance prediction model including two decision trees is used as an example for explanation. Figure 3 The decision tree shown on the left is the decision tree corresponding to the examples in Tables 2 to 4. Figure 3 The decision tree shown on the right is based on the assumption that Figure 3 A decision tree obtained by residual learning of the decision tree shown on the left in Figure 2.

[0271] Exemplarily, after the candidate data set of the sample user account is input into the importance prediction model, one or more decision trees included in the importance prediction model obtain scores of each leaf node based on the candidate data set.

[0272] Exemplarily, the user type of the sample user account is obtained by superimposing the scores of the leaf nodes in the decision tree included in the importance prediction model.

[0273] Exemplarily, the score corresponding to the user type = score 1*w0 + score 2*w1 + score 2*w2 + score 3*w3 + score 5*w4. Exemplarily, if the score corresponding to the user type is less than or equal to the preset threshold, the user type is user type 0; if the score corresponding to the user type is greater than the preset threshold, the user type is user type 1.

[0274] Exemplarily, the weight values ​​corresponding to different leaf nodes are completely different, for example, the above w0, w1, w2, w3, and w4 are completely different. Exemplarily, the weight values ​​corresponding to different leaf nodes may be exactly the same, for example, w0, w1, w2, w3, and w4 are exactly the same. Exemplarily, the weight values ​​corresponding to different leaf nodes are not exactly the same, for example, w0 and w1 are the same, but w0 and w3 are different.

[0275] In the first implementation of step S21, implementations of step S22 include but are not limited to the following two.

[0276] The first implementation method of step S22 includes the following steps S221 to S222.

[0277] In step S221, a plurality of candidate attribute features are sorted from greatest to least important to obtain a sorting result.

[0278] In step S222, the first preset number of candidate attribute features in the sorting result are respectively determined as attribute features.

[0279] The first threshold is the importance of the preset number+1 candidate attribute features in the sorting result.

[0280] The second implementation method of step S22 includes the following steps S223 to S224.

[0281] In step S223, a preset first threshold is obtained.

[0282] Exemplarily, the first threshold is a preset fixed value.

[0283] In step S224, a plurality of attribute features whose importance is greater than the first threshold are obtained from a plurality of candidate attribute features.

[0284] It is understandable that the decision tree included in the importance prediction model is a process of classifying multiple sample user accounts into corresponding user types based on a candidate data set of multiple sample user accounts. Ideally, each time a candidate attribute feature is used to classify multiple sample user accounts, the Gini index of the divided data set will be reduced. However, there may be interference items in multiple candidate attribute features, that is, after multiple sample user accounts are divided by a certain candidate attribute feature, the Gini index of the divided data set is not reduced. In this case, the candidate attribute feature is an interference item, and the user type output by the user type prediction model trained using the candidate feature set containing interference items is inaccurate.

[0285] Exemplarily, the more concentrated the user types to which one or more sample user accounts contained in a data set belong, the lower the Gini index of the data set. For example, data set A includes 1,000 sample user accounts, of which 500 sample user accounts belong to user type 1 and 500 sample user accounts belong to user type 0. After dividing data set A by candidate attribute feature A, two data sets A1 and A2 are obtained, wherein data set A1 includes 500 sample user accounts, of which 240 sample user accounts belong to user type 1 and 260 sample user accounts belong to user type 0. Data set A2 includes 500 sample user accounts, of which 260 sample user accounts belong to user type 0 and 240 sample user accounts belong to user type 1. The sum of the Gini indexes of data sets A1 and A2 is almost the same as the Gini index of data set A, so candidate attribute feature A is an interference item.

[0286] In the first implementation of step S21, the importance of the candidate attribute features that may be interference items is the first threshold or less than the first threshold. Since the first threshold is an empirical value, the first threshold may be inaccurately determined. For example, the first threshold is determined to be small, so that the interference items are determined as attribute features, or the first threshold is determined to be large, and one or more non-interference items are not determined as attribute features. This will reduce the accuracy of the user type output by the trained user type prediction model. Based on this, a second implementation is provided.

[0287] The second implementation method of step S21 includes the following steps A21 to A24.

[0288] In step A21, a plurality of candidate attribute features and at least one preset interference attribute feature are obtained, where the interference attribute feature is a feature that is irrelevant to the degree of demand for electronic resources by the user account.

[0289] Exemplarily, the type of the interference attribute feature may be a continuous variable or a discrete variable.

[0290] In step A22, candidate data sets corresponding to a plurality of sample user accounts are obtained, wherein the candidate data sets of the sample user accounts include attribute values ​​of a plurality of candidate attribute features corresponding to the sample user accounts and the attribute value of the at least one interference attribute feature.

[0291] Exemplarily, the attribute value of the interference attribute feature is a randomly obtained attribute value from a preset range corresponding to the interference attribute feature, and the preset range includes multiple attribute values.

[0292] It can be understood that each interference attribute feature corresponds to a preset range. When assigning attribute values ​​of the interference attribute features of multiple sample user accounts, an attribute value is randomly obtained from the preset range and assigned. Since the attribute value is randomly selected, for a large number of sample user accounts, the interference attribute feature has no effect on determining which user type the sample user account belongs to, such as the candidate attribute feature A in the above example.

[0293] It can be understood that the larger the number of sample user accounts is, the smaller the influence of the interference attribute feature on determining to which user type the sample user account belongs is.

[0294] In step A23, the candidate data sets corresponding to the multiple sample user accounts are taken as the input of the boosting tree model, and the labeled user types corresponding to the multiple sample user accounts are taken as training targets, and the importance prediction model is trained. The importance prediction model includes a decision tree, and the decision tree includes a first non-leaf node, a second non-leaf node and a leaf node. The first non-leaf node is associated with the candidate attribute feature, the second non-leaf node is associated with the interference attribute feature, and the leaf node is associated with the labeled user type.

[0295] The process of training to obtain the importance prediction model can be combined with the description of step A13. Exemplarily, there are multiple methods for obtaining the decision tree contained in the importance prediction model mentioned in step A23. The embodiment of the present disclosure provides but is not limited to the following method. For each decision tree, the implementation method of obtaining the decision tree includes the following steps C1 to C6.

[0296] In step C1, a data set corresponding to the current node is obtained, and the data set includes one or more sample user accounts.

[0297] For the description of step C1, reference may be made to the description of step B1, which will not be repeated here.

[0298] In step C2, if the number of sample user accounts contained in the data set determined in step C1 is less than or equal to the preset third threshold, or the set attribute feature contained in the remaining feature set corresponding to the current node is 0, or the probability that the labeled user types corresponding to the sample user accounts contained in the data set corresponding to the current node do not belong to the same labeled user type is less than or equal to the preset fourth threshold, the current node is determined to be a leaf node, and the current node stops splitting, otherwise execute step C3.

[0299] Exemplarily, the attribute feature is set as an interference attribute feature or a candidate attribute feature, that is, the remaining feature set includes the interference attribute feature and the candidate attribute feature.

[0300] Exemplarily, the remaining feature set includes multiple candidate attribute features and set attribute features in the interference attribute features except the set attribute features corresponding to the predecessor node of the current node.

[0301] Exemplarily, the predecessor nodes of the current node include: the parent node of the current node, the parent node of the parent node of the current node, ..., until the root node.

[0302] Assume that the predecessor nodes of the current node include: the parent node A of the current node and the parent node B of the parent node A. Assume that the parent node B is the root node. The parent node A corresponds to the candidate attribute feature A, and the parent node B corresponds to the interference attribute feature B. Assume that the multiple candidate attribute features include: candidate attribute feature A, candidate attribute feature B, and candidate attribute feature C, and the multiple interference attribute features include: interference attribute feature A and interference attribute feature B. Then, the remaining feature set corresponding to the current node includes: candidate attribute feature B, candidate attribute feature C, and interference attribute feature A.

[0303] In step C3, for each set attribute feature included in the remaining feature set, after obtaining the split point based on the set attribute feature to divide the data set obtained in step C1, the probability that the labeled user types corresponding to the sample user accounts contained in the data set corresponding to the child node of the current node do not belong to the same labeled user type.

[0304] In the embodiment of the present application, “the probability that the labeled user types corresponding to the sample user accounts included in the data set do not belong to the same labeled user type” is referred to as probability for short.

[0305] For the description of step C3, please refer to the description of step B3, which will not be repeated here.

[0306] The method for calculating the probability of a data set obtained by dividing the cut point based on the interference attribute feature is the same as the method for calculating the probability of a data set obtained by dividing the cut point based on the candidate attribute feature, and will not be repeated here.

[0307] In step C4, for each splitting point of the set attribute feature, the sum of the probabilities corresponding to the data sets of the child nodes of the current node after the splitting point based on the set attribute feature is calculated (hereinafter collectively referred to as impurity) to obtain the impurity corresponding to the splitting point of each set attribute feature, and from each impurity, determine the optimal set attribute feature and the optimal splitting point corresponding to the minimum purity.

[0308] Exemplarily, the type of the interference attribute feature may be a discrete variable or a continuous variable. The process of obtaining the cut-off point of the interference attribute feature can refer to the process of obtaining the cut-off point of the candidate attribute feature, which will not be repeated here.

[0309] In step C5, it is determined that the set attribute feature corresponding to the current node is the optimal set attribute feature, and the segmentation point corresponding to the current node is the optimal segmentation point of the optimal set attribute feature.

[0310] In step C6, the data set corresponding to the current node is divided according to the optimal splitting point of the optimal setting attribute feature to obtain data sets corresponding to the two child nodes of the current node. For each child node, the child node is returned to step C1 as the current node.

[0311] The process of the above steps C1 to C6 is described below using the example of Table 2. Assume that the pre-set interference attribute feature is age, and the candidate attribute feature is gender and the number of times the user account accesses the electronic resource page within a preset time period. The process of obtaining the decision tree based on the candidate attribute feature and the interference attribute feature is as described in Table 2, and will not be repeated here.

[0312] In step A24, based on the decision tree included in the importance prediction model, the importance levels corresponding to the plurality of candidate attribute features and the importance levels corresponding to the interference attribute features are obtained.

[0313] The corresponding implementation of step S22 includes the following steps A25 to A26.

[0314] In step A25, the first threshold is obtained based on the importance of the interference attribute feature.

[0315] In step A26, the attribute feature whose importance is greater than the first threshold is obtained from the plurality of candidate attribute features.

[0316] Figure 4 It is a structural diagram of another implementation method of an importance prediction model according to an exemplary embodiment.

[0317] Figure 4The explanation is given by taking the preset at least one interference attribute feature including two interference attribute features and the multiple candidate attribute features including three candidate attribute features as an example. It is assumed that the importance prediction model includes two decision trees, and the three candidate attribute features are represented by A1, A2, and A3, and the two interference attribute features are represented by A4 and A5 respectively.

[0318] Exemplarily, category 1 may be user type 0, and category 2 may be user type 1.

[0319] It is understandable that since the interfering attribute features have no effect on determining which user type the sample user account belongs to, if the importance of a candidate attribute feature is less than or equal to the first threshold, it means that the candidate attribute feature has no effect on determining which user type the sample user account belongs to. If a sample data set containing candidate attribute features whose importance is less than or equal to the first threshold is used to train a machine learning model, not only will the accuracy of the user type output by the machine learning model not be improved, but the amount of data in the process of training the machine learning model will also be increased. Therefore, multiple attribute features whose importance is greater than the first threshold are screened out from multiple candidate attribute features, and a sample data set containing only multiple attribute features is used to train the machine learning model, which greatly reduces the amount of data in the process of training the machine learning model. And since the first threshold is not an empirical value, the problem caused by the first threshold being an empirical value in the implementation of the first step S22 or the second step S22 will not occur.

[0320] In an optional implementation, there are multiple specific implementations of step A13 and step A24, and the embodiments of the present disclosure provide but are not limited to the following implementations. It can be understood that the process of obtaining the importance of the interference attribute feature is the same as the process of obtaining the importance of the candidate attribute feature, and the interference attribute feature and the candidate attribute feature are collectively referred to as the set attribute feature for explanation below, that is, the set attribute feature is a candidate attribute feature or an interference attribute feature.

[0321] For each set attribute feature, based on the decision tree included in the importance prediction model, obtaining the importance of the set attribute feature involves the following steps D11 to D14 during the implementation process.

[0322] In step D11, a target non-leaf node associated with the set attribute feature is obtained from the decision tree included in the importance prediction model.

[0323] In step D12, a first numerical value is obtained, wherein the first numerical value represents the probability corresponding to the data set of the target non-leaf node, wherein the data set of the target non-leaf node includes multiple sample user accounts, and the probability corresponding to the data set is the probability that the labeled user types corresponding to the multiple sample user accounts contained in the data set do not belong to the same labeled user type.

[0324] In step D13, a second numerical value is obtained, which is the sum of the probabilities of the data sets corresponding to the child nodes of the target non-leaf node. The sample user accounts contained in the data set corresponding to each child node are sample user accounts in the data set of the target non-leaf node that meet the corresponding set conditions associated with the set attribute features, and different child nodes correspond to different set conditions.

[0325] Exemplarily, the set conditions satisfied by the sample user accounts contained in the child nodes are related to the attribute values ​​of the set attribute features. For example, assuming that the target non-leaf node is Figure 3 The root node in the dataset D1 is set to the candidate attribute feature A3, and the two child nodes of the root node are child node 1 (corresponding to data set D1) and child node 2 (corresponding to data set D2). The set condition satisfied by the sample user accounts contained in the data set D1 corresponding to child node 1 is that the attribute value of the candidate attribute feature A3 is high; the set condition satisfied by the sample user accounts contained in the data set D2 corresponding to child node 2 is that the attribute value of the candidate attribute feature A3 is low.

[0326] In step D14, the difference between the first value and the second value is determined as the importance of the set attribute feature.

[0327] Exemplarily, the probability that the labeled user types corresponding to the sample user accounts included in the data set do not belong to the same labeled user type may be Gini impurity (ie, Gini index), or entropy, or information gain.

[0328] The implementation process of the above steps D11 to D14 is described below by taking an example. In this example, the Gini index is used as an example to illustrate "the probability that the labeled user types corresponding to each sample user account included in the data set do not belong to the same labeled user type".

[0329] Assume that the attribute characteristics are Figure 3 Candidate attribute feature A3 in Figure 3 The number of target non-leaf nodes associated with the candidate attribute feature A3 in the importance prediction model shown is 1, and it is the root node. The data set corresponding to the root node is data set D.

[0330] After partitioning the data set D corresponding to the candidate attribute feature A3, two child nodes are obtained, namely child node 1 (corresponding to data set D1) and child node 2 (corresponding to data set D2). For details, please refer to Table 3 and Table 4.

[0331] Child node 1 corresponds to data set D1, that is Figure 3The calculation formula of the Gini index of the data set of the left child node of the node corresponding to the candidate attribute feature A3 shown is as follows:

[0332]

[0333] Child node 2 corresponds to data set D2, Figure 3 The calculation formula of the Gini index of the data set of the right child node of the node corresponding to the candidate attribute feature A3 shown is as follows:

[0334]

[0335] The second value = the sum of the probabilities of the data sets corresponding to the child nodes of the target non-leaf node = the sum of the Gini indexes of the data sets corresponding to the child nodes of the target non-leaf node, which is:

[0336]

[0337] Still taking the above example, the importance level corresponding to the candidate attribute feature A3 = the first value - the second value = 0.48 - 0.27 = 0.21.

[0338] Exemplarily, the number of target non-leaf nodes can be one or more. If the number of target non-leaf nodes is 1, then the first value is the probability of the data set corresponding to the target non-leaf node; the second sub-value is the sum of the probabilities of the data sets corresponding to the sub-nodes of the target non-leaf node. If the number of target non-leaf nodes is multiple, then the first value is the mean of the probabilities of the data sets corresponding to the multiple target non-leaf nodes, and the second value is the mean of the sum of the probabilities of the data sets corresponding to the sub-nodes of the multiple target non-leaf nodes.

[0339] For example, if the number of target non-leaf nodes is 3, and they are: target non-leaf node 1, target non-leaf node 2 and target non-leaf node 3, then the first value = (the probability of the data set corresponding to target non-leaf node 1 + the probability of the data set corresponding to target non-leaf node 2 + the probability of the data set corresponding to target non-leaf node 3) / 3.

[0340] The second value = (the sum of the probabilities of the data sets of the child nodes corresponding to the target non-leaf node 1 + the sum of the probabilities of the data sets of the child nodes corresponding to the target non-leaf node 2 + the sum of the probabilities of the data sets of the child nodes corresponding to the target non-leaf node 3) / 3.

[0341] For example, the importance of the set attribute features can be visualized in combination with the Mean Decrease Impurity of the ELI5 library.

[0342] In an optional implementation, since the difference between the first numerical value and the second numerical value corresponding to the set attribute feature can better reflect the contribution level of the set attribute feature to eliminating the chaos of the data set, the difference is used as the importance of the set attribute feature, so that the multiple attribute features screened from multiple candidate attribute features are more in line with the needs of subsequent training of the machine learning model, and the user type output by the trained user type prediction model is more accurate.

[0343] It is understandable that due to the different processes of determining the splitting points for discrete variables and continuous variables, there are certain differences in training the boosted tree model. In this regard, in an optional implementation, the at least one interference attribute feature includes at least one first interference attribute feature corresponding to the candidate attribute feature belonging to the discrete variable, and / or, at least one second interference attribute feature corresponding to the candidate attribute feature belonging to the continuous variable.

[0344] The first interference attribute feature is a discrete variable, and the second interference attribute feature is a continuous variable. The preset range corresponding to the first interference attribute feature includes multiple discrete values, and the preset range corresponding to the second interference attribute feature includes multiple continuous values.

[0345] Exemplarily, step A25 specifically includes the following steps E1 and / or step E2.

[0346] In step E1, the importance of the first interference attribute feature is determined to be a first threshold corresponding to the candidate attribute feature belonging to the discrete variable.

[0347] Exemplarily, if the number of first interference attribute features is 1, the first threshold corresponding to the candidate attribute feature belonging to the discrete variable is the importance of the first interference attribute feature; exemplary, the number of the first interference attribute features is greater than 1, and the first threshold corresponding to the candidate attribute feature belonging to the discrete variable can be the average of the importance of multiple first interference attribute features.

[0348] In step E2, the importance of the second interfering attribute feature is determined to be a first threshold corresponding to the candidate attribute feature belonging to the continuous variable.

[0349] Exemplarily, if the number of second interference attribute features is 1, the first threshold corresponding to the candidate attribute feature belonging to the continuous variable is the importance of the second interference attribute feature; exemplary, if the number of second interference attribute features is greater than 1, the first threshold corresponding to the candidate attribute feature belonging to the continuous variable can be the average of the importance of multiple second interference attribute features.

[0350] Exemplarily, accordingly, step A26 specifically includes the following steps F1 and / or step F2.

[0351] In step F1, the attribute feature whose importance is greater than a first threshold corresponding to the candidate attribute feature belonging to the discrete variable is obtained from a plurality of candidate attribute features belonging to the discrete variable.

[0352] In step F2, the attribute feature whose importance is greater than a first threshold corresponding to the candidate attribute feature belonging to the continuous variable is obtained from a plurality of candidate attribute features belonging to the continuous variable.

[0353] It is understandable that due to the different processes of determining the split points for discrete variables and continuous variables, there are certain differences when training the boosted tree model, so the importance of the first interfering attribute feature may be different from the importance of the second interfering attribute feature. In order to obtain all non-interfering items from multiple candidate attribute features belonging to discrete variables, and to obtain all non-interfering items from multiple candidate attribute features belonging to continuous variables, thereby training a more accurate user dependence prediction model, the method shown in the above steps F1 and / or F2 is provided.

[0354] In an optional implementation, in order to make the trained boosted tree model more accurate, that is, the importance of multiple candidate attribute features and the importance of interference attribute features are relatively accurate, it is required that the above multiple candidate attribute features do not have multicollinearity. Multicollinearity refers to the situation where the machine learning model estimation is distorted or difficult to estimate accurately due to the existence of precise correlation or high correlation between multiple candidate attribute features for training the machine learning model. Based on this, the embodiment of the present disclosure also provides a method for obtaining multiple candidate attribute features, which includes the following steps G1 to G2 during implementation.

[0355] In step G1, a plurality of undetermined attribute features are obtained.

[0356] The plurality of candidate attribute features are screened from the plurality of pending attribute features. Exemplarily, the number of the plurality of pending attribute features is greater than or equal to the number of the plurality of candidate attribute features.

[0357] Exemplarily, the method for acquiring multiple undetermined attribute features includes the following steps G11 to G13.

[0358] In step G11, a plurality of original attribute features are obtained.

[0359] In step G12, a plurality of derived attribute features are obtained, where the derived attribute features are derived from at least one of the original attribute features.

[0360] In step G13, it is determined that the plurality of original attribute features and the plurality of derived attribute features are respectively the to-be-determined attribute features.

[0361] For a description of original and derived attribute features, see Figure 1 The description will not be repeated here.

[0362] In step G2, a plurality of linearly independent undetermined attribute features among the plurality of undetermined attribute features are determined as the candidate attribute features.

[0363] Exemplarily, there are many methods for checking whether multiple undetermined attribute features are linearly correlated. The embodiments of the present disclosure provide but are not limited to the following two methods: the first method is to check through tolerance; the second method is to check through variance inflation factor (VIF).

[0364] In an optional implementation, the following steps G3 to G4 are also included.

[0365] In step G3, if the multiple undetermined attribute features include multiple linearly correlated undetermined attribute features, at least one undetermined attribute feature among the multiple linearly correlated undetermined attribute features is removed, and the linearly independent target undetermined attribute feature is retained.

[0366] Exemplarily, for multiple linearly correlated pending attribute features, one or more of the multiple linearly correlated pending attribute features can be deleted, so that the remaining one or more pending attribute features are linearly independent, and the remaining one or more pending attribute features are target pending attribute features.

[0367] In step G4, the target undetermined attribute feature is determined as the candidate attribute feature.

[0368] Exemplarily, if the preset at least one interference attribute feature includes multiple interference attribute features, the multiple interference attribute features should also be linearly independent. Exemplarily, the preset interference attribute feature and the multiple candidate attribute features are linearly independent.

[0369] In the disclosed embodiment, since the multiple candidate attribute features are linearly independent, the trained importance prediction model is more accurate.

[0370] In an optional implementation, after obtaining candidate data sets of multiple sample user accounts, there may be a situation where the attribute values ​​of one or more candidate attribute features included in the candidate data sets of one or more sample user accounts are missing or abnormal.

[0371] Exemplarily, situations in which the attribute value of a candidate attribute feature is abnormal include but are not limited to the following two: first, the attribute value of the candidate attribute feature exceeds the normal range of the candidate attribute feature. For example, if the candidate attribute feature is the total time for viewing an object within a preset time period, if the attribute value of the candidate attribute feature is greater than the preset time period, then the attribute value is an abnormal value; second, the attribute value of the candidate attribute feature contained in the candidate data set of the sample user account is much larger than the attribute value of the candidate attribute feature contained in the candidate data sets of other sample user accounts. For example, if the candidate attribute feature is the total number of collected objects within a preset time period, the attribute value of the candidate attribute feature contained in the candidate data set of sample user account A is 100,000, and the attribute values ​​of the candidate attribute feature contained in the candidate data sets of other sample user accounts all belong to the range of [100,500], then the attribute value of the candidate attribute feature contained in the candidate data set of sample user account A is an abnormal value.

[0372] Exemplarily, in the case where the attribute value of a candidate attribute feature is missing or abnormal, a value can be assigned to the candidate attribute feature. For example, the mean value of the attribute value of the candidate attribute feature contained in the candidate data set of multiple sample user accounts can be assigned to the candidate attribute feature with a missing attribute value or an abnormal attribute value.

[0373] Exemplarily, if the candidate data set of a sample user account contains candidate attribute features with missing attribute values ​​or abnormal attribute values, the candidate data set of the sample user account can be deleted, that is, the sample user account is not used as a training sample for the training model.

[0374] In an optional implementation, in the embodiment of the present disclosure, a plurality of candidate attribute features without multicollinearity are obtained from a plurality of pending attribute features; and a plurality of attribute features whose importance is greater than a first threshold are obtained from the plurality of candidate attribute features. A sample data set of a plurality of sample user accounts is obtained, and the sample data set includes attribute values ​​of the plurality of attribute features. In an optional implementation, if there is an attribute feature whose sample data set of a sample user account among the sample data sets of a plurality of sample user accounts is missing an attribute value or has an abnormal attribute value, the sample user account can be deleted, or a corresponding value can be assigned. Therefore, the sample data set of a plurality of sample user accounts obtained in the embodiment of the present disclosure can better characterize the degree of demand for electronic resources of the sample user accounts, and the user type prediction model trained based on the sample data set of a plurality of sample user accounts is more accurate.

[0375] The training process of the user dependence prediction model is explained below. The training process includes: combining sample data of multiple sample user accounts as input of the machine learning model, taking the labeled user types corresponding to the multiple sample user accounts as training targets, and training to obtain a user type prediction model.

[0376] Exemplarily, the process of training a machine learning model involves at least one of the techniques in machine learning, such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and method-based learning.

[0377] Exemplarily, the machine learning model may be any one of a neural network model, a logistic regression model, a linear regression model, a support vector machine (SVM), an Adaboost, a boosted tree model, and a Transformer-Encoder model.

[0378] Exemplarily, the neural network model can be any one of a recurrent neural network-based model, a convolutional neural network-based model, and a Transformer-encoder-based classification model.

[0379] Exemplarily, the machine learning model may be a deep hybrid model of a recurrent neural network-based model, a convolutional neural network-based model, and a Transformer-encoder-based classification model.

[0380] Exemplarily, the machine learning model can be any one of an attention-based deep model, a memory network-based deep model, and a short text classification model based on deep learning.

[0381] The short text classification model based on deep learning is a recurrent neural network (RNN) or a convolutional neural network (CNN) or a variant based on the recurrent neural network or the convolutional neural network.

[0382] For example, some simple domain adaptation modifications can be made on the pre-trained model to obtain a machine learning model.

[0383] Exemplarily, “simple domain adaptation” includes but is not limited to re-pre-training an already pre-trained model using large-scale unsupervised domain corpus, and / or compressing an already pre-trained model by model distillation.

[0384] Exemplarily, the process of training the machine learning model can be supervised learning. Exemplarily, the machine learning model can also be semi-supervised. Semi-supervised learning is a learning method that combines supervised learning with unsupervised learning. Semi-supervised learning uses a large amount of unlabeled data and labeled data at the same time to perform pattern recognition.

[0385] In summary, the importance of the attribute feature represents the degree of reduction in the sum of the probabilities of the at least two data sets after the attribute feature is used to divide multiple sample user accounts into at least two data sets. It can be understood that the greater the importance of the attribute feature, the greater the degree of reduction in the sum of the probabilities of the at least two data sets obtained by using the attribute feature. However, it is not certain which user type the attribute feature makes the sample user account tend to be, for example, user type 1 or user type 0. Based on this, if the user type prediction model is a logistic regression model, the embodiment of the present disclosure also provides the following steps H1 to H3. Exemplarily, if the user type prediction model is not a logistic regression model, the logistic regression model can be trained according to the method for training the user type prediction model to obtain the user type prediction model mentioned in steps H1 to H3.

[0386] In step H1, the influence degree of the attribute feature is obtained based on the user type prediction model.

[0387] The degree of influence represents the type of user whose user account tends to be affected by the attribute feature.

[0388] Exemplarily, the sign of the influence degree represents the influence of the attribute feature on the user type that the user account tends to become, and the absolute value of the influence degree represents the degree to which the attribute feature influences the user account to become the corresponding user type.

[0389] Exemplarily, assuming that user type 1 represents a user type whose demand for electronic resources is higher than a preset threshold, and user type 0 represents a user type whose demand for electronic resources is lower than or equal to a preset threshold, then a positive influence of the attribute feature represents that the attribute feature affects the user account to tend to become user type 1, and a negative influence of the attribute feature represents that the attribute feature affects the user account to tend to become user type 0. If the influence of the attribute feature is positive, and the absolute value of the influence is large, then the attribute feature affects the user account to a greater extent to become user type 1. If the influence of the attribute feature is positive, and the absolute value of the influence is small, then the attribute feature affects the user account to a lesser extent to become user type 1. If the influence of the attribute feature is negative, and the absolute value of the influence is large, then the attribute feature affects the user account to a greater extent to become user type 0. If the influence of the attribute feature is negative, and the absolute value of the influence is small, then the attribute feature affects the user account to a lesser extent to become user type 0.

[0390] In an optional implementation, the user type prediction model is a logistic regression model, and the influence degree corresponding to the attribute feature may be the logistic regression coefficient of the attribute feature.

[0391] In an optional implementation, the user type prediction model is a logistic regression model, and the influence degree corresponding to the attribute feature may be a ratio of the logistic regression coefficient of the attribute feature to the standard error corresponding to the attribute feature.

[0392] Among them, the standard error corresponding to the attribute feature is used to measure the accuracy of the logistic regression coefficient of the attribute feature. For example, if the standard error corresponding to the attribute feature is larger, the accuracy of the logistic regression coefficient of the attribute feature is lower.

[0393] It can be understood that the odds ratio of the logistic regression coefficient of the attribute feature to the standard error corresponding to the attribute feature represents the change in the deviation of the user type prediction model after adding or deleting the attribute feature, and also represents the contribution level of the attribute feature to eliminating the confusion of the user type prediction model.

[0394] In an optional implementation, a corresponding function may be used to obtain the logistic regression coefficients corresponding to the multiple attribute features and the standard errors corresponding to the multiple attribute features from the user type prediction model. Exemplarily, the function coef() or summary() may be used to obtain the logistic regression coefficients corresponding to the multiple attribute features and the standard errors corresponding to the multiple attribute features.

[0395] In step H2, a target attribute feature whose absolute value of influence degree is greater than or equal to a second threshold is obtained from the attribute features.

[0396] Exemplarily, the second threshold may be determined based on actual conditions, which will not be elaborated here.

[0397] In step H3, change rule information is obtained, where the change rule information represents the association between the marked user type of the user account and the target attribute feature.

[0398] Exemplarily, the attribute values ​​of the target attribute features corresponding to the multiple sample user accounts may be plotted into a curve along with the change rule information of the labeled user types of the multiple sample user accounts.

[0399] Exemplarily, the inflection point of the curve may be obtained, and based on the attribute value corresponding to the inflection point, a method of guiding the user account to transform into a user type with a lower demand for electronic resources may be determined.

[0400] Exemplarily, the user account may be guided to convert from user type 1 to user type 0 based on the change rule information.

[0401] Assuming that there are multiple target attribute features, and the multiple target attribute features are age and viewing time, it can be known from the change pattern information of the attribute values ​​of age and viewing time corresponding to multiple sample user accounts with the labeled user types of multiple sample user accounts that most of the sample user accounts whose viewing time is afternoon and whose age attribute values ​​are youth or middle-aged belong to user type 0.

[0402] Exemplarily, the method of guiding a user account (a sample user account or a user account to be tested) to be transformed into a user type with a lower demand for electronic resources is: guiding the user account to log in to the client and view the object in the afternoon as much as possible.

[0403] For example, a user can log in to a client based on a user account and view an object in the afternoon, and obtain more electronic resources than a user can log in to a client and view an object in the morning. Alternatively, a user can log in to a client and view an object in the afternoon without advertisements and other preferential measures.

[0404] Assuming that the target attribute feature is the total number of authors who follow the production object within a preset time period, based on the change pattern information of the attribute values ​​of the total number of authors who follow the production object within the preset time period corresponding to multiple sample user accounts and the labeled user types of multiple sample user accounts, it can be known that most of the user accounts whose total number of authors who follow the production object within the preset time period is greater than or equal to the threshold B belong to user type 0.

[0405] Exemplarily, the method of guiding a user account (a sample user account or a user account to be tested) to transform into a user type with a lower demand for electronic resources is as follows: obtaining user accounts whose total number of authors who follow objects produced in a preset time period is lower than a threshold value B; obtaining object type A that the user account is interested in; and recommending authors who produce objects belonging to object type A. In this way, the total number of authors followed by the user account in the preset time period is equal to or higher than the threshold value B, so that the user account transforms into user type 0.

[0406] The user type prediction model obtained by the user type prediction model training method provided in the embodiment of the present application can be applied to the resource allocation method. Figure 5 As shown, it is a flowchart of the resource allocation method provided in an embodiment of the present application. The method can be applied in a server. The method involves the following steps S51 to S53 during implementation.

[0407] It is understandable that the server for training the user type prediction model and the server for resource allocation may be the same server or different servers.

[0408] In step S51, a data set to be tested of the user account to be tested is obtained, wherein the data set to be tested includes attribute values ​​of attribute features corresponding to the user account to be tested.

[0409] For the description of the test data set for the user account to be tested, please refer to the description of the sample data set for the sample user account.

[0410] In an optional implementation, the process of obtaining the data set to be tested of the user account to be tested includes the following steps J1 to J5.

[0411] In step J1, the attribute values ​​of a plurality of original attribute features corresponding to the user account to be tested are obtained.

[0412] Exemplarily, multiple original attribute features corresponding to the sample user account can be referred to to obtain multiple original attribute features corresponding to the user account to be tested, that is, the multiple original attribute features corresponding to the sample user account are the multiple original attribute features corresponding to the user account to be tested.

[0413] In step J2, based on the attribute values ​​of the multiple original attribute features corresponding to the user account to be tested, the attribute values ​​of multiple derived attribute features are obtained, where the derived attribute features are derived from at least one of the original attribute features.

[0414] The method for calculating the derived attribute characteristics corresponding to the user account to be tested is the same as the method for calculating the derived attribute characteristics corresponding to the sample user account, and will not be repeated here.

[0415] In step J3, attribute values ​​of a plurality of preset candidate attribute features are screened out from the attribute values ​​of the plurality of original attribute features and the attribute values ​​of the plurality of derived attribute features, and the plurality of preset candidate attribute features are linearly independent.

[0416] Exemplarily, since a plurality of linearly independent candidate attribute features have been determined from a plurality of pending attribute features (the plurality of original attribute features and the plurality of derived attribute features are respectively the pending attribute features) through the candidate data set of a large number of sample user accounts, that is, it is known which candidate attribute features are linearly independent, so in step J3, a plurality of linearly independent candidate attribute features can be found from the plurality of pending attribute features.

[0417] Multicollinearity refers to the situation where the user type prediction model estimation is distorted or difficult to estimate accurately due to the existence of precise correlation or high correlation between multiple candidate attribute features input into the user type prediction model. Based on this, the method of the embodiment of the present disclosure obtains multiple linearly independent candidate attribute features, thereby improving the accuracy of the user type output by the user type prediction model.

[0418] In step J4, the importance levels respectively corresponding to the plurality of candidate attribute features are obtained from the preset correspondence relationship between the candidate attribute features and the importance levels.

[0419] It can be understood that the importance levels of multiple candidate attribute features have been obtained through the candidate data sets of a large number of sample user accounts, so the importance levels corresponding to the candidate attribute features can be stored. When executing step J4, the importance levels corresponding to multiple candidate attribute features can be found from the pre-stored correspondence between candidate attribute features and importance levels.

[0420] In step J5, attribute values ​​of attribute features whose importance is greater than or equal to the first threshold are screened out from the attribute values ​​of multiple candidate attribute features.

[0421] The method for determining the first threshold value can be found in the method for determining the first threshold value involved in the description of the sample user account, which will not be repeated here.

[0422] If the importance of a candidate attribute feature is less than or equal to the first threshold, it means that the candidate attribute feature has no effect on determining which user type the user account to be tested belongs to. If a set of test data containing candidate attribute features whose importance is less than or equal to the first threshold is used as the input of the user type prediction model, not only will the accuracy of the user type output by the user type prediction model not be improved, but the amount of data processed by the user type prediction model will also increase. Therefore, multiple attribute features whose importance is greater than the first threshold are screened out from multiple candidate attribute features, and the set of test data containing only multiple attribute features is used as the input of the user type prediction model, which greatly reduces the amount of data processed by the user type prediction model and improves the accuracy of the user type output by the user type prediction model.

[0423] In step S52, the data set to be tested is input into a user type prediction model, and the user type of the user account to be tested is obtained through the user type prediction model.

[0424] The user type prediction model is trained using the steps described in any of the above-mentioned user type prediction model training method embodiments.

[0425] In step S53, electronic resources are allocated to the user account to be tested based on the user type of the user account to be tested.

[0426] Exemplarily, there are multiple ways to implement allocating electronic resources to the user account to be tested based on the user type of the user account to be tested. The embodiment of the present application provides but is not limited to the following method, which includes the following steps Q1 to Q2.

[0427] In step Q1, the target electronic resource allocation policy corresponding to the user type and activity level information of the user account to be tested is searched from the preset correspondence relationship between the user type, activity level information and the electronic resource allocation policy.

[0428] In step Q2, resources are allocated to the user account to be tested according to the target electronic resource allocation policy.

[0429] There are many ways to store the correspondence between the preset user type, activity level information and the electronic resource allocation strategy, such as a function, a linked list, or a table. The following is an explanation using a table as an example, as shown in Table 5.

[0430] Table 5 Preset correspondence table

[0431]

[0432] Table 5 is illustrated by taking two user types as an example, namely user type 1 and user type 0. Different user types correspond to M activity information. The same activity information under different user types corresponds to different electronic resource allocation strategies. For example, the electronic resource allocation strategy A1 corresponding to the activity information 1 corresponding to user type 1 is different from the electronic resource allocation strategy B1 corresponding to the activity information 1 corresponding to user type 0.

[0433] The activity level information is described below.

[0434] Exemplarily, the activity level information includes, but is not limited to: one or more of: the cumulative number of days that the user account to be tested is active within a preset time period and the cumulative number of days that the user account to be tested is continuously active within the preset time period.

[0435] Exemplarily, within one day, if the total duration of running a client with a user account to be tested and logged in is greater than or equal to a preset threshold value A, it is determined that the user account to be tested is in an active state on that day.

[0436] Exemplarily, if the same client has two or more versions, for example, an express version and a main site version, exemplary, the user account to be tested used by the user to be tested in different versions of the same client is the same, or, the user account to be tested used by the user to be tested in different versions of the same client is different, but the user accounts to be tested used in different versions of the same client are associated.

[0437] Exemplarily, the total time duration of running a client with the user account to be tested logged in may include: the total time duration of running at least one version of a client with the same user account to be tested (or an associated user account to be tested) logged in.

[0438] The following example illustrates the electronic resource allocation strategy.

[0439] In an optional implementation, the electronic resource allocation strategy includes the maximum number of electronic resources that can be allocated corresponding to each level, and the difference between the maximum numbers of electronic resources corresponding to two temporally adjacent levels.

[0440] Exemplarily, the duration corresponding to each level may be 1 day, 2 days, etc.

[0441] Exemplarily, the difference between the maximum numbers of electronic resources corresponding to two temporally adjacent levels may be a positive value or a negative value.

[0442] The following example illustrates the electronic resource allocation strategy, where one level is one day, the total number of levels included in the electronic resource allocation strategy is 5, and the difference in the maximum number of electronic resources corresponding to two adjacent levels is a negative value. The maximum number of electronic resources that a user account can obtain per day decreases as the number of days increases, until the number of days accumulates to the fifth day, when the maximum number of electronic resources that the user account can obtain per day no longer changes.

[0443] Exemplarily, user accounts with different demands for electronic resources may have different electronic resource allocation strategies corresponding to the same activity level information. The different electronic resource allocation strategies may be manifested in at least one of the following aspects: different maximum numbers corresponding to the same level, different differences in the maximum numbers of electronic resources corresponding to two temporally adjacent levels, and different total numbers of levels included in the electronic resource allocation strategies.

[0444] Each aspect is described below. The maximum numbers corresponding to the same level are different. For example, the maximum number A1 corresponding to level A1 included in the electronic resource allocation strategy A1 is different from the maximum number B1 corresponding to level A1 included in the electronic resource allocation strategy B1. Assuming that the user account represented by user type 1 has a higher demand for electronic resources than the user account represented by user type 0, the maximum number A1 is greater than the maximum number B1.

[0445] The difference in the maximum number of electronic resources corresponding to two temporally adjacent levels is different. For example, the difference A12 in the maximum number corresponding to temporally adjacent levels A1 and A2 included in the electronic resource allocation strategy A1 is different from the difference A21 in the maximum number corresponding to levels A1 and A2 included in the electronic resource allocation strategy B1. Assume that the demand for electronic resources by the user account represented by user type 1 is higher than the demand for electronic resources by the user account represented by user type 0. For example, if the difference in the maximum number of electronic resources corresponding to two temporally adjacent levels is a negative value, the absolute value of the difference A12 is smaller than the absolute value of the difference A21; if the difference in the maximum number of electronic resources corresponding to two temporally adjacent levels is a positive value, the absolute value of the difference A12 is larger than the absolute value of the difference A21.

[0446] The maximum number corresponding to the same level is different. For example, the maximum number corresponding to level A1 included in electronic resource allocation policy A1 is different from the maximum number corresponding to level A1 included in electronic resource allocation policy B1. Assuming that the demand for electronic resources by the user account represented by user type 1 is higher than the demand for electronic resources by the user account represented by user type 0, the maximum number corresponding to level A1 included in electronic resource allocation policy A1 is greater than the maximum number corresponding to level A1 included in electronic resource allocation policy B1.

[0447] In summary, for user accounts with different demands for electronic resources, if the activity information of the user accounts is the same, the user account with a higher demand for electronic resources will obtain more electronic resources than the user account with a lower demand for electronic resources.

[0448] In the disclosed embodiment, since the user type of the user account to be tested obtained by the user type prediction model is relatively accurate, the electronic resources allocated to the user account to be tested based on the user type of the user account to be tested will be more matched with the user's needs, thereby significantly improving the stability of the user. Exemplarily, a smaller number of electronic resources are allocated to user accounts with a lower demand for electronic resources, and a larger number of electronic resources are allocated to user accounts with a higher demand for electronic resources. For users with a higher demand for electronic resources, since the number of allocated electronic resources is large, in order to obtain more electronic resources, they will increase their own activity, thereby improving the stickiness of the user and reducing the loss of the user. Fewer electronic resources are allocated to users with a lower demand for electronic resources. Since the amount of electronic resources has a smaller impact on the stickiness of the user, or even has no impact on the stickiness of the user, the user will not become a lost user, and the additional expenditure on electronic resources is reduced.

[0449] In the embodiment of the present application, since the user type prediction model obtained through training is relatively accurate, the user type of the user account to be tested obtained based on the user type prediction model is relatively accurate, so allocating electronic resources to the user account to be tested based on the user type of the user account to be tested is more in line with the needs of the user account to be tested.

[0450] In an optional implementation, since the change rule information has been obtained, the user account to be tested can be guided to become a user type with a lower demand for electronic resources based on the user type of the user account to be tested. For example, if the user account to be tested is a user type with a demand for electronic resources higher than or equal to a preset threshold, the change rule information can be used to control the user account to be tested to change to a user type with a demand for electronic resources lower than the preset threshold.

[0451] Exemplarily, the attribute values ​​of the target attribute features corresponding to the multiple sample user accounts may be plotted into a curve along with the change rule information of the labeled user types of the multiple sample user accounts.

[0452] Exemplarily, the inflection point of the curve may be obtained, and based on the attribute value corresponding to the inflection point, a method of guiding the user account to transform into a user type with a lower demand for electronic resources may be determined.

[0453] The following example illustrates "controlling the user account to be tested to change to a user type whose demand for electronic resources is lower than the preset threshold through the change rule information".

[0454] Exemplarily, if the user type of the user account to be tested is a user type whose demand for electronic resources is higher than or equal to a preset threshold, the indicator attribute characteristics are determined through the change rule information.

[0455] Among them, the indicator attribute characteristics include a first target attribute characteristic and / or a second target attribute characteristic, the first target attribute characteristic is a target attribute characteristic that affects the tendency of the user account to be tested to be a user type with a demand for electronic resources lower than the preset threshold, and the attribute value of the first target attribute characteristic of the user account to be tested is lower than the preset third threshold, the second target attribute characteristic is a target attribute characteristic that affects the tendency of the user account to be tested to be a user type with a demand for electronic resources higher than or equal to the preset threshold, and the attribute value of the second target attribute characteristic of the user account to be tested is higher than the preset fourth threshold.

[0456] Exemplarily, different first target attribute features correspond to different third thresholds; exemplary, different second target attribute features correspond to different fourth thresholds.

[0457] Exemplarily, the third threshold is related to the attribute values ​​of the first target attribute feature respectively corresponding to a plurality of sample user accounts belonging to a user type whose demand for electronic resources is lower than the preset threshold.

[0458] For example, the third threshold is the average of the attribute values ​​of the first target attribute feature respectively corresponding to a plurality of sample user accounts belonging to a user type whose demand for electronic resources is lower than the preset threshold.

[0459] For example, the attribute values ​​of the target attribute characteristics corresponding to multiple sample user accounts of the user type whose demand for electronic resources is lower than the preset threshold can be plotted into a curve; and the value corresponding to the inflection point of the curve is determined as the third threshold.

[0460] Exemplarily, the fourth threshold is related to the attribute values ​​of the second target attribute feature respectively corresponding to a plurality of sample user accounts belonging to a user type whose demand for electronic resources is higher than or equal to the preset threshold.

[0461] For example, the fourth threshold is the average of the attribute values ​​of the second target attribute feature respectively corresponding to a plurality of sample user accounts belonging to a user type whose demand for electronic resources is higher than or equal to the preset threshold.

[0462] For example, the attribute values ​​of the target attribute characteristics corresponding to multiple sample user accounts of the user type whose demand for electronic resources is higher than or equal to the preset threshold can be plotted into a curve; and the value corresponding to the inflection point of the curve is determined as the fourth threshold.

[0463] The following example illustrates the process of determining the indicator attribute characteristics.

[0464] Assume that the number of target attribute characteristics obtained is multiple, and the multiple target attribute characteristics are: the total number of collection objects within a preset time period, the total number of viewed objects within a preset time period, the type of viewed objects within a preset time period, the number of times users visit the electronic resource page within the preset time period, and the total number of times the first type of electronic resources are exchanged for the second type of electronic resources within the preset time period.

[0465] If the attribute values ​​of multiple target attribute features corresponding to multiple sample user accounts change with the marked user types of multiple sample user accounts through the change law information: the attribute value of the total number of collection objects within the preset time period is greater than or equal to threshold C, the attribute value of the total number of objects viewed within the preset time period is greater than or equal to threshold D, and the attribute value of the type of the viewed objects within the preset time period includes the supernatural type, the sample user account belongs to user type 0; if the attribute value of the number of times the user visits the electronic resource page within the preset time period is greater than or equal to threshold E, and the attribute value of the total number of times the first type of electronic resources are exchanged for the second type of electronic resources within the preset time period is greater than or equal to threshold F, the sample user account belongs to user type 1.

[0466] If the user type of the user account to be tested is a user type whose demand for electronic resources is higher than or equal to the preset threshold. The attribute value of the total number of objects collected by the user account to be tested within the preset time period is value A, the attribute value of the total number of objects viewed within the preset time period is value B, and the attribute value of the type of the objects viewed within the preset time period includes the supernatural type. If value A is less than threshold C, and value B is less than threshold D, the total number of objects collected within the preset time period and the total number of objects viewed within the preset time period can be determined as the first target attribute feature.

[0467] If the attribute value of the number of times the user visits the electronic resource page within the preset time period of the user account to be tested is a value C, and the attribute value of the total number of times the first type of electronic resources are exchanged for the second type of electronic resources within the preset time period is a value D, and the value C is higher than the threshold E, and the value D is higher than the threshold F, then the number of times the user visits the electronic resource page within the preset time period and the total number of times the first type of electronic resources are exchanged for the second type of electronic resources within the preset time period can be determined as the second target attribute feature.

[0468] It is understandable that, for the user account to be tested, after the indicator attribute characteristics are determined, the indicator attribute characteristics can be used to guide the user account to be tested to change from user type 1 to user type 0.

[0469] For example, guiding the total number of objects collected by the user account under test within a preset time period to increase from value A or even exceed threshold C; guiding the total number of objects viewed by the user account under test within a preset time period to increase from value B or even exceed threshold D; guiding the number of times the user visits the electronic resource page within the preset time period to decrease from value C or even be less than threshold E; guiding the total number of times the user account under test exchanges the first type of electronic resources for the second type of electronic resources within the preset time period to decrease from threshold D to threshold F or a value less than threshold F.

[0470] The methods are described in detail in the above embodiments of the present disclosure. The methods provided in the embodiments of the present disclosure can be implemented using various forms of devices. Therefore, the present application also discloses various devices. Specific embodiments are given below for detailed description.

[0471] Figure 6 is a block diagram of a user type prediction model training device according to an exemplary embodiment. The device includes: a first acquisition module 61, a second acquisition module 62, a third acquisition module 63 and a training module 64.

[0472] The first acquisition module 61 is configured to acquire importances corresponding to a plurality of candidate attribute features, respectively, wherein the importances corresponding to the candidate attribute features represent the degree to which the candidate attribute features affect the user's demand for electronic resources, and the candidate attribute features include any one of a behavior feature representing the user account's usage behavior for the client and an electronic resource allocation feature representing the client's allocation of electronic resources to the user account;

[0473] A second acquisition module 62 is configured to obtain the attribute feature whose importance is greater than or equal to the first threshold from the multiple candidate attribute features;

[0474] A third acquisition module 63 is configured to acquire sample data sets corresponding to a plurality of sample user accounts respectively, wherein the sample data sets include attribute values ​​of the attribute features corresponding to the sample user accounts;

[0475] The training module 64 is configured to use the sample data sets corresponding to multiple sample user accounts as the input of the machine learning model, and the annotated user types corresponding to the multiple sample user accounts as the training targets, and train to obtain the user type prediction model, wherein the annotated user types of the sample user accounts are the degree of demand for electronic resources by the sample user accounts.

[0476] In an optional implementation, the first acquisition module is specifically configured as follows:

[0477] A first acquisition unit is configured to acquire candidate data sets corresponding to a plurality of sample user accounts respectively, wherein the candidate data sets include attribute values ​​of a plurality of candidate attribute features corresponding to the sample user accounts;

[0478] A first training unit is configured to use the candidate data sets corresponding to the multiple sample user accounts as inputs of the boosted tree model, use the annotated user types corresponding to the multiple sample user accounts as training targets, and train to obtain an importance prediction model, wherein the importance prediction model includes a decision tree, the decision tree includes non-leaf nodes and leaf nodes, the non-leaf nodes are associated with the candidate attribute features, and the leaf nodes are associated with the annotated user types;

[0479] The second acquisition unit is configured to obtain the importance levels respectively corresponding to the multiple candidate attribute features based on the decision tree included in the importance prediction model.

[0480] In an optional implementation, the first acquisition module is specifically configured as follows:

[0481] A third acquisition unit is configured to acquire a plurality of candidate attribute features and at least one preset interference attribute feature, wherein the interference attribute feature is a feature that is irrelevant to the degree of demand for the electronic resource by the user account;

[0482] a fourth acquisition unit, configured to acquire candidate data sets corresponding to a plurality of sample user accounts respectively, wherein the candidate data sets of the sample user accounts include attribute values ​​of a plurality of candidate attribute features corresponding to the sample user accounts and an attribute value of the at least one interference attribute feature;

[0483] A second training unit is configured to use the candidate data sets corresponding to the multiple sample user accounts as inputs of the boosted tree model, use the annotated user types corresponding to the multiple sample user accounts as training targets, and train to obtain an importance prediction model, wherein the importance prediction model includes a decision tree, the decision tree includes a first non-leaf node, a second non-leaf node, and a leaf node, the first non-leaf node is associated with the candidate attribute feature, the second non-leaf node is associated with the interference attribute feature, and the leaf node is associated with the annotated user type;

[0484] The fifth acquisition unit is configured to obtain the importance levels corresponding to the plurality of candidate attribute features and the importance level corresponding to the interference attribute feature based on the decision tree included in the importance prediction model.

[0485] In an optional implementation, the second acquisition module is specifically configured as follows:

[0486] A sixth acquisition unit is configured to obtain the first threshold based on the importance of the interference attribute feature;

[0487] The seventh acquisition unit is configured to obtain the attribute feature whose importance is greater than the first threshold from the plurality of candidate attribute features.

[0488] In an optional implementation manner, the attribute feature is set to the candidate attribute feature or the interference attribute feature, and the second acquisition unit or the fifth acquisition unit is specifically configured to:

[0489] A first acquisition subunit is configured to obtain a target non-leaf node associated with the set attribute feature from a decision tree included in the importance prediction model;

[0490] A second acquisition subunit is configured to obtain a first value, wherein the first value represents a probability corresponding to a data set of the target non-leaf node, wherein the data set of the target non-leaf node includes a plurality of sample user accounts, and the probability corresponding to the data set is a probability that the annotated user types respectively corresponding to the plurality of sample user accounts included in the data set do not belong to the same annotated user type;

[0491] A third acquisition subunit is configured to obtain a second value, wherein the second value is the sum of probabilities of data sets corresponding to child nodes of the target non-leaf node, and the sample user accounts contained in the data set corresponding to each child node are sample user accounts in the data set of the target non-leaf node that meet the corresponding set conditions associated with the set attribute feature, and different child nodes correspond to different set conditions;

[0492] The first determining subunit is configured to determine the difference between the first value and the second value as the importance of the set attribute feature.

[0493] In an optional implementation, the at least one interference attribute feature includes a first interference attribute feature corresponding to a candidate attribute feature belonging to a discrete variable and / or a second interference attribute feature corresponding to a candidate attribute feature belonging to a continuous variable; the seventh acquisition unit is specifically configured to:

[0494] a fourth acquisition subunit, configured to obtain, from a plurality of candidate attribute features belonging to the discrete variable, the attribute feature whose importance is greater than a first threshold corresponding to the candidate attribute feature belonging to the discrete variable, the first threshold corresponding to the candidate attribute feature belonging to the discrete variable being the importance of the first interference attribute feature; and / or,

[0495] The fifth acquisition subunit is configured to obtain the attribute feature whose importance is greater than a first threshold corresponding to the candidate attribute feature belonging to the continuous variable from multiple candidate attribute features belonging to the continuous variable, and the first threshold corresponding to the candidate attribute feature belonging to the continuous variable is the importance of the second interference attribute feature.

[0496] In an optional implementation, the method further includes:

[0497] A fourth acquisition module is configured to acquire a plurality of undetermined attribute features;

[0498] The first determining module is configured to determine a plurality of linearly independent undetermined attribute features among a plurality of undetermined attribute features as the candidate attribute features.

[0499] In an optional implementation, the method further includes:

[0500] A screening module is configured to remove at least one of the multiple linearly correlated undetermined attribute features if the multiple undetermined attribute features include multiple linearly correlated undetermined attribute features, and retain the linearly independent target undetermined attribute feature;

[0501] The second determination module is configured to determine the target undetermined attribute feature as the candidate attribute feature.

[0502] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0503] Figure 7 It is a block diagram showing a resource allocation device according to an exemplary embodiment. The device includes: a fifth acquisition module 71, a sixth acquisition module 72 and a resource allocation module 73.

[0504] The fifth acquisition module 71 is configured to acquire a test data set of the test user account, wherein the test data set includes attribute values ​​of attribute features corresponding to the test user account.

[0505] The sixth acquisition module 72 is configured to input the data set to be tested into a user type prediction model, and obtain the user type of the user account to be tested through the user type prediction model, wherein the user type prediction model is trained using any of the user type prediction model training methods.

[0506] The resource allocation module 73 is configured to allocate electronic resources to the user account to be tested based on the user type of the user account to be tested.

[0507] In an optional implementation, the fifth acquisition module is specifically configured as follows:

[0508] a tenth obtaining unit, configured to obtain attribute values ​​of a plurality of original attribute features corresponding to the user account to be tested;

[0509] an eleventh obtaining unit, configured to obtain attribute values ​​of a plurality of derived attribute features based on the attribute values ​​of the plurality of original attribute features corresponding to the user account to be tested, wherein the derived attribute features are derived from at least one of the original attribute features;

[0510] A first screening unit is configured to screen out attribute values ​​of a plurality of preset candidate attribute features from the attribute values ​​of the plurality of original attribute features and the attribute values ​​of the plurality of derived attribute features, wherein the plurality of preset candidate attribute features are linearly independent;

[0511] A twelfth obtaining unit is configured to obtain the importance levels respectively corresponding to the plurality of candidate attribute features from a preset correspondence relationship between the candidate attribute features and the importance levels;

[0512] The second screening unit is configured to screen out the attribute values ​​of the attribute features whose importance is greater than or equal to the first threshold from the attribute values ​​of the plurality of candidate attribute features.

[0513] In an optional implementation, the user type prediction model is a logistic regression model, and the resource allocation device further includes:

[0514] A seventh acquisition module is configured to obtain the influence degree of the attribute feature based on the user type prediction model, wherein the influence degree represents the user type to which the attribute feature affects the user account tendency;

[0515] An eighth acquisition module is configured to obtain a target attribute feature whose influence degree is greater than or equal to a second threshold from the attribute features;

[0516] a ninth acquisition module, configured to acquire change rule information, wherein the change rule information represents an association between a marked user type of a user account and the target attribute feature;

[0517] The control module is configured to determine the indicator attribute characteristics through the change rule information if the user type of the user account to be tested is a user type whose demand for electronic resources is higher than or equal to a preset threshold;

[0518] Among them, the indicator attribute characteristics include a first target attribute characteristic and / or a second target attribute characteristic, the first target attribute characteristic is a target attribute characteristic that affects the tendency of the user account to be tested to be a user type with a demand for electronic resources lower than the preset threshold, and the attribute value of the first target attribute characteristic of the user account to be tested is lower than the preset third threshold, the second target attribute characteristic is a target attribute characteristic that affects the tendency of the user account to be tested to be a user type with a demand for electronic resources higher than or equal to the preset threshold, and the attribute value of the second target attribute characteristic of the user account to be tested is higher than the preset fourth threshold.

[0519] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0520] Figure 8 It is a block diagram for a server according to an exemplary embodiment, wherein the server is used to execute the above-mentioned user type prediction model training method and / or the above-mentioned resource allocation method.

[0521] like Figure 8As shown, the server includes but is not limited to: a processor 801 , a memory 802 , a network interface 803 , an I / O controller 804 , and a communication bus 805 .

[0522] It should be noted that those skilled in the art can understand that Figure 8 The server structure shown in the figure does not constitute a limitation on the server, and the server may include Figure 8 More or fewer components may be shown, or certain components may be combined, or the components may be arranged differently.

[0523] Combine the following Figure 8 The components of the server 11 are described in detail:

[0524] The processor 801 is the control center of the server. It uses various interfaces and lines to connect various parts of the entire server. It executes various functions of the server and processes data by running or executing software programs and / or modules stored in the memory 802, and calling data stored in the memory 802, so as to monitor the server as a whole. The processor 801 may include one or more processing units; optionally, the processor 801 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 801.

[0525] The processor 801 may be a central processing unit (CPU), or an application specific integrated circuit ASIC (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention, etc.;

[0526] The memory 802 may include a memory, such as a high-speed random access memory (RAM) 8021 and a read-only memory (ROM) 8022, and may also include a large-capacity storage device 8023, such as at least one disk storage, etc. Of course, the memory 802 may also include hardware required by other services.

[0527] The memory 802 is used to store instructions executable by the processor 801. The processor 801 is configured to execute any step in the embodiment of the method for determining an electronic resource allocation strategy applied to a server.

[0528] A wired or wireless network interface 803 is configured to connect the server 11 to the network.

[0529] The processor 801, the memory 802, the network interface 803 and the I / O controller 804 may be interconnected via a communication bus 805, which may be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc.

[0530] In an exemplary embodiment, the server may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors or other electronic components to execute the above-mentioned electronic resource transmission method.

[0531] In an exemplary embodiment, a computer-readable storage medium including instructions is also provided, such as a memory 802 including instructions, and the instructions can be executed by a processor 801 of a server to complete the above-mentioned user type prediction model training method, and / or the above-mentioned resource allocation method. Optionally, the computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0532] In an exemplary embodiment, a computer program product is also provided, including a computer program / instruction, which, when executed by a processor, implements the above-mentioned user type prediction model training method and / or the above-mentioned resource allocation method.

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

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

Claims

1. A user type prediction model training method, characterized in that: include: Obtaining importance levels respectively corresponding to a plurality of candidate attribute features, wherein the importance levels corresponding to the candidate attribute features represent the degree to which the candidate attribute features affect the demand of the user account for electronic resources, wherein the candidate attribute features include behavioral features representing the usage behavior of the user account for the client, and electronic resource allocation features representing the electronic resources allocated to the user account, wherein the behavioral features representing the usage behavior of the user account for the client include: viewing behavior features representing the viewing behavior for the object displayed by the client, social behavior features representing the social behavior for the object displayed by the client, and production behavior features representing the production behavior for the object displayed by the client; Obtaining an attribute feature whose importance is greater than or equal to a first threshold from the plurality of candidate attribute features; Acquire sample data sets corresponding to a plurality of sample user accounts respectively, wherein the sample data sets include attribute values ​​of the attribute features corresponding to the sample user accounts; The sample data sets corresponding to multiple sample user accounts are taken as the input of the machine learning model, and the annotated user types corresponding to the multiple sample user accounts are taken as the training targets. The user type prediction model is obtained through training. The annotated user types of the sample user accounts are the degree of demand for electronic resources by the sample user accounts.

2. The user type prediction model training method according to claim 1, characterized in that: The step of obtaining the importance levels corresponding to the plurality of candidate attribute features comprises: Acquire candidate data sets corresponding to a plurality of sample user accounts respectively, wherein the candidate data sets include attribute values ​​of a plurality of candidate attribute features corresponding to the sample user accounts; The candidate data sets corresponding to the multiple sample user accounts are taken as inputs of the boosted tree model, and the annotated user types corresponding to the multiple sample user accounts are taken as training targets, and an importance prediction model is obtained through training, wherein the importance prediction model includes a decision tree, and the decision tree includes non-leaf nodes and leaf nodes, wherein the non-leaf nodes are associated with the candidate attribute features, and the leaf nodes are associated with the annotated user types; Based on the decision tree included in the importance prediction model, the importance levels respectively corresponding to the multiple candidate attribute features are obtained.

3. The user type prediction model training method according to claim 1, characterized in that: The step of obtaining the importance levels corresponding to the plurality of candidate attribute features comprises: Acquire a plurality of candidate attribute features and at least one preset interference attribute feature, wherein the interference attribute feature is a feature that is irrelevant to the degree of demand for electronic resources by the user account; Acquire candidate data sets corresponding to a plurality of sample user accounts respectively, wherein the candidate data sets of the sample user accounts include attribute values ​​of a plurality of candidate attribute features corresponding to the sample user accounts and an attribute value of the at least one interference attribute feature; The candidate data sets corresponding to the multiple sample user accounts are taken as inputs of the boosted tree model, and the annotated user types corresponding to the multiple sample user accounts are taken as training targets, and an importance prediction model is obtained through training, wherein the importance prediction model includes a decision tree, and the decision tree includes a first non-leaf node, a second non-leaf node, and a leaf node, wherein the first non-leaf node is associated with the candidate attribute feature, the second non-leaf node is associated with the interference attribute feature, and the leaf node is associated with the annotated user type; Based on the decision tree included in the importance prediction model, the importance levels corresponding to the plurality of candidate attribute features and the importance level corresponding to the interference attribute feature are obtained.

4. According to the user type prediction model training method of claim 3, the step of obtaining the attribute feature whose importance is greater than or equal to the first threshold from the multiple candidate attribute features comprises: Based on the importance of the interference attribute feature, obtaining the first threshold; The attribute feature whose importance is greater than the first threshold is obtained from the plurality of candidate attribute features.

5. The user type prediction model training method according to claim 2, characterized in that: The step of setting an attribute feature as the candidate attribute feature and obtaining the importance of the set attribute feature based on the decision tree included in the importance prediction model comprises: Obtaining a target non-leaf node associated with the set attribute feature from a decision tree included in the importance prediction model; Obtaining a first value, where the first value represents a probability corresponding to a data set of the target non-leaf node, where the data set of the target non-leaf node includes multiple sample user accounts, and the probability corresponding to the data set is a probability that the annotated user types respectively corresponding to the multiple sample user accounts included in the data set do not belong to the same annotated user type; Obtaining a second value, where the second value is the sum of the probabilities of the data sets corresponding to the child nodes of the target non-leaf node, where the sample user accounts contained in the data set corresponding to each child node are sample user accounts in the data set of the target non-leaf node that meet the corresponding set conditions associated with the set attribute feature, and different child nodes correspond to different set conditions; The difference between the first value and the second value is determined as the importance of the set attribute feature.

6. The user type prediction model training method according to claim 3, characterized in that: The attribute feature is set as the candidate attribute feature or the interference attribute feature, and the step of obtaining the importance of the set attribute feature based on the decision tree included in the importance prediction model includes: Obtaining a target non-leaf node associated with the set attribute feature from a decision tree included in the importance prediction model; Obtaining a first value, where the first value represents a probability corresponding to a data set of the target non-leaf node, where the data set of the target non-leaf node includes multiple sample user accounts, and the probability corresponding to the data set is a probability that the annotated user types respectively corresponding to the multiple sample user accounts included in the data set do not belong to the same annotated user type; Obtaining a second value, where the second value is the sum of the probabilities of the data sets corresponding to the child nodes of the target non-leaf node, where the sample user accounts contained in the data set corresponding to each child node are sample user accounts in the data set of the target non-leaf node that meet the corresponding set conditions associated with the set attribute feature, and different child nodes correspond to different set conditions; The difference between the first value and the second value is determined as the importance of the set attribute feature.

7. The user type prediction model training method according to claim 4, characterized in that: The at least one interference attribute feature includes a first interference attribute feature corresponding to a candidate attribute feature belonging to a discrete variable and / or a second interference attribute feature corresponding to a candidate attribute feature belonging to a continuous variable; The step of obtaining the attribute feature whose importance is greater than the first threshold from the plurality of candidate attribute features comprises: From a plurality of candidate attribute features belonging to discrete variables, obtain the attribute feature whose importance is greater than a first threshold corresponding to the candidate attribute feature belonging to the discrete variable, the first threshold corresponding to the candidate attribute feature belonging to the discrete variable being the importance of the first interfering attribute feature; and / or, From multiple candidate attribute features belonging to the continuous variable, the attribute feature whose importance is greater than a first threshold corresponding to the candidate attribute feature belonging to the continuous variable is obtained, and the first threshold corresponding to the candidate attribute feature belonging to the continuous variable is the importance of the second interference attribute feature.

8. The user type prediction model training method according to any one of claims 1, 2, 3, 4 or 7, characterized in that: The steps of obtaining multiple candidate attribute features include: Get multiple pending attribute features; A plurality of linearly independent undetermined attribute features among the plurality of undetermined attribute features are determined as the candidate attribute features.

9. The user type prediction model training method according to claim 8, characterized in that: The step of determining a plurality of linearly independent undetermined attribute features among a plurality of undetermined attribute features as the candidate attribute features comprises: If the multiple undetermined attribute features include multiple linearly correlated undetermined attribute features, remove at least one undetermined attribute feature from the multiple linearly correlated undetermined attribute features, and retain the linearly independent target undetermined attribute feature; The target undetermined attribute feature is determined as the candidate attribute feature.

10. A resource allocation method, characterized in that: include: Acquire a data set to be tested of the user account to be tested, wherein the data set to be tested includes attribute values ​​of attribute features corresponding to the user account to be tested; Inputting the data set to be tested into a user type prediction model, obtaining the user type of the user account to be tested through the user type prediction model, wherein the user type prediction model is trained using the user type prediction model training method according to any one of claims 1 to 9; Based on the user type of the user account to be tested, electronic resources are allocated to the user account to be tested.

11. The resource allocation method according to claim 10, characterized in that: The step of obtaining a test data set of the test user account includes: Obtaining attribute values ​​of multiple original attribute features corresponding to the user account to be tested; Based on the attribute values ​​of the multiple original attribute features corresponding to the user account to be tested, obtaining the attribute values ​​of multiple derived attribute features, wherein the derived attribute features are derived from at least one of the original attribute features; Filtering out attribute values ​​of a plurality of preset candidate attribute features from the attribute values ​​of the plurality of original attribute features and the attribute values ​​of the plurality of derived attribute features, wherein the plurality of preset candidate attribute features are linearly independent; Obtaining the importance levels respectively corresponding to the plurality of candidate attribute features from the preset correspondence relationship between the candidate attribute features and the importance levels; From the attribute values ​​of the plurality of candidate attribute features, the attribute values ​​of the attribute features whose importance is greater than or equal to the first threshold are screened out.

12. The resource allocation method according to claim 10 or 11, characterized in that: The user type prediction model is a logistic regression model, and the resource allocation method further includes: Based on the user type prediction model, obtaining the influence degree of the attribute feature, the influence degree represents the user type that the attribute feature affects the user account tendency; Obtaining a target attribute feature from the attribute features whose influence degree is greater than or equal to a second threshold; Acquire change rule information, where the change rule information represents the association between the marked user type of the user account and the target attribute feature; If the user type of the user account to be tested is a user type with a demand for electronic resources higher than or equal to a preset threshold, determining the indicator attribute characteristics through the change rule information; Among them, the indicator attribute characteristics include a first target attribute characteristic and / or a second target attribute characteristic, the first target attribute characteristic is a target attribute characteristic that affects the tendency of the user account to be tested to be a user type with a demand for electronic resources lower than the preset threshold, and the attribute value of the first target attribute characteristic of the user account to be tested is lower than the preset third threshold, the second target attribute characteristic is a target attribute characteristic that affects the tendency of the user account to be tested to be a user type with a demand for electronic resources higher than or equal to the preset threshold, and the attribute value of the second target attribute characteristic of the user account to be tested is higher than the preset fourth threshold.

13. A user type prediction model training device, characterized in that: include: A first acquisition module is configured to acquire importances corresponding to a plurality of candidate attribute features, respectively, wherein the importances corresponding to the candidate attribute features represent the degree to which the candidate attribute features affect the user's demand for electronic resources, wherein the candidate attribute features include any one of a behavior feature representing the user account's usage behavior for a client, and an electronic resource allocation feature representing the client's allocation of electronic resources to the user account, wherein the behavior feature representing the user account's usage behavior for a client includes: a viewing behavior feature representing the viewing behavior for an object displayed by the client, a social behavior feature representing the social behavior for an object displayed by the client, and a production behavior feature representing the production behavior for an object displayed by the client; A second acquisition module is configured to obtain the attribute feature whose importance is greater than or equal to the first threshold from the multiple candidate attribute features; A third acquisition module is configured to acquire sample data sets corresponding to a plurality of sample user accounts respectively, wherein the sample data sets include attribute values ​​of the attribute features corresponding to the sample user accounts; The training module is configured to use the sample data sets corresponding to multiple sample user accounts as the input of the machine learning model, and the annotated user types corresponding to the multiple sample user accounts as the training targets, and train to obtain the user type prediction model, wherein the annotated user types of the sample user accounts are the degree of demand for electronic resources by the sample user accounts.

14. The user type prediction model training device according to claim 13, characterized in that: The first acquisition module is specifically configured as follows: A first acquisition unit is configured to acquire candidate data sets corresponding to a plurality of sample user accounts respectively, wherein the candidate data sets include attribute values ​​of a plurality of candidate attribute features corresponding to the sample user accounts; A first training unit is configured to use the candidate data sets corresponding to the multiple sample user accounts as inputs of the boosted tree model, use the annotated user types corresponding to the multiple sample user accounts as training targets, and train to obtain an importance prediction model, wherein the importance prediction model includes a decision tree, the decision tree includes non-leaf nodes and leaf nodes, the non-leaf nodes are associated with the candidate attribute features, and the leaf nodes are associated with the annotated user types; The second acquisition unit is configured to obtain the importance levels respectively corresponding to the plurality of candidate attribute features based on the decision tree included in the importance prediction model.

15. The user type prediction model training device according to claim 13, characterized in that: The first acquisition module is specifically configured as follows: A third acquisition unit is configured to acquire a plurality of candidate attribute features and at least one preset interference attribute feature, wherein the interference attribute feature is a feature that is irrelevant to the degree of demand for the electronic resource by the user account; a fourth acquisition unit, configured to acquire candidate data sets corresponding to a plurality of sample user accounts respectively, wherein the candidate data sets of the sample user accounts include attribute values ​​of a plurality of candidate attribute features corresponding to the sample user accounts and an attribute value of the at least one interference attribute feature; A second training unit is configured to use the candidate data sets corresponding to the multiple sample user accounts as inputs of the boosted tree model, use the annotated user types corresponding to the multiple sample user accounts as training targets, and train to obtain an importance prediction model, wherein the importance prediction model includes a decision tree, the decision tree includes a first non-leaf node, a second non-leaf node, and a leaf node, the first non-leaf node is associated with the candidate attribute feature, the second non-leaf node is associated with the interference attribute feature, and the leaf node is associated with the annotated user type; The fifth acquisition unit is configured to obtain the importance levels corresponding to the plurality of candidate attribute features and the importance level corresponding to the interference attribute feature based on the decision tree included in the importance prediction model.

16. The user type prediction model training device according to claim 15, characterized in that: The second acquisition module is specifically configured as follows: A sixth acquisition unit is configured to obtain the first threshold based on the importance of the interference attribute feature; The seventh acquisition unit is configured to obtain the attribute feature whose importance is greater than the first threshold from the plurality of candidate attribute features.

17. The user type prediction model training device according to claim 14, characterized in that: The attribute feature is set as the candidate attribute feature, and the second acquisition unit is specifically configured to: A first acquisition subunit is configured to obtain a target non-leaf node associated with the set attribute feature from a decision tree included in the importance prediction model; A second acquisition subunit is configured to obtain a first value, wherein the first value represents a probability corresponding to a data set of the target non-leaf node, wherein the data set of the target non-leaf node includes a plurality of sample user accounts, and the probability corresponding to the data set is a probability that the annotated user types respectively corresponding to the plurality of sample user accounts included in the data set do not belong to the same annotated user type; A third acquisition subunit is configured to obtain a second value, wherein the second value is the sum of probabilities of data sets corresponding to child nodes of the target non-leaf node, and the sample user accounts contained in the data set corresponding to each child node are sample user accounts in the data set of the target non-leaf node that meet the corresponding set conditions associated with the set attribute feature, and different child nodes correspond to different set conditions; The first determining subunit is configured to determine the difference between the first value and the second value as the importance of the set attribute feature.

18. The user type prediction model training device according to claim 15, characterized in that: The attribute feature is set to be the candidate attribute feature or the interference attribute feature, and the fifth acquisition unit is specifically configured to: A first acquisition subunit is configured to obtain a target non-leaf node associated with the set attribute feature from a decision tree included in the importance prediction model; A second acquisition subunit is configured to obtain a first value, wherein the first value represents a probability corresponding to a data set of the target non-leaf node, wherein the data set of the target non-leaf node includes a plurality of sample user accounts, and the probability corresponding to the data set is a probability that the annotated user types respectively corresponding to the plurality of sample user accounts included in the data set do not belong to the same annotated user type; A third acquisition subunit is configured to obtain a second value, wherein the second value is the sum of probabilities of data sets corresponding to child nodes of the target non-leaf node, and the sample user accounts contained in the data set corresponding to each child node are sample user accounts in the data set of the target non-leaf node that meet the corresponding set conditions associated with the set attribute feature, and different child nodes correspond to different set conditions; The first determining subunit is configured to determine the difference between the first value and the second value as the importance of the set attribute feature.

19. The user type prediction model training device according to claim 16, characterized in that: The at least one interference attribute feature includes a first interference attribute feature corresponding to a candidate attribute feature belonging to a discrete variable and / or a second interference attribute feature corresponding to a candidate attribute feature belonging to a continuous variable; the seventh acquisition unit is specifically configured as follows: a fourth acquisition subunit, configured to obtain, from a plurality of candidate attribute features belonging to the discrete variable, the attribute feature whose importance is greater than a first threshold corresponding to the candidate attribute feature belonging to the discrete variable, the first threshold corresponding to the candidate attribute feature belonging to the discrete variable being the importance of the first interference attribute feature; and / or, The fifth acquisition subunit is configured to obtain the attribute feature whose importance is greater than a first threshold corresponding to the candidate attribute feature belonging to the continuous variable from multiple candidate attribute features belonging to the continuous variable, and the first threshold corresponding to the candidate attribute feature belonging to the continuous variable is the importance of the second interference attribute feature.

20. The user type prediction model training device according to any one of claims 13, 14, 15, 16 or 19, characterized in that: Also includes: A fourth acquisition module is configured to acquire a plurality of undetermined attribute features; The first determining module is configured to determine a plurality of linearly independent undetermined attribute features among a plurality of undetermined attribute features as the candidate attribute features.

21. The user type prediction model training device according to claim 20, characterized in that: Also includes: A screening module is configured to remove at least one of the multiple linearly correlated undetermined attribute features if the multiple undetermined attribute features include multiple linearly correlated undetermined attribute features, and retain the linearly independent target undetermined attribute feature; The second determination module is configured to determine the target undetermined attribute feature as the candidate attribute feature.

22. A resource allocation device, characterized in that: include: A fifth acquisition module is configured to acquire a set of test data of the user account to be tested, wherein the set of test data includes attribute values ​​of attribute features corresponding to the user account to be tested; A sixth acquisition module is configured to input the test data set into a user type prediction model, and obtain the user type of the test user account through the user type prediction model, wherein the user type prediction model is trained using the user type prediction model training method according to any one of claims 1 to 9; The resource allocation module is configured to allocate electronic resources to the user account to be tested based on the user type of the user account to be tested.

23. The resource allocation device according to claim 22, characterized in that: The fifth acquisition module is specifically configured as follows: a tenth obtaining unit, configured to obtain attribute values ​​of a plurality of original attribute features corresponding to the user account to be tested; an eleventh obtaining unit, configured to obtain attribute values ​​of a plurality of derived attribute features based on the attribute values ​​of the plurality of original attribute features corresponding to the user account to be tested, wherein the derived attribute features are derived from at least one of the original attribute features; A first screening unit is configured to screen out attribute values ​​of a plurality of preset candidate attribute features from the attribute values ​​of the plurality of original attribute features and the attribute values ​​of the plurality of derived attribute features, wherein the plurality of preset candidate attribute features are linearly independent; A twelfth obtaining unit is configured to obtain the importance levels respectively corresponding to the plurality of candidate attribute features from a preset correspondence relationship between the candidate attribute features and the importance levels; The second screening unit is configured to screen out the attribute values ​​of the attribute features whose importance is greater than or equal to the first threshold from the attribute values ​​of the plurality of candidate attribute features.

24. The resource allocation device according to claim 22 or 23, characterized in that: The user type prediction model is a logistic regression model, and the resource allocation device further includes: A seventh acquisition module is configured to obtain the influence degree of the attribute feature based on the user type prediction model, wherein the influence degree represents the user type to which the attribute feature affects the user account tendency; An eighth acquisition module is configured to obtain a target attribute feature whose influence degree is greater than or equal to a second threshold from the attribute features; a ninth acquisition module, configured to acquire change rule information, wherein the change rule information represents an association between a marked user type of a user account and the target attribute feature; The control module is configured to determine the indicator attribute characteristics through the change rule information if the user type of the user account to be tested is a user type whose demand for electronic resources is higher than or equal to a preset threshold; Among them, the indicator attribute characteristics include a first target attribute characteristic and / or a second target attribute characteristic, the first target attribute characteristic is a target attribute characteristic that affects the tendency of the user account to be tested to be a user type with a demand for electronic resources lower than the preset threshold, and the attribute value of the first target attribute characteristic of the user account to be tested is lower than the preset third threshold, the second target attribute characteristic is a target attribute characteristic that affects the tendency of the user account to be tested to be a user type with a demand for electronic resources higher than or equal to the preset threshold, and the attribute value of the second target attribute characteristic of the user account to be tested is higher than the preset fourth threshold.

25. A server, characterized in that: include: processor; a memory for storing instructions executable by the processor; Wherein, the processor is configured to execute the instructions to implement the user type prediction model training method as described in any one of claims 1 to 9, or to implement the resource allocation method as described in any one of claims 10 to 12.

26. A computer-readable storage medium, when the instructions in the computer-readable storage medium are executed by a processor of a server, enables the server to execute the user type prediction model training method as described in any one of claims 1 to 9, or enables the server to execute the resource allocation method as described in any one of claims 10 to 12.

27. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instruction is executed by the processor, the user type prediction model training method described in any one of claims 1 to 9 is implemented, or, when the computer program / instruction is executed by the processor, the resource allocation method described in any one of claims 10 to 12 is implemented.

Citation Information

Patent Citations

  • A method of prediction model based on random forest algorithm

    AU2020100709A4

  • User identification method and device, apparatus and storage medium

    CN111459922A