A data processing method and device

Calculating the discretized probability values ​​of continuous features through the discretization model and aggregating meta-embedding solves the problem of inaccurate expression of continuous features in the existing technology and improves the accuracy and efficiency of prediction.

CN112529151BActive Publication Date: 2024-10-22HUAWEI TECH CO LTD

Patent Information

Application Number
CN202011391497.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-02
Publication Date
2024-10-22
Estimated Expiration
2040-12-02

AI Technical Summary

Technical Problem

The existing technology has a two-stage problem when processing continuous features, a problem of different expressions for similar values ​​and the same expression for different values, resulting in inaccurate vector expression values ​​and requiring a lot of manpower and time for discretization strategy optimization.

Method used

The continuous features are discretized through the discretization model, and a discretized probability value greater than 1 dimension is calculated, and the aggregation function is used to determine the vector expression value of the continuous features from meta-embedding to improve the expression ability.

Benefits of technology

It improves the vector expression ability of continuous features, improves the accuracy of prediction results, reduces labor and time costs, and avoids the shortcomings of the existing technology.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112529151B_ABST
    Figure CN112529151B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a data processing method and device for better learning the vector expression value of each feature value in a continuous feature. Specifically, the method includes: the data processing device obtains a continuous feature from sample data; then discretizes the continuous feature through a discretization model to obtain N discretized probability values ​​corresponding to the continuous feature, wherein the N discretized probability values ​​correspond to N preset basis vector expression values, where N is an integer greater than 1; finally, the data processing device determines a vector expression value of the continuous feature based on the N discretized probability values ​​and the N basis vector expression values.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence, and in particular to a data processing method and device. Background Art

[0002] Artificial Intelligence (AI) is the theory, method, technology and application system that uses digital computers or machines controlled by digital computers to simulate, extend and expand human intelligence, perceive the environment, acquire knowledge and use knowledge to obtain the best results. In other words, artificial intelligence is a branch of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can respond in a similar way to human intelligence. Artificial intelligence is also the study of the design principles and implementation methods of various intelligent machines, so that machines have the functions of perception, reasoning and decision-making. Research in the field of artificial intelligence includes robotics, natural language processing, computer vision, decision-making and reasoning, human-computer interaction, recommendation and search, basic AI theory, etc.

[0003] At present, various AI functions are usually realized through neural networks, such as natural language processing, image processing, speech processing, etc. With the development of AI technology, the functions of AI have gradually diversified. However, the realization of these functions is based on input data and labels. The parameters of the machine learning model are trained through optimization methods such as gradient descent. When the model parameters converge, the model can be used to complete the prediction of unknown data. Therefore, the processing of input data and labels can be regarded as the basis of AI. Based on the difference in data types, the data to be input can be divided into continuous features and discrete features. At present, one-hot encoding is generally used for discrete features. For continuous features, the commonly used feature processing methods are categorization, normalization and discretization. Among them, the discretization method is widely used in the industry, including equal frequency discretization, equal distance discretization, Logarithms method and tree model-based methods.

[0004] The current method for processing continuous features is to discretize continuous feature values ​​into different intervals (such as buckets) through discretization strategies (such as heuristic rules or models), replace the original feature values ​​with the interval numbers, and then obtain the vectorized representation in the same way as discrete features. However, this method usually requires a lot of manpower and time to try and optimize the discretization strategy in order to obtain the optimal discretization rule or model, and then obtain the final embedding vector representation. At the same time, these discretization strategies all have the following disadvantages: two-phase problem (TPP), similar value but dissimilar embedding (SBD), and dissimilar value but same embedding (DBS). For example, we divide the age feature into several groups, of which 18 to 40 is one group and 40 to 60 is another group. The age difference of 18 and 40 is very large, and the same embedding will not be reflected. However, the age difference of 40 and 41 is close, but they are divided into two groups, and the embedding is likely to be very different. Therefore, the vector expression value of continuous features in the existing scheme is not enough. Summary of the invention

[0005] The embodiments of the present application provide a data processing method and device for better learning the vector expression value of each feature value in a continuous feature so that it has better expression ability.

[0006] In a first aspect, an embodiment of the present application provides a data processing method, specifically comprising: the data processing device obtains a continuous feature from sample data; then discretizes the continuous feature through a discretization model to obtain N discretized probability values ​​corresponding to the continuous feature, wherein the N discretized probability values ​​correspond to preset N basis vector expression values, and N is an integer greater than 1; finally, the data processing device determines a vector expression value of the continuous feature based on the N discretized probability values ​​and the N basis vector expression values.

[0007] In this embodiment, the continuous feature is feature data with continuous statistical feature values ​​in the sample data. In an exemplary scheme, the continuous feature includes but is not limited to age features, click volume features and score features in the recommendation model. Among them, the value of the click volume feature can be the entire positive integer value range, and the value is a continuous feature, such as 1, 2, 3, 4,... The value of the age feature can be 0 to the maximum age currently recorded. Discrete features in sample data can usually only be listed one by one in a certain order, such as gender features, whose values ​​are only male or female.

[0008] Vector expression refers to using vectors to represent specific features. In this embodiment, the basis vector expression value can be a preset initialization vector expression value, or it can be an optimized vector expression value. The vector expression value of the continuous feature is a vector value used to represent the specific features of the continuous feature determined based on the basis vector expression value. It can be understood that the vector expression value of the continuous feature has the same dimension as the basis vector expression value. In an exemplary scheme, the basis vector expression value can be a 5-dimensional vector value, such as (01010); the vector expression value corresponding to the continuous feature is also a 5-dimensional vector value, such as (11010).

[0009] In this embodiment, the data processing device calculates the discretization model for the feature value of each continuous feature to obtain a discretization probability greater than 1 dimension and presets a meta-vector expression value meta-embedding greater than 1 dimension for each continuous feature domain in the continuous feature, and uses an aggregation function and the discretization probability to determine a vector expression value for the feature value from the meta-embedding. In this way, compared with the prior art, the vector expression value expressed by the learning expression has better expression ability, which helps to improve the accuracy of the prediction result.

[0010] Optionally, the specific method in which the data processing device discretizes the continuous feature using a discretization model to obtain N discretization probabilities corresponding to the continuous feature can be as follows: the data processing device presets the initial variable in the discretization model; then determines the N mapping values ​​corresponding to the continuous feature based on the initial variable; and finally calculates the N discretization probability values ​​of the continuous feature based on the mapping value. In this embodiment, the initial variable can be an initial mapping domain, and then for the continuous feature, the N mapping values ​​corresponding to the continuous feature can be calculated through the initial variable; then a corresponding probability value is calculated based on each of the N mapping values, thereby obtaining N probability values, and at this time, the N probability values ​​serve as the N discretization probabilities corresponding to the continuous feature.

