Model training data generation method and device

By dimensionalizing and oversampling the unbalanced data set, low-dimensional data is mapped to high-dimensional space, solving the accuracy problem caused by data interleaving and improving the effectiveness of model training.

CN115859109BActive Publication Date: 2025-08-12SHANGHAI HODE INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211591512.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-12
Publication Date
2025-08-12
Estimated Expiration
2042-12-12

AI Technical Summary

Technical Problem

In the prior art, the model training data accuracy caused by imbalanced data sets is low, which affects the model training effect, especially when oversampling processing is interleaved in category sample data, resulting in a decrease in data accuracy.

Method used

By up-dimensional processing of the training data sample set, the data is mapped to high-dimensional space, and the oversampling algorithm is used to oversample the low-dimensional array set to generate high-dimensional array sets to improve the linear separability of the data and avoid overlapping sample data.

Benefits of technology

Improve the effect of model training, ensure the accuracy of new sample data after oversampling, and enhance the accuracy of model training.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115859109B_ABST
    Figure CN115859109B_ABST
Patent Text Reader

Abstract

The present application provides a method and device for generating model training data, wherein the model training data generation method includes: obtaining a sample set of to-be-trained data of a target business, wherein the sample set of to-be-trained data includes a first sample set and a second sample set, and the number of arrays to be trained in the first sample set is less than a preset number threshold; performing dimensionality upgrading processing on each to-be-trained array in the to-be-trained data sample set to obtain a high-dimensional data sample set, wherein the high-dimensional data sample set includes a first high-dimensional array set corresponding to the first sample set, and a second high-dimensional array set corresponding to the second sample set; performing oversampling processing on the first high-dimensional array set to obtain a target high-dimensional array set; determining a target training data sample set for the target business based on the target high-dimensional array set and the second high-dimensional array set; oversampling the high-dimensional data can more accurately obtain new sample data after oversampling, thereby improving the effect of model training.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and more particularly to a method for generating model training data. The present application also relates to an apparatus for generating model training data, a computing device, and a computer-readable storage medium. Background Art

[0002] An imbalanced dataset refers to a multi-class dataset in which the number of samples in some categories is far smaller than that in other categories, resulting in a serious imbalance in the number of samples across categories. Traditional machine learning methods rely on balanced training sets and are less sensitive to data distribution biases, resulting in prediction results that are biased towards multi-class datasets.

[0003] Currently, by oversampling the data in a smaller data set, the number of samples in each category is balanced, so that model training can be carried out. However, as the complexity of business data increases, the distribution of sample data sets of each category is not wide enough. When oversampling is performed, the boundaries of one category of oversampled data may be blurred or even overlapped with the sample data of other categories, resulting in a decrease in the data accuracy of the oversampled data set, which in turn affects the results of subsequent model training. Summary of the Invention

[0004] In view of this, embodiments of the present application provide a method for generating model training data. This application also relates to a model training data generation apparatus, a computing device, and a computer-readable storage medium to address the low accuracy of model training data in the prior art, which affects the model training effect.

[0005] According to a first aspect of an embodiment of the present application, a method for generating model training data is provided, comprising:

[0006] Acquire a data sample set to be trained for a target business, wherein the data sample set to be trained includes a first sample set and a second sample set, and the number of arrays to be trained in the first sample set is less than a preset number threshold;

[0007] Performing dimensionality increase processing on each to-be-trained array in the to-be-trained data sample set to obtain a high-dimensional data sample set, wherein the high-dimensional data sample set includes a first high-dimensional array set corresponding to the first sample set and a second high-dimensional array set corresponding to the second sample set;

[0008] Performing oversampling processing on the first high-dimensional array set to obtain a target high-dimensional array set, wherein the number of high-dimensional arrays in the target high-dimensional array set meets the preset number threshold;

[0009] A target training data sample set for the target business is determined based on the target high-dimensional array set and the second high-dimensional array set.

[0010] According to a second aspect of an embodiment of the present application, a model training data generating device is provided, comprising:

[0011] A sample set acquisition module is configured to acquire a sample set of data to be trained for a target business, wherein the sample set of data to be trained includes a first sample set and a second sample set, and the number of arrays to be trained in the first sample set is less than a preset number threshold;

[0012] a dimensionality-increasing processing module configured to perform dimensionality-increasing processing on each to-be-trained array in the to-be-trained data sample set to obtain a high-dimensional data sample set, wherein the high-dimensional data sample set includes a first high-dimensional array set corresponding to the first sample set and a second high-dimensional array set corresponding to the second sample set;

[0013] an oversampling processing module, configured to perform oversampling processing on the first high-dimensional array set to obtain a target high-dimensional array set, wherein the number of high-dimensional arrays in the target high-dimensional array set meets the preset number threshold;

[0014] The sample set determination module is configured to determine a target training data sample set of the target business based on the target high-dimensional array set and the second high-dimensional array set.

[0015] According to a third aspect of an embodiment of the present application, a computing device is provided, comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein the processor implements the steps of the model training data generation method when executing the computer instructions.

[0016] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores computer instructions, and when the computer instructions are executed by a processor, the steps of the model training data generating method are implemented.

