Information recommendation method and apparatus based on embedding table compression, device, and medium

By generating a similarity index matrix and a replacement feature map dictionary, the problem of low compression efficiency of recommendation models in the prior art is solved, efficient embedded table compression is achieved, and storage overhead is reduced and inference speed is improved.

WO2025007461A1PCT designated stage expired Publication Date: 2025-01-09ZHEJIANG LAB
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/128561
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-07-03
Filing Date
2023-10-31
Publication Date
2025-01-09

AI Technical Summary

Technical Problem

The existing recommended model compression method is difficult to effectively improve compression efficiency while ensuring model accuracy, resulting in a decrease in storage pressure and operating speed.

Method used

By determining the characteristics to be compressed and non-compressed characteristics based on the preset compression ratio, generating a similarity index matrix and index dictionary, replacing the feature map dictionary, and then compressing the embedded table of the recommended model to ensure that the model accuracy does not decrease.

Benefits of technology

Without affecting the accuracy of the model, it greatly reduces storage overhead and improves model inference speed, and improves the compression efficiency of embedded tables.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023128561_09012025_PF_FP_ABST
    Figure CN2023128561_09012025_PF_FP_ABST
Patent Text Reader

Abstract

An information recommendation method and apparatus based on embedding table compression, a device, and a medium. The method comprises: on the basis of a preset compression ratio, determining a feature to be compressed and a non-compressed feature in an embedding table to be compressed of a recommendation model; generating a similarity index matrix on the basis of the similarity between the feature to be compressed and the non-compressed feature; generating an index dictionary on the basis of the similarity index matrix; replacing a first feature mapping dictionary on the basis of the index dictionary, and generating a second feature mapping dictionary; and acquiring data to be recommended, replacing a feature in said data on the basis of the second feature mapping dictionary, inputting the replaced feature into the recommendation model, and outputting a prediction result.
Need to check novelty before this filing date? Find Prior Art

Description

Information recommendation method, device, equipment and medium based on embedded table compression

[0001] Related applications

[0002] This application claims priority to Chinese patent application number 202310805640.9, filed on July 3, 2023, entitled “Information recommendation method, device, apparatus and medium based on embedded table compression,” the entire text of which is hereby incorporated by reference. Technical Field

[0003] The present application relates to the field of machine learning, and in particular to an information recommendation method, apparatus, device, and medium based on embedded table compression. Background Art

[0004] As a technical means to help users find information of interest from massive amounts of information, recommendation system has become an indispensable and important tool on the Internet.

[0005] With the explosive growth of users of various websites and the rapid increase in the types of items provided by suppliers, the storage pressure of recommendation systems is also increasing. How to reduce the storage pressure of recommendation systems has become an urgent problem that needs to be solved.

[0006] To reduce the storage pressure of recommendation models, model compression is a common approach. Related model compression methods can be broadly categorized into low-rank decomposition, quantization, pruning and distillation, and other methods for compressing the model embedding layer, as well as lightweight model structure design and encoding. In these methods, the functions used in the compression process are often restricted, requiring repeated loop operations, which in turn reduces the running speed and accuracy of the compressed recommendation model.

[0007] As for how to improve the compression efficiency of the model while ensuring the accuracy of the recommendation model in related technologies, no effective solution has been proposed so far.

[0008] Summary of the Invention

[0009] According to various embodiments of the present application, a method, apparatus, computer device, and storage medium for information recommendation based on embedded table compression are provided.

[0010] In a first aspect, the present application provides an information recommendation method based on embedded table compression. The method comprises:

[0011] Determine the features to be compressed and the features not to be compressed in the embedding table to be compressed of the recommendation model according to the preset compression ratio;

[0012] generating a similarity index matrix based on the similarity between the feature to be compressed and the non-compressed feature;

[0013] Generate an index dictionary based on the similarity index matrix;

[0014] Replacing the first feature mapping dictionary according to the index dictionary to generate a second feature mapping dictionary, wherein the first feature mapping dictionary is generated based on the data set;

[0015] The data to be recommended is obtained, features in the data to be recommended are replaced according to the second feature mapping dictionary, the replaced features are input into the recommendation model, and a prediction result is output.

[0016] In one embodiment, generating a similarity index matrix based on the similarity between the compressed features and the non-compressed features includes:

[0017] generating a similarity matrix based on the similarity between the feature to be compressed and the non-compressed feature;

[0018] Determining the numerical order of matrix elements in each row of the similarity matrix;

[0019] A similarity index matrix is ​​generated according to the numerical order of the matrix elements.

[0020] In one embodiment, generating a similarity matrix based on the similarity between the feature to be compressed and the non-compressed feature includes:

[0021] Obtaining a first eigenvector of each of the features to be compressed and a second eigenvector of each of the non-compressed features;

[0022] A vector distance between each of the first eigenvectors and each of the second eigenvectors is obtained, and similarities between each of the compressed features and each of the non-compressed features are determined based on the vector distances to generate a similarity matrix.

[0023] In one embodiment, after generating the second feature mapping dictionary, the method further includes:

[0024] Updating the recommendation model based on the second feature mapping dictionary, and obtaining a current model accuracy of the recommendation model;

[0025] Obtaining an initial model accuracy of the recommended model, and determining a model accuracy change value of the recommended model based on the initial model accuracy and the current model accuracy;

[0026] Determine whether the model accuracy change value is not greater than a preset model accuracy degradation threshold; if so, save the second feature mapping dictionary.

[0027] In one embodiment, if the model accuracy change value is greater than a preset model accuracy drop threshold, the compression ratio is changed and the second feature mapping dictionary is reacquired until the model accuracy change value of the recommended model is no greater than the preset model accuracy threshold.

[0028] In one embodiment, the first feature mapping dictionary is generated based on the data set and includes:

[0029] Obtaining a data set, and collecting statistics on the attribute characteristics of the products in the data set;

[0030] Mask the attribute feature data in the data set to generate a first feature mapping dictionary.

[0031] In one embodiment, after generating the first feature mapping dictionary, the method further includes:

