Feature discretization method, click rate prediction method, electronic device, and storage medium

By using the Gini index to determine the partitioning position of continuous features and the number of discretized feature sets in the click-through rate prediction model, the problem of inaccurate feature values ​​after discretization of continuous features is solved, thus improving the accuracy of click-through rate prediction.

CN116166944BActive Publication Date: 2026-05-29MICRO DREAM TECHTRONIC NETWORK TECH CHINACO

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
MICRO DREAM TECHTRONIC NETWORK TECH CHINACO
Filing Date
2023-02-09
Publication Date
2026-05-29

Smart Images

  • Figure CN116166944B_ABST
    Figure CN116166944B_ABST
Patent Text Reader

Abstract

The application discloses a feature discretization method, a click rate prediction method, an electronic device and a storage medium. The feature discretization method comprises the following steps: obtaining a sample set, wherein the sample set comprises a plurality of continuous features; determining at least one division position, wherein the division position is used for dividing the plurality of continuous features into two sample subsets; determining a Gini index of the two sample subsets for each division position; and determining a discretized feature set after discretization of the sample set according to a preset number of the discretized feature set and the Gini index corresponding to each division position. The embodiment of the application solves the problem of low accuracy of the discretized features when the continuous features are discretized in the related art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of data processing technology, specifically relating to a feature discretization method, a click-through rate prediction method, an electronic device, and a storage medium. Background Technology

[0002] In social media scenarios, recommendation systems suggest content that users might be interested in, thereby encouraging them to click and enter the application. Click-through rate (CTR) prediction is a crucial step in any recommendation system, and CTR prediction models forecast the probability of a user clicking through to the application. During the CTR prediction process, feature processing, especially the processing of continuous features, often determines the accuracy of the CTR prediction. Compared to directly feeding continuous features into the CTR prediction model, discretized continuous features are more robust to outliers, thus improving the accuracy of the CTR prediction model.

[0003] In related technologies, continuous features are usually discretized by means of equal interval or equal frequency discretization. In this process, the feature values ​​are first sorted, then the corresponding equal interval / equal frequency split points are found for the feature values, and the range of continuous values ​​is divided according to the split points.

[0004] However, discretization methods such as equidistant or equal-frequency discretization are prone to problems such as similar continuous features becoming different feature values ​​after discretization, or dissimilar feature values ​​becoming the same feature value after discretization. Summary of the Invention

[0005] This application provides a feature discretization method, a click-through rate prediction method, an electronic device, and a storage medium to solve the problem of low accuracy of discretized features when discretizing continuous features in related technologies.

[0006] In a first aspect, embodiments of this application provide a feature discretization method, including:

[0007] Obtain a sample set, which includes multiple consecutive features;

[0008] Determine at least one partitioning position, wherein the partitioning position is used to divide the plurality of consecutive features into two sample subsets;

[0009] For each of the aforementioned partition positions, the Gini index of the two sample subsets is determined;

[0010] The discretized feature set of the sample set is determined based on the number of pre-set discretized feature sets and the Gini index corresponding to each of the partition positions.

[0011] Secondly, embodiments of this application provide a click-through rate prediction method, including:

[0012] Obtain user category features and continuous features;

[0013] Based on the number of discretized feature sets and the target discretized feature set corresponding to the continuous feature, a first vector representation of the continuous feature is determined; wherein the discretized feature set is obtained by the method described in the first aspect, and the target discretized feature set is one of the discretized feature sets;

[0014] A second vector representation corresponding to the category feature is determined, and the first vector representation and the second vector representation are input into a pre-set click-through rate prediction model to obtain the click-through rate prediction result output by the click-through rate prediction model.

[0015] Thirdly, embodiments of this application further provide a feature discretization apparatus, including:

[0016] An acquisition module is used to acquire a sample set, wherein the sample set includes multiple continuous features and the labels corresponding to the continuous features;

[0017] A first determining module is configured to determine at least one partitioning position, wherein the partitioning position is used to divide the plurality of continuous features into two sample subsets;

[0018] The second determining module is used to determine the Gini index of the two sample subsets for each of the division positions;

[0019] The third determining module is used to determine the discretized feature set of the sample set after discretization based on the number of pre-set discretized feature sets and the Gini index corresponding to each of the division positions.

[0020] Fourthly, embodiments of this application further provide a click-through rate prediction device, comprising:

[0021] The acquisition module is used to acquire the user's category features and continuous features;

