Method for recommending a product and device therefor

By modeling user behavior sequence data over multiple time spans and utilizing a GPU/CPU cluster to distribute tasks, the problem of inaccurate recommendations under massive product selection is solved, resulting in more accurate product recommendations and improved merchant promotion effects.

CN119887327BActive Publication Date: 2026-01-20BEIJING WODONG TIANJUN INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411958413.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2026-01-20
Estimated Expiration
2044-12-27

AI Technical Summary

Technical Problem

Existing product recommendation systems struggle to quickly and accurately provide users with recommendations of products they are interested in when faced with a massive selection of goods.

Method used

By performing sequence modeling on user behavior sequence data across multiple time spans, user behavior and product characteristics are obtained. This is combined with a click-through rate prediction model for recommendations. GPU and CPU clusters are used to share computation and storage tasks, and a teacher-student model framework and hash coding are employed to optimize the computation process.

Benefits of technology

It improves the accuracy and completeness of recommendations, reduces inaccuracies caused by data sparsity, and enhances user experience and merchant promotion effectiveness.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119887327B_ABST
    Figure CN119887327B_ABST
Patent Text Reader

Abstract

The application provides a commodity recommendation method and device, relates to the field of commodity recommendation, and comprises the following steps: acquiring user behavior sequence data; performing sequence modeling on the user behavior sequence data under multiple time spans to obtain multiple user behavior sequence sub-features; performing sequence modeling on commodity identification information to obtain basic sequence sub-features; fusing the multiple user behavior sequence sub-features and the basic sequence sub-features to obtain user behavior sequence features; acquiring commodity features corresponding to candidate recommended commodities; inputting the commodity features and the user behavior sequence features into a click rate estimation model to obtain a click rate estimation score corresponding to each candidate recommended commodity and generating a commodity recommendation list based on the click rate estimation score. The application can capture the evolution and change trend of user behavior, better understand the evolution of user interest and preference, and thus provide more accurate recommendation results and improve customer satisfaction.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the field of commodity recommendation, artificial intelligence and computer technology, in particular to a commodity recommendation method and device thereof. BACKGROUND

[0002] With the rapid development of e-commerce, people's demand for online shopping is increasing. However, in the face of a large number of commodity choices, consumers often feel confused and tired. Therefore, in order to help consumers better find the commodities they are interested in, a fast and accurate commodity recommendation system becomes crucial. SUMMARY

[0003] The present disclosure provides a commodity recommendation method and device thereof to at least solve the problem of fast and accurate commodity recommendation for users in the related art.

[0004] The first aspect of the present application provides a commodity recommendation method, comprising: obtaining user behavior sequence data, wherein the user behavior sequence data comprises commodity identification information, commodity attribute information, timestamp information and behavior type information; performing sequence modeling on the user behavior sequence data at multiple time spans respectively, obtaining multiple user behavior sequence sub-features generated after sequence modeling, and performing sequence modeling on the commodity identification information, obtaining basic sequence sub-features generated after sequence modeling; fusing the multiple user behavior sequence sub-features and the basic sequence sub-features to obtain user behavior sequence features; obtaining commodity features corresponding to candidate recommended commodities, inputting the commodity features and the user behavior sequence features into a click rate estimation model, obtaining a click rate estimation score corresponding to each candidate recommended commodity, and generating a commodity recommendation list based on the click rate estimation score.

[0005] According to an embodiment of the present application, the commodity recommendation method further comprises: dividing the click rate estimation model into a computation-intensive module and a storage-intensive module; deploying the computation-intensive module in a graphics processing unit (GPU) cluster, the computation-intensive module being used for matrix calculation and vector operation; deploying the storage-intensive module in a central processing unit (CPU) cluster, the storage-intensive module being used for storage of sparse parameters corresponding to the click rate estimation model.

[0006] According to one embodiment of the present application, the commodity recommendation method further comprises: dividing the model-related service of the click rate estimation model into a main graph service, a calculation sub-graph service, and a data sub-graph service; loading the click rate estimation model based on the main graph service, and performing hash operation on the commodity features and user behavior sequence features input into the click rate estimation model to obtain their respective corresponding hash codes, and sending the hash codes to the calculation sub-graph service to obtain the click rate estimation score returned by the calculation sub-graph service; loading the calculation-intensive module based on the calculation sub-graph service, and querying the data sub-graph service according to the hash codes to obtain the sparse parameters of the click rate estimation model, and performing click rate estimation based on the sparse parameters, and sending the click rate estimation score to the main graph service; loading the sparse parameters in a distributed manner based on the data sub-graph service, and the sparse parameters are divided into multiple shards and stored in the storage-intensive module.