[0032] Determine the type of the recommended model, and divide the masked dataset into a training set, a validation set, and a test set;

[0033] The recommendation model is trained based on the training set and the validation set, and after the training is completed, the initial model accuracy of the recommendation model is obtained based on the test set.

[0034] In a second aspect, the present application further provides an information recommendation device based on embedded table compression, the device comprising:

[0035] An acquisition module is used to obtain features to be compressed and non-compressed features in a to-be-compressed embedding table of a recommendation model according to a preset compression ratio;

[0036] A compression module, configured to generate a similarity index matrix based on the similarity between the feature to be compressed and the non-compressed feature; and generate an index dictionary based on the similarity index matrix;

[0037] An indexing module, configured to replace a first feature mapping dictionary according to the index dictionary to generate a second feature mapping dictionary, wherein the first feature mapping dictionary is generated based on a data set;

[0038] The prediction module is used to obtain the data to be recommended, replace the features in the data to be recommended according to the second feature mapping dictionary, input the replaced features into the recommendation model, and output a prediction result.

[0039] In a third aspect, the present application further provides a computer device. The computer device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are performed:

[0040] Determine the features to be compressed and the features not to be compressed in the embedding table to be compressed of the recommendation model according to the preset compression ratio;

[0041] generating a similarity index matrix based on the similarity between the feature to be compressed and the non-compressed feature;

[0042] Generate an index dictionary based on the similarity index matrix;

[0043] Replacing the first feature mapping dictionary according to the index dictionary to generate a second feature mapping dictionary, wherein the first feature mapping dictionary is generated based on the data set;

[0044] The data to be recommended is obtained, features in the data to be recommended are replaced according to the second feature mapping dictionary, the replaced features are input into the recommendation model, and a prediction result is output.

[0045] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the following steps:

[0046] Determine the features to be compressed and the features not to be compressed in the embedding table to be compressed of the recommendation model according to the preset compression ratio;

[0047] generating a similarity index matrix based on the similarity between the feature to be compressed and the non-compressed feature;

[0048] Generate an index dictionary based on the similarity index matrix;

[0049] Replacing the first feature mapping dictionary according to the index dictionary to generate a second feature mapping dictionary, wherein the first feature mapping dictionary is generated based on the data set;

[0050] The data to be recommended is obtained, features in the data to be recommended are replaced according to the second feature mapping dictionary, the replaced features are input into the recommendation model, and a prediction result is output.

[0051] The details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0052] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0053] FIG1 is a diagram showing an application environment of an information recommendation method based on embedded table compression in one embodiment.

[0054] FIG2 is a flow chart of an information recommendation method based on embedded table compression in one embodiment.

[0055] FIG3 is a schematic diagram of an embedded table lookup process in the related art.

[0056] FIG4 is a flow chart of an information recommendation method based on embedded table compression in an optional embodiment.

[0057] FIG5 is a comparison diagram of the compression effect of the recommended model on a real data set after compression in an exemplary embodiment.

[0058] FIG6 is a schematic diagram of the structure of an information recommendation device based on embedded table compression in one embodiment.

[0059] FIG7 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0060] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0061] Recommendation models contain numerous tables, each of which can contain tens of millions of 16- to 300-dimensional embedding vectors, reaching 10 TB in size. Over 99% of memory is used to store these embedding tables. Furthermore, embedding tables play a crucial role in large models like natural language processing (NLP) and graph representation learning. Therefore, it is crucial to explore efficient compression methods that maintain the accuracy of model recommendations.

[0062] The present embodiment provides an information recommendation method based on embedded table compression, which can be applied in the application environment shown in Figure 1. A terminal 102 communicates with a server 104 via a network. A data storage system can store data that the server 104 needs to process. The data storage system can be integrated with the server 104, or it can be located in the cloud or on another network server. Specifically, after receiving the data set uploaded by the terminal 102, the server 104 can determine the features to be compressed and the uncompressed features in the embedded table to be compressed of the recommendation model based on a preset compression ratio. Based on the similarity between the features to be compressed and the uncompressed features, a similarity index matrix is ​​generated. An index dictionary is then generated based on the similarity index matrix. A first feature mapping dictionary is replaced with the index dictionary to generate a second feature mapping dictionary, where the first feature mapping dictionary is generated based on the data set. Finally, data to be recommended is obtained, and features in the data to be recommended are replaced with the second feature mapping dictionary. The replaced features are input into the recommendation model, and a prediction result is output. The terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablet computers, etc. The server 104 can be implemented as a standalone server or a server cluster consisting of multiple servers.

[0063] FIG2 is a flow chart of an information recommendation method based on embedded table compression in one embodiment. As shown in FIG2 , the method includes the following steps:

[0064] S201, determining features to be compressed and non-compressed features in a to-be-compressed embedding table of a recommendation model according to a preset compression ratio.

[0065] The preset compression ratio is a percentage point data predetermined by professionals and is not fixed and can be further adjusted based on the accuracy of the recommended model. Furthermore, the preset compression ratio can be used to determine the boundary between the features to be compressed and the features not to be compressed in the corresponding embedding table, thereby determining the features to be compressed and the features not to be compressed in the embedding table.

[0066] The embedding table to be compressed is a data table stored in the embedding layer of the recommendation model. Specifically, a corresponding embedding table to be compressed can be established for each attribute of the product or each behavioral attribute of the user. For example, corresponding embedding tables to be compressed are established for the attributes of the product such as color, price, shape, and origin, namely the color embedding table, price embedding table, shape embedding table, and origin embedding table. Assuming that there are 5 rows of data in the color embedding table, each row of data can represent a color feature category. The number of rows in the color embedding table is the number of color feature categories, and the columns of the color embedding table are represented as the vector dimension T_N of the embedding table. Generally, the vector dimension T_N of the embedding table can be 8, 16, 32, 64, or a power of 2.

[0067] In an optional exemplary embodiment, if the current preset compression ratio is 40%, for a 5-row embedded table to be compressed, the first 2 rows in the table are non-compressed features, and the last 3 rows are features to be compressed.