[0022] A determining module is configured to determine a first vector representation of the continuous feature based on the number of discretized feature sets and the target discretized feature set corresponding to the continuous feature; wherein the discretized feature set is obtained by the method described in the first aspect, and the target discretized feature set is one of the discretized feature sets; and determine a second vector representation corresponding to the category feature;

[0023] The prediction module is used to input the first vector representation and the second vector representation into a pre-set click-through rate prediction model to obtain the click-through rate prediction result output by the click-through rate prediction model.

[0024] Fifthly, embodiments of this application provide an electronic device including a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the method described in the first or second aspect.

[0025] In a sixth aspect, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first or second aspect.

[0026] The feature discretization method provided in this application obtains a sample set, which includes multiple continuous features, and determines at least one partitioning position. The partitioning position is used to divide the multiple continuous features into two sample subsets. For each partitioning position, a Gini index is determined for the two sample subsets. Based on a pre-set number of discretized feature sets and the Gini index corresponding to each partitioning position, a discretized feature set after discretization of the sample set is determined. This achieves discretization of continuous features using the Gini index. Since a smaller Gini index indicates a lower probability of incorrect selection of samples in the set, meaning a higher purity of the set, and vice versa, the Gini index avoids the problem of similar continuous feature values ​​becoming different feature values ​​after discretization, or dissimilar feature values ​​becoming the same feature value after discretization, thus ensuring the accuracy of the discretized feature set. Attached Figure Description

[0027] Figure 1 This is a flowchart illustrating the feature discretization method in an embodiment of this application;

[0028] Figure 2 This is a flowchart illustrating the click-through rate prediction method in the embodiments of this application;

[0029] Figure 3 This is a schematic diagram of the feature discretization device in the embodiments of this application;

[0030] Figure 4 This is a schematic diagram of the click-through rate prediction device in the embodiments of this application;

[0031] Figure 5 This is a schematic diagram of the structure of the electronic device provided in the embodiments of this application. Detailed Implementation

[0032] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0033] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0034] The method for producing props provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.

[0035] Figure 1 An embodiment of the present invention provides a feature discretization method, which can be executed by an electronic device, including a server and / or a terminal device. In other words, the method can be executed by software or hardware installed on the electronic device, and includes the following steps:

[0036] Step 101: Obtain a sample set, which includes multiple continuous features.

[0037] Specifically, continuous features refer to features that can be obtained arbitrarily within a certain length, and their values ​​are uninterrupted, meaning that the number of continuous features may be infinite.

[0038] For example, a user's height and weight are both continuous features.

[0039] The label corresponding to a continuous feature refers to the attribute result corresponding to that continuous feature. For example, suppose a continuous feature is used to predict whether a user likes sports, then the label corresponding to the continuous feature is "likes sports" or "dislikes sports". In one example, suppose the label corresponding to the continuous feature "height 175 cm" is "likes sports" and the label corresponding to the continuous feature "height 170 cm" is "dislikes sports", then the sample set can be [(170.2, 0), (170.4, 0), (175.3, 1), (175.5, 1)], where 170.2, 170.4, 175.3, and 175.5 represent height, 0 represents the label "dislikes sports", and 1 represents the label "likes sports".

[0040] Step 102: Determine at least one partitioning position, wherein the partitioning position is used to divide the plurality of consecutive features into two sample subsets.

[0041] Specifically, the determined split positions can divide multiple continuous features into two sample subsets.

[0042] This step can determine at least one partitioning position, such as one or more partitioning positions, and each partitioning position is used to divide the sample set into two sample subsets. That is, each partitioning position corresponds to two sample subsets. If the two sample subsets obtained by each partitioning position are a partition combination, then the sample set can be divided into different combinations by determining different partitioning positions.

[0043] For example, continuing the example above, assuming the sample set is [(170.2, 0), (170.4, 0), (175.3, 1), (175.5, 1)], if there are 2 partitioning positions, where the partitioning position is between the first and second continuous features, then this partitioning position will divide multiple continuous features into sample subsets [(170.2, 0)] and [(170.4, 0), (175.3, 1), (175.5, 1)]; and where the partitioning position is between the second and third continuous features, then this partitioning position will divide multiple continuous features into sample subsets [(170.2, 0), (170.4, 0)] and [(175.3, 1), (175.5, 1)].

[0044] Step 103: For each of the said partition positions, determine the Gini index of the two sample subsets.

