Feature binning method and apparatus, electronic device, and storage medium

By determining the feature values ​​to be binned and performing the splitting process, the problems of poor flexibility and excessive noise in existing binning methods are solved, achieving more flexible feature binning, reducing noise within bins, and improving the performance of the data model.

CN115470853BActive Publication Date: 2026-11-20DATAGRAND TECH INC
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211119508.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-09-14
Publication Date
2026-11-20
Estimated Expiration
2042-09-14

AI Technical Summary

Technical Problem

Existing binning methods lack flexibility, resulting in excessive noise within bins and affecting the performance of data models.

Method used

By determining the feature values ​​to be binned, the elements to be binned are segmented and processed, the feature binning interval is determined, and they are encoded to achieve more flexible feature binning.

Benefits of technology

It improves the flexibility of binning, reduces noise within bins, and enhances the performance of the data model.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115470853B_ABST
    Figure CN115470853B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a feature binning method and device, electronic equipment and a storage medium. The feature binning method can specifically include: determining a feature to be binned, and determining feature values to be binned of each sample data according to the feature to be binned; determining elements to be binned according to the feature values to be binned, and performing a cutting processing on the elements to be binned to obtain at least one cut element to be binned; determining feature binning intervals according to the cut elements to be binned, and performing encoding on the feature binning intervals to obtain binning interval encoding; and performing feature binning on the feature to be binned according to the feature binning intervals and the binning interval encoding. The technical solution of the embodiments of the present application can more flexibly perform feature binning on the feature to be binned, and can also make the sample distribution in the bin more concentrated, thereby reducing the noise in the bin.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a feature binning method, apparatus, electronic device and storage medium. Background Technology

[0002] In the field of computer science, the performance of a data model is strongly correlated with the quality of feature engineering, making feature engineering the most crucial aspect of data science model development. Original datasets often contain multiple types of features, such as text, date / time, categorical, and continuous variables. For example, machine learning models require processing the dataset as numerical vectors to train machine learning algorithms. Feature binning transforms continuous or numerical variables into categorical variables, and feature encoding then converts categorical variables back into numerical features. Binning continuous variables introduces non-linearity, which reduces noise, improves model performance, and can be used to identify outliers, invalid values, and missing values ​​in numerical variables. Therefore, the binning method and its results directly impact the performance of the data model.

[0003] Existing binning methods generally employ equal-width or equal-frequency binning. However, equal-width or equal-frequency binning is based on rule-based statistical analysis and lacks flexibility. Furthermore, existing binning methods also include those based on entropy and chi-square tests. These methods consider the similarity between adjacent bins and dynamically binnify based on the data distribution after binning. However, these methods result in excessive cross-fertilization within bins, leading to excessive noise within the bins. Summary of the Invention

[0004] This invention provides a feature binning method, apparatus, electronic device, and storage medium, which can more flexibly bin the features to be binned, and at the same time make the sample distribution within the bin more clustered, thereby reducing noise within the bin.

[0005] According to one aspect of the present invention, a feature binning method is provided, comprising:

[0006] Determine the binning characteristics to be binned, and determine the binning characteristic values ​​for each sample data based on the binning characteristics;

[0007] The elements to be divided are determined based on the characteristic values ​​of each bin to be divided, and the elements to be divided are segmented to obtain at least one element to be divided.

[0008] Based on each element to be binned, a feature binning interval is determined, and the feature binning interval is encoded to obtain a binning interval code;

[0009] Based on the feature binning interval and the binning interval code, the feature to be binned is binned.

[0010] According to another aspect of the present invention, a feature sorting device is provided, comprising:

[0011] The binning feature value determination module is used to determine the binning features and determine the binning feature values ​​of each sample data based on the binning features.

[0012] The module for generating elements to be divided into bins is used to determine the elements to be divided into bins based on the feature values ​​of each bin to be divided, and to perform a segmentation process on the elements to be divided into bins to obtain at least one element to be divided into bins.

[0013] The binning interval coding generation module is used to determine the feature binning interval based on each of the elements to be binned, and to encode the feature binning interval to obtain the binning interval code.

[0014] The feature binning module is used to bin the features to be binned according to the feature binning interval and the binning interval code.

[0015] According to another aspect of the present invention, an electronic device is provided, the electronic device comprising:

[0016] At least one processor; and

[0017] A memory communicatively connected to the at least one processor; wherein,

[0018] The memory stores a computer program that can be executed by the at least one processor, the computer program being executed by the at least one processor to enable the at least one processor to perform the feature binning method according to any embodiment of the present invention.

[0019] According to another aspect of the present invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer instructions for causing a processor to execute and implement the feature binning method according to any embodiment of the present invention.

[0020] The technical solution of this invention determines the binning features to be binned, determines the binning feature values ​​of each sample data based on the binning features, determines the binning elements based on each binning feature value, and performs segmentation processing on the binning elements to obtain at least one binning segmentation element. Based on each binning segmentation element, a feature binning interval is determined, and the feature binning interval is encoded to obtain a binning interval code. Thus, based on the feature binning interval and the binning interval code, the features to be binned are binned. This solves the problems of poor binning flexibility and excessive noise within bins in existing feature binning methods, enabling more flexible feature binning of the features to be binned, and simultaneously making the sample distribution within the bin more clustered, thereby reducing noise within the bin.

[0021] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of the present invention, nor is it intended to limit the scope of the invention. Other features of the invention will become readily apparent from the following description. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0023] Figure 1 This is a flowchart of a feature binning method provided in Embodiment 1 of the present invention;

[0024] Figure 2 This is a flowchart of a feature binning method provided in Embodiment 2 of the present invention;

[0025] Figure 3 This is a flowchart illustrating a feature binning method provided in Embodiment 3 of the present invention;

[0026] Figure 4 This is a schematic diagram of a sample data storage structure provided in Embodiment 3 of the present invention;

[0027] Figure 5 This is a flowchart illustrating a process for splitting elements into boxes, as provided in Embodiment 3 of the present invention.