[0068] Optionally, in this embodiment of the present application, a category number threshold for the embedded table to be compressed is also required. If the category number of the embedded table to be compressed is not greater than the category number threshold, the embedded table to be compressed does not need to be compressed. For example, if the color embedding table contains only three color feature categories and the category number threshold for the embedding table is exactly three, then the color embedding table does not need to be compressed.

[0069] S202: Generate a similarity index matrix based on the similarity between the feature to be compressed and the non-compressed feature.

[0070] In one embodiment, generating a similarity index matrix based on the similarity between the compressed feature and the uncompressed feature includes: generating a similarity matrix based on the similarity between the feature to be compressed and the uncompressed feature, determining the numerical order of the matrix elements in each row of the similarity matrix, and generating a similarity index matrix according to the numerical order of the matrix elements.

[0071] In one embodiment, generating a similarity matrix based on the similarity between the features to be compressed and the non-compressed features includes: obtaining a first eigenvector of each of the features to be compressed and a second eigenvector of each of the non-compressed features; obtaining a vector distance between each of the first eigenvectors and each of the second eigenvectors, determining the similarity between each of the compressed features and each of the non-compressed features based on the vector distance, and generating a similarity matrix.

[0072] For example, it is assumed that the color embedding table in the current recommendation model has 8 vector dimensions, and its value in each dimension is shown in Table 1.

[0073] Table 1

[0074] In this color embedding table, there are five feature categories with index numbers 0 to 4, and the current compression ratio is 40%. It can be determined that the first two rows in each compressed embedding table represent uncompressed features (first eigenvectors), and the last three rows represent features to be compressed (second eigenvectors). The index number is the number used to represent the corresponding feature category after masking the original data set. The corresponding color similarity matrix is ​​a 3×2 matrix, where each row represents a feature to be compressed, each column represents an uncompressed feature, and each matrix element is the similarity between a feature to be compressed and an uncompressed feature.

[0075] According to Table 1, the vector distance between each first eigenvector and each second eigenvector is obtained by calculating the cosine distance. Specifically, the calculation formula of the cosine distance is:

[0076] Among them, A represents the first eigenvector corresponding to the non-compressed feature, B represents the second eigenvector corresponding to the feature to be compressed, and A i Represents the value of the first eigenvector in the i-th vector dimension, B i represents the value of the second eigenvector in the i-th vector dimension, and n represents the total vector dimension of the embedding table to be compressed.

[0077] Furthermore, the above vector distance can represent the similarity between two vectors. Therefore, the similarity between each compressed feature and each uncompressed feature can be determined based on the above vector distance to generate a similarity matrix. The first part of the corresponding Table 2 is the color similarity matrix generated based on the similarity. Similarly, for the remaining price embedding tables, shape embedding tables, and origin embedding tables in the recommendation model, the cosine distance calculation formula can also be used to calculate the similarity between each compressed feature and each uncompressed feature to generate the corresponding price similarity matrix, shape similarity matrix, and origin similarity matrix. The specific four-segment results are shown in Table 2.

[0078] Table 2

[0079] Optionally, in other embodiments, the similarity between each compressed feature and each non-compressed feature may be determined based on metrics such as Euclidean distance and Manhattan distance.

[0080] In this embodiment, the corresponding similarity is determined by determining the vector distance between each compressed feature and each non-compressed feature, so that the relationship between each compressed feature and the non-compressed feature can be determined based on the similarity, providing a data basis for the subsequent compression embedding table based on the relationship between each feature.

[0081] Furthermore, after obtaining the similarity matrix, the matrix elements of each row in the similarity matrix can be numerically sorted, and the most similar non-compressed feature of each feature to be compressed can be determined based on the numerical sorting of the matrix elements. As shown in Table 2, the similarities between the feature to be compressed with index number 2 and the non-compressed features with index number 0 and index number 1 have been calculated based on the cosine distance. The similarity between the feature to be compressed with index number 2 and the non-compressed feature with index number 0 is 0.8, and the similarity between the feature to be compressed with index number 1 is 0.9. The two similarities obtained are sorted, and according to the characteristics of the cosine distance, the greater the similarity between two vectors, the greater the cosine distance. The non-compressed feature with index number 1 is determined to be the most similar non-compressed feature to the feature to be compressed with index number 2. Therefore, when determining the color similarity index matrix, the first row can be determined to be (1, 0), where 1 represents the index number corresponding to the non-compressed feature most similar to the feature to be compressed, and 0 represents the index number corresponding to the non-compressed feature second most similar to the feature to be compressed. Similarly, for the features to be compressed with index numbers 3 and 4, the color similarity index matrix determined based on their similarity matrices is shown in Table 3. Similarly, based on the price similarity matrix, shape similarity matrix, and origin similarity matrix in Table 2, the corresponding price similarity index matrix, shape similarity index matrix, and origin similarity index matrix are also shown in Table 3. In the similarity index matrix, each row represents the feature to be compressed, each column represents the uncompressed feature, and the matrix element indicates whether each feature to be compressed is similar to each uncompressed feature, where 1 indicates similarity and 0 indicates dissimilarity.

[0082] Table 3

[0083] In this embodiment, the similarity index matrix corresponding to each feature is determined by the similarity between the feature to be compressed and the uncompressed feature. The index mapping relationship between the two can be quickly determined with the help of the similarity between the feature to be compressed and the uncompressed feature, which provides data support for the subsequent compression of the embedded table, thereby realizing the rapid compression of the embedded table to be compressed.

[0084] S203: Generate an index dictionary based on the similarity index matrix.

