Model training method and user demand score determination method

CN123012572APending Publication Date: 2026-10-30ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611170086.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-03
Publication Date
2026-10-30

AI Technical Summary

Benefits of technology

本说明书实施例中,根据预设样本采样数量及各个特征值数量确定各特征值的样本采样需求量,并针对各特征值独立采样后合并去重,能够从源头保障各特征值类别的样本在数量上的均衡分布,从而可以避免在模型训练时,因样本数据中类别分布不均导致的模型泛化能力差,针对类别数量少的样本训练不足、预测准确率低的问题。另外,本说明书一个或多个实施例中基于样本的信息密度及各个特征值的样本采样需求量,从候选样本池中筛选样本,使得最终样本集中的样本既满足各类别均衡的配额要求,又具有较高的信息完整性,从而可以有效降低数据稀疏性对模型学习的干扰。最终利用该样本集训练机器学习模型,能够显著提升模型在真实应用场景中的预测稳定性与泛化能力,使得训练得到的模型可以更可靠、更准确地确定出用户针对目标事件的需求分值。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123012572A_ABST
    Figure CN123012572A_ABST
Patent Text Reader

Abstract

The model training method and the user demand score determination method are disclosed in the embodiments of the present specification. The model is a machine learning model for determining a user demand score for a target event. The model training method comprises: after obtaining a user data set containing feature data of multiple features of multiple users, determining the sample sampling demand quantity of each feature value of each feature according to the preset sample sampling quantity and the quantity of feature values contained in each feature; then, based on the sample sampling demand quantity, independently sampling each feature value of each feature in the user data set, and merging and removing the samples obtained by sampling to obtain a candidate sample pool; further, based on the information density of each sample in the candidate sample pool and the sample sampling demand quantity, sampling a preset sample sampling quantity of samples from the candidate sample pool to obtain a sample set; finally, training the machine learning model using the sample set.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of model training technology, and in particular to model training methods and methods for determining user requirement scores. Background Technology

[0002] With the widespread application of big data and artificial intelligence technologies in user operations, precision marketing, and risk identification, training machine learning models based on user characteristic data to predict users' demand for target events has become a mainstream technical approach. However, in the process of processing and modeling massive amounts of user data, issues such as large data scale, uneven category distribution, and inconsistent sample information completeness are common, directly affecting model training efficiency and the reliability of prediction results.

[0003] Therefore, a stable and efficient modeling data processing and model training scheme is needed to improve the accuracy of model predictions. Summary of the Invention

[0004] In view of this, embodiments of this application provide a model training method. One or more embodiments of this specification also relate to a method for determining user demand scores, a model training apparatus, an apparatus for determining user demand scores, a computing device, and a computer-readable storage medium, to address the technical deficiencies existing in the prior art.

[0005] According to a first aspect of the embodiments of this specification, a model training method is provided, wherein the model is a machine learning model for determining a user's demand score for a target event, the method comprising: Obtain a user data set; the user data set contains feature data of multiple users with various characteristics; Based on the preset sample sampling quantity and the number of feature values ​​contained in each feature, determine the sample sampling quantity of each feature value of each feature. Based on the sample sampling requirements, each feature value of each feature in the user dataset is sampled independently, and the sampled samples are merged and deduplicated to obtain a candidate sample pool. Based on the information density of each sample in the candidate sample pool and the sample sampling requirement, the preset number of samples are sampled from the candidate sample pool to obtain a sample set; The machine learning model is trained using the sample set.

[0006] According to a second aspect of the embodiments of this specification, a method for determining a user demand score is provided, comprising: Obtain user data to be predicted; the user data to be predicted includes feature data of multiple characteristics of at least one user to be predicted; The user data to be predicted is input into the model to obtain at least one demand score of the user to be predicted for the target event output by the model; wherein the model is trained by the above model training method.

[0007] According to a third aspect of the embodiments of this specification, a model training apparatus is provided, the model being a machine learning model for determining a user's demand score for a target event, the apparatus comprising: The acquisition module is used to acquire a user data set; the user data set contains feature data of multiple users with various characteristics; The determination module is used to determine the sample sampling requirements of each feature value of each feature based on the preset sample sampling quantity and the number of feature values ​​contained in each feature. The first sampling module is used to independently sample each feature value of each feature in the user data set based on the sample sampling demand, and merge and deduplicate the sampled samples to obtain a candidate sample pool. The second sampling module is used to sample the preset number of samples from the candidate sample pool based on the information density of each sample in the candidate sample pool and the sample sampling requirement, so as to obtain a sample set. A training module is used to train the machine learning model using the sample set.

[0008] According to a fourth aspect of the embodiments of this specification, an apparatus for determining a user demand score is provided, comprising: The data acquisition module is used to acquire user data to be predicted; the user data to be predicted includes feature data of multiple features of at least one user to be predicted; The data input module is used to input the user data to be predicted into the model to obtain at least one demand score of the user to be predicted for the target event output by the model; wherein the model is trained by the above-described model training method.

[0009] According to a fifth aspect of the embodiments of this specification, a computing device is provided, comprising: At least one processor; and, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, which enable the at least one processor to implement the above-described model training method or the above-described method for determining user demand scores.

[0010] According to a sixth aspect of the embodiments of this specification, a computer-readable storage medium is provided that stores computer-executable instructions, which, when executed by a processor, implement the above-described model training method or the above-described method for determining user-required scores.

[0011] At least one embodiment provided in this specification can achieve the following beneficial effects: In the embodiments of this specification, the sample sampling requirement for each feature value is determined based on the preset sample sampling quantity and the quantity of each feature value. After independent sampling of each feature value, samples are merged and deduplicated. This ensures a balanced distribution of samples for each feature value category from the source, thus avoiding problems such as poor model generalization ability, insufficient training for samples with fewer categories, and low prediction accuracy caused by uneven category distribution in the sample data during model training. Furthermore, in one or more embodiments of this specification, samples are selected from the candidate sample pool based on the information density of the samples and the sample sampling requirement for each feature value. This ensures that the samples in the final sample set meet both the balanced quota requirements for each category and have high information integrity, effectively reducing the interference of data sparsity on model learning. Finally, training a machine learning model using this sample set significantly improves the model's prediction stability and generalization ability in real-world application scenarios, enabling the trained model to more reliably and accurately determine the user's required score for the target event. Attached Figure Description

[0012] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0013] Figure 1 This is a schematic diagram illustrating an application scenario of a model training method provided in one embodiment of this specification; Figure 2 This is a flowchart illustrating a model training method provided in one embodiment of this specification; Figure 3 This is a flowchart illustrating a method for determining user demand scores according to one embodiment of this specification; Figure 4 This is a flowchart illustrating a model training method provided in one embodiment of this specification; Figure 5 This is a schematic diagram of the structure of a model training device provided in one embodiment of this specification; Figure 6This is a schematic diagram of a device for determining user demand scores according to one embodiment of this specification; Figure 7 This is a structural block diagram of a computing device provided in one embodiment of this specification. Detailed Implementation

[0014] Many specific details are set forth in the following description to provide a full understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this application; therefore, this application is not limited to the specific embodiments disclosed below.

[0015] The terminology used in one or more embodiments of this application is for the purpose of describing particular embodiments only and is not intended to limit the scope of one or more embodiments of this application. The singular forms “a,” “the,” and “the” used in one or more embodiments of this application and in the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” used in one or more embodiments of this application refers to and includes any or all possible combinations of one or more associated listed items.

[0016] It should be understood that although the terms first, second, etc., may be used to describe various information in one or more embodiments of this application, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first may also be referred to as second without departing from the scope of one or more embodiments of this application, and similarly, second may also be referred to as first. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."

[0017] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0018] First, the terms and concepts used in one or more embodiments of this specification will be explained.

[0019] The long-tail effect (LTE) refers to the phenomenon in data distribution where a few classes occupy a large number of samples, while many classes correspond to only a small number of samples. The long-tail effect leads to an imbalanced data distribution, affecting the model's learning performance and predictive stability for rare classes.

[0020] Model overfitting (OF) refers to the phenomenon where a machine learning model learns too much detail of random noise and local patterns on the training data, performing well only on the training set but failing to adapt to new, unknown data, resulting in decreased generalization ability and unreliable prediction results.

[0021] A feature is a field name that describes a specific dimension of an attribute of a user, object, or event. In a dataset, a feature can be represented as a column of feature data. It serves as the fundamental input dimension for machine learning models to learn and predict, and is used to uniformly represent a certain type of attribute information.

[0022] A feature value is the specific value category that a feature takes on a specific sample; it is the specific data content that the model can directly calculate and process.

[0023] An observation (Obs) refers to the specific data within a single cell in a dataset, that is, the specific value of a record under a certain feature dimension. It is the smallest unit that constitutes feature data and is used to characterize the specific state of a sample on a single attribute.

[0024] Independent sampling (IS) refers to performing independent sampling operations on different feature dimensions during the construction of training samples. The sampling quota and sampling process of each feature are independent of each other to ensure that each feature value can be sampled in a balanced manner according to the preset requirements.

[0025] Merge and Deduplication (M&D) refers to the process of combining multiple candidate samples obtained by independent sampling of multiple features, and identifying and removing duplicate samples, so that each sample in the final candidate sample pool retains only a unique record, thereby improving the uniqueness and effectiveness of the sample set.