[0028] Figure 6 This is a schematic diagram of a feature binning interval and binning interval encoding provided in Embodiment 3 of the present invention;

[0029] Figure 7 This is a schematic diagram of a feature sorting device provided in Embodiment 4 of the present invention;

[0030] Figure 8 This is a schematic diagram of the structure of an electronic device that implements the feature binning method of the present invention. Detailed Implementation

[0031] To enable those skilled in the art to better understand the present invention, the technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of the present invention.

[0032] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this invention are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of the invention described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover a non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0033] Example 1

[0034] Figure 1 This is a flowchart of a feature binning method provided in Embodiment 1 of the present invention. This embodiment is applicable to situations where features to be binned are flexibly binned while reducing noise within the bins. The method can be executed by a feature binning device, which can be implemented through software and / or hardware, and is generally directly integrated into the electronic device executing this method. This electronic device can be a terminal device or a server device. The present invention does not limit the type of electronic device executing the feature binning method. Specifically, as shown... Figure 1 As shown, this feature binning method may specifically include the following steps:

[0035] S110. Determine the binning characteristics to be binned, and determine the binning characteristic values ​​of each sample data according to the binning characteristics.

[0036] The feature to be binned can be any feature of the sample data that needs to be binned, such as a continuous feature or a numerical variable feature, etc., and this embodiment of the invention does not impose any limitations on this. The feature value to be binned can be a value in the sample data corresponding to the feature to be binned. For example, assuming the feature to be binned is an age feature, the feature value to be binned can be a value in the sample data corresponding to the age feature, such as 30 years old.

[0037] In this embodiment of the invention, the features to be binned are determined, and the binning feature values ​​for each sample data are determined based on these features. It is understood that a single sample data point may contain multiple features, and any one of these features can be selected as the binning feature.

[0038] Optionally, before determining the features to be binned, the process may also include acquiring item exposure data and user behavior feedback data within a set time period, and determining data labels for the item exposure data based on the user behavior feedback data. This allows for the determination of a sample dataset based on the item exposure data and data labels, and the generation of features for each sample data point in the sample dataset. The generated features may include user-side features, item-side features, contextual features, or cross-features. It is understood that the generated features may differ depending on the sample data used in different application scenarios.

[0039] S120. Determine the elements to be divided into bins based on the characteristic values ​​of each bin to be divided, and perform segmentation processing on the elements to be divided into bins to obtain at least one segmentation element.

[0040] Here, the element to be binned can be any element that needs to be binned. The splitting process can be splitting the element to be binned. The element to be binned and split can be any element obtained after splitting the element to be binned.

[0041] In this embodiment of the invention, after determining the binning features and the binning feature values ​​for each sample data based on these features, binning elements can be further determined based on these feature values ​​to perform segmentation processing on the binning elements, thereby obtaining at least one binning element. It is understood that the binning element can be one or more, and this embodiment of the invention does not impose any limitation on this. If there is only one binning element, it indicates that the binning process failed, and the binning element is the same as the original binning element.

[0042] Optionally, the elements to be binned and the elements to be binned can be list elements. For example, suppose the elements to be binned are [x1, x2, ..., x...]. n If the elements to be binned can be [x1, x2, ..., x...], then the binning elements can be [x1, x2, ..., x...]. a ]、[x a+1 ,x a+2 ,…,x b ]、…、[x m ,x m+2 ,…,x n ].

[0043] S130. Determine the feature binning intervals based on each of the elements to be binned, and encode the feature binning intervals to obtain the binning interval code.

[0044] Here, the feature binning interval can be the binning interval obtained after binning the feature to be binned. The binning interval code can be the binning interval code corresponding to the feature binning interval. It can be understood that different feature binning intervals can correspond to different binning interval codes.

[0045] In this embodiment of the invention, after determining the elements to be divided into bins based on the feature values ​​of each bin to be divided, and performing a segmentation process on the elements to be divided to obtain at least one segmentation element, a feature binning interval can be further determined based on each segmentation element to be divided, and the feature binning interval can be encoded to obtain a binning interval code.

[0046] S140. Based on the feature binning interval and the binning interval code, perform feature binning on the feature to be binned.

[0047] In this embodiment of the invention, after determining the feature binning interval based on each element to be binned and encoding the feature binning interval to obtain the binning interval code, the feature binning feature to be binned can be further binned based on the feature binning interval and the binning interval code.

[0048] Specifically, binning features based on feature binning intervals and binning interval codes can include: after obtaining the feature value corresponding to a new input feature to be binned, determining the feature binning interval in which the feature value is located, and then determining the binning interval code corresponding to the feature binning interval based on the feature binning interval in which the feature value is located, thereby applying the encoded value of the binning interval code as the feature value corresponding to the new input feature to be binned to the subsequent data stream.

[0049] The technical solution of this embodiment determines the binning features to be binned, determines the binning feature values ​​of each sample data based on the binning features, determines the binning elements based on each binning feature value, and performs segmentation processing on the binning elements to obtain at least one binning segmentation element. Based on each binning segmentation element, a feature binning interval is determined, and the feature binning interval is encoded to obtain a binning interval code. Thus, based on the feature binning interval and the binning interval code, the features to be binned are binned. This solves the problems of poor binning flexibility and excessive noise within bins in existing feature binning methods. It can perform feature binning on the features to be binned more flexibly, and at the same time, it can make the sample distribution within the bin more clustered, thereby reducing noise within the bin.

[0050] Example 2

[0051] Figure 2 This is a flowchart of a feature binning method provided in Embodiment 2 of the present invention. This embodiment further refines the above-described technical solutions, providing various specific and optional implementation methods for determining binning elements based on the feature values ​​to be binned, segmenting the binning elements to be binned to obtain at least one segmented element, and determining feature binning intervals based on the segmented elements to be binned. The technical solutions in this embodiment can be combined with various optional solutions in one or more of the above embodiments. For example... Figure 2 As shown, the method may include the following steps:

[0052] S210. Determine the binning characteristics to be binned, and determine the binning characteristic values ​​of each sample data according to the binning characteristics.