[0085] Specifically, the index relationship between each feature to be compressed and each non-compressed feature can be determined based on whether each feature to be compressed is similar to each non-compressed feature in the similarity index matrix, and an index dictionary can be generated based on the index relationship. Specifically, when it is determined that a feature to be compressed is similar to a non-compressed feature, it can be determined that the feature to be compressed and the non-compressed feature can be index mapped. When it is determined that a feature to be compressed is not similar to a non-compressed feature, it is determined that there is no index mapping relationship between the feature to be compressed and the non-compressed feature. Exemplarily, according to the color index matrix in Table 3, it can be determined that the feature to be compressed corresponding to index number 2 is similar to the non-compressed feature corresponding to index number 0, and is not similar to the non-compressed feature corresponding to index number 1. Then, it can be determined that the feature to be compressed corresponding to index number 2 has an index mapping relationship with the non-compressed feature corresponding to index number 0. In the compression embedding table, the data of the feature to be compressed corresponding to index number 2 can be determined through the above index mapping relationship, without recording the data of the feature to be compressed itself. Similarly, it can be seen that there is an index mapping relationship between the feature to be compressed with index number 3 and the uncompressed feature with index number 1, and there is an index mapping relationship between the feature to be compressed with index number 4 and the uncompressed feature with index number 1. The corresponding color index dictionary is: {0ABCDE:0, A0BCDE:1, AB0CDE:1, ABC0DE:0, ABCD0E:0}.

[0086] Similarly, according to Table 3, the price index dictionary can be determined as: {1ABCDE:0, A1BCDE:1, AB1CDE:1, ABC1DE:1, ABCD1E:1}, the shape index dictionary is: {2ABCDE:0, A2BCDE:1, AB2CDE:0, ABC2DE:0, ABCD2E:1}, and the origin index dictionary is: {3ABCDE:0, A3BCDE:1, AB3CDE:1, ABC3DE:1, ABCD3E:0}.

[0087] The index dictionary can be obtained as follows: color index dictionary {0ABCDE:0, A0BCDE:1, AB0CDE:1, ABC0DE:0, ABCD0E:0}, price index dictionary {1ABCDE:0, A1BCDE:1, AB1CDE:1, ABC1DE:1, ABCD1E:1}, shape index dictionary {2ABCDE:0, A2BCDE:1, AB2CDE:0, ABC2DE:0, ABCD2E:1}, origin index dictionary {3ABCDE:0, A3BCDE:1, AB3CDE:1, ABC3DE:1, ABCD3E:0}.

[0088] S204: Replace the first feature mapping dictionary according to the index dictionary to generate a second feature mapping dictionary, wherein the first feature mapping dictionary is generated based on the data set.

[0089] Specifically, in one embodiment, the first feature mapping dictionary is generated based on the data set, including: acquiring the data set, counting attribute feature data of commodities in the data set, masking the attribute feature data in the data set, and generating the first feature mapping dictionary.

[0090] In an embodiment of the present application, before compressing the embedded table in the recommendation model, it is also necessary to predetermine the recommendation algorithm and the corresponding data set. Since the number and dimensions of the embedded tables of the recommendation models corresponding to the recommendation algorithms based on different network models and different large-scale data sets are different, in this embodiment, it is necessary to predetermine the data set and the corresponding algorithm.

[0091] In an exemplary embodiment corresponding to the above-mentioned color embedding table, shape embedding table, price embedding table, and origin embedding table, the acquired data set is shown in Table 4. The corresponding recommendation model adopted is the DLRM model. The label represents the comparison target (target) in the model training process, where 0 indicates not recommended and 1 indicates recommended.

[0092] Table 4

[0093] From the attribute feature data of the commodities in statistical table 4, it can be seen that there are four attribute features in this exemplary embodiment, namely color, price, shape and origin. Therefore, the number of embedded tables in the data set is 4, namely color embedded table, price embedded table, shape embedded table and origin embedded table.

[0094] Furthermore, after determining the attribute feature data of the product, it is also necessary to determine the quantity T_M corresponding to each category contained in each embedding table. As shown in Table 2, for the color embedding table, it contains 5 feature categories, namely 0ABCDE, A0BCDE, AB0CDE, ABC0DE, and ABCD0E. Among them, the quantity corresponding to the feature category 0ABCDE is 6, the quantity corresponding to the feature category A0BCDE is 5, the quantity corresponding to the feature category AB0CDE is 4, the quantity corresponding to the feature category ABC0DE is 3, and the quantity corresponding to the feature category ABCD0E is 2. Similarly, for the price embedding table, it contains 5 feature categories, namely 0ABCDE, A0BCDE, AB0CDE, ABC0DE, and ABCD0E. Among them, the quantity corresponding to the feature category 0ABCDE is 6, the quantity corresponding to the feature category A0BCDE is 5, the quantity corresponding to the feature category AB0CDE is 4, the quantity corresponding to the feature category ABC0DE is 3, and the quantity corresponding to the feature category ABCD0E is 2. For the shape embedding table, it contains 5 feature categories, namely 0ABCDE, A0BCDE, AB0CDE, ABC0DE, and ABCD0E. Among them, the number corresponding to the feature category 0ABCDE is 6, the number corresponding to the feature category A0BCDE is 5, the number corresponding to the feature category AB0CDE is 4, the number corresponding to the feature category ABC0DE is 3, and the number corresponding to the feature category ABCD0E is 2. For the origin embedding table, it contains 5 feature categories, namely 0ABCDE, A0BCDE, AB0CDE, ABC0DE, and ABCD0E. Among them, the number corresponding to the feature category 0ABCDE is 6, the number corresponding to the feature category A0BCDE is 5, the number corresponding to the feature category AB0CDE is 4, the number corresponding to the feature category ABC0DE is 3, and the number corresponding to the feature category ABCD0E is 2.

[0095] It should be noted that in actual application scenarios, the number of feature categories T_M is very large, reaching tens of millions or even hundreds of millions. The larger the number of feature categories T_M, the greater the storage requirements. Generally, the number of feature categories T_M is determined by the number of feature categories of a certain product in the dataset. The number of feature categories shown in the above embodiment is for illustrative purposes only and is not specifically limited in this application.

[0096] It is understandable that, considering the data privacy issues in actual application scenarios, generally, the user's attribute characteristics and the product's data characteristics must be encrypted and masked to generate a first feature mapping dictionary to ensure data security. In this embodiment, the first feature mapping dictionary is mainly implemented by the following steps:

[0097] Step 1: Construct a feature-quantity dictionary {key, value}, where key is the feature category and value is the quantity of the feature category, and keys need to be sorted from largest to smallest according to the value. According to the statistical results of the above data set (Table 2), in this exemplary embodiment, four feature-quantity dictionaries can be constructed, namely, a color dictionary {0ABCDE:6, A0BCDE:5, AB0CDE:4, ABC0DE:3, ABCD0E:2}, a price dictionary {1ABCDE:6, A1BCDE:5, AB1CDE:4, ABC1DE:3, ABCD1E:2}, a shape dictionary {2ABCDE:6, A2BCDE:5, AB2CDE:4, ABC2DE:3, ABCD2E:2}, and an origin dictionary {3ABCDE:6, A3BCDE:5, AB3CDE:4, ABC3DE:3, ABCD3E:2}.

[0098] Step 2: Construct the first feature mapping dictionary {key, value} based on the feature-quantity dictionary. In the first feature mapping dictionary, key is the feature and value is an integer. In this step, value is determined according to the number of feature categories in the feature-quantity dictionary, starting from 0 and numbered in ascending order until all features are encoded. The corresponding first feature mapping dictionaries are: color feature mapping dictionary {0ABCDE:0, A0BCDE:1, AB0CDE:2, ABC0DE:3, ABCD0E:4}, price feature mapping dictionary {1ABCDE:0, A1BCDE:1, AB1CDE:2, ABC1DE:3, ABCD1E:4}, shape feature mapping dictionary {2ABCDE:0, A2BCDE:1, AB2CDE:2, ABC2DE:3, ABCD2E:4}, origin feature mapping dictionary {3ABCDE:0, A3BCDE:1, AB3CDE:2, ABC3DE:3, ABCD3E:4}. Among them, numbers 0 to 4 are the initial index numbers of each feature category in each feature, which are used to mask the corresponding feature category.

[0099] Furthermore, each feature in the data set is converted based on the first feature mapping dictionary to obtain a mask data set as shown in Table 5.

[0100] Table 5

[0101] In this embodiment, by preprocessing the data set, masking the data in the data set, and constructing the corresponding first feature mapping dictionary, the embedded table to be compressed can be quickly determined when the embedded table is subsequently compressed, providing a basis for subsequently improving the compression efficiency of the embedded table.

[0102] Furthermore, the first feature mapping dictionary color feature mapping dictionary {0ABCDE:0, A0BCDE:1, AB0CDE:1, ABC0DE:0, ABCD0E:0}, price index dictionary {1ABCDE:0, A1BCDE:1, AB1CDE:1, ABC1DE:1, ABCD1E:1}, shape index dictionary {2ABCDE:0, A2BCDE:1, AB2CDE:0, ABC2DE:0, ABCD2E:1}, origin index dictionary {3ABCDE:0, A3BCDE:1, AB3CDE:1, ABC3DE:1, ABCD3E:0} can be mapped to the first feature mapping dictionary color feature mapping dictionary {0ABCDE:0, A0BCDE:1, AB0CDE:2, ABC0DE:3, ABCD0E:4}, price feature mapping dictionary {1ABCDE:0, A1BCDE:1, AB1CDE:2, ABC1DE:3, ABCD1E:4} according to the index dictionary color index dictionary {0ABCDE:0, A0BCDE:1, AB0CDE:2, ABC0DE:3, ABCD0E:4} , shape feature mapping dictionary {2ABCDE:0, A2BCDE:1, AB2CDE:2, ABC2DE:3, ABCD2E:4}, origin feature mapping dictionary {3ABCDE:0, A3BCDE:1, AB3CDE:2, ABC3DE:3, ABCD3E:4} are replaced. The result after replacement is: color feature mapping dictionary {0ABCDE:0, A0BCDE:1, AB0CDE:1, ABC0DE:0, ABCD0E:0}, price feature mapping dictionary {1ABCDE:0, A1BCDE:1, AB1CDE:1, ABC1DE:1, ABCD1E:1}, shape feature mapping dictionary {2ABCDE:0, A2BCDE:1, AB2CDE:0, ABC2DE:0, ABCD2E:1}, origin feature mapping dictionary {3ABCDE:0, A3BCDE:1, AB3CDE:1, ABC3DE:1, ABCD3E:0}.

[0103] S205 , obtaining data to be recommended, replacing features in the data to be recommended according to the second feature mapping dictionary, inputting the replaced features into the recommendation model, and outputting a prediction result.

