Data pushing method and device, electronic equipment and readable storage medium
By building and updating the classification tree, filtering out the target data for pushing, the subjectivity and relevance problems in the determination of key operation data in the existing technology are solved, and the accuracy of the data and the correlation with business indicators are improved.
Patent Information
- Application Number
- CN202311324087.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-11
- Publication Date
- 2025-04-11
AI Technical Summary
When determining key operational data, the existing technology relies too much on operational experience and is highly subjective, and cannot guarantee the correlation between data and business indicators, and cannot meet the requirements of high accuracy and relevance at the same time.
By obtaining the pending data and its classification indicators, performing classification operations to determine the initial type, building the initial classification tree, calculating the gain value, updating the classification tree to obtain the target classification tree, and filtering out the target data for pushing.
Improve the accuracy of push target data and its correlation with business metrics, ensuring the accuracy and relevance of key operational data.
Smart Images

Figure CN119807511A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a data push method, device, electronic device and readable storage medium. Background Art
[0002] With the development of network technology, in order to improve the conversion rate of advertising, product promotion, data push and other services, key operation data of business delivery objects are usually mined, such as click-through rate, 24-hour retention, etc. After determining the above key operation data, it is pushed to the relevant system to optimize the next round of business content, as well as business indicators such as conversion rate and number of followers. Usually, key operation data can be determined based on operational experience or through correlation analysis with business indicators.
[0003] However, the method based on operational experience is too dependent on the experience of operators and is highly subjective, and cannot guarantee the relevance of key operational data to business indicators. Even if relatively relevant data is determined, it cannot be guaranteed to be the most relevant and accurate key operational data.
[0004] Therefore, the above two methods of determining key operating data cannot simultaneously meet the requirements of high accuracy and relevance to business indicators. Summary of the invention
[0005] The embodiments of the present application provide a data push method, device, electronic device and storage medium, which can improve the accuracy of pushed target data and its correlation with business indicators.
[0006] A first aspect of an embodiment of the present application provides a data push method, the method comprising:
[0007] Acquire data to be processed and classification indicators of the data to be processed;
[0008] According to the classification index, the data to be processed are classified to obtain the initial type of each data to be processed;
[0009] According to the classified data to be processed, construct a corresponding initial classification tree;
[0010] Calculating a gain value of each of the data to be processed according to the data structure of the initial classification tree and the initial type of each of the data to be processed, wherein the gain value represents the priority of using the data to be processed as a branch node of the initial classification tree;
[0011] According to the gain value of each of the data to be processed, the initial classification tree is updated to obtain a target classification tree, wherein the target classification tree updates the initial type of the data to be processed to the target type;
[0012] According to the data structure of the target classification tree and the target type of each of the data to be processed, the target data is screened out from the data to be processed for pushing.
[0013] Accordingly, a second aspect of an embodiment of the present application provides a data push device, the device comprising:
[0014] A data acquisition unit, used to acquire the data to be processed and the classification index of the data to be processed;
[0015] An initial type determination module, used to perform a classification operation on the data to be processed according to the classification index to obtain an initial type of each of the data to be processed;
[0016] An initial classification tree construction unit, used to construct a corresponding initial classification tree according to the classified data to be processed;
[0017] A gain value calculation unit, used for calculating the gain value of each of the to-be-processed data according to the data structure of the initial classification tree and the initial type of each of the to-be-processed data, wherein the gain value represents the priority of using the to-be-processed data as a branch node of the initial classification tree;
[0018] A target classification tree construction unit, used for updating the initial classification tree according to the gain value of each of the data to be processed to obtain a target classification tree, wherein the target classification tree updates the initial type of the data to be processed to a target type;
[0019] The data pushing unit is used to filter out target data from the data to be processed for pushing according to the data structure of the target classification tree and the target type of each of the data to be processed.
[0020] Optionally, each layer of the data structure of the initial classification tree is constructed layer by layer through an initial decision tree model;
[0021] The gain value calculation module comprises:
[0022] The objective function sub-operator unit is used to calculate the first objective function and the second objective function of each of the to-be-processed data under each splitting condition, wherein the first objective function represents the fitting effect of the initial decision tree model before the to-be-processed data is split, and the second objective function represents the fitting effect of the initial decision tree model after the to-be-processed data is split;
[0023] The gain value calculation subunit is used to calculate the gain value of the data to be processed according to the first objective function and the second objective function, and use the node data of the splitting condition corresponding to the maximum gain value as the branch node of the current layer of the initial classification tree.
[0024] Optionally, the objective function sub-operator unit is further specifically used for:
[0025] According to the initial type of the data to be processed, the data to be processed is classified into left subtree samples and right subtree samples, wherein the left subtree samples are a set of data to be trained that meets the splitting condition, and the right subtree samples are a set of data to be trained that does not meet the splitting condition;
[0026] Calculate the sum of the first-order derivatives of the left subtree samples and the right subtree samples, and calculate the sum of the second-order derivatives of the left subtree samples and the right subtree samples;
[0027] Obtaining a regularization parameter for preventing the initial decision tree model from overfitting;
[0028] The first objective function and the second objective function are calculated according to the sum of the first-order derivatives, the sum of the second-order derivatives, and the regularization parameter.
[0029] Optionally, the target classification tree construction unit includes:
[0030] A branch node determination subunit, used to obtain the branch nodes of each layer in the initial classification tree determined by the initial decision tree model;
[0031] A model training subunit is used to update the branch depth of the initial classification tree by taking the branch nodes of each layer as the splitting condition of each layer of the data structure in the initial classification tree, and when the gain value or the branch depth of the initial classification tree meets a preset condition, stop training the initial decision tree model to obtain a trained decision tree model;
[0032] A model optimization subunit, configured to optimize the parameters of the initial decision tree model according to the predicted value of the classification index obtained by processing the data to be processed by the decision tree model, and the true value corresponding to the predicted value, so as to obtain an optimized decision tree model;
[0033] The target classification tree construction subunit is used to process the data to be processed according to the optimized decision tree model to construct the target classification tree.
[0034] Optionally, the preset condition is that the gain value is smaller than a first preset threshold, or the branch depth of the initial classification tree is greater than a second preset threshold.
[0035] Optionally, the data pushing unit includes:
[0036] A target branch node determination subunit, used to determine the target branch node of each layer in the target classification tree according to the data structures of the plurality of target classification trees;
[0037] A total gain value calculation subunit is used to calculate the total gain value of each of the to-be-processed features in the multiple target classification trees according to the multiple target branch nodes and the target type of each of the to-be-processed data;
[0038] The data push subunit is used to select target data that meets preset push conditions from the multiple data to be processed and push them according to each of the data to be processed and the total gain value of each of the data to be processed.
[0039] Optionally, the data push subunit is further specifically used for:
[0040] According to the size of the total gain value, the plurality of data to be processed are sorted to obtain a gain feature sequence;
[0041] Deleting the gain features in the gain feature sequence whose feature type belongs to the target feature type and whose feature conversion rate is less than a third preset threshold value, to obtain an updated gain feature sequence;
[0042] The target number data is screened out and pushed according to the order of the total gain values in the updated gain feature sequence.
[0043] A third aspect of an embodiment of the present application provides an electronic device, including:
[0044] Processors and storage media;
[0045] The processor is used to implement each instruction;
[0046] The storage medium is used to store a plurality of instructions, and the instructions are used to be loaded by a processor and execute the above-mentioned data pushing method.
[0047] The fourth aspect of the embodiments of the present application also provides a computer-readable storage medium, which stores multiple instructions, and the instructions are suitable for a processor to load to execute the steps in any data push method provided in the embodiments of the present application.
[0048] The fifth aspect of the embodiments of the present application also provides a computer program product, including a computer program or instructions, which, when executed by a processor, implements any one of the data push methods provided in the embodiments of the present application.
[0049] It can be seen that, by applying the embodiment of the present application, the data to be processed and the classification index of the data to be processed can be obtained first. Since the classification index can be one of the business indexes, or a data index with a strong correlation with the business index, the data to be processed is classified according to the classification index, and the initial type of each data to be processed is obtained, which has a strong correlation with the business index. After that, according to the classified data to be processed, the corresponding initial classification tree is constructed, and then the gain value of each data to be processed is calculated according to the data structure of the initial classification tree and the initial type of each data to be processed, and then the gain value of the above data to be processed is used to train the model for constructing the initial decision tree, so that according to the gain value of each data to be processed, the initial classification tree is updated, and a target classification tree is obtained that is more accurate in classifying the data to be processed and mining the key operation data. Finally, according to the data structure of the target classification tree and the target type of each data to be processed, the target data is filtered out from the data to be processed for pushing, so that the target data of the key operation filtered out has a high correlation with the classification index, and the accuracy of the key operation data is determined is high. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0051] Figure 1 It is a schematic diagram of an application scenario of the data push method provided in an embodiment of the present application;
[0052] Figure 2a It is a flowchart of the data push method provided in the embodiment of the present application;
[0053] Figure 2b It is a flowchart of the data push method provided in the embodiment of the present application;
[0054] Figure 3a is another flow chart of the data push method provided in an embodiment of the present application;
[0055] Figure 3b is another flow chart of the data push method provided in an embodiment of the present application;
[0056] Figure 3c is a data structure diagram of a target decision tree provided in an embodiment of the present application;
[0057] Figure 4 It is a structural diagram of a data push device provided in an embodiment of the present application;
[0058] Figure 5It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0059] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0060] In order to realize the automatic subcontracting operation of the application, improve the subcontracting efficiency, reduce the complexity of subcontracting and the human resources required for subcontracting, the embodiments of the present application provide a data push method, device, medium and equipment. The technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application. Examples of the embodiments are shown in the drawings, where the same or similar numbers throughout represent the same or similar elements or elements with the same or similar functions.
[0061] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or server that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0062] In order to facilitate understanding of the technical solutions described in the embodiments of the present application and the technical effects produced therefrom, the embodiments of the present application explain the relevant professional terms involved:
[0063] Key Action: An object event customized by the advertiser to complete a certain action or combination of actions within the app.
[0064] Key operation reporting: refers to the process of transmitting the key operation data performed by the object back to the advertising platform or other related systems.
[0065] Indicators: A series of observable and retrievable parameters that can measure the operational characteristics of an object, such as average activity per person, average time spent per person, and average revenue per person.
[0066] Decision tree model: A nonparametric supervised learning algorithm for classification and regression tasks. It is a hierarchical tree structure consisting of a root node, branches, internal nodes, and leaf nodes.
[0067] North Star Metric: This is the absolute core metric that is relevant to the business or strategy at the current stage of the product. It usually represents the main goal of the business, such as object LTV7 (7-day object life cycle value).
[0068] arpu: Average Revenue Per User, the average profit that the enterprise obtains from each object in the same time period, and arpu7d is the average profit of the object within 7 days.
[0069] ecpm: Effective Cost Per Mille, is the fee that advertisers pay for every 1,000 ad impressions (mille is thousand in Latin).
[0070] ecpm1d: Correlation Analysis, correlation analysis is a method used to measure the degree of correlation between two or more variables, defined as ltv1 / (pv1d+100), where ltv1 is the first-day revenue of the object and pv1d is the number of times the object is exposed to the advertisement.
[0071] Correlation analysis: refers to the analysis of two or more correlated variable elements to measure the degree of correlation between the two variable factors.
[0072] The embodiment of the present invention provides a data push method, device and readable storage medium. The data push device can be integrated in an electronic device, which can be a server or a terminal.
[0073] Among them, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, network acceleration services (Content Delivery Network, CDN), and basic cloud computing services such as big data and artificial intelligence platforms. The terminal can be a smart phone, tablet computer, laptop computer, desktop computer, smart speaker, smart watch, etc., but is not limited to this. The terminal and the server can be directly or indirectly connected via wired or wireless communication, and this application does not limit this.
[0074] For example, see Figure 1 Taking the data push device integrated in the server as an example, the server can obtain the data to be processed and the classification index of the data to be processed; according to the classification index, the data to be processed is classified to obtain the initial type of each of the data to be processed; according to the classified data to be processed, a corresponding initial classification tree is constructed; according to the data structure of the initial classification tree and the initial type of each of the data to be processed, a gain value of each of the data to be processed is calculated, wherein the gain value represents the priority of using the data to be processed as a branch node of the initial classification tree; according to the gain value of each of the data to be processed, the initial classification tree is updated to obtain a target classification tree, wherein the target classification tree updates the initial type of the data to be processed to the target type; according to the data structure of the target classification tree and the target type of each of the data to be processed, the target data is filtered out from the data to be processed for pushing.
[0075] It should be noted that the description order of the following embodiments is not intended to limit the preferred order of the embodiments.
[0076] This embodiment will be described from the perspective of a data push device, which can be integrated into an electronic device, which can be a server or a terminal, etc. The terminal includes but is not limited to a mobile phone, a computer, an intelligent voice interaction device, an intelligent home appliance, a vehicle terminal, an aircraft, etc. The embodiment of the present invention can be applied to various scenarios, including but not limited to cloud technology, artificial intelligence, smart transportation, assisted driving, etc.
[0077] A data push method, comprising:
[0078] Acquire data to be processed and classification indicators of the data to be processed;
[0079] According to the classification index, the data to be processed are classified to obtain the initial type of each data to be processed;
[0080] According to the classified data to be processed, construct a corresponding initial classification tree;
[0081] Calculating a gain value of each of the data to be processed according to the data structure of the initial classification tree and the initial type of each of the data to be processed, wherein the gain value represents the priority of using the data to be processed as a branch node of the initial classification tree;
[0082] According to the gain value of each of the data to be processed, the initial classification tree is updated to obtain a target classification tree, wherein the target classification tree updates the initial type of the data to be processed to the target type;
[0083] According to the data structure of the target classification tree and the target type of each of the data to be processed, the target data is screened out from the data to be processed for pushing.
[0084] The following introduces a data push method provided by this application. Figure 2a It is a flowchart of a data push method provided by an embodiment of the present application. The present application provides method operation steps as described in the embodiment or flowchart, but may include more or fewer operation steps based on conventional or non-creative labor. The order of steps listed in the embodiment is only one way of executing the steps among many orders, and does not represent the only order of execution. When the actual system or server product is executed, it can be executed in sequence or in parallel according to the method shown in the embodiment or the accompanying drawings (for example, in a parallel processor or multi-threaded processing environment). Please refer to Figure 2a A data push method provided in an embodiment of the present application may include the following steps:
[0085] Step 101: Obtain data to be processed and classification indicators of the data to be processed.
[0086] Among them, the data to be processed in this application refers to the data generated or related to the business delivery process. For example, in the advertising delivery scenario, the data to be processed can be the data collected from the browser in the object client and the behavior log of the new object in the novel application. It is understandable that the behavior log contains various behaviors of the object in the application, such as the length of time browsing novels, the length of time browsing advertisements, the next day retention, the 24-48 hour retention, the number of advertisement exposures, etc. The data to be processed corresponding to these behaviors are the original data that advertisers hope to use to optimize their advertising delivery strategies.
[0087] In some embodiments, the data to be processed may also include specific data values, which can also be understood as the data to be processed also including sub-data of the downward dimension. For example, if the data to be processed is "duration of browsing advertisements", then the data to be processed may also specifically include sub-data represented by specific numerical values such as the duration of browsing advertisements being 1 hour, 2 hours, etc.
[0088] Among them, the classification indicator can be the North Star indicator of the business, or a business indicator related to the North Star indicator. For example, the classification indicator can be ltv7, the time spent browsing novels, the time spent browsing advertisements, the number of advertisement exposures, the basic attributes of the object, the relevant time dimension, etc.
[0089] It can be seen that the data to be processed is multi-dimensional data extracted from the object operation log. The data is organized and analyzed according to different classification indicators to better understand the correlation between object operations and key operations, so as to optimize advertising delivery strategies and improve business indicators.
[0090] It is understandable that in the specific implementation of the present application, the data to be processed may involve relevant data such as object information. When the above embodiments of the present application are applied to specific products or technologies, the object's permission or consent is required, and the collection, use and processing of relevant data must comply with relevant laws, regulations and standards of relevant countries and regions.
[0091] Step 102: Classify the data to be processed according to the classification index to obtain an initial type of each data to be processed.
[0092] In some embodiments, the data to be processed can be classified according to the classification index to obtain the corresponding initial type. For example, the data to be processed can be classified according to different behavioral indicators of the object, such as placing the data to be processed into corresponding categories according to the length of time the novel is browsed, the number of advertisement exposures, etc. For example, the initial type of the data to be processed can be determined as "the length of time the novel is browsed is greater than or equal to 24 hours" and "the length of time the novel is browsed is less than 24 hours".
[0093] For another example, the data to be processed can be distinguished into different initial types of objects according to the attribute data of the object, for example, the data can be classified by age, geographical location, etc. For example, the initial data to be processed can be divided into two initial types: those over 30 years old and those under 30 years old.
[0094] In some embodiments, assuming that the North Star indicator is LTV7, the data to be processed can be sorted from large to small according to LTV7, and the initial type of the top 20% of the data to be processed is set to 1, and the initial type of the remaining data to be processed is set to 0. It can be understood that the data to be processed with the initial type can be regarded as a labeled training sample, which is used for the initial decision tree model mentioned in the subsequent steps, so as to perform the subsequent operation of predicting the target data through the trained decision tree model.
[0095] It should be noted that the initial type can be flexibly determined according to the type and size of the classification indicator, and this embodiment does not limit the specific name and classification of the initial type.
[0096] Step 103: construct a corresponding initial classification tree according to the classified data to be processed.
[0097] In some embodiments, the initial classification tree may be a tree structure with only a root node. For example, the initial classification tree may be constructed based on the to-be-processed data "the duration of page browsing by the object", for example, the page browsing duration of object a is 1 hour, and the page browsing duration of object b is 2.5 hours.
[0098] Furthermore, assuming that the classification indicator is that the object browses the page for more than 2 hours, the initial type of the data to be processed corresponding to object a can be set to 0, and the initial type of the data to be processed corresponding to object b can be set to 1, and then the structure of the initial classification tree containing initial types 1 and 0 can be constructed based on the above two classified data to be processed.
[0099] In some embodiments, in order to more clearly present the structure of the initial classification tree, the structure of the initial classification tree shown in Table 1 below may be referred to:
[0100] Object age income Buy or not 1 25 5000 1 2 30 8000 1 3 20 3000 0 4 35 6000 0
[0101] Table 1
[0102] According to the content in Table 1, the initial classification tree includes two data to be processed: age and income. However, the initial classification tree only has a root node and no branch nodes, and thus no corresponding branch structures and child nodes.
[0103] Step 104: Calculate the gain value of each of the data to be processed according to the data structure of the initial classification tree and the initial type of each of the data to be processed.
[0104] The gain value represents the priority of using the data to be processed as the branch node of the initial classification tree. It can be understood that in order to ensure the rationality of the data structure of the initial classification tree and the accuracy of the subsequent prediction of the target data through the initial classification tree, the gain value of each feature can be calculated, and the optimal branch node of the classification tree structure can be determined based on the calculated gain value.
[0105] Among them, each layer of the data structure of the initial classification tree can be constructed layer by layer through the initial decision tree model. In some embodiments, the initial decision tree model can calculate the branch nodes of each layer of the initial classification tree to determine the final data structure of the initial classification tree. For example, the initial decision tree model can calculate the branch nodes of the current layer of the initial decision tree, so that the data of the current layer of the initial decision tree can be split based on the branch nodes to generate the data structure of the next layer of the initial classification tree, and iteratively execute the steps of calculating each layer of branch nodes until a complete initial classification tree is obtained.
[0106] In some embodiments, Table 1 can be regarded as an operation feature table of an object, and the operation feature table can be encoded into a feature vector X as a training data set for training an initial decision tree model. For example, the feature vector X includes the age vector and income vector of the object.
[0107] Optionally, step 104 may include the following steps:
[0108] Calculate the first objective function and the second objective function of each of the data to be processed under each splitting condition, wherein the first objective function represents the fitting effect of the initial decision tree model before the data to be processed is split, and the second objective function represents the fitting effect of the initial decision tree model after the data to be processed is split;
[0109] According to the first objective function and the second objective function, the gain value of the data to be processed is calculated, and the node data of the splitting condition corresponding to the maximum gain value is used as the branch node of the current layer of the initial classification tree.
[0110] The splitting condition refers to the condition for splitting the data to be processed, for example, the splitting condition may be "revenue is less than 5500". In some embodiments, at least one splitting condition may be determined by a greedy algorithm, a full permutation method, a binary method, a quantile method, and an information entropy method. Taking the data to be processed of "revenue" in Table 1 as an example, assuming that "revenue is less than 5500" and "revenue is less than 6100" are determined as two splitting conditions by the above algorithm, the branch nodes corresponding to the splitting conditions are "revenue is 5500" and "revenue is 6100".
[0111] In some embodiments, after determining multiple split conditions, the gain value calculation formula described below can be used to calculate the gain value of the data to be processed under each split condition, and the node data of the split condition corresponding to the maximum gain value is used as the branch node of the current layer of the initial classification tree. For example, after calculation, the gain value of the data to be processed under the split condition of "revenue is less than 5500" is greater than the gain value under the split condition of "revenue is less than 6100", so "revenue is 5500" can be determined as the branch node of the current layer of the initial classification tree, and the data to be processed that meets the split condition can be divided into the structure of the left subtree, and the data to be processed that does not meet the split condition can be divided into the structure of the right subtree, that is, the revenue data of objects 1 and 3 with revenue less than 5500 are divided into the left subtree of the initial classification tree to obtain the left subtree sample. The profit data of objects 2 and 4 whose profits are greater than 5500 are divided into the right subtree of the initial classification tree to obtain the right subtree samples, and then the gain value of the "profit" of the data to be processed in the next layer of the initial classification tree is calculated through the left subtree samples, the right subtree samples and their corresponding initial types.
[0112] It can be understood that in the process of building a decision tree, each data point will be assigned to a node. In each layer of the decision tree, the branch node corresponding to the split condition determines the next destination of the data point, that is, the data point will enter the left subtree or right subtree of the next layer of the decision tree. As mentioned above, the branch node of each data to be processed in the initial classification tree can be calculated by algorithms such as greedy algorithm, full permutation method, binary method, quantile method and information entropy method.
[0113] In some embodiments, in the construction of the decision tree, two objective functions may be calculated, namely a first objective function and a second objective function of the data to be processed, and the two objective functions are used to evaluate the fitting effect before and after the data points are split.
[0114] Among them, the first objective function can be used to measure the data fitting effect before the current branch node. The first objective function usually takes into account the distribution and fit of the data on the current node, as well as regularization terms to prevent model overfitting, such as λ and γ parameters. Among them, the second objective function can be used to measure the data fitting effect after the current branch node. The second objective function usually takes into account the distribution of data in the left subtree and the right subtree after the split, as well as the corresponding regularization terms.
[0115] In some embodiments, the gain value is calculated by comparing the first objective function and the second objective function, and is used to determine whether to split the current node and how to split it. Generally, the calculation formula of the gain value is as follows:
[0116] Gain=Obj1-Obj2
[0117] Where Obj1 is the first objective function, Obj2 is the second objective function, and Gain is the gain value. The gain value indicates the degree of improvement of the model effect after the split compared with that before the split. If the gain value is large enough, it means that the split will improve the model performance, so the current node can be selected for splitting.
[0118] In summary, the process of calculating the gain value involves calculating the model fitting effect before and after the split of each data point, and determining whether to split the node and how to split it by comparing these two effects. The gain value is a key indicator for guiding the construction of decision trees.
[0119] Optionally, the step of “calculating the first objective function and the second objective function of each of the to-be-processed data under each splitting condition” includes:
[0120] According to the initial type of the data to be processed, the data to be processed is classified into left subtree samples and right subtree samples, wherein the left subtree samples are a set of data to be trained that meets the splitting condition, and the right subtree samples are a set of data to be trained that does not meet the splitting condition;
[0121] Calculate the sum of the first-order derivatives of the left subtree samples and the right subtree samples, and calculate the sum of the second-order derivatives of the left subtree samples and the right subtree samples;
[0122] Obtaining a regularization parameter for preventing the initial decision tree model from overfitting;
[0123] The first objective function and the second objective function are calculated according to the sum of the first-order derivatives, the sum of the second-order derivatives, and the regularization parameter.
[0124] In some embodiments, the formulas for the first objective function, the second objective function, and the expanded calculation gain value are as follows:
[0125]
[0126]
[0127]
[0128] Among them, G L is the sum of the first-order derivatives of the left subtree samples, G R is the sum of the first-order derivatives of the right subtree samples, H L The sum of the second-order derivatives of the left subtree samples, H R is the sum of the second-order derivatives of the right subtree samples, and λ and γ are parameters to prevent the model from overfitting.
[0129] Specifically, the following will take the data structure of the initial classification tree in Table 1 as an example, take the branch node with a profit of 5500 as the branch node, and calculate G L , G R , H L and H R The process is as follows:
[0130] It can be seen that object 1 and object 3 are in the left subtree, and their benefits are both less than 5500. Calculate the first-order derivative G of the left subtree L , which is the sum of the product of each object’s purchase status (1 or 0) and the payoff:
[0131] G L =(1*5000)+(0*3000)=5000
[0132] Calculate the second-order derivative H of the left subtree L , which is the sum of the purchase status (1 or 0) and the square of the payoff for each object:
[0133] H L =(1×5000 2 )+(0×3000 2)=25000000
[0134] It can be seen that objects 2 and 4 are in the right subtree, and their benefits are greater than or equal to 5500. Calculate the first-order derivative G of the right subtree R , which is the sum of the product of each object’s purchase status (1 or 0) and the payoff:
[0135] G R =(1×8000)+(0×6000)=8000
[0136] Calculate the second-order derivative H of the right subtree R , which is the sum of the purchase status (1 or 0) and the square of the payoff for each object:
[0137] H R =(1×8000 2 )+(0×6000 2 )=64000000
[0138] Step 105: Update the initial classification tree according to the gain value of each of the data to be processed to obtain a target classification tree.
[0139] Among them, the target classification tree can update the initial type of the data to be processed to the target type.
[0140] It is understandable that since the initial classification tree is constructed by the initial decision tree model, after training the initial decision tree model with the data to be processed and the corresponding labels, a trained decision tree model can be obtained. It is also understandable that since the trained decision tree model is better than the initial decision tree model in model performance, the initial classification tree can be updated by the trained decision tree model to obtain a target classification tree with a more reasonable data structure. The target classification tree can update the initial type of the data to be processed to the target type, so that the classification of each data to be processed is more accurate.
[0141] Optionally, step 105 may include:
[0142] Obtaining branch nodes of each layer in the initial classification tree determined by the initial decision tree model;
[0143] Taking the branch nodes of each layer as the splitting conditions of each layer of the data structure in the initial classification tree, updating the branch depth of the initial classification tree, and when the gain value or the branch depth of the initial classification tree of the data to be processed meets the preset conditions, stopping the training of the initial decision tree model to obtain a trained decision tree model;
[0144] According to the predicted value of the classification index obtained by processing the data to be processed by the decision tree model, and the true value corresponding to the predicted value, the parameters of the initial decision tree model are optimized to obtain an optimized decision tree model;
[0145] The data to be processed is processed according to the optimized decision tree model to construct the target classification tree.
[0146] In some embodiments, the preset condition may be that the gain value is less than a first preset threshold. It is understood that as the initial decision tree model updates the branch depth of the initial classification tree by calculating the branch nodes of each layer, when the branch depth reaches a certain layer, the gain value of the data to be processed is already less than the first preset threshold, indicating that continuing to split the data structure of the initial classification tree is less helpful for improving the model performance. Stopping training after meeting this condition can prevent the model from overfitting, avoid over-optimization on the training data, and make the model have stronger generalization ability. In some embodiments, the preset condition may be that the branch depth of the initial classification tree is greater than the second preset threshold. It is understood that stopping model training when this condition is met can control the maximum depth of the initial classification tree, stop the data structure of the initial classification tree from continuing to split, thereby avoiding the generation of an overly complex initial classification tree, and on the basis of ensuring the training effect of the decision tree model, control the complexity of the decision tree model, and reduce the computational cost and data storage cost of model training.
[0147] In some embodiments, the predicted value can be a classification metric, a North Star metric, or relevant business data, such as LTV7, object conversion rate, etc.
[0148] It can be understood that as the initial decision tree model determines the branch nodes of each layer in the initial classification tree, the branch depth of the initial classification tree will increase accordingly. For example, the data structure of the current layer of the initial classification tree is split, and the data to be processed after the split will be divided downward into the left subtree samples and the right subtree samples of the next layer of the initial classification tree to generate the next layer of the data structure of the initial classification tree, thereby increasing the branch depth of the initial classification tree by one layer.
[0149] Please refer to Figure 3b , Figure 3b FIG. 1 is another flow chart of the data push method provided in the embodiment of the present application. Figure 3b As shown, in some embodiments, the operation of calculating the gain value of each data to be processed is repeated for each leaf node of the next layer of the initial classification tree until the preset conditions that the gain value is less than the first preset threshold or the branch depth of the initial classification tree is greater than the second preset threshold are met, then the training is stopped to obtain a trained decision tree model.
[0150] It can be understood that for each leaf node in the classification tree constructed by the intermediate model during the training process, the operation of calculating the gain value of the data to be processed will be repeated, that is, a new classification tree will be built to fit the residual of each leaf node, that is, the difference between the true value and the predicted value of the current model. This new classification tree will try to correct the error of the first tree to reduce the residual of the model. With this process iteratively, a new classification tree will be built in each round to fit the residual of the previous round of model, and finally multiple classification trees will be obtained.
[0151] In some embodiments, the predicted values y of all generated classification trees can be k Add, k represents the number of different trees, and get the total predicted value Then, calculate the total predicted value The difference between the true value y and the true value y measures the fitting performance of the current model.
[0152] Next, the fit index of the next tree can be determined based on this difference. Generally speaking, the next tree will try to fit the pattern that the previous model failed to capture to reduce the difference between the predicted value and the true value. This process is also an iterative process, repeated for multiple rounds until a specific stopping condition is met, such as the prediction performance is good enough or the number of trees reaches a preset number.
[0153] Finally, the combination of multiple classification trees will form an optimized decision tree model for prediction tasks. This model can effectively capture complex patterns in the data because each round tries to correct the errors of the previous round model, thereby improving the overall prediction performance.
[0154] Step 106: According to the data structure of the target classification tree and the target type of each of the data to be processed, select the target data from the data to be processed for pushing.
[0155] Please refer to Figure 3a and Figure 3c , Figure 3a is another flow chart of the data push method provided in the embodiment of the present application, Figure 3c Schematic diagram of the data structure of the target decision tree provided in the embodiment of the present application. Figure 3c As shown in the figure, back_id is the second retention, value is the number of samples with label 1 and label 0 respectively, class is the label value, gini index is an indicator used to measure the impurity or chaos of the node, samples is the number of samples, and duration_24h is the number of samples with a reading time of 24 hours.
[0156] According to the above content, if Figure 3cThe target classification tree can effectively and accurately classify 31458 samples into two target types, and obtain more accurate labels for the data to be classified. It can be understood that since the labels of the data to be classified can be used to calculate the gain value of each data to be processed, and the gain value is the most important indicator for screening out the target data, that is, the key operation data. Therefore, according to the above description, the target classification tree constructed by the optimized decision tree model can accurately calculate the gain value of each data to be processed, thereby accurately determining the target data with the strongest correlation with the North Star indicator.
[0157] Optionally, step 106 may include:
[0158] A target branch node determination subunit, used to determine the target branch node of each layer in the target classification tree according to the data structures of the plurality of target classification trees;
[0159] Calculate the total gain value of each of the to-be-processed features in the multiple target classification trees according to the multiple target branch nodes and the target type of each of the to-be-processed data;
[0160] According to each of the to-be-processed data and the total gain value of each of the to-be-processed data, target data satisfying a preset push condition is selected from the plurality of to-be-processed data for push.
[0161] It can be understood that since the size of the gain value of the feature to be processed can reflect the degree of influence of the data to be processed on the classification index and the North Star index, the total gain value of each data to be processed can be calculated, and the size of the total gain value can be sorted as the most important basis for subsequent screening of the target data, thereby improving the accuracy of determining the target data and the correlation with the North Star index.
[0162] Optionally, the step of “selecting target data satisfying preset push conditions from the plurality of data to be processed for push according to each of the data to be processed and the total gain value of each of the data to be processed” includes:
[0163] According to the size of the total gain value, the plurality of data to be processed are sorted to obtain a gain feature sequence;
[0164] Deleting the gain features in the gain feature sequence whose feature type belongs to the target feature type and whose feature conversion rate is less than a third preset threshold value, to obtain an updated gain feature sequence;
[0165] The target number data is screened out and pushed according to the order of the total gain values in the updated gain feature sequence.
[0166] Just as an example, for the target classification tree 1: the gain of feature A in the classification tree 1 is 0.2, the gain of feature B in the classification tree 1 is 0.4, and the gain of feature C in the classification tree 1 is 0.1.
[0167] For the target classification tree 2: the gain of feature A in the classification tree 2 is 0.3, the gain of feature D in the classification tree 2 is 0.5, and the gain of feature E in the classification tree 2 is 0.2.
[0168] For the target classification tree 3: the gain of feature B in the classification tree 3 is 0.1, the gain of feature F in the classification tree 3 is 0.4, and the gain of feature G in the classification tree 3 is 0.3.
[0169] In some embodiments, for each feature, its gain in all trees is added to obtain a total gain. Feature A total gain = 0.2 + 0.3 + 0 = 0.5, feature B total gain = 0.4 + 0 + 0.1 = 0.5, feature C total gain = 0.1 + 0 + 0 = 0.1, feature D total gain = 0 + 0.5 + 0 = 0.5, feature E total gain = 0 + 0.2 + 0 = 0.2, feature F total gain = 0 + 0 + 0.4 = 0.4, feature G total gain = 0 + 0 + 0.3 = 0.3. Feature sequence sorted by gain value: feature A, feature B, feature D, feature F, feature G, feature E, feature C.
[0170] In some embodiments, the sorted feature sequence is traversed, and feature A is first selected. Check whether feature A is a user basic attribute feature or whether its conversion rate is less than 10%. If so, feature A is marked as a key operation feature and reported to the advertising platform. If not, continue to select feature B, and so on, until a feature that meets the conditions is found.
[0171]
[0172] Table 2
[0173] As shown in Table 2, after the target data is determined by the method of the present application and uploaded to the relevant business system, the optimized business delivery has an improvement space of more than 11% for Ltv7 in positions 1 and 2. For example, the improvement space of "24-hour stay duration" in position 1 is calculated as: 2.57 / 2.32-1=11%, the improvement space in position 2 is calculated as 2.07 / 1.9-1=11.11%, the improvement space of "24-hour stay" in position 1 is calculated as: 3.24 / 2.32=33%, and the improvement space of "24-hour stay" in position 2 is calculated as 2.38 / 1.9=21.38.
[0174]
[0175]
[0176] Table 3
[0177] As shown in Table 3, after the target data is determined to be uploaded to the relevant business system using the method of the present application, the optimized business is reflected by dates D and E. While the number of daily active users dau is reduced, the Ltv7 value is significantly improved.
[0178] It can be seen that, by applying the embodiment of the present application, the data to be processed and the classification index of the data to be processed can be obtained first. Since the classification index can be one of the business indexes, or a data index with a strong correlation with the business index, the data to be processed is classified according to the classification index, and the initial type of each data to be processed is obtained, which has a strong correlation with the business index. After that, according to the classified data to be processed, the corresponding initial classification tree is constructed, and then the gain value of each data to be processed is calculated according to the data structure of the initial classification tree and the initial type of each data to be processed, and then the gain value of the above data to be processed is used to train the model for constructing the initial decision tree, so that according to the gain value of each data to be processed, the initial classification tree is updated, and a target classification tree is obtained that is more accurate in classifying the data to be processed and mining the key operation data. Finally, according to the data structure of the target classification tree and the target type of each data to be processed, the target data is filtered out from the data to be processed for pushing, so that the target data of the key operation filtered out has a high correlation with the classification index, and the accuracy of the key operation data is determined is high.
[0179] Among them, another specific process of the above data push method is as follows, refer to Figure 2b , the method further comprises the following steps:
[0180] Step 201: Obtain data to be processed and classification indicators of the data to be processed;
[0181] Step 202: Classify the data to be processed according to the classification index to obtain the initial type of each data to be processed;
[0182] Step 203: construct a corresponding initial classification tree according to the classified data to be processed;
[0183] Step 204, calculating the first objective function and the second objective function of each of the to-be-processed data under each splitting condition;
[0184] Step 205: When the gain value or the branch depth of the initial classification tree meets the preset condition, stop training the initial decision tree model to obtain a trained decision tree model;
[0185] Step 206: Optimize the parameters of the initial decision tree model according to the predicted values of the classification indicators obtained by processing the data to be processed by the decision tree model, and the true values corresponding to the predicted values, to obtain an optimized decision tree model;
[0186] Step 207: Calculate the total gain value of each feature to be processed in the multiple target classification trees according to the multiple target classification trees and the target type of each data to be processed;
[0187] Step 208: According to each data to be processed and the total gain value of each data to be processed, target data that meets the preset push condition is selected from the multiple data to be processed for push.
[0188] It can be understood that the method of the embodiment of the present application can improve the accuracy of the pushed target data and its correlation with the business indicators.
[0189] The method described in the above embodiment will be further described in detail below.
[0190] like Figure 4 FIG. 1 is a schematic diagram of the structure of a data push device provided in an embodiment of the present application, and the device includes:
[0191] The data acquisition unit 301 is used to acquire the data to be processed and the classification index of the data to be processed;
[0192] An initial type determination unit 302, configured to perform a classification operation on the data to be processed according to the classification index to obtain an initial type of each of the data to be processed;
[0193] An initial classification tree construction unit 303 is used to construct a corresponding initial classification tree according to the classified data to be processed;
[0194] A gain value calculation unit 304 is used to calculate the gain value of each of the to-be-processed data according to the data structure of the initial classification tree and the initial type of each of the to-be-processed data, wherein the gain value represents the priority of using the to-be-processed data as a branch node of the initial classification tree;
[0195] A target classification tree construction unit 305 is used to update the initial classification tree according to the gain value of each of the data to be processed to obtain a target classification tree, wherein the target classification tree updates the initial type of the data to be processed to the target type;
[0196] The data pushing unit 306 is used to filter out target data from the data to be processed for pushing according to the data structure of the target classification tree and the target type of each of the data to be processed.
[0197] Optionally, each layer of the data structure of the initial classification tree is constructed layer by layer through an initial decision tree model;
[0198] The gain value calculation module comprises:
[0199] An objective function sub-operator unit is used to calculate a first objective function and a second objective function of each of the data to be processed under each splitting condition, wherein the first objective function represents the fitting effect of the initial decision tree model before the data to be processed is split, and the second objective function represents the fitting effect of the initial decision tree model after the data to be processed is split;
[0200] The gain value calculation subunit is used to calculate the gain value of the data to be processed according to the first objective function and the second objective function, and use the node data of the splitting condition corresponding to the maximum gain value as the branch node of the current layer of the initial classification tree.
[0201] Optionally, the objective function sub-operator unit is further specifically used for:
[0202] According to the initial type of the data to be processed, the data to be processed is classified into left subtree samples and right subtree samples, wherein the left subtree samples are a set of data to be trained that meets the splitting condition, and the right subtree samples are a set of data to be trained that does not meet the splitting condition;
[0203] Calculate the sum of the first-order derivatives of the left subtree samples and the right subtree samples, and calculate the sum of the second-order derivatives of the left subtree samples and the right subtree samples;
[0204] Obtaining a regularization parameter for preventing the initial decision tree model from overfitting;
[0205] The first objective function and the second objective function are calculated according to the sum of the first-order derivatives, the sum of the second-order derivatives, and the regularization parameter.
[0206] Optionally, the target classification tree construction unit 305 includes:
[0207] A branch node determination subunit, used to obtain the branch nodes of each layer in the initial classification tree determined by the initial decision tree model;
[0208] A model training subunit is used to update the branch depth of the initial classification tree by taking the branch nodes of each layer as the splitting condition of each layer of the data structure in the initial classification tree, and when the gain value or the branch depth of the initial classification tree of the data to be processed meets a preset condition, stop training the initial decision tree model to obtain a trained decision tree model;
[0209] A model optimization subunit, configured to optimize the parameters of the initial decision tree model according to the predicted value of the classification index obtained by processing the data to be processed by the decision tree model, and the true value corresponding to the predicted value, so as to obtain an optimized decision tree model;
[0210] The target classification tree construction subunit is used to process the data to be processed according to the optimized decision tree model to construct the target classification tree.
[0211] Optionally, the preset condition is that the gain value is smaller than a first preset threshold, or the branch depth of the initial classification tree is greater than a second preset threshold.
[0212] Optionally, the data pushing unit 306 includes:
[0213] A target branch node determination subunit, used to determine the target branch node of each layer in the target classification tree according to the data structures of the plurality of target classification trees;
[0214] A total gain value calculation subunit is used to calculate the total gain value of each of the to-be-processed features in the multiple target classification trees according to the multiple target branch nodes and the target type of each of the to-be-processed data;
[0215] The data push subunit is used to select target data that meets preset push conditions from the multiple data to be processed and push them according to each of the data to be processed and the total gain value of each of the data to be processed.
[0216] Optionally, the data push subunit is further specifically used for:
[0217] According to the size of the total gain value, the plurality of data to be processed are sorted to obtain a gain feature sequence;
[0218] Deleting the gain features in the gain feature sequence whose feature type belongs to the target feature type and whose feature conversion rate is less than a third preset threshold value, to obtain an updated gain feature sequence;
[0219] The target number data is screened out and pushed according to the order of the total gain values in the updated gain feature sequence.
[0220] It can be seen that, by applying the embodiment of the present application, the data to be processed and the classification index of the data to be processed can be obtained first. Since the classification index can be one of the business indexes, or a data index with a strong correlation with the business index, the data to be processed is classified according to the classification index, and the initial type of each data to be processed is obtained, which has a strong correlation with the business index. After that, according to the classified data to be processed, the corresponding initial classification tree is constructed, and then the gain value of each data to be processed is calculated according to the data structure of the initial classification tree and the initial type of each data to be processed, and then the gain value of the above data to be processed is used to train the model for constructing the initial decision tree, so that according to the gain value of each data to be processed, the initial classification tree is updated, and a target classification tree is obtained that is more accurate in classifying the data to be processed and mining the key operation data. Finally, according to the data structure of the target classification tree and the target type of each data to be processed, the target data is filtered out from the data to be processed for pushing, so that the target data of the key operation filtered out has a high correlation with the classification index, and the accuracy of the key operation data is determined is high.
[0221] The present application also provides an electronic device, which may be a terminal, a server, or other device. Figure 5 As shown, it shows a schematic diagram of the structure of the electronic device involved in the embodiment of the present application, specifically:
[0222] The electronic device may include components such as a processor 401 with one or more processing cores, a memory 402 with one or more computer-readable storage media, a power supply 403, an input unit 404, and a communication unit 405. Those skilled in the art will appreciate that Figure 5 The electronic device structure shown in the figure does not limit the electronic device, and may include more or less components than shown in the figure, or combine some components, or arrange the components differently.
[0223] The processor 401 is the control center of the electronic device, and uses various interfaces and lines to connect various parts of the entire electronic device. It executes various functions of the electronic device and processes data by running or executing software programs and / or units stored in the memory 402, and calling data stored in the memory 402. In some embodiments, the processor 401 may include one or more processing cores; in some embodiments, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, display interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 401.
[0224] The memory 402 can be used to store software programs and units. The processor 401 executes various functional applications and data processing by running the software programs and units stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the electronic device, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
[0225] The electronic device also includes a power supply 403 for supplying power to various components. In some embodiments, the power supply 403 can be logically connected to the processor 401 through a power management system, so as to manage charging, discharging, and power consumption through the power management system. The power supply 403 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.
[0226] The electronic device may further include an input unit 404, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to object setting and function control.
[0227] The electronic device may further include a communication unit 405. In some embodiments, the communication unit 405 may include a wireless unit. The electronic device may perform short-range wireless transmission through the wireless unit of the communication unit 405, thereby providing the object with wireless broadband Internet access. For example, the communication unit 405 may be used to help the object send and receive emails, browse web pages, and access streaming media.
[0228] Although not shown, the electronic device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 401 in the electronic device will load the executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 will run the application programs stored in the memory 402, thereby realizing various functions, as follows:
[0229] Acquire data to be processed and classification indicators of the data to be processed;
[0230] According to the classification index, the data to be processed are classified to obtain the initial type of each data to be processed;
[0231] According to the classified data to be processed, construct a corresponding initial classification tree;
[0232] Calculating a gain value of each of the data to be processed according to the data structure of the initial classification tree and the initial type of each of the data to be processed, wherein the gain value represents the priority of using the data to be processed as a branch node of the initial classification tree;
[0233] According to the gain value of each of the data to be processed, the initial classification tree is updated to obtain a target classification tree, wherein the target classification tree updates the initial type of the data to be processed to the target type;
[0234] According to the data structure of the target classification tree and the target type of each of the data to be processed, the target data is screened out from the data to be processed for pushing.
[0235] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0236] It can be seen that, by applying the embodiment of the present application, the data to be processed and the classification index of the data to be processed can be obtained first. Since the classification index can be one of the business indexes, or a data index with a strong correlation with the business index, the data to be processed is classified according to the classification index, and the initial type of each data to be processed is obtained, which has a strong correlation with the business index. After that, according to the classified data to be processed, the corresponding initial classification tree is constructed, and then the gain value of each data to be processed is calculated according to the data structure of the initial classification tree and the initial type of each data to be processed, and then the gain value of the above data to be processed is used to train the model for constructing the initial decision tree, so that according to the gain value of each data to be processed, the initial classification tree is updated, and a target classification tree is obtained that is more accurate in classifying the data to be processed and mining the key operation data. Finally, according to the data structure of the target classification tree and the target type of each data to be processed, the target data is filtered out from the data to be processed for pushing, so that the target data of the key operation filtered out has a high correlation with the classification index, and the accuracy of the key operation data is determined is high.
[0237] To this end, an embodiment of the present application provides a computer-readable storage medium, in which a plurality of instructions are stored, and the instructions can be loaded by a processor to execute the steps in any one of the data push methods provided in the embodiments of the present application. For example, the instructions can execute the following steps:
[0238] Acquire data to be processed and classification indicators of the data to be processed;
[0239] According to the classification index, the data to be processed are classified to obtain the initial type of each data to be processed;
[0240] According to the classified data to be processed, construct a corresponding initial classification tree;
[0241] Calculating a gain value of each of the data to be processed according to the data structure of the initial classification tree and the initial type of each of the data to be processed, wherein the gain value represents the priority of using the data to be processed as a branch node of the initial classification tree;
[0242] According to the gain value of each of the data to be processed, the initial classification tree is updated to obtain a target classification tree, wherein the target classification tree updates the initial type of the data to be processed to the target type;
[0243] According to the data structure of the target classification tree and the target type of each of the data to be processed, the target data is screened out from the data to be processed for pushing.
[0244] The storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0245] Since the instructions stored in the storage medium can execute the steps in any data push method provided in the embodiments of the present application, the beneficial effects that can be achieved by any data push method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0246] The above is a detailed introduction to a data push method, device, electronic device and storage medium provided in an embodiment of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A data push method, characterized in that: include: Acquire data to be processed and classification indicators of the data to be processed; According to the classification index, the data to be processed are classified to obtain the initial type of each data to be processed; According to the classified data to be processed, construct a corresponding initial classification tree; Calculating a gain value of each of the data to be processed according to the data structure of the initial classification tree and the initial type of each of the data to be processed, wherein the gain value represents the priority of using the data to be processed as a branch node of the initial classification tree; According to the gain value of each of the data to be processed, the initial classification tree is updated to obtain a target classification tree, wherein the target classification tree updates the initial type of the data to be processed to the target type; According to the data structure of the target classification tree and the target type of each of the data to be processed, the target data is screened out from the data to be processed for pushing.
2. The method according to claim 1, characterized in that Each layer of data structure of the initial classification tree is constructed layer by layer through an initial decision tree model; The step of calculating the gain value of each of the data to be processed according to the data structure of the initial classification tree and the initial type of each of the data to be processed comprises: Calculate the first objective function and the second objective function of the data to be processed under each splitting condition, wherein the first objective function represents the fitting effect of the initial decision tree model before the data to be processed is split, and the second objective function represents the fitting effect of the initial decision tree model after the data to be processed is split; According to the first objective function and the second objective function, the gain value of the data to be processed is calculated, and the node data of the splitting condition corresponding to the maximum gain value is used as the branch node of the current layer of the initial classification tree.
3. The method according to claim 2, characterized in that Calculating the first objective function and the second objective function of each of the to-be-processed data under each splitting condition comprises: According to the initial type of the data to be processed, the data to be processed is classified into left subtree samples and right subtree samples, wherein the left subtree samples are a set of data to be trained that meets the splitting condition, and the right subtree samples are a set of data to be trained that does not meet the splitting condition; Calculate the sum of the first-order derivatives of the left subtree samples and the right subtree samples, and calculate the sum of the second-order derivatives of the left subtree samples and the right subtree samples; Obtaining a regularization parameter for preventing the initial decision tree model from overfitting; The first objective function and the second objective function are calculated according to the sum of the first-order derivatives, the sum of the second-order derivatives, and the regularization parameter.
4. The method according to claim 2, characterized in that: The updating of the initial classification tree according to the gain value of each of the data to be processed to obtain a target classification tree comprises: Obtaining branch nodes of each layer in the initial classification tree determined by the initial decision tree model; Taking the branch nodes of each layer as the splitting conditions of each layer of the data structure in the initial classification tree, updating the branch depth of the initial classification tree, and when the gain value or the branch depth of the initial classification tree meets the preset conditions, stopping the training of the initial decision tree model to obtain a trained decision tree model; According to the predicted value of the classification index obtained by processing the data to be processed by the decision tree model, and the true value corresponding to the predicted value, the parameters of the initial decision tree model are optimized to obtain an optimized decision tree model; The data to be processed is processed according to the optimized decision tree model to construct the target classification tree.
5. The method according to claim 4, characterized in that The preset condition is that the gain value is less than a first preset threshold, or the branch depth of the initial classification tree is greater than a second preset threshold.
6. The method according to claim 1, characterized in that The step of selecting target data from the data to be processed for pushing according to the data structure of the target classification tree and the target type of each of the data to be processed includes: A target branch node determination subunit, used to determine the target branch node of each layer in the target classification tree according to the data structures of the plurality of target classification trees; Determining a target branch node at each layer in the target classification tree according to the data structures of the plurality of target classification trees; Calculate the total gain value of each of the to-be-processed features in the multiple target classification trees according to the multiple target branch nodes and the target type of each of the to-be-processed data; According to each of the to-be-processed data and the total gain value of each of the to-be-processed data, target data meeting a preset push condition is selected from the plurality of to-be-processed data for push.
7. The method according to claim 6, characterized in that The step of selecting target data satisfying a preset push condition from the plurality of data to be processed and pushing the target data according to each of the data to be processed and the total gain value of each of the data to be processed includes: Sorting the plurality of data to be processed according to the size of the total gain value to obtain a gain feature sequence; The gain feature sequence is deleted, the feature type of which belongs to the target feature type and the gain feature whose feature conversion rate is less than a third preset threshold value, to obtain an updated gain feature sequence; According to the order of the total gain values in the updated gain feature sequence, the target number data is screened out for push.
8. A data push device, characterized in that: include: A data acquisition unit, used to acquire the data to be processed and the classification index of the data to be processed; An initial type determination unit, used to perform a classification operation on the data to be processed according to the classification index to obtain an initial type of each of the data to be processed; An initial classification tree construction unit, used to construct a corresponding initial classification tree according to the classified data to be processed; A gain value calculation unit, used for calculating the gain value of each of the to-be-processed data according to the data structure of the initial classification tree and the initial type of each of the to-be-processed data, wherein the gain value represents the priority of using the to-be-processed data as a branch node of the initial classification tree; A target classification tree construction unit, used for updating the initial classification tree according to the gain value of each of the data to be processed to obtain a target classification tree, wherein the target classification tree updates the initial type of the data to be processed to a target type; The data pushing unit is used to filter out target data from the data to be processed for pushing according to the data structure of the target classification tree and the target type of each of the data to be processed.
9. A computer device, characterized in that: include: Processor and memory; The memory medium stores a plurality of instructions, and the processor loads the instructions stored in the memory to execute the steps in the data pushing method according to any one of claims 1-7.
10. A storage medium having a computer program stored thereon, characterized in that: When the computer program runs on a computer, the computer is enabled to execute the data pushing method according to any one of claims 1 to 7.