[0007] According to one embodiment of the present application, the commodity recommendation method further comprises: dividing the click rate estimation model into multiple compilation sub-graphs; determining whether the commodity features and user behavior sequence features input into the click rate estimation model need to be pre-compiled; if pre-compilation is needed, dividing each compilation sub-graph into multiple feature buckets according to the feature dimension; for any feature bucket, performing feature padding on the input corresponding to the feature bucket based on the feature dimension corresponding to the feature bucket, and executing the compilation operation corresponding to the padded features based on the compilation sub-graph to which the feature bucket belongs.

[0008] According to one embodiment of the present application, if pre-compilation is not needed, the compilation operation is executed based on the compilation original graph corresponding to the click rate estimation model.

[0009] According to one embodiment of the present application, the click rate estimation model adopts a teacher-student model as a framework; the teacher model adopts a PPnet model, and the teacher model is used to obtain a weight matrix generated after training based on a sample training set and to pass the weight matrix to the student model; the student model splits the weight matrix according to the feature domain, and performs online click rate estimation based on the weight sub-matrix generated after splitting.

[0010] According to one embodiment of the present application, the GPU adopts a fixed memory mode, and in the processing process of the GPU, a plurality of CUDA (Compute Unified Device Architecture) streams in the GPU are used to perform operation processing, wherein each CUDA stream corresponds to a CUDA context.

[0011] According to one embodiment of the present application, the commodity recommendation method further comprises: in the processing process of the GPU, the Tensor Cores in the GPU are used to perform operation in a high-bandwidth and mixed-precision mode.

[0012] In a second aspect, an embodiment of the present application provides a commodity recommendation device, comprising: an acquisition module configured to acquire user behavior sequence data, wherein the user behavior sequence data comprises commodity identification information, commodity attribute information, timestamp information, and behavior type information; a modeling module configured to perform sequence modeling on the user behavior sequence data at multiple time spans respectively, to acquire multiple user behavior sequence sub-features generated after sequence modeling, and to perform sequence modeling on the commodity identification information to acquire basic sequence sub-features generated after sequence modeling; a generation module configured to fuse the multiple user behavior sequence sub-features and the basic sequence sub-features to obtain user behavior sequence features; and a recommendation module configured to acquire commodity features corresponding to candidate recommended commodities, to input the commodity features and the user behavior sequence features into a click rate estimation model, to acquire a click rate estimation score corresponding to each candidate recommended commodity, and to generate a commodity recommendation list based on the click rate estimation score.

[0013] According to an embodiment of the present application, the commodity recommendation device further comprises a model acceleration module, which is configured to: divide the click rate estimation model into a computation-intensive module and a storage-intensive module; deploy the computation-intensive module in a graphics processing unit (GPU) cluster, the computation-intensive module being configured to perform matrix calculation and vector operation; and deploy the storage-intensive module in a central processing unit (CPU) cluster, the storage-intensive module being configured to perform storage of sparse parameters corresponding to the click rate estimation model.

[0014] According to an embodiment of the present application, the model acceleration module is further configured to: divide model-related services of the click rate estimation model into a main graph service, a computation sub-graph service, and a data sub-graph service; load the click rate estimation model based on the main graph service, and perform hash operation on the commodity features and the user behavior sequence features input into the click rate estimation model respectively to acquire respective hash codes of the commodity features and the user behavior sequence features, and send the hash codes to the computation sub-graph service to acquire a click rate estimation score returned by the computation sub-graph service; load the computation-intensive module based on the computation sub-graph service, query the data sub-graph service according to the hash codes to acquire sparse parameters of the click rate estimation model, perform click rate estimation based on the sparse parameters, and send the click rate estimation score to the main graph service; and load the sparse parameters in a distributed manner based on the data sub-graph service, the sparse parameters being divided into multiple shards and stored in the storage-intensive module.

[0015] According to one embodiment of the present application, the model acceleration module is further configured to: divide the click rate estimation model into a plurality of compiled subgraphs; determine whether the product features and the user behavior sequence features input into the click rate estimation model need to be pre-compiled; if pre-compilation is needed, divide each compiled subgraph into a plurality of feature buckets according to feature dimensions; and for any feature bucket, perform feature padding on the input corresponding to the feature bucket based on the feature dimension corresponding to the feature bucket, and perform a compiled operation corresponding to the padded features based on the compiled subgraph to which the feature bucket belongs.

[0016] According to one embodiment of the present application, the model acceleration module is further configured to: if pre-compilation is not needed, perform a compiled operation based on the compiled original graph corresponding to the click rate estimation model.

[0017] According to one embodiment of the present application, the click rate estimation model adopts a teacher-student model as a framework; the teacher model adopts a PPnet model, and the teacher model is configured to obtain a weight matrix generated after training based on a sample training set and transmit the weight matrix to the student model; and the student model is configured to split the weight matrix according to feature domains and perform online click rate estimation based on a weight submatrix generated after the splitting.