[0026] Approximately constant features (ACFs) are features that take almost identical values ​​across the entire dataset, with very few unique values ​​and an extremely concentrated distribution. ACFs represent the same value or category for most observations, differing only in a very small number of samples. They lack effective discriminative power and statistical significance, and therefore cannot provide effective information for model training.

[0027] Label encoding is a method of mapping each category in a categorical feature to an integer value. For example, in the feature of "education level", "primary school", "secondary school", and "university" can be mapped to 0, 1, and 2, respectively. Label encoding is simple and efficient, and is suitable for ordered categorical features with natural sequential relationships.

[0028] One-hot encoding (OHE) is an encoding method that expands each category in a categorical feature into an independent binary feature column. For a feature with k categories, one-hot encoding generates k new features, each representing a category. A sample takes a value of 1 for the feature corresponding to its own category and a value of 0 for the features corresponding to other categories. For example, the three categories "red," "green," and "blue" in the "color" feature can be mapped to three feature columns: whether it is red (1 / 0), whether it is green (1 / 0), and whether it is blue (1 / 0). This encoding method effectively avoids the incorrect introduction of the order relationship between categories and is a common method for handling unordered categorical features, but it significantly increases the feature dimensionality.

[0029] Binarization is a process that converts continuous or discrete numerical values ​​into features containing only the two values ​​0 and 1. Binarization is typically achieved by setting a threshold: when the original value is greater than the threshold, the binarized value is 1; otherwise, it is 0. For example, when binarizing the feature "number of logins in the last 7 days" with a threshold of 3, users with 3 or more logins are marked as 1 (active user), and users with fewer than 3 logins are marked as 0 (inactive user).

[0030] Hyperparameters (HP) are control parameters that are manually set before model training begins and cannot be automatically learned from data. They are used to constrain the model structure, training strategy, and convergence process. Hyperparameters directly affect the model's training performance, generalization ability, and runtime efficiency.

[0031] Cross-validation (CV) is a model evaluation method that divides a dataset into multiple subsets, using a subset of the data for training and the remaining data for validation in turn. Cross-validation obtains an average performance metric through repeated training and validation, which is used to stably and objectively evaluate the model's generalization ability and optimal parameter combinations.

[0032] A machine learning model (ML model) is a data-driven computational model that automatically learns the mapping relationship and inherent patterns between features and targets from a large amount of sample data, forming a reusable mathematical expression. After training, a machine learning model can predict, classify, or score new unknown data, outputting computational results with generalization ability.

[0033] Statistical Significance Analysis (SSA) is a statistically based testing method used to determine whether the importance, differences, or patterns of features in data are stable, reproducible, and genuine signals, rather than random fluctuations, accidental errors, or noise. By quantitatively testing the performance of features in multi-fold cross-validation, SSA can distinguish between effective features and invalid noise, improving the reliability of model training and the accuracy of feature selection.

[0034] Large Language Models (LLMs) refer to deep learning models trained on massive amounts of text data. They can generate natural language text or understand the meaning of language text. LLMs can acquire relevant knowledge about various topics by training on large datasets. The core idea of ​​LLMs is to learn patterns and structures of natural language through large-scale unsupervised training, simulating human language cognition and generation processes to some extent. LLMs perform exceptionally well in various application scenarios, capable of performing not only simple language tasks such as spell checking and grammar correction, but also complex tasks such as text summarization, machine translation, sentiment analysis, dialogue generation, and content recommendation. Through pre-training on large-scale datasets, LLMs acquire powerful general modeling and generalization capabilities.

[0035] With the development of big data and artificial intelligence technologies in internet services, financial risk control, and intelligent marketing, building predictive models based on user behavior data to identify potential users has become a core means of improving business decision-making efficiency. In practical applications, user characteristic data often exhibits characteristics such as high dimensionality, uneven distribution, and significant differences in information density, posing challenges to training machine learning models. For example, in user promotion response prediction scenarios, the vast majority of users may not participate in the activity, while samples of high-value users are scarce. Directly using raw data to train the model can easily lead to prediction bias, making it difficult to accurately identify the user group with genuine potential needs.

[0036] On the other hand, as the dimensions of user features increase, the redundancy between features, noise interference, and the long-tail effect of class distribution further exacerbate the risks of model overfitting and importance assessment distortion. Traditional sampling and feature preprocessing methods often struggle to balance class balance and sample information density, and lack effective mechanisms for processing low-frequency features, thus limiting the prediction accuracy and stability of the model in real-world applications.

[0037] To address the shortcomings in related technologies, this solution provides the following embodiments.

[0038] Figure 1 This is a schematic diagram illustrating an application scenario of a model training method provided in one embodiment of this specification.

[0039] like Figure 1 As shown, a user can log in to the system or application using user terminal 101. With the user's authorization, the system or application server 102 can store the user data in the database 103. Alternatively, in practical applications, the user can directly send user data to the server 102 using user terminal 101. After receiving the user data, the server 102 can store the user data in the database 103.

[0040] Furthermore, server 102 can obtain a user data set containing feature data of multiple users with various characteristics from database 103. Alternatively, in practical applications, if the user data sent by user terminal 101 to server 102 contains feature data of multiple users with various characteristics, server 102 can directly process these user data sets without retrieving them from database 103.

[0041] After obtaining a user dataset containing feature data of multiple users and various characteristics, server 102 can determine the sample sampling requirement for each feature value of each feature based on the preset sample sampling quantity and the number of feature values ​​contained in each feature. Based on the sample sampling requirement, server 102 independently samples each feature value of each feature in the user dataset, merges and deduplicates the sampled samples, and obtains a candidate sample pool.

[0042] Furthermore, the server 102 can sample a preset number of samples from the candidate sample pool based on the information density of each sample in the candidate sample pool and the sample sampling requirements of each feature value, to obtain a sample set; and use the sample set to train a machine learning model to obtain a model for determining the user's demand score for the target event.

[0043] The user terminal 101 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, object content computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs).

[0044] Server 102 can be, but is not limited to, any device, equipment, platform, or server cluster with computing and processing capabilities. Specifically, the server at server 102 can be an independent physical server, a server cluster consisting of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms.

[0045] Data transmission can occur between user terminal 101 and server 102, and between server 102 and database 103, via local area network (LAN), wide area network (WAN), Internet, or other types of data network connections, or via other means, without specific limitations.

[0046] Figure 1 The method described herein determines the sample sampling requirement for each feature value based on a preset sample size and the number of each feature value. After independently sampling each feature value and merging to remove duplicates, it ensures a balanced distribution of samples across all feature value categories from the source. This avoids problems during model training caused by uneven category distribution in the sample data, such as poor model generalization ability, insufficient training for samples with fewer categories, and low prediction accuracy. Furthermore, in one or more embodiments of this specification, samples are selected from the candidate sample pool based on the information density of the samples and the sample sampling requirement for each feature value. This ensures that the samples in the final sample set meet both the balanced quota requirements for each category and have high information integrity, effectively reducing the interference of data sparsity on model learning. Finally, training a machine learning model using this sample set significantly improves the model's prediction stability and generalization ability in real-world application scenarios, enabling the trained model to more reliably and accurately determine the user's required score for the target event.

[0047] Figure 2This is a flowchart illustrating a model training method provided in one embodiment of this specification. The model is a machine learning model used to determine a user's demand score for a target event. From a hardware perspective, the entity executing this process can be a server. From a program perspective, the entity executing this process can be a program hosted on the server. Figure 2 As shown, the process may include the following steps: Step 202: Obtain the user data set; the user data set contains feature data of multiple users with various characteristics.