[0017] The model training data generation method provided in the present application obtains a sample set of to-be-trained data for a target business, wherein the sample set of to-be-trained data includes a first sample set and a second sample set, and the number of arrays to be trained in the first sample set is less than a preset number threshold; performs dimensionality upgrading processing on each to-be-trained array in the sample set of to-be-trained data to obtain a high-dimensional data sample set, wherein the high-dimensional data sample set includes a first high-dimensional array set corresponding to the first sample set, and a second high-dimensional array set corresponding to the second sample set; performs oversampling processing on the first high-dimensional array set to obtain a target high-dimensional array set, wherein the number of high-dimensional arrays in the target high-dimensional array set meets the preset number threshold; and determines a target training data sample set for the target business based on the target high-dimensional array set and the second high-dimensional array set.

[0018] In one embodiment of the present application, each array to be trained in a training data sample set is subjected to dimensionality upgrading processing to obtain a high-dimensional data sample set, and then a first high-dimensional array set corresponding to the first sample set in the high-dimensional data sample set is oversampled to obtain a target high-dimensional array set, that is, a new high-dimensional array is obtained as a new sample after oversampling, and then the target high-dimensional array set and the second high-dimensional array set corresponding to the second sample set in the high-dimensional data sample set are used as the final target training data sample set; this dimensionality upgrading processing method maps low-dimensional data to high-dimensional data to improve the linear separability between data, and then oversampling the high-dimensional data can more accurately obtain the new sample data after oversampling, avoid obtaining data overlapping with other types of sample data, and thus improve the effect of model training. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 This is a schematic diagram of an interleaving situation of two types of sample data provided by an embodiment of the present application;

[0020] Figure 2 This is a flow chart of a method for generating model training data provided in one embodiment of the present application;

[0021] Figure 3 This is a flowchart of a method for generating model training data provided by an embodiment of the present application;

[0022] Figure 4 This is a schematic diagram of oversampling of a method for generating model training data provided in one embodiment of the present application;

[0023] Figure 5 This is a structural diagram of a model training data generating device provided in one embodiment of the present application;

[0024] Figure 6 This is a structural block diagram of a computing device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0025] The following description sets forth many specific details to facilitate a thorough understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the scope of the present application. Therefore, the present application is not limited to the specific implementations disclosed below.

[0026] The terms used in one or more embodiments of the present application are for the purpose of describing specific embodiments only and are not intended to limit one or more embodiments of the present application. The singular forms "a", "the" and "the" used in one or more embodiments of the present application and the appended claims are also intended to include 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 the present application refers to and includes any or all possible combinations of one or more associated listed items.

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

[0028] First, the terms involved in one or more embodiments of the present application are explained.

[0029] Kernel function: The kernel function is derived from the SVM (support vector machine) model, and specifically includes Gaussian kernel function, linear kernel function, polynomial kernel function, etc.

[0030] The Gaussian kernel, also known as the radial basis function (RBF), is a radially symmetric scalar function used to map finite-dimensional data into a higher-dimensional space. It is typically defined as a monotonic function of the Euclidean distance between any point x in space and a central point x', denoted by k(||x - x'||). Its effect is often local, meaning that the function takes a small value when x is far from x'.

[0031] Oversampling: In machine learning classification tasks, a roughly equal amount of positive and negative samples is usually required to achieve a good learning effect. However, in real-world scenarios, the amount of positive and negative samples is often unbalanced. Oversampling refers to expanding the samples of the minority class to improve the model learning effect.

[0032] The kernel function is used to map low-dimensional data to high-dimensional data to achieve linear separability of the data.

[0033] SMOTE (Synthetic Minority Oversampling Technique): Synthetic Minority Oversampling Technology is an improved solution based on the random oversampling algorithm. Since random oversampling adopts a strategy of simply copying samples to increase minority class samples, it is easy to cause the problem of model overfitting, that is, the information learned by the model is too specific (Specific) and not general enough (General). The basic idea of the SMOTE algorithm is to analyze minority class samples and artificially synthesize new samples based on minority class samples and add them to the dataset.

[0034] In-game data on players purchasing gift packs or items, or data on insufficient purchases, can be considered an unbalanced dataset. As the number of players increases, the phenomenon often reported is a decrease in sufficient purchase data and an increase in insufficient purchase data. Consequently, this imbalance in the number of class samples significantly impacts model training accuracy during subsequent training.

[0035] Currently, oversampling can be used to oversample the sample data of the minority class, so that the number of minority classes can be increased before model training. When using SMOTE oversampling, the player purchase data can be oversampled to expand the minority class samples, thereby improving the subsequent model learning effect. However, this method is only effective when the boundary between the two types of data is clear. If the two types of sample data are intertwined, it will be easy to synthesize erroneous purchase data samples. For more information, see Figure 1 , Figure 1 This is a schematic diagram of an embodiment of the present application providing two types of sample data interleaved.

[0036] Figure 1 The middle circle represents the sample points corresponding to the player's purchase data, and the rectangle represents the sample points corresponding to the player's insufficient purchase data. These two types of sample points are intertwined. Therefore, when the sample points of the player's purchase data are oversampled, the new sample points may overlap with the sample points corresponding to the player's insufficient purchase data, resulting in inaccurate oversampling results. For example, Figure 1In the example, the adjacent sample points of the sample point X are Y1, Y2, and Y3. Using the SMOTE oversampling method, the sample point X is connected to the adjacent sample points Y1, Y2, and Y3 respectively. The new sample points selected from each connecting line are n1, n2, and n3. Since the two types of sample points, circular and rectangular, are intertwined, the corresponding new sample points n1, n2, and n3 are likely to be sample points where the player does not have enough purchase data. Therefore, in this case, even if the result of the oversampling process solves the problem of data imbalance, it has lost data accuracy, which will also affect the effect of subsequent model training.