[0011] Optionally, the discretization model can be a multi-classification neural network, an attention network, or a linear mapping and softmax. In this embodiment, the discretization model can be used as long as it can realize that the feature value corresponds to multiple discretization probabilities, and the specific discretization model is not limited here. At the same time, the discretization model can also be selected accordingly according to different application scenarios. For example, in a system where continuous features can be classified, the discretization model can be the discretization model provided above.

[0012] Optionally, based on the above method, when the discretization model is a linear mapping and softmax, the N discretization probability values ​​of the continuous feature obtained by using the discretization model can be specifically:

[0013] The default initialization linear mapping variable is: W logit =R 1×h , the initialized linear mapping variable is the initial variable; the corresponding N mapping values ​​in the continuous feature are determined by a linear mapping formula,

[0014] Wherein, the linear mapping formula is: logit =cont·W logit ; Calculate the probability value corresponding to each of the N mapping values ​​according to the discretization formula to obtain N probability values, wherein the discretization formula is: The N probability values ​​are used as the N discretized probabilities;

[0015] Among them, the W logit is used to indicate a linear mapping variable, the R is used to indicate a real number domain, the h is used to indicate the number of buckets after the continuous feature is discretized, the h is equal to the N, the cont logit It is used to indicate the expression of the continuous feature after linear mapping. k It is used to indicate the probability value of discretizing the continuous feature into the kth bucket. indicates the kth neuron output after the continuous feature linear mapping, the τ is used to indicate the temperature control coefficient of softmax, the Used to indicate the output of the i-th neuron after linear mapping of the continuous feature.

[0016] Optionally, in this embodiment, the data processing device can use an aggregation function to determine a vector expression value corresponding to the continuous feature based on the N discretized probability values ​​and the N basis vector expression values, where the aggregation function is Max-Pooling, Top-K-Sum or Weighted-Average.

[0017] It can be understood that the aggregation function is used to aggregate N meta-embeddings corresponding to N discrete probability values ​​into one embedding corresponding to the continuous feature. In an exemplary scheme, the discretized probability value is (a1, a2, a3, a4), and the meta-embedding is (b1, b2, b3, b4), then a1 corresponds to b1, a2 corresponds to b2, a3 corresponds to b3, and a4 corresponds to b4. The aggregation function is used to aggregate an embedding from (b1, b2, b3, b4), and use this embedding to represent the continuous feature. For example, b3 can be aggregated from (b1, b2, b3, b4) as the vector expression value corresponding to the continuous feature.