[0048] In the embodiments of this specification, a feature can refer to a variable used to describe a user's attribute or behavior in a certain dimension. For example, a user's registration period, the number of times a user has logged in in the last 7 days, or whether a user has claimed a coupon, etc. Specifically, features can be divided into numerical features (such as spending amount) and categorical features (such as the user's city).

[0049] In the embodiments of this specification, feature data may refer to the specific values ​​of a user on various features. For example, for user A, the feature "city" is "city A", the feature "registration years" is 2, and the feature "number of logins in the last 7 days" is 5.

[0050] In practical applications, user datasets can be in the form of tables. Each row in a table represents data for a single user, and each column represents data corresponding to a specific feature. For example, table A contains 100,000 rows, each corresponding to a user. The columns in table A include: "City Tier" (a categorical feature with values ​​such as "Tier 1 City," "Tier 2 City," and "Tier 3 City"), "Number of Login Days in the Last 30 Days" (a numerical feature), "Number of Coupon Clicks in the Last 7 Days" (a numerical feature), and "Number of Registration Days" (a numerical feature).

[0051] Step 204: Determine the sample sampling requirement for each feature value of each feature based on the preset sample sampling quantity and the number of feature values ​​contained in each feature.

[0052] In the embodiments described in this specification, the preset sample sampling number may refer to the total number of samples expected to be collected from the user dataset, which is preset manually before model training. Alternatively, if it is not preset manually, the system default sample sampling number may be used.

[0053] In the embodiments of this specification, the number of feature values ​​can refer to the number of possible value categories for a certain feature. Specifically, for categorical features, the number of feature values ​​is the number of different category values. For example, if the feature "city" includes three categories: "Beijing", "Shanghai", and "Guangzhou", then the number of feature values ​​for this feature is 3.

[0054] In the embodiments of this specification, the sample sampling requirement can refer to the planned number of samples to be sampled from the user dataset for a specific feature value under a certain characteristic. Specifically, the sample sampling requirement for each feature value is a value calculated based on the number of feature values ​​according to a certain allocation strategy (such as equal allocation) under the constraint of a preset total sample sampling quantity. For example, if the preset total sample sampling quantity is 100,000, and the feature "city" has 2 feature values ​​(city A and city B), then the sample sampling requirement for each feature value can be 50,000 (equal allocation). Since different features can have different numbers of feature values, the sample sampling requirement for each feature value under different features may be different.

[0055] It should be noted that if, after obtaining the user dataset, samples are randomly selected from the user dataset according to the preset sample size, it may result in a lack of sufficient representation for rare feature values ​​(such as only 1% of users in a certain city), which in turn leads to poor predictive ability of the model for user groups with such rare feature values ​​during training.

[0056] In the embodiments of this specification, by determining the sample sampling requirement for each feature value based on the preset total sample sampling amount and the number of feature values ​​for each feature, it is beneficial to ensure that the sample sampling quantity corresponding to different feature values ​​under each feature is consistent, thereby effectively avoiding the problem of sample class imbalance in model training.

[0057] Step 206: Based on the sample sampling requirement, each feature value of each feature in the user data set is sampled independently, and the sampled samples are merged and deduplicated to obtain a candidate sample pool.

[0058] In the embodiments of this specification, sampling can refer to the process of selecting a number of records from a user dataset according to certain rules. Specifically, the sampling method can be random sampling, sequential selection, or selection by index, and there are no specific limitations on this.

[0059] In the embodiments of this specification, independent sampling can refer to the logical decoupling of sampling processes for different features (or different feature values ​​under the same feature). Each process samples samples from the user dataset that meet the sampling requirements corresponding to its own feature value, and the sampling processes do not affect each other. Independent sampling can ensure that each feature value can obtain sufficient samples, and can avoid the situation where samples of certain feature values ​​cannot be sampled due to scarce distribution.

[0060] In practical applications, after independently sampling each feature value of each feature in a user dataset, the samples obtained from each feature sampling can form a candidate sample subset corresponding to that feature. These candidate sample subsets for each feature can then be merged. The merged sample set may contain duplicate samples (because the same sample may be sampled by different feature values ​​from different features). Therefore, the merged sample set can be further deduplicated, removing duplicate sample records so that each sample (usually based on a user ID or other unique identifier) ​​is retained only once in the sample set. After deduplication, the candidate sample pool is obtained.

[0061] For example, in a user dataset (in tabular form), there are 10 million data entries (10 million rows) with two columns of features. If the preset sample size is 100,000, and the first column of the user dataset is "city," with 10 types of cities in the table (i.e., the "city" feature has 10 feature values), then the sample size requirement for each type of city (each feature value) is 10,000 entries. The second column of the table is "whether the user is a member," which is divided into "member" and "non-member." Therefore, the sample size requirement for the "member" feature value is 50,000 entries, and the sample size requirement for the "non-member" feature value is 50,000 entries. Then, based on the determined sample sampling requirements corresponding to each feature value, independent sampling is performed from the user dataset. After sampling, 100,000 sample data points corresponding to the feature "city" are added to candidate sample subset A, and 100,000 sample data points corresponding to the feature "whether or not a member" are added to candidate sample subset B. Subsequently, candidate sample subset A and candidate sample subset B are merged, and the merged sample set contains 200,000 sample data points. Assuming that 30,000 of these 200,000 sample data points are duplicate data points, the candidate sample pool obtained after deduplication contains 170,000 sample data points.

[0062] In the embodiments described in this specification, the deduplication operation eliminates redundancy introduced by repeated sampling of the same sample by multiple features, simplifies the size of the candidate sample pool, and thus helps reduce subsequent computational overhead. Furthermore, since the sampling processes of different feature values ​​do not interfere with each other, parallel execution is supported, enabling efficient operation on large-scale datasets, thereby improving data processing efficiency.

[0063] Step 208: Based on the information density of each sample in the candidate sample pool and the sample sampling requirement, sample the preset number of samples from the candidate sample pool to obtain a sample set.

[0064] In the embodiments of this specification, information density can refer to the richness of effective information carried by a sample. Specifically, information density can be the ratio of the number of non-empty feature values ​​in a sample to the total number of feature values. For example, if a sample has 100 features, of which 98 features have specific values ​​(non-empty), then the information density of this sample is 98%. The higher the information density, the higher the information completeness of the sample. Samples with high information density can provide more sufficient information when used for model training, reducing noise or bias caused by missing values.

[0065] In the embodiments of this specification, samples are selected from the candidate sample pool based on the information density of the samples and the sample sampling requirements of each feature value, so that the samples in the final sample set not only meet the quota requirements of each category, but also have high information integrity. Using such a sample set to train the model can effectively reduce the interference of data sparsity on model learning and improve the model training effect.

[0066] Step 210: Train the machine learning model using the sample set.

[0067] In the embodiments of this specification, the machine learning model may include, but is not limited to: logistic regression model, support vector machine model, decision tree-based ensemble model (such as gradient boosting tree model, random forest model), deep neural network model, etc.

[0068] In the embodiments described in this specification, on the one hand, the balanced distribution of sample categories in the sample set enables the model to learn the patterns corresponding to each feature value in a balanced manner, especially improving the prediction accuracy for users with scarce feature values. On the other hand, the high information density of samples in the sample set reduces the interference caused by missing values, enabling the model to converge faster.

[0069] In practical applications, training a machine learning model using a sample set yields a model for determining a user's demand score for a target event. The purpose of model training is to adjust the model's internal parameters so that, for a given input feature, the model's output demand score is as close as possible to the sample's true label (e.g., whether the user actually performed the target event).

[0070] In this context, a target event can refer to a predefined specific user behavior or state change in a business scenario that requires prediction of whether a user will trigger or perform it. For example, a target event could be "the user completes a purchase within the next 7 days," "the user clicks on recommended content," or "the user applies for a loan."

[0071] The demand score is used to quantify a user's level of need for a target event, their tendency to respond, or the likelihood of them doing so. For example, if the target event is "purchasing product A," a higher demand score indicates a higher likelihood that the user will purchase product A.

[0072] Figure 2 The method described herein determines the sample sampling requirement for each feature value based on a preset sample size and the number of each feature value. After independently sampling each feature value and merging to remove duplicates, it ensures a balanced distribution of samples across all feature value categories from the source. This avoids problems during model training caused by uneven category distribution in the sample data, such as poor model generalization ability, insufficient training for samples with fewer categories, and low prediction accuracy. Furthermore, in one or more embodiments of this specification, samples are selected from the candidate sample pool based on the information density of the samples and the sample sampling requirement for each feature value. This ensures that the samples in the final sample set meet both the balanced quota requirements for each category and have high information integrity, effectively reducing the interference of data sparsity on model learning. Finally, training a machine learning model using this sample set significantly improves the model's prediction stability and generalization ability in real-world application scenarios, enabling the trained model to more reliably and accurately determine the user's required score for the target event.

[0073] based on Figure 2 In addition to the method described in the embodiments of this specification, some specific implementation schemes of the method are also provided, which will be described below.

[0074] Optional, Figure 2 The method described above, which determines the sample sampling requirement for each feature value of each feature based on a preset sample sampling quantity and the number of feature values ​​contained in each feature, may specifically include: For each target feature among the features, determine the number of feature values ​​contained in the target feature; The ratio of the preset sample sampling quantity to the number of feature values ​​contained in the target feature is determined as the sample sampling requirement for each feature value of the target feature.

[0075] In the embodiments of this specification, for any target feature among the various features, the number of feature values ​​contained in the target feature can be determined based on the user data set. For example, if the user data set is data table A, and data table A contains the feature "city", and the "city" column contains four categories: "city a", "city b", "city c" and "city d", then the number of feature values ​​contained in the target feature "city" can be determined to be 4.

[0076] In practical applications, the ratio of the preset sample size to the number of feature values ​​contained in the target feature may be an integer or a non-integer. If the ratio is non-integer, it can be rounded down, rounded up, or decimalized according to preset rules and adjusted through subsequent sampling strategies; no specific limitations are imposed on this.

[0077] Using the previous example, assuming the preset sample size is 80,000, and the target feature "city" contains 4 feature values, then the sample size requirement for each of the 4 feature values ​​of the target feature "city" ("city a", "city b", "city c" and "city d") is 20,000.

[0078] In the embodiments of this specification, by determining the ratio of the preset sample sampling quantity to the number of feature values ​​of the target feature as the sample sampling requirement for each feature value under the target feature, the number of samples for each feature value category under each feature in the sample set can be equal, thereby effectively eliminating the influence of the original data category bias on model training and more effectively improving the model's ability to identify scarce category samples.

[0079] Optional, Figure 2 The method, based on the sample sampling demand, involves independently sampling each feature value of each feature in the user dataset, merging and deduplicating the sampled samples to obtain a candidate sample pool, which may specifically include: For each target feature, based on the sample sampling requirements of each feature value under the target feature, samples are sampled from the user dataset to obtain a subset of candidate samples corresponding to the target feature; The candidate sample subsets corresponding to each of the aforementioned features are merged to obtain a merged sample set; The merged sample set is deduplicated to obtain a candidate sample pool.

[0080] In the embodiments of this specification, a candidate sample subset can refer to a data set obtained by independently sampling each feature value under a certain target feature and then merging the samples obtained from sampling each feature value under that target feature. In practical applications, for any target feature among various features, a candidate sample subset corresponding to that target feature can be determined, and thus a candidate sample subset corresponding to each feature can be determined. After merging the candidate sample subsets corresponding to each feature, a merged sample set is obtained. The merged sample set may contain duplicate samples, so deduplication processing is required on the merged sample set.

[0081] In the embodiments described in this specification, the deduplication operation eliminates redundancy introduced by repeated sampling of the same sample by multiple features, simplifies the size of the candidate sample pool, and thus helps reduce subsequent computational overhead. Furthermore, since the sampling processes of different feature values ​​do not interfere with each other, parallel execution is supported, enabling efficient operation on large-scale datasets, thereby improving data processing efficiency.

[0082] Optional, Figure 2The method, before sampling the preset number of samples from the candidate sample pool based on the information density of each sample in the candidate sample pool and the sample sampling requirement to obtain the sample set, may further include: The ratio of the number of non-empty feature values ​​corresponding to each sample in the candidate sample pool to the total number of feature values ​​is determined as the information density of each sample in the candidate sample pool.

[0083] In the embodiments of this specification, a sample may correspond to a data record of a user, which may contain the user's values ​​on various features (which may include null or missing values).

[0084] In the embodiments of this specification, a non-empty feature value can refer to a feature having a definite, non-missing value in a certain sample. Specifically, missing values ​​are usually represented by NULL, an empty string, NaN, or other placeholders.

[0085] In the embodiments of this specification, the total number of feature values ​​may refer to the number of features contained in the user dataset, that is, the total number of feature values ​​that each sample should theoretically have (not considering missing values). For example, if the user dataset contains 100 features (columns), then the total number of feature values ​​is 100.

[0086] For example, user dataset A contains 5 features: "average daily login time (hours)," "city", "occupation", "address", and "registration years". A sample B in user dataset A has a "average daily login time (hours)" feature value of 3 (non-empty), a "city" feature value of "city a" (non-empty), a "occupation" feature value of null, a "address" feature value of null, and a "registration years" feature value of "2 years" (non-empty). Then the information density of sample B is 3 / 5 = 0.6.

[0087] Optional, Figure 2 The method, wherein the sample set is obtained by sampling a preset number of samples from the candidate sample pool based on the information density of each sample in the candidate sample pool and the sample sampling requirement, may specifically include: The candidate sample pool is sorted in descending order of information density to obtain the sorted candidate sample pool. The sample set is obtained by sampling samples that meet the sampling requirements of each feature value of each feature from the sorted candidate sample pool.

[0088] In practical applications, after calculating the information density of each sample in the candidate sample pool, the samples can be sorted in descending order of information density, with the samples with the highest information density placed in the first row. Then, the sorted samples can be sampled sequentially from front to back. During the sampling process, the number of samples for each feature value under each feature can be recorded in real time. If the number of samples for a certain feature value has reached the required number, samples for that feature value do not need to be sampled in subsequent sampling. This continues until the required number of samples for each feature value under each feature is reached, resulting in the final sample set. In practical applications, if there are still feature values ​​that have not reached the required number of samples after traversing the candidate sample pool, supplementary sampling can be performed. For example, when taking samples from the sorted candidate sample pool from front to back, the values ​​of each feature corresponding to each sample are summarized and recorded. For instance, if the number of samples to be collected for "City A" is 50,000, and the table has 170,000 rows, when the 110,000th row is collected, it is found that there are already 50,000 samples with City A collected so that the 110,000th row is still City A. Therefore, this sample can be skipped and the next sample can be viewed.

[0089] In the embodiments of this specification, samples in the candidate sample pool are sorted in descending order of information density before sampling. This ensures that samples with high information density are checked and processed first, thus prioritizing the inclusion of samples with high information density into the sample set. This guarantees that the information density of the samples is as high as possible while satisfying class balance. Furthermore, in the embodiments of this specification, each sample is checked sequentially from front to back in the sorted list. A sample is selected only if the current count of each feature value corresponding to that feature value category is less than the sampling requirement for that feature value category; otherwise, it is skipped. This mechanism ensures that the number of samples for each feature value does not exceed the sample sampling requirement, which is beneficial for achieving sample class balance.

[0090] Optional, Figure 2 The method, prior to training the machine learning model using the sample set, may further include: Invalid features in the sample set are filtered out to obtain filtered sample data; The observed values ​​in the filtered sample data are numerically processed to obtain numerical feature data. The feature values ​​in the numerical feature data whose sample proportion is lower than the first preset threshold are merged according to the feature type to obtain the adjusted numerical feature data. Correspondingly, training the machine learning model using the sample set may specifically include: The machine learning model is trained using the adjusted numerical feature data to obtain the model.

[0091] Specifically, filtering invalid features in the sample set may include: Features whose missing rate in the sample set exceeds a second preset threshold are filtered out. Alternatively, the approximate constant features in the sample set can be filtered out; Alternatively, features in the sample set whose number of feature values ​​exceeds a third preset threshold can be filtered out. Alternatively, the timestamp-type features in the sample set can be filtered.

[0092] In the embodiments of this specification, the first preset threshold, the second preset threshold, and the third preset threshold can all be set and adjusted according to actual needs. The embodiments of this specification do not limit the specific values ​​of the first preset threshold, the second preset threshold, and the third preset threshold.

[0093] In the embodiments of this specification, invalid features can refer to features that do not contribute to model training or may have a negative impact. Specifically, invalid features may include, but are not limited to: features with a missing rate exceeding a second preset threshold (such as features with a missing rate exceeding 90%), near-constant features (such as features with a unique value of 1, where the value of this feature is the same for all samples), features with a number of feature values ​​exceeding a third preset threshold (such as high-cardinality identifier features with no business semantics, such as user ID, order number, and device serial number), and timestamp features (such as registration time, login time, etc.).

[0094] In the embodiments of this specification, an observation value can refer to the specific value of each sample (row) in each feature (column) of the sample data. For example, under the "City" feature, the observation value of a sample might be "City A"; under the "Registration Years" feature, the observation value might be 2. Specifically, the observation value can be of various data types such as numeric, string, Boolean, and null.

[0095] In the embodiments of this specification, numerical processing can refer to the operation of converting non-numerical observations (such as strings like "male", "female", "first-tier city", etc.) into numerical form. Numerical processing can also include standardizing or normalizing existing numerical observations. Specific numerical processing methods may include, but are not limited to, label encoding, one-hot encoding, and binarization. The purpose of numerical processing is to transform feature data into a numerical format that machine learning models can directly process.

[0096] In the embodiments of this specification, feature values ​​whose sample proportion in numerical feature data is lower than a first preset threshold are merged according to feature type. This can group multiple feature values ​​whose sample proportion under a certain feature is lower than the first preset threshold into a unified category. After merging, the number of feature values ​​of the feature is reduced, which can reduce the feature cardinality, prevent the model from overfitting to rare categories, and help improve the model's generalization ability.

[0097] In the embodiments described in this specification, filtering invalid features can reduce feature dimensionality, decrease the risk of overfitting, and improve model training efficiency. Furthermore, numerical processing converts non-numerical data into a numerical format that the model can directly process, ensuring input compatibility. In addition, by merging low-frequency categories (merging feature values ​​in the numerical feature data whose sample proportion is below a first preset threshold according to feature type), the model no longer needs to finely distinguish between rare categories, but instead treats them as the same class, preventing overfitting to rare categories and thus significantly enhancing the model's generalization ability and adaptability to new data.

[0098] Optional, Figure 2 The method described above, wherein training the machine learning model using the sample set, may specifically include: The machine learning model is trained and validated using cross-validation based on multiple hyperparameter combinations to determine the target hyperparameter combination. The machine learning model is trained based on the target hyperparameter combination and the sample set.

[0099] In the embodiments described in this specification, the basic approach of cross-validation is to divide the sample set into multiple mutually exclusive subsets, using one subset as the validation set in turn, and the remaining subsets as the training set. After multiple training and evaluations, the average performance index is taken. Common cross-validation methods include K-fold cross-validation (dividing the data evenly into K parts and repeating K times) and leave-one-out cross-validation (leaving one sample as the validation set each time). Using cross-validation can effectively avoid the random bias caused by a single data partitioning and can more realistically reflect the model's performance on unknown data.

[0100] In the embodiments of this specification, a hyperparameter combination can refer to a set of parameter values ​​that need to be pre-set before model training and cannot be directly learned from training data. For example, if the machine learning model is a gradient boosting tree model, the hyperparameter combination may include the maximum depth of the tree, the learning rate, the subsampling ratio, the number of iterations, etc.

[0101] Specifically, the target hyperparameter combination can refer to the preferred hyperparameter combination. One or more embodiments of this specification can select the preferred target hyperparameter combination by trying multiple sets of hyperparameter combinations.

[0102] For example, the sample data in the sample set can be divided into multiple groups to conduct K-fold cross-validation. For each group of preset hyperparameter combinations, K-fold independent training and validation are performed. The average value of the validation set index of each fold is used as an objective measure of generalization performance. By comparing the comprehensive performance under different hyperparameter combinations, the optimal hyperparameter combination is determined, avoiding evaluation bias caused by a single data partition and ensuring that the final model has stable generalization ability.

[0103] In the embodiments of this specification, by employing cross-validation, the machine learning model is trained and validated based on multiple hyperparameter combinations. This objectively selects hyperparameter configurations that enhance the model's generalization ability, effectively avoiding the problem of incorrect hyperparameter selection caused by the randomness of a single data partitioning. After determining the preferred hyperparameter combination, the model is trained based on the target hyperparameter combination and samples in the sample set. This ensures the reliability of hyperparameter selection and fully utilizes the information content of the sample data, achieving a balance between the final model's fit on the training set and its evaluation on the validation set.

[0104] Optional, Figure 2 The method, wherein the method may further include: Obtain the importance score of each feature in each round of cross-validation training; the cross-validation training is to train and validate the machine learning model using the cross-validation method. Based on the importance scores, statistical significance analysis is performed on each of the features to obtain the statistical significance analysis results for each feature; Based on the statistical significance analysis results of each of the aforementioned features, highly correlated features are determined; the highly correlated features are those that the statistical significance analysis results indicate have statistical significance.

[0105] In the embodiments of this specification, the importance score can refer to a quantitative value used to measure the contribution of each feature to the model's prediction in each round of cross-validation training. The model in each round of cross-validation can output the importance score of each feature. Specifically, the importance score can be determined in various ways, including but not limited to: the number of times the feature is selected as a split node (Split Count), the total reduction in impurity caused by feature splitting (Gain), and the coverage of the feature in the tree structure. The higher the importance score of a feature, the greater its contribution to the model's prediction.

[0106] In the embodiments of this specification, statistical significance analysis methods may include, but are not limited to, hypothesis testing (such as binomial distribution hypothesis testing, t-test), Bootstrap confidence interval analysis, permutation tests, etc. In practical applications, statistical significance analysis can be used to determine whether the importance score of a feature is significantly higher than the random level, and whether the feature consistently demonstrates importance in multiple rounds of cross-validation. If the analysis results indicate that the importance of a feature is statistically significant, it is considered that there is a genuine correlation between the feature and the target event, rather than random noise, and the feature can be identified as a highly relevant feature.

[0107] It should be noted that if the statistical significance analysis of the features is not performed through multiple rounds of cross-validation, and the average importance score of a single training session is used to rank them, a large number of unstable features may be selected. These features may not contribute anything on new test data, resulting in unreliable model outputs and potentially misleading business operations personnel (for example, if business operations personnel formulate adjustment strategies based on features that are only occasionally important, it may lead to poor results).

[0108] In the embodiments of this specification, by performing statistical significance analysis on the importance scores of each feature in multiple rounds of cross-validation training, noisy features can be distinguished from truly stable and effective features, significantly improving the reliability and interpretability of feature selection. Compared to directly using the importance ranking from a single training iteration, the embodiments of this specification consider the consistency of feature performance across different data subsets, reducing the risk of misjudgment due to the randomness of data partitioning. The selected highly relevant features exhibit statistical significance and cross-fold stability.

[0109] Optionally, the method may further include: Obtain predefined semantic classification information; the semantic classification information contains multiple semantic categories; the semantic categories are used to describe the meaning of features in a business scenario; The information of each highly relevant feature, the semantic classification information, and the first prompt word are input into the large language model to obtain the semantic category information of each highly relevant feature output by the large language model; the first prompt word is used to instruct the large language model to determine the semantic category of the highly relevant feature based on the information of the highly relevant feature. The semantic category information of each of the highly relevant features is sent to the user terminal.

[0110] In the embodiments of this specification, predefined semantic classification information refers to a set of semantic categories and their descriptions pre-defined by personnel based on the application scenario. Each semantic category is used to summarize features with similar business meanings. Semantic classification information can be stored in a structured form, such as a list of category names, descriptive text for each category, or example features.

[0111] For example, predefined semantic classification information may include the following: (1) Marketing activities and promotions: including various push activities, red envelope incentives, coupons, external target groups, etc. (2) User status and lifecycle: describing user activity, churn, new and returning users, etc. (3) Payment behavior: including online / offline payment, payment frequency, payment scenarios, etc. (4) Financial products and services: involving loans, wealth management, insurance, credit, etc. (5) Travel and transportation: buses, subways, taxis, car insurance, ETC, etc. (6) Life services: bill payment, government services, medical care, education, shopping, etc. (7) Content consumption and entertainment: short videos, live streaming, games, reading, etc. (8) User attributes: occupation, marital status, whether or not they have children, etc. (9) Geographic location and permanent residence: user's permanent residence city, out-of-town behavior, etc. (10) Devices and channels: external advertising, manufacturer channels, device information, etc. (11) Risk control and anti-fraud: marketing sensitivity, risky users, etc.

[0112] In the embodiments of this specification, the information of highly relevant features may include, but is not limited to: the name of the feature (such as "number of times coupons have been clicked in the past 7 days"), a brief description of the feature (such as "total number of times users have clicked coupons in the past 7 days"), the data type of the feature, the range of values, and other information used to assist the large language model in understanding the meaning of the feature.

[0113] In the embodiments of this specification, a prompt is an instruction or text input to a large language model to guide it in performing a specific task. The first prompt instructs the large language model to determine the semantic category to which the highly relevant features belong based on information from these highly relevant features. Thus, after inputting information from each highly relevant feature, predefined semantic classification information, and the first prompt into the large language model, the model can output the semantic category information to which each highly relevant feature belongs.

[0114] In the embodiments of this specification, by using a large language model to determine the semantic category information of each highly relevant feature, the natural language understanding capability of the large language model can be utilized to accurately determine the semantic category of the feature without manual annotation, which is beneficial to improving data processing efficiency.

[0115] In practical applications, after determining the semantic category information of each highly relevant feature, this information can be sent to the user terminal. Specifically, the semantic category information of each highly relevant feature can be transmitted to the business personnel's terminal device in a readable format (such as tables, JSON format, or UI visual controls), enabling the business personnel to intuitively understand the semantic category of each highly relevant feature, thereby better comprehending the semantic category of each highly relevant feature and making more accurate decision adjustments.

[0116] Optionally, the method may further include: The semantic category information of each highly relevant feature, the importance score of each highly relevant feature, and the second prompt word are input into the large language model to obtain multiple recommended features output by the large language model; the second prompt word is used to instruct the large language model to select a preset number of highly relevant features as recommended features within the same semantic category based on the importance score, and the semantic difference between the selected recommended features is not less than a fourth preset threshold. The multiple recommendation features are sent to the user terminal.

[0117] In the embodiments of this specification, the second prompt word is used to instruct the large language model to select a preset number of highly relevant features as recommended features within the same semantic category, based on importance scores, and the semantic difference between the selected recommended features is not less than a fourth preset threshold. The preset number can refer to the maximum number of recommended features pre-set for each semantic category. This preset number can be set by the system default (e.g., 3 per category) or specified by the user through parameters, without specific limitations. Semantic difference can refer to the degree of difference between two features at the business meaning level. A large semantic difference means that the two features describe completely different user behaviors or attributes (e.g., "number of clicks" and "city"); a small semantic difference means that the two features describe sub-indicators of the same type of behavior (e.g., "number of coupon clicks in the last 7 days" and "number of coupon clicks in the last 10 days"). By requiring the semantic difference between recommended features to be no less than the fourth preset threshold, wasting recommendation slots due to high semantic repetition can be avoided, ensuring that the recommended features are information-rich and dimensionally diverse. The fourth preset threshold can be set and adjusted according to actual needs, without specific limitations.

[0118] It should be noted that within a certain semantic category, if the highly relevant features under that semantic category are directly sorted in descending order of importance score, and the top-N highly relevant features are directly selected as the recommended features, there may be a large number of semantically similar features among the selected recommended features, resulting in a lack of diversity. This ignores cross-domain features with low weight but insightful potential. The final output "recommended feature list" may seem rich, but in fact, it has low information density and limited guidance value.

[0119] In the embodiments of this specification, by inputting the semantic category information of each highly relevant feature, the importance score of each highly relevant feature, and the second prompt word into a large language model, a feature recommendation mechanism based on score selection and semantic difference deduplication within the same semantic category is realized, effectively overcoming the problem of semantic redundancy in recommended features within the same semantic category. Furthermore, by sending the recommended features output by the model to the user's (e.g., business personnel's) terminal, business personnel can quickly understand the key feature dimensions affecting user needs, avoiding the neglect of other potentially important features due to the clustering of similar features.

