A neural network model data processing method and device for recommendation system
By weighted average processing of numerical feature data in the neural network model of the recommendation system and splicing it with category feature data, the embedding difference problem is solved, the model's personalized recommendation and generalization ability is improved, and the calculation is reduced Cost, solves the embedded differences and complexity problems in the prior art.
Patent Information
- Application Number
- CN202411239007.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-05
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2044-09-05
AI Technical Summary
When processing category and numerical feature data, the neural network model of the existing recommendation system has problems such as similar values but large embedding differences and large value differences but consistent embeddings, which leads to the inability to accurately capture the dynamic changes in user behavior, affecting the prediction performance. , and the AutoDis method is complex and has high computational cost.
By setting the window size k and weighted cardinality b, the weighting coefficients of the main bucket and adjacent buckets are calculated, the numerical feature data is normalized and bucketed, and the embedded values in the bucket are calculated by weighted average. And splice the embedded representations of category feature data and numeric feature data and input it into the neural network model.
It alleviates the problem of embedding differences, improves the model's understanding of users' personalized needs, generates more personalized and accurate recommendation results, reduces computing costs and hardware resource requirements, and improves the generalization ability and prediction accuracy of the model.
Smart Images

Figure CN118761825B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of electronic data processing, and in particular relates to a method and device for processing neural network model data of a recommendation system. Background Art
[0002] The neural network model of the recommendation system is a technology that has been applied in the field of recommendation systems in recent years. It uses the feature extraction and learning capabilities of the neural network model to learn the complex relationship between users and items from multi-dimensional data such as user historical behavior and item attributes, thereby providing users with personalized and accurate recommendations. The e-commerce recommendation neural network model is one of the most widely studied and applied in the field of recommendation systems. It is an important tool for e-commerce platforms to improve user experience and increase sales. This type of model simulates the working principle of human brain neurons, conducts in-depth learning and analysis of a large amount of user behavior data and product information, and thus provides users with personalized product recommendations.
[0003] In deep neural networks, embedding methods are often used to represent data. For categorical feature data, such as user and product attribute information in e-commerce recommendation systems, a low-dimensional dense vector is generally assigned to it through a hashing method, usually called "embedding", and then the parameters are updated through a learning method based on gradient descent. For numerical feature data, such as the associated feature information of users and products in e-commerce recommendation systems, it is often discretized by bucketing and then assigned a low-dimensional dense vector. However, there are two problems with this data processing method: one is that the values are similar but the embeddings are very different, namely SBD (Similar value But Dissimilar embedding). These division methods may divide similar values into different groups, resulting in very different final embedding representations, such as some boundary values; the other is that the values are very different but the embeddings are consistent, namely DBS (Dissimilar value But Sameembedding). The same bucket may contain two very different values, but they are grouped together. For example, the boundary values in the same bucket may have very different values on both sides, but because they are in the same bucket, the corresponding embedding representations are the same in the end. This difference makes it impossible for models to accurately capture these semantic similarities in machine learning tasks. For example, the neural network model applied to the recommendation system cannot accurately capture the dynamic changes between user behaviors, thus affecting the performance of model prediction and evaluation.
[0004] The latest AutoDis method adopts the meta-learning approach to solve the SBD and DBS problems. In summary, the meta-learning approach first defines a set of Meta-Embeddings for the numerical features of each field. Next, a neural network is used to automatically discretize the feature values of each field and assign them to different Meta-Embeddings buckets. Therefore, the feature values of each field may be assigned to one bucket or multiple buckets. Finally, a neural network is used to learn the weights of multiple bucket embeddings, and the embedding results of multiple buckets are aggregated according to the weights to obtain the embedding of the final continuous feature value. Among them, there are three ways of aggregation: 1. Maximum pooling: select the Meta-Embeddings bucket with the highest probability value as the final embedding representation of the feature value; 2. Top-K summation: select the top-k embeddings with the highest probability and sum them; 3. Weighted average: obtained by weighted average using probability logical values. However, AutoDis needs to use neural networks to learn the weights of multiple buckets. Therefore, its data processing process is relatively complicated. In recommendation systems, especially e-commerce recommendation systems with huge amounts of data, complex data processing requires higher hardware resources and increases computing costs, which in turn affects the response speed of the recommendation system.
[0005] Therefore, there is an urgent need to improve the existing technology and find a simple and reliable neural network model data processing method for recommendation systems. Summary of the invention
[0006] In order to overcome the deficiencies of the prior art, the present invention proposes a neural network model data processing method and device for a recommendation system.
[0007] In order to achieve the above-mentioned purpose, the data processing method and device of the neural network model of the recommendation system of the present invention adopt the following technical solutions:
[0008] In a first aspect, a method for processing neural network model data of a recommendation system is provided, the method comprising:
[0009] S1: Obtain recommendation candidate feature data, which includes categorical feature data and numerical feature data, wherein the categorical feature data includes user ID, product ID, category ID, brand ID and user behavior type; the numerical feature data includes user portrait features and product portrait features;
[0010] S2: For categorical feature data, its embedding representation is obtained by looking up the table;
[0011] S3: For numerical feature data, set the window size k and the weighted cardinality b, and calculate the weighted coefficient m of the main bucket and the weighted coefficient p of the adjacent bucket according to the window size k and the weighted cardinality b;
[0012] S4: normalize and bucket the numerical feature data to obtain the values in the buckets;
[0013] S5: For the value in the bucket, calculate the weighted average of the embedding vector of the main bucket where the bucket is located and the embedding vectors of k left and k right buckets adjacent to the main bucket whose number is the window size, and obtain the embedding representation of the value in the bucket;
[0014] S6: concatenate the embedding representation of the categorical feature data obtained in S2 and the embedding representation of the numerical feature data obtained in S5 to obtain a complete embedding representation of the candidate feature data;
[0015] S7: Output the complete embedding representation to the neural network model of the recommendation system.
[0016] Furthermore, after step S7, step S8 is also included, which processes through a neural network model to output the current user's interest score for the product, and sorts the products in descending order according to the interest score of the products to form a recommended product list for the current user.
[0017] Further, in step S3, , let i traverse from 1 to k-1, , , Indicates that Perform sum calculation.
[0018] Furthermore, the bucketing process in step S4 adopts equidistant bucketing.
[0019] Furthermore, for the value in the bucket, the embedding vector of the main bucket is recorded as embedding_table[n], where n is the bucket subscript. The specific calculation process of the embedding representation of the value in the bucket is as follows:
[0020] Step S51: Calculate the weighted embedding of the main bucket: ;
[0021] Step S52: Calculate the weighted embedding of the left and right buckets: Let i traverse from 1 to k and calculate the weighted embedding of the left bucket respectively. and right bucket ;
[0022] Step S53: Add the weighted embedding of the main bucket and the weighted embeddings of the left and right buckets to obtain the embedding representation of the value in the bucket.
[0023] In a second aspect, the present invention also includes a neural network model data processing device for a recommendation system, comprising:
[0024] A data acquisition module is used to acquire feature data of recommendation candidates, wherein the feature data includes categorical feature data and numerical feature data, wherein the categorical feature data includes user ID, product ID, category ID, brand ID and user behavior type data; and the numerical data includes user portrait feature data and product portrait feature data;
[0025] The categorical feature data processing module is used to obtain the embedding representation of the categorical feature data through a lookup table;
[0026] The numerical feature data processing module is used to obtain the embedding representation of the numerical feature data, including a parameter setting submodule, which is used to set the window size k and the weighted cardinality b, and calculate the weight coefficient m of the main bucket and the weight coefficient p of the adjacent bucket according to the window size k and the weighted cardinality b; a data processing submodule, which is used to normalize and bucket the numerical features to obtain the values in the buckets; and a calculation submodule, which is used to calculate the embedded value. For the values in the buckets, the weighted average of the embedding vector of the main bucket where the bucket is located and the embedding vectors of k left and k right buckets adjacent to the main bucket whose number is the window size is calculated to obtain the embedding representation of the values in the buckets.
[0027] Splicing module: Splicing the embedding representations obtained by the categorical feature data processing module and the numerical feature data processing module respectively to obtain a complete embedding representation of the candidate feature data, and inputting the complete embedding representation into the neural network model of the recommendation system.
[0028] Neural network model input module: used to input the complete embedding representation into the neural network model of the recommendation system.
[0029] Neural network model output module: used to output the current user's interest score for the product processed by the neural network model, and sort the products from high to low according to the interest score of the products to form a list of recommended products for the current user.
[0030] Furthermore, the parameter setting submodule is specifically used to: , let i traverse from 1 to k-1, , , Indicates that Perform sum calculation.
[0031] Furthermore, the bucketing process in the data processing submodule adopts equidistant bucketing.
[0032] Furthermore, the calculation submodule is used to calculate the embedded value:
[0033] For the value in the bucket, the embedding vector of the main bucket is recorded as embedding_table[n]. The specific calculation process of the embedding representation of the value in the bucket is as follows:
[0034] Calculate the weighted embedding of the main bucket: ;
[0035] Calculate the weighted embedding of the left and right buckets: Let i traverse from 1 to k and calculate the weighted embedding of the left bucket respectively. and right bucket ;
[0036] Add the weighted embedding of the main bucket and the weighted embeddings of the left and right buckets to get the embedding representation of the value in the bucket.
[0037] Compared with the method for processing feature data of the recommendation system in the prior art, the present invention processes the categorical feature data and the numerical feature data in different ways before inputting the data into the neural network model. For the processing of numerical feature data, the weighted average of the embeddings of the adjacent buckets and the current bucket is used as the embedding representation of the numerical feature data, and then spliced with the embedding of the categorical feature data, and then input into the neural network model, which alleviates the SBD problem, so that the neural network model can better understand the personalized needs of users in subsequent processing, and then generate more personalized and accurate recommendation results; in addition, the learning of the adjacent bucket embedding can be enhanced, and the numerical feature data that has not been seen by the model can be better represented during prediction, and the generalization ability of the model can be improved to improve the applicability of the model in different application scenarios. Compared with AutoDis, the data processing method of the present invention is simpler, and there is no need to learn the weights of each bucket through a neural network, which can alleviate the SBD problem, so that the neural network model can improve the accuracy of prediction and the generalization ability of the model when performing subsequent data processing, saving the hardware resources and computing costs required for computer data processing. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 A flowchart of a neural network model data processing method for a recommendation system in the present invention;
[0039] Figure 2 A process for processing data using a neural network model of a recommendation system according to the present invention;
[0040] Figure 3 It is a module diagram of the neural network model data processing device of the recommendation system in the present invention;
[0041] Figure 4 The figure is a schematic diagram of the hardware structure of an electronic device for executing the neural network model data processing method of the recommendation system in the present invention. DETAILED DESCRIPTION
[0042] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.
[0043] The specific implementation of the present invention is further described in detail below in conjunction with the accompanying drawings and examples. It should be noted that the illustrations provided in the present embodiment are only schematic illustrations of the basic concept of the present invention, and the illustrations only show the components related to the present invention rather than the number, shape and size of the components in the actual implementation. The type, quantity and proportion of each component in the actual implementation can be changed at will, and the component layout type may also be more complicated. The following examples are used to illustrate the present invention, but are not intended to limit the scope of the present invention.
[0044] refer to Figure 1 This embodiment proposes a neural network model data processing method for a recommendation system. Specifically, this method includes the following steps:
[0045] Step S1: Acquire feature data of recommendation candidates, wherein the feature data includes categorical feature data and numerical feature data, wherein the categorical feature data includes user ID, product ID, category ID, brand ID and user behavior type; and the numerical feature data includes user portrait features and product portrait features;
[0046] Step S2: For the categorical feature data, obtain its embedding representation by looking up the table;
[0047] Step S3: for the numerical feature data, set a window size k and a weighted cardinality b, and calculate a weighted coefficient m of a main bucket and a weighted coefficient p of an adjacent bucket according to the window size k and the weighted cardinality b;
[0048] Let p[0] = b, let i traverse from 1 to k-1, , ,Should ) indicates the summation calculation for p[i].
[0049] For example, if k=2, b=0.2, then we can calculate . It is concluded that the weight coefficient m of the main bucket is 0.4, and the weight coefficients p of the adjacent buckets are 0.2 and 0.1 respectively.
[0050] Step S4: normalize and bucket the numerical feature data to obtain the values in the buckets;
[0051] Numerical features are also called continuous features. Their data is floating point. The purpose of normalizing numerical features is to solve the problem of gradient descent convergence speed. Bucketing is to ensure that features with large numerical differences are not placed in the same bucket as much as possible. First, normalization is performed. Common numerical feature distribution laws include Poisson distribution, normal distribution, Bernoulli distribution, uniform distribution, etc. The following takes the common power law distribution and uniform distribution as examples for data processing.
[0052] For numerical features of power-law distribution, y=max(0,min(ln(1+x), LN_MAX)) / LN_MAX is used for normalization. LN_MAX is determined according to the magnitude of the maximum value of the statistical numerical feature. For example, if the maximum value of the numerical feature is within 10 million, LN_MAX = 16 can be used, because ln(1e7) = 16.11. If the current feature x=20000, the transformed value is: y = max(0,min(ln(1+20000),16)) / 16 = 0.619.
[0053] For uniformly distributed data, the maximum and minimum normalization is adopted: y = (x - MIN) / (MAX - MIN), where MAX and MIN are the maximum and minimum values of the numerical feature, respectively. For example, the maximum value of the numerical feature is 9, the minimum value is 1, and the current value is 3, then y = (3 - 1) / (9 - 1) = 0.25.
[0054] After normalization, the range of the numerical feature has been transformed to between 0 and 1. The buckets are divided equally at intervals of 0.01, so 0.619 and 0.25 become 62 and 26 respectively. Of course, other values can be selected for the bucket interval here, and the above is only an illustrative example.
[0055] Step S5: Calculate the embedding value. Each bucket has a corresponding embedding vector. The embedding vectors form the embedding_table. For the value in the bucket, find the bucket subscript n and the nearest 2k buckets on the left and right. Then calculate the weighted average of the embeddings of these buckets as the embedding representation of the value, that is, the embedding representation. The specific calculation is as follows:
[0056] Calculate the weighted embedding of the main bucket: embedding_main = m × embedding_table[n]
[0057] Then calculate the weighted embeddings of the 2k nearest adjacent buckets on the left and right respectively, let i traverse from 1 to k-1, and calculate the embeddings of the left bucket and the right bucket respectively, that is:
[0058] ;
[0059] ;
[0060] Add the weighted embedding of the main bucket and the weighted embedding of the left and right buckets to get the embedding representation of the value in the bucket, that is, out_embedding.
[0061] For example, for a feature value of 0.25, its bucket number is 26, and its corresponding feature vector is embedding_table
[26] , but the final vector used to represent this feature is out_embedding = 0.1× embedding_table
[24] +0.2× embedding_table
[25] + 0.4× embedding_table
[26] + 0.2× embedding_table
[27] + 0.1× embedding_table
[28] .
[0062] After calculating the embedding representation of the numerical feature data, the categorical feature data and the numerical feature data are concatenated, wherein the embedding representation of the categorical feature data is obtained through a lookup table, and the embedding representation of the categorical feature data and the embedding representation of the numerical feature data are concatenated as the input of the neural network model.
[0063] Step S6, concatenating the embedding representation of the categorical feature data obtained in S2 and the embedding representation of the numerical feature data obtained in S5 to obtain a complete embedding representation of the candidate feature data of the recommendation system.
[0064] Step S7, input the complete embedding representation of the candidate feature data into the neural network model of the recommendation system.
[0065] Step S8, outputting the current user's interest score for the product through neural network model processing, and sorting the products from high to low according to the interest score of the products to form a recommended product list for the current user.
[0066] Specifically, by optimizing the embedding processing of numerical feature data, the embedding representations of all categorical feature data and numerical feature data are finally concatenated together and then input into the neural network model. The core idea of this processing of numerical feature data is: by taking the weighted average of the embeddings of adjacent buckets as the embedding representation of the numerical feature, features with similar values but different buckets can be mapped to similar embedding spaces, alleviating the SBD problem and improving the performance of the neural network. This provides an effective solution for the embedding processing of numerical feature data in deep neural networks, thereby enabling the neural network model of the recommendation system to have better generalization ability and prediction accuracy. Exemplarily, the candidate feature data obtained include various attribute features of users and commodities, such as user ID, user behavior and user portrait features, as well as commodity ID, category ID, brand ID and commodity portrait features, etc., which are input into the neural network model after embedding processing. Exemplarily, the neural network model in the embodiment of the present invention can adopt DNN, DeepFM or DCN, etc., through the processing of the neural network model, that is, output the current user's interest score for the commodity, and rank the commodities with high scores in a more forward position when recommending to the corresponding users, so as to realize personalized and accurate commodity recommendation. In the embodiment of the present invention, the candidate feature data obtained can be the feature data of the current user and commodity obtained after the user clicks the tag, that is, the recommendation list is output after inference of the user and the commodity, or it can be the sample data used for model training as the candidate feature data. The method of data processing is the same and will not be repeated here.
[0067] Exemplarily, in the prior art, sample data of an e-commerce recommendation system is input into a neural network. For users and candidate products, categorical feature data include but are not limited to the user's gender, age, historical click sequence, etc., the product category, brand, category, label, etc., and continuous features include but are not limited to the user's historical click rate and historical conversion rate of candidate products, product portrait feature data such as product price and sales volume, etc. In the sorting model of the e-commerce recommendation system, the numerical feature data in the sample data is bucketed to obtain the bucket ID to which each feature data belongs, and then the bucket is directly embedded to obtain the embedding representation of the numerical value in the corresponding bucket. The embedding representations from the categorical feature data and the numerical feature data are then concatenated (embedding concat) and input into a deep neural network (DNN), and the binary cross entropy loss function and related indicators are used for calculation to evaluate and optimize the performance of the model.
[0068] For example, for the eigenvalue 0.619, its bucket ID is 62, and its corresponding eigenvector is embedding_table
[62] . Figure 2 , the data processing method of the present invention is used in the e-commerce recommendation ranking model. For numerical feature data, if the window size k is set to 2 and the weighted cardinality b is 0.2, the current feature bucket ID in the numerical feature in the sample data, i.e. 62, is obtained, and the 2 left and 2 right adjacent feature bucket IDs are obtained for embedding processing. The final embedding representation of the current feature bucket is obtained by weighted summation: out_embedding = 0.1× embedding_table
[60] +0.2× embedding_table
[61] + 0.4× embedding_table
[62] + 0.2× embedding_table
[63] + 0.1× embedding_table
[64] . Compared with the basic ranking model that does not use this data processing method but directly buckets the numerical feature data and converts it into embedding, the effect comparison before and after is shown in the following table:
[0069]
[0070] AUC (Area Under Curve) in the table refers to the area under the receiver operating characteristic curve. When AUC is used as an evaluation indicator for the e-commerce recommendation ranking model, its value represents the ability of the ranking model to distinguish between positive samples (i.e., products that users may be interested in) and negative samples (i.e., products that users are unlikely to be interested in). Specifically, the larger the AUC value, the stronger the model's ability to distinguish between positive and negative samples, which means that the model can more accurately predict products that users may be interested in and rank them at the front of the recommendation list. In order to further evaluate the overall performance of the model under different users, the embodiment of the present invention also uses the UAUC (Average AUC) indicator, whose value represents the average value of AUC under different users. Specifically, the larger the UAUC value, the higher the average value of AUC under different users, which means that the model can more accurately predict products that different users may be interested in and rank them at the front. It can be seen from the table that in the ranking model of the e-commerce recommendation system that adopts the data processing method of the neural network model of the recommendation system of the present invention, the values of AUC and UAUC are improved compared with the basic ranking model, which shows that the use of the data processing method of the present invention to process the input data of the neural network model can improve the generalization ability of the model and reduce the complexity of the operation, and its personalized and accurate recommendation results can provide a satisfactory list of recommended products for the overall users and different users, promote the conversion rate, and thus improve the overall benefits of the e-commerce platform.
[0071] Through the description of the above method embodiments, the technicians in the relevant field can clearly understand that the present invention can be implemented by means of software plus the necessary general hardware platform, and of course it can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium and includes a number of instructions for 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 invention. The aforementioned storage medium includes: various media that can store program codes, such as read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk.
[0072] Corresponding to the embodiment of the method for processing neural network model data of a recommendation system provided by the present invention, the present invention also provides a device for processing neural network model data of a recommendation system.
[0073] See also Figure 3 , is a schematic diagram of the structure of a neural network model data processing device for a recommendation system provided by an embodiment of the present invention, the device comprising:
[0074] The data acquisition module 21 is used to acquire the feature data of the recommendation candidates, the feature data includes categorical feature data and numerical feature data, the categorical feature data includes user ID, product ID, category ID, brand ID and user behavior type data; the numerical data includes user portrait feature data and product portrait feature data;
[0075] A categorical feature data processing module 22, used to obtain an embedding representation of the categorical feature data through a lookup table, wherein the embedding refers to embedding;
[0076] The numerical feature data processing module 23 is used to obtain the embedding representation of the numerical feature data, including: a parameter setting submodule, which is used to set the window size k and the weighted cardinality b, and calculate the weight coefficient m of the main bucket and the weight coefficient p of the adjacent bucket according to the window size k and the weighted cardinality b; a data processing submodule, which is used to normalize and bucket the numerical feature data to obtain the values in the buckets; a calculation submodule, which is used to calculate the embedding value, each bucket has a corresponding embedding vector, and the embedding vectors constitute an embedding_table. For the value in the bucket, find the bucket subscript n and the nearest 2k adjacent buckets on the left and right, and then calculate the weighted average of the embeddings of these buckets as the embedding representation of the value, which is represented by out_embedding;
[0077] Splicing module 24: splicing the embedding representations obtained by the categorical feature data processing module and the numerical feature data processing module respectively to obtain a complete embedding representation of the candidate feature data;
[0078] Neural network model input module 25: used to input the complete embedding representation of the candidate feature data into the neural network model of the recommendation system;
[0079] The neural network model output module 26 is used to output the user's interest score for the product processed by the neural network model, and sort the products from high to low according to the interest score of the products to form a recommended product list for the current user.
[0080] In an exemplary embodiment, the parameter setting submodule is specifically used to: let p[0]=b, let i traverse from 1 to k-1, p[i]=p[i-1]×0.5, m=1-2×sum(p[i]), sum(p[i]) represents the sum calculation for p[i].
[0081] In an exemplary embodiment, the data processing submodule adopts equidistant bucketing.
[0082] In an exemplary embodiment, the calculation submodule is used to calculate the embedded value:
[0083] For the value in the bucket, the embedding vector of the main bucket is recorded as embedding_table[n]. The specific calculation process of the embedding representation of the value in the bucket is as follows:
[0084] (1) Calculate the weighted embedding of the main bucket: embedding_main=m×embedding_table[n]
[0085] (2) Calculate the weighted embedding of the left and right buckets: Let i traverse from 1 to k, and calculate the embedding_left[i-1]=p[i-1]×embedding_table[ni] of the left bucket and the embedding_right[i-1]=p[i-1]×embedding_table[n+i] of the right bucket respectively;
[0086] (3) Add the weighted embedding of the main bucket and the weighted embeddings of the left and right buckets to obtain the embedding representation of the value in the bucket.
[0087] The device embodiments described above are merely illustrative, wherein 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 may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0088] Figure 4 is a schematic diagram of the hardware structure of an electronic device for executing a neural network model data processing method for a recommendation system provided by an embodiment of the present invention, such as Figure 4 As shown, the device includes:
[0089] One or more processors 310 and memory 320, Figure 4 A processor 310 is taken as an example.
[0090] The device for executing the neural network model data processing method of the recommendation system may further include: an input device 330 and an output device 340 .
[0091] The processor 310, the memory 320, the input device 330 and the output device 340 may be connected via a bus or other means. Figure 4 The example of connecting through bus is taken in the following.
[0092] The memory 320 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as program instructions / modules corresponding to the neural network model data processing method of the recommendation system in the embodiment of the present invention (for example, the attached Figure 3 The processor 310 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions and modules stored in the memory 320, that is, the neural network model data processing method of the recommendation system of the above method embodiment is implemented.
[0093] The memory 320 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created according to the use of the neural network model data processing device of the recommendation system, etc. In addition, the memory 320 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 320 may optionally include a memory remotely arranged relative to the processor 310, and these remote memories may be connected to the neural network model data processing device of the recommendation system via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0094] The input device 330 can receive input digital or character information and generate key signal input related to parameter setting and function control of the device for embedding the numerical features of the neural network. The output device 340 can include display devices such as a display screen.
[0095] The one or more modules are stored in the memory 320, and when executed by the one or more processors 310, the embedding method of the neural network numerical feature in any of the above method embodiments is executed.
[0096] The above product can execute the method provided by the embodiment of the present invention, and has the functional modules and beneficial effects corresponding to the execution method. For technical details not described in detail in this embodiment, please refer to the method provided by the embodiment of the present invention.
[0097] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0098] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0099] The above description is only a specific embodiment of the present invention, so that those skilled in the art can understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but should conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A neural network model data processing method for a recommendation system, characterized in that: The method comprises the following steps: S1: Acquire feature data of recommendation candidates, wherein the feature data includes categorical feature data and numerical feature data; S2: for the categorical feature data, obtaining an embedding representation of the categorical feature data by looking up a table, wherein the embedding refers to embedding; S3: For the numerical feature data, set a window size k and a weighted cardinality b, and calculate a weighted coefficient m of a main bucket and a weighted coefficient p of an adjacent bucket according to the window size k and the weighted cardinality b; S4: normalize and bucket the numerical feature data to obtain the values in the buckets; S5: For the value in the bucket, calculate the weighted average of the embedding vector of the main bucket where the bucket is located and the embedding vectors of k left and k right buckets adjacent to the main bucket whose number is the window size, and obtain the embedding representation of the value in the bucket; S6: concatenate the embedding representation of the categorical feature data obtained in S2 and the embedding representation of the numerical feature data obtained in S5 to obtain a complete embedding representation of the recommendation candidate feature data; S7: Input the complete embedding representation of the recommendation candidate feature data into the neural network model of the recommendation system.
2. The neural network model data processing method of the recommendation system according to claim 1, characterized in that: In S3, the weighting coefficient m and the weighting coefficient p are specifically: , let i traverse from 1 to k-1, , , Indicates that Perform sum calculation.
3. The neural network model data processing method of the recommendation system according to claim 1, characterized in that: In S4, the bucketing process adopts equidistant bucketing.
4. The neural network model data processing method of the recommendation system according to claim 1, characterized in that: S5 also includes that, for the value in the bucket, the embedding vector of the main bucket in which it is located is recorded as embedding_table[n], where n is the bucket subscript, and the specific calculation process of the embedding representation of the value in the bucket is as follows: S51: Calculate the weighted embedding of the main bucket: ; S52: Calculate the weighted embedding of the left and right buckets: Let i traverse from 1 to k and calculate the weighted embedding of the left bucket respectively. and right bucket ; S53: Add the weighted embedding of the main bucket and the weighted embeddings of the left and right buckets to obtain an embedding representation of the value in the bucket.
5. The neural network model data processing method of the recommendation system according to claim 1, characterized in that: The categorical feature data includes user ID, product ID, category ID, brand ID and user behavior type; the numerical feature data includes user portrait features and product portrait features.
6. The neural network model data processing method of the recommendation system according to claim 5, characterized in that: After S7, the method further includes: S8: Output the current user's interest score for the product through neural network model processing, and sort the products from high to low according to their interest score to form a recommended product list for the current user.
7. A neural network model data processing device for a recommendation system, characterized in that: include: A data acquisition module is used to acquire feature data of recommendation candidates, wherein the feature data includes categorical feature data and numerical feature data; A categorical feature data processing module, used to obtain an embedding representation of the categorical feature data through a lookup table, wherein the embedding refers to embedding; A numerical feature data processing module, used to obtain the embedding representation of the numerical feature data, including a parameter setting submodule, used to set the window size k and the weighted cardinality b, and calculate the weight coefficient m of the main bucket and the weight coefficient p of the adjacent bucket according to the window size k and the weighted cardinality b; a data processing submodule, used to normalize and bucket the numerical feature data to obtain the values in the buckets; a calculation submodule, used to calculate the embedded value, for the values in the buckets, calculate the weighted average of the embedding vector of the main bucket where the bucket is located and the embedding vectors of k left and K right buckets adjacent to the main bucket with the window size, and obtain the embedding representation of the values in the buckets; Splicing module: splicing the embedding representations obtained by the categorical feature data processing module and the numerical feature data processing module respectively to obtain a complete embedding representation of the recommended candidate feature data; Neural network model input module: used to input the complete embedding representation of the recommendation candidate feature data into the neural network model of the recommendation system; Neural network model output module: used to output the current user's interest score for the product processed by the neural network model, and sort the products from high to low according to the interest score of the products to form a list of recommended products for the current user.
8. The neural network model data processing device of the recommendation system according to claim 7, characterized in that: The parameter setting submodule is specifically used to: , let i traverse from 1 to k-1, , , Indicates that Perform sum calculation.
9. The neural network model data processing device of the recommendation system according to claim 7, characterized in that: The bucketing process in the data processing submodule adopts equidistant bucketing.
10. The neural network model data processing device of the recommendation system according to claim 7, characterized in that: The calculation submodule is used to calculate the embedded value: For the value in the bucket, the embedding vector of the main bucket is recorded as embedding_table[n], where n is the bucket subscript. The specific calculation process of the embedding representation of the value in the bucket is as follows: Calculate the weighted embedding of the main bucket: ; Calculate the weighted embedding of the left and right buckets: Let i traverse from 1 to k and calculate the weighted embedding of the left bucket respectively. and right bucket ; Add the weighted embedding of the main bucket and the weighted embeddings of the left and right buckets to get the embedding representation of the value in the bucket.
