A data processing method, device, equipment and medium
By obtaining user historical feature data and using the resource incremental recommendation model for prediction and sorting, the problem of personalized resource incremental recommendation in the existing technology is solved, and the accuracy and user experience of recommendation are improved.
Patent Information
- Application Number
- CN201910682707.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-07-26
- Publication Date
- 2025-01-10
- Estimated Expiration
- 2039-10-25
AI Technical Summary
The existing resource increment method cannot consider the user's current real ideas, resulting in insufficient personalized recommendations and poor user experience.
By obtaining the historical feature data of the user, using the resource incremental recommendation model for prediction, generating the target resource incremental gear data and gear recommendation index, and sorting the gear data based on these indexes and sending it to the client for personalization recommend.
It improves the accuracy and user experience of incremental resource recommendations, and can better meet users' current needs.
Smart Images

Figure CN112307308B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a data processing method, device, equipment and medium. Background Art
[0002] With the continuous development of Internet technology, there are more and more Internet-based application business services. In some business scenarios, users can increase resources through platforms with incremental functions, such as recharging phone bills, data traffic, membership recharge, e-sports recharge, animation recharge, etc. The existing resource increment method is mainly the user's self-selection on the resource increment page, and the platform with incremental function usually presents the same resource increment page to each user, or simply groups users and makes the same resource increment recommendation according to the attributes of each group. These do not take into account the user's current real thoughts, cannot achieve personalized resource increment, and the user experience needs to be improved. Summary of the invention
[0003] The present application provides a data processing method, device, equipment and medium to solve at least one of the above technical problems.
[0004] On the one hand, the present application provides a data processing method, comprising:
[0005] Responding to a resource increment request carrying a user identifier sent by a client, obtaining historical feature data of a user corresponding to the user identifier;
[0006] Performing resource increment prediction on the first historical feature data to obtain target resource increment data of the user; the target resource increment data includes a plurality of target resource increment gear data and corresponding gear recommendation indexes;
[0007] Sorting the plurality of target resource incremental gear data based on the corresponding gear recommendation index to obtain a target resource incremental gear sorting list;
[0008] The target resource incremental gear sorting list is sent to the client.
[0009] On the other hand, the present application also provides a data processing device, comprising:
[0010] An acquisition module, configured to respond to a resource increment request carrying a user identifier sent by a client, and acquire first historical feature data of a user corresponding to the user identifier;
[0011] A prediction module, configured to predict the first historical feature data to obtain target resource increment data of the user; the target resource increment data includes a plurality of target resource increment gear data and corresponding gear recommendation indexes;
[0012] A sorting module, used to sort the plurality of target resource incremental gear data based on the corresponding gear recommendation index to obtain a target resource incremental gear sorting list;
[0013] A sending module is used to send the target resource incremental gear sorting list to the client.
[0014] On the other hand, a device is also provided, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement any of the data processing methods described above.
[0015] On the other hand, a computer storage medium is provided, wherein the storage medium stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded by a processor and executed by any of the data processing methods described above.
[0016] The data processing method, device, equipment and medium provided by the present application have the following technical effects:
[0017] The embodiment of the present application obtains the first historical feature data of the user corresponding to the user ID by responding to the resource increment request carrying the user ID sent by the client; predicts the first historical feature data to obtain the target resource increment data of the user; the target resource increment data includes multiple target resource increment gear data and corresponding gear recommendation indexes; sorts the multiple target resource increment gear data based on the corresponding gear recommendation index to obtain a target resource increment gear sorting list; and sends the target resource increment gear sorting list to the client. In this way, the user's current real thoughts can be taken into account, personalized resource increments can be achieved, and the accuracy of resource increment recommendations and user experience can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions and advantages in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0019] Figure 1 It is a schematic diagram of an implementation environment provided by an embodiment of the present application.
[0020] Figure 2 It is a flowchart of a data processing method provided in an embodiment of the present application.
[0021] Figure 3 It is a flowchart of building a resource increment recommendation model provided in an embodiment of the present application.
[0022] Figure 4 This is the offline training effect of the constructed random forest model provided in the embodiment of the present application.
[0023] Figure 5 It is a block diagram of a data processing device provided in an embodiment of the present application.
[0024] Figure 6 It is a schematic diagram of the hardware structure of a device provided by the present application for implementing the method provided by an embodiment of the present application. DETAILED DESCRIPTION
[0025] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution 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 creative work should fall within the scope of protection of the present application.
[0026] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0027] Please refer to Figure 1 , which shows a schematic diagram of an implementation environment provided by an embodiment of the present application. The implementation environment may include: a terminal 120 and a server 140.
[0028] Specifically, the terminal 120 may include software running in a physical device, such as an application installed on the device, etc., and may also include physical devices such as smart phones, desktop computers, tablet computers, laptops, digital assistants, smart wearable devices, etc., which are installed with applications. The operating system running on the terminal 120 may be a closed operating system such as the iOS operating system developed by Apple, a non-closed operating system based on Android, a desktop operating system such as the Windows operating system or the Linux operating system or the Mac OS (Apple desktop operating system). In an embodiment of the present invention, a client that sends a resource increment request is running in the terminal 120, and the client may be any client that has a resource increment service. For example, the client includes but is not limited to at least one of a game client, a video client, a shopping client, and a social application client, and may also be a multi-functional client that integrates multiple functions such as video, games, and e-sports.
[0029] The server 140 may be a single server, or a server cluster consisting of a plurality of servers, or a cloud computing service center.
[0030] It should be understood that the server 140 can establish communication connections with the terminal 120 through a network. The network can be a wireless network or a wired network. Wireless methods include but are not limited to wireless networks (such as Bluetooth, Wi-Fi (Wireless Fidelity), ZigBee, etc.), infrared, etc.; wired methods include but are not limited to wired networks, USB (Universal Serial Bus), serial ports, etc.
[0031] In actual applications, the client can send a resource increment request carrying a user identifier to the server. The server responds to the resource increment request, obtains the first historical feature data of the user corresponding to the user identifier; performs resource increment prediction on the first historical feature data to obtain the target resource increment data of the user; and sends the determined target resource increment gear sorting list to the client, so that the user can perform resource increment operations based on the target resource increment gear sorting list.
[0032] The following describes a specific embodiment of a data processing method of the present application. Figure 2 This is a flowchart of a data processing method provided in an embodiment of the present application. The present application provides method operation steps as described in the embodiment or flowchart, but based on conventional or non-creative labor, more or fewer operation steps may be included. The order of steps listed in the embodiment is only one way of executing the steps among many, and does not represent the only execution order. Figure 2 As shown, the execution subject of the method can be the above Figure 1 In the server 140, the method may include:
[0033] S201: Respond to a resource increment request carrying a user identifier sent by a client, and obtain first historical feature data of a user corresponding to the user identifier.
[0034] In the embodiment of the present application, the resource increment request can be a user requesting to obtain an increment of target resources using the client. The incremental target resources can include but are not limited to purchasing game virtual items (such as gold coins, diamonds, happy beans, equipment, props, clothing, etc.), purchasing live virtual items (such as virtual gifts, red flowers, etc.), recharging traffic, recharging phone bills, purchasing memberships, purchasing value-added services, etc.
[0035] In the embodiment of the present application, the resource increment request may carry at least a user identification (ID). The user identification ID is used to characterize the unique identity information of the user who sends the request; the user identification ID may include the current registered user account information using the client, the temporary login user account information using the client, the identity verification code UIN, etc.
[0036] In the embodiment of the present application, the resource increment request can be implemented by the user by clicking the resource increment option or resource increment button on the interface of the client carried by the above terminal, or by the user using the above terminal to identify the QR code or link on the display interface of the client, or by scanning the QR code by the above terminal, etc. Of course, the present application does not make specific limitations on this.
[0037] Exemplarily, the first historical feature data may be data used to reflect the user's historical resource increment operation. The first historical feature data may include at least one of user portrait data, historical user behavior data, and historical user payment data. In an embodiment of the present application, in order to improve the accuracy of the prediction result, the first historical feature data may include data in three dimensions: user portrait data, historical user behavior data, and historical user payment data.
[0038] In a certain application scenario, user portrait data may include but is not limited to user age, gender, user account balance, amount paid for mobile games in the most recent year, amount paid for monthly subscription services in the most recent year, number of days paid for mobile games in the most recent year, number of days paid for monthly subscription services in the most recent year, etc.
[0039] Historical user behavior data may include, but is not limited to, the number of login days in the previous month, the number of live broadcast watching days in the previous month, the length of live broadcast watching in the previous month, the number of live broadcast hosts watched in the previous month, the number of barrages posted in the previous month, the number of private messages successfully sent yesterday, the number of private messages successfully sent in the past seven days, etc.
[0040] Historical user payment data may include, but is not limited to, the number of recharges in the most recent year, the most recent recharge level, the highest recharge level in the most recent year, the lowest recharge level in the most recent year, the number of consumption days in the most recent month, the number of anchors consumed in the most recent month, the number of gifts consumed in the most recent month, the consumption amount in the most recent month, the price of the most expensive gift consumed in the most recent month, etc.
[0041] It should be understood that each data in the first historical feature data can be data related to the target resource according to the request increment, and its specific data content can be adjusted accordingly according to the target resource. The first historical feature data can be extracted by the server based on the user's historical basic data, or obtained from a special user feature database.
[0042] S203: Predict the first historical feature data to obtain target resource increment data of the user; the target resource increment data includes a plurality of target resource increment gear data and corresponding gear recommendation indexes.
[0043] In some embodiments, the first historical feature data may be predicted based on a preset algorithm or preset rule to obtain the target resource increment data of the user.
[0044] In other embodiments, the first historical feature data is predicted using a resource increment recommendation model to obtain the target resource increment data of the user. The resource increment recommendation model may be constructed based on one or more of the following fusions: random forest algorithm, decision tree algorithm, logistic regression algorithm, neural network algorithm, etc. When constructing the resource increment recommendation model, a training sample set may be constructed based on the second historical feature data of the sample user and the determined historical resource increment operation results, and then the resource increment recommendation model may be trained based on the training sample set. The training process of the resource increment recommendation model may include data preprocessing, feature transformation, and training the model until convergence.
[0045] In an embodiment of the present application, the resource increment recommendation model is a trained random forest model. The random forest algorithm is an improvement on the decision tree algorithm. Multiple decision trees are merged together. The establishment of each tree depends on an independently extracted sample. Each tree in the forest has the same distribution, and the classification error depends on the classification ability of each tree and the correlation between them. Feature selection uses a random method to split each node, and then compares the errors generated in different situations. The number of selected features is determined by the intrinsic estimation error, classification ability and correlation that can be detected. After randomly generating a large number of decision trees, each test sample can select a possible classification through the classification results of each tree after statistics.
[0046] In the embodiment of the present application, the method may further include a step of constructing a resource increment recommendation model. Figure 3 The flowchart of constructing a resource increment recommendation model provided by the embodiment of the present application is shown. Figure 3 As shown, the method for constructing a resource increment recommendation model includes:
[0047] S301: Collect a training sample set, where the training sample set includes second historical feature data of multiple sample users and resource increment operation results corresponding to each second historical feature data; the sample users are users who have performed resource increment operations within the most recent second preset time period.
[0048] For example, the second preset time period includes but is not limited to half a year, a quarter, a year, etc. The second historical feature data may be similar to the first historical feature data mentioned above, and may specifically include at least one of user portrait data, historical user behavior data, and historical user payment data. The data types of the second historical feature data used for training and the first historical feature data used for prediction are preferably consistent. The resource increment operation result may be at least one historical resource increment gear selected by the sample user. The collected historical feature data of a sample user and the corresponding resource increment operation result are used as a training sample, and the collection is repeated multiple times until multiple training samples are collected to obtain a training sample set for training the random forest model.
[0049] The random forest algorithm refers to an algorithm that uses multiple decision trees to train and predict samples. In one embodiment, the random forest model includes multiple decision trees, and the category of its output is determined by the number of trees of the category output by each decision tree (the value that appears most times in a set of data). The implementation process of the random forest model is to repeatedly randomly extract k samples with replacement from the original training sample set N to generate a new training sample set, and then generate k decision trees to form a random forest based on the self-service sampling method. The classification result of the new data can be determined by the score formed by the number of votes of the decision tree.
[0050] S303: Based on the training sample set and multiple groups of model parameters of the random forest model, generate multiple random forest models including multiple decision trees.
[0051] For example, the model parameters of the random forest model may include: the number of decision trees, the number of classification categories, the maximum tree depth, the maximum number of feature bins, etc.
[0052] S305: Determine the model parameter corresponding to the highest prediction accuracy among the generated multiple random forest models as the target model parameter.
[0053] In the embodiment of the present application, the step of determining the model parameter corresponding to the highest prediction accuracy among the generated multiple random forest models as the target model parameter includes:
[0054] S3051: Input a predetermined number of test samples in the training sample set into each random forest model for prediction, and obtain the prediction classification results of each decision tree in each random forest model.
[0055] Specifically, after each decision tree of the random forest model is grown, the pre-selected training sample set is input into each random forest model to use each decision tree therein to make predictions and obtain corresponding prediction classification results.
[0056] S3053: Determine the final predicted classification result of each random forest model, where the final predicted classification result is the mode of the predicted classification results of the multiple decision trees.
[0057] Specifically, the predicted classification results of the N decision trees in each random forest model are obtained, and the mode (the value that appears most frequently in a set of data) of the output categories of the N decision trees is determined by voting, and the classification result corresponding to the determined mode is determined as the final predicted classification result of each random forest model.
[0058] S3055: Based on the final prediction classification results of each random forest model, the prediction accuracy of each random forest model is calculated.
[0059] Specifically, the final predicted classification results of each random forest model are compared with the actual selection results of the users serving as the test samples, the deviation of each final predicted classification result is determined, and then the prediction accuracy of each random forest model is calculated.
[0060] S3057: Using the model parameters corresponding to the highest prediction accuracy as the target model parameters.
[0061] Specifically, the highest prediction accuracy can be determined by sorting each prediction accuracy in order of size; or the highest prediction accuracy can be determined by comparing the prediction accuracies with each other. The model parameters corresponding to the highest prediction accuracy are determined as the target model parameters, so as to construct a random forest model based on the target model parameters. In addition, if the maximum prediction accuracy is lower than the preset accuracy, the model parameters need to be optimized and adjusted until the preset conditions are met.
[0062] In the embodiment of the present application, taking the resource increment request as a recharge request applied to the competitive application platform as an example, the target model parameters of the random forest model may include: the number of classification categories is 8, the number of decision trees is 50, the maximum tree depth is 5, and the maximum number of feature packing is 32. After multiple rounds of optimization iterations, the offline training effect of the random forest is as follows: Figure 4 shown.
[0063] It should be understood that if the resource increment request is applied to other application platforms or other types of resource increment requests, the target model parameters of the random forest model can be adaptively adjusted.
[0064] S307: constructing the resource increment recommendation model based on the target model parameters; the resource increment recommendation model is used to predict resource increments based on the user's historical feature data.
[0065] In an optional embodiment, the step S301 may further include:
[0066] S302a: Preprocess the data in the second historical characteristic data to obtain preprocessed second historical characteristic data.
[0067] In the embodiment of the present application, preprocessing includes but is not limited to standardization, normalization and discretization processing. Among them, normalization may include at least one of linear normalization, logarithmic normalization and standard deviation normalization. The historical feature data after preprocessing can make data of different specifications uniform in specifications, facilitate subsequent comparison and processing, and improve calculation speed.
[0068] S302b: Determine the feature importance index of each feature in the preprocessed second historical feature data.
[0069] By determining the feature importance index of each feature, it is possible to determine how much contribution each feature makes to each tree in the random forest, and then taking the average of the contributions on each tree, the feature importance index of each feature can be determined by the average of the contributions between the features. For example, the feature importance index can be measured using the Gini index or the out-of-bag (OOB) error rate as an evaluation.
[0070] In the embodiment of the present application, the feature important index includes a Gini index score. Step S302b may include:
[0071] According to the preset Gini index scoring formula, the Gini index score value of each feature in the preprocessed historical feature data is calculated; the average change in the node split impurity of all decision trees in the random forest model is the Gini index score value.
[0072] Specifically, we use VIM to represent the variable importance measures and GI to represent the Gini index. Suppose there are m features X1, X2, X3, ... m Now we need to calculate the feature X j Gini Index Score VIM j (Gini), which is the average change in node split impurity of the jth feature in all decision trees of the random forest.
[0073] Among them, the Gini index scoring formula can be:
[0074]
[0075] Among them, K represents the total number of categories, and Pmk represents the proportion of category k in node m.
[0076] S302c: Extracting target feature data corresponding to the feature importance index being greater than a preset threshold from the preprocessed second historical feature data to obtain a second target feature data set.
[0077] In the embodiment of the present application, the preset threshold value can be determined based on the feature importance index of all features. The second target feature data set can be converted into a feature vector. Using the feature vector as the model input can more accurately describe the historical data and optimize the construction process of the prediction model.
[0078] After a lot of experiments, the inventors determined multiple target feature data in the above user portrait data, historical user behavior data and historical user payment data in actual applications. The second target feature data set may include user account balance, mode of resource increments in the most recent first preset time period, video viewing time, number of video views, and number of private messages sent. In the specific application scenario of recharge requests, the second target feature data set may include account balance, mode of recharges in the last year, viewing time, number of anchors watched, and number of private messages sent.
[0079] S302d: Taking the second target feature data set as a target training sample set for model training.
[0080] After the second target feature data set is determined according to the feature importance index, the second target feature data set can be input into the model as a target training sample set for training, which can simplify the complexity of model training and improve data processing effect.
[0081] Optionally, predicting the first historical feature data to obtain the target resource increment data of the user, that is, step S203 may include:
[0082] S2031: Extracting features corresponding to feature importance indicators greater than a preset threshold from the first historical feature data to obtain a first target feature data set.
[0083] Specifically, an identification of target feature data corresponding to feature importance indicators greater than a preset threshold may be obtained, multiple target feature data may be extracted from historical feature data based on the identification, and a first target feature data set may be generated. The first target feature data set may be represented in the form of a feature vector.
[0084] After a large number of experiments, the inventors determined multiple target feature data in the above-mentioned user portrait data, historical user behavior data and historical user payment data. The first target feature data set may include the user account balance, the mode of resource increments in the most recent first preset time period, video viewing time, number of video views, and number of private messages sent. In the specific application scenario of recharge requests, the first target feature data set may include account balance, mode of recharges in the last year, viewing time, number of anchors watched, and number of private messages sent.
[0085] S2033: Use the resource increment recommendation model to predict the first target feature data set to obtain the target resource increment data of the user.
[0086] In an embodiment of the present application, the first target feature data set is input into the resource increment recommendation model for result prediction to obtain the user's target resource increment data. The target resource increment data may include multiple target resource increment gear data and a gear recommendation index corresponding to each target resource increment gear data. The gear recommendation index is used to describe the recommendation probability of each target resource increment gear data.
[0087] In one embodiment, the target resource increment gear data may include at least one of a physical resource increment gear, a virtual resource increment gear, and a combined resource increment gear. Among them, the physical resource may be an actual amount of money; the virtual resource may include traffic, expenses, value-added services, game virtual items (such as gold coins, diamonds, happy beans, equipment, props, clothing, etc.), live virtual items (such as virtual gifts, red flowers, etc.). Among them, the physical resource increment gear or the virtual resource increment gear is the amount of each resource increment, such as {100M traffic, 1G traffic, ... N traffic}, {10 yuan, 20 yuan, ... N yuan}, {60 diamonds, 300 diamonds, ... N diamonds} and other gears. The combined resource increment gear may include a combination gear of "physical resources + virtual resources" and at least one of a combination gear of at least two different virtual resource types. The number of predicted physical resource increment gears and virtual resource increment gears can be determined according to actual conditions.
[0088] In practical applications, the user ID can be defined as U i , the physical resource increment level is S i , the virtual resource increment level is X i , the combined resource increment level is P i , the recommended gear index is F i The target resource increment data that can be obtained through prediction include {U i ,S i ,F i}、{U i ,Xi ,F i}、{U i ,P i ,F i}、{U i ,S i ,X i ,P i ,F i}etc.
[0089] S205: Sort the plurality of target resource incremental gear data based on the corresponding gear recommendation indexes to obtain a target resource incremental gear sorting list.
[0090] In the embodiment of the present application, according to the size of the gear recommendation index corresponding to each target resource incremental gear data, multiple target resource incremental gear data are sorted from large to small to obtain a target resource incremental gear sorting list. The target resource incremental gear sorting list includes each target resource incremental gear data and its arrangement sequence number.
[0091] S207: Send the target resource incremental gear sorting list to the client.
[0092] The embodiment of the present application obtains the historical feature data of the user corresponding to the user ID by responding to the resource increment request carrying the user ID sent by the client; predicts the historical feature data using the resource increment recommendation model to obtain the target resource increment data of the user; the target resource increment data includes multiple target resource increment gear data and corresponding gear recommendation indexes; sorts the multiple target resource increment gear data based on the corresponding gear recommendation index to obtain a target resource increment gear sorting list; and sends the target resource increment gear sorting list to the client. In this way, the user's current real thoughts can be taken into account, personalized resource increments can be achieved, and the recommendation accuracy and user experience can be improved.
[0093] In order to verify the effect of the above data processing method used in the above embodiment. Taking the recharge service request applied to the competitive application platform as an example, the samples to be tested are randomly divided into four groups: random forest algorithm recommendation group, topN recommendation group (recommendation based on the majority of historical recharges of users), control group I (the ranking of the recommended gears for each user is consistent and the gear corresponding to 6 yuan is highlighted), and control group II (the ranking of the recommended gears for each user is consistent). After one week of online testing, the recommendation effects of these four groups of users are compared. The results show that compared with the other three groups, the random forest algorithm group has the best recommendation accuracy, which improves the user experience.
[0094] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0095] Please refer to Figure 5 , which shows a block diagram of a data processing device provided by an embodiment of the present application. The device has the function of implementing the server side in the above method example, and the function can be implemented by hardware or by hardware executing corresponding software. The device 50 may include:
[0096] The acquisition module 51 is used to respond to the resource increment request carrying the user identifier sent by the client, and acquire the first historical feature data of the user corresponding to the user identifier;
[0097] A prediction module 52 is used to predict the first historical feature data to obtain the target resource increment data of the user; the target resource increment data includes a plurality of target resource increment gear data and corresponding gear recommendation indexes;
[0098] A sorting module 53 is used to sort the plurality of target resource incremental gear data based on the corresponding gear recommendation index to obtain a target resource incremental gear sorting list;
[0099] The sending module 54 is used to send the target resource incremental gear sorting list to the client.
[0100] In some embodiments, the apparatus further comprises:
[0101] The model building module 55 is used to build a resource increment recommendation model.
[0102] In some embodiments, the model building module 55 includes:
[0103] A collection unit, configured to collect a training sample set, wherein the training sample set includes second historical feature data of multiple sample users and resource increment operation results corresponding to each second historical feature data; the sample users are users who have performed resource increment operations within the most recent second preset time period;
[0104] A generating unit, configured to generate a plurality of random forest models including a plurality of decision trees based on the training sample set and a plurality of groups of model parameters of the random forest models;
[0105] A parameter determination unit, used to determine the model parameter corresponding to the highest prediction accuracy among the generated multiple random forest models as the target model parameter;
[0106] A construction unit is used to construct a resource increment recommendation model based on the target model parameters; the resource increment recommendation model is used to predict resource increments based on the user's historical feature data.
[0107] In some embodiments, the parameter determination unit includes:
[0108] A first prediction subunit is used to input a predetermined number of test samples in the training sample set into each random forest model for prediction, and obtain the prediction classification results of each decision tree in each random forest model respectively;
[0109] A result determination subunit, used to determine the final prediction classification result of each random forest model, wherein the final prediction classification result is the mode of the prediction classification results of the predicted multiple decision trees;
[0110] A calculation subunit, used for calculating the prediction accuracy of each random forest model based on the final prediction classification result of each random forest model;
[0111] The first processing subunit is used to use the model parameters corresponding to the highest prediction accuracy as the target model parameters.
[0112] In some embodiments, the model building module 55 further includes:
[0113] A preprocessing unit, used for preprocessing the data in the second historical feature data to obtain preprocessed second historical feature data;
[0114] An index determination unit, used to determine a feature importance index of each feature in the preprocessed second historical feature data;
[0115] A target feature determination unit is used to extract features corresponding to the feature importance index being greater than a preset threshold value from the preprocessed second historical feature data to obtain a second target feature data set;
[0116] The second processing subunit is used to use the second target feature data set as a target training sample set to perform model training.
[0117] In some embodiments, the prediction module 52 further includes
[0118] An extraction unit, configured to extract target feature data corresponding to feature importance indicators greater than a preset threshold from the first historical feature data, to obtain a first target feature data set;
[0119] The prediction unit predicts the first target feature data set by using a resource increment recommendation model to obtain the target resource increment data of the user.
[0120] In some embodiments, the historical feature data includes at least one of user portrait data, historical user behavior data, and historical user payment data.
[0121] In some embodiments, the target feature data set includes the user account balance, the mode of resource increments in the most recent first preset time period, the video viewing time, the number of videos viewed, and the number of private messages sent.
[0122] The embodiment of the present application obtains the historical feature data of the user corresponding to the user ID by responding to the resource increment request carrying the user ID sent by the client; predicts the historical feature data using the resource increment recommendation model to obtain the target resource increment data of the user; the target resource increment data includes multiple target resource increment gear data and corresponding gear recommendation indexes; sorts the multiple target resource increment gear data based on the corresponding gear recommendation index to obtain a target resource increment gear sorting list; and sends the target resource increment gear sorting list to the client. In this way, the user's current real thoughts can be taken into account, personalized resource increments can be achieved, and the recommendation accuracy and user experience can be improved.
[0123] An embodiment of the present application provides a server, which may include a processor and a memory, in which at least one instruction, at least one program, a code set or an instruction set is stored, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the data processing method provided in the above method embodiment.
[0124] An embodiment of the present application also provides a storage medium, in which at least one instruction, at least one program, code set or instruction set is stored, and the at least one instruction, at least one program, code set or instruction set is loaded by a processor and executes any of the above-mentioned data processing methods.
[0125] Further, Figure 6 A schematic diagram of the hardware structure of a device for implementing the method provided in the embodiment of the present application is shown. The device may be a computer terminal, a mobile terminal or other device. The device may also participate in constituting or include the apparatus provided in the embodiment of the present application. Figure 6 As shown, the computer terminal 10 may include one or more (102a, 102b, ..., 102n are used to illustrate) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 6The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 6 More or fewer components as shown, or with Figure 6 Different configurations shown.
[0126] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computer terminal 10 (or mobile device). As described in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).
[0127] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the methods described in the embodiments of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, to implement the above-mentioned neural network processing method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computer terminal 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0128] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computer terminal 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0129] The display may be, for example, a touch screen liquid crystal display (LCD) that enables a user to interact with a user interface of the computer terminal 10 (or mobile device).
[0130] It should be noted that the above-mentioned sequence of the embodiments of the present application is for description only and does not represent the advantages and disadvantages of the embodiments. The above-mentioned specific embodiments of the present application are described. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0131] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and server embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0132] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0133] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application should be included in the protection scope of the present application.
Claims
1. A data processing method, characterized in that: include: In response to a resource increment request carrying a user identifier sent by a client, first historical feature data of a user corresponding to the user identifier is obtained; the first historical feature data includes features in three dimensions: user portrait data, historical user behavior data related to the client, and historical user payment data related to resource increments; Based on the resource increment recommendation model, the first historical feature data is predicted for resource increment to obtain the target resource increment data of the user; the target resource increment data includes a plurality of target resource increment gear data and corresponding gear recommendation indexes; the target resource increment data is obtained by predicting the resource increment for the features corresponding to the feature importance index in the first historical feature data being greater than a preset threshold; the feature importance index is determined based on the mean value of the contributions of each feature in the first historical feature data on each decision tree in the resource increment recommendation model; The plurality of target resource incremental gear position data are sorted based on the corresponding gear position recommendation index to obtain a target resource incremental gear position sorting list; the target resource incremental gear position sorting list includes each target resource incremental gear position data and an arrangement number corresponding to each target resource incremental gear position data; the arrangement number is a position number after arranging each gear recommendation index in descending order based on the size of each gear recommendation index; The target resource incremental gear ranking list is sent to the client, so that the client can display the arrangement numbers corresponding to the different target resource incremental gear data to users corresponding to different user identifiers.
2. The method according to claim 1, characterized in that The method further comprises: Collecting a training sample set, the training sample set including second historical feature data of multiple sample users and resource increment operation results corresponding to each second historical feature data; the sample users are users who have performed resource increment operations within the most recent second preset time period; Based on the training sample set and multiple groups of model parameters of the random forest model, generating multiple random forest models including multiple decision trees; Determine the model parameter corresponding to the highest prediction accuracy among the generated multiple random forest models as the target model parameter; Based on the target model parameters, a resource increment recommendation model is constructed; the resource increment recommendation model is used to predict resource increments based on the user's historical feature data.
3. The method according to claim 2, characterized in that The step of determining the model parameter corresponding to the highest prediction accuracy among the generated multiple random forest models as the target model parameter includes: Inputting a predetermined number of test samples in the training sample set into each random forest model for prediction, and obtaining prediction classification results of each decision tree in each random forest model; Determine a final predicted classification result of each random forest model, wherein the final predicted classification result is the mode of the predicted classification results of the plurality of decision trees; Based on the final predicted classification results of each random forest model, the prediction accuracy of each random forest model is calculated; The model parameters corresponding to the highest prediction accuracy are used as the target model parameters.
4. The method according to claim 2, characterized in that: The method further comprises: Preprocessing the data in the second historical characteristic data to obtain preprocessed second historical characteristic data; Determine a feature importance index for each feature in the preprocessed second historical feature data; Extracting features corresponding to the feature importance index being greater than a preset threshold value from the preprocessed second historical feature data to obtain a second target feature data set; The second target feature data set is used as a target training sample set for model training.
5. The method according to claim 4, characterized in that The characteristic important indicators include the Gini index score; Accordingly, the step of determining the feature importance index of each feature in the preprocessed second historical feature data includes: According to the preset Gini index scoring formula, the Gini index score value of each feature in the preprocessed second historical feature data is calculated; the Gini index score value refers to the average change in node split impurity in all decision trees of the random forest model.
6. The method according to claim 2, characterized in that The performing resource increment prediction on the first historical feature data to obtain target resource increment data of the user includes: Extracting features corresponding to feature importance indicators greater than a preset threshold from the first historical feature data to obtain a first target feature data set; Using the resource increment recommendation model to perform resource increment prediction on the first target feature data set to obtain target resource increment data of the user; Among them, the first historical feature data includes at least one of user portrait data, historical user behavior data and historical user payment data; and / or, the first target feature data set includes user account balance, mode of resource increments in the most recent first preset time period, video viewing time, number of videos viewed, and number of private messages sent.
7. The method according to any one of claims 1 to 6, characterized in that: The target resource increment gear data includes at least one of a physical resource increment gear, a virtual resource increment gear and a combined resource increment gear.
8. A data processing device, characterized in that: include: An acquisition module, used to respond to a resource increment request carrying a user identifier sent by a client, and acquire first historical feature data of a user corresponding to the user identifier; the first historical feature data includes features in three dimensions: user portrait data, historical user behavior data related to the client, and historical user payment data related to resource increments; A prediction module, for performing resource increment prediction on the first historical feature data based on a resource increment recommendation model to obtain target resource increment data of the user; the target resource increment data includes a plurality of target resource increment gear data and corresponding gear recommendation indexes; the target resource increment data is obtained by performing resource increment prediction on features corresponding to feature importance indicators in the first historical feature data being greater than a preset threshold; the feature importance indicator is determined based on the mean value of contributions of each feature in the first historical feature data on each decision tree in the resource increment recommendation model; A sorting module is used to sort the plurality of target resource incremental gear position data based on the corresponding gear position recommendation index to obtain a target resource incremental gear position sorting list; the target resource incremental gear position sorting list includes each target resource incremental gear position data and an arrangement number corresponding to each target resource incremental gear position data; the arrangement number is a position number after arranging each gear position recommendation index in descending order based on the size of each gear position recommendation index; The sending module is used to send the target resource incremental gear ranking list to the client, so that the client can display the arrangement numbers corresponding to different target resource incremental gear data to users corresponding to different user identifiers.
9. A device, characterized in that: The device includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement the data processing method as described in any one of claims 1 to 7.
10. A computer storage medium, characterized in that: The storage medium stores at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded by the processor and executed by the data processing method as described in any one of claims 1 to 7.
Citation Information
Patent Citations
Method for improving charging conversion, electronic device and computer storage medium
CN109325810A