[0120] Optionally, the method may further include: The information of the target event, the information of each of the recommended features, and the third prompt word are input into the large language model to obtain the causal relationship between each of the recommended features and the target event output by the large language model; the third prompt word is used to instruct the large language model to evaluate the causal relationship between each of the recommended features and the target event based on the information of the target event and the information of each of the recommended features. The causal relationship between each of the recommended features and the target event is sent to the user terminal.

[0121] In the embodiments of this specification, the information of the target event may refer to pre-defined descriptive information in the business scenario that needs to predict whether the user will perform a specific user behavior or state change. For example, "the user clicks to claim a coupon within the next 7 days" or "the user completes their first purchase".

[0122] In the embodiments of this specification, the information of the recommendation feature may include, but is not limited to: the name of the recommendation feature (such as "number of times coupons have been clicked in the last 7 days"), the value range of the recommendation feature, the feature value type of the recommendation feature, and other information.

[0123] In the embodiments of this specification, the third prompt word is used to instruct the large language model to evaluate the causal relationship between each recommended feature and the target event based on information about the target event and information about each recommended feature. For example, the third prompt word may instruct the large language model to evaluate based on the following three dimensions: (1) temporal order (evaluating whether the recommended feature occurred before the target event). (2) logical rationality (evaluating whether there is a reasonable business logic explanation between the recommended feature and the target event). (3) operability (evaluating whether the recommended feature can be actively adjusted or intervened by the business).