[0018] The calculation method of Max-Pooling is to obtain the corresponding embedding from Meta Embedding according to the index corresponding to the maximum value in the discretized probability value as the vector expression value corresponding to the continuous feature. The calculation formula is: vx_cont = E k ,where k=arg max h {cont_p h For example, assuming that the discretized probability value is (a1, a2, a3, a4), and the meta-embedding is (b1, b2, b3, b4), then a1 corresponds to b1, a2 corresponds to b2, a3 corresponds to b3, and a4 corresponds to b4. If the value of a3 is the largest, then b3 is used as the vector expression value of the continuous feature.

[0019] The calculation method of Top-K-Sum is to take the index corresponding to the largest k values ​​in the discretized probability, then obtain the corresponding embedding from MetaEmbedding and sum it up as the vector expression value corresponding to the continuous feature. Its calculation formula is: For example, assuming that the discretization probability is (a1, a2, a3, a4), and the meta-embedding is (b1, b2, b3, b4), then a1 corresponds to b1, a2 corresponds to b2, a3 corresponds to b3, and a4 corresponds to b4. If the values ​​of a2 and a3 are the largest, then b2 plus b3 are used as the vector expression value of the continuous feature.

[0020] The Weighted-Average is calculated by weighting the sum of N probability values ​​and Meta Embedding as the vector expression value corresponding to the continuous feature. The calculation formula is: It can be understood that h in the calculation formula is equal to N. For example, assuming that the discretization probability is (a1, a2, a3, a4) and the meta-embedding is (b1, b2, b3, b4), then a1 corresponds to b1, a2 corresponds to b2, a3 corresponds to b3, and a4 corresponds to b4. The vector expression value of the continuous feature is equal to (a1*b1+a2*b2+a3*b3+a4*b4).

[0021] Optionally, the method also includes inputting user features and object features into a recommendation model or a search model to obtain a prediction result; the user features or the object features include the vector expression value; the user features or the object features to be recommended use the vector expression value to represent the continuous features. That is, the data processing method provided in the embodiment of the present application can also be applied to specific application scenarios. When the data processing method is applied to a recommendation model or a search model, user features and object features need to be input into the recommendation model or the search model. If the user features or the object features include the continuous feature, the data processing model can use the above method to output the vector expression value of the continuous feature, and the vector expression value will be included in the user features or the object features and input into the recommendation model or the search model.

[0022] Optionally, the vector expression value may be directly included in the user feature or object feature, or may be concatenated with other continuous features as an input feature expression as a whole, or may be concatenated with other continuous features and discrete features as an input feature expression as a whole. As long as the vector expression value can be used as input for model application or model training, it is not specifically limited here. In this way, since the continuous feature has a better vector expression value, the input feature expression is also more expressive, so the function of the model can be more accurately realized during model training and model application.

[0023] Optionally, during the application or training of the above-mentioned model, the data processing device can also obtain the actual results of the application process, and then adjust the weight parameters in the discretization model according to the predicted results and the actual results using the loss function in the model training process. The weight parameters can be understood as other parameters that do not include the N value, such as the basis vector expression value. In this way, the discretization model and the machine learning model that applies the discretization model interact with each other, so that the weight parameters in the discretization model are adjusted according to the real-time data distribution to achieve the optimization of the discretization model.

[0024] Optionally, the value of N is greater than or equal to 20 and less than or equal to 100. Within this range, the discretization model can have a better application effect.

[0025] Optionally, the continuous feature may be a normalized continuous feature, which can more quickly discretize the continuous feature.

[0026] In a second aspect, the present application provides a data processing device having the function of implementing the behavior of the data processing device in the first aspect. The function can be implemented by hardware or by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the above functions.

[0027] In a possible implementation, the device includes a unit or module for executing each step of the first aspect above. For example, the device includes: an acquisition module, for acquiring continuous features;

[0028] A processing module is used to discretize the continuous feature using a discretization model to obtain N discretized probability values ​​corresponding to the continuous feature, where N is an integer greater than 1; the N discretized probability values ​​correspond to N preset basis vector expression values; and a vector expression value of the continuous feature is determined based on the N discretized probability values ​​and the N basis vector expression values.

[0029] Optionally, a storage module is also included for storing program instructions and data necessary for the data processing device.

[0030] In a possible implementation, the device includes: a processor and a transceiver, the processor being configured to support the data processing device to perform the corresponding functions in the method provided in the first aspect. The transceiver is used to instruct the communication between the data processing device and the sample data storage device, such as obtaining the continuous feature from the sample data storage device. Optionally, the device may also include a memory, which is coupled to the processor and stores the necessary program instructions and data for the data processing device.

[0031] In a possible implementation, when the device is a chip in a data processing device, the chip includes: a processing module and a transceiver module, the transceiver module can be, for example, an input / output interface, a pin or a circuit on the chip, etc., to transmit the continuous feature to other chips or modules coupled to the chip. The processing module can be, for example, a processor, which is used to discretize the continuous feature using a discretization model to obtain N discretized probability values ​​corresponding to the continuous feature, where N is an integer greater than 1; the N discretized probability values ​​correspond to N preset basis vector expression values; and a vector expression value of the continuous feature is determined according to the N discretized probability values ​​and the N basis vector expression values. The processing module can execute computer-executable instructions stored in a storage unit to support the data processing device to execute the method provided in the first aspect above. Optionally, the storage unit can be a storage unit in the chip, such as a register, a cache, etc., and the storage unit can also be a storage unit located outside the chip, such as a read-only memory (ROM) or other types of static storage devices that can store static information and instructions, a random access memory (RAM), etc.

[0032] In one possible implementation, the device includes a communication interface and a logic circuit, the communication interface is used to obtain continuous features; the logic circuit is used to discretize the continuous features using a discretization model to obtain N discretized probability values ​​corresponding to the continuous features, where N is an integer greater than 1; the N discretized probability values ​​correspond to preset N basis vector expression values; and a vector expression value of the continuous feature is determined based on the N discretized probability values ​​and the N basis vector expression values.

[0033] Among them, the processor mentioned in any of the above places can be a general-purpose central processing unit (CPU), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits for controlling the execution of programs of the above-mentioned data transmission methods.

[0034] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, which stores computer instructions, and the computer instructions are used to execute any possible implementation method of any of the above aspects.

[0035] In a fourth aspect, an embodiment of the present application provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the method of any one of the above aspects.

[0036] In a fifth aspect, the present application provides a chip system, which includes a processor for supporting a data processing device to implement the functions involved in the above aspects, such as generating or processing the data and / or information involved in the above methods. In one possible design, the chip system also includes a memory, which is used to store the necessary program instructions and data of the data processing device to implement the functions of any of the above aspects. The chip system can be composed of chips, or it can include chips and other discrete devices. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 It is a schematic diagram of an artificial intelligence main framework;

[0038] Figure 2 Schematic diagram of the processing flow of the recommendation system;

[0039] Figure 3 This is a schematic diagram of the structure of the recommendation system;

[0040] Figure 4 This is an exemplary model architecture diagram of the discretization model and deep learning model structure in the embodiments of the present application;

[0041] Figure 5 This is a schematic diagram of an embodiment of a data processing device in an embodiment of the present application;

[0042] Figure 6 This is another schematic diagram of an embodiment of a data processing device in an embodiment of the present application;

[0043] Figure 7 This is a schematic diagram of an embodiment of a data processing method in an embodiment of the present application;

[0044] Figure 8 A schematic diagram of an application scenario recommended for display by an application program according to an embodiment of the present application;

[0045] Fig. 9 This is another schematic diagram of an embodiment of the data processing method in the embodiment of the present application;

[0046] Fig.10 This is another schematic diagram of an embodiment of the data processing method in the embodiment of the present application. DETAILED DESCRIPTION

[0047] In order to make the purpose, technical solutions and advantages of the present application more clear, the embodiments of the present application are described below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. It is known to those skilled in the art that with the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.

[0048] The terms "first", "second", etc. in the specification and claims of this application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described here can be implemented in an order other than that illustrated or described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or modules is not necessarily limited to those steps or modules clearly listed, but may include other steps or modules that are not clearly listed or inherent to these processes, methods, products or devices. The naming or numbering of steps in this application does not mean that the steps in the method flow must be executed in the time / logical sequence indicated by the naming or numbering. The process steps that have been named or numbered can change the execution order according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved. The division of units in this application is a logical division. There may be other division methods when it is implemented in actual applications. For example, multiple units can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection between units can be electrical or other similar forms, which are not limited in this application. In addition, the units or sub-units described as separate components may or may not be physically separated, may or may not be physical units, or may be distributed in multiple circuit units, and some or all of the units may be selected according to actual needs to achieve the purpose of the present application.

[0049] In order to better understand the embodiments of the present invention, the following concepts that may be involved in the embodiments are first explained:

[0050] Machine learning system: Based on input data and labels, the parameters of the machine learning model are trained through optimization methods such as gradient descent, and the trained model is finally used to complete the prediction of unknown data.

[0051] Personalized recommendation system: A system that uses machine learning algorithms to analyze and model users’ historical data, predict new user requests, and provide personalized recommendation results.

[0052] Continuous features: Features can be divided into continuous features and discrete features according to whether the feature value is continuous. Features that can take any value within a certain interval are called continuous features. Their values ​​are continuous, and two adjacent values ​​can be divided infinitely, that is, they can take infinite values.

[0053] Discrete features: Discrete features refer to features whose values ​​can be listed one by one in a certain order, usually with integer values. Such as user gender, nationality, item type, etc. Some scenes that are continuous features in nature are also valued as integers, that is, they can be regarded as discrete features.

[0054] Feature domain and feature value: The feature domain is a set of feature values, such as gender is a feature domain; the feature value is the value in a feature domain, such as in the gender feature domain, male and female are corresponding feature values.

[0055] Discretization of continuous features: Discretization is a common data preprocessing method used to convert continuous numerical attributes into discrete numerical attributes.

[0056] Vector expression refers to using vectors to represent specific features. In this embodiment, the basis vector expression value can be a preset initialization vector expression value, or it can be an optimized vector expression value. The vector expression value of the continuous feature is a vector value used to represent the specific features of the continuous feature determined based on the basis vector expression value. It can be understood that the vector expression value of the continuous feature has the same dimension as the basis vector expression value. In an exemplary scheme, the basis vector expression value can be a 5-dimensional vector value, such as (01010); the vector expression value corresponding to the continuous feature is also a 5-dimensional vector value, such as (11010).

[0057] Figure 1 A schematic diagram of an artificial intelligence main framework is shown, which describes the overall workflow of the artificial intelligence system and is applicable to general artificial intelligence field requirements.

[0058] The following is an explanation of the above artificial intelligence theme framework from two dimensions: "intelligent information chain" (horizontal axis) and "IT value chain" (vertical axis).

[0059] The "intelligent information chain" reflects a series of processes from data acquisition to processing. For example, it can be a general process of intelligent information perception, intelligent information representation and formation, intelligent reasoning, intelligent decision-making, intelligent execution and output. In this process, data undergoes a condensed process of "data-information-knowledge-wisdom".

[0060] The "IT value chain" reflects the value that artificial intelligence brings to the information technology industry, from the underlying infrastructure of human intelligence, information (providing and processing technology implementation) to the system's industrial ecological process.

[0061] (1) Infrastructure:

[0062] The infrastructure provides computing power support for the AI ​​system, enables communication with the outside world, and supports it through the basic platform. It communicates with the outside world through sensors; computing power is provided by smart chips (CPU, NPU, GPU, ASIC, FPGA and other hardware acceleration chips); the basic platform includes distributed computing frameworks and networks and other related platform guarantees and support, which can include cloud storage and computing, interconnected networks, etc. For example, sensors communicate with the outside world to obtain data, and these data are provided to the smart chips in the distributed computing system provided by the basic platform for calculation.

[0063] (2) Data

[0064] The data on the upper layer of the infrastructure is used to represent the data sources in the field of artificial intelligence. The data involves graphics, images, voice, text, and IoT data of traditional devices, including business data of existing systems and perception data such as force, displacement, liquid level, temperature, and humidity.

[0065] (3) Data processing

[0066] Data processing usually includes data training, machine learning, deep learning, search, reasoning, decision-making and other methods.

[0067] Among them, machine learning and deep learning can symbolize and formalize data for intelligent information modeling, extraction, preprocessing, and training.

[0068] Reasoning refers to the process of simulating human intelligent reasoning in computers or intelligent systems, using formalized information to perform machine thinking and solve problems based on reasoning control strategies. Typical functions are search and matching.

[0069] Decision-making refers to the process of making decisions after intelligent information is reasoned, usually providing functions such as classification, sorting, and prediction.

[0070] (4) General ability

[0071] After the data has undergone the data processing mentioned above, some general capabilities can be further formed based on the results of the data processing, such as an algorithm or a general system, for example, translation, text analysis, computer vision processing, speech recognition, image recognition, etc.

[0072] (5) Smart products and industry applications

[0073] Smart products and industry applications refer to the products and applications of artificial intelligence systems in various fields. They are the encapsulation of the overall artificial intelligence solution, which productizes intelligent information decision-making and realizes practical application. Its application areas mainly include: smart manufacturing, smart transportation, smart home, smart medical care, smart security, autonomous driving, safe cities, smart terminals, etc.

[0074] The continuous feature processing method provided in the embodiment of the present application can be applied to various application scenarios of machine learning systems. In an exemplary solution, the machine learning system can be a personalized recommendation system. In the personalized recommendation system, the specific processing flow can be as follows: Figure 2 As shown in the figure: first collect the original data, then process the features to get the feature data that can be input into the model for training; then input the feature data into the initialization model, and use the model training to get the final recommendation model; finally, the recommendation model online service module generates a recommendation list for the user. Its main structure can be as follows Figure 3 As shown, the structure includes user data collection, log storage module, offline training module, prediction model and online prediction module. Its basic operating logic is: users perform a series of behaviors such as browsing, clicking, commenting, downloading, etc. in the front-end display list to generate behavioral data (that is, the front-end collects user data); then these behavioral data are stored in the log module; the personalized recommendation system uses data including user behavior logs to perform offline model training, and generates a prediction model after the training converges. The model is then deployed in the online service environment and gives recommendation results based on user request access, item features and contextual information. The user then generates feedback on the recommendation results to form a new round of user data. Figure 2 The flowchart shown or Figure 3 In the structural diagram shown, feature processing of raw data or user data (i.e., log data) is the basis of model training and online services, and plays a very important role in machine learning systems.

[0075] The following describes in detail the relationship and role of feature processing and machine learning models or deep learning models in conjunction with the model architecture diagram. Figure 4As shown in the figure, the model architecture diagram takes deep learning as an example. The model architecture diagram includes an input layer, a vectorized representation layer (Embedding), a multi-layer neural network (Multi-layer Perceptron, MLP) and a feature interaction layer and an output layer. Among them, the input layer passes in data features, including continuous features and discrete features. In the vectorized representation layer, the data features are processed. Specifically, for discrete features, one-hot sparse coding is used, and then the corresponding embedding vector expression is taken from the embedding table through the sparse coding id, and finally all the embedding vector expressions of discrete features are spliced ​​in order; for continuous features, vectorized expressions are performed after discretization; after obtaining the vectorized representation of each feature, the embeddings of all continuous features and discrete features are spliced ​​as the input data of the neural network; the input data is passed through the MLP and feature interaction layer and the output layer to obtain the predicted value. It can be found that the discrete processing of continuous features is not only used for the representation modeling of continuous features, but also directly affects the parameter learning of the upper MLP and feature interaction layer. At the same time, it also indirectly affects the learning of discrete feature related parameters through the back propagation of gradients, which plays a vital role in the final model prediction effect.

[0076] like Figure 5 As shown, the embodiment of the present application provides a data processing device 500, including a log data storage module 501, a continuous feature discretization module 502, a vector expression aggregation module 503, a vector expression splicing module 504 and an output module 505. Among them, the log data storage module 501 is used to collect and store the behavior data fed back by the front-end user; the continuous feature discretization module 502 outputs N discretized probability values ​​for the continuous feature through linear transformation and softmax, multi-classification neural network or attention network; the vector expression aggregation module 503 is used to determine a vector expression value corresponding to the continuous feature according to the N discretized probabilities and the preset N basis vector expression values; finally, the vector expression splicing module 504 sequentially splices the vector expression values ​​of each feature as the input data of the machine learning or deep learning model; finally, the output module 505 outputs the input data to the machine learning or deep learning model.

[0077] In the process of feature processing, the log data storage module 501 also includes discrete features, so the data processing device 500 also needs to process discrete features. At the same time, the continuous features in the log data can also be normalized first. Therefore, in an exemplary solution, the data processing device 600 combined with machine learning or deep learning can be as follows: Figure 6As shown, it includes: a log data storage module 601, a normalization module 602, a continuous feature discretization module 603, a vector expression aggregation module 604, a discrete feature processing module 605, a vector expression splicing module 606 and an output module 607. Among them, the log data storage module 601 is used to collect and store the behavior data fed back by the front-end user; the normalization module 602 is used to normalize the continuous features in the behavior data; then the normalized continuous features are input to the continuous feature discretization module 603; the continuous feature discretization module 603 outputs N discretization probability values ​​for the continuous feature through linear mapping and softmax, multi-classification neural network or attention network; the vector expression aggregation module 604 is used to determine a vector expression value corresponding to the continuous feature according to the N discretization probabilities and the preset N basis vector expression values; and the discrete feature processing module 605 is used to sparsely encode the discrete features in the behavior data using one-hot, and then retrieve the corresponding embedding vector expression value from the embedding table through the sparsely encoded id. Finally, the vector expression concatenation module 606 concatenates the vector expression value of the discrete feature and the vector expression value of the continuous feature in sequence as input data for the machine learning or deep learning model; finally, the output module 607 outputs the input data to the machine learning or deep learning model.

[0078] This application embodiment provides a method for processing continuous features. For details, please refer to Figure 7 As shown, the specific steps of the continuous feature processing method are as follows:

[0079] 701. Obtain continuous features.

[0080] In the process of model training or model application, the behavior data of the front-end user is stored as data and used as sample data in the process of model training or model application. The sample data includes continuous features and / or discrete features. This embodiment mainly describes the processing method of continuous features. The data processing device obtains the continuous features from the sample data.

[0081] Optionally, the continuous feature may be a continuous feature normalized by the data processing device. In an exemplary embodiment, the continuous feature may be calculated according to the formula Perform normalization.

[0082] 702. Discretize the continuous feature using a discretization model to obtain N discretized probability values ​​corresponding to the continuous feature, wherein N is an integer greater than 1, and the N discretized probability values ​​correspond to preset N basis vector expression values.

[0083] After acquiring the continuous feature, the data processing device inputs the continuous feature into a discretization model, and discretizes the continuous feature to obtain N discretization probability values ​​corresponding to the continuous feature.

[0084] In this embodiment, the specific method in which the data processing device discretizes the continuous feature using the discretization model to obtain N discretized probability values ​​corresponding to the continuous feature can be as follows: the data processing device presets the initial variable in the discretization model; then determines the N mapping values ​​corresponding to the continuous feature according to the initial variable; and finally calculates the N discretized probability values ​​of the continuous feature according to the mapping value. In this embodiment, the initial variable can be the initial mapping domain, and then for the continuous feature, the N mapping values ​​corresponding to the continuous feature can be calculated through the initial variable; then a corresponding probability value is calculated according to each of the N mapping values, thereby obtaining N probability values, and at this time, the N probability values ​​serve as the N discretized probabilities corresponding to the continuous feature.

[0085] Optionally, the value of N is greater than or equal to 20 and less than or equal to 100. Within this range, the discretization model can have a better application effect.

[0086] In the recommendation system provided by the present application, the discretization model can be a multi-classification neural network, an attention network, or a linear mapping and softmax.

[0087] In an exemplary solution, linear mapping and softmax are used as examples for explanation.

[0088] The number of buckets after discretization of the continuous feature is preset to h (that is, it is equivalent to presetting the number of distribution areas after discretization of the continuous feature to h. It can be understood that h is equal to N), temperature is τ, and the linear mapping variable W is initialized. logit =R 1×h ;

[0089] Then, in the first step, the continuous feature is linearly mapped according to the linear mapping formula to obtain N mapping values, wherein the linear mapping formula is: logit =cont·W logit ;

[0090] The second step is to calculate N discretized probability values ​​corresponding to the continuous feature according to the discretization formula and the N mapping values, where the discretization formula is: Among them, the W logit is used to indicate a linear mapping variable, the R is used to indicate a real number domain, the h is used to indicate the number of buckets after the continuous feature is discretized, and the cont logitIt is used to indicate the expression of the continuous feature after linear mapping. k It is used to indicate the probability value of discretizing the continuous feature into the kth bucket. indicates the kth neuron output after the continuous feature linear mapping, the τ is used to indicate the temperature control coefficient of softmax, the Used to indicate the output of the i-th neuron after linear mapping of the continuous feature.

[0091] After the first and second steps above, the data processing device obtains a probability distribution cont_p of size 1×h, which represents the probability of the continuous feature being discretized into different buckets. In an exemplary scheme, taking age as an example, assuming that a certain age value is 20, 4 buckets are allocated to the age domain, h1, h2, h3, h4. Through the above steps, a 1*4 probability distribution will be obtained, which are 0.1, 0.15, 0.7 and 0.05 respectively. That is, the probability distribution of the age value of 20 in the 4 buckets is (0.1, 0.15, 0.7 and 0.05). At the same time, according to the above results, it can be seen that the probability of the age value of 20 being distributed in the third bucket is the highest.

[0092] In another exemplary solution, a multi-classification neural network is used as an example for explanation.

[0093] The number of buckets after discretization of the continuous feature is preset to h (that is, it is equivalent to presetting the number of distribution areas after discretization of the continuous feature to h). Then, in the first step, each feature value cont in the continuous feature is input into the multi-layer perceptron MLP. The formula of the first layer of MLP is: l =σ(O l-1 ·W l +b l ), where σ is the activation function, which can be a sigmoid function or a tanh function, W l is the weight parameter of the lth layer, b l is the bias parameter of the lth layer, O l-1 is the output of the previous layer, O 0 =cont, that is, the original eigenvalue is the input of the first layer.

[0094] In the second step, the activation function of the last layer of MLP is set to softmax, the formula is: p =O L =softmax(O L-1 ·W L +b L ), the formula of softmax is Among them, cont p It is used to indicate the probability value of discretizing the continuous feature into each bucket.

[0095] 703. Determine a vector expression value of the continuous feature according to the N discretized probability values ​​and the N basis vector expression values.

[0096] The data processing device initializes N vector expression values ​​(also called Meta Embedding) for each continuous feature domain in the continuous feature, that is, V = R h×e , where e is used to represent the description dimension of the vector expression value (also called Embedding size). The above vector expression value will be used to represent all feature values ​​of a continuous feature domain. Then, the data processing device aggregates the Meta Embedding through an aggregation function according to the discretization probability obtained in step 702 to obtain the corresponding vector expression value (also called embedding vx_cont) in the continuous feature. The aggregation function is used to aggregate the corresponding N meta-embeddings in the continuous feature domain into one embedding corresponding to the feature value.

[0097] In an exemplary solution, the vector expression in the Meta Embedding corresponding to the continuous feature domain is in a one-to-one correspondence with the discretization probability of the feature value. Assuming that the discretization probability is (a1, a2, a3, a4), and the vector expression value is (b1, b2, b3, b4), then a1 corresponds to b1, a2 corresponds to b2, a3 corresponds to b3, and a4 corresponds to b4. The aggregation function is used to aggregate the meta-embedding (b1, b2, b3, b4) corresponding to the feature value into one embedding. In an exemplary solution, b3 can be aggregated from (b1, b2, b3, b4) as the vector expression value corresponding to the feature value.

[0098] Optionally, there can be multiple aggregation functions, the specific situations can be as follows:

[0099] In one possible implementation, the aggregation function is Max-Pooling, the maximum value is determined from the discretized probabilities obtained in step 702, and then the embedding corresponding to the maximum value is obtained from Meta Embedding as the vector expression value corresponding to the feature value, and the calculation formula is: vx_cont = E k ,where k=arg max h {cont_p hFor example, assuming that the discretization probability is (a1, a2, a3, a4), and the meta-embedding is (b1, b2, b3, b4), then a1 corresponds to b1, a2 corresponds to b2, a3 corresponds to b3, and a4 corresponds to b4. If the value of a3 is the largest, then b3 is used as the vector expression value of the feature value.

[0100] In another possible implementation, the aggregation function is Top-K-Sum, which selects the largest k probability values ​​from the discretized probabilities obtained in step 702, and then obtains the embedding corresponding to the probability value from Meta Embedding and sums them up as the vector expression value corresponding to the feature value. The calculation formula is: For example, assuming that the discretization probability is (a1, a2, a3, a4), and the meta-embedding is (b1, b2, b3, b4), then a1 corresponds to b1, a2 corresponds to b2, a3 corresponds to b3, and a4 corresponds to b4. If the value of k is 2, and the values ​​of a2 and a3 are the first two digits respectively, the vector expression value of the eigenvalue is b2+b3.

[0101] In another possible implementation, the aggregation function is Weighted-Average, the discretized probability is obtained from step 702, and then the N probability values ​​and Meta Embedding are weighted and summed as the vector expression value corresponding to the feature value. The calculation formula is: For example, assuming that the discretization probability is (a1, a2, a3, a4) and the meta-embedding is (b1, b2, b3, b4), then a1 corresponds to b1, a2 corresponds to b2, a3 corresponds to b3, and a4 corresponds to b4. The vector expression of the feature value is equal to (a1*b1+a2*b2+a3*b3+a4*b4).

[0102] In an exemplary solution, if age is taken as an example, assuming that a certain age value is 20, 4 buckets are allocated to the age domain, h1, h2, h3, h4, and through the above steps, a 1*4 probability distribution will be obtained, which are 0.1, 0.15, 0.7 and 0.05 respectively. That is, the probability distribution of the age value of 20 in the 4 buckets shows that the probability of being distributed in the third bucket is the highest. If the data processing device selects the Max-Pooling aggregation function for calculation, the data processing device will select the bucket with a probability of 0.7 and use its corresponding embedding as the vector expression value of the feature value.

[0103] In this embodiment, the data processing device calculates the discretization model for the feature value of each continuous feature to obtain a discretization probability greater than 1 dimension and presets a meta-vector expression value meta-embedding greater than 1 dimension for each continuous feature domain in the continuous feature, and uses an aggregation function and the discretization probability to determine a vector expression value for the feature value from the meta-embedding. In this way, for continuous features, the vector expression value of its learning expression has better expression ability than the prior art, which helps to improve the accuracy of the prediction result.

[0104] In this embodiment, the above Figure 7 The data processing method shown can be applied to a variety of application scenarios, such as recommendation models or search models. Figure 8 The click rate prediction scenario in the mobile application market recommendation system shown in the figure is used as an example to illustrate the application scenario of the data processing method provided in the embodiment of the present application. Figure 8 In the application scenario shown, the specific data model is a click-through rate prediction model (or recommendation model), which is mainly used in Figure 8 The "Featured Applications" column shown in the figure recommends corresponding applications (such as Figure 8 As shown in the figure, "Pinduoduo", "Liulishuo-Reading" and other applications are displayed in the boutique applications). The specific processing flow can be as follows: obtain user features and object features; then use traditional processing to process the discrete features in the user features and object features. That is, first perform one-hot encoding, and then obtain the embedding expression through the embedding lookup operation. For the continuous features in the user features and object features, use Figure 7 The method shown in the figure is used to process the corresponding vector expression value; then the vector expression value of the discrete feature and the vector expression value of the continuous feature in the user feature and the object feature are input into the model as the input feature expression Figure 8 The recommendation model corresponding to the application scenario shown obtains the recommendation result.

[0105] In this embodiment, the recommendation model can also use the loss function to calculate the loss value (loss) using the predicted results and the actual results, and complete the parameter update of the recommendation model and the discretization model based on the loss. When serving online, the data processing device can be used as part of the recommendation model, complete the discretization of continuous features online, and learn the embedding of each continuous feature. Compared with artificial feature engineering, bucket discretization preprocessing and other technologies, it can save processing time. When using incremental training, the weight parameters of the discretization model can be adjusted according to the latest data distribution, so that the data can be used more efficiently.

[0106] The following is an explanation of the continuous feature processing method provided by the present application using specific experimental data. In this embodiment, three data sets are provided, namely, the Criteo data set, the AutoML data set, and the Huawei industrial data set. In an exemplary solution, the statistical information of each data set is shown in Table 1.

[0107] Table 1

[0108] Dataset name Dataset size All feature quantities Discrete feature quantity Continuous feature quantity Criteo 45.8M 39 26 13 AutoML 4.69M 74 51 23 Huawei Industry 8.75M 85 44 41

[0109] Here, M is equal to 10 to the sixth power.

[0110] In this embodiment, the experimental evaluation indicator is AUC (i.e., area under curve), and the continuous feature processing techniques are normalization method, isometric, Logarithms, DeepGBM, and the continuous feature processing technology provided in the embodiment of the present application. Experiments were conducted on the above three data sets, taking DeepFM as the top-level deep model as an example, and the experimental results are shown in Table 2:

[0111] Table 2

[0112] Criteo AutoML Industrial DeepFM-Norm 0.8107 0.7523 0.7248 DeepFM-EDD 0.8125 0.7545 0.7251 DeepFM-LD 0.8138 0.7527 0.7265 DeepFM-TD 0.8130 0.7531 0.7262 DeepFM-AutoDis 0.8149 0.7556 0.7277 %Impr. 0.14% 0.15% 0.17%

[0113] The AutoDis is used to indicate a framework or device for executing a data processing method in an embodiment of the present application. It can be seen from the above results that the technical solution provided in this embodiment can achieve better results.

[0114] At the same time, the technical solution provided in this embodiment can be applied to different models, and also has an improvement effect. This embodiment selects several commonly used deep models in the industry for click-through-rate (CTR) prediction, including feedforward neural networks (factorisation-machine supported neural networks, FNN), Wide & Deep (i.e., a joint training model of a wide model with logistic regression with sparse features and transformations and a deep model of a feed-forward neural network with an embedding layer and multiple hidden layers), DeepFM, DCN and IPNN, etc. The experimental results are shown in Table 3:

[0115] Table 3

[0116]

[0117] According to the results shown in Table 3 above, adding the continuous feature processing method provided in this embodiment to these commonly used deep models can significantly improve the model performance, indicating that the continuous feature processing method has good compatibility.

[0118] Fig. 9 A possible structural schematic diagram of a data processing device 900 in the above embodiment is shown, and the data processing device 900 can be configured as the above data processing device. The data processing device 900 may include: a processor 902, a computer-readable storage medium / memory 903, a transceiver 904, an input device 905 and an output device 906, and a bus 901. Among them, the processor, the transceiver, the computer-readable storage medium, etc. are connected through a bus. The embodiment of the present application does not limit the specific connection medium between the above components.

[0119] In one example, the transceiver 904 acquires continuous features;

[0120] The processor 902 discretizes the continuous feature using a discretization model to obtain N discretized probability values ​​corresponding to the continuous feature, where N is an integer greater than 1; the N discretized probability values ​​correspond to N preset basis vector expression values; and a vector expression value of the continuous feature is determined based on the N discretized probability values ​​and the N basis vector expression values.

[0121] In another example, the processor 902 may run an operating system to control functions between various devices and components. The transceiver 904 may include a baseband circuit and a radio frequency circuit. For example, the vector expression value may be processed via the baseband circuit and the radio frequency circuit and then sent to the recommendation system or the search system.

[0122] The transceiver 904 and the processor 902 can implement the above Figures 7 to 8 The corresponding steps in any of the embodiments will not be described in detail here.

[0123] Understandably, Fig. 9 Only a simplified design of the data processing device is shown. In actual applications, the data processing device may include any number of transceivers, processors, memories, etc., and all data processing devices that can implement the present application are within the protection scope of the present application.

[0124] The processor 902 involved in the above-mentioned device 900 can be a general-purpose processor, such as a CPU, a network processor (NP), a microprocessor, etc., or an ASIC, or one or more integrated circuits for controlling the execution of the program of the present application. It can also be a digital signal processor (DSP), a field-programmable gate array (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components. The controller / processor can also be a combination that implements computing functions, such as a combination of one or more microprocessors, a combination of DSP and microprocessors, etc. The processor usually performs logical and arithmetic operations based on program instructions stored in the memory.

[0125] The bus 901 mentioned above may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0126] The computer-readable storage medium / memory 903 involved above may also store an operating system and other application programs. Specifically, the program may include a program code, and the program code includes computer operation instructions. More specifically, the above-mentioned memory may be a ROM, other types of static storage devices that can store static information and instructions, RAM, other types of dynamic storage devices that can store information and instructions, disk storage, etc. The memory 903 may be a combination of the above-mentioned storage types. And the above-mentioned computer-readable storage medium / memory may be in the processor, or may be outside the processor, or distributed on multiple entities including a processor or a processing circuit. The above-mentioned computer-readable storage medium / memory may be specifically embodied in a computer program product. For example, a computer program product may include a computer-readable medium in a packaging material.

[0127] Alternatively, the present application also provides a general processing system, such as a chip, which includes: one or more microprocessors that provide processor functions; and an external memory that provides at least a portion of the storage medium, all of which are connected to other supporting circuits through an external bus architecture. When the instructions stored in the memory are executed by the processor, the processor executes the data processing device in Figures 7 and 8Part or all of the steps in the data transmission method in this embodiment, and / or other processes used for the technology described in this application.

[0128] The steps of the method or algorithm described in conjunction with the disclosure of the present application can be implemented in a hardware manner, or can be implemented by a processor executing software instructions. The software instructions can be composed of corresponding software modules, and the software modules can be stored in a RAM memory, a flash memory, a ROM memory, an EPROM memory, an EEPROM memory, a register, a hard disk, a mobile hard disk, a CD-ROM or any other form of storage medium known in the art. An exemplary storage medium is coupled to the processor so that the processor can read information from the storage medium and can write information to the storage medium. Of course, the storage medium can also be a component of the processor. The processor and the storage medium can be located in an ASIC. In addition, the ASIC can be located in a terminal. Of course, the processor and the storage medium can also be present in a data processing device as discrete components.

[0129] Please refer to Fig.10 As shown, the embodiment of the present application shows a possible structural diagram of a data processing device 1000 in the above embodiment, and the data processing device 1000 includes an acquisition module 1001 and a processing module 1002, wherein the acquisition module 1001 is connected to the processing module 1002 via a bus. The data processing device 1000 can be the data processing device in the above method embodiment, and can also be configured as one or more chips in the data processing device. The data processing device 1000 can be used to perform part or all of the functions of the data processing device in the above method embodiment. At the same time, Fig.10 Only some modules of the data processing device related to the embodiment of the present application are shown.

[0130] The acquisition module 1001 is used to acquire continuous features;

[0131] The processing module 1002 is used to discretize the continuous feature using a discretization model to obtain N discretization probability values ​​corresponding to the continuous feature, where N is an integer greater than 1; the N discretization probability values ​​correspond to N preset basis vector expression values; and a vector expression value of the continuous feature is determined based on the N discretization probability values ​​and the N basis vector expression values. The processing module 1002 can also perform the above Figure 5 Alternatively, the processing module 1002 may also perform the method performed by the continuous feature discretization module 502 and the vector expression aggregation module 503. Figure 6 The method performed by the continuous feature discretization module 603 and the vector expression aggregation module 604.

[0132] Optionally, the data processing device 1000 further includes a storage module, which can store execution instructions. In this case, the storage module is coupled to the processing module, so that the processing module can execute the computer execution instructions stored in the storage module to implement the functions of the data processing device in the above method embodiment. In an example, the storage module optionally included in the data processing device 1000 can be a storage unit in the chip, such as a register, a cache, etc., and the storage unit can also be a storage unit located outside the chip, such as a ROM or other types of static storage devices that can store static information and instructions, RAM, etc.

[0133] It should be understood that the above Fig.10 The processes executed between the modules of the data processing device in the corresponding embodiment are similar to those in the above Figure 7 The process executed by the data processing device in the corresponding method embodiment is similar, and the details will not be repeated here.

[0134] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0135] In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or units, which can be electrical, mechanical or other forms.

[0136] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0137] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0138] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk.

