Data processing method and device, equipment and storage medium
By building training data sets and target models, the accuracy problem of enterprises or organizations in user group activity recommendations is solved, more accurate user feature recognition and activity recommendations are achieved, and the effectiveness gain is improved.
Patent Information
- Application Number
- CN202411146447.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-20
- Publication Date
- 2024-12-13
AI Technical Summary
The existing technology cannot effectively solve the accuracy problem of enterprises or organizations in recommendations of user group activities, resulting in unsatisfactory results gains.
By obtaining historical activity data, building a training data set and training the target model, determining the target user characteristics for accurate activity recommendations, avoiding the limitations of manual experience.
It achieves more comprehensive and accurate user feature recognition, improves the accuracy and efficiency of event recommendations, and brings ideal results to enterprises or organizations.
Smart Images

Figure CN119128257A_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of data processing, and in particular, to a data processing method, apparatus, device and storage medium. Background Art
[0002] With the rapid development of the market, the user groups served by enterprises or organizations are becoming increasingly large and diversified. Enterprises or organizations usually use customer portraits to carry out tasks such as analysis, contact, and marketing for different user groups. Among them, customer portraits can also be called user features.
[0003] In related technologies, enterprises and organizations usually determine the target user groups corresponding to different activities based on manual experience, and then recommend corresponding activities to the target user groups. However, due to the wide variety of user characteristics and uneven manual experience, inappropriate activities are often recommended to user groups, resulting in low accuracy and failure to bring ideal performance gains. Summary of the invention
[0004] The embodiments of the present application provide a data processing method, apparatus, device and storage medium for solving the problem that the existing related technologies cannot meet the requirements of enterprises or organizations for the accuracy of activity recommendations, resulting in unsatisfactory benefits brought by carrying out activities to enterprises or organizations.
[0005] In a first aspect, an embodiment of the present application provides a data processing method, including:
[0006] Obtain historical activity data, which includes user data, activity data, and performance data corresponding to different types of historical activities;
[0007] A training data set is obtained based on the user data, the activity data, and the performance data. The training data set includes first user labels and first user features of different users in different types of historical activities. The first user labels and user features correspond one to one.
[0008] The initial model is trained using the training data set to obtain a target model, which is used to determine the target user features in the first user features, and the target user features are used to determine the target users for activity recommendation.
[0009] In a possible implementation method, a training data set is obtained based on user data, activity data, and performance data, including:
[0010] According to the performance data, the first user tag is obtained;
[0011] Obtaining a first user feature according to the user data and the activity data;
[0012] In a possible implementation, obtaining the first user tag according to the performance data includes:
[0013] For each user, based on the performance data of any historical activity, obtain the user's performance gain in the historical activity;
[0014] If the effectiveness gain is greater than or equal to the preset gain, determining that the first user tag of the user is a first tag, the first tag is used to indicate that the user is a positive example in historical activities;
[0015] If the effectiveness gain is less than the preset gain, the first user tag of the user is determined to be a second tag, and the second tag is used to indicate that the user is a counterexample in historical activities.
[0016] In a possible implementation, obtaining the user's performance gain in a historical activity according to performance data of any historical activity includes:
[0017] According to the performance data of any historical activity, obtain the first data of the user before the historical activity and the second data of the user after the historical activity, where the first data and the second data are data of the same product;
[0018] The user's performance gain in historical activities is obtained based on the first data and the second data.
[0019] In a possible implementation, training the initial model with the training data set to obtain the target model includes:
[0020] Training the initial model using the training data set to obtain at least one first model that is successfully trained;
[0021] Inputting second user features of multiple users in the target activity into the first model, and obtaining second user labels of the multiple users predicted by the first model according to the second user features;
[0022] A target model is determined from at least one first model according to the accuracy of the second user labels predicted by the first model for the plurality of users.
[0023] In a possible implementation, determining a target model from at least one first model according to the accuracy of second user labels predicted by the first model for a plurality of users includes:
[0024] Obtaining third user tags of multiple users, where the third user tags are obtained based on performance data of the target activity;
[0025] For each first model, obtaining an accuracy rate of the first model according to the second user tags of the plurality of users predicted by the first model and the third user tags of the plurality of users;
[0026] Determine, among at least one first model, a first model having an accuracy greater than a preset accuracy as a target model.
[0027] In a possible implementation, it further includes:
[0028] According to the target model, target user features in the first user features are obtained.
[0029] In a possible implementation, obtaining the target user feature in the first user feature according to the target model includes:
[0030] Obtaining the weight value of each first user feature when the target model is successfully trained;
[0031] Determine the first user features with the top M weight values in descending order as target user features, or determine the first user features with weight values greater than a preset weight value as target user features.
[0032] In a possible implementation, it further includes:
[0033] Determine the target users for activity recommendations based on target user characteristics.
[0034] In a second aspect, an embodiment of the present application provides a data processing device, including:
[0035] An acquisition module is used to acquire historical activity data, which includes user data, activity data and performance data corresponding to different types of historical activities;
[0036] A processing module, configured to obtain a training data set according to the user data, the activity data and the performance data, wherein the training data set includes first user tags and first user features of different users in different types of historical activities, and the first user tags and the user features correspond one to one;
[0037] The training module is used to train the initial model using the training data set to obtain a target model, the target model is used to determine the target user feature in the first user feature, and the target user feature is used to determine the target user for activity recommendation.
[0038] In a possible implementation method, the processing module is specifically used for:
[0039] According to the performance data, the first user tag is obtained;
[0040] Obtaining a first user feature according to the user data and the activity data;
[0041] In a possible implementation manner, the processing module is specifically used for:
[0042] For each user, based on the performance data of any historical activity, obtain the user's performance gain in the historical activity;
[0043] If the effectiveness gain is greater than or equal to the preset gain, determining that the first user tag of the user is a first tag, the first tag is used to indicate that the user is a positive example in historical activities;
[0044] If the effectiveness gain is less than the preset gain, the first user tag of the user is determined to be a second tag, and the second tag is used to indicate that the user is a counterexample in historical activities.
[0045] In a possible implementation manner, the processing module is specifically used for:
[0046] According to the performance data of any historical activity, obtain the first data of the user before the historical activity and the second data of the user after the historical activity, where the first data and the second data are data of the same product;
[0047] The user's performance gain in historical activities is obtained based on the first data and the second data.
[0048] In a possible implementation, the training module is specifically used for:
[0049] Training the initial model using the training data set to obtain at least one trained first model;
[0050] Inputting second user features of multiple users in the target activity into the first model, and obtaining second user labels of the multiple users predicted by the first model according to the second user features;
[0051] A target model is determined from at least one first model according to the accuracy of the second user labels predicted by the first model for the plurality of users.
[0052] In a possible implementation, the training module is specifically used for:
[0053] Obtaining third user tags of multiple users, where the third user tags are obtained based on performance data of the target activity;
[0054] For each first model, obtaining an accuracy rate of the first model according to the second user tags of the plurality of users predicted by the first model and the third user tags of the plurality of users;
[0055] Determine, among at least one first model, a first model having an accuracy greater than a preset accuracy as a target model.
[0056] In a possible implementation manner, the data processing device further includes: a recommendation module for
[0057] According to the target model, target user features in the first user features are obtained.
[0058] In a possible implementation, the recommendation module is specifically used to:
[0059] Obtaining the weight value of each first user feature during the training process of the target model;
[0060] Determine the first user features with the top M weight values in descending order as target user features, or determine the first user features with weight values greater than a preset weight value as target user features.
[0061] In a possible implementation, the recommendation module is specifically used to:
[0062] Determine the target users for activity recommendations based on target user characteristics.
[0063] In a third aspect, an embodiment of the present application provides an electronic device, including: a transceiver, a processor, and a memory;
[0064] Memory stores computer-executable instructions;
[0065] The processor executes the computer-executable instructions stored in the memory, so that the processor performs the data processing method as described in any one of the first aspects.
[0066] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement a data processing method as described in any one of the first aspects.
[0067] In a fifth aspect, an embodiment of the present application provides a computer program product, including a computer program, which implements the data processing method as described in any one of the first aspects when the computer program is executed by a processor.
[0068] The embodiments of the present application provide a data processing method, apparatus, device and storage medium, which obtain a training data set based on historical activity data, and then obtain a target model based on the training data set training, so that the corresponding target user group can be determined for the activity to be carried out through the target model, so as to recommend activities to the target user group. In the embodiments of the present application, more comprehensive and accurate user characteristics can be obtained, so as to obtain a more accurate target model through the user characteristics, and the target user group can be accurately determined through the target model, so as to make accurate activity recommendations to the target user group, thereby bringing ideal performance gains to the enterprise or organization, and determining the target user based on the user characteristics provided by the target model can avoid the limitations of manual experience and improve efficiency.
[0069] It should be understood that the contents described in the above summary of the invention are not intended to limit the key or important features of the embodiments of the present application, nor are they intended to limit the scope of the present application. Other features of the present application will become easy to understand through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0070] In order to more clearly illustrate the technical solutions in the present application, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0071] Figure 1 A schematic diagram of an application scenario provided for this application;
[0072] Figure 2 A schematic diagram of a data processing method provided in an embodiment of the present application Figure 1 ;
[0073] Figure 3 A schematic diagram of a data processing method provided in an embodiment of the present application Figure 2 ;
[0074] Figure 4 A flowchart of a model training method provided in an embodiment of the present application;
[0075] Figure 5 A schematic diagram of a process for determining a target user provided in an embodiment of the present application;
[0076] Figure 6 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application;
[0077] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
[0078] The above drawings have shown clear embodiments of the present application, which will be described in more detail later. These drawings and text descriptions are not intended to limit the scope of the present application in any way, but to illustrate the concept of the present application to those skilled in the art by referring to specific embodiments. DETAILED DESCRIPTION
[0079] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0080] In the technical solution of this application, the collection, storage, use, processing, transmission, provision and disclosure of information such as financial data or user data involved shall comply with the provisions of relevant laws and regulations and shall not violate public order and good morals.
[0081] It should be noted that in the embodiments of the present application, certain software, components, models and other existing solutions in the industry may be mentioned, and they should be regarded as exemplary. Their purpose is only to illustrate the feasibility of implementing the technical solution of the present application, but it does not mean that the applicant has or will necessarily use the solution.
[0082] In the present application, the term "include" and its variations may refer to non-limiting inclusion; the term "or" and its variations may refer to "and / or".
[0083] In the present application, the terms "first", "second", etc. are used to distinguish similar objects and are not necessarily used to describe a particular sequence or order.
[0084] In this application, the term "at least one" means one or more, and "more than one" means two or more. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.
[0085] In this application, the term "at least one of the following" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b, or c can mean: a, b, c, ab, a--c, bc, or abc, where a, b, and c can be single or multiple.
[0086] In this application, the words "exemplary" or "for example" are used to indicate examples, illustrations or descriptions. Any embodiment or design described as "exemplary" or "for example" in this application should not be interpreted as being more preferred or more advantageous than other embodiments or designs. Specifically, the use of the words "exemplary" or "for example" is intended to present the related concepts in a concrete way.
[0087] First, an exemplary description is given of the application scenarios of the data processing method provided in this application.
[0088] Figure 1 A schematic diagram of an application scenario provided for this application, such as Figure 1 As shown, the scenario includes: an enterprise or organization and a user.
[0089] It should be noted that users refer to individuals or organizations that purchase or use products or services provided by enterprises or organizations; enterprises refer to legal persons or other social and economic organizations that use various production factors (such as land, labor, capital, technology and information, etc.) to provide goods or services to the market, and implement independent management, self-financing and independent accounting; organizations refer to a collection of two or more individuals for a common goal (whether economic, social or cultural). Organizations can be for-profit or non-profit (such as charities, social groups, etc.).
[0090] In this scenario, an enterprise or organization identifies a target user group and recommends activities to that target user group. The enterprise or organization will carry out various activities and recommend different activities to different target user groups, thereby gaining effectiveness from the target user groups' participation in the activities.
[0091] With the rapid development of the market, the user groups served by enterprises or organizations are becoming increasingly large and diversified. Enterprises or organizations usually use customer portraits to carry out tasks such as analysis, contact, and marketing for different user groups. Among them, customer portraits can also be called user features.
[0092] However, due to the wide variety of user characteristics corresponding to user groups, hundreds or thousands of specific user characteristics are characterized under different major categories. In related technologies, companies and organizations usually determine the target user groups corresponding to different activities based on manual experience, and then make corresponding activity recommendations for the target user groups.
[0093] However, this method is inefficient when processing a large number of user features of various types. For enterprises or organizations with insufficient manual experience and / or entering new business areas, it is difficult to determine the target customer group and carry out activities in different scenarios based on manual rules from thousands or tens of thousands of user features. Insufficient manual experience often makes it impossible to accurately determine the target user group corresponding to each activity, and thus fails to bring ideal results to the enterprise or organization.
[0094] In view of this, the embodiments of the present application provide a data processing method, apparatus, device and storage medium, which obtain a training data set based on historical activity data, and then obtain a target model based on the training data set. Therefore, the target model can be used to determine the corresponding target user group for the activities to be carried out, so as to make accurate activity recommendations for the target user group, thereby obtaining ideal performance gains.
[0095] It should be noted that the solutions of the embodiments of the present application can be used in activities in various industries, including but not limited to: finance, commerce, education, medical care, technology and engineering, etc.
[0096] The technical solution of the present application and how the technical solution of the present application solves the above-mentioned technical problems are described in detail below with specific embodiments. The following specific embodiments can be combined with each other, and the same or similar concepts or processes may not be repeated in some embodiments. The embodiments of the present application will be described below in conjunction with the accompanying drawings.
[0097] It should be noted that the executor of the embodiment of the present application is an electronic device.
[0098] Figure 2 A schematic diagram of a data processing method provided in an embodiment of the present application Figure 1 .like Figure 2 As shown, the data processing method includes the following steps:
[0099] S201. Obtain historical activity data.
[0100] The historical activity data includes user data, activity data and performance data corresponding to different types of historical activities.
[0101] It should be noted that the present embodiment does not specifically limit the source and collection time of historical activity data. For example, historical activities carried out by an enterprise or organization in the past year can be selected as the data source of historical activity data.
[0102] Different industries have different product types, and the corresponding activity types are also different. For example, for the financial industry, according to the product type classification of the financial industry, historical activity data may include but is not limited to: data on activities corresponding to products such as deposits, loans, financial management, funds, government bonds, precious metals, insurance, and credit cards.
[0103] Among them, user data refers to various information and data related to individual users. User data can be collected in a variety of ways, including information actively provided by users, data generated by users when using products or services, and data obtained through third parties.
[0104] Activity data refers to information related to the user's behaviors and operations in participating in activities on a system, platform or device. This data can be used to analyze user behavior, optimize user experience, personalize services, and conduct market research. Activity data is usually collected through automated means and can be processed in real time or batch.
[0105] Effectiveness data refers to data on performance improvement or effect improvement achieved through certain intervention, improvement or optimization measures. This type of data is usually used to evaluate and verify the effectiveness of a measure, helping decision makers understand whether the improvement measures have achieved the expected goals and their specific impact.
[0106] For example, for the above-mentioned financial industry, the performance data may be the total amount of new loans for users, the total amount of new demand deposits for users, the shares of financial products newly purchased and held by users, and the like.
[0107] S202: Obtain a training data set based on user data, activity data, and performance data.
[0108] The training data set includes first user labels and first user features of different users in different types of historical activities, and the first user labels and the first user features correspond one to one.
[0109] S203: Use the training data set to train the initial model to obtain the target model.
[0110] In some embodiments, the target model is used to determine target user features in the first user features, and the target user features are used to determine target users for activity recommendations.
[0111] It should be noted that in the embodiments of the present application, the types of the initial models are not limited in the embodiments of the present application. For example, in some embodiments, the initial model may be a Categorical Boosting (CatBoost) model. The CatBoost model is a gradient boosting decision tree (GBDT) algorithm, which belongs to the gradient boosting framework and gradually optimizes the prediction ability of the model by constructing multiple decision trees.
[0112] Through a data processing method provided in the embodiment of the present application, based on different types of historical activity data, more comprehensive and accurate user features can be obtained, so that the target model trained by the user features can determine the corresponding target user group for the activity to be carried out, so as to make accurate activity recommendations for the target user group, and then carry out activities for these target user groups, bringing ideal results to the enterprise or organization. And through the target model, the limitations of manual experience can be avoided and efficiency can be improved.
[0113] Combine the following Figure 3 , explaining the specific method of obtaining training data sets based on user data, activity data and performance data.
[0114] Figure 3 A schematic diagram of a data processing method provided in an embodiment of the present application Figure 2 .like Figure 3 As shown, the data processing method includes the following steps:
[0115] S301. Obtain a first user feature according to user data and activity data.
[0116] Specifically, the user data and the activity data are cleansed to obtain the cleansed user data and the activity data;
[0117] For example, the activity type takes the activity corresponding to the deposit product as an example;
[0118] In this activity, user data includes but is not limited to: user basic data, current deposit balance, whether deposit products are held, user browsing history, whether there is a history of overseas residence, etc.
[0119] Activity data includes but is not limited to: deposit product segmentation types, activity funds, etc.;
[0120] In the embodiment of the present application, when cleaning the user data and activity data, data with weak correlation with the activity can be cleaned and removed. For example, data such as "whether there is a history of overseas residence" in the user data can be deleted to obtain cleaned user data and activity data.
[0121] In the embodiments of the present application, the quality, reliability and accuracy of data can be improved through cleaning processing.
[0122] Furthermore, feature engineering is performed on the cleaned user data and activity data, thereby converting the user data and activity data into corresponding features to obtain a first user feature corresponding to each user.
[0123] For example, for exact numeric data, for example, the current deposit balance in the user data of user 1 is 100, the user age in the basic data of user 1 is 29, and the activity funds in the activity data are 1000. Feature engineering is performed, and the corresponding numeric data remains unchanged. For example, for user 1, the corresponding user features are the current deposit balance of 100, the user age of 29, and the activity funds of 1000.
[0124] For binary data, user characteristics are determined based on preset symbols. For example, for the data of "whether to hold deposit products", when performing feature engineering, if "yes", the preset positive example symbol is determined as the user's characteristic, and if "no", the preset negative example symbol is determined as the user's characteristic.
[0125] It should be noted that the embodiments of the present application do not specifically limit the types of preset positive example symbols and preset negative example symbols. For example, the preset positive example symbol can be 1, and the preset negative example symbol can be 0. Exemplarily, for user 1, if it is determined based on the user data that the user 1 does not hold a deposit product, then the user feature corresponding to the user is determined to be "0"; if it is determined that the user 1 holds a deposit product, then the user feature corresponding to the user is determined to be "1". For the remaining data excluding digital data and binary data, such as the deposit product segmentation type, user browsing history, combined with the degree of relevance to the activity, this type of data can be converted into binary data, and the user characteristics can be determined in the same feature engineering processing method as the above-mentioned binary data processing.
[0126] For example, based on the user's browsing history data in the user data, determine whether the user has browsed the activity-related information; or based on the user's product ownership data in the user data, determine whether the user owns a certain product.
[0127] In a possible implementation, based on the first user feature, a combined feature is obtained by cross-combining and / or clustering two or more first user features.
[0128] Exemplarily, the activity type takes the activity corresponding to the deposit product as an example; in this activity, the first user characteristic of each user includes but is not limited to the user's age, frequency of purchasing financial products, total amount of current deposits, total amount of time deposits, etc.
[0129] By cross-combining features, two or more features are cross-combined. For example, the user's age and the frequency of purchasing financial products are cross-combined to obtain the combined feature "age-frequency of purchasing financial products".
[0130] Through cross-aggregation combination, two or more similar features are aggregated and calculated, such as sum, average, maximum, etc. For example, the total amount of demand deposits and the total amount of time deposits are summed to obtain the combined feature "total amount of deposits".
[0131] Optionally, by incorporating the combined features into the first user features, the number of first user features can be effectively expanded, thereby providing richer and more detailed first user features and improving accuracy.
[0132] S302: Obtain a first user tag according to the performance data.
[0133] Specifically, for each user, the effectiveness gain of the user in the historical activity is obtained according to the effectiveness data of any historical activity; and then the first user tag is obtained according to the effectiveness gain.
[0134] Optionally, based on the performance data of any historical activity, first data of the user before the historical activity and second data of the user after the historical activity are obtained, and based on the first data and the second data, the performance gain of the user in the historical activity is obtained.
[0135] The first data and the second data are data of the same product. For example, taking the "deposit" product as an example, the first data is the deposit amount of a certain user before a certain activity, and the second data is the deposit amount of the user after the activity. For example, activity a type is an activity corresponding to the deposit product. Before activity a, user 1's deposit is 1000, and after activity a, user 1's deposit is 1500. Then the first data corresponding to the user is 1000, and the second data is 1500.
[0136] In some optional implementations, the performance gain of the user in historical activities can be obtained through the ratio of the second data to the first data.
[0137] Exemplarily, still taking the first data as 1000 and the second data as 1500 as an example, according to the ratio of the second data to the first data, it can be obtained that the effectiveness gain of the user in the historical activities is 150%.
[0138] Further, if the effectiveness gain is greater than or equal to the preset gain, the first user tag of the user is determined to be the first tag, wherein the first tag is used to indicate that the user is a positive example in historical activities.
[0139] If the effectiveness gain is less than the preset gain, the first user tag of the user is determined to be a second tag, wherein the second tag is used to indicate that the user is a counterexample in historical activities.
[0140] For example, the preset gain is 110%, the first label is 1, and the second label is 0;
[0141] If the effectiveness gain of a certain user is greater than 110%, that is, the effectiveness gain of the user is greater than the preset gain, then the first user tag of the user is determined to be 1;
[0142] If the effectiveness gain of a certain user is 110%, that is, the effectiveness gain of the user is equal to the preset gain, then the first user tag of the user is determined to be 1;
[0143] If the effectiveness gain of a certain user is 105%, that is, the effectiveness gain of the user is less than the preset gain, then the first user tag of the user is determined to be 0.
[0144] S303: Obtain a training data set according to the first user feature and the first user label.
[0145] Possibly, the first user characteristic is one or more.
[0146] For one user, there is a first user feature and a first user tag, wherein the first user tag and the first user feature correspond one to one.
[0147] A training data set is obtained by integrating first user features and first user labels of multiple users in the activity.
[0148] In the embodiment of the present application, by performing feature engineering on user data, activity data and performance data to enhance the more comprehensive expression capability of features, and integrating the first user features and the first user labels after feature engineering processing to obtain a training data set, the input of the model can be optimized, the speed of model training can be accelerated, and the accuracy can be improved.
[0149] Figure 4 A flow chart of a model training method provided in an embodiment of the present application. Figure 4 The model training method shown specifically includes the following steps:
[0150] S401: Train the initial model using a training data set to obtain at least one first model that has been successfully trained.
[0151] Possibly, the first model is one or more.
[0152] The embodiment of the present application adopts a cross-validation method to train the initial model.
[0153] The training data set is randomly divided into K subsets, where K is an integer greater than or equal to 1. Then, the initial model is trained and verified K times on K different training data subsets. In each training, one of the training data subsets is used as a verification set, and the remaining K-1 training data subsets are used as training sets. After K training times, K first models that are successfully trained are obtained.
[0154] The embodiment of the present application does not limit the value of K. For example, the value of K may be 7.
[0155] Specifically, the training data set is randomly divided into 7 subsets, and then the initial model is trained and verified 7 times on 7 different training data subsets. In each training, one of the training data subsets is used as a verification set, and the remaining 6 training data subsets are used as training sets. After 7 trainings, 7 successfully trained first models are obtained.
[0156] In the embodiment of the present application, a cross-validation training method is used to reduce overfitting and optimize parameters, thereby improving accuracy.
[0157] In order to obtain a target model that meets the requirements, the second user features of multiple users in the target activity are input into the first model, and the second user labels of the multiple users predicted by the first model according to the second user features are obtained.
[0158] S402: Input second user features of multiple users in the target activity into the first model, and obtain second user labels of the multiple users predicted by the first model according to the second user features.
[0159] The third user tag is obtained based on the performance data of the target activity. In a possible implementation, the target activity includes at least one of an unobtained historical activity, an ongoing activity, and an unobtained future activity, wherein the ongoing activity and the unobtained future activity obtain performance data after the activity is successfully carried out; and the performance data of the activity is obtained through the unobtained historical activity.
[0160] For each user, the effectiveness gain of the user in the target activity is obtained based on the effectiveness data of the target activity; and then the third user tag is obtained based on the effectiveness gain. The method of obtaining the third user tag is similar to the method of obtaining the first user tag in the above embodiment, and will not be repeated here.
[0161] S403: Determine a target model from at least one first model according to the accuracy of the second user labels predicted by the first model for multiple users.
[0162] Furthermore, for each first model, the accuracy of the first model is obtained according to the second user tags of the multiple users predicted by the first model and the third user tags of the multiple users.
[0163] Specifically, for each first model, based on each user, the second user tag corresponding to each user is compared with the corresponding third user tag, and the accuracy of the first model is obtained according to the comparison result. Among them, when the second user tag is compared with the third user tag, the following types are included:
[0164] Type 1: the second user tag corresponding to the user is the same as the corresponding third user tag;
[0165] Type 2: The second user tag corresponding to the user is different from the corresponding third user tag.
[0166] The number of type 1 and type 2 of multiple users in the target activity is obtained, and the accuracy of the first model is obtained according to the ratio of the number of type 1 to the total number of type 1 and type 2.
[0167] Exemplarily, among all users of the target activity, the number of type 1 is 85, and the number of type 2 is 15. According to the ratio of the number of type 1 to the total number of type 1 and type 2, the accuracy of the first model is 85%.
[0168] Further, it is determined that among at least one first model, a first model having an accuracy rate greater than a preset accuracy rate is a target model.
[0169] It should be noted that the preset accuracy rate is not limited in the present embodiment. For example, the preset accuracy rate may be 85%;
[0170] In some examples, if the accuracy of the first model 1 is 95%, and the accuracy of the first model 1 is greater than the preset accuracy of 85%, the first model is determined to be the target model;
[0171] In some examples, if the accuracy of the first model 2 is 85%, the accuracy of the first model 2 is equal to the preset accuracy of 85%, and the first model is determined to be the target model;
[0172] In some examples, if the accuracy of the first model 3 is 75%, and the accuracy of the first model 3 is less than the preset accuracy of 85%, then the first model is not the target model;
[0173] Possibly, there are one or more first models, and when the accuracy of the first models is less than a preset accuracy, the target model obtained in the current training process is zero.
[0174] In one possible implementation, if the target model is zero, the training data set can be reconstructed, and the initial model can be trained using the reconstructed training data set to obtain at least one reconstructed first model. Then, from the at least one first model, the first model with an accuracy greater than a preset accuracy is the target model. The determination method is similar to the above embodiment and will not be repeated here.
[0175] It should be noted that the target model provided in the embodiment of the present application can be applied to a variety of usage scenarios, for example:
[0176] Scenario 1: Prediction of future activity gains. For example, for future activities that are being planned or completed, based on the relevant data of the future activities, the target model is used to predict the gains that the future activities will bring to users, and provide reference gain data for future activities to improve, thereby improving the yield and accuracy of future activity gains.
[0177] Scenario 2: Determine the target user scenario for future activities. For example, for future activities that have not yet been carried out, the target users can be determined through the target model to achieve more ideal results.
[0178] It should be understood that other scenarios where the target model is applicable refer to the above-mentioned scenario one and scenario two, which will not be described in detail here.
[0179] Figure 5 A schematic diagram of a process for determining a target user provided in an embodiment of the present application. Figure 5 As shown, the data processing method includes the following steps:
[0180] S501. Obtain the weight value of each first user feature when the target model is successfully trained.
[0181] Specifically, during the training phase, by presetting initial weights, the initial weights are continuously evaluated and updated within the initial model based on the influence and importance of different first user features on the first user label. When the training is successful, the weights corresponding to the target model are determined. The weights applied when the target model is successfully trained are the weight values of each first user feature.
[0182] It should be noted that, a higher weight value of the first user feature indicates that the first user feature has a higher contribution to the positive example of the first user tag, and a lower contribution to the negative example of the first user tag. Conversely, a lower weight value of the first user feature indicates that the first user feature has a higher contribution to the negative example of the first user tag, and a lower contribution to the positive example of the first user tag.
[0183] Exemplarily, the first user features a, b, c, and d jointly influence the set E of first user tags of all users.
[0184] The initial weight value of the first user feature a is preset to be 0.25, the initial weight value of the first user feature b is preset to be 0.25, the initial weight value of the first user feature c is preset to be 0.25, and the initial weight value of the first user feature d is preset to be 0.25.
[0185] In the process of training the initial model, the model continuously evaluates and updates the initial weight values of the first user features a, b, c, and d according to the importance of the influence of different first user features on the first user label E. For example, when the target model is successfully trained, the weight value corresponding to the first user feature a is 0.20, the weight value corresponding to the first user feature b is 0.40, the weight value corresponding to the first user feature c is 0.30, and the weight value corresponding to the first user feature d is 0.10.
[0186] S502: Determine the first user features with the top M weight values in descending order as target user features, or determine the first user features with a weight value greater than a preset weight value as target user features.
[0187] Specifically, when the number of first user features is greater than a preset value M, first user features are sorted from high to low based on the determined weight values of the first users, and first user features with a preset value of M before sorting are obtained as target user features.
[0188] When the number of the first user features is less than the preset value M, the first user features whose weight values are greater than the preset weight value are determined as the target user features.
[0189] Exemplarily, taking the preset value M as 5, the weight value of the first user feature a as 0.20, the weight value of the first user feature b as 0.40, the weight value of the first user feature c as 0.30, the weight value of the first user feature d as 0.10, and the preset weight value as 0.25, since the number of first user features is 4, which is less than the preset value 5, it can be determined that the first user feature whose weight value is greater than the preset weight value among the first user features is the target user feature, that is, in this example, the target user features can be determined to be the first user features b and c.
[0190] In the embodiment of the present application, based on the weight value of the first user feature and according to the comparison between the number of the first user features and M, the above-mentioned appropriate method is used to ensure that the determined target user features are more in line with actual needs, thereby improving accuracy.
[0191] S503: Determine target users for activity recommendation based on target user characteristics.
[0192] Specifically, based on different types of unimplemented activities, user characteristics of all users are obtained, and target users for activity recommendations are determined through the degree of correlation between target user characteristics and user characteristics of each user.
[0193] It should be noted that the correlation between the target user characteristics and the user characteristics of each user can be represented by the ratio of the part of the user characteristics of each user that is the same as the target user characteristics to the target user characteristics.
[0194] Exemplarily, when the correlation between the target user feature and the user feature of a user is greater than a preset correlation, the customer is determined to be a target user for activity recommendation.
[0195] When the correlation degree between the target user feature and the user feature of a user is less than or equal to the preset correlation degree, it is determined that the customer is not a target user for activity recommendation.
[0196] In a possible implementation manner, the target user may be one or more than one target user.
[0197] In the embodiment of the present application, the target user for activity recommendation is determined by the correlation between the target user characteristics and the user characteristics of a user, which can improve the accuracy of determining the target user.
[0198] Figure 6 A schematic diagram of the structure of a data processing device provided in an embodiment of the present application. Figure 6 As shown, the device 600 includes:
[0199] The acquisition module 601 is used to acquire historical activity data, which includes user data, activity data and effectiveness data corresponding to different types of historical activities.
[0200] Processing module 602 is used to obtain a training data set based on user data, activity data and performance data. The training data set includes first user tags and first user features of different users in different types of historical activities. The first user tags and user features correspond one to one.
[0201] The training module 603 uses the training data set to train the initial model to obtain a target model, where the target model is used to determine the target user features in the first user features, and the target user features are used to determine the target user for activity recommendation.
[0202] In a possible implementation, the processing module 602 is specifically configured to:
[0203] According to the performance data, the first user tag is obtained;
[0204] Obtaining a first user feature according to the user data and the activity data;
[0205] In a possible implementation, the processing module 602 is specifically configured to:
[0206] For each user, based on the performance data of any historical activity, obtain the user's performance gain in the historical activity;
[0207] If the effectiveness gain is greater than or equal to the preset gain, determining that the first user tag of the user is a first tag, the first tag is used to indicate that the user is a positive example in historical activities;
[0208] If the effectiveness gain is less than the preset gain, the first user tag of the user is determined to be a second tag, and the second tag is used to indicate that the user is a counterexample in historical activities.
[0209] In a possible implementation, the processing module 602 is specifically configured to:
[0210] According to the performance data of any historical activity, obtain the first data of the user before the historical activity and the second data of the user after the historical activity, where the first data and the second data are data of the same product;
[0211] The user's performance gain in historical activities is obtained based on the first data and the second data.
[0212] In a possible implementation, the training module 602 is specifically used to:
[0213] Training the initial model using the training data set to obtain at least one first model that is successfully trained;
[0214] Inputting second user features of multiple users in the target activity into the first model, and obtaining second user labels of the multiple users predicted by the first model according to the second user features;
[0215] A target model is determined from at least one first model according to the accuracy of the second user labels predicted by the first model for the plurality of users.
[0216] In a possible implementation, the training module 603 is specifically used to:
[0217] For each first model, obtaining an accuracy rate of the first model according to the second user tags of the plurality of users predicted by the first model and the third user tags of the plurality of users;
[0218] Determine, among at least one first model, a first model having an accuracy greater than a preset accuracy as a target model.
[0219] In a possible implementation, the data processing device 600 further includes: a recommendation module 604 specifically configured to:
[0220] According to the target model, target user features in the first user features are obtained.
[0221] In a possible implementation, the recommendation module 604 is specifically configured to:
[0222] Obtaining the weight value of each first user feature when the target model is successfully trained;
[0223] Determine the first user features with the top M weight values in descending order as target user features, or determine the first user features with weight values greater than a preset weight value as target user features.
[0224] In a possible implementation, the recommendation module 604 is specifically configured to:
[0225] Determine the target users for activity recommendations based on target user characteristics.
[0226] The data processing device provided in the embodiment of the present application is used to execute the aforementioned data processing method embodiment. Its implementation principle and technical effect are similar and will not be described in detail.
[0227] Figure 7 This is a schematic diagram of the structure of an electronic device provided in this application. Figure 7 As shown, the electronic device 700 may include: a transceiver 701, a memory 702, and a processor 703. Exemplarily, the transceiver 701, the memory 702, and the processor 703 are interconnected via a bus 704.
[0228] The transceiver 701 may include: a transmitter and / or a receiver. The transmitter may also be referred to as a transmitter, a transmitter, a transmission port, a transmission interface, or the like, and the receiver may also be referred to as a receiver, a receiver, a reception port, a reception interface, or the like.
[0229] The memory 702 (storage medium) includes: read-only memory (ROM), RAM, flash memory, hard disk, solid state drive, magnetic tape, floppy disk, optical disc and any combination thereof.
[0230] The processor 703 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
[0231] Memory 702 stores computer-executable instructions.
[0232] The processor 703 executes the computer-executable instructions stored in the memory, so that the processor executes the method in the above embodiment.
[0233] The present application also provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, they are used to implement the method in the above embodiment.
[0234] The present application also provides a computer program product, which includes a computer program. When the computer program is executed by a computer, the method in the above embodiment is implemented.
[0235] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1A function specified in one or more boxes.
[0236] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0237] Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A data processing method, characterized in that: include: Acquire historical activity data, wherein the historical activity data includes user data, activity data, and performance data corresponding to different types of historical activities; Obtaining a training data set according to the user data, activity data, and performance data, wherein the training data set includes first user tags and first user features of different users in different types of historical activities, and the first user tags and the user features correspond one to one; The training data set is used to train the initial model to obtain a target model, wherein the target model is used to determine target user features in the first user features, and the target user features are used to determine target users for activity recommendation.
2. The data processing method according to claim 1, characterized in that: The step of obtaining a training data set according to the user data, activity data and performance data includes: Obtaining the first user tag according to the performance data; The first user feature is obtained according to the user data and the activity data.
3. The method according to claim 2, characterized in that The obtaining the first user tag according to the performance data includes: For each user, according to the performance data of any historical activity, obtain the performance gain of the user in the historical activity; If the effectiveness gain is greater than or equal to the preset gain, determining that the first user tag of the user is a first tag, the first tag is used to indicate that the user is a positive example in the historical activity; If the effectiveness gain is less than the preset gain, the first user tag of the user is determined to be a second tag, where the second tag is used to indicate that the user is a counterexample in the historical activity.
4. The method according to claim 3, characterized in that The obtaining, based on the performance data of any historical activity, the performance gain of the user in the historical activity includes: According to the performance data of any historical activity, obtaining first data of the user before the historical activity and second data of the user after the historical activity, wherein the first data and the second data are data of the same product; The user's performance gain in the historical activity is obtained based on the first data and the second data.
5. The method according to claim 1, characterized in that The step of training the initial model using the training data set to obtain the target model includes: Training the initial model using the training data set to obtain at least one first model that is successfully trained; Inputting second user features of multiple users in the target activity into the first model, and obtaining second user labels of the multiple users predicted by the first model according to the second user features; A target model is determined from the at least one first model according to the accuracy of the second user labels predicted by the first model for multiple users.
6. The method according to claim 5, characterized in that The determining a target model from the at least one first model according to the accuracy of the second user labels predicted by the first model for the plurality of users comprises: Acquire third user tags of multiple users, where the third user tags are obtained based on performance data of the target activity; For each first model, obtaining an accuracy rate of the first model according to the second user tags of the plurality of users predicted by the first model and the third user tags of the plurality of users; Determine, among the at least one first model, a first model having an accuracy rate greater than a preset accuracy rate as a target model.
7. The method according to any one of claims 1 to 6, characterized in that Also includes: According to the target model, target user features in the first user features are obtained.
8. The method according to claim 7, characterized in that The step of obtaining target user features in the first user features according to the target model includes: Obtaining a weight value of each of the first user features when the target model is successfully trained; Determine the first user features whose weight values are ranked in descending order as the target user features, or determine the first user features whose weight values are greater than a preset weight value as the target user features, where M is an integer greater than or equal to 1.
9. The method according to claim 8, characterized in that Also includes: According to the target user characteristics, target users for activity recommendation are determined.
10. A data processing device, characterized in that: include: An acquisition module, used to acquire historical activity data, wherein the historical activity data includes user data, activity data and performance data corresponding to different types of historical activities; A processing module, configured to obtain a training data set according to the user data, activity data and performance data, wherein the training data set includes first user tags and first user features of different users in different types of historical activities, and the first user tags and the user features correspond one to one; The training module is used to train the initial model using the training data set to obtain a target model, wherein the target model is used to determine the target user features in the first user features, and the target user features are used to determine the target user for activity recommendation.
11. An electronic device, characterized in that: include: Transceivers, processors, memory; The memory stores computer-executable instructions; The processor executes the computer-executable instructions stored in the memory, so that the processor performs the data processing method according to any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, which, when executed by a processor, are used to implement the data processing method according to any one of claims 1 to 9.
13. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the data processing method according to any one of claims 1 to 9 is implemented.