[0053] S220. Determine the elements to be divided into boxes based on the characteristic values ​​of each box to be divided.

[0054] Optionally, determining the elements to be divided into bins based on the feature values ​​of each bin to be divided may include: sorting the feature values ​​of each bin to be divided to obtain sorted feature values; and determining the elements to be divided into bins based on the sorted feature values ​​of each bin to be divided.

[0055] The feature value sorting can be based on the feature value itself, such as sorting by the size of the feature value or sorting by other features of the feature value, etc., and this embodiment of the invention does not impose any limitations on this. The feature values ​​to be sorted can be obtained after sorting the feature values ​​to be sorted.

[0056] Specifically, after determining the binning feature values ​​of each sample data based on the binning features, the feature values ​​of each binning feature value can be further sorted to obtain the binning sorted feature values, thereby determining the binning elements based on the binning sorted feature values.

[0057] S230. Determine the target sample difference rate of the elements to be binned, and sort the elements to be binned according to the target sample difference rate.

[0058] The target sample difference rate can be the difference rate between the sample data corresponding to each binning feature value included in the binning element.

[0059] In this embodiment of the invention, after determining the binning elements based on the feature values ​​of each binning element, the target sample difference rate of the binning elements can be further determined so as to sort the binning elements according to the target sample difference rate of the binning elements.

[0060] Optionally, the target sample difference rate of the elements to be binned can be determined based on the following formula:

[0061]

[0062] Where r represents the target sample difference rate; α and β represent harmonic factors; label m This represents the data label of the sample data corresponding to the m-th element in the binning set; j represents the j-th element in the binning set, and s represents the s-th element in the binning set. The harmonic factor can be a constant greater than 0, used to prevent the numerator or denominator from being 0. It is understood that the binning set can be a list element, meaning it can include multiple elements.

[0063] S240. Determine the current binning elements in sequence according to the sorting result of the binning elements.

[0064] The sorting result of the elements to be binned can be obtained by sorting according to the magnitude of the target sample difference rate. For example, the sorting result of the elements to be binned can be arranged in descending order of the target sample difference rate, or in ascending order of the target sample difference rate; this embodiment of the invention does not impose any limitation on this. The current element to be binned can be the element currently awaiting splitting processing obtained after sorting the elements to be binned.

[0065] In this embodiment of the invention, after sorting the elements to be binned according to the target sample difference rate, the current elements to be binned can be determined sequentially based on the sorting results. For example, assuming the elements to be binned include elements a, b, and c, and the sorting result is element b -> element c -> element a, then elements b, c, and a can be sequentially determined as the current elements to be binned.

[0066] S250. Perform segmentation processing on each of the current bins to be segmented to obtain the current segmentation element corresponding to each of the current bins to be segmented.

[0067] The current segmentation element can be an element obtained after segmenting the current bin to be segmented element. It is understood that the current segmentation element can be one or more, and this embodiment of the invention does not impose any limitation on this.

[0068] In this embodiment of the invention, after determining the current bin elements according to the sorting results of the bin elements, each current bin element can be further segmented to obtain the current segmentation element corresponding to each current bin element.

[0069] Optionally, the current binning elements are segmented to obtain the current segmentation elements corresponding to each current binning element. This may include: determining the segmentation position based on the elements in the current binning elements and a preset minimum threshold for the number of elements; if the segmentation position satisfies the segmentation conditions, segmenting the current binning elements according to the segmentation position to obtain the first segmentation element and the second segmentation element; determining the first sample difference rate of the first segmentation element and the second sample difference rate of the second segmentation element, and determining the current segmentation contrast ratio based on the first sample difference rate and the second sample difference rate; if the current segmentation contrast ratio is greater than or equal to the first segmentation threshold, determining the current segmentation element corresponding to the current binning element based on the current segmentation contrast ratio, the first segmentation element, and the second segmentation element.

[0070] The preset minimum threshold for the number of elements can be a pre-defined minimum threshold for the number of elements obtained after segmentation. That is, the number of elements obtained after segmentation must be greater than or equal to the preset minimum threshold. The segmentation position can be the position at which the current bin to be segmented is segmented. The segmentation condition can be the condition that allows segmentation of the current bin to be segmented. The first segmentation element can be an element obtained by segmenting the current bin according to the segmentation position. The second segmentation element can be another element obtained by segmenting the current bin according to the segmentation position. The first sample difference rate can be the difference rate between the sample data corresponding to each feature value included in the first segmentation element. The second sample difference rate can be the difference rate between the sample data corresponding to each feature value included in the second segmentation element. The current segmentation contrast ratio can be the contrast ratio between the sample difference rates of the two segmentation elements obtained after segmentation based on the segmentation position. The first segmentation threshold can be a segmentation contrast ratio threshold.

[0071] In this embodiment of the invention, after determining the current binning element according to the sorting result of the binning elements, the segmentation position can be further determined according to the elements in the current binning element and the minimum threshold of the number of preset elements. If the segmentation position satisfies the segmentation condition, the current binning element is segmented according to the segmentation position to obtain the first segmentation element and the second segmentation element. The first sample difference rate of the first segmentation element and the second sample difference rate of the second segmentation element are determined. The current segmentation ratio is determined according to the first sample difference rate and the second sample difference rate. When the current segmentation ratio is greater than or equal to the first segmentation threshold, the current segmentation element corresponding to the current binning element is determined according to the current segmentation ratio, the first segmentation element, and the second segmentation element.

[0072] Optionally, the splitting position can be determined based on the elements in the current binning pool and a preset minimum element count threshold. This can include determining the splitting position based on the sequence number of the first element in the current binning pool and the preset minimum element count threshold. Specifically, the splitting position can be determined based on the following formula:

[0073] i = t + min_val – 1

[0074] Where i represents the splitting position; t represents the sequence number of the first element in the current bin to be split; and min_val represents the preset minimum threshold for the number of elements.

[0075] Optionally, the splitting criteria can be determined based on the number of elements in the current bins to be split and a preset minimum threshold for the number of elements. Specifically, the splitting criteria can be determined based on the following formula:

[0076] i≥t+q-min_val

[0077] Where t+q represents the number of elements in the current binning pool.

[0078] Optionally, the first sample difference rate of the first segmentation element can be determined based on the following formula:

[0079]

[0080] Where r1 represents the first sample difference rate.

[0081] Optionally, the second sample difference rate of the second segmentation element can be determined based on the following formula:

[0082]

[0083] Where r2 represents the second sample difference rate.

[0084] Optionally, the current segmentation ratio can be determined based on the following formula:

[0085]

[0086] Among them, diff_r i This represents the current segmentation ratio at segmentation position i.

[0087] For example, suppose the element to be binned is sort_data_list p =[x t ,x t+1 ,…,x t+q If the splitting position is i, then the sequence number of the first element in the current binning element is t, the number of elements in the current binning element is t+q, and the first splitting element can be l1=[x t ,x t+1 ,…,x i The second dividing element can be l2 = [x] i+1 ,x i+2 ,…,x t+q Assuming the current segmentation comparison rate is diff_r i Then in diff_r i When the value is greater than the first segmentation threshold, the current segmentation element can be [diff_r i l1, l2, sort_data_list p ].

[0088] Optionally, after determining the current segmentation element corresponding to the current binning element based on the current segmentation ratio, the first segmentation element, and the second segmentation element, the method may further include: updating the segmentation position and returning to the previous step, where the segmentation position satisfies the segmentation condition, and then segmenting the current binning element according to the segmentation position to obtain the first segmentation element and the second segmentation element, until the segmentation position no longer satisfies the segmentation condition. Optionally, updating the segmentation position may involve updating the segmentation position itself. For example, updating the segmentation position may be to update the segmentation position to the next position after the segmentation position, such as i = i + 1, etc., and this embodiment of the invention does not limit this.

[0089] Optionally, if the current segmentation ratio is less than the first segmentation threshold, update the segmentation position and return to the previous step. If the segmentation position meets the segmentation conditions, perform segmentation processing on the current bin to be segmented according to the segmentation position to obtain the first segmentation element and the second segmentation element, and repeat the operation until the segmentation position no longer meets the segmentation conditions.

[0090] Optionally, if the splitting position does not meet the splitting conditions, the splitting process for the current binning element is terminated, and the process of determining the binning elements corresponding to each current binning element based on the current splitting element continues.

[0091] S260. Based on the current segmentation element, determine the segmentation element to be segmented corresponding to each of the current segmentation elements.

[0092] In this embodiment of the invention, after performing segmentation processing on each current element to be segmented to obtain the current segmentation element corresponding to each current element to be segmented, the segmentation element to be segmented corresponding to each current element to be segmented can be further determined based on the current segmentation element.

[0093] Optionally, determining the binning elements corresponding to each current binning element based on the current segmentation element may include: sorting the current segmentation elements according to the current segmentation ratio; and determining the binning elements corresponding to the current binning elements based on the sorting result of the current segmentation elements.

[0094] The sorting result of the current segmentation element can be obtained by sorting according to the value of the current segmentation ratio.

[0095] Specifically, after splitting each current element to be split into its corresponding current splitting elements, the current splitting elements can be further sorted according to the current splitting ratio in the current splitting elements, so as to determine the splitting elements to be split corresponding to the current element to be split based on the sorting result of the current splitting elements.

[0096] Optionally, the current segmented elements can be sorted according to the current segmentation ratio, which can be done by sorting the current segmented elements based on the value of the current segmentation ratio. Correspondingly, the binning element corresponding to the current binning element can be determined based on the sorting result of the current segmented elements, which can be done by determining the binning element based on the current segmented element with the largest current segmentation ratio.

[0097] Optionally, after performing segmentation processing on the elements to be segmented to obtain at least one element to be segmented, the process may further include: updating the elements to be segmented based on the elements to be segmented, and returning to perform segmentation processing on the elements to be segmented to obtain at least one element to be segmented, until the segmentation processing meets the set segmentation termination condition, at which point the segmentation processing ends; the set segmentation termination condition includes at least one of the following: the current segmentation count is greater than or equal to a second segmentation threshold, the updated element to be segmented is the same as the element to be segmented, or the number of elements in the updated element to be segmented is less than or equal to a preset minimum element count threshold; wherein, the updated element to be segmented is the element obtained after updating the elements to be segmented based on the elements to be segmented.

[0098] The segmentation termination condition can be a pre-defined condition for ending the segmentation process. The current segmentation count can be the number of times the elements to be segmented have been segmented. The second segmentation threshold can be a segmentation count threshold, such as the maximum number of segmentations, etc., and this embodiment of the invention does not impose any limitations on it.

[0099] Specifically, after the elements to be binned are processed to obtain at least one element to be binned, the elements to be binned can be updated based on the elements to be binned, and the process can be returned until the elements to be binned are processed to obtain at least one element to be binned, and the process ends when the set end condition is met.

[0100] Specifically, the segmentation termination condition can be set as follows: the current segmentation count is greater than or equal to the second segmentation threshold; the updated binning element is identical to the binning element; the updated binning element's element count is less than or equal to a preset minimum element count threshold; or multiple conditions from the above three conditions can be used. Optionally, updating the binning element to be identical to the binning element can mean updating the elements within the binning element to be identical to the elements within the binning element.

[0101] S270. Determine the feature binning intervals based on each of the elements to be binned, and encode the feature binning intervals to obtain the binning interval code.

[0102] Optionally, determining the feature binning interval based on each element to be binned may include: determining the element position of each element to be binned; determining the feature binning interval corresponding to each element to be binned based on the element position of each element to be binned; and determining the feature binning interval based on each feature binning interval.

[0103] The element position can be the location of the element to be binned, such as the first element position, the middle element position, or the last element position, etc., and this embodiment of the invention does not impose any limitations on this. The feature binning interval can be the interval corresponding to each element to be binned.

[0104] Specifically, after determining the binning elements corresponding to each current binning element based on the current segmentation element, the element positions of each binning element can be further determined. Based on the element positions of each binning element, the feature analysis segmentation intervals corresponding to each binning element can be determined, thereby determining the feature binning intervals based on each feature analysis segmentation interval.

[0105] For example, suppose the elements to be binned include [x1, x2, ..., x...]. u ],[x u+1 ,x u+2 ,…,x v ],…,[x w ,x w+1 ,…,x n ], where [x1,x2,…,x u [x] represents the first element to be binned, [x] u+1 ,x u+2 ,…,x v [x] represents the middle element to be binned, [x] w ,x w+1 ,…,x n If the first element is the last element to be binned, then the characteristic binning interval for the first element to be binned can be determined as (-∞, x1), [x1, x...]. u ],(x u ,x u+1 Based on the position of the middle element, the feature binning interval of the middle element to be binned is determined as [x]. u+1 ,x v ],……,(x v ,x w Based on the position of the last element, the feature binning interval for the last element to be binned is determined as [x]. w ,x n ],(x n (,+∞).

[0106] S280. Based on the feature binning interval and the binning interval code, perform feature binning on the feature to be binned.

[0107] The technical solution of this embodiment determines the binning features to be binned, determines the binning feature values ​​of each sample data based on the binning features, determines the binning elements based on each binning feature value, determines the target sample difference rate of the binning elements, sorts the binning elements based on the target sample difference rate of the binning elements, determines the current binning elements according to the sorting results, segments each current binning element to obtain the current segmentation element corresponding to each current binning element, determines the binning segmentation element corresponding to each current binning element based on the current segmentation element, determines the feature binning interval based on each binning segmentation element, and encodes the feature binning interval to obtain the binning interval code. Thus, the feature binning features to be binned are binned according to the feature binning interval and the binning interval code. This solves the problems of poor binning flexibility and excessive noise within bins in existing feature binning methods, enabling more flexible feature binning of the features to be binned, and making the sample distribution within the bin more clustered, thereby reducing noise within the bin.

[0108] Example 3

[0109] This invention uses CTR (Click Through Rate) prediction as an example to illustrate its application. Click-through rate prediction refers to predicting whether a user will click or not on content presented to them. It involves training a model on a large amount of historical data, taking into account various factors and features. The more accurate the CTR prediction model, the higher the revenue for the company. Therefore, CTR prediction models are a very important technology for many companies, with a wide range of applications, including computational advertising, recommendation systems, search engines, and information flow ranking. In the CTR prediction scenario, clicking (positive samples) and not clicking (negative samples) is a binary classification problem. The distribution ratio of positive and negative samples during binning has a significant impact on model training. Figure 3 This is a flowchart illustrating a feature binning method provided in Embodiment 3 of the present invention, as shown below. Figure 3 As shown, the specific steps may include:

[0110] 1. Data preprocessing.

[0111] Specifically, the process involves acquiring item exposure data and user behavior feedback data over a specific period; the user behavior feedback data can be user click data; storing the item exposure data in row-by-row format; performing data cleaning on both the item exposure data and the user behavior feedback data; determining the user click behavior for each row of item exposure data based on the user behavior feedback data; where user click behavior can be represented by a label, with values ​​of 0 and 1, where 0 indicates no click and 1 indicates a click; constructing a sample set S based on the item exposure data and user click behavior; generating features for each sample in the sample set; where features can include user-side features, item-side features, contextual features, or cross-features, and the features may vary depending on the business scenario; randomly splitting the sample set S according to a certain ratio to generate a training set TrainData and a test set TestData; and performing binning, encoding, and new feature value generation operations on all continuous or numerical features in TrainData that require binning.

[0112] 2. Feature binning.

[0113] For a feature X to be binned, the feature values ​​of all sample data in TrainData are arranged in ascending order, and can be x1, x2, ..., x... n There are n rows in total, and the corresponding label values ​​can be label1, label2, ..., label n , Figure 4 This is a schematic diagram of a sample data storage structure provided in Embodiment 3 of the present invention. The specific storage format of the sample data is as follows: Figure 4 As shown.

[0114] Specifically, Figure 5 This is a flowchart illustrating a process for splitting elements into bins, as provided in Embodiment 3 of the present invention. Figure 5 As shown, the specific processing of binning elements can include:

[0115] (1) Data initialization: The list of feature values ​​to be binned can be input = [x1, x2, ..., x...]. n The list of corresponding label values ​​can be target = [label1, label2, ..., label...]. nThe maximum number of splits (max_num) can be a constant greater than 0 and can be dynamically set based on the original data; the sample difference rate threshold (cut_threshold) can be a constant greater than 0 and can be dynamically set based on the original data; the list storing bins (data_list) can be initially empty, i.e., data_list = []; the current number of bins (cut_num) can be initialized to 0; the minimum number of feature values ​​in a single bin (min_val) can be a constant greater than 0 and can be dynamically set based on the original data; the harmonic factors α and β can be constants greater than 0 and can be used to prevent the numerator or denominator from being 0; max(r1,r2) can represent the maximum value among r1 and r2, and min(r1,r2) can represent the minimum value among r1 and r2. The variable indicating whether data_list has changed can be is_change, where is_change = 0 indicates that data_list has not changed, and is_change = 1 indicates that data_list has changed.

[0116] (2) Add the input to the data_list, i.e., data_list = [[x1, x2, ..., x...]. n At the same time, set is_change = 1.

[0117] (3) If n is less than or equal to min_val, then skip to step (19).

[0118] (4) If is_change equals 0, skip to step (19).

[0119] (5) Set is_change = 0.

[0120] (6) Iterate through each element list in the data_list. j =[x j ,x j+1 ,…,x j+s ], calculate the sample difference rate of this list of elements:

[0121]

[0122] The list of each element in data_list is sorted in ascending order according to the corresponding sample difference rate, and is denoted as sort_data_list.

[0123] (7) Let p = 1.

[0124] (8) If p is greater than the number of elements in sort_data_list, then skip to step (4).

[0125] (9) Retrieve the list of elements at position p in sort_data_list, denoted as sort_data_list p =[x t ,x t+1 ,…,x t+q ].

[0126] (10) If sort_data_list p If the length is less than 2*min_val, then p is incremented by 1, i.e., p = p + 1, and the process jumps to step (8).

[0127] (11) Let variable i = t + min_val – 1, and temporary list variable t_list be empty, i.e. t_list = [].

[0128] (12) If i is greater than t+q-min_val, then jump to step (16).

[0129] (13) sort_data_list p Divide at position i to obtain two sublist elements, l1 = [x t ,x t+1 ,…,x i ] and l2 = [x i+1 ,x i+2 ,…,x t+q ].

[0130] (14) Calculate the sample difference rate of l1:

[0131]

[0132] The sample difference rate for l2 is calculated as follows:

[0133]

[0134] The comparison rate between l1 and l2 segmentation is:

[0135]

[0136] (15) i increments by 1, i.e., i = i + 1. If diff_r i If the value is greater than or equal to cut_threshold, then add the list [diff_r i l1, l2, sort_data_list p Add it to t_list and skip to step (12).

[0137] (16) If t_list is not empty, sort t_list in descending order according to the partition ratio of each element list, take the first element of the list, and sort_data_list p Delete from data_list, and insert l1 and l2 at the specified positions and subsequent positions. Increment cut_num by 1, i.e., cut_num = cut_num + 1. Set is_change = 1.

[0138] (17) If cut_num is greater than max_num, skip to step (19).

[0139] (18) p increases by 1, i.e. p = p + 1, then jump to step (8).

[0140] (19) The segmentation is complete.

[0141] 3. Feature encoding.

[0142] For the data_list set after splitting in step 2, range filling is performed. Specifically, this includes:

[0143] Suppose data_list contains multiple lists, that is, data_list = [[x1, x2, ..., x...] u ],[x u+1 ,x u+2 ,…,x v ],…,[x w ,x w+1 ,…,x n Represent each element in data_list as a list of [x] i ,x i+1 ,…,x j ], and represent the next list of elements following this list of elements as [x p ,x p+1 ,…,x q If this list of elements is the last element in data_list, then there is no next list of elements.

[0144] If the list of elements is the first element in data_list, then add three new intervals (-∞, x). i ), [x i ,x j ], [x j ,x p If the list of elements is the last element in data_list, then add two new ranges [x]. i ,x j ],(x jIf the list of elements is the middle element of data_list, that is, neither the first nor the last element, then add two new intervals [x, +∞). i ,x j ],(x j ,x p ).

[0145] Based on the list partitioned from data_list, the binning interval corresponding to data_list can be obtained as (-∞, x1), [x1, x... u ],(x u ,x u+1 ), [x u+1 ,x v ],……,[x w ,x n ],(x n (,+∞).

[0146] Figure 6 This is a schematic diagram of a feature binning interval and binning interval encoding provided in Embodiment 3 of the present invention, as shown below. Figure 6 As shown, assuming there are m intervals, each bin interval can be encoded separately, that is, mapped to an integer value from 1 to m.

[0147] 4. Obtain the feature encoding value.

[0148] For a new input feature value, the bin space to which it belongs is found by binary search, and the corresponding encoded value is taken as its actual feature value and applied to the subsequent data stream.

[0149] The above technical solution, through the calculation of sample difference rate and segmentation contrast ratio, can automatically and continuously segment the sample interval according to the optimal index segmentation method, making positive and negative samples more clustered within the bin interval, mitigating the potential noise caused by the crossover of positive and negative samples, and providing a more reliable guarantee for the optimization of model performance in CTR scenarios; by sorting the original feature value list according to the sample difference rate and selecting the segmentation in order, on the one hand, the feature value list with more positive and negative sample crossover is prioritized for segmentation, and on the other hand, it ensures that the list with lower ranking also has the opportunity to be segmented; it can both alleviate the problem of positive and negative sample distribution and ensure the overall segmentation of the sample space and the balance of the feature space; By introducing a contrast ratio index and employing max and min calculation methods for the numerator and denominator, the binning method ensures that positive and negative samples can be clustered within a single bin as much as possible. The addition of harmonic factors α and β also avoids anomalies caused by numerators or denominators being zero during calculation, guaranteeing the fluidity of the computation and the effectiveness of the sample space. By introducing parameters such as the cutting threshold, the minimum number of features in the segmentation interval, and the maximum number of segmentations, the flexibility of the binning method is increased, allowing for more adjustments based on different business scenarios to optimize the final model performance. In addition, there is more control over the overall running time and performance, which enhances the robustness of the binning method and makes it applicable to a wider range of business scenarios.

[0150] Example 4

[0151] Figure 7 This is a schematic diagram of a feature-separating device provided in Embodiment 4 of the present invention, as shown below. Figure 4 As shown, the device includes: a feature value determination module 710 for binning, a segmentation element generation module 720 for binning, a binning interval encoding generation module 730, and a feature binning module 740, wherein:

[0152] The binning feature value determination module 710 is used to determine the binning features and determine the binning feature values ​​of each sample data based on the binning features.

[0153] The bin-to-be-divided element generation module 720 is used to determine the bin-to-be-divided elements according to the feature values ​​of each bin-to-be-divided element, and to perform bin-to-be-divided element segmentation processing to obtain at least one bin-to-be-divided element.

[0154] The binning interval coding generation module 730 is used to determine the feature binning interval based on each of the elements to be binned, and to encode the feature binning interval to obtain the binning interval code.

[0155] The feature binning module 740 is used to bin the features to be binned according to the feature binning interval and the binning interval code.

[0156] The technical solution of this embodiment determines the binning features to be binned, determines the binning feature values ​​of each sample data based on the binning features, determines the binning elements based on each binning feature value, and performs segmentation processing on the binning elements to obtain at least one binning segmentation element. Based on each binning segmentation element, a feature binning interval is determined, and the feature binning interval is encoded to obtain a binning interval code. Thus, based on the feature binning interval and the binning interval code, the features to be binned are binned. This solves the problems of poor binning flexibility and excessive noise within bins in existing feature binning methods. It can perform feature binning on the features to be binned more flexibly, and at the same time, it can make the sample distribution within the bin more clustered, thereby reducing noise within the bin.

[0157] Optionally, the bin-to-be-divided element generation module 720 can be specifically used to: sort the feature values ​​of each bin to be divided to obtain sorted feature values; and determine the bin-to-be-divided elements based on the sorted feature values ​​of each bin.

[0158] Optionally, the binning element generation module 720 can be specifically used to: determine the target sample difference rate of the binning elements, and sort the binning elements according to the target sample difference rate; determine the current binning elements according to the sorting result; perform segmentation processing on each current binning element to obtain the current segmentation element corresponding to each current binning element; and determine the binning element corresponding to each current binning element based on the current segmentation element.

[0159] Optionally, the binning element generation module 720 can be further configured to: determine the segmentation position based on the elements in the current binning elements and a preset minimum threshold for the number of elements; if the segmentation position satisfies the segmentation conditions, segment the current binning elements according to the segmentation position to obtain a first segmentation element and a second segmentation element; determine the first sample difference rate of the first segmentation element and the second sample difference rate of the second segmentation element, and determine the current segmentation contrast ratio based on the first sample difference rate and the second sample difference rate; if the current segmentation contrast ratio is greater than or equal to the first segmentation threshold, determine the current segmentation element corresponding to the current binning elements according to the current segmentation contrast ratio, the first segmentation element, and the second segmentation element.

[0160] Optionally, the bin-to-be-divided element generation module 720 can be further used to: update the partitioning position and return to the execution, if the partitioning position meets the partitioning conditions, partition the current bin-to-be-divided element according to the partitioning position to obtain the first partitioning element and the second partitioning element, and perform the operation of obtaining the first partitioning element and the second partitioning element until the partitioning position no longer meets the partitioning conditions.

[0161] Optionally, the binning element generation module 720 can also be further used to: sort the current segmentation element according to the current segmentation ratio in the current segmentation element; and determine the binning element corresponding to the current binning element according to the sorting result of the current segmentation element.

[0162] Optionally, the binning element generation module 720 can also be specifically used to: update the binning elements according to the binning elements, and return to perform binning processing on the binning elements to obtain at least one binning element, until the binning process meets the set binning end condition, and then end the binning process; the set binning end condition includes at least one of the following: the current number of binning is greater than or equal to the second binning threshold, the updated binning element is the same as the binning element, or the number of elements in the updated binning element is less than or equal to the preset minimum number of elements; wherein, the updated binning element is the element obtained after updating the binning elements according to the binning elements.

[0163] Optionally, the binning interval coding generation module 730 can be specifically used to: determine the element position of each element to be binned; determine the feature binning interval corresponding to each element to be binned based on the element position of each element to be binned; and determine the feature binning interval based on each feature binning interval.

[0164] The feature binning device provided in the embodiments of the present invention can execute the feature binning method provided in any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0165] Example 5

[0166] Figure 8 A schematic diagram of an electronic device 10 that can be used to implement embodiments of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely illustrative and are not intended to limit the implementation of the invention described and / or claimed herein.

[0167] like Figure 8As shown, the electronic device 10 includes at least one processor 11 and a memory, such as a read-only memory (ROM) 12 or a random access memory (RAM) 13, communicatively connected to the at least one processor 11. The memory stores computer programs executable by the at least one processor. The processor 11 can perform various appropriate actions and processes based on the computer program stored in the ROM 12 or loaded from storage unit 18 into the RAM 13. The RAM 13 may also store various programs and data required for the operation of the electronic device 10. The processor 11, ROM 12, and RAM 13 are interconnected via a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0168] Multiple components in electronic device 10 are connected to I / O interface 15, including: input unit 16, such as keyboard, mouse, etc.; output unit 17, such as various types of displays, speakers, etc.; storage unit 18, such as disk, optical disk, etc.; and communication unit 19, such as network card, modem, wireless transceiver, etc. Communication unit 19 allows electronic device 10 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0169] Processor 11 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special-purpose artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any suitable processor, controller, microcontroller, etc. Processor 11 performs the various methods and processes described above, such as feature binning methods.

[0170] In some embodiments, the feature binning method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or mounted on electronic device 10 via ROM 12 and / or communication unit 19. When the computer program is loaded into RAM 13 and executed by processor 11, one or more steps of the feature binning method described above may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the feature binning method by any other suitable means (e.g., by means of firmware).

[0171] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), application-specific standard products (ASSPs), systems-on-a-chip (SoCs), payload-programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0172] Computer programs used to implement the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be performed. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0173] In the context of this invention, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination thereof. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fibers, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.