Claims

1. A data processing method, It is characterized in that The method is applied to the processing of image data, voice data or text data, and comprises: Get continuous features; The continuous feature is discretized by using a discretization model to obtain N discretization probability values ​​corresponding to the continuous feature, including: presetting an initial variable in the discretization model, where the initial variable is an initial mapping domain; determining N mapping values ​​corresponding to the continuous feature according to the initial variable; and calculating N discretization probabilities of the continuous feature according to the mapping values, where N is an integer greater than 1; The N discretized probability values ​​correspond to preset N basis vector expression values; An aggregation function is used to determine a vector expression value of the continuous feature according to the N discretized probability values ​​and the N basis vector expression values.

2. The method according to claim 1, It is characterized in that The discretization model is a multi-classification neural network, an attention network or a linear mapping and softmax.

3. The method according to claim 2, It is characterized in that When the discretization model is a linear mapping and a softmax, the preset initial variables in the discretization model include: The default initialization linear mapping variable is: W logit =R 1×h , the initialized linear mapping variable is the initial variable; Determining N mapping values ​​corresponding to the continuous feature according to N includes: Determine N mapping values ​​corresponding to the continuous feature through a linear mapping formula, Wherein, the linear mapping formula is: logit =cont·W logit ; The N discretized probability values ​​of the continuous feature calculated according to the mapping value include: The probability value corresponding to each of the N mapping values ​​is calculated according to a discretization formula to obtain N probability values, wherein the discretization formula is: The N probability values ​​are used as the N discretized probabilities; Among them, the W logit is used to indicate a linear mapping variable, the R is used to indicate a real number domain, the h is used to indicate the number of buckets after the continuous feature is discretized, the h is equal to the N, the cont logit It is used to indicate the expression of the continuous feature after linear mapping. k It is used to indicate the probability value of discretizing the continuous feature into the kth bucket. indicates the kth neuron output after the continuous feature linear mapping, the τ is used to indicate the temperature control coefficient of softmax, the Used to indicate the output of the i-th neuron after linear mapping of the continuous feature.