[0045] Specifically, the Gini index represents the probability that a randomly selected sample in a set will be misclassified. A smaller Gini index indicates a lower probability of misclassification, meaning the set is more pure; conversely, a larger Gini index indicates a less pure set. When all samples in the set belong to the same class, the Gini index is 0.

[0046] When determining the Gini index of two sample subsets for each split position, it can be calculated using the following formula:

[0047]

[0048] Where Gini(D) represents the Gini index of the sample subset, y represents the number of categories of labels in the sample set, i.e., the number of categories of labels corresponding to all continuous features, and p k This represents the probability that a subset of samples belongs to the k-th category label.

[0049] In this way, by determining the Gini index of the sample subset obtained by each partitioning position, it becomes possible to determine the probability that the selected sample in the sample subset is incorrectly selected when partitioning at each partitioning position.

[0050] Step 104: Determine the discretized feature set after discretizing the sample set according to the number of pre-set discretized feature sets and the Gini index corresponding to each of the partition positions.

[0051] The number of pre-set discretization feature sets can be set according to actual needs, such as two or more, and there is no specific limit to this.

[0052] Since each partition position corresponds to a Gini index, and the Gini index represents the probability that a randomly selected sample in the sample set will be misclassified, i.e., the probability of misclassification at each partition position, after determining the number of discretized feature sets to be partitioned, determining the discretized feature sets after discretizing the sample set based on the number of discretized feature sets and the Gini index corresponding to each partition position can reduce the probability of misclassification of the determined discretized feature sets, thereby ensuring the accuracy of the determined discretized feature sets.

[0053] Furthermore, this application can employ different methods when determining at least one dividing position. In one embodiment, to ensure the integrity of the calculated Gini index, i.e., to obtain the Gini index for any dividing method, the position between every two adjacent consecutive features among the plurality of consecutive features can be determined as the dividing position when determining at least one dividing position.

[0054] Specifically, the position between any two adjacent consecutive features in a set of multiple consecutive features is determined as the splitting position. That is, M consecutive features correspond to M-1 splitting positions, meaning any position after each consecutive feature can be used as a splitting point. For example, continuing the previous example, assuming the sample set is [(170.2, 0), (170.4, 0), (175.3, 1), (175.5, 1)], and the position between any two adjacent consecutive features is a splitting position, then: Firstly, the splitting position is between the first and second consecutive features, thus dividing the multiple consecutive features into sample subsets [(170.2, 0)] and [(170.4, 0), (175.3, 1), (175.5, 1)]; Secondly, the splitting position... If the position is between the second and third continuous features, then this partitioning position will divide multiple continuous features into sample subsets [(170.2, 0), (170.4, 0)] and [(175.3, 1), (175.5, 1)]; if the third partitioning position is between the third and fourth continuous features, then this partitioning position will divide multiple continuous features into sample subsets [(170.2, 0), (170.4, 0), (175.3, 1)] and [(175.5, 1)].

[0055] In this way, the sample set is divided into the most varied subsets of samples, thus achieving the ability to obtain the Gini index corresponding to any partitioning method, avoiding the omission of the partitioning method that maximizes the accuracy of the determined discretized feature set.

[0056] In addition, if the amount of data in the sample set is large, in order to speed up the operation efficiency, in one embodiment, the sample set also includes the labels corresponding to the continuous features; when determining at least one partitioning position, adjacent continuous features with the same label can be determined as a feature block according to the label corresponding to the continuous features; the position between every two adjacent feature blocks is determined as the partitioning position.

[0057] Specifically, assuming the sample set is [(170.2, 0), (170.4, 0), (175.3, 1), (175.5, 1)], according to the label corresponding to each continuous feature, it can be seen that the labels of the first and second continuous features are the same, and the labels of the third and fourth continuous features are the same. Therefore, the continuous features (170.2, 0) and (170.4, 0) can be identified as one feature block, and the continuous features (175.3, 1) and (175.5, 1) can be identified as another feature block. Since these two feature blocks are adjacent, the position between these two feature blocks, that is, the position between the second and third continuous features, can be identified as the partitioning position. At this time, the sample set is divided into sample subsets [(170.2, 0), (170.4, 0)] and [(175.3, 1), (175.5, 1)].