[0124] In practical applications, the third prompt word can also include output format requirements. For example, the large language model can be required to output a causal label for each feature (such as "cause", "effect", "irrelevant" or "interventionist antecedent factor"), along with a brief explanation.

[0125] In actual business operations, mistaking a feature that is actually a "result" for a "cause" and formulating business strategies accordingly can lead to wasted resources. For example, if the target event is "a user applies for a loan," the feature "credit score below a threshold" is actually a result generated during the loan approval process, not the motivation for the user to initiate the loan. If a strategy is formulated based on this (such as "lowering risk control standards to improve conversion rates"), the logic is reversed, and effective intervention cannot be achieved.

[0126] In practical applications, failing to distinguish the causal relationship between features and target events can easily mislead business decisions. This is especially true in user demand prediction scenarios, where business personnel need to know which features can be adjusted through strategy to meet user needs (such as increasing coupon distribution or optimizing page layout). The embodiments in this specification utilize a large language model for fast and automated causal labeling, accurately and efficiently providing business personnel with a reference for the causal relationship between recommended features and target events.

[0127] Figure 3 This is a flowchart illustrating a method for determining user demand scores according to one embodiment of this specification. From a hardware perspective, the entity executing this process can be a server or a user terminal. From a program perspective, the entity executing this process can be a program installed on the server or user terminal. Figure 3 As shown, the process may include the following steps: Step 302: Obtain the user data to be predicted; the user data to be predicted includes feature data of at least one user with multiple characteristics.