[0018] According to one embodiment of the present application, the GPU adopts a fixed memory mode, and in the processing of the GPU, a plurality of CUDA (Compute Unified Device Architecture) streams in the GPU are configured to perform operation processing, wherein each CUDA stream corresponds to a CUDA context.

[0019] According to one embodiment of the present application, the model acceleration module is further configured to: in the processing of the GPU, the Tensor Cores in the GPU are configured to perform operations in a high-bandwidth and mixed-precision manner.

[0020] The third aspect embodiment of the present application provides an electronic device, including: at least one processor; and a memory in communication connection with the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to implement the product recommendation method according to the first aspect embodiment of the present application.

[0021] The fourth aspect embodiment of the present application provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to implement the product recommendation method according to the first aspect embodiment of the present application.

[0022] The fifth aspect embodiment of the present application provides a computer program product, including a computer program, wherein the computer program is used to implement the product recommendation method according to the first aspect embodiment of the present application when executed by a processor.

[0023] The embodiments of the present disclosure provide at least the following beneficial effects: the present application can capture the evolution and change trend of user behavior by performing sequence modeling on user behavior sequence data in multiple time spans, can better understand the evolution of user interest and preference, and thus provide more accurate recommendation results; through sequence modeling in multiple time spans, data in different time periods can be integrated, the integrity and coverage of data can be improved, and recommendation inaccuracy caused by data sparseness can be reduced.

[0024] It should be understood that the foregoing general description and the following detailed description are only exemplary and explanatory, and are not limiting to the present disclosure. BRIEF DESCRIPTION OF DRAWINGS

[0025] The above-mentioned and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:

[0026] Figure 1 is a schematic diagram of an exemplary embodiment of a commodity recommendation method according to an embodiment of the present application.

[0027] Figure 2 is a schematic diagram of sequence modeling of user behavior sequence data according to an embodiment of the present application.

[0028] Figure 3 is a schematic diagram of a main graph service, a calculation subgraph service and a data subgraph service according to an embodiment of the present application.

[0029] Figure 4 is a schematic diagram of division of a compiled subgraph according to an embodiment of the present application.

[0030] Figure 5 is a schematic diagram of a compilation scheme according to an embodiment of the present application.

[0031] Figure 6 is a schematic diagram of multi-CUDA stream calculation according to an embodiment of the present application.

[0032] Figure 7 is a schematic diagram of a commodity recommendation device according to an embodiment of the present application.

[0033] Figure 8 is a schematic diagram of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0034] Embodiments of the present application are described below in detail, examples of which are shown in the drawings, wherein the same or similar notations represent the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by reference to the drawings are exemplary and are intended to explain the present application, and cannot be understood as a limitation of the present application.

[0035] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data for analysis, stored data, displayed data, etc.) and signals involved in the present application are authorized by the user or fully authorized by all parties, and the collection, use and processing of related data need to comply with relevant laws, regulations and standards.

[0036] Figure 1 is a schematic diagram of an exemplary embodiment of a commodity recommendation method shown by the present application, as shown in Figure 1 The commodity recommendation method comprises the following steps:

[0037] S101, obtaining user behavior sequence data, wherein the user behavior sequence data comprises commodity identification information, commodity attribute information, timestamp information and behavior type information.

[0038] The commodity identification information refers to the unique identifier of each commodity, which is used to distinguish different commodities.

[0039] The commodity attribute information includes the category, brand, price and other attributes of the commodity, which is used to describe the characteristics of the commodity. The commodity attribute information also includes source scene information, such as search scene, recommendation scene or second kill channel page information.

[0040] The timestamp information records the time when the user operates the commodity, which is used to analyze the time characteristics of the user behavior.

[0041] The behavior type information includes different behavior types of the user to the commodity, such as browsing, collecting, adding to the shopping cart, purchasing, etc., which is used to analyze the user behavior mode.

[0042] S102, respectively modeling the user behavior sequence data at multiple time spans, obtaining multiple user behavior sequence sub-features generated after sequence modeling, and modeling the commodity identification information, obtaining the basic sequence sub-features generated after sequence modeling.

[0043] Figure 2 is a schematic diagram of sequence modeling of user behavior sequence data shown by the present application, as shown in Figure 2As shown, as the interests and needs of users tend to change over time, in this application, the time span is divided into short-term, medium-term and long-term, first the user behavior sequence data is preprocessed, and the preprocessed user behavior sequence data is respectively modeled by short-term behavior sequence modeling, medium-term behavior sequence modeling and long-term behavior sequence modeling, respectively. Short-term user behavior sequence sub-features, medium-term user behavior sequence sub-features and long-term user behavior sequence sub-features are obtained. In addition, in this application, the product identifier information in the preprocessed user behavior sequence data is modeled as a basic sequence to obtain the basic sequence sub-feature generated after sequence modeling.