4. The method according to any one of claims 1 to 3, It is characterized in that The method of using an aggregation function to determine a vector expression value of the continuous feature according to the N discretized probability values ​​and the N basis vector expression values ​​includes: The aggregation function is used to determine a vector expression value of the continuous feature according to the N discretized probability values ​​and the N basis vector expression values, wherein the aggregation function is Max-Pooling, Top-K-Sum or Weighted-Average.

5. The method according to any one of claims 1 to 3, It is characterized in that The method further comprises: Inputting user features and object features into a recommendation model or a search model to obtain prediction results; The user feature or the object feature includes the vector expression value; The user feature or the object feature uses the vector expression value to represent the continuous feature.

6. The method according to claim 5, It is characterized in that The method further comprises: Get actual results; The weight parameters of the discretization model are adjusted using a loss function according to the predicted results and the actual results.

7. The method according to any one of claims 1 to 3, It is characterized in that The value of N is greater than or equal to 20 and less than or equal to 100.

8. According to the method according to any one of claims 1 to 3, the continuous feature is feature data with continuous statistical feature values ​​in the sample data.

9. The method according to claim 8, It is characterized in that The continuous features include: age features, click volume features and score features in the recommendation system.

10. The method according to any one of claims 1 to 3, It is characterized in that The continuous features are normalized continuous features.