[0037] Based on this, the model training data generation method provided in the embodiment of the present application uses a dimensionality increase algorithm to map both types of sample data, player purchase data and player insufficient purchase data, to a high-dimensional space, so that the linear separability of the two types of sample data is enhanced, and then the player purchase data is oversampled using an oversampling algorithm, which not only improves the quality of the oversampled new samples, but also improves the effect of subsequent model training.

[0038] In this application, a model training data generation method is provided. This application also involves a model training data generation device, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.

[0039] Figure 2 A flow chart of a method for generating model training data according to an embodiment of the present application is shown.

[0040] Figure 2 A sample set of data to be trained can be obtained first, wherein the sample set of data to be trained includes a first sample set and a second sample set, and the array to be trained in each sample set is subjected to dimensionality upgrading processing to obtain a high-dimensional data sample set, including a first high-dimensional array set and a second high-dimensional array set; since the number of arrays in the first high-dimensional array set is small, the first high-dimensional array set can be oversampled to obtain a target high-dimensional array set; finally, the target high-dimensional array set and the second high-dimensional array set constitute a target training data sample set; the target training data sample set can be used to train the model to improve the effect of model training.

[0041] It should be noted that this embodiment only schematically describes the dimensionality increase processing and oversampling processing process, and specific processing details can be found in the description of the following embodiments.

[0042] Figure 3 A flowchart of a method for generating model training data according to an embodiment of the present application is shown, which specifically includes the following steps:

[0043] It should be noted that the model training data generation method provided in this embodiment can be applied to application scenarios where various types of data are unbalanced and need oversampling processing to solve the problem of balancing the number of various types of data. This embodiment does not make specific limitations on this. For ease of understanding, the following embodiment uses the example of pushing gift packages to players in a game scene as an example. The data of players purchasing gift packages is called positive samples, and the data of players not purchasing gift packages is called negative samples, and the number of positive and negative samples is unbalanced.

[0044] Step 302: Obtain a data sample set to be trained for the target business, wherein the data sample set to be trained includes a first sample set and a second sample set, and the number of arrays to be trained in the first sample set is less than a preset number threshold.

[0045] The target business can be understood as the business corresponding to a certain behavior performed by a user in an application scenario, such as the business of players purchasing gift packages in a game application scenario.

[0046] The sample set of data to be trained can be understood as a sample set composed of user behavior data for the target business. For example, the sample set includes data on players purchasing gift packs and data on players not purchasing gift packs.

[0047] In actual applications, the server can obtain a sample set of data to be trained for the target business, wherein the sample set of data to be trained includes two types of data, one type is that the number of arrays to be trained is less than a preset number threshold, and the other type is that the number of arrays to be trained is greater than or equal to the preset number threshold; and the array to be trained can be understood as the content of each data in the sample set of data to be trained, and the data content is data in array form.

[0048] It should be noted that the data in the training data sample set needs to be oversampled. Therefore, the data in the sample set are all array data. Specifically, the process of how to convert structured data or unstructured data into array data will not be described in detail in this embodiment.

[0049] Furthermore, in a game scenario, each data in the to-be-trained data sample set should be data of players purchasing gift packs and data of players not purchasing gift packs. Specifically, obtaining the to-be-trained data sample set of the target business includes:

[0050] Obtaining player data corresponding to a target item in a target game within a preset time interval, wherein the player data includes player attribute information and information about the player's purchase result of the target item;

[0051] The player data is determined as a sample set of data to be trained.

[0052] In actual applications, the server can obtain the player data corresponding to the target props of each player in the target game within a preset time interval. The player data includes the player's personal attribute information and the result information of whether the player purchases the target props. Among them, the player's personal attribute information includes the player's account level, player combat power information, the player's number of diamonds, etc. The result information of whether the player purchases the target props includes purchase and not enough purchase; furthermore, all the behavioral actions of each player within the preset time interval can generate player data, and based on multiple player data, a data sample set to be trained is formed.

[0053] It should be noted that after the player's account level, combat power, number of diamonds, whether or not to purchase props in the game are recorded, these features can all be processed into numerical values, and then the numerical values of each dimension constitute an array to be trained, and each array to be trained constitutes a sample set of data to be trained; among them, the number of dimensions contained in each array is determined according to the data of different dimensions obtained, and this is not specifically limited in this embodiment.

[0054] Step 304: Perform dimensionality increase processing on each array to be trained in the data sample set to be trained to obtain a high-dimensional data sample set, wherein the high-dimensional data sample set includes a first high-dimensional array set corresponding to the first sample set and a second high-dimensional array set corresponding to the second sample set.

[0055] In practical applications, in order to solve the problem of unbalanced number of various types of arrays to be trained in the data sample set to be trained, each array to be trained can be subjected to dimensionality upgrading, that is, each low-dimensional array to be trained is mapped to a high-dimensional space to obtain a high-dimensional data sample set; accordingly, the arrays to be trained in the first sample set and the second sample set in the training data sample set are subjected to dimensionality upgrading to obtain a first high-dimensional array set corresponding to the first sample set and a second high-dimensional array set corresponding to the second sample set, thus completing the process of dimensionality upgrading for each type of array to be trained.

[0056] Furthermore, the dimensionality increase process can be implemented in a variety of ways. In this embodiment, a target dimensionality increase algorithm can be selected from a set of preset dimensionality increase algorithms, and the target dimensionality increase algorithm can be used to perform dimensionality increase processing on each array to be trained. Specifically, the dimensionality increase processing is performed on each array to be trained in the data sample set to be trained to obtain a high-dimensional data sample set, including:

[0057] Determine a target dimension-raising algorithm in a preset dimension-raising algorithm set;

[0058] Based on the target dimensionality increasing algorithm, each array to be trained in the data sample set to be trained is subjected to dimensionality increasing processing to obtain a high-dimensional data sample set.

[0059] Among them, the target dimensionality increase algorithm can be understood as an algorithm for mapping training data from low dimensions to high dimensions, including but not limited to various kernel function algorithms such as Gaussian kernel function, linear kernel function, and polynomial kernel function.

[0060] In actual applications, the server can select a target dimensionality increasing algorithm from a preset dimensionality increasing algorithm set, and the selection method is not limited in this embodiment; for example, if a Gaussian kernel function is selected as the target dimensionality increasing algorithm, the algorithm process of the Gaussian kernel function can be used to perform dimensionality increasing processing on each array to be trained in the training data sample set, and then obtain a high-dimensional data sample set, wherein the high-dimensional data sample set is a sample set composed of multiple high-dimensional arrays, and is further divided into two categories. The two categories of high-dimensional arrays have a large difference in quantity. For example, the first high-dimensional array set contains 5 high-dimensional arrays, and the second high-dimensional array set contains 50 high-dimensional arrays.

[0061] Furthermore, by using the target dimensionality raising algorithm to perform dimensionality raising processing on each array to be trained, all arrays to be trained in the data sample set to be trained can be used to complete the dimensionality raising process of each array to be trained; specifically, the dimensionality raising process is performed on each array to be trained in the data sample set to be trained based on the target dimensionality raising algorithm to obtain a high-dimensional data sample set, including:

[0062] Determining a target array to be trained and a plurality of reference arrays to be trained in the data sample set to be trained;

[0063] Based on the target array to be trained and the multiple reference arrays to be trained, performing dimensionality increasing processing according to a target dimensionality increasing algorithm to obtain a high-dimensional array corresponding to the target array to be trained;

[0064] Based on the high-dimensional array corresponding to the target array to be trained, a high-dimensional data sample set is generated.

[0065] Among them, the target array to be trained can be understood as any array to be trained in the data sample set to be trained, and the reference array to be trained can be understood as all the remaining arrays to be trained in the data sample set to be trained except the target array to be trained; for example, the data sample set to be trained includes three arrays to be trained, namely array to be trained 1, array to be trained 2 and array to be trained 3, then when the target array to be trained is determined to be array to be trained 1, the reference array to be trained is determined to be array to be trained 2 and array to be trained 3.

[0066] In actual applications, after the server has determined the target array to be trained and multiple reference arrays to be trained in the data sample set to be trained, it can perform dimensionality upgrading on the target array to be trained according to the target dimensionality upgrading algorithm to obtain a high-dimensional array corresponding to the target array to be trained; then, in the data sample set to be trained, each array to be trained is treated as the target data to be trained for dimensionality upgrading. After multiple rounds of dimensionality upgrading, multiple high-dimensional arrays can be obtained, thereby constituting a high-dimensional data sample set; it should be noted that the multiple rounds of dimensionality upgrading process will not be described in detail here.

[0067] In a specific implementation, the dimension parameters on each dimension are determined by determining the array distance between each array to be trained, and the high-dimensional array corresponding to each array to be trained is determined according to each dimension parameter; specifically, the target array to be trained and the multiple reference arrays to be trained are subjected to dimension increasing processing according to the target dimension increasing algorithm to obtain the high-dimensional array corresponding to the target array to be trained, including:

[0068] Based on the target array to be trained and the multiple reference arrays to be trained, determining a reference array distance between the target array to be trained and each reference array to be trained according to a target dimension raising algorithm;

[0069] Based on the reference array distance, obtaining a reference dimension parameter corresponding to the target array to be trained;

[0070] A high-dimensional array corresponding to the target array to be trained is generated according to the reference dimension parameter and the target dimension parameter, wherein the target dimension parameter is determined based on the target array to be trained.

[0071] The reference array distance can be understood as the array distance between the target array to be trained and the reference array to be trained, and the reference dimension parameter can be understood as the parameter representing a certain dimension extracted from the array distance.

[0072] In actual applications, the server can use the target dimensionality increase algorithm to determine the reference array distance between the target array to be trained and each reference array to be trained; then, from each reference array distance, obtain the various reference dimension parameters that constitute the high-dimensional array; then, based on each reference dimension parameter and the target dimension parameter, generate the high-dimensional array corresponding to the target array to be trained, where the target dimension parameter refers to the distance between the target array to be trained and its own reference array, that is, if the distance is 0, the obtained dimension parameter is also 0.

[0073] For example, if the target dimension-raising algorithm is the Gaussian kernel function algorithm, the reference array distance can be calculated by referring to the following formula 1:

[0074]

[0075] If the target array to be trained is [1,1], the reference array to be trained 1 is [2,1], and the reference array to be trained 2 is [3,1], use the above formula 1 to calculate k(x i ,x j ) 11 、k(x i ,x j ) 12 、k(x i ,x j ) 13 , where the subscript 11 Indicates the distance between the target array to be trained and the reference array itself, the subscript 12 Indicates the reference array distance between the target array to be trained and the reference array to be trained 1, the subscript 13 represents the reference array distance between the target array to be trained and the reference array to be trained 2; further, in k(x i ,x j ) 11 Determine the target dimension parameter to be 0, in k(x i ,x j ) 12 In the reference dimension parameter 1, we determine that it is 1. i ,x j ) 13 In the example, the reference dimension parameter 2 is determined to be 2, then the high-dimensional array corresponding to the target array to be trained is recorded as [0, 1, 2].