[0174] To provide interaction with a user, the systems and techniques described herein can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user provides input to the electronic device. Other types of devices can also be used to provide interaction with the user; for example, feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including sound input, voice input, or tactile input).

[0175] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0176] A computing system can include clients and servers. Clients and servers are generally located far apart and typically interact through communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a hosting product within the cloud computing service system to address the shortcomings of traditional physical hosts and VPS services, such as high management difficulty and weak business scalability.

[0177] It should be understood that the various forms of processes shown above can be used, with steps reordered, added, or deleted. For example, the steps described in this invention can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this invention can be achieved, and this is not limited herein.

[0178] The specific embodiments described above do not constitute a limitation on the scope of protection of this invention. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this invention should be included within the scope of protection of this invention.

Claims

1. A feature binning method, characterized in that, include: Determine the binning characteristics to be binned, and determine the binning characteristic values ​​for each sample data based on the binning characteristics; The elements to be divided are determined based on the characteristic values ​​of each bin to be divided, and the elements to be divided are segmented to obtain at least one element to be divided. Based on each element to be binned, a feature binning interval is determined, and the feature binning interval is encoded to obtain a binning interval code; Based on the feature binning interval and the binning interval encoding, the features to be binned are binned; wherein, the binned dataset is used to train the click-through rate prediction model; Before determining the characteristics to be sorted, the process includes: acquiring item exposure data and user behavior feedback data within a set time period, and determining data labels for item exposure data based on user behavior feedback data, so as to determine a sample dataset based on item exposure data and data labels, thereby generating features for each sample data in the sample dataset; wherein, the user behavior feedback data is user click data; wherein, the generated features include user-side features or item-side features. The process of splitting the elements to be binned to obtain at least one element to be binned includes: Determine the target sample difference rate of the elements to be binned, and sort the elements to be binned according to the target sample difference rate; The current binning element is determined sequentially based on the sorting result of the elements to be binned; The current binning elements are segmented to obtain the current segmentation elements corresponding to each current binning element. Based on the current segmentation element, determine the segmentation element to be segmented corresponding to each of the current bins to be segmented elements; The step of segmenting each of the current bin-to-be-segmented elements to obtain the current segmentation element corresponding to each of the current bin-to-be-segmented elements includes: The splitting position is determined based on the elements in the current bin to be split and the minimum threshold of the preset number of elements; If the segmentation position satisfies the segmentation condition, the current bin to be segmented is segmented according to the segmentation position to obtain the first segmentation element and the second segmentation element. Determine the first sample difference rate of the first segmentation element and the second sample difference rate of the second segmentation element, and determine the current segmentation contrast ratio based on the first sample difference rate and the second sample difference rate; If the current segmentation ratio is greater than or equal to the first segmentation threshold, the current segmentation element corresponding to the current bin to be segmented is determined based on the current segmentation ratio, the first segmentation element, and the second segmentation element.