11. A data processing device, It is characterized in that The device is applied to the processing of image data, voice data or text data, and comprises: An acquisition module, used to acquire continuous features; A processing module, configured to discretize the continuous feature using a discretization model to obtain N discretized probability values ​​corresponding to the continuous feature, wherein N is an integer greater than 1; the N discretized probability values ​​correspond to preset N basis vector expression values; and determine a vector expression value of the continuous feature according to the N discretized probability values ​​and the N basis vector expression values ​​using an aggregation function; The processing module is specifically used to preset initial variables in the discretization model, where the initial variables are initial mapping domains; determine N corresponding mapping values ​​in the continuous features according to the initial variables; and calculate N discretization probability values ​​of the continuous features according to the mapping values.

12. The device according to claim 11, It is characterized in that The discretization model is a multi-classification neural network, an attention network or a linear mapping and softmax.

13. The device according to claim 12, It is characterized in that When the discretization model is a linear mapping and a softmax, the processing module is specifically used to preset the initialization linear mapping variable as: W logit =R 1×h , the initialized linear mapping variable is the initial variable; Determine N mapping values ​​corresponding to the continuous feature through a linear mapping formula, Wherein, the linear mapping formula is: logit =cont·W logit ; The probability value corresponding to each of the N mapping values ​​is calculated according to a discretization formula to obtain N probability values, wherein the discretization formula is: The N probability values ​​are used as the N discretized probability values; Among them, the W logit is used to indicate a linear mapping variable, the R is used to indicate a real number domain, the h is used to indicate the number of buckets after the continuous feature is discretized, the h is equal to the N, the cont logit It is used to indicate the expression of the continuous feature after linear mapping. k It is used to indicate the probability value of discretizing the continuous feature into the kth bucket. indicates the kth neuron output after the continuous feature linear mapping, the τ is used to indicate the temperature control coefficient of softmax, the Used to indicate the output of the i-th neuron after linear mapping of the continuous feature.