[0044] Optionally, a recurrent neural network (RNN) or a long short-term memory network (LSTM) model can be used for sequence modeling.

[0045] In this application, after obtaining short-term user behavior sequence sub-features, medium-term user behavior sequence sub-features and long-term user behavior sequence sub-features, the storage format of short-term user behavior sequence sub-features, medium-term user behavior sequence sub-features and long-term user behavior sequence sub-features needs to be unified, in order to facilitate fast reuse of features and one-key migration ability of feature modeling when needed.

[0046] S103, fuse multiple user behavior sequence sub-features and basic sequence sub-features to obtain user behavior sequence features.

[0047] Optionally, the fusion of multiple user behavior sequence sub-features and basic sequence sub-features can be achieved by various common fusion methods (such as weighted average, splicing, addition, multiplication, etc.) to obtain the final user behavior sequence features generated after fusion.

[0048] Optionally, multiple user behavior sequence sub-features and basic sequence sub-features are aligned according to a time window, and then spliced or merged element by element to form the final user behavior sequence features, so as to integrate different time spans and different types of feature information together.

[0049] S104, obtain the product features corresponding to the candidate recommended products, input the product features and the user behavior sequence features into the click rate estimation model, obtain the click rate estimation score corresponding to each candidate recommended product, and generate a product recommendation list based on the click rate estimation score.

[0050] Wherein, the click rate refers to the ratio of the number of clicks and exposures of specified content on a website platform or APP, and the click rate is an important indicator in the recommendation system.

[0051] The click rate estimation model can be trained and generated according to feature logs and click order logs. The feature logs include product features and user behavior sequence features.

[0052] The product features can include product attribute features (such as product name, price, category, label, and the like), product context features (such as product popularity (such as hot-selling products, trend products, and the like), product inventory status, product delivery information), and the like.

[0053] The product features and the user behavior sequence features are input into the click rate estimation model to obtain a click rate estimation score corresponding to each candidate recommended product.

[0054] Optionally, the products with high scores can be placed in the front in descending order of the click rate estimation scores.

[0055] Optionally, a threshold can be set according to business needs, and only products with scores higher than the threshold are selected as recommended results.

[0056] The embodiment of the application provides a product recommendation method, including obtaining user behavior sequence data, wherein the user behavior sequence data includes product identification information, product attribute information, timestamp information, and behavior type information; performing sequence modeling on the user behavior sequence data at a plurality of time spans respectively, obtaining a plurality of user behavior sequence sub-features generated after sequence modeling, and performing sequence modeling on the product identification information to obtain a basic sequence sub-feature generated after sequence modeling; fusing the plurality of user behavior sequence sub-features and the basic sequence sub-feature to obtain user behavior sequence features; obtaining product features corresponding to candidate recommended products, inputting the product features and the user behavior sequence features into a click rate estimation model, obtaining a click rate estimation score corresponding to each candidate recommended product, and generating a product recommendation list based on the click rate estimation score. The embodiment of the application can capture the evolution and change trend of user behavior by performing sequence modeling on the user behavior sequence data at a plurality of time spans, can better understand the evolution of user interest and preference, and thus provides more accurate recommended results and improves customer satisfaction; the sequence modeling at a plurality of time spans can integrate data of different time periods, can improve the integrity and coverage of data, and reduces the inaccuracy of recommendation caused by data sparseness.

[0057] Further, after determining the product features corresponding to the candidate recommended products, the product features and the user behavior sequence features can be input into a conversion rate estimation model to obtain a conversion rate estimation score corresponding to each candidate recommended product.

[0058] After the click rate estimation score and the conversion rate estimation score corresponding to the candidate recommended commodity are obtained, as a realizable manner, the click rate estimation score and the conversion rate estimation score are weighted and summed to obtain a target score corresponding to the candidate recommended commodity, so as to determine the commodity recommendation list according to the target score.

[0059] After the click rate estimation score and the conversion rate estimation score corresponding to the candidate recommended commodity are obtained, as another realizable manner, the merchant promotion cost corresponding to each candidate recommended commodity is obtained based on the conversion rate estimation score corresponding to each candidate recommended commodity; for each candidate recommended commodity, the product of the merchant promotion cost corresponding to the candidate recommended commodity and the click rate estimation score corresponding to the candidate recommended commodity is obtained, and the product is taken as the target score corresponding to the candidate recommended commodity, so as to determine the commodity recommendation list according to the target score. In this way, the candidate commodity with a higher target score is ranked earlier, so that the promotion resources of the merchant can be more accurately placed on the commodities that are more likely to be converted into actual sales, thereby improving the promotion effect, and after the promotion is completed, the merchant can be conveniently charged for promotion.