[0076] By performing dimensionality-up processing on each array to be trained, a high-dimensional array set can be obtained. By mapping a low-dimensional array into a high-dimensional array, the separability of the array is enhanced.

[0077] Step 306: performing oversampling processing on the first high-dimensional array set to obtain a target high-dimensional array set, wherein the number of high-dimensional arrays in the target high-dimensional array set meets the preset number threshold.

[0078] In practical applications, in order to solve the problem of imbalance in the number of two types of high-dimensional arrays, the first high-dimensional array set whose number is less than a preset number threshold can be directly oversampled to obtain a target high-dimensional array set, and the number of high-dimensional arrays in the target high-dimensional array set needs to meet the preset number threshold, that is, equal to or greater than the preset number threshold.

[0079] Furthermore, performing oversampling processing on the first high-dimensional array set to obtain a target high-dimensional array set includes:

[0080] Determine a target oversampling algorithm in a preset oversampling algorithm set;

[0081] Based on the target oversampling algorithm, oversampling processing is performed on the first high-dimensional array set to obtain a target high-dimensional array set.

[0082] Among them, the preset oversampling algorithm set can be understood as a set of algorithms that can perform oversampling processing, including SMOTE algorithm, KMeans SMOTE algorithm, SVM SMOTE algorithm, etc., and this embodiment does not make specific limitations on this; the target oversampling algorithm can be understood as a target oversampling algorithm selected from the oversampling algorithm set, such as selecting the SMOTE algorithm, and this embodiment does not make too many limitations on this.

[0083] In practical applications, the server may use the selected target oversampling algorithm to perform oversampling processing on each high-dimensional array in the first high-dimensional array set to expand the number of high-dimensional arrays in the first high-dimensional array set, and thus obtain the target high-dimensional array set.

[0084] Specifically, performing oversampling processing on the first high-dimensional array set based on the target oversampling algorithm to obtain a target high-dimensional array set includes:

[0085] Determining a high-dimensional array to be processed in the first high-dimensional array set;

[0086] Based on the high-dimensional array to be processed, determining a plurality of adjacent high-dimensional arrays associated with the high-dimensional array to be processed;

[0087] Performing oversampling processing based on the high-dimensional array to be processed and the multiple adjacent high-dimensional arrays to obtain a candidate high-dimensional array corresponding to the high-dimensional array to be processed;

[0088] Based on the candidate high-dimensional arrays, a target high-dimensional array set is generated.

[0089] The high-dimensional array to be processed can be understood as any high-dimensional array in the first high-dimensional array set.

[0090] In practical applications, after determining the high-dimensional array to be processed, multiple adjacent high-dimensional arrays having an association relationship with the high-dimensional array to be processed can be determined, wherein the association relationship can be understood as the adjacent distance relationship of the array mapping in the dimensional space, which is not specifically limited in this embodiment; further, an oversampling process is performed according to the high-dimensional array to be processed and each adjacent high-dimensional array, and then, multiple candidate high-dimensional arrays corresponding to the high-dimensional array to be processed are obtained, and the multiple candidate high-dimensional arrays are used as new sample arrays after oversampling processing, and a target high-dimensional array subset is formed according to each candidate high-dimensional array, the high-dimensional array to be processed, and the multiple adjacent high-dimensional arrays; finally, after each high-dimensional array in the first high-dimensional array set is oversampled as the high-dimensional array to be processed, multiple corresponding candidate high-dimensional arrays can be obtained respectively, and then, all the candidate high-dimensional arrays are used as expanded high-dimensional arrays of the first high-dimensional array set to obtain the target high-dimensional array set.

[0091] By treating each high-dimensional array in the first high-dimensional array set as a high-dimensional array to be processed and performing the above-mentioned oversampling process, a batch of new array samples can be obtained, thereby expanding the number of the first high-dimensional array set and generating a target high-dimensional array set.

[0092] Furthermore, performing oversampling processing based on the high-dimensional array to be processed and the multiple adjacent high-dimensional arrays to obtain a candidate high-dimensional array corresponding to the high-dimensional array to be processed includes:

[0093] Determine the coordinate points to be processed corresponding to the high-dimensional array to be processed, and determine the adjacent coordinate points corresponding to each adjacent high-dimensional array;

[0094] Connecting the coordinate point to be processed with each adjacent coordinate point with a straight line to obtain a plurality of adjacent connection lines;

[0095] Based on a preset scale factor, candidate coordinate points are determined in the plurality of adjacent connection lines, and high-dimensional arrays corresponding to the candidate coordinate points are determined as candidate high-dimensional arrays.

[0096] In actual applications, the server can obtain the coordinate point to be processed in the dimensional space according to the mapping of the high-dimensional array to be processed. Similarly, adjacent high-dimensional arrays can also be mapped to obtain adjacent coordinate points; then, the coordinate point to be processed and each adjacent coordinate point are connected to obtain multiple adjacent connected straight lines; then, according to the preset scaling factor, the corresponding candidate coordinate point is determined on each adjacent connecting line; finally, the high-dimensional array corresponding to the candidate coordinate point is determined as the candidate high-dimensional array; it should be noted that the preset scaling factor is a scaling factor randomly selected in the range of [0, 1] in the oversampling algorithm, and according to the scaling factor, a new point placed on the adjacent connecting line is determined as a new sample point, and the high-dimensional array corresponding to the sample point of the signal is determined as the candidate high-dimensional array.