[0058] In this way, by determining adjacent continuous features with the same label as a feature block according to the label corresponding to the continuous features, and determining the position between every two adjacent feature blocks as the partitioning position, the similarity of continuous features in each determined feature block is guaranteed, and adjacent continuous features with the same label do not need to be partitioned, thereby reducing the number of partitions, i.e., reducing the number of Gini index calculations, speeding up the computation efficiency when the sample set is large, and ensuring the accuracy of the determined discretized feature set.

[0059] Furthermore, in one embodiment, since the number of pre-set discretization feature sets can be two or more, the discretization feature sets can be determined in different ways depending on the number of discretization feature sets.

[0060] The process of determining the discretized feature set of the sample set after discretization, based on the pre-set number of discretized feature sets and the Gini index corresponding to each partition position, includes:

[0061] When the number of pre-set discretization feature sets is two, the two sample subsets corresponding to the smallest Gini index among the Gini indices corresponding to each division position are determined as the discretization feature sets of the sample sets.

[0062] When the number of pre-set discretization feature sets is greater than two, the first and / or second sample subsets of the two sample subsets obtained in each partitioning are divided according to the pre-set number of discretization feature sets, until the number of sets obtained by partitioning reaches the number of discretization feature sets, wherein the Gini index corresponding to the sample subset obtained in each partitioning process is the smallest.

[0063] Specifically, if the number of discretized feature sets is pre-set to two, after determining the Gini index corresponding to each partition position, the two sample subsets corresponding to the smallest Gini index among all the determined Gini indices are determined as the discretized feature set after discretizing the sample set. Since a smaller Gini index indicates a lower probability that the selected samples in the set are incorrectly selected, that is, a higher purity of the set, it avoids the problem that similar continuous feature values ​​become different feature values ​​after discretization, or dissimilar feature values ​​become the same feature value after discretization. Therefore, determining the two sample subsets corresponding to the smallest Gini index as the discretized feature set after discretizing the sample set improves the accuracy of the determined discretized feature set.

[0064] Furthermore, specifically, if the number of discretized feature sets is preset to be greater than two, then according to the preset number of discretized feature sets, the first sample subset and / or the second sample subset of the two sample subsets obtained each time can be further divided until the number of sets obtained reaches the number of discretized feature sets. The division method is the same as in steps 102 and 103, and the Gini index corresponding to the set obtained in the same division process is the smallest, until the number of sets obtained reaches the number of discretized feature sets, thereby realizing the discretization processing of the sample set of continuous features.

[0065] For example, in one scenario, assuming the number of discretized feature sets is pre-set to four, the sample set is first divided into two subsets during the initial partitioning process. The resulting subsets have the smallest Gini index, minimizing the probability of incorrect partitioning and ensuring accuracy. Then, the first and second subsets from the initial partitioning are further divided. The first subset is divided into two subsets, again with the smallest Gini index. Similarly, the second subset is divided into two subsets, again with the smallest Gini index. This process divides the sample set into four feature sets, ensuring that each feature set has the smallest Gini index, thus guaranteeing the accuracy of the resulting discretized feature sets.

[0066] In this embodiment, by acquiring a sample set including multiple continuous features and their corresponding labels, at least one partitioning position is determined to divide the multiple continuous features into two sample subsets. For each partitioning position, the Gini index of the two sample subsets is determined. Based on the pre-set number of discretized feature sets and the Gini index corresponding to each partitioning position, the discretized feature set after discretization of the sample set is determined. This achieves discretization of continuous features using the Gini index. Since a smaller Gini index indicates a lower probability that the selected sample in the set is incorrectly selected, meaning the set is more pure, and vice versa, the set is less pure, this avoids the problem of similar continuous feature values ​​becoming different feature values ​​after discretization, or dissimilar feature values ​​becoming the same feature value after discretization, thus ensuring the accuracy of the discretized feature set.

[0067] like Figure 2 The diagram shown is a flowchart of the click-through rate prediction method in this embodiment. The method includes the following steps:

[0068] Step 201: Obtain the user's category features and continuous features.

[0069] Specifically, when predicting click-through rates (CTR), a CTR prediction model can be used to estimate the probability of a user clicking on the current information. The input features to this CTR prediction model can be user feature information, which can be categorical or continuous.

[0070] Categorical features refer to features that take values ​​within a limited set of options, and can directly establish the relationship between categorical features and vector representations. For example, categorical features could be gender, age group, etc., while continuous features could be height. In this case, the obtained user features would be (gender, height), such as (gender = male, height = 175.6).