[0128] Step 304: Input the user data to be predicted into the model to obtain at least one demand score of the user to be predicted for the target event output by the model; wherein the model is trained by the above model training method.

[0129] In the embodiments described in this specification, the target event, the demand score, the model, the feature, and the feature data can be related to... Figure 2 The meanings of the terms mentioned in the embodiments of the Chinese method are consistent, therefore, they will not be repeated here.

[0130] In the embodiments of this specification, the user data to be predicted may contain feature data of one or more users to be predicted. That is, the user data to be predicted can be a single user record or a batch of user data. In the embodiments of this specification, the user data to be predicted may refer to the original feature data corresponding to the target user for whom user demand score prediction is required. This data may have the same feature structure as the user data set used in the model training phase, but does not contain the true label of the target event. The user data to be predicted can be a single record of a user or multiple records of multiple users (batch prediction). That is, the model can support independent prediction for a single user and batch prediction for a large number of users to ensure processing efficiency and availability in different business scenarios.

[0131] In practical applications, user data to be predicted is input into the model, which outputs the predicted demand scores for each user regarding the target event. For example, if the user data includes multiple characteristics of user A and user B, and the target event is "users purchasing beauty products within the next 7 days," inputting these characteristics into the model might yield a demand score of 0.6 for user A and 0.8 for user B, indicating that user B's demand for beauty products within the next 7 days is higher than user A's. Business personnel can then use these predicted demand scores to filter user groups. They can flexibly develop refined operational strategies (such as prioritizing high-demand users, nurturing medium-demand users, and temporarily excluding low-demand users) to maximize conversion rates with limited resources.

[0132] based on Figure 3 In addition to the method described in the embodiments of this specification, some specific implementation schemes of the method are also provided, which will be described below.

[0133] Optional, Figure 3 The method, before inputting the user data to be predicted into the model to obtain at least one demand score of the user to be predicted for the target event output by the model, may further include: Invalid features in the user data to be predicted are filtered to obtain filtered data; The feature values ​​in the filtered data are numerically processed to obtain numerical feature data. The step of inputting the user data to be predicted into the model to obtain at least one demand score of the user to be predicted for the target event output by the model includes: The numerical feature data is input into the model to obtain at least one demand score of the user to be predicted for the target event, which is output by the model.

[0134] In the embodiments described in this specification, the invalid feature, the filtering, the feature value, and the numerical processing can be combined with... Figure 2 The meanings of the terms mentioned in the embodiments of the Chinese method are consistent, therefore, they will not be repeated here.

[0135] It should be noted that during the model application phase, the original format of the user data to be predicted may differ from the format of the sample data during the model training phase. Therefore, it is necessary to process the user data to be predicted and perform the same data processing procedure as during the model training phase. This can avoid model prediction errors or decreased prediction accuracy due to feature format mismatch, and help ensure the compatibility of model input and the accuracy of model prediction results.

[0136] Optional, Figure 3 The method, wherein the method may further include: Determine whether the demand score of the user to be predicted for the target event is greater than a fifth preset threshold; If the demand score of the user to be predicted for the target event is greater than the fifth preset threshold, then the user to be predicted is identified as a high-demand user.

[0137] In the embodiments of this specification, the value of the fifth preset threshold can be set or adjusted according to actual needs, and the value of the fifth preset threshold is not specifically limited. In practical applications, if the demand score of the user to be predicted for the target event output by the model is greater than the preset fifth preset threshold, the user to be predicted can be identified as a high-demand user. For example, if the fifth preset threshold is set to 0.7, and the model outputs a demand score of 0.6 for user A, 0.8 for user B, and 0.9 for user C, then users B and C can be identified as high-demand users.

[0138] In practical applications, business personnel can flexibly adjust the fifth preset threshold based on different business objectives, budget constraints, or cost-benefit expectations, thereby achieving a dynamic balance between accuracy and coverage. The final set of high-demand users can be directly integrated with downstream outreach systems (such as push notifications, SMS, and advertising), which helps improve operational efficiency and resource utilization.

[0139] In practical applications, users can be sorted from highest to lowest according to their demand scores for the target event, and the top N users (where N is a preset positive integer) can be identified as high-demand users. Alternatively, demand scores can be combined with other business rules (such as device, lifecycle stage, etc.) for composite filtering to determine high-demand users; no specific limitations are imposed on this approach.

[0140] Figure 4 This is a flowchart illustrating a model training method provided in one embodiment of this specification. Figure 4 As shown, the model training process can specifically include the following steps: Step 402: Obtain the user data set; this user data set contains feature data of multiple users with various characteristics.

[0141] Step 404: For each target feature, determine the number of feature values ​​contained in that target feature.

[0142] Step 406: Determine the sample sampling requirement of each feature value of the target feature as the ratio of the preset sample sampling quantity to the number of feature values ​​contained in the target feature.

[0143] Step 408: Based on the sample sampling requirements of each feature value under the target feature, sample samples from the user dataset to obtain the candidate sample subset corresponding to the target feature.

[0144] Step 410: Merge the candidate sample subsets corresponding to each feature to obtain the merged sample set.

[0145] Step 412: Perform deduplication on the merged sample set to obtain the candidate sample pool.

[0146] Step 414: The ratio of the number of non-empty feature values ​​corresponding to each sample in the candidate sample pool to the total number of feature values ​​is determined as the information density of each sample in the candidate sample pool.

[0147] Step 416: Sort the samples in the candidate sample pool in descending order of information density to obtain the sorted candidate sample pool.

[0148] Step 418: Sample samples that meet the sampling requirements of each feature value from the sorted candidate sample pool to obtain the sample set.

[0149] Step 420: Filter out invalid features in the sample set to obtain filtered sample data; and perform numerical processing on each observation in the filtered sample data to obtain numerical feature data.

[0150] Step 422: Merge the feature values ​​in the numerical feature data whose sample proportion is lower than the first preset threshold according to the feature type to obtain the adjusted numerical feature data.

[0151] Step 424: Use cross-validation to train and validate the machine learning model based on multiple hyperparameter combinations to determine the target hyperparameter combination.

[0152] Step 426: Train the machine learning model based on the target hyperparameter combination and the adjusted numerical feature data.