[0097] See also Figure 4 , Figure 4 A schematic diagram of oversampling of a model training data generation method provided in an embodiment of the present application is shown.

[0098] Figure 4 The figure shows two types of high-dimensional array sets. The circles represent the high-dimensional array sets corresponding to player purchase data, and the rectangles represent the high-dimensional array sets corresponding to player insufficient purchase data. Therefore, when X is the high-dimensional array to be processed, its adjacent high-dimensional arrays can be Y1, Y2, and Y3. After connecting X with Y1, Y2, and Y3 respectively, a new point can be placed at (z*100)% of each line based on a randomly selected scaling factor z in the range [0, 1]. These points are candidate coordinate points n1, n2, and n3, i.e., new samples of player purchase data. In this case, the high-dimensional arrays corresponding to n1, n2, and n3 do not overlap with the high-dimensional arrays represented by the rectangles, ensuring the accuracy of the oversampling results.

[0099] By oversampling the high-dimensional array in the first high-dimensional array set, new sample points can be obtained more accurately, thereby improving the accuracy of the data in the target high-dimensional array set.

[0100] Step 308: Determine a target training data sample set for the target business based on the target high-dimensional array set and the second high-dimensional array set.

[0101] In practical applications, after oversampling the array data of the minority class, it is combined with the second high-dimensional array set to obtain the target training data sample set for the target business. In this way, the imbalance problem of various types of array data in the target training data sample set is solved, and the accuracy is also improved.

[0102] In addition, the embodiment of the present application further provides a process for training an initial business model using a target training data sample set; specifically, after determining the target training data sample set for the target business based on the target high-dimensional array set and the second high-dimensional array set, the process further includes:

[0103] Based on the target training data sample set, the initial business model is trained to obtain a target business model.

[0104] In practical applications, there is no specific limitation on the type of the initial business model. It can be a prediction model for players purchasing gift packages, an analysis model for player behavior, etc. The target training data sample set can be used to perform multiple rounds of iterative training on the initial business model to obtain the target business model.

[0105] In summary, the model training data generation method provided in the embodiment of the present application combines the dimensionality increase algorithm with the oversampling algorithm to process low-dimensional array data with poor separability into high-dimensional array data. After improving the separability, the samples of the minority class are oversampled, which can improve the quality of the new samples and thus improve the final model training effect.

[0106] Corresponding to the above method embodiment, the present application also provides an embodiment of a device for generating model training data, Figure 5 FIG. 1 shows a schematic diagram of a structure of a model training data generating device provided by an embodiment of the present application. Figure 5 As shown, the device includes:

[0107] The sample set acquisition module 502 is configured to acquire a sample set of data to be trained for a target business, wherein the sample set of data to be trained includes a first sample set and a second sample set, and the number of arrays to be trained in the first sample set is less than a preset number threshold;

[0108] a dimensionality increasing processing module 504 configured to perform dimensionality increasing processing on each to-be-trained array in the to-be-trained data sample set to obtain a high-dimensional data sample set, wherein the high-dimensional data sample set includes a first high-dimensional array set corresponding to the first sample set and a second high-dimensional array set corresponding to the second sample set;

[0109] an oversampling processing module 506 configured to perform oversampling processing on the first high-dimensional array set to obtain a target high-dimensional array set, wherein the number of high-dimensional arrays in the target high-dimensional array set meets the preset number threshold;

[0110] The sample set determination module 508 is configured to determine a target training data sample set of the target business based on the target high-dimensional array set and the second high-dimensional array set.

[0111] Optionally, the dimension-increasing processing module 504 is further configured to:

[0112] Determine a target dimension-raising algorithm in a preset dimension-raising algorithm set;

[0113] Based on the target dimensionality increasing algorithm, each array to be trained in the data sample set to be trained is subjected to dimensionality increasing processing to obtain a high-dimensional data sample set.

[0114] Optionally, the dimension-increasing processing module 504 is further configured to:

[0115] Determining a target array to be trained and a plurality of reference arrays to be trained in the data sample set to be trained;

[0116] Based on the target array to be trained and the multiple reference arrays to be trained, performing dimensionality increasing processing according to a target dimensionality increasing algorithm to obtain a high-dimensional array corresponding to the target array to be trained;

[0117] Based on the high-dimensional array corresponding to the target array to be trained, a high-dimensional data sample set is generated.

[0118] Optionally, the dimension-increasing processing module 504 is further configured to:

[0119] Based on the target array to be trained and the multiple reference arrays to be trained, determining a reference array distance between the target array to be trained and each reference array to be trained according to a target dimension raising algorithm;

[0120] Based on the reference array distance, obtaining a reference dimension parameter corresponding to the target array to be trained;

[0121] A high-dimensional array corresponding to the target array to be trained is generated according to the reference dimension parameter and the target dimension parameter, wherein the target dimension parameter is determined based on the target array to be trained.

[0122] Optionally, the oversampling processing module 506 is further configured to:

[0123] Determine a target oversampling algorithm in a preset oversampling algorithm set;

[0124] Based on the target oversampling algorithm, oversampling processing is performed on the first high-dimensional array set to obtain a target high-dimensional array set.

[0125] Optionally, the oversampling processing module 506 is further configured to:

[0126] Determining a high-dimensional array to be processed in the first high-dimensional array set;

[0127] Based on the high-dimensional array to be processed, determining a plurality of adjacent high-dimensional arrays associated with the high-dimensional array to be processed;