[0060] Further, the click rate estimation model adopts a teacher-student model as a framework; the teacher model is usually responsible for training and providing guidance signals to the student model (such as generating a weight matrix), and the student model is used for online actual prediction. In this application, the teacher model adopts a permutation propagation network (PPnet) model, which can learn the individualized expression of different users, and the teacher model is used to obtain the weight matrix generated after training based on the sample training set and to transmit the weight matrix to the student model; the student model splits the weight matrix according to the feature domain, thereby reducing the complexity of matrix multiplication calculation, and performs online click rate estimation based on the weight sub-matrix obtained after splitting, thereby effectively reducing the time consumption of large-scale MLP network.

[0061] Further, with the growth of model calculation complexity and the growth of model parameter size, the current single central processing unit (CPU) architecture has limited computing power on one hand, which cannot take advantage of the high-performance computing of graphics processing unit (GPU) to realize online inference acceleration. On the other hand, the CPU storage capacity is limited, which cannot load the model with super large scale parameters, is not conducive to the expansion of the model size, and limits the expression ability of the model. In the present application, the click rate estimation model is divided into a calculation-intensive module and a storage-intensive module; the calculation-intensive module is deployed in a GPU cluster, and the calculation-intensive module is used for matrix calculation and vector operation; the storage-intensive module is deployed in a CPU cluster, and the storage-intensive module is used for storage of the sparse parameters corresponding to the click rate estimation model, so as to realize model acceleration.

[0062] Further, the model-related services of the click rate estimation model are divided into a main graph service, a calculation subgraph service and a data subgraph service. Figure 3 is a schematic diagram of the main graph service, the calculation subgraph service and the data subgraph service shown in the present application.

[0063] As shown in Figure 3 , in the present application, the click rate estimation model is loaded based on the main graph service, and the product features and user behavior sequence features input into the click rate estimation model are respectively subjected to hash operation to obtain their respective corresponding hash codes, and the hash codes are sent to the calculation subgraph service to obtain the click rate estimation score returned by the calculation subgraph service.

[0064] As shown in Figure 3 , in the present application, the calculation-intensive module is loaded based on the calculation subgraph service, which contains complex calculation networks such as Transformer and MLP, and the sparse parameters of the click rate estimation model are queried from the data subgraph service according to the hash codes, and the click rate estimation is performed based on the sparse parameters, and the click rate estimation score is sent to the main graph service.

[0065] As shown in Figure 3 , in the present application, the loading of the sparse parameters is realized in a distributed manner based on the data subgraph service, and the sparse parameters are divided into a plurality of shards and deployed as remote procedure call (RPC) services and stored in the storage-intensive module. The data subgraph service provides basic functions such as data query, data update and data deletion to the outside.

[0066] Further, the computing subgraph service generates a large kernel launch overhead and memory access overhead when executed on the GPU, and a scheme of operator fusion optimization using a deep learning compiler is usually adopted to optimize the above problems. The compiler bottom layer optimization is suitable for flexible model structure and does not need to implement new operators each time. The performance can be greatly improved through operator fusion and graph structure optimization, but the input dimension of the model substructure is required to be fixed. Due to the fixed input dimension of the recommendation scene feature, the deep learning compiler is triggered for just-in-time compilation, and the compilation time is unbearable for online inference.

[0067] Figure 4 is a partitioning diagram of a compilation subgraph shown in the present application, in the present application, the click rate estimation model is divided into multiple compilation subgraphs to solve the compilation time consumption problem of the online inference scene. XLA (Accelerated Linear Algebra) is a high-performance machine learning field compiler, and AD refers to Attributed Deep Embedding, which is a method of coupling node attributes and graph structure information for embedding learning, as shown in Figure 4 The product features and user behavior sequence features are compiled respectively to make their dimensions the same. In addition to the compilation subgraph corresponding to the product features and user behavior sequence features, the model deep calculation layer can also be divided into compilation subgraphs to accelerate the calculation. Each compilation subgraph corresponds to an execution unit, and the computing subgraph is optimized by the XLA engine during execution to significantly improve the efficiency.

[0068] Figure 5 is a schematic diagram of a compilation scheme shown in the present application, as shown in Figure 5 Before compilation, it is judged whether the product features and user behavior sequence features input into the click rate estimation model need to be pre-compiled. If pre-compilation has not been performed before and the current scene supports pre-compilation, it is considered that pre-compilation needs to be performed, then each compilation subgraph is divided into multiple feature buckets according to the feature dimension (such as the type of the feature). For any feature bucket, the input corresponding to the feature bucket is padded to a certain fixed shape based on the feature dimension corresponding to the feature bucket, and the compiled operation corresponding to the padded feature is performed based on the compilation subgraph to which the feature bucket belongs, and the compiled subgraph is optimized by the XLA engine after compilation.