2. The method according to claim 1, characterized in that, The step of determining the bin-to-be-binned elements based on the characteristic values ​​of each bin to be binned includes: The feature values ​​of each bin to be divided are sorted to obtain the sorted feature values ​​of the bins to be divided. The bin elements to be sorted are determined based on the sorting feature values ​​of each bin.

3. The method according to claim 1, characterized in that, After determining the current segmentation element corresponding to the current binning element based on the current segmentation contrast ratio, the first segmentation element, and the second segmentation element, the method further includes: Update the splitting position and return to the execution. If the splitting position meets the splitting conditions, split the current bin element to be split according to the splitting position to obtain the first splitting element and the second splitting element. Repeat the operation of obtaining the first splitting element and the second splitting element until the splitting position no longer meets the splitting conditions.

4. The method according to claim 1, characterized in that, The step of determining the binning elements corresponding to each current binning element based on the current binning element includes: Sort the current segmentation elements according to the current segmentation ratio in the current segmentation elements; Based on the sorting result of the current segmentation elements, determine the segmentation elements to be segmented corresponding to the current binning element.

5. The method according to claim 1, characterized in that, After performing the segmentation process on the element to be segmented to obtain at least one element to be segmented, the method further includes: The elements to be divided into bins are updated according to the elements to be divided into bins, and the process of dividing the elements to be divided into bins is returned to obtain at least one element to be divided into bins. The process ends when the division process meets the set division end condition. The set segmentation termination condition includes at least one of the following: the current segmentation count is greater than or equal to the second segmentation threshold, the updated binning element is the same as the binning element, or the number of elements in the updated binning element is less than or equal to the preset minimum element number threshold. The element to be updated for binning is the element obtained by updating the element to be binned based on the element to be binned.