14. The device according to any one of claims 11 to 13, It is characterized in that The processing module is specifically used to use the aggregation function to determine a vector expression value corresponding to the continuous feature according to the N discretization probabilities and the N basis vector expression values, wherein the aggregation function is Max-Pooling, Top-K-Sum or Weighted-Average.

15. The device according to any one of claims 11 to 13, It is characterized in that The processing module is also used to input user features and object features into a recommendation model or a search model to obtain a prediction result; the user features or the object features include the vector expression value; the user features or the object features use the vector expression value to represent the continuous features.

16. The device according to claim 15, It is characterized in that The acquisition module is also used to obtain actual results; The processing module is also used to adjust the weight parameters of the discretization model using a loss function according to the prediction result and the actual result.

17. The device according to any one of claims 11 to 13, It is characterized in that The value of N is greater than or equal to 20 and less than or equal to 100.

18. The device according to any one of claims 11 to 13, wherein the continuous feature is feature data having continuous statistical feature values ​​in the sample data.

19. The device according to claim 18, It is characterized in that The continuous features include: age features, click volume features and score features in the recommendation system.

20. The device according to any one of claims 11 to 13, It is characterized in that The continuous features are normalized continuous features.

21. A data processing device, It is characterized in that The device comprises at least one processor and a memory, wherein the processor is coupled to the memory, and the processor calls instructions stored in the memory to control the data processing device to execute the method according to any one of claims 1 to 10.

22. A computer storage medium storing computer instructions for executing the method of any one of claims 1 to 10.

23. A computer program product comprising instructions, which, when executed on a computer, enables the computer to perform the method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Data discretization model training method and device, data discretization method, computer equipment and storage medium

    CN108509627A

  • Bayesian network learning method, intelligent device and storage device

    CN110222734A

  • Video pushing method and device based on discrete features and electronic equipment

    CN110300329A

  • Click rate prediction method and device based on deep migration network

    CN110738314A

  • Mobile app user gender identification method and system for optimizing data imbalance state

    CN111914927A

Cited By

  • Data processing method and apparatus

    WO2022116905A1