[0128] Performing oversampling processing based on the high-dimensional array to be processed and the multiple adjacent high-dimensional arrays to obtain a candidate high-dimensional array corresponding to the high-dimensional array to be processed;

[0129] Based on the candidate high-dimensional arrays, a target high-dimensional array set is generated.

[0130] Optionally, the oversampling processing module 506 is further configured to:

[0131] Determine the coordinate points to be processed corresponding to the high-dimensional array to be processed, and determine the adjacent coordinate points corresponding to each adjacent high-dimensional array;

[0132] Connecting the coordinate point to be processed with each adjacent coordinate point with a straight line to obtain a plurality of adjacent connection lines;

[0133] Based on a preset scale factor, candidate coordinate points are determined in the plurality of adjacent connection lines, and high-dimensional arrays corresponding to the candidate coordinate points are determined as candidate high-dimensional arrays.

[0134] Optionally, the device further comprises:

[0135] The model training module is configured to train the initial business model based on the target training data sample set to obtain the target business model.

[0136] Optionally, the sample set acquisition module 502 is further configured to:

[0137] Obtaining player data corresponding to a target item in a target game within a preset time interval, wherein the player data includes player attribute information and information about the player's purchase result of the target item;

[0138] The player data is determined as a sample set of data to be trained.

[0139] The model training data generation device provided in the embodiment of the present application obtains a high-dimensional data sample set by performing dimensionality increase processing on each array to be trained in the training data sample set, and then oversamples the first high-dimensional array set corresponding to the first sample set in the high-dimensional data sample set to obtain a target high-dimensional array set, that is, a new high-dimensional array is obtained as a new sample after oversampling, and then the target high-dimensional array set and the second high-dimensional array set corresponding to the second sample set in the high-dimensional data sample set are used as the final target training data sample set; this dimensionality increase processing method maps low-dimensional data to high-dimensional data to improve the linear separability between data, and then oversamples the high-dimensional data, which can more accurately obtain the oversampled new sample data, avoid obtaining data overlapping with other types of sample data, and thus improve the effect of model training.

[0140] The above is a schematic diagram of a model training data generation device according to this embodiment. It should be noted that the technical solution of this model training data generation device and the technical solution of the aforementioned model training data generation method are based on the same concept. For details not described in detail in the technical solution of the model training data generation device, please refer to the description of the technical solution of the aforementioned model training data generation method.

[0141] Figure 66 shows a block diagram of a computing device 600 according to an embodiment of the present application. Components of the computing device 600 include, but are not limited to, a memory 610 and a processor 620. The processor 620 is connected to the memory 610 via a bus 630, and a database 650 is used to store data.

[0142] The computing device 600 also includes an access device 640 that enables the computing device 600 to communicate via one or more networks 660. Examples of such networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 640 may include one or more of any type of network interface (e.g., a network interface card (NIC)) whether wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a Worldwide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.

[0143] In one embodiment of the present application, the above components of the computing device 600 and Figure 6 Other components not shown in the figure may also be connected to each other, for example, via a bus. Figure 6 The computing device structure block diagram shown is for illustrative purposes only and is not intended to limit the scope of the present application. Those skilled in the art may add or replace other components as needed.

[0144] Computing device 600 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, personal digital assistant, laptop computer, notebook computer, netbook computer, etc.), a mobile phone (e.g., a smartphone), a wearable computing device (e.g., a smartwatch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or personal computer (PC). Computing device 600 may also be a mobile or stationary server.

[0145] Among them, when the processor 620 executes the computer instructions, it implements the steps of the model training data generation method.

[0146] The above is a schematic diagram of a computing device according to this embodiment. It should be noted that the technical solution of this computing device and the technical solution of the aforementioned method for generating model training data are based on the same concept. 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 aforementioned method for generating model training data.

[0147] An embodiment of the present application also provides a computer-readable storage medium storing computer instructions, which, when executed by a processor, implement the steps of the model training data generation method as described above.

[0148] The above is a schematic diagram of a computer-readable storage medium according to this embodiment. It should be noted that the technical solution of this storage medium and the technical solution of the aforementioned method for generating model training data are based on the same concept. 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 aforementioned method for generating model training data.

[0149] The foregoing description describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in an order different from that described in the embodiments and still achieve the desired results. Furthermore, the processes depicted in the accompanying drawings do not necessarily require the specific order shown or the sequential order to achieve the desired results. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0150] The computer instructions include computer program code, which may be in source code form, object code form, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0151] It should be noted that for the aforementioned method embodiments, for ease of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that this application is not limited by the order of the actions described, because according to this application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions and modules involved are not necessarily required by this application.

[0152] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0153] The preferred embodiments of the present application disclosed above are intended only to help illustrate the present application. The optional embodiments do not describe all details in detail, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and variations can be made based on the content of this application. This application selects and describes these embodiments in detail in order to better explain the principles and practical applications of this application, so that those skilled in the art can better understand and utilize this application. This application is limited only by the claims and their full scope and equivalents.

Claims