[0104] For example, Figure 3 is a schematic diagram of the embedding table lookup process in one embodiment. As shown in Figure 3, after obtaining the data to be recommended and determining that there are two features (sparse feature #1; sparse feature #2) in the data to be recommended, corresponding to two sets of identifiers (1245; 4329), the embedding table is used to query the values ​​corresponding to each set of feature identifiers. Based on the query results, corresponding vector outputs (embedding output #1; embedding output #2) are generated. The neural network in the recommendation model then determines the corresponding prediction result based on the vector output after the embedding table lookup and outputs it.

[0105] In an embodiment of the present application, when the recommendation model predicts new recommendation data, it is not necessary to map the vectors in the third row and thereafter of the embedding table during feature mapping, that is, the recommendation model does not need to save the matrices in the third row and thereafter of the embedding table matrix, thereby achieving the purpose of model compression.

[0106] In the above-mentioned information recommendation method based on embedding table compression, based on a preset compression ratio, features to be compressed and uncompressed features in the embedding table to be compressed of the recommendation model are determined, and a similarity index matrix is ​​generated based on the similarity between the features to be compressed and the uncompressed features. Furthermore, the index mapping relationship between feature categories in the embedding table of the recommendation model is determined by obtaining the similarity between each feature category. Then, an index dictionary is generated based on the similarity index matrix; a first feature mapping dictionary is replaced based on the index dictionary to generate a second feature mapping dictionary, wherein the first feature mapping dictionary is generated based on the dataset. Furthermore, the embedding table in the recommendation model is compressed based on the index mapping relationship between the feature categories. Finally, the data to be recommended is obtained, and the features in the data to be recommended are replaced based on the second feature mapping dictionary. The replaced features are input into the recommendation model, and a prediction result is output. Furthermore, when compressing the recommendation model, the embedding table in the recommendation model can be compressed without affecting the model accuracy of the recommendation model, thereby improving the compression efficiency of the embedding table, significantly reducing the storage overhead of the model, and increasing the inference speed of the model.

[0107] In one embodiment, after generating the second feature mapping dictionary, the method further includes: updating the recommendation model based on the second feature mapping dictionary, obtaining a current model accuracy of the recommendation model, obtaining an initial model accuracy of the recommendation model, and determining a model accuracy change value of the recommendation model based on the initial model accuracy and the current model accuracy. Determining whether the model accuracy change value is not greater than a preset model accuracy degradation threshold, and if so, saving the second feature mapping dictionary.

[0108] It is understandable that after the first feature mapping dictionary is replaced, the embedding table stored in the recommendation model will also change, and the model accuracy of the corresponding recommendation model will also change accordingly. Therefore, in this embodiment, it is also necessary to test the change value of the model accuracy of the recommendation model to determine the accuracy change value of the recommendation model. Specifically, the current model accuracy of the recommendation model can be verified again with the help of a predetermined test set, and the model accuracy change value can be determined by comparing the initial model accuracy and current model accuracy of the recommendation model. Then, the preset model accuracy drop threshold t_v is obtained. If the model accuracy drop value is not greater than the preset model accuracy drop threshold t_v, it means that the current model accuracy change value is within the acceptable range of the model accuracy drop of the recommendation model, and the second feature mapping dictionary is available and can be directly saved and used.

[0109] In this embodiment, by judging whether the model accuracy change value of the recommended model is within the acceptable range of the model accuracy decline of the recommended model, it is ensured that the model accuracy of the recommended model is not excessively affected while compressing the embedded table, thereby ensuring the model accuracy of the model while embedding the table in the compressed recommended model.

[0110] In one embodiment, if the model accuracy change value is greater than a preset model accuracy drop threshold, the compression ratio is changed and the second feature mapping dictionary is reacquired until the model accuracy change value of the recommended model is no greater than the preset model accuracy threshold.

[0111] In this embodiment, if the current model accuracy change value of the recommended model exceeds the acceptable range of model accuracy degradation for the recommended model, it indicates that the current compression ratio is too large or too small, and the compression ratio needs to be readjusted to avoid excessive degradation in the model accuracy of the recommended model. For example, the compression ratio can be appropriately reduced, and then the original embedded table to be compressed can be recompressed to obtain a new second feature mapping dictionary. The model accuracy change value of the corresponding recommended model can then be obtained to determine whether the new model accuracy change value is within the acceptable range of model accuracy degradation for the recommended model. If so, the new second feature mapping dictionary can be saved. If not, the compression ratio needs to be further adjusted until the model accuracy change value of the recommended model corresponding to the compression ratio is within the acceptable range of model accuracy degradation.

[0112] In this embodiment, when it is determined that the model accuracy change value of the recommended model exceeds the acceptable range of the model accuracy decline of the recommended model, the compression ratio of the embedded table to be compressed is adjusted in time to ensure that the compression efficiency of the model can be improved while ensuring that the model accuracy of the recommended model is not excessively affected by the compression of the embedded table.

[0113] In one embodiment, after generating the first feature mapping dictionary, the method further includes determining a recommendation model type, partitioning the masked dataset into a training set, a validation set, and a test set. The recommendation model is trained based on the training set and the validation set, and after training is complete, initial model accuracy of the recommendation model is obtained based on the test set.

[0114] Common recommendation models include wide&deep, DLRM, and DeepFM. In this embodiment, taking the DLRM model as an example, before training the recommendation model, the masked dataset must be partitioned into a training set, a validation set, and a test set. For example, the partition ratio can be set to 8:1:1. The recommendation model is then trained on the training set, and its output is verified using the validation set until the recommendation model converges, meaning that the model accuracy no longer improves. Finally, the initial model accuracy of the recommendation model is verified on the test set.

[0115] In this embodiment, after obtaining the first feature mapping dictionary corresponding to the data set, the recommendation model used is pre-trained, and then the initial model accuracy of the recommendation model is obtained, so that the subsequent recommendation model can promptly detect the decline in model accuracy of the recommendation model when it changes with the compression of the embedding table, thereby avoiding excessive decline in model accuracy of the recommendation model due to compression of the embedding table.

[0116] FIG4 is a flow chart of an information recommendation method based on embedded table compression in an optional embodiment. As shown in FIG4 , after determining the recommendation algorithm and obtaining the corresponding data set, the number T_T of embedded tables to be compressed in the data set can be determined first, and then the data in the embedded tables to be compressed can be sorted and a first feature mapping dictionary can be constructed. After that, the recommendation model can be trained according to the first feature mapping dictionary until the model converges. After the recommendation model training is completed, T_T embedded table matrices corresponding to the embedded tables to be compressed can be obtained through the recommendation model output. Then, a category number threshold cat_num of the embedded tables to be compressed can be set, and it can be determined whether the number of rows Len(table) in each embedded table matrix to be compressed is greater than the category number threshold cat_num. If so, the embedded table to be compressed is compressed, and the corresponding percentile P_num, i.e., the compression ratio, is set. The demarcation point between the features to be compressed and the non-compressed features in the embedded table to be compressed is determined based on the percentile, and the features to be compressed are compressed while the non-compressed features are retained. Then, a metric for calculating the similarity between the features to be compressed and the uncompressed features is determined. Based on the preset metric, a similarity matrix, simi_mat, corresponding to the embedded table to be compressed is calculated. In the similarity matrix, rows represent rows of the embedded table to be compressed, and columns represent the similarity values ​​between each row of the embedded table to be compressed and each row of the uncompressed matrix. Next, a list of the top N largest indexes for each row of the similarity matrix is ​​obtained to determine the corresponding similarity index matrix. A preset model accuracy drop threshold is then set to determine whether the current model accuracy change is greater than the preset model accuracy drop threshold, and then a decision is made to increase or decrease the compression ratio. Specifically, if the current model accuracy change is not greater than the preset model accuracy drop threshold, if so, the similarity index matrix is ​​saved and compression of the next embedded table is performed until all embedded tables to be compressed are compressed. Otherwise, the percentile P_num is reset and compression of the current embedded table to be compressed is repeated until the model accuracy change of the recommended model is no greater than the preset model accuracy drop threshold. After completing the compression of all embedding tables to be compressed, for T_T similarity index matrices, take the feature vectors corresponding to the most similar first N indexes in the corresponding similarity index matrix, generate the corresponding index dictionary, and use the index dictionary to replace the first feature mapping dictionary to obtain the corresponding second feature mapping dictionary. Optionally, when generating the index dictionary, the vectors corresponding to the most similar first N indexes can be ReLU activated and then averaged to obtain a new vector to be compressed. The index dictionary is generated based on the new vector to be compressed to further improve the model accuracy. Establishing the index dictionary through the activated vector to be compressed and generating the corresponding second feature mapping dictionary can effectively improve the model accuracy of the recommendation model, and the model accuracy of the corresponding compressed recommendation model can exceed the model accuracy of the uncompressed model.

[0117] Correspondingly, Figure 5 is a comparison diagram of the compression effect of the recommended model after compression on a real data set in an exemplary embodiment. As shown in Figure 5, the storage space required for the original model before compression is 2160MB. The relevant quotient method and combination method can only control the compression ratio within 10. The compressed recommendation model still requires a large storage space. However, this application is able to increase the compression ratio to more than 100, and the storage overhead of the compressed recommendation model is significantly reduced.

[0118] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0119] Based on the same inventive concept, embodiments of the present application also provide an information recommendation device based on embedded table compression for implementing the aforementioned information recommendation method based on embedded table compression. The solution provided by this device is similar to the solution described in the aforementioned method. Therefore, the specific limitations of one or more embodiments of the information recommendation device based on embedded table compression provided below can be found in the above-mentioned limitations of the information recommendation method based on embedded table compression and will not be further elaborated here.