[0069] If pre-compilation is not needed (for example, in the high real-time and high concurrency scene of online inference, the feature dimension is not covered in the pre-compilation range), the compilation operation is performed based on the compilation graph corresponding to the click rate estimation model and written back to the compilation cache.

[0070] Further, in the present application, the GPU adopts a fixed memory mode. Fixed memory can be directly accessed by physical memory by being fixed in physical memory, without the need to pass through the memory management of the operating system, and therefore has better performance in data transmission and can provide lower data transmission delay.

[0071] Further, the Compute Unified Device Architecture (CUDA) stream is a mechanism for parallel execution of GPU operations. TensorFlow uses only one CUDA Stream by default, which can cause competition between computation and data transmission, thereby reducing computational efficiency and failing to fully utilize GPU computing power. Therefore, in the present application, in order to improve the utilization rate of GPU cores, the present application expands the single CUDA Stream to multiple CUDA Streams through the multi-stream mechanism and multi-context mechanism, and creates a CUDA context for each CUDA stream, thereby solving the problem of kernel launch lock competition and improving GPU utilization. The CUDA context refers to a set of state information related to a certain CUDA stream. It includes resource allocation, memory management, device configuration, and other information of the program. Each CUDA stream is associated with an independent CUDA context to better manage computing tasks.

[0072] Figure 6 is a multi-CUDA stream computing diagram shown in the present application, as Figure 6 shown, in the processing of the GPU, the operation is performed based on multiple Compute Unified Device Architecture (CUDA) streams in the GPU, wherein each CUDA stream corresponds to a CUDA context.

[0073] Further, in the processing of the GPU, the tensor cores in the GPU perform operations based on high bandwidth and mixed precision, thereby accelerating the calculation speed of matrix multiplication. The tensor core (Tensor Cores) is a special hardware unit designed to accelerate tensor (matrix) operations, especially in deep learning and high-performance computing tasks, which can perform matrix multiplication and other operations with higher efficiency.

[0074] Figure 7 is a schematic diagram of a commodity recommendation device shown in the present application, as Figure 7 shown, the commodity recommendation device 700 includes an acquisition module 701, a modeling module 702, a generation module 703, and a recommendation module 704, wherein:

[0075] The acquisition module 701 is configured to acquire user behavior sequence data, wherein the user behavior sequence data comprises commodity identification information, commodity attribute information, timestamp information, and behavior type information.

[0076] The modeling module 702 is configured to perform sequence modeling on the user behavior sequence data respectively under a plurality of time spans, to acquire a plurality of user behavior sequence sub-features generated after sequence modeling, and to perform sequence modeling on the commodity identification information, to acquire a basic sequence sub-feature generated after sequence modeling.

[0077] The generation module 703 is configured to fuse the plurality of user behavior sequence sub-features and the basic sequence sub-feature, to obtain a user behavior sequence feature.

[0078] The recommendation module 704 is configured to acquire commodity features corresponding to candidate recommended commodities, to input the commodity features and the user behavior sequence feature into a click rate estimation model, to acquire a click rate estimation score corresponding to each candidate recommended commodity, and to generate a commodity recommendation list based on the click rate estimation score.

[0079] The device can capture the evolution and change trend of user behavior by performing sequence modeling on the user behavior sequence data under a plurality of time spans, can better understand the evolution of user interest and preference, and thus can provide more accurate recommendation results. The sequence modeling under a plurality of time spans can integrate data of different time periods, can improve the integrity and coverage of data, and can reduce recommendation inaccuracy caused by data sparseness.

[0080] Further, the commodity recommendation device 700 further comprises a model acceleration module, which is configured to: divide the click rate estimation model into a computation-intensive module and a storage-intensive module; deploy the computation-intensive module in a graphics processing unit (GPU) cluster, the computation-intensive module being configured to perform matrix calculation and vector operation; and deploy the storage-intensive module in a central processing unit (CPU) cluster, the storage-intensive module being configured to perform storage of sparse parameters corresponding to the click rate estimation model.

[0081] Further, the model acceleration module is further configured to: divide the model-related services of the click rate estimation model into a main graph service, a calculation subgraph service and a data subgraph service; load the click rate estimation model based on the main graph service, and perform hash operations on the product features and the user behavior sequence features input into the click rate estimation model to obtain their respective corresponding hash codes, and send the hash codes to the calculation subgraph service to obtain the click rate estimation score returned by the calculation subgraph service; load the calculation-intensive module based on the calculation subgraph service, and query the data subgraph service according to the hash codes to obtain the sparse parameters of the click rate estimation model, and perform click rate estimation based on the sparse parameters, and send the click rate estimation score to the main graph service; and load the sparse parameters in a distributed manner based on the data subgraph service, and the sparse parameters are divided into multiple shards and stored in the storage-intensive module.