[0153] Figure 5 This is a schematic diagram of the structure of a model training device provided in one embodiment of this specification, as shown below. Figure 5 As shown, the device may include: The acquisition module 502 is used to acquire a user data set; the user data set contains feature data of multiple users with various characteristics; The determination module 504 is used to determine the sample sampling requirement of each feature value of each feature based on the preset sample sampling quantity and the number of feature values ​​contained in each feature. The first sampling module 506 is used to independently sample each feature value of each feature in the user data set based on the sample sampling demand, and merge and deduplicate the sampled samples to obtain a candidate sample pool. The second sampling module 508 is used to sample the preset number of samples from the candidate sample pool based on the information density of each sample in the candidate sample pool and the sample sampling requirement, to obtain a sample set. Training module 510 is used to train the machine learning model using the sample set.

[0154] based on Figure 5 The embodiments of this specification also provide some specific implementations of the device, which will be described below.

[0155] Optionally, the determining module 504 may specifically include: The first determining submodule is used to determine the number of feature values ​​contained in the target feature for each feature; The second determining submodule is used to determine the sample sampling requirement of each feature value of the target feature by the ratio of the preset sample sampling quantity to the number of feature values ​​contained in the target feature.

[0156] Optionally, the first sampling module 506 may specifically include: The sampling submodule is used to sample samples from the user dataset based on the sample sampling requirements of each feature value under the target feature, for each feature among the features, to obtain a subset of candidate samples corresponding to the target feature; The merging submodule is used to merge the candidate sample subsets corresponding to each of the features to obtain a merged sample set; The deduplication submodule is used to deduplicatize the merged sample set to obtain a candidate sample pool.

[0157] Optionally, the device may further include: The information density determination module is used to determine the information density of each sample in the candidate sample pool as the ratio of the number of non-empty feature values ​​corresponding to each sample to the total number of feature values.

[0158] Optionally, the second sampling module 508 may specifically include: The sorting submodule is used to sort the samples in the candidate sample pool in descending order of information density to obtain the sorted candidate sample pool. The sampling submodule is used to sample samples that meet the sampling requirements of each feature value of each feature from the sorted candidate sample pool to obtain a sample set.

[0159] Optionally, the device may further include: The filtering module is used to filter out invalid features in the sample set to obtain filtered sample data. The numerical processing module is used to perform numerical processing on each observation in the filtered sample data to obtain numerical feature data. The feature category merging module is used to merge feature values ​​in the numerical feature data whose sample proportion is lower than a first preset threshold according to feature category, so as to obtain the adjusted numerical feature data. Correspondingly, the training module 510 may specifically include: The training submodule is used to train the machine learning model using the adjusted numerical feature data to obtain the model.

[0160] Specifically, the filtering module may include: The filtering submodule is used to filter features in the sample set whose missing rate exceeds a second preset threshold; or, to filter approximately constant features in the sample set; or, to filter features in the sample set whose number of feature values ​​exceeds a third preset threshold; or, to filter timestamp-type features in the sample set.

[0161] Optionally, the training module 510 may specifically include: The hyperparameter determination submodule is used to train and validate the machine learning model based on multiple hyperparameter combinations using cross-validation to determine the target hyperparameter combination. The model training submodule is used to train the machine learning model based on the target hyperparameter combination and the sample set.

[0162] Optionally, the device may further include: The importance score acquisition module is used to acquire the importance score of each feature in each round of cross-validation training; the cross-validation training is to train and validate the machine learning model through the cross-validation method. The statistical significance analysis module is used to perform statistical significance analysis on each of the features based on the importance score, and obtain the statistical significance analysis results of each feature; The high-correlation feature determination module is used to determine high-correlation features based on the statistical significance analysis results of each of the features; the high-correlation features are those features that the statistical significance analysis results indicate have statistical significance.

[0163] Optionally, the device may further include: A semantic classification information acquisition module is used to acquire predefined semantic classification information; the semantic classification information includes multiple semantic categories; the semantic categories are used to describe the meaning of features in a business scenario; The semantic category information determination module is used to input the information of each of the highly relevant features, the semantic classification information, and the first prompt word into the large language model to obtain the semantic category information of each of the highly relevant features output by the large language model; the first prompt word is used to instruct the large language model to determine the semantic category of the highly relevant feature based on the information of the highly relevant feature. The semantic category information sending module is used to send the semantic category information to which each of the highly relevant features belongs to the user terminal.

[0164] Optionally, the device may further include: The recommendation feature determination module is used to input the semantic category information of each highly relevant feature, the importance score of each highly relevant feature, and the second prompt word into the large language model to obtain multiple recommendation features output by the large language model; the second prompt word is used to instruct the large language model to select a preset number of highly relevant features as recommendation features within the same semantic category based on the importance score, and the semantic difference between the selected recommendation features is not less than a fourth preset threshold. The recommendation feature sending module is used to send the multiple recommendation features to the user terminal.

[0165] Optionally, the device may further include: The causal relationship determination module is used to input the information of the target event, the information of each of the recommended features, and the third prompt word into the large language model to obtain the causal relationship between each of the recommended features and the target event output by the large language model; the third prompt word is used to instruct the large language model to evaluate the causal relationship between each of the recommended features and the target event based on the information of the target event and the information of each of the recommended features. The causal relationship sending module is used to send the causal relationship between each of the recommended features and the target event to the user terminal.

[0166] It is understood that the modules mentioned above refer to computer programs or program segments used to perform one or more specific functions. Furthermore, the distinction between these modules does not imply that the actual program code must also be separate.

[0167] The above is an illustrative scheme of a model training device according to this embodiment. It should be noted that the technical solution of this model training device and the technical solution of the model training method described above belong to the same concept. For details not described in detail in the technical solution of the model training device, please refer to the description of the technical solution of the model training method described above.

[0168] Figure 6 This is a schematic diagram of a device for determining user demand scores according to one embodiment of this specification, as shown below. Figure 6 As shown, the device may include: Data acquisition module 602 is used to acquire user data to be predicted; the user data to be predicted includes feature data of multiple features of at least one user to be predicted; The data input module 604 is used to input the user data to be predicted into the model to obtain at least one demand score of the user to be predicted for the target event output by the model; wherein the model is trained by any one of claims 1 to 12.

[0169] based on Figure 6 The embodiments of this specification also provide some specific implementations of the device, which will be described below.

[0170] Optionally, the device may further include: The feature filtering module is used to filter invalid features in the user data to be predicted, and obtain filtered data. The numerical processing module is used to perform numerical processing on each feature value in the filtered data to obtain numerical feature data. Correspondingly, the data input module 604 may specifically include: The data input submodule is used to input the numerical feature data into the model to obtain at least one demand score of the user to be predicted for the target event output by the model.

[0171] Optionally, the device may further include: The judgment module is used to determine whether the demand score of the user to be predicted for the target event is greater than a fifth preset threshold. The high-demand user identification module is used to identify the user to be predicted as a high-demand user if the demand score of the user to be predicted for the target event is greater than the fifth preset threshold.

[0172] It is understood that the modules mentioned above refer to computer programs or program segments used to perform one or more specific functions. Furthermore, the distinction between these modules does not imply that the actual program code must also be separate.

[0173] The above is a schematic scheme of a user demand score determination device according to this embodiment. It should be noted that the technical solution of this user demand score determination device and the technical solution of the user demand score determination method described above belong to the same concept. For details not described in detail in the technical solution of the user demand score determination device, please refer to the description of the technical solution of the user demand score determination method described above.

[0174] Based on the same idea, this specification also provides devices corresponding to the above methods in its embodiments.

[0175] Figure 7 This is a structural block diagram of a computing device provided in one embodiment of this specification. Figure 7 As shown, the computing device 700 may include: Memory 710 and processor 720; The memory 710 is used to store computer programs / instructions, and the processor 720 is used to execute the computer programs / instructions. When the computer programs / instructions are executed by the processor 720, they implement the steps of the above-mentioned model training method or the steps of the above-mentioned method for determining user demand scores.

[0176] Specifically, the components of the computing device 700 include, but are not limited to, a memory 710 and a processor 720. The processor 720 is connected to the memory 710 via a bus 730, and the database 750 is used to store data.

[0177] The computing device 700 also includes an access device 740, which enables the computing device 700 to communicate via one or more networks 760. Examples of these networks include Public Switched Telephone Network (PSTN), Local Area Network (LAN), Wide Area Network (WAN), Personal Area Network (PAN), or combinations of communication networks such as the Internet. The access device 740 may include one or more of any type of wired or wireless network interface (e.g., a network interface card (NIC)), such as an IEEE 802.11 Wireless Local Area Network (WLAN) wireless interface, a Wi-MAX (Worldwide Interoperability for Microwave Access) interface, an Ethernet interface, a Universal Serial Bus (USB) interface, a cellular network interface, a Bluetooth interface, a Near Field Communication (NFC) interface, and so on.

[0178] In one embodiment of this specification, the above-described components of the computing device 700 and Figure 7 Other components, not shown, can also be connected to each other, for example, via a bus. It should be understood that... Figure 7 The block diagram of the computing device shown is for illustrative purposes only and is not intended to limit the scope of this application. Those skilled in the art can add or replace other components as needed.

[0179] The computing device 700 can be any type of stationary or mobile computing device, including mobile computers or mobile computing devices (e.g., tablet computers, personal digital assistants, laptop computers, notebook computers, netbooks, etc.), mobile phones (e.g., smartphones), wearable computing devices (e.g., smartwatches, smart glasses, etc.) or other types of mobile devices, or stationary computing devices such as desktop computers or personal computers (PCs). The computing device 700 can also be a mobile or stationary server.