[0120] FIG6 is a schematic diagram of the structure of an information recommendation device based on embedded table compression in one embodiment, comprising: an acquisition module 61, a compression module 62, an indexing module 63 and a prediction module 64, wherein:

[0121] An acquisition module 61 is configured to acquire features to be compressed and non-compressed features in a to-be-compressed embedding table of a recommendation model according to a preset compression ratio;

[0122] The compression module 62 is configured to generate a similarity index matrix based on the similarity between the feature to be compressed and the non-compressed feature; and generate an index dictionary based on the similarity index matrix;

[0123] An indexing module 63, configured to replace a first feature mapping dictionary according to the index dictionary to generate a second feature mapping dictionary, wherein the first feature mapping dictionary is generated based on a data set;

[0124] The prediction module 64 is configured to obtain the data to be recommended, replace features in the data to be recommended according to the second feature mapping dictionary, input the replaced features into the recommendation model, and output a prediction result.

[0125] In the above-mentioned information recommendation device based on embedding table compression, based on a preset compression ratio, features to be compressed and uncompressed in the embedding table of the recommendation model to be compressed are determined, and a similarity index matrix is ​​generated based on the similarity between the features to be compressed and the uncompressed features. This method determines the index mapping relationships between feature categories by obtaining the similarity between each feature category in the embedding table of the recommendation model. An index dictionary is then generated based on the similarity index matrix; a first feature mapping dictionary is replaced based on the index dictionary to generate a second feature mapping dictionary, wherein the first feature mapping dictionary is generated based on a data set. This method compresses the embedding table in the recommendation model based on the index mapping relationships between the feature categories. Finally, data to be recommended is obtained, and features in the data to be recommended are replaced based on the second feature mapping dictionary. The replaced features are input into the recommendation model, and a prediction result is output. Furthermore, when compressing the recommendation model, the embedding table in the recommendation model can be compressed without affecting the model accuracy of the recommendation model, thereby improving the compression efficiency of the embedding table, significantly reducing the model's storage overhead, and increasing the model's inference speed.

[0126] Furthermore, the compression module 62 is further configured to generate a similarity matrix based on the similarity between the feature to be compressed and the non-compressed feature;

[0127] Determining the numerical order of matrix elements in each row of the similarity matrix;

[0128] A similarity index matrix is ​​generated according to the numerical order of the matrix elements.

[0129] Furthermore, the compression module 62 is further configured to obtain a first feature vector of the feature to be compressed and a second feature vector of the non-compressed feature;

[0130] A vector distance between each of the first eigenvectors and each of the second eigenvectors is obtained, and similarities between each of the compressed features and each of the non-compressed features are determined based on the vector distances to generate a similarity matrix.

[0131] Furthermore, the indexing module 63 is further configured to update the recommendation model based on the second feature mapping dictionary to obtain a current model accuracy of the recommendation model;

[0132] Obtaining an initial model accuracy of the recommended model, and determining a model accuracy change value of the recommended model based on the initial model accuracy and the current model accuracy;

[0133] Determine whether the model accuracy change value is not greater than a preset model accuracy degradation threshold; if so, save the second feature mapping dictionary.

[0134] Furthermore, the index module 63 is also used to change the compression ratio and re-acquire the second feature mapping dictionary if the model accuracy change value is greater than the preset model accuracy drop threshold, until the model accuracy change value of the recommended model is no greater than the preset model accuracy threshold.

[0135] Furthermore, the apparatus further comprises a pre-processing module 65 for acquiring a data set and collecting statistics on attribute feature data of commodities in the data set;

[0136] Mask the attribute feature data in the data set to generate a first feature mapping dictionary.

[0137] Furthermore, the apparatus further includes a training module 66 for determining the type of the recommendation model and dividing the masked data set into a training set, a validation set, and a test set;

[0138] The recommendation model is trained based on the training set and the validation set, and after the training is completed, the initial model accuracy of the recommendation model is obtained based on the test set.

[0139] Each module in the above-mentioned information recommendation device based on embedded table compression can be implemented in whole or in part through software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the corresponding operations of each module.