[0071] Step 202: Determine the first vector representation of the continuous feature based on the number of discretized feature sets and the target discretized feature set corresponding to the continuous feature.

[0072] Specifically, the discretized feature set can be determined through the above-described feature discretization method embodiments, and the target discretized feature set is one of the discretized feature sets.

[0073] In click-through rate prediction models, features are typically converted into numerical vectors and input into the model; these vectors are the vector representations of the features.

[0074] In one embodiment, when determining the first vector representation of a continuous feature based on the number of discretized feature sets and the target discretized feature set corresponding to the continuous feature, the vector representation dimension of the continuous feature can be determined based on the number of discretized feature sets, wherein the vector representation dimension is the same as the number of discretized feature sets; the target discretized feature set corresponding to the continuous feature is determined based on the feature value range corresponding to each discretized feature set; and the first vector representation of the continuous feature is determined based on the vector representation dimension of the continuous feature and the target discretized feature set corresponding to the continuous feature.

[0075] Specifically, the vector representation dimension is the same as the number of discretized feature sets. For example, assuming there are 8 discretized feature sets, the vector representation dimension of continuous features can be an 8-dimensional vector.

[0076] Furthermore, each discretized feature set corresponds to a range of feature values. Therefore, we can first determine the range of feature values ​​to which the continuous feature belongs, and thus determine the target discretized feature set corresponding to the continuous feature. For example, assuming the continuous feature is height, where the continuous feature is 171.1, the range of feature values ​​for a discretized feature set can be [170.0-172.0]. Then we can determine that the continuous feature is within the range of feature values ​​of the discretized feature set, and thus determine the discretized feature set as the target discretized feature set corresponding to the continuous feature.

[0077] Specifically, for each continuous feature, when determining the first vector representation of the continuous feature based on its vector representation dimension and the target discretized feature set corresponding to the continuous feature, the numerical value corresponding to the target discretized feature set can be set to be different from the numerical values ​​corresponding to other discretized feature sets. For example, the numerical value corresponding to the target discretized feature set can be set to 1, and the numerical values ​​corresponding to other discretized feature sets can be set to 0. Assuming there are 8 discretized feature sets, i.e., the vector representation dimension is 8, and if the target discretized feature set is the 3rd one, then the first vector representation can be [00100000].

[0078] Step 203: Determine the second vector representation corresponding to the category feature, and input the first vector representation and the second vector representation into a pre-set click-through rate prediction model to obtain the click-through rate prediction result output by the click-through rate prediction model.

[0079] Specifically, since the types of categorical features are limited, the second vector representation corresponding to each categorical feature can be directly determined. Furthermore, the first and second vector representations can be input into a pre-set click-through rate (CTR) prediction model to obtain the CTR prediction result output by the model.

[0080] The click-through rate prediction model can be pre-trained using a sample set including categorical features and a sample set including continuous features in the above embodiments.

[0081] Furthermore, specifically, when inputting the first and second vector representations into a pre-set click-through rate prediction model, feature crossing can be performed. Feature crossing is the cross-combination of features of different types or dimensions. It refers to increasing the nonlinear capability of the model by multiplying two or more features to achieve a nonlinear transformation of the sample space. Essentially, feature crossing is the process of mapping samples from the original space to the feature space using a nonlinear mapping function.

[0082] In another embodiment, the click-through rate prediction result is used to predict the click-through rate of users on a preset application in the client. The click-through rate prediction result output by the click-through rate prediction model can be a score value, which is usually obtained using the sigmoid function.

[0083] Optionally, the click-through rate prediction model may include a multilayer perceptron, a Wide & Deep model, or a DeepFM model.

[0084] Thus, this embodiment obtains the user's category features and continuous features. Based on the number of discretized feature sets and the target discretized feature sets corresponding to the continuous features, it determines the first vector representation of the continuous features. The discretized feature sets are obtained through the aforementioned feature discretization method. Then, it determines the second vector representation corresponding to the category features and inputs the first and second vector representations into a pre-set click-through rate (CTR) prediction model to obtain the CTR prediction result output by the CTR prediction model. Since the discretized feature sets are obtained through the aforementioned feature discretization method, it avoids the problem that similar continuous feature values ​​become different feature values ​​after discretization, or dissimilar feature values ​​become the same feature value after discretization. This ensures the accuracy of the discretized feature sets, thereby ensuring the accuracy of the first vector representation, which in turn ensures the accuracy of the output result of the CTR prediction model, achieving accurate CTR prediction.