6. The method according to claim 1, characterized in that, The step of determining the feature binning interval based on each of the binning elements to be binned includes: Determine the element positions of each of the elements to be binned; Based on the element position of each element to be binned, determine the feature binning interval corresponding to each element to be binned; The feature binning interval is determined based on the segmentation interval of each feature bin.

7. A feature-separating device, characterized in that, include: The binning feature value determination module is used to determine the binning features and determine the binning feature values ​​of each sample data based on the binning features. The module for generating elements to be divided into bins is used to determine the elements to be divided into bins based on the feature values ​​of each bin to be divided, and to perform a segmentation process on the elements to be divided into bins to obtain at least one element to be divided into bins. The binning interval coding generation module is used to determine the feature binning interval based on each of the elements to be binned, and to encode the feature binning interval to obtain the binning interval code. The feature binning module is used to bin the features to be binned according to the feature binning interval and the binning interval encoding; wherein, the binned dataset is used to train the click-through rate prediction model; The feature sorting device is also used for: Before determining the characteristics to be sorted, item exposure data and user behavior feedback data within a set time period are acquired, and data labels for item exposure data are determined based on user behavior feedback data. A sample dataset is then determined based on the item exposure data and data labels, thereby generating features for each sample data in the sample dataset. The user behavior feedback data is user click data. The generated features include user-side features or item-side features. The module for generating binning elements is specifically used for: determining the target sample difference rate of the binning elements, and sorting the binning elements according to the target sample difference rate; determining the current binning elements according to the sorting result; performing segmentation processing on each current binning element to obtain the current segmentation element corresponding to each current binning element; and determining the binning elements corresponding to each current binning element based on the current segmentation element. The module for generating bin-to-be-divided elements is further configured to: determine a division position based on the elements in the current bin-to-be-divided elements and a preset minimum threshold for the number of elements; if the division position satisfies the division conditions, perform division processing on the current bin-to-be-divided elements according to the division position to obtain a first division element and a second division element; determine a first sample difference rate of the first division element and a second sample difference rate of the second division element, and determine a current division ratio based on the first sample difference rate and the second sample difference rate; if the current division ratio is greater than or equal to a first division threshold, determine the current division element corresponding to the current bin-to-be-divided elements based on the current division ratio, the first division element, and the second division element.

8. An electronic device, characterized in that, The electronic device includes: At least one processor; and A memory communicatively connected to the at least one processor; wherein, The memory stores a computer program that can be executed by the at least one processor to enable the at least one processor to perform the feature binning method according to any one of claims 1-6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions that cause a processor to execute the feature binning method of any one of claims 1-6.

Citation Information

Patent Citations

  • Data processing method and device and target object risk monitoring method

    CN111105144A