[0140] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be shown in Figure 7. The computer device includes a processor, memory, a communication interface, a display screen, and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner. The wireless manner may be achieved through WIFI, a mobile cellular network, NFC (near field communication), or other technologies. When the computer program is executed by the processor, an information recommendation method based on embedded table compression is implemented. The display screen of the computer device may be a liquid crystal display or an electronic ink display screen. The input device of the computer device may be a touch layer covering the display screen, or may be a key, trackball, or touchpad provided on the computer device housing, or may be an external keyboard, touchpad, or mouse.

[0141] Those skilled in the art will understand that the structure shown in FIG7 is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0142] In one embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0143] Determine the features to be compressed and the features not to be compressed in the embedding table to be compressed of the recommendation model according to the preset compression ratio;

[0144] generating a similarity index matrix based on the similarity between the feature to be compressed and the non-compressed feature;

[0145] Generate an index dictionary based on the similarity index matrix;

[0146] Replacing the first feature mapping dictionary according to the index dictionary to generate a second feature mapping dictionary, wherein the first feature mapping dictionary is generated based on the data set;

[0147] The data to be recommended is obtained, features in the data to be recommended are replaced according to the second feature mapping dictionary, the replaced features are input into the recommendation model, and a prediction result is output.

[0148] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented:

[0149] Determine the features to be compressed and the features not to be compressed in the embedding table to be compressed of the recommendation model according to the preset compression ratio;

[0150] generating a similarity index matrix based on the similarity between the feature to be compressed and the non-compressed feature;

[0151] Generate an index dictionary based on the similarity index matrix;

[0152] Replacing the first feature mapping dictionary according to the index dictionary to generate a second feature mapping dictionary, wherein the first feature mapping dictionary is generated based on the data set;

[0153] The data to be recommended is obtained, features in the data to be recommended are replaced according to the second feature mapping dictionary, the replaced features are input into the recommendation model, and a prediction result is output.

[0154] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.

[0155] Those skilled in the art will appreciate that all or part of the processes in the above-mentioned embodiment methods can be implemented by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory may include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, distributed databases based on blockchains. The processor involved in the various embodiments provided herein may be, but are not limited to, a general-purpose processor, a central processing unit, a graphics processing unit, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, and the like.

[0156] The technical features of the above embodiments can be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0157] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. An information recommendation method based on embedded table compression, characterized in that: The method comprises: According to a preset compression ratio, determine the features to be compressed and the non-compressed features in the to-be-compressed embedding table of the recommendation model; Based on the similarity between the feature to be compressed and the non-compressed feature, a similarity index matrix is ​​generated; Based on the similarity index matrix, generate an index dictionary; Replacing the first feature mapping dictionary according to the index dictionary to generate a second feature mapping dictionary, wherein the first feature mapping dictionary is generated based on the data set; The data to be recommended is obtained, features in the data to be recommended are replaced according to the second feature mapping dictionary, the replaced features are input into the recommendation model, and a prediction result is output.

2. The method according to claim 1, wherein: The generating a similarity index matrix based on the similarity between the compressed feature and the non-compressed feature includes: Based on the similarity between the feature to be compressed and the non-compressed feature, a similarity matrix is ​​generated; Determining the numerical order of the matrix elements in each row of the similarity matrix; A similarity index matrix is ​​generated according to the numerical order of the matrix elements.

3. The method according to claim 2, wherein: The generating a similarity matrix based on the similarity between the feature to be compressed and the non-compressed feature includes: Obtaining a first feature vector of each of the features to be compressed and a second feature vector of each of the non-compressed features; A vector distance between each of the first feature vectors and each of the second feature vectors is obtained, and a similarity between each of the compressed features and each of the non-compressed features is determined based on the vector distance to generate a similarity matrix.

4. The method according to claim 1, wherein: After generating the second feature mapping dictionary, the method further includes: Updating the recommendation model based on the second feature mapping dictionary, and obtaining a current model accuracy of the recommendation model; Acquire an initial model accuracy of the recommended model, and determine a model accuracy change value of the recommended model according to the initial model accuracy and the current model accuracy; It is determined whether the model accuracy change value is not greater than a preset model accuracy drop threshold value, and if so, the second feature mapping dictionary is saved.

5. The method according to claim 4, wherein: If the model accuracy change value is greater than a preset model accuracy drop threshold, the compression ratio is changed and the second feature mapping dictionary is reacquired until the model accuracy change value of the recommended model is no greater than the preset model accuracy threshold.

6. The method according to claim 1, wherein: The first feature mapping dictionary is generated based on the data set and includes: Obtaining a data set, and counting attribute feature data of the commodities in the data set; The attribute feature data in the data set is masked to generate a first feature mapping dictionary.

7. The method according to claim 6, wherein: After generating the first feature mapping dictionary, the method further includes: Determine the type of the recommended model, and divide the masked data set into a training set, a validation set, and a test set; The recommendation model is trained according to the training set and the validation set, and after the training is completed, the initial model accuracy of the recommendation model is obtained based on the test set.

8. An information recommendation device based on embedded table compression, characterized in that: The device comprises: An acquisition module, used for acquiring features to be compressed and non-compressed features in a to-be-compressed embedding table of a recommendation model according to a preset compression ratio; A compression module, configured to generate a similarity index matrix based on the similarity between the feature to be compressed and the non-compressed feature; and generate an index dictionary based on the similarity index matrix; An indexing module, configured to replace a first feature mapping dictionary according to the index dictionary to generate a second feature mapping dictionary, wherein the first feature mapping dictionary is generated based on a data set; The prediction module is used to obtain the data to be recommended, replace the features in the data to be recommended according to the second feature mapping dictionary, input the replaced features into the recommendation model, and output the prediction result.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

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

Citation Information

Patent Citations

  • Product recommendation method and device, computer apparatus and storage medium

    CN109447813A

  • Intelligent sales clue recommendation reason generation method and system

    CN115760201A

  • Information recommendation method and device based on embedded table compression, equipment and medium

    CN116522003A

  • Recommendation system with sparse feature encoding

    US20220114644A1

  • Vector shift-based recommendation method, apparatus, computer device, and non-volatile readable storage medium

    WO2021051515A1