[0085] Figure 3 This invention illustrates a feature discretization apparatus according to an embodiment of the present invention, the apparatus comprising:

[0086] Acquisition module 301 is used to acquire a sample set, wherein the sample set includes multiple continuous features;

[0087] The first determining module 302 is used to determine at least one partitioning position, wherein the partitioning position is used to divide the plurality of continuous features into two sample subsets;

[0088] The second determining module 303 is used to determine the Gini index of the two sample subsets for each of the division positions;

[0089] The third determining module 304 is used to determine the discretized feature set of the sample set after discretization based on the number of pre-set discretized feature sets and the Gini index corresponding to each of the partition positions.

[0090] Optionally, the first determining module 302 is specifically used to determine the position between every two adjacent continuous features among the plurality of continuous features as the dividing position.

[0091] Optionally, the sample set may also include labels corresponding to the continuous features;

[0092] The first determining module 302 is specifically used to determine adjacent continuous features with the same label as a feature block according to the label corresponding to the continuous feature; and to determine the position between every two adjacent feature blocks as the division position.

[0093] In one embodiment, the third determining module 304 is used to determine the two sample subsets corresponding to the smallest Gini index among the Gini indices corresponding to each of the partition positions as the discretized feature sets after the sample set is discretized, when the number of pre-set discretized feature sets is two; when the number of pre-set discretized feature sets is greater than two, the first sample subset and / or the second sample subset obtained in each partition are partitioned according to the number of pre-set discretized feature sets, until the number of partitioned sets reaches the number of discretized feature sets, wherein the Gini index corresponding to the sample subset obtained in each partitioning process is the smallest.

[0094] The feature discretization method provided in this application embodiment can achieve... Figure 1 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.

[0095] It should be noted that the embodiments of the feature discretization device in this specification and the embodiments of the feature discretization method in this specification are based on the same inventive concept. Therefore, for specific implementation of the embodiments of the feature discretization device, please refer to the corresponding implementation of the aforementioned embodiments of the feature discretization method. Repeated descriptions will not be repeated.

[0096] also, Figure 4 This invention illustrates a click-through rate prediction device according to an embodiment of the present invention, the device comprising:

[0097] Module 401 is used to acquire the user's category features and continuous features;

[0098] The determining module 402 is used to determine the first vector representation of the continuous feature based on the number of discretized feature sets and the target discretized feature set corresponding to the continuous feature; wherein the discretized feature set is obtained by a feature discretization method, and the target discretized feature set is one of the discretized feature sets; and to determine the second vector representation corresponding to the category feature.

[0099] The prediction module 403 is used to input the first vector representation and the second vector representation into a pre-set click-through rate prediction model to obtain the click-through rate prediction result output by the click-through rate prediction model.

[0100] Optionally, the determining module 402 is specifically configured to: determine the vector representation dimension of the continuous feature based on the number of discretized feature sets, wherein the vector representation dimension is the same as the number of discretized feature sets; determine the target discretized feature set corresponding to the continuous feature based on the feature value range corresponding to each discretized feature set; and determine the first vector representation of the continuous feature based on the vector representation dimension of the continuous feature and the target discretized feature set corresponding to the continuous feature.

[0101] The click-through rate prediction method provided in this application embodiment can achieve... Figure 2 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.

[0102] It should be noted that the embodiments of the click-through rate prediction device in this specification and the embodiments of the click-through rate prediction method in this specification are based on the same inventive concept. Therefore, for specific implementation of the click-through rate prediction device embodiments, please refer to the corresponding implementation of the click-through rate prediction method embodiments described above. Repeated descriptions will not be repeated.

[0103] The feature discretization device or click-through rate prediction device in the embodiments of this application can be a device, or it can be a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. For example, mobile electronic devices can be mobile phones, tablets, laptops, PDAs, in-vehicle electronic devices, wearable devices, ultra-mobile personal computers (UMPCs), netbooks, or personal digital assistants (PDAs), etc., while non-mobile electronic devices can be servers, network attached storage (NAS), personal computers (PCs), televisions (TVs), ATMs, or self-service machines, etc. The embodiments of this application do not impose specific limitations.

[0104] The feature discretization device or click-through rate prediction device in the embodiments of this application can be a device with an operating system. The operating system can be Android, iOS, or other possible operating systems, and this application does not specifically limit it.