[0082] Further, the model acceleration module is further configured to: divide the click rate estimation model into a plurality of compiled subgraphs; determine whether the product features and the user behavior sequence features input into the click rate estimation model need to be precompiled; if precompilation is needed, divide each compiled subgraph into a plurality of feature buckets according to the feature dimensions; for any feature bucket, perform feature padding on the input corresponding to the feature bucket based on the feature dimension corresponding to the feature bucket, and perform a compiled operation corresponding to the padded features based on the compiled subgraph to which the feature bucket belongs.

[0083] Further, the model acceleration module is further configured to: if precompilation is not needed, perform a compiled operation based on the compiled original graph corresponding to the click rate estimation model.

[0084] Further, the click rate estimation model adopts a teacher-student model as a framework; the teacher model adopts a PPnet model, and the teacher model is configured to obtain a weight matrix generated after training based on a sample training set and transmit the weight matrix to the student model; the student model splits the weight matrix according to feature domains, and performs online click rate estimation based on a weight submatrix generated after splitting.

[0085] Further, the GPU adopts a fixed memory mode, and in the processing process of the GPU, a plurality of CUDA (Compute Unified Device Architecture) streams in the GPU are used to perform operation processing, wherein each CUDA stream corresponds to a CUDA context.

[0086] Further, the model acceleration module is further configured to: in the processing process of the GPU, perform operations in a high-bandwidth and mixed-precision manner based on Tensor Cores in the GPU.

[0087] To implement the above embodiments, the embodiments of the present application further provide an electronic device 800, as shown in Figure 8As shown, the electronic device 800 includes a processor 801 and a memory 802 in communication with the processor. The memory 802 stores instructions executable by the at least one processor 801 for implementing the commodity recommendation method as shown in the above embodiments.

[0088] To implement the above embodiments, the embodiments of the present application further provide a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to implement the commodity recommendation method as shown in the above embodiments.

[0089] To implement the above embodiments, the embodiments of the present application further provide a computer program product comprising a computer program, the computer program being executed by a processor to implement the commodity recommendation method as shown in the above embodiments.

[0090] In the description of the present application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", "clockwise", "counterclockwise", "axial", "radial", "circumferential" and the like indicate the orientation or positional relationship shown in the drawings based on the orientation or positional relationship shown in the drawings, and are only for the purpose of facilitating the description of the present application and simplifying the description, and therefore cannot be understood as indicating or implying that the device or element referred to must have a particular orientation, be constructed and operated in a particular orientation, and therefore cannot be understood as limiting the present application.

[0091] In addition, the terms "first", "second", "third", etc. are only used for descriptive purpose and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the technical features indicated. Therefore, the features defined with "first", "second", etc. can explicitly or implicitly include one or more of the features. In the description of the present application, the meaning of "a plurality of" is two or more, unless otherwise specifically limited.

[0092] In the description of the present application, the description of the terms "one embodiment", "some embodiments", "an example", "a specific example", or "some examples" and the like means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In the description of the present application, the illustrative description of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in any one or more embodiments or examples. In addition, the skilled in the art can combine and combine the different embodiments or examples described in the present application and the features of the different embodiments or examples, without contradiction.

[0093] Although the embodiments of the present application have been shown and described above, it is understood that the above-described embodiments are exemplary and are not to be construed as limiting the present application, and that changes, modifications, substitutions and variations can be made by those skilled in the art without departing from the scope of the present application.

Claims

1. A product recommendation method characterized by comprising: The method comprises the following steps: obtaining user behavior sequence data, wherein the user behavior sequence data comprises commodity identification information, commodity attribute information, timestamp information and behavior type information; sequentially modeling the user behavior sequence data at multiple time spans respectively to obtain multiple user behavior sequence sub-features generated after sequence modeling, and sequentially modeling the commodity identification information to obtain basic sequence sub-features generated after sequence modeling; fusing the multiple user behavior sequence sub-features and the basic sequence sub-features to obtain user behavior sequence features; obtaining commodity features corresponding to candidate recommended commodities, inputting the commodity features and the user behavior sequence features into a click rate estimation model to obtain a click rate estimation score corresponding to each of the candidate recommended commodities, and generating a commodity recommendation list based on the click rate estimation score; wherein the method further comprises: dividing the click rate estimation model into a computation-intensive module and a storage-intensive module; dividing model-related services of the click rate estimation model into a main graph service, a calculation sub-graph service and a data sub-graph service; loading the click rate estimation model based on the main graph service, and performing hash operation on the commodity features and the user behavior sequence features input into the click rate estimation model respectively to obtain their respective corresponding hash codes, and sending the hash codes to the calculation sub-graph service to obtain the click rate estimation score returned by the calculation sub-graph service; loading the computation-intensive module based on the calculation sub-graph service, querying the data sub-graph service according to the hash codes to obtain sparse parameters of the click rate estimation model, performing click rate estimation based on the sparse parameters, and sending the click rate estimation score to the main graph service; loading the sparse parameters in a distributed manner based on the data sub-graph service, wherein the sparse parameters are divided into multiple shards and stored in the storage-intensive module.