1. A method for generating model training data, characterized in that: include: Obtain a sample set of to-be-trained data for a target business, wherein the sample set includes player data corresponding to a target item in a target game; the sample set includes a first sample set and a second sample set, and the number of to-be-trained arrays in the first sample set is less than a preset threshold; Performing dimensionality increase processing on each to-be-trained array in the to-be-trained data sample set to obtain a high-dimensional data sample set, wherein the high-dimensional data sample set includes a first high-dimensional array set corresponding to the first sample set and a second high-dimensional array set corresponding to the second sample set; Performing oversampling processing on the first high-dimensional array set to obtain a target high-dimensional array set, wherein the number of high-dimensional arrays in the target high-dimensional array set meets the preset number threshold; Determining a target training data sample set for the target business based on the target high-dimensional array set and the second high-dimensional array set; The step of performing oversampling on the first high-dimensional array set to obtain a target high-dimensional array set includes: Determine a target oversampling algorithm in a preset oversampling algorithm set; Based on the target oversampling algorithm, oversampling the first high-dimensional array set is performed to obtain a target high-dimensional array set; The target high-dimensional array set is generated by sampling the high-dimensional array to be processed in the first high-dimensional array set and a plurality of adjacent high-dimensional arrays associated therewith to form a candidate high-dimensional array.

2. The method according to claim 1, characterized in that The step of performing dimensionality increase processing on each array to be trained in the data sample set to be trained to obtain a high-dimensional data sample set includes: Determine a target dimension-raising algorithm in a preset dimension-raising algorithm set; Based on the target dimensionality increasing algorithm, each array to be trained in the data sample set to be trained is subjected to dimensionality increasing processing to obtain a high-dimensional data sample set.

3. The method according to claim 2, characterized in that The step of performing dimension increasing processing on each array to be trained in the data sample set to be trained based on the target dimension increasing algorithm to obtain a high-dimensional data sample set includes: Determining a target array to be trained and a plurality of reference arrays to be trained in the data sample set to be trained; Based on the target array to be trained and the multiple reference arrays to be trained, performing dimensionality increasing processing according to a target dimensionality increasing algorithm to obtain a high-dimensional array corresponding to the target array to be trained; Based on the high-dimensional array corresponding to the target array to be trained, a high-dimensional data sample set is generated.

4. The method according to claim 3, characterized in that The step of performing dimensionality increasing processing based on the target array to be trained and the multiple reference arrays to be trained according to a target dimensionality increasing algorithm to obtain a high-dimensional array corresponding to the target array to be trained includes: Based on the target array to be trained and the multiple reference arrays to be trained, determining a reference array distance between the target array to be trained and each reference array to be trained according to a target dimension raising algorithm; Based on the reference array distance, obtaining a reference dimension parameter corresponding to the target array to be trained; A high-dimensional array corresponding to the target array to be trained is generated according to the reference dimension parameter and the target dimension parameter, wherein the target dimension parameter is determined based on the target array to be trained.

5. The method according to claim 1, wherein The performing oversampling processing based on the high-dimensional array to be processed and the multiple adjacent high-dimensional arrays to obtain a candidate high-dimensional array corresponding to the high-dimensional array to be processed includes: Determine the coordinate points to be processed corresponding to the high-dimensional array to be processed, and determine the adjacent coordinate points corresponding to each adjacent high-dimensional array; Connecting the coordinate point to be processed with each adjacent coordinate point with a straight line to obtain a plurality of adjacent connection lines; Based on a preset scale factor, candidate coordinate points are determined in the plurality of adjacent connection lines, and high-dimensional arrays corresponding to the candidate coordinate points are determined as candidate high-dimensional arrays.

6. The method according to claim 1, characterized in that After determining the target training data sample set of the target business based on the target high-dimensional array set and the second high-dimensional array set, the method further includes: Based on the target training data sample set, the initial business model is trained to obtain a target business model.

7. The method according to claim 1, characterized in that The step of obtaining a sample set of data to be trained for the target business includes: Obtaining player data corresponding to a target item in a target game within a preset time interval, wherein the player data includes player attribute information and information about the player's purchase result of the target item; The player data is determined as a sample set of data to be trained.

8. A model training data generating device, characterized in that: include: A sample set acquisition module is configured to acquire a sample set of to-be-trained data for a target business, wherein the sample set of to-be-trained data includes player data corresponding to a target item in a target game; wherein the sample set of to-be-trained data includes a first sample set and a second sample set, wherein the number of to-be-trained arrays in the first sample set is less than a preset number threshold; a dimensionality-increasing processing module configured to perform dimensionality-increasing processing on each to-be-trained array in the to-be-trained data sample set to obtain a high-dimensional data sample set, wherein the high-dimensional data sample set includes a first high-dimensional array set corresponding to the first sample set and a second high-dimensional array set corresponding to the second sample set; an oversampling processing module, configured to perform oversampling processing on the first high-dimensional array set to obtain a target high-dimensional array set, wherein the number of high-dimensional arrays in the target high-dimensional array set meets the preset number threshold; a sample set determination module, configured to determine a target training data sample set for the target business based on the target high-dimensional array set and the second high-dimensional array set; The step of performing oversampling on the first high-dimensional array set to obtain a target high-dimensional array set includes: Determine a target oversampling algorithm in a preset oversampling algorithm set; Based on the target oversampling algorithm, oversampling the first high-dimensional array set is performed to obtain a target high-dimensional array set; The target high-dimensional array set is generated by sampling the high-dimensional array to be processed in the first high-dimensional array set and a plurality of adjacent high-dimensional arrays associated therewith to form a candidate high-dimensional array.

9. A computing device comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein: When the processor executes the computer instructions, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium storing computer instructions, characterized in that: When the computer instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

11. A computer program product comprising computer instructions, characterized in that: When the computer instructions are executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.

Citation Information

Patent Citations

  • Unbalanced data sampling method based on integrated Boost model

    CN107609074A

  • Risk prevention and control method, risk prevention and control device, risk prevention and control processing equipment and risk prevention and control system

    CN110020746A