[0105] Based on the same technical concept, embodiments of this application also provide an electronic device for performing the aforementioned feature discretization method or click-through rate prediction method. Figure 5 This is a schematic diagram of the structure of an electronic device to implement various embodiments of this application. The electronic device can vary significantly due to differences in configuration or performance, and may include a processor 510, a communications interface 520, a memory 530, and a communication bus 540. The processor 510, communications interface 520, and memory 530 communicate with each other via the communication bus 540. The processor 510 can call a deterministic program stored in the memory 530 and executable on the processor 510 to perform the following steps:

[0106] Obtain a sample set, which includes multiple consecutive features;

[0107] Determine at least one partitioning position, wherein the partitioning position is used to divide the plurality of consecutive features into two sample subsets;

[0108] For each of the aforementioned partition positions, the Gini index of the two sample subsets is determined;

[0109] The discretized feature set of the sample set is determined based on the number of pre-set discretized feature sets and the Gini index corresponding to each of the partition positions.

[0110] In one embodiment, the position between any two adjacent consecutive features among the plurality of consecutive features is determined as the dividing position.

[0111] In one embodiment, the sample set also includes labels corresponding to the continuous features. According to the labels corresponding to the continuous features, adjacent continuous features with the same label are determined as a feature block; the position between every two adjacent feature blocks is determined as the partition position.

[0112] In one embodiment, when there are two preset discretization feature sets, the two sample subsets corresponding to the smallest Gini index among the Gini indices at each partition position are determined as the discretization feature sets after the sample set is discretized; when there are more than two preset discretization feature sets, the first sample subset and / or the second sample subset obtained in each partition are partitioned according to the preset number of discretization feature sets, until the number of partitioned sets reaches the number of discretization feature sets, wherein the Gini index corresponding to the sample subset obtained in each partitioning process is the smallest.

[0113] Alternatively, follow these steps:

[0114] Obtain the user's category features and continuous features; determine the first vector representation of the continuous features based on the number of discretized feature sets and the target discretized feature set corresponding to the continuous features; wherein the discretized feature sets are obtained through feature discretization methods, and the target discretized feature set is one of the discretized feature sets; determine the second vector representation corresponding to the category features, and input the first vector representation and the second vector representation into a pre-set click-through rate prediction model to obtain the click-through rate prediction result output by the click-through rate prediction model.

[0115] In one embodiment, determining the first vector representation of the continuous feature based on the number of discretized feature sets and the target discretized feature set corresponding to the continuous feature includes: determining the vector representation dimension of the continuous feature based on the number of discretized feature sets, wherein the vector representation dimension is the same as the number of discretized feature sets; determining the target discretized feature set corresponding to the continuous feature based on the feature value range corresponding to each discretized feature set; and determining the first vector representation of the continuous feature based on the vector representation dimension of the continuous feature and the target discretized feature set corresponding to the continuous feature.

[0116] In one embodiment, the click-through rate prediction result is used to predict the click-through rate of users on a preset application in the client; the click-through rate prediction model includes a multilayer perceptron, a Wide&Deep model, or a DeepFM model.

[0117] The specific execution steps can be found in the various steps of the above-described feature discretization method or click-through rate prediction method embodiments, and can achieve the same technical effect. To avoid repetition, they will not be repeated here.

[0118] It should be noted that the electronic devices in the embodiments of this application include: servers, terminals, or other devices besides terminals.

[0119] The above electronic device structure does not constitute a limitation on the electronic device. An electronic device may include more or fewer components than illustrated, or combine certain components, or arrange them differently. For example, an input unit may include a Graphics Processing Unit (GPU) and a microphone, and a display unit may use a liquid crystal display (LCD), organic light-emitting diode (OLED), or other similar display panels. User input units include at least one of a touch panel and other input devices. A touch panel is also called a touchscreen. Other input devices may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be elaborated further here.

[0120] Memory can be used to store software programs and various data. Memory can primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area can store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, memory can include volatile memory or non-volatile memory, or both. Non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous linked dynamic random access memory (Synchlink DRAM, SLDRAM), and direct memory bus RAM (DRRAM).

[0121] The processor may include one or more processing units; optionally, the processor integrates an application processor and a modem processor, wherein the application processor mainly handles operations related to the operating system, user interface, and applications, while the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into the processor.

[0122] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0123] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes a deterministic machine readable storage medium, such as a deterministic machine read-only memory (ROM), random access memory (RAM), a magnetic disk, or an optical disk.