2. The method of claim 1, wherein, The method further comprises: deploying the computation-intensive module in a graphics processing unit (GPU) cluster, wherein the computation-intensive module is used for matrix calculation and vector operation; deploying the storage-intensive module in a central processing unit (CPU) cluster, wherein the storage-intensive module is used for storing sparse parameters corresponding to the click rate estimation model.

3. The method according to claim 1 or 2, characterized in that, The method further comprises: dividing the click rate estimation model into multiple compiled sub-graphs; determining whether the commodity features and the user behavior sequence features input into the click rate estimation model need to be pre-compiled; if pre-compilation is needed, dividing each of the compiled sub-graphs into multiple feature buckets according to feature dimensions; for any feature bucket, performing feature padding on the input corresponding to the feature bucket based on the feature dimension corresponding to the feature bucket, and performing a compiled operation corresponding to the padded features based on the compiled sub-graph to which the feature bucket belongs.

4. The method of claim 3, wherein, The method further comprises: if pre-compilation is not needed, performing a compiled operation based on a compiled original graph corresponding to the click rate estimation model.

5. The method of claim 1, wherein, The method further comprises: the click rate estimation model adopts a teacher-student model as a framework; The teacher model adopts a PPnet model, and the teacher model is used to obtain a weight matrix generated after training based on a sample training set and deliver the weight matrix to the student model. The student model splits the weight matrix according to a feature field, and performs online click rate estimation based on a weight sub-matrix generated after splitting.

6. The method of claim 2, wherein, The GPU adopts a fixed memory mode, and during processing of the GPU, each CUDA stream corresponds to a CUDA context.

7. The method of claim 6, wherein, The method further includes: During processing of the GPU, the Tensor Cores in the GPU perform operations in a high-bandwidth and mixed-precision mode.

8. A commodity recommendation device characterized by comprising: It includes: An acquisition module is configured to acquire user behavior sequence data, wherein the user behavior sequence data includes product identification information, product attribute information, timestamp information, and behavior type information; A modeling module is configured to perform sequence modeling on the user behavior sequence data under a plurality of time spans, respectively, to obtain a plurality of user behavior sequence sub-features generated after sequence modeling, and to perform sequence modeling on the product identification information to obtain a basic sequence sub-feature generated after sequence modeling; A generation module is configured to fuse the plurality of user behavior sequence sub-features and the basic sequence sub-feature to obtain user behavior sequence features; A recommendation module is configured to acquire product features corresponding to candidate recommended products, input the product features and the user behavior sequence features into a click rate estimation model, acquire a click rate estimation score corresponding to each candidate recommended product, and generate a product recommendation list based on the click rate estimation score; A model acceleration module is configured to divide the click rate estimation model into a computation-intensive module and a storage-intensive module, divide model-related services of the click rate estimation model into a main graph service, a computation sub-graph service, and a data sub-graph service, load the click rate estimation model based on the main graph service, perform hash operation on product features and user behavior sequence features input into the click rate estimation model to obtain hash codes corresponding to the product features and the user behavior sequence features, respectively, send the hash codes to the computation sub-graph service to obtain a click rate estimation score returned by the computation sub-graph service, load the computation-intensive module based on the computation sub-graph service, query the data sub-graph service according to the hash codes to obtain sparse parameters of the click rate estimation model, perform click rate estimation based on the sparse parameters, and send the click rate estimation score to the main graph service, and load the sparse parameters in a distributed manner based on the data sub-graph service, wherein the sparse parameters are divided into a plurality of shards and stored in the storage-intensive module.

9. An electronic device, comprising: at least one processor; and a memory connected in communication with the at least one processor; wherein The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-7.

10. A non-transitory computer readable storage medium having stored thereon computer instructions, wherein, The computer instructions are for causing the computer to perform the method of any one of claims 1-7.

11. A computer program product comprising computer program which, when executed by a processor, implements the steps of the method according to any one of claims 1-7.

Citation Information

Patent Citations

  • Session social recommendation method based on multi-modal cross fusion graph network

    CN112685657A

  • Session recommendation enhancement method based on double composition

    CN117807281A