[0180] Specifically, when the processor 720 executes the computer instructions, it implements the steps of the above-mentioned model training method or the steps of the above-mentioned method for determining the user demand score.

[0181] The above is an illustrative scheme of a computing device according to this embodiment. It should be noted that the technical solution of this computing device belongs to the same concept as the technical solution of the above-described model training method or user demand score determination method. For details not described in detail in the technical solution of the computing device, please refer to the description of the technical solution of the above-described model training method or user demand score determination method.

[0182] An embodiment of this specification also provides a computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the model training method or the steps of the method for determining user-required scores described above.

[0183] The above is an illustrative scheme of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium belongs to the same concept as the technical solution of the above-described model training method or user requirement score determination method. For details not described in detail in the technical solution of the storage medium, please refer to the description of the technical solution of the above-described model training method or user requirement score determination method.

[0184] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on its differences from other embodiments. In particular, for... Figure 7 As the device shown is basically similar to the corresponding method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.

[0185] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous. In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must also be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also understand that by simply performing some logic programming on the method flow using one of these hardware description languages ​​and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.

[0186] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.

[0187] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0188] For ease of description, the above devices are described in terms of function, divided into various units. Of course, in implementing this specification, the functions of each unit can be implemented in one or more software and / or hardware components.

[0189] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0190] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0191] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0192] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0193] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0194] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0195] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0196] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0197] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This specification can also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.

[0198] The above description is merely an embodiment of this specification and is not intended to limit this specification. Various modifications and variations can be made to this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims of this specification.

Claims

1. A model training method, wherein the model is a machine learning model for determining a user's demand score for a target event, the method comprising: Obtain a user data set; the user data set contains feature data of multiple users with various characteristics; Based on the preset sample sampling quantity and the number of feature values ​​contained in each feature, determine the sample sampling quantity of each feature value of each feature. Based on the sample sampling requirements, each feature value of each feature in the user dataset is sampled independently, and the sampled samples are merged and deduplicated to obtain a candidate sample pool. Based on the information density of each sample in the candidate sample pool and the sample sampling requirement, the preset number of samples are sampled from the candidate sample pool to obtain a sample set; The machine learning model is trained using the sample set.

2. The method as described in claim 1, wherein determining the sample sampling requirement for each feature value of each feature based on the preset sample sampling quantity and the number of feature values ​​contained in each feature includes: For each target feature among the features, determine the number of feature values ​​contained in the target feature; The ratio of the preset sample sampling quantity to the number of feature values ​​contained in the target feature is determined as the sample sampling requirement for each feature value of the target feature.

3. The method as described in claim 1, wherein the step of independently sampling each feature value of each feature in the user dataset based on the sample sampling demand, and merging and deduplicating the sampled samples to obtain a candidate sample pool, includes: For each target feature, based on the sample sampling requirements of each feature value under the target feature, samples are sampled from the user dataset to obtain a subset of candidate samples corresponding to the target feature; The candidate sample subsets corresponding to each of the aforementioned features are merged to obtain a merged sample set; The merged sample set is deduplicated to obtain a candidate sample pool.

4. The method as described in claim 1, further comprising, before sampling the preset number of samples from the candidate sample pool based on the information density of each sample in the candidate sample pool and the sample sampling requirement, to obtain the sample set: The ratio of the number of non-empty feature values ​​corresponding to each sample in the candidate sample pool to the total number of feature values ​​is determined as the information density of each sample in the candidate sample pool.

5. The method as described in claim 1, wherein sampling the preset number of samples from the candidate sample pool based on the information density of each sample in the candidate sample pool and the sample sampling requirement to obtain a sample set comprises: The candidate sample pool is sorted in descending order of information density to obtain the sorted candidate sample pool. The sample set is obtained by sampling samples that meet the sampling requirements of each feature value of each feature from the sorted candidate sample pool.

6. The method of claim 1, further comprising, before training the machine learning model using the sample set: Invalid features in the sample set are filtered out to obtain filtered sample data; The observed values ​​in the filtered sample data are numerically processed to obtain numerical feature data. The feature values ​​in the numerical feature data whose sample proportion is lower than the first preset threshold are merged according to the feature type to obtain the adjusted numerical feature data. The step of training the machine learning model using the sample set includes: The machine learning model is trained using the adjusted numerical feature data to obtain the model.

7. The method of claim 6, wherein filtering invalid features in the sample set comprises: Features whose missing rate in the sample set exceeds a second preset threshold are filtered out. Alternatively, the approximate constant features in the sample set can be filtered out; Alternatively, features in the sample set whose number of feature values ​​exceeds a third preset threshold can be filtered out. Alternatively, the timestamp-type features in the sample set can be filtered.

8. The method of claim 1, wherein training the machine learning model using the sample set comprises: The machine learning model is trained and validated using cross-validation based on multiple hyperparameter combinations to determine the target hyperparameter combination. The machine learning model is trained based on the target hyperparameter combination and the sample set.

9. The method of claim 8, further comprising: Obtain the importance score of each feature in each round of cross-validation training; The cross-validation training refers to training and validating the machine learning model using the cross-validation method. Based on the importance scores, statistical significance analysis is performed on each of the features to obtain the statistical significance analysis results for each feature; Based on the statistical significance analysis results of each of the aforementioned features, highly correlated features are identified; The highly correlated feature is a feature that has statistical significance according to the statistical significance analysis results.

10. The method of claim 9, further comprising: Obtain predefined semantic classification information; The semantic classification information includes multiple semantic categories; the semantic categories are used to describe the meaning of features in a business scenario; The information of each highly relevant feature, the semantic classification information, and the first prompt word are input into the large language model to obtain the semantic category information of each highly relevant feature output by the large language model; the first prompt word is used to instruct the large language model to determine the semantic category of the highly relevant feature based on the information of the highly relevant feature. The semantic category information of each of the highly relevant features is sent to the user terminal.

11. The method of claim 10, further comprising: The semantic category information of each highly relevant feature, the importance score of each highly relevant feature, and the second prompt word are input into the large language model to obtain multiple recommendation features output by the large language model. The second prompt word is used to instruct the large language model to select a preset number of highly relevant features as recommended features based on importance scores within the same semantic category, and the semantic difference between the selected recommended features is not less than a fourth preset threshold. The multiple recommendation features are sent to the user terminal.

12. The method of claim 11, further comprising: The information of the target event, the information of each of the recommended features, and the third prompt word are input into the large language model to obtain the causal relationship between each of the recommended features output by the large language model and the target event. The third prompt word is used to instruct the large language model to evaluate the causal relationship between each of the recommended features and the target event based on the information of the target event and the information of each of the recommended features; The causal relationship between each of the recommended features and the target event is sent to the user terminal.

13. A method for determining user demand scores, comprising: Obtain user data to be predicted; the user data to be predicted includes feature data of multiple characteristics of at least one user to be predicted; The user data to be predicted is input into the model to obtain at least one demand score of the user to be predicted for the target event output by the model; wherein the model is trained by any one of claims 1 to 12.

14. The method of claim 13, further comprising, before inputting the user data to be predicted into the model to obtain at least one demand score of the user to be predicted for the target event output by the model: Invalid features in the user data to be predicted are filtered to obtain filtered data; The feature values ​​in the filtered data are numerically processed to obtain numerical feature data. The step of inputting the user data to be predicted into the model to obtain at least one demand score of the user to be predicted for the target event output by the model includes: The numerical feature data is input into the model to obtain at least one demand score of the user to be predicted for the target event, which is output by the model.

15. The method of claim 13, further comprising: Determine whether the demand score of the user to be predicted for the target event is greater than a fifth preset threshold; If the demand score of the user to be predicted for the target event is greater than the fifth preset threshold, then the user to be predicted is identified as a high-demand user.

16. A model training apparatus, wherein the model is a machine learning model for determining a user's demand score for a target event, the apparatus comprising: The acquisition module is used to acquire a user data set; the user data set contains feature data of multiple users with various characteristics; The determination module is used to determine the sample sampling requirements for each feature value of each feature based on the preset sample sampling quantity and the number of feature values ​​contained in each feature. The first sampling module is used to independently sample each feature value of each feature in the user data set based on the sample sampling demand, and merge and deduplicate the sampled samples to obtain a candidate sample pool. The second sampling module is used to sample the preset number of samples from the candidate sample pool based on the information density of each sample in the candidate sample pool and the sample sampling requirement, so as to obtain a sample set. A training module is used to train the machine learning model using the sample set.

17. A device for determining user demand scores, comprising: The data acquisition module is used to acquire user data to be predicted; The user data to be predicted includes feature data of at least one user with multiple characteristics. A data input module is used to input the user data to be predicted into a model to obtain at least one demand score of the user to be predicted for the target event output by the model; wherein the model is trained by any one of claims 1 to 12.

18. A computing device, comprising: At least one processor; as well as, A memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, which enables the at least one processor to implement the model training method according to any one of claims 1 to 12, or the method for determining user demand scores according to any one of claims 13 to 15.

19. A computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, implement the model training method of any one of claims 1 to 12, or the method for determining user demand scores of any one of claims 13 to 15.