[0124] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above method embodiments and achieve the same technical effect. To avoid repetition, it will not be described again here.

[0125] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0126] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0127] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0128] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A click-through rate prediction method, characterized in that, include: Obtain user category features and continuous features; Based on the number of discretized feature sets and the target discretized feature set corresponding to the continuous feature, a first vector representation of the continuous feature is determined; the target discretized feature set is one of the discretized feature sets. Determine the second vector representation corresponding to the category feature, and input the first vector representation and the second vector representation into a pre-set click-through rate prediction model to obtain the click-through rate prediction result output by the click-through rate prediction model; The discretized feature set is obtained through the following method: Obtain a sample set, which includes multiple consecutive features; Determine at least one partitioning position, wherein the partitioning position is used to divide the plurality of consecutive features into two sample subsets; For each of the aforementioned partition positions, the Gini index of the two sample subsets is determined; The discretized feature set of the sample set is determined based on the number of pre-set discretized feature sets and the Gini index corresponding to each of the partition positions. The click-through rate prediction model is trained using a sample set including categorical features and a discretized sample set including continuous features.

2. The method according to claim 1, characterized in that, Determining at least one division position includes: The position between any two adjacent consecutive features among the plurality of consecutive features is determined as the dividing position.

3. The method according to claim 1, characterized in that, The sample set also includes the labels corresponding to the continuous features; Determining at least one division position includes: Based on the labels corresponding to the continuous features, adjacent continuous features with the same label are identified as a feature block; The position between any two adjacent feature blocks is determined as the partition position.

4. The method according to claim 1, characterized in that, The step of determining the discretized feature set of the sample set after discretization based on the pre-set number of discretized feature sets and the Gini index corresponding to each of the partition positions includes: When the number of pre-set discretization feature sets is two, the two sample subsets corresponding to the smallest Gini index among the Gini indices corresponding to each division position are determined as the discretization feature sets of the sample sets. When the number of pre-set discretization feature sets is greater than two, the first and / or second sample subsets of the two sample subsets obtained in each partitioning are divided according to the pre-set number of discretization feature sets, until the number of sets obtained by partitioning reaches the number of discretization feature sets, wherein the Gini index corresponding to the sample subset obtained in each partitioning process is the smallest.

5. The method according to claim 1, characterized in that, The step of determining the first vector representation of the continuous feature based on the number of discretized feature sets and the target discretized feature set corresponding to the continuous feature includes: The vector representation dimension of the continuous feature is determined based on the number of discretized feature sets, wherein the vector representation dimension is the same as the number of discretized feature sets. Based on the range of feature values ​​corresponding to each of the discretized feature sets, the target discretized feature set corresponding to the continuous feature is determined; The first vector representation of the continuous feature is determined based on the vector representation dimension of the continuous feature and the target discretized feature set corresponding to the continuous feature.

6. The method according to claim 1, characterized in that, The click-through rate prediction results are used to predict the click-through rate of users on preset applications in the client; the click-through rate prediction model includes a multilayer perceptron, a Wide&Deep model, or a DeepFM model.

7. A click-through rate prediction device, characterized in that, include: The acquisition module is used to acquire the user's category features and continuous features; The determining module is used to determine a first vector representation of the continuous feature and a second vector representation of the category feature based on the number of discretized feature sets and the target discretized feature set corresponding to the continuous feature; the target discretized feature set is one of the discretized feature sets. The prediction module is used to input the first vector representation and the second vector representation into a pre-set click-through rate prediction model to obtain the click-through rate prediction result output by the click-through rate prediction model. The determining module is further configured to: Obtain a sample set, which includes multiple consecutive features; Determine at least one partitioning position, wherein the partitioning position is used to divide the plurality of consecutive features into two sample subsets; For each of the aforementioned partition positions, the Gini index of the two sample subsets is determined; The discretized feature set of the sample set is determined based on the number of pre-set discretized feature sets and the Gini index corresponding to each of the partition positions. The click-through rate prediction model is trained using a sample set including categorical features and a discretized sample set including continuous features.

8. An electronic device, characterized in that, It includes a processor, a memory, and a program or instructions stored in the memory and executable on the processor, wherein the program or instructions, when executed by the processor, implement the steps of the click-through rate prediction method as described in any one of claims 1-6.

9. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions that, when executed by a processor, implement the steps of the click-through rate prediction method as described in any one of claims 1-6.