Object recommendation method and apparatus, storage medium, and electronic device

By generating personalized feature vectors through multi-layer processing of the target model, the problem of low accuracy in recommending objects in the traditional dual-tower model is solved, and more accurate object recommendation is achieved.

CN122240912APending Publication Date: 2026-06-19ALIBABA (BEIJING) SOFTWARE SERVICES CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
ALIBABA (BEIJING) SOFTWARE SERVICES CO LTD
Filing Date
2026-02-03
Publication Date
2026-06-19

AI Technical Summary

Technical Problem

The traditional dual-tower model cannot fully consider the complexity of object features and their deep correlation with users' personalized preferences, resulting in an incomplete assessment of the matching degree between recommended objects and users' interests, which reduces the relevance and attractiveness of the recommendations.

Method used

The target model employs a first encoder to process the object recommendation request, user description information, and target feature character sequence to generate a first feature vector. A second encoder then processes the object description information to generate a second feature vector. Combining these two vectors, the model identifies the object to be recommended from multiple objects. This model utilizes multiple layers, including embedding layers, linear transformation layers, encoding layers, and attention layers, to improve the accuracy of feature extraction and matching.

🎯Benefits of technology

It improves the accuracy and relevance of recommended objects, better captures the fine-grained matching between objects and user interests, provides personalized and in-depth understanding of user needs, and enhances the representation capabilities of the product side.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122240912A_ABST
    Figure CN122240912A_ABST
Patent Text Reader

Abstract

This application discloses an object recommendation method, apparatus, storage medium, and electronic device. Relating to the field of artificial intelligence technology, the method includes: receiving an object recommendation request and acquiring user description information and object description information of multiple objects; processing the object recommendation request, user description information, and target feature character sequence using a first encoder of a target model to obtain a first feature vector, wherein the target feature character sequence is feature representation information learned by the first encoder during training; processing the object description information using a second encoder of the target model to obtain a second feature vector; and determining the object to be recommended corresponding to the object recommendation request from multiple objects based on the first and second feature vectors. This application solves the technical problem of low accuracy in object recommendation in related technologies.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of artificial intelligence technology, and more specifically, to an object recommendation method and apparatus, a storage medium, and an electronic device. Background Technology

[0002] In the field of search and recommendation systems, the dual-tower model has become the mainstream architecture for the coarse-ranking stage due to its efficiency and scalability. However, the traditional dual-tower model cannot fully consider the complexity of object features and their deep correlation with users' personalized preferences. This results in an incomplete assessment of the match between objects and user interests, reducing the relevance and attractiveness of the recommendations.

[0003] There is currently no effective solution to the technical problem of low accuracy in the recommended targets in the aforementioned related technologies. Summary of the Invention

[0004] This application provides an object recommendation method and apparatus, storage medium and electronic device to at least solve the technical problem of low accuracy of recommended objects in related technologies.

[0005] According to one aspect of the embodiments of this application, an object recommendation method is provided, comprising: receiving an object recommendation request and obtaining user description information and object description information of a plurality of objects; processing the object recommendation request, the user description information, and a target feature character sequence through a first encoder of a target model to obtain a first feature vector, wherein the target feature character sequence is feature representation information learned by the first encoder during training; processing the object description information through a second encoder of the target model to obtain a second feature vector; and determining the object to be recommended corresponding to the object recommendation request from the plurality of objects based on the first feature vector and the second feature vector.

[0006] Furthermore, before processing the object recommendation request, the user description information, and the target feature character sequence through the first encoder of the target model, the method further includes: vectorizing the object recommendation request through the target embedding layer in the first encoder to obtain a first embedding vector; vectorizing the attribute parameters in the user description information through the target embedding layer to obtain a second embedding vector; vectorizing the historical behavior data in the user description information through the target embedding layer to obtain a third embedding vector; and processing the object recommendation request, the user description information, and the target feature character sequence through the first encoder of the target model to obtain a first feature vector includes: processing the first embedding vector, the second embedding vector, the third embedding vector, and the target feature character sequence through the first encoder to obtain the first feature vector.

[0007] Further, processing the object recommendation request, the user description information, and the target feature character sequence through the first encoder of the target model to obtain the first feature vector includes: processing the object recommendation request and the user description information through the linear transformation layer in the first encoder of the target model to obtain the first feature character sequence; concatenating the first feature character sequence and the target feature character sequence to obtain the second feature character sequence; and extracting features from the second feature character sequence through the encoding layer in the first encoder of the target model to obtain the first feature vector.

[0008] Further, the extraction of features from the second feature character sequence through the encoding layer in the first encoder of the target model to obtain the first feature vector includes: normalizing the second feature character sequence through the first normalization layer in the encoding layer to obtain a first initial feature vector; calculating the first initial feature vector through the attention layer in the encoding layer to obtain a calculated feature vector, and obtaining a second initial feature vector based on the first initial feature vector and the calculated feature vector; normalizing the second initial feature vector through the second normalization layer in the encoding layer to obtain a third initial feature vector; and obtaining the first feature vector based on the third initial feature vector and the second initial feature vector.

[0009] Further, obtaining the first feature vector based on the third initial feature vector and the second initial feature vector includes: calculating the third initial feature vector and the second initial feature vector to obtain a fourth initial feature vector; obtaining the position index of the target feature character sequence in the second feature character sequence; and determining the first feature vector from the fourth initial feature vector based on the position index.

[0010] Further, processing the object recommendation request and the user description information through the linear transformation layer in the first encoder of the target model to obtain the first feature character sequence includes: processing the profile information in the object recommendation request and the user description information through the first transformation layer in the linear transformation layer to obtain the first feature character subsequence, wherein the first feature character subsequence includes at least: the feature character corresponding to the object recommendation request and the character index information corresponding to the object recommendation request; processing the behavioral information in the user description information through the second transformation layer in the linear transformation layer to obtain the second feature character subsequence, wherein the parameters corresponding to the first transformation layer and the second transformation layer are different; and obtaining the first feature character sequence based on the first feature character subsequence and the second feature character subsequence.

[0011] Further, processing the object description information through the second encoder of the target model to obtain the second feature vector includes: processing the object description information through a set of projection matrices in the second encoder of the target model to obtain a set of projection vectors corresponding to the object description information, wherein the set of projection matrices includes: a query projection matrix, a key projection matrix, and a value projection matrix, and the set of projection vectors includes: a query projection vector, a key projection vector, and a value projection vector; calculating an attention vector based on the query projection vector, the key projection vector, and the value projection vector; calculating the attention vector through a feedforward network in the second encoder of the target model to obtain a calculated attention vector; and calculating the calculated attention vector and the attention vector to obtain the second feature vector.

[0012] Further, the attention vector is calculated based on the query projection vector, the key projection vector, and the value projection vector, including: segmenting and reshaping the key projection vector to obtain a first preset number of first latent space vectors; segmenting and reshaping the value projection vector to obtain a first preset number of second latent space vectors; processing the query projection vector to obtain a second preset number of third latent space vectors; and calculating the attention vector based on the first latent space vector, the second latent space vector, and the third latent space vector.

[0013] Further, the attention vector is calculated based on the first latent space vector, the second latent space vector, and the third latent space vector, including: calculating the transpose of the first latent space vector and the third latent space vector to obtain a first calculation result; normalizing the first calculation result based on the dimension information corresponding to the latent space vector to obtain a normalized calculation result; and calculating the attention vector using the normalized calculation result and the second latent space vector.

[0014] Further, the target model is trained using the following steps: obtaining a training sample set, wherein the training sample set consists of first sample description information of sample objects, sample recommendation requests, second sample description information of multiple sample objects, and real labels corresponding to the multiple sample objects respectively, the real labels being used to characterize the matching degree between the sample objects; processing the first sample description information, the sample recommendation requests, and the initial feature character sequence through the first encoder of the initial model to obtain the first sample feature vector corresponding to the sample object, and processing the second sample description information through the second encoder in the initial model to obtain the second sample feature vector corresponding to the multiple sample objects respectively; obtaining the predicted matching degree corresponding to the multiple sample objects based on the first sample feature vector and the second sample feature vector; and iterating the initial model based on the predicted matching degree and the real labels to obtain the target model.

[0015] Furthermore, before processing the first sample description information, the sample recommendation request, and the initial feature character sequence through the first encoder of the initial model, the method further includes: obtaining the dimension information corresponding to the sample feature vector; and randomly initializing the initial feature character sequence based on the dimension information.

[0016] Furthermore, the method further includes: when it is detected that the current initial model meets the conditions for ending training, obtaining the current sample feature vector output by the first encoder in the current initial model; and obtaining the target feature character sequence based on the current sample feature vector.

[0017] According to another aspect of the embodiments of this application, an object recommendation method is also provided, comprising: receiving an object recommendation request uploaded by a client; obtaining user description information and object description information of multiple objects from a cloud server; processing the object recommendation request, the user description information, and a target feature character sequence through a first encoder of a target model to obtain a first feature vector, wherein the target feature character sequence is feature representation information learned by the first encoder during training; processing the object description information through a second encoder of the target model to obtain a second feature vector; determining the object to be recommended corresponding to the object recommendation request from the multiple objects based on the first feature vector and the second feature vector; and returning the object to be recommended to the client.

[0018] According to another aspect of the embodiments of this application, an object recommendation apparatus is also provided, comprising: a receiving unit, configured to receive an object recommendation request and acquire user description information and object description information of a plurality of objects; a first processing unit, configured to process the object recommendation request, the user description information, and a target feature character sequence through a first encoder of a target model to obtain a first feature vector, wherein the target feature character sequence is feature representation information learned by the first encoder during training; a second processing unit, configured to process the object description information through a second encoder of the target model to obtain a second feature vector; and a first determining unit, configured to determine the object to be recommended corresponding to the object recommendation request from the plurality of objects based on the first feature vector and the second feature vector.

[0019] Furthermore, the apparatus further includes: a third processing unit, configured to vectorize the object recommendation request through a target embedding layer in the first encoder before processing the object recommendation request, the user description information, and the target feature character sequence through the first encoder of the target model, to obtain a first embedding vector; a fourth processing unit, configured to vectorize the attribute parameters in the user description information through the target embedding layer, to obtain a second embedding vector; a fifth processing unit, configured to vectorize the historical behavior data in the user description information through the target embedding layer, to obtain a third embedding vector; the first processing unit is also configured to process the first embedding vector, the second embedding vector, the third embedding vector, and the target feature character sequence through the first encoder to obtain the first feature vector.

[0020] Further, the first processing unit includes: a first processing subunit, used to process the object recommendation request and the user description information through a linear transformation layer in the first encoder of the target model to obtain a first feature character sequence; a second processing subunit, used to concatenate the first feature character sequence and the target feature character sequence to obtain a second feature character sequence; and an extraction subunit, used to extract features from the second feature character sequence through an encoding layer in the first encoder of the target model to obtain the first feature vector.

[0021] Further, the extraction subunit includes: a first processing module, configured to normalize the second feature character sequence through a first normalization layer in the encoding layer to obtain a first initial feature vector; a first calculation module, configured to calculate the first initial feature vector through an attention layer in the encoding layer to obtain a calculated feature vector, and to obtain a second initial feature vector based on the first initial feature vector and the calculated feature vector; a second processing module, configured to normalize the second initial feature vector through a second normalization layer in the encoding layer to obtain a third initial feature vector; and a first determination module, configured to obtain the first feature vector based on the third initial feature vector and the second initial feature vector.

[0022] Further, the first determining module includes: a first calculation submodule, used to calculate the third initial feature vector and the second initial feature vector to obtain a fourth initial feature vector; an acquisition submodule, used to acquire the position index of the target feature character sequence in the second feature character sequence; and a determining submodule, used to determine the first feature vector from the fourth initial feature vector based on the position index.

[0023] Further, the first processing subunit includes: a third processing module, used to process the profile information in the object recommendation request and user description information through the first transformation layer in the linear transformation layer to obtain a first feature character subsequence, wherein the first feature character subsequence includes at least: the feature character corresponding to the object recommendation request and the character index information corresponding to the object recommendation request; a fourth processing module, used to process the behavioral information in the user description information through the second transformation layer in the linear transformation layer to obtain a second feature character subsequence, wherein the parameters corresponding to the first transformation layer and the second transformation layer are different; and a second determining module, used to obtain the first feature character sequence based on the first feature character subsequence and the second feature character subsequence.

[0024] Further, the second processing unit includes: a third processing subunit, used to process the object description information through a set of projection matrices in the second encoder of the target model to obtain a set of projection vectors corresponding to the object description information, wherein the set of projection matrices includes a query projection matrix, a key projection matrix, and a value projection matrix, and the set of projection vectors includes a query projection vector, a key projection vector, and a value projection vector; a first calculation subunit, used to calculate an attention vector based on the query projection vector, the key projection vector, and the value projection vector; a second calculation subunit, used to calculate the attention vector through a feedforward network in the second encoder of the target model to obtain a calculated attention vector; and a third calculation subunit, used to calculate the calculated attention vector and the attention vector to obtain the second feature vector.

[0025] Further, the first computational subunit includes: a fifth processing module, used to segment and reshape the key projection vector to obtain a first preset number of first latent space vectors; a sixth processing module, used to segment and reshape the value projection vector to obtain a first preset number of second latent space vectors; a seventh processing module, used to process the query projection vector to obtain a second preset number of third latent space vectors; and a second computational module, used to calculate based on the first latent space vector, the second latent space vector, and the third latent space vector to obtain the attention vector.

[0026] Further, the second calculation module includes: a second calculation submodule, used to calculate the transpose of the first latent space vector and the third latent space vector to obtain a first calculation result; a processing submodule, used to normalize the first calculation result based on the dimension information corresponding to the latent space vector, and a normalized calculation result; and a third calculation submodule, used to calculate the attention vector by combining the normalized calculation result and the second latent space vector.

[0027] Further, the target model is trained using the following apparatus: a first acquisition unit, configured to acquire a training sample set, wherein the training sample set consists of first sample description information of sample objects, sample recommendation requests, second sample description information of multiple sample objects, and real labels corresponding to the multiple sample objects respectively, the real labels being used to characterize the matching degree between the sample objects; a sixth processing unit, configured to process the first sample description information, the sample recommendation requests, and the initial feature character sequence through the first encoder of the initial model to obtain the first sample feature vector corresponding to the sample object, and to process the second sample description information through the second encoder in the initial model to obtain the second sample feature vector corresponding to the multiple sample objects respectively; a second determination unit, configured to determine the predicted matching degree corresponding to the multiple sample objects based on the first sample feature vector and the second sample feature vector; and an iteration unit, configured to iterate the initial model based on the predicted matching degree and the real labels to obtain the target model.

[0028] Furthermore, the device further includes: a second acquisition unit, configured to acquire dimension information corresponding to the sample feature vector before processing the first sample description information, the sample recommendation request, and the initial feature character sequence through the first encoder of the initial model; and a seventh processing unit, configured to randomly initialize the initial feature character sequence based on the dimension information.

[0029] Furthermore, the device further includes: a third acquisition unit, configured to acquire the current sample feature vector output by the first encoder in the current initial model when the current initial model is detected to meet the conditions for ending training; and a third determination unit, configured to obtain the target feature character sequence based on the current sample feature vector.

[0030] According to another aspect of the embodiments of this application, an electronic device is also provided, including: a memory storing an executable program; and a processor for running the program, wherein the program executes the object recommendation method of any of the above-mentioned methods during runtime.

[0031] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, which stores a program, wherein the program controls the device where the storage medium is located to execute the object recommendation method of any of the above-mentioned methods during runtime.

[0032] According to another aspect of the embodiments of this application, a computer program object is also provided, including a computer program or instructions, wherein the computer program or instructions, when executed by a processor, are the object recommendation method described in any of the above.

[0033] In this embodiment, the following steps are employed: receiving an object recommendation request and obtaining user description information and object description information of multiple objects; processing the object recommendation request, user description information, and target feature character sequence through a first encoder of the target model to obtain a first feature vector, wherein the target feature character sequence is the feature representation information learned by the first encoder during training; processing the object description information through a second encoder of the target model to obtain a second feature vector; and determining the object to be recommended corresponding to the object recommendation request from multiple objects based on the first and second feature vectors, thereby solving the technical problem of low accuracy of recommended objects in related technologies.

[0034] In this application, an object recommendation request is received, and user description information and object description information of multiple objects are obtained. A first encoder processes the object recommendation request, user description information (user-side information), and target feature character sequence. The target feature character sequence is learned by the model during training, enabling the first encoder to generate a more specific and personalized first feature vector. The first feature vector integrates the user's real-time search intent, long-term interests, and feature representation information extracted by the model from the training data, thus providing a deep understanding of user needs. A second encoder processes the object description information (object-side information) to obtain a second feature vector that comprehensively reflects the characteristics of the object. Finally, based on the similarity or relevance between the first and second feature vectors, objects that meet the user's current needs and interests are accurately selected from multiple objects. The first encoder can achieve dynamic feature cross-fertilization and integration for different user requests, making the user feature vector more personalized. The second feature vector generated by the second encoder contains comprehensive information about the product, enhancing the representation capability of the product side. The first and second feature vectors can better capture the fine-grained matching between the object and the user's interests, thereby achieving the technical effect of improving the accuracy and relevance of the recommendation. Attached Figure Description

[0035] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0036] Figure 1 This is a hardware structure block diagram of a computer terminal provided according to an embodiment of this application;

[0037] Figure 2 This is a flowchart of the object recommendation method provided according to Embodiment 1 of this application;

[0038] Figure 3 This is a schematic diagram of the target model provided according to Embodiment 1 of this application;

[0039] Figure 4 This is a flowchart of the object recommendation method provided according to Embodiment 2 of this application;

[0040] Figure 5 This is a schematic diagram of an object recommendation device according to Embodiment 3 of this application;

[0041] Figure 6 This is a structural block diagram of an electronic device provided according to Embodiment 4 of this application. Detailed Implementation

[0042] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0043] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, object, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, objects, or apparatus.

[0044] 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, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties. Furthermore, the collection, use and processing of the relevant data must comply with the relevant laws, regulations and standards of the relevant regions, and corresponding operation entry points are provided for users to choose to authorize or refuse.

[0045] Example 1

[0046] According to an embodiment of this application, an object recommendation method is also provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0047] The method embodiment provided in Embodiment 1 of this application can be executed on a mobile terminal, computer terminal, or similar computing device. Figure 1 A hardware block diagram of a computer terminal (or mobile device) for implementing an object recommendation method is shown. Figure 1 As shown, the computer terminal (or mobile device) 10 may include a processor set 102 (the processor set 102 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA, and the processor set 102 may include a processor set, Figure 1 The data is illustrated using 102a, 102b, ..., 102n. A memory 104 is used for storing data, and a transmission module 106 is used for communication functions. In addition, it may include: a display, an input / output interface (I / O interface), a Universal Serial Bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0048] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10 (or mobile device). As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).

[0049] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the object recommendation method in this embodiment. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby implementing the object recommendation method described above. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0050] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0051] The display may be, for example, a touchscreen LCD display that allows the user to interact with the user interface of the computer terminal 10 (or mobile device).

[0052] Under the aforementioned operating environment, this application provides the following: Figure 2 The recommended method for the object shown. Figure 2 This is a flowchart of an object recommendation method according to Embodiment 1 of this application. The object recommendation method includes:

[0053] Step S201: Receive object recommendation request and obtain user description information and object description information of multiple objects.

[0054] Optionally, the user's object recommendation request can be received through a front-end interface, such as through an interactive interface in the application. It should be noted that the above-mentioned objects can refer to products in the e-commerce field, or video materials, article materials, etc. in an application.

[0055] The platform can obtain user description information based on user authorization. This information may include the user's search history, purchase records, browsing preferences, favorites list, and user profiles built based on relevant user behaviors. Simultaneously, it can obtain object description information for multiple objects. This object description information describes the characteristics of the objects, including but not limited to multimodal features such as object title, description text, sales volume (read count), reviews, attribute tags, category, brand information, and images, as well as statistical information such as object popularity and freshness. Object description information helps the model understand and evaluate the degree of match between products and user needs.

[0056] In an optional embodiment, the acquired user description information and object description information can be filtered to remove irrelevant or redundant features. The user's object recommendation request can also be preprocessed, such as by keyword extraction, semantic parsing, and intent recognition.

[0057] Step S202: The object recommendation request, user description information and target feature character sequence are processed by the first encoder of the target model to obtain the first feature vector, wherein the target feature character sequence is the feature representation information learned by the first encoder during training.

[0058] Optionally, a target model is determined, which includes at least a first encoder and a second encoder. The first encoder processes user-side information, and the second encoder processes object-side information. A first feature vector is obtained by processing the object recommendation request, user description information, and target feature character sequence using the first encoder.

[0059] For example, user feature sequences are constructed based on information such as search history, purchase records, browsing preferences, and favorites lists. Simultaneously, key attributes from the user profile, such as interests and hobbies, are also incorporated into the feature sequences. The target feature character sequence is an abstract feature representation learned by the first encoder from a large amount of user behavior data during model training. It contains key elements that can distinguish and describe the evolution of user interests, such as which attributes of products a user tends to focus on or their preference for certain types of products. This sequence is added to the user's real-time request data, helping the model to more finely characterize user features.

[0060] The first encoder can use deep learning techniques, such as self-attention, to perform deep processing on the above feature sequence. This mechanism can dynamically assign weights based on the relative importance of each feature item in the sequence, thereby extracting feature combinations that reflect the user's personalized needs.

[0061] Step S203: The object description information is processed by the second encoder of the target model to obtain the second feature vector.

[0062] Optionally, various features in the object description information, such as the object title, description text, and user reviews, can first be transformed into dense vector representations through feature embedding. This process helps capture the inherent meaning of unstructured data (such as text) while unifying the representation of numerical and categorical features, facilitating subsequent encoder processing. The second encoder then fuses and transforms the embedded vectors to obtain a second feature vector that integrates all the key information of the object.

[0063] Step S204: Based on the first feature vector and the second feature vector, determine the object to be recommended corresponding to the object recommendation request from multiple objects.

[0064] Optionally, after generating the first feature vector on the user side and the second feature vector on the object side, multiple objects are filtered based on the first and second feature vectors to obtain the objects to be recommended. For example, the degree of matching between user preferences and object characteristics is measured by calculating the inner product between the first and second feature vectors. The larger the inner product, the higher the user's interest in the product.

[0065] In an optional embodiment, the object to be recommended corresponding to the object recommendation request is determined from multiple objects by calculating the similarity between the first feature vector and the second feature vector or by directly predicting the user's click-through rate (CTR, which is the proportion of recommended content clicked by the user in search, recommendation system and other scenarios) or conversion rate (CVR, which is used to measure the success rate from the user clicking on an object to the actual purchase or completion of the expected action).

[0066] In summary, the system receives object recommendation requests, obtains user description information, and acquires object description information for multiple objects. A first encoder processes the object recommendation request, user description information (user-side information), and target feature character sequence. The target feature character sequence, learned during model training, enables the first encoder to generate a more specific and personalized first feature vector. This first feature vector integrates the user's real-time search intent, long-term interests, and feature representation information extracted from the training data, thus providing a deep understanding of user needs. The second encoder processes the object description information (object-side information) to obtain a second feature vector that comprehensively reflects the object's characteristics. Finally, based on the similarity or relevance between the first and second feature vectors, it accurately selects recommended objects that match the user's current needs and interests from multiple objects. The first encoder can dynamically cross-reference and integrate features for different user requests, making the user feature vector more personalized. The second feature vector generated by the second encoder contains comprehensive product information, enhancing the product-side representation capability. The first and second feature vectors better capture the fine-grained matching between objects and user interests, thereby improving the accuracy and relevance of recommendations.

[0067] To improve the processing efficiency of the encoder, in the object recommendation method provided in Embodiment 1 of this application, before processing the object recommendation request, user description information, and target feature character sequence through the first encoder of the target model, the method further includes: vectorizing the object recommendation request through the target embedding layer in the first encoder to obtain a first embedding vector; vectorizing the attribute parameters in the user description information through the target embedding layer to obtain a second embedding vector; vectorizing the historical behavior data in the user description information through the target embedding layer to obtain a third embedding vector; and processing the object recommendation request, user description information, and target feature character sequence through the first encoder of the target model to obtain a first feature vector includes: processing the first embedding vector, the second embedding vector, the third embedding vector, and the target feature character sequence through the first encoder to obtain a first feature vector.

[0068] Optionally, upon receiving an object recommendation request, the target embedding layer in the first encoder performs preliminary vectorization processing on the request. For example, it converts keywords, phrases, or specific needs contained in the request into mathematical vectors so that the encoder can capture and understand the user's specific needs and interests. In addition to the object recommendation request, the user's attribute parameters also need to be vectorized. Examples include user profiles and user consumption habits. The target embedding layer converts these parameters into vectors, obtaining the second embedding vector.

[0069] By using a target embedding layer, the user's historical behavioral data, such as past search records, purchase history, and browsing preferences, is transformed into a third embedding vector, ensuring that the encoder can understand and assess changes in the user's long-term interests and short-term needs.

[0070] Finally, the first embedding vector, the second embedding vector, the third embedding vector, and the target feature character sequence (i.e., the feature representation information learned by the encoder during training) are processed by the first encoder to obtain the first feature vector mentioned above.

[0071] In an optional embodiment, when processing the object description information through the second encoder, the object description information, such as the object's title, description, category tags, and rating information, can also be converted into a fixed-dimensional vector representation through the target embedding layer of the second encoder. This generates a second feature vector that comprehensively reflects the object's characteristics and advantages. The second feature vector works in conjunction with the user-side first feature vector to participate in subsequent matching and ranking algorithms, ultimately generating a personalized object recommendation list.

[0072] By integrating information from different sources into vector representations, encoders can capture the characteristics of users and objects more comprehensively, thereby improving the accuracy and personalization of recommendations.

[0073] To improve the comprehensiveness and accuracy of the first feature vector, in the object recommendation method provided in Embodiment 1 of this application, the object recommendation request, user description information, and target feature character sequence are processed by the first encoder of the target model to obtain the first feature vector, including: processing the object recommendation request and user description information through the linear transformation layer in the first encoder of the target model to obtain the first feature character sequence; concatenating the first feature character sequence and the target feature character sequence to obtain the second feature character sequence; and extracting features from the second feature character sequence through the encoding layer in the first encoder of the target model to obtain the first feature vector.

[0074] Optionally, upon receiving an object recommendation request, the received object recommendation request information, including keywords, request type, and user description information (user behavior data, preference settings, etc.), is initially transformed by linear projection through the linear transformation layer in the first encoder. This transforms the information into a new feature space, resulting in a first feature character sequence. The purpose of this is to ensure that information from different sources can be processed and compared under a unified standard, thus improving data compatibility.

[0075] After obtaining the first feature character sequence, the first feature character sequence and the target feature character sequence are concatenated to obtain the second feature character sequence.

[0076] Finally, feature extraction is performed on the second feature character sequence through an encoding layer to obtain the first feature vector. For example, through iterative calculation, key features in the second feature character sequence are identified and enhanced, while irrelevant or redundant feature information is suppressed to generate the first feature vector. The first feature vector can more accurately summarize the user's needs and preferences.

[0077] Linear transformation and feature concatenation enhance the model's information integration capabilities. Information from different dimensions is transformed and fused equally, ensuring that the full picture of user information is considered and avoiding recommendation bias caused by information fragmentation. The feature extraction process in the encoding layer further improves the accuracy and granularity of the first feature vector, thereby providing more personalized and forward-looking recommendations.

[0078] To further improve the comprehensiveness and accuracy of the first feature vector, in the object recommendation method provided in Embodiment 1 of this application, the extraction of features from the second feature character sequence through the encoding layer in the first encoder of the target model to obtain the first feature vector includes: normalizing the second feature character sequence through the first normalization layer in the encoding layer to obtain a first initial feature vector; calculating the first initial feature vector through the attention layer in the encoding layer to obtain a calculated feature vector, and obtaining a second initial feature vector based on the first initial feature vector and the calculated feature vector; normalizing the second initial feature vector through the second normalization layer in the encoding layer to obtain a third initial feature vector; and obtaining the first feature vector based on the third initial feature vector and the second initial feature vector.

[0079] Optionally, the encoding layer includes at least a normalization layer and an attention layer. First, the first normalization layer in the encoding layer performs normalization processing on the concatenated second feature character sequence to obtain the first initial feature vector. The introduction of the normalization operation aims to eliminate the dimensional differences between different features, ensuring that the features are all under the same basic conditions during the calculation process, and avoiding unfair influence of some features on the results due to their large numerical range.

[0080] Then, the attention layer receives the first initial feature vector and calculates the attention weights of each feature element to obtain the calculated feature vector. The attention mechanism allows the encoder to dynamically allocate computational resources based on the importance of different parts of the data when processing sequential data. For example, features highly correlated with user preferences will be given higher weights, while relatively less important information will be appropriately weakened, resulting in a more refined and focused feature set. The first initial feature vector and the calculated feature vector are then added together to further integrate and obtain the second initial feature vector.

[0081] The second initial feature vector is then fed into the second normalization layer for secondary normalization, resulting in the third initial feature vector. The purpose of this round of normalization is to recalibrate the feature weights after the attention mechanism, ensuring that the feature vectors remain within the ideal scale range after dynamic feature redistribution, thereby avoiding subsequent computational instability or information distortion caused by fluctuations in attention weights.

[0082] Finally, based on the third and second initial feature vectors, and combining their respective advantages and information, an optimized and highly generalized first feature vector is generated. This feature vector not only covers the user's basic request information and behavioral preferences, but also strengthens key features and suppresses irrelevant information through attention mechanisms and normalization processing, forming a clearer and more targeted user profile.

[0083] In an optional embodiment, the encoding layer can be a multi-layered stacked attention encoding layer, which can capture the complex relationships between features at a deeper level, refine the features through multi-layer processing, and repeat the above-mentioned normalization and attention process in each layer to further enhance the comprehensiveness and accuracy of the feature vector.

[0084] In an optional embodiment, the second feature character sequence X includes the feature character sequence corresponding to the user profile. The feature character sequence corresponding to the search term (i.e., the object recommendation request information). Character sequences corresponding to user behavior and target feature character sequence .For example, It should be noted that different tasks correspond to different target feature character sequences, as mentioned above. For tasks involving predicting click-through rate, if the task involves predicting conversion rate, the corresponding target feature character sequence is: Multiple tasks can be performed simultaneously during training and application, meaning the second feature character sequence X contains multiple target feature character sequences, for example, .

[0085] In an optional embodiment, taking a single encoding layer as an example, the specific processing logic of the encoding layer for the second feature character sequence X is explained as follows:

[0086]

[0087]

[0088]

[0089]

[0090] in, For the first normalization layer, For the second normalization layer, For the attention layer, Activate the gated linear unit (GLU). This is the feature vector obtained after processing by a single encoding layer.

[0091] In an optional embodiment, for a multi-layered stacked attention coding layer, the output of the previous layer is used as the input of the next layer, and the above process is repeated to obtain the first feature vector. For example, the first feature vector... ,in, This represents a multi-layered attention encoding layer.

[0092] The multi-layered stacked structure allows the model to capture more complex and deeper feature relationships in deep learning, thereby generating high-quality feature representations. This is particularly relevant when the second feature character sequence (X) contains multiple target feature character sequences, such as when predicting click-through rate and conversion rate. The table can process these tasks simultaneously, optimizing the performance of each task through sharing and adaptive mechanisms. The final output feature vector can accurately predict target tasks, such as click-through rate (CTR) and conversion rate (CVR), thereby significantly improving the accuracy and personalization of the recommendation system.

[0093] To further improve the comprehensiveness and accuracy of the first feature vector, in the object recommendation method provided in Embodiment 1 of this application, obtaining the first feature vector based on the third initial feature vector and the second initial feature vector includes: calculating the third initial feature vector and the second initial feature vector to obtain the fourth initial feature vector; obtaining the position index of the target feature character sequence in the second feature character sequence; and determining the first feature vector from the fourth initial feature vector based on the position index.

[0094] Optionally, the third initial feature vector and the second initial feature vector are calculated and fused to obtain a new feature vector, namely the fourth initial feature vector. The third initial feature vector is activated by a gated linear unit (GLU). A GLU is a nonlinear activation function that can selectively filter input information. It controls the information flow of another set of vectors through a set of vectors, which can effectively enhance the nonlinear expressive power and feature selection ability of feature vectors. The third initial feature vector activated by the GLU is then fused with the second initial feature vector (the feature vector on the product side). The initial fused feature vector, namely the fourth initial feature vector, is obtained through an addition operation.

[0095] Then, the exact position index of the target feature character sequence within the second feature character sequence is obtained. Based on the position index, key feature information is determined from the fourth initial feature vector, thus forming the first feature vector. By focusing on elements directly related to the target feature through position indexing, interference from irrelevant information is avoided, ensuring the accuracy and relevance of the first feature vector.

[0096] In an optional embodiment, for the two tasks of predicting conversion rate and predicting click-through rate, the vector corresponding to the position of tasktoken (i.e., the target feature character sequence mentioned above) in the Y sequence is taken and dimensionality reduced by a linear layer to obtain the User representation vector corresponding to the CTR / CVR task. For example, ,in, This is the first feature vector corresponding to the predicted conversion rate. This is the second feature vector corresponding to the predicted click-through rate. To predict the position index of the target feature character sequence corresponding to the click rate, This is the position index of the target feature character sequence corresponding to the predicted conversion rate.

[0097] The location-index-based feature filtering mechanism ensures that the first feature vector contains feature information directly related to the target tasks (CTR and CVR), thereby enhancing the relevance of the information and the accuracy of model prediction.

[0098] Since the input information is mostly heterogeneous—for example, user behavior includes different attribute information—it is necessary to transform heterogeneous features into a similar semantic space as much as possible. Therefore, in the object recommendation method provided in Embodiment 1 of this application, the object recommendation request and user description information are processed by the linear transformation layer in the first encoder of the target model to obtain the first feature character sequence. This includes: processing the profile information in the object recommendation request and user description information by the first transformation layer in the linear transformation layer to obtain the first feature character subsequence, wherein the first feature character subsequence includes at least: the feature character corresponding to the object recommendation request and the character index information corresponding to the object recommendation request; processing the behavioral information in the user description information by the second transformation layer in the linear transformation layer to obtain the second feature character subsequence, wherein the parameters corresponding to the first transformation layer and the second transformation layer are different; and obtaining the first feature character sequence based on the first feature character subsequence and the second feature character subsequence.

[0099] Optionally, considering the diversity and complexity of input features, processing the object recommendation request and user description information through a linear transformation layer in the first encoder of the target model to obtain the first feature character sequence includes the following steps: First, the profile information in the object recommendation request and user description information is linearly transformed through the first transformation layer. For example, keywords, behavior types, and other information in the object recommendation request are transformed into dense feature vectors, while retaining the positional information of keywords or behavior types in the request, i.e., character index information. In this way, a first feature character subsequence containing semantic and positional information can be obtained.

[0100] Then, the behavioral information (e.g., object information of user history interaction) is transformed by the second transformation layer to obtain the second feature character subsequence. It should be noted that the parameters used by the first and second transformation layers are heterogeneous, that is, they independently learn and map different types of features to the target semantic space, thereby avoiding mutual interference between different features and enhancing the model's representation ability.

[0101] Finally, the first feature character sequence is obtained based on the first feature character subsequence and the second feature character subsequence.

[0102] In an optional embodiment, the user profile and search term features (i.e., object recommendation requests) are converted into tokens of the same dimension (i.e., the aforementioned feature character subsequences) through a first transformation layer. For example,

[0103]

[0104] Where u represents the user and q represents the search term. This indicates a learnable positional encoding. This represents the embedding corresponding to user profile / search term features. This indicates the character position corresponding to the user profile / search term features.

[0105] The second transformation layer projects and transforms the behavioral information (e.g., product information based on the user's historical interactions) to obtain the second feature character sequence. For example,

[0106]

[0107] in, This represents the feature embedding vector of the i-th behavior product in the user behavior sequence, obtained by projection transformation through a separate Linear layer of the sequence. This refers to the user behavior token.

[0108] By mapping heterogeneous features to similar semantic spaces, not only is feature consistency improved, but complementarity between different features is also achieved, thereby enhancing the model's ability to understand user information. The application of learnable positional encoding preserves the positional information of features within a sequence, which is crucial for the model to understand the sequential relationships between features. Especially when processing user historical behavior sequences, positional information can reveal the development trajectory and evolution patterns of user interests. The heterogeneous parameter settings of the first and second transformation layers allow the model to independently learn the mappings of different features without affecting each other, thus improving the model's representational ability and its ability to handle heterogeneous features.

[0109] To improve the accuracy and comprehensiveness of the second feature vector, in the object recommendation method provided in Embodiment 1 of this application, the object description information is processed by the second encoder of the target model to obtain the second feature vector. This process includes: processing the object description information through the projection matrix set in the second encoder of the target model to obtain the projection vector set corresponding to the object description information. The projection matrix set includes a query projection matrix, a key projection matrix, and a value projection matrix, and the projection vector set includes a query projection vector, a key projection vector, and a value projection vector. An attention vector is calculated based on the query projection vector, the key projection vector, and the value projection vector. The attention vector is then calculated through the feedforward network in the second encoder of the target model to obtain the calculated attention vector. Finally, the calculated attention vector and the attention vector are calculated to obtain the second feature vector.

[0110] Optionally, the object description information is processed using a set of projection matrices within the second encoder to generate a set of query projection vectors, key projection vectors, and value projection vectors. The set of projection matrices includes a query projection matrix (used to generate query vectors and identify which features are critical), a key projection matrix (used to generate key vectors and measure the importance of each feature), and a value projection matrix (used to generate value vectors containing the actual feature information).

[0111] It should be noted that the query projection matrix, key projection matrix, and value projection matrix mentioned above are parametrically heterogeneous Q / K / V projection matrices (MLPQ / K / V). Object description information may contain various heterogeneous features of the product, such as ID, brand, and attributes. To effectively handle this information in the attention mechanism, a set of parametrically heterogeneous projection matrices is introduced, including a query projection matrix, a key projection matrix, and a value projection matrix. These three matrices project product features, generating sets of query projection vectors, key projection vectors, and value projection vectors, respectively. This setup allows for learnable weight allocation to identify key feature components of the product and assign them higher attention.

[0112] Then, based on the generated query projection vector, key projection vector, and value projection vector, an attention vector is generated. For example, the query projection vector and key projection vector are multiplied by a dot product to obtain an attention score matrix. This score matrix is ​​then normalized using a softmax function to obtain an attention weight matrix. Finally, the attention weight matrix is ​​multiplied by the value projection vector to obtain the final attention vector. This step aims to dynamically allocate weights to different features of the product, highlighting the parts that match the user's interests.

[0113] The attention vector is calculated using a feedforward network (FFN). The FFN performs a non-linear transformation on the attention vector, further refining the feature representation. Furthermore, by establishing a residual connection with the original attention vector, the original feature information is preserved, while avoiding the vanishing gradient problem encountered in deep network training, ensuring complete information transfer.

[0114] Finally, the calculated attention vector and the second attention vector are used to calculate the second feature vector. For example, the calculated attention vector and the second attention vector are added together, and then the result is linearly transformed to obtain the second feature vector.

[0115] By using a heterogeneous Q / K / V projection matrix, weights can be dynamically assigned to product features. Unlike the fixed MLPQ / K / V, the weight assignment under the Attention mechanism is more flexible and personalized, and can adapt to different users and situations, thus bringing significant technical improvements and optimization effects to product recommendation systems.

[0116] To improve the accuracy of attention vector calculation, in the object recommendation method provided in Embodiment 1 of this application, the attention vector is calculated based on the query projection vector, key projection vector, and value projection vector. This includes: segmenting and reshaping the key projection vector to obtain a first preset number of first latent space vectors; segmenting and reshaping the value projection vector to obtain a first preset number of second latent space vectors; processing the query projection vector to obtain a second preset number of third latent space vectors; and calculating the attention vector based on the first, second, and third latent space vectors.

[0117] Optionally, the key projection vector (K) is segmented into H (i.e., the first preset number mentioned above) low-dimensional first latent space vectors. The key vector is decomposed into multiple first latent space vectors. Each latent space vector contains a portion of the information of the key vector, providing a basis for subsequent multi-head attention calculations.

[0118] Similarly, the projection vector is segmented and reshaped to obtain H second latent space vectors, ensuring that the information of the value vector is also fully dispersed and recombined, so as to achieve more efficient information extraction and feature combination in multi-head attention computation. The query projection vector (Q) is processed to obtain a second preset number of third latent space vectors. It should be noted that the second preset number can be one.

[0119] Finally, the attention vector is calculated from the first, second, and third hidden space vectors. For example, the attention score of the first hidden space vector is calculated, and then normalized using the softmax function to obtain the attention weight matrix. This matrix is ​​then multiplied by the corresponding value vector matrix to obtain the attention vector.

[0120] By splitting and recombining, the computation speed is accelerated, and parallel computing and hardware acceleration are made possible.

[0121] To further improve the accuracy of attention vector calculation, in the object recommendation method provided in Embodiment 1 of this application, the calculation of the attention vector based on the first latent space vector, the second latent space vector, and the third latent space vector includes: calculating the transpose of the first latent space vector and the third latent space vector to obtain a first calculation result; normalizing the first calculation result based on the dimension information corresponding to the latent space vector to obtain the normalized calculation result; and calculating the normalized calculation result and the second latent space vector to obtain the attention vector.

[0122] Optionally, the first latent space vector (query vector) is transposed first, and then a dot product is performed with the third latent space vector (key vector) to obtain the first calculation result. Considering that the dot product operation may produce a large numerical range, the first calculation result is normalized based on the dimensional information of the first and third latent space vectors to obtain a normalized calculation result. Finally, the attention vector is calculated based on the normalized calculation result and the second latent space vector.

[0123] In an optional embodiment, the embedding vector corresponding to the object description information is obtained. By using the parametrically heterogeneous Q / K / V projection matrix MLPQ / K / V to perform corresponding projection transformations on the embedded vectors, large Q / K / V vectors for Attention calculation are obtained. These large Q / K / V vectors are then mapped to multiple low-dimensional latent space vectors through vector segmentation and shape recombination, resulting in multiple low-dimensional tokens, for example...

[0124]

[0125] in, Let be a vector matrix, where t represents the first preset quantity and d represents the implicit vector dimension.

[0126] The different low-dimensional latent space vectors obtained from the above steps contain different feature combinations. The attention score is obtained through the Q / K matrix. First, the K vector is transposed and multiplied with the Q vector using a matrix multiplication operation. Simultaneously, through... The vector obtained from matrix multiplication is normalized to prevent numerical explosion. Then, it undergoes row selection activation using the Softmax function to obtain the attention score. Multiplying this score by the V matrix yields the dynamically weighted attention vector Attn. For example...

[0127]

[0128] After obtaining the Attention vector Attn, which already contains the cross-combination information of the current item's features, it then undergoes feature transformation and residual connection operations through an MLP layer (FFN). Finally, it is converted into an encoding vector (i.e., the second feature vector mentioned above) through a Linear layer. For example,

[0129]

[0130] in, This is the second eigenvector mentioned above.

[0131] The optimized attention vector and encoding vector obtained through the above steps can more accurately reflect product features and improve the accuracy of subsequent recommendations.

[0132] To improve the performance of the target model, in the object recommendation method provided in Embodiment 1 of this application, the target model is trained using the following steps: A training sample set is obtained, wherein the training sample set consists of first sample description information of sample objects, sample recommendation requests, second sample description information of multiple sample objects, and real labels corresponding to multiple sample objects respectively, the real labels being used to characterize the matching degree between sample objects; the first sample description information, sample recommendation requests, and initial feature character sequences are processed by the first encoder of the initial model to obtain the first sample feature vector corresponding to the sample object, and the second sample description information is processed by the second encoder in the initial model to obtain the second sample feature vector corresponding to multiple sample objects respectively; the predicted matching degree corresponding to multiple sample objects is obtained based on the first sample feature vector and the second sample feature vector; the initial model is iterated based on the predicted matching degree and the real labels to obtain the target model.

[0133] Optionally, a training sample set is constructed, which includes the user's first sample description information (such as user profile and historical interaction behavior), sample recommendation requests (i.e., the user's current needs or behaviors), the object's second sample description information (object features, topics, etc.), and the object's corresponding ground truth labels. Ground truth labels can be key indicators for measuring the actual matching degree between the object and the user, used to guide the direction and goal of model training. For example, ground truth labels could be whether the user clicked on the object or whether the user purchased the object.

[0134] The initial model's first encoder processes the user's initial sample description information, sample recommendation request, and initial feature character sequence to obtain the first sample feature vector. The first encoder can utilize deep learning techniques, such as Attention mechanisms or Transformer structures, to fuse and represent user information in multiple dimensions, thereby capturing deeper user needs and preferences.

[0135] Similarly, the second sample description information from the product side is processed by the second encoder to obtain a second sample feature vector that can represent the product characteristics. The second sample feature vector can contain information such as the product's core attributes and user feedback.

[0136] Based on the feature vectors of the first and second samples, the predicted matching degree between sample objects is calculated. This can be achieved, for example, through the dot product of vectors or similarity calculation. The predicted matching degree is compared with the true labels, and the prediction error is quantified using a loss function (such as cross-entropy loss) to guide the automatic adjustment of model parameters. This iterative optimization process continues until the model performance reaches the expected standard, such as a smaller loss under convergence conditions.

[0137] During model training, various performance evaluation metrics can be used to detect and guide optimization, including but not limited to: Hit Rate: the percentage of users who actually click or purchase the model's recommended items, reflecting the model's accuracy. AUC (Area Under Curve): measures the model's ability to distinguish between positive and negative samples; a higher AUC indicates a stronger classification ability. RMSE (Root Mean Square Error): the difference between the predicted and true values; a lower RMSE indicates higher model accuracy.

[0138] The training steps described above improve the performance of the target model, which helps to enhance the accuracy and personalization of the recommendation system.

[0139] Before processing the first sample description information, sample recommendation request, and initial feature character sequence through the first encoder of the initial model, the object recommendation method provided in Embodiment 1 of this application uses the following steps to obtain the initial feature character sequence: obtaining the dimension information corresponding to the sample feature vector; and randomly initializing the initial feature character sequence based on the dimension information.

[0140] Optionally, to facilitate subsequent processing of the initial feature character sequence and the sample feature vectors corresponding to the sample description information, the dimensionality information of the sample feature vectors is obtained. Then, based on the obtained feature vector dimensionality information, an initial feature character sequence is generated using random initialization. Random initialization can break any potential biases, allowing the model to have the opportunity to access and learn diverse feature representations from the early stages of training, thereby promoting a more efficient and comprehensive feature learning process.

[0141] For example, the length of the initial feature character sequence is determined based on the dimensionality information of the sample feature vector. For instance, if the sample feature vector is 200, an initial sequence of length 200 can be created. Generating the initial feature character sequence through random initialization involves randomly sampling the value of each element from a specified probability distribution, such as a uniform or normal distribution. This random sequence is progressively optimized during model training to more accurately reflect the user-side features. It should be noted that multiple tasks can be trained simultaneously during training, with the initial feature character sequence for each task randomly generated. Then, during training, the initial feature character sequence for each task is progressively optimized.

[0142] The initial feature character sequence of random initialization promotes the exploratory learning of the model, enabling the model to find better solutions from a broader feature space, thereby improving the model's learning efficiency and generalization ability.

[0143] In order to accurately obtain the target feature character sequence, the object recommendation method provided in Embodiment 1 of this application further includes: when it is detected that the current initial model meets the conditions for ending training, obtaining the current sample feature vector output by the first encoder in the current initial model; and obtaining the target feature character sequence based on the current sample feature vector.

[0144] Optionally, during model training, model performance metrics can be continuously monitored, such as the AUC value, RMSE (root mean square error), or hit rate on the validation set. Setting a threshold or a series of conditions, such as performance no longer significantly improving, the error rate falling below a certain level, or reaching a predetermined number of iterations, can all serve as criteria for judging whether the model training has reached a satisfactory state.

[0145] Once the model training meets the termination condition, the current sample feature vector output by the first encoder is extracted from the current initial model. This current sample feature vector, having undergone multiple iterations and optimizations of the model, contains deeper information about user preferences and behavioral patterns.

[0146] Finally, based on the current sample feature vector, the target feature character sequence is obtained. For example, the feature vectors at the corresponding positions of the initial feature character sequence can be extracted as the target feature character sequence described above.

[0147] In an optional embodiment, the first encoder includes an embedding layer, a uniform labeling layer (i.e., the linear transformation layer described above), and an encoding layer. The encoding layer is a multi-layer stacked attention encoding layer, with each encoding layer including a first normalization layer, an attention layer, a second normalization layer, and a feedforward network (i.e., a gated linear unit (GLU)). The second encoder includes an embedding layer, a heterogeneous projection layer (i.e., a parameter heterogeneous Q / K / V projection matrix), a multi-head attention layer, a feedforward network, and a linear layer.

[0148] In an alternative embodiment, such as Figure 3 As shown, the target model includes a first encoder (user-side encoder), a second encoder (product-side encoder), and an embedding layer. The first encoder includes a unified labeling layer (i.e., the linear transformation layer mentioned above) and an encoding layer. The encoding layer is a multi-layer stacked attention encoding layer, with each encoding layer including a first normalization layer, an attention layer, a second normalization layer, and a feedforward network (i.e., gated linear units (GLUs)). The second encoder includes an embedding layer, a heterogeneous projection layer (i.e., a parameter-heterogeneous Q / K / V projection matrix), multi-head attention, a feedforward network, and a linear layer.

[0149] like Figure 3As shown, a unified embedding layer transforms product features, user features, search term features, and user behavior sequences into corresponding embedding vectors. The unified labeling layer (i.e., the linear transformation layer mentioned above) needs to transform heterogeneous features into similar semantic spaces as much as possible. Different linear transformation layers convert user profiles and search term features into tokens of the same dimension, and project and transform the behavioral product features in the user behavior sequence to obtain user behavior tokens. Then, user tokens, search term tokens, behavior tokens, and task tokens are combined to obtain the target token sequence. A multi-layered stacked attention encoding layer extracts features from the target token sequence to obtain sequence Y. The vector corresponding to the task token (i.e., the task token) in the sequence is then reduced in dimensionality by a linear layer to obtain the User representation vector corresponding to the CTR / CVR task.

[0150] The embedded vectors corresponding to the product features are projected and transformed by the heterogeneous Q / K / V projection matrix in the second encoder to obtain Q / K / V vectors for Attention calculation. Then, multi-head attention is used to calculate the Attention vectors from the Q / K / V vectors. Finally, the Attention vectors are processed by a feedforward network and a linear layer to obtain the product-side representation vector.

[0151] Finally, product recommendations are achieved through user representation vectors and product-side representation vectors.

[0152] In the object recommendation method provided in Embodiment 1 of this application, an object recommendation request is received, and user description information and object description information of multiple objects are obtained; the object recommendation request, user description information, and target feature character sequence are processed by the first encoder of the target model to obtain a first feature vector, wherein the target feature character sequence is the feature representation information learned by the first encoder during training; the object description information is processed by the second encoder of the target model to obtain a second feature vector; based on the first feature vector and the second feature vector, the object to be recommended corresponding to the object recommendation request is determined from multiple objects, thus solving the technical problem of low accuracy of recommended objects in related technologies.

[0153] In this application, an object recommendation request is received, and user description information and object description information of multiple objects are obtained. A first encoder processes the object recommendation request, user description information (user-side information), and target feature character sequence. The target feature character sequence is learned by the model during training, enabling the first encoder to generate a more specific and personalized first feature vector. The first feature vector integrates the user's real-time search intent, long-term interests, and feature representation information extracted by the model from the training data, thus providing a deep understanding of user needs. A second encoder processes the object description information (object-side information) to obtain a second feature vector that comprehensively reflects the characteristics of the object. Finally, based on the similarity or relevance between the first and second feature vectors, objects that meet the user's current needs and interests are accurately selected from multiple objects. The first encoder can achieve dynamic feature cross-fertilization and integration for different user requests, making the user feature vector more personalized. The second feature vector generated by the second encoder contains comprehensive information about the product, enhancing the representation capability of the product side. The first and second feature vectors can better capture the fine-grained matching between the object and the user's interests, thereby achieving the technical effect of improving the accuracy and relevance of the recommendation.

[0154] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0155] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software object. This computer software object is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.

[0156] Example 2

[0157] According to embodiments of this application, an object recommendation method is also provided, such as... Figure 4 As shown, the method includes:

[0158] Step S401: Receive the object recommendation request uploaded by the client;

[0159] Step S402: Obtain user description information and object description information of multiple objects from the cloud server; process the object recommendation request, user description information, and target feature character sequence through the first encoder of the target model to obtain a first feature vector, wherein the target feature character sequence is the feature representation information learned by the first encoder during training; process the object description information through the second encoder of the target model to obtain a second feature vector; determine the object to be recommended corresponding to the object recommendation request from multiple objects based on the first feature vector and the second feature vector;

[0160] Step S403: Return the object to be recommended to the client.

[0161] It should be noted that the specific processing procedure for object recommendation in the cloud server is the same as in Implementation 1, and will not be repeated here.

[0162] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0163] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.

[0164] Example 3

[0165] According to embodiments of this application, an object recommendation apparatus for implementing the above-described object recommendation method is also provided, such as... Figure 5 As shown, the device includes: a receiving unit 501, a first processing unit 502, a second processing unit 503, and a first determining unit 504.

[0166] The receiving unit 501 is used to receive object recommendation requests and obtain user description information and object description information of multiple objects;

[0167] The first processing unit 502 is used to process the object recommendation request, user description information and target feature character sequence through the first encoder of the target model to obtain the first feature vector, wherein the target feature character sequence is the feature representation information learned by the first encoder during training;

[0168] The second processing unit 503 is used to process the object description information through the second encoder of the target model to obtain the second feature vector;

[0169] The first determining unit 504 is used to determine the object to be recommended corresponding to the object recommendation request from multiple objects based on the first feature vector and the second feature vector.

[0170] In the object recommendation device provided in Embodiment 3 of this application, the receiving unit 501 receives an object recommendation request and obtains user description information and object description information of multiple objects; the first processing unit 502 processes the object recommendation request, user description information and target feature character sequence through the first encoder of the target model to obtain a first feature vector, wherein the target feature character sequence is the feature representation information learned by the first encoder during training; the second processing unit 503 processes the object description information through the second encoder of the target model to obtain a second feature vector; the first determining unit 504 determines the object to be recommended corresponding to the object recommendation request from multiple objects based on the first feature vector and the second feature vector, thus solving the technical problem of low accuracy of recommended objects in related technologies.

[0171] In this application, an object recommendation request is received, and user description information and object description information of multiple objects are obtained. A first encoder processes the object recommendation request, user description information (user-side information), and target feature character sequence. The target feature character sequence is learned by the model during training, enabling the first encoder to generate a more specific and personalized first feature vector. The first feature vector integrates the user's real-time search intent, long-term interests, and feature representation information extracted by the model from the training data, thus providing a deep understanding of user needs. A second encoder processes the object description information (object-side information) to obtain a second feature vector that comprehensively reflects the characteristics of the object. Finally, based on the similarity or relevance between the first and second feature vectors, objects that meet the user's current needs and interests are accurately selected from multiple objects. The first encoder can achieve dynamic feature cross-fertilization and integration for different user requests, making the user feature vector more personalized. The second feature vector generated by the second encoder contains comprehensive information about the product, enhancing the representation capability of the product side. The first and second feature vectors can better capture the fine-grained matching between the object and the user's interests, thereby achieving the technical effect of improving the accuracy and relevance of the recommendation.

[0172] Optionally, in the object recommendation apparatus provided in Embodiment 3 of this application, the apparatus further includes: a third processing unit, configured to vectorize the object recommendation request through the target embedding layer in the first encoder before processing the object recommendation request, user description information, and target feature character sequence through the first encoder of the target model to obtain a first embedding vector; a fourth processing unit, configured to vectorize the attribute parameters in the user description information through the target embedding layer to obtain a second embedding vector; a fifth processing unit, configured to vectorize the historical behavior data in the user description information through the target embedding layer to obtain a third embedding vector; the first processing unit is further configured to process the first embedding vector, the second embedding vector, the third embedding vector, and the target feature character sequence through the first encoder to obtain a first feature vector.

[0173] Optionally, in the object recommendation apparatus provided in Embodiment 3 of this application, the first processing unit includes: a first processing subunit, used to process the object recommendation request and user description information through a linear transformation layer in the first encoder of the target model to obtain a first feature character sequence; a second processing subunit, used to concatenate the first feature character sequence and the target feature character sequence to obtain a second feature character sequence; and an extraction subunit, used to extract features from the second feature character sequence through an encoding layer in the first encoder of the target model to obtain a first feature vector.

[0174] Optionally, in the object recommendation apparatus provided in Embodiment 3 of this application, the extraction subunit includes: a first processing module, configured to normalize the second feature character sequence through a first normalization layer in the encoding layer to obtain a first initial feature vector; a first calculation module, configured to calculate the first initial feature vector through an attention layer in the encoding layer to obtain a calculated feature vector, and obtain a second initial feature vector based on the first initial feature vector and the calculated feature vector; a second processing module, configured to normalize the second initial feature vector through a second normalization layer in the encoding layer to obtain a third initial feature vector; and a first determination module, configured to obtain the first feature vector based on the third initial feature vector and the second initial feature vector.

[0175] Optionally, in the object recommendation device provided in Embodiment 3 of this application, the first determining module includes: a first calculation submodule, used to calculate the third initial feature vector and the second initial feature vector to obtain a fourth initial feature vector; an acquisition submodule, used to acquire the position index of the target feature character sequence in the second feature character sequence; and a determining submodule, used to determine the first feature vector from the fourth initial feature vector based on the position index.

[0176] Optionally, in the object recommendation device provided in Embodiment 3 of this application, the first processing subunit includes: a third processing module, used to process the object recommendation request and the profile information in the user description information through a first transformation layer in the linear transformation layer to obtain a first feature character subsequence, wherein the first feature character subsequence includes at least: the feature character corresponding to the object recommendation request and the character index information corresponding to the object recommendation request; a fourth processing module, used to process the behavioral information in the user description information through a second transformation layer in the linear transformation layer to obtain a second feature character subsequence, wherein the parameters corresponding to the first transformation layer and the second transformation layer are different; and a second determining module, used to obtain the first feature character sequence based on the first feature character subsequence and the second feature character subsequence.

[0177] Optionally, in the object recommendation apparatus provided in Embodiment 3 of this application, the second processing unit includes: a third processing subunit, used to process the object description information through the projection matrix set in the second encoder of the target model to obtain a projection vector set corresponding to the object description information, wherein the projection matrix set includes: a query projection matrix, a key projection matrix, and a value projection matrix, and the projection vector set includes: a query projection vector, a key projection vector, and a value projection vector; a first calculation subunit, used to calculate based on the query projection vector, the key projection vector, and the value projection vector to obtain an attention vector; a second calculation subunit, used to calculate the attention vector through the feedforward network in the second encoder of the target model to obtain a calculated attention vector; and a third calculation subunit, used to calculate the calculated attention vector and the attention vector to obtain a second feature vector.

[0178] Optionally, in the object recommendation device provided in Embodiment 3 of this application, the first calculation subunit includes: a fifth processing module, used to segment and reshape the key projection vector to obtain a first preset number of first latent space vectors; a sixth processing module, used to segment and reshape the value projection vector to obtain a first preset number of second latent space vectors; a seventh processing module, used to process the query projection vector to obtain a second preset number of third latent space vectors; and a second calculation module, used to calculate based on the first latent space vector, the second latent space vector, and the third latent space vector to obtain an attention vector.

[0179] Optionally, in the object recommendation device provided in Embodiment 3 of this application, the second calculation module includes: a second calculation submodule, used to calculate the transpose of the first latent space vector and the third latent space vector to obtain a first calculation result; a processing submodule, used to normalize the first calculation result based on the dimension information corresponding to the latent space vector, and a normalized calculation result; and a third calculation submodule, used to calculate the normalized calculation result and the second latent space vector to obtain an attention vector.

[0180] Optionally, in the object recommendation apparatus provided in Embodiment 3 of this application, the target model is trained using the following apparatus: a first acquisition unit, used to acquire a training sample set, wherein the training sample set consists of first sample description information of sample objects, sample recommendation requests, second sample description information of multiple sample objects, and real labels corresponding to multiple sample objects respectively, the real labels being used to characterize the matching degree between sample objects; a sixth processing unit, used to process the first sample description information, sample recommendation requests, and initial feature character sequences through the first encoder of the initial model to obtain the first sample feature vector corresponding to the sample object, and to process the second sample description information through the second encoder in the initial model to obtain the second sample feature vector corresponding to multiple sample objects respectively; a second determination unit, used to obtain the predicted matching degree corresponding to multiple sample objects respectively based on the first sample feature vector and the second sample feature vector; and an iteration unit, used to iterate the initial model based on the predicted matching degree and the real labels to obtain the target model.

[0181] Optionally, in the object recommendation device provided in Embodiment 3 of this application, the device further includes: a second acquisition unit, used to acquire dimension information corresponding to the sample feature vector before processing the first sample description information, sample recommendation request and initial feature character sequence through the first encoder of the initial model; and a seventh processing unit, used to randomly initialize and obtain the initial feature character sequence based on the dimension information.

[0182] Optionally, in the object recommendation device provided in Embodiment 3 of this application, the device further includes: a third acquisition unit, used to acquire the current sample feature vector output by the first encoder in the current initial model when the current initial model is detected to meet the conditions for ending training; and a third determination unit, used to obtain the target feature character sequence based on the current sample feature vector.

[0183] It should be noted that the receiving unit 501, the first processing unit 502, the second processing unit 503, and the first determining unit 504 mentioned above correspond to steps S201 to S204 in Embodiment 1. The four units and the corresponding steps implement the same examples and application scenarios, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above modules, as part of the device, can run in the computer terminal 10 provided in Embodiment 1.

[0184] It should be noted that the preferred implementation schemes involved in the above embodiments of this application are the same as the schemes, application scenarios and implementation processes provided in Embodiment 1, but are not limited to the schemes provided in Embodiment 1.

[0185] Example 4

[0186] Embodiments of this application may provide an electronic device, which may be any one of a group of electronic device terminals. Optionally, in this embodiment, the aforementioned electronic device may also be replaced by a terminal device such as a mobile terminal.

[0187] Optionally, in this embodiment, the aforementioned electronic device may be located in at least one of a plurality of network devices in a computer network.

[0188] In this embodiment, the above-mentioned electronic device can execute the program code of the following steps in the object recommendation method: receiving an object recommendation request and obtaining user description information and object description information of multiple objects; processing the object recommendation request, user description information and target feature character sequence through the first encoder of the target model to obtain a first feature vector, wherein the target feature character sequence is the feature representation information learned by the first encoder during training; processing the object description information through the second encoder of the target model to obtain a second feature vector; and determining the object to be recommended corresponding to the object recommendation request from multiple objects based on the first feature vector and the second feature vector.

[0189] The aforementioned electronic device can execute the following steps in the object recommendation method: Before processing the object recommendation request, user description information, and target feature character sequence through the first encoder of the target model, the method further includes: vectorizing the object recommendation request through the target embedding layer in the first encoder to obtain a first embedding vector; vectorizing the attribute parameters in the user description information through the target embedding layer to obtain a second embedding vector; vectorizing the historical behavior data in the user description information through the target embedding layer to obtain a third embedding vector; and processing the object recommendation request, user description information, and target feature character sequence through the first encoder of the target model to obtain a first feature vector includes: processing the first embedding vector, the second embedding vector, the third embedding vector, and the target feature character sequence through the first encoder to obtain a first feature vector.

[0190] The aforementioned electronic device can execute the program code for the following steps in the object recommendation method: processing the object recommendation request, user description information, and target feature character sequence through the first encoder of the target model to obtain a first feature vector, including: processing the object recommendation request and user description information through the linear transformation layer in the first encoder of the target model to obtain a first feature character sequence; concatenating the first feature character sequence and the target feature character sequence to obtain a second feature character sequence; and extracting features from the second feature character sequence through the encoding layer in the first encoder of the target model to obtain a first feature vector.

[0191] The aforementioned electronic device can execute the following steps in the object recommendation method: Extracting features from the second feature character sequence through the encoding layer in the first encoder of the target model to obtain a first feature vector includes: normalizing the second feature character sequence through the first normalization layer in the encoding layer to obtain a first initial feature vector; calculating the first initial feature vector through the attention layer in the encoding layer to obtain a calculated feature vector, and obtaining a second initial feature vector based on the first initial feature vector and the calculated feature vector; normalizing the second initial feature vector through the second normalization layer in the encoding layer to obtain a third initial feature vector; and obtaining the first feature vector based on the third initial feature vector and the second initial feature vector.

[0192] The aforementioned electronic device can execute the following steps in the object recommendation method: obtaining a first feature vector based on a third initial feature vector and a second initial feature vector includes: calculating a fourth initial feature vector by calculating the third initial feature vector and the second initial feature vector; obtaining the position index of the target feature character sequence in the second feature character sequence; and determining the first feature vector from the fourth initial feature vector based on the position index.

[0193] The aforementioned electronic device can execute the following steps in the object recommendation method: Processing the object recommendation request and user description information through a linear transformation layer in the first encoder of the target model to obtain a first feature character sequence includes: processing the profile information in the object recommendation request and user description information through a first transformation layer in the linear transformation layer to obtain a first feature character subsequence, wherein the first feature character subsequence includes at least: the feature character corresponding to the object recommendation request and the character index information corresponding to the object recommendation request; processing the behavioral information in the user description information through a second transformation layer in the linear transformation layer to obtain a second feature character subsequence, wherein the parameters corresponding to the first transformation layer and the second transformation layer are different; obtaining the first feature character sequence based on the first feature character subsequence and the second feature character subsequence.

[0194] The aforementioned electronic device can execute the following steps in the object recommendation method: Processing object description information through the second encoder of the target model to obtain a second feature vector includes: processing the object description information through a set of projection matrices in the second encoder of the target model to obtain a set of projection vectors corresponding to the object description information, wherein the set of projection matrices includes: a query projection matrix, a key projection matrix, and a value projection matrix; the set of projection vectors includes: a query projection vector, a key projection vector, and a value projection vector; calculating an attention vector based on the query projection vector, key projection vector, and value projection vector; calculating the attention vector through a feedforward network in the second encoder of the target model to obtain a calculated attention vector; and calculating the calculated attention vector and the attention vector to obtain the second feature vector.

[0195] The aforementioned electronic device can execute the following steps in the object recommendation method: calculating the attention vector based on the query projection vector, key projection vector, and value projection vector, including: segmenting and reshaping the key projection vector to obtain a first preset number of first latent space vectors; segmenting and reshaping the value projection vector to obtain a first preset number of second latent space vectors; processing the query projection vector to obtain a second preset number of third latent space vectors; and calculating the attention vector based on the first, second, and third latent space vectors.

[0196] The aforementioned electronic device can execute the following steps in the object recommendation method: calculating the attention vector based on the first latent space vector, the second latent space vector, and the third latent space vector, including: calculating the transpose of the first latent space vector and the third latent space vector to obtain a first calculation result; normalizing the first calculation result based on the dimension information corresponding to the latent space vector, obtaining the normalized calculation result; and calculating the attention vector based on the normalized calculation result and the second latent space vector.

[0197] The aforementioned electronic device can execute the following steps in the object recommendation method: The target model is trained using the following steps: A training sample set is obtained, wherein the training sample set consists of first sample description information of sample objects, sample recommendation requests, second sample description information of multiple sample objects, and real labels corresponding to multiple sample objects respectively. The real labels are used to characterize the matching degree between sample objects; The first sample description information, sample recommendation requests, and initial feature character sequences are processed by the first encoder of the initial model to obtain the first sample feature vector corresponding to the sample object, and the second sample description information is processed by the second encoder in the initial model to obtain the second sample feature vector corresponding to multiple sample objects respectively; Based on the first sample feature vector and the second sample feature vector, the predicted matching degree corresponding to multiple sample objects is obtained; The initial model is iterated based on the predicted matching degree and the real labels to obtain the target model.

[0198] The aforementioned electronic device can execute the following steps in the object recommendation method: before processing the first sample description information, sample recommendation request, and initial feature character sequence through the first encoder of the initial model, the method further includes: obtaining the dimension information corresponding to the sample feature vector; and randomly initializing the initial feature character sequence based on the dimension information.

[0199] The aforementioned electronic device can execute the program code for the following steps in the object recommendation method: the method further includes: when it is detected that the current initial model meets the conditions for ending training, obtaining the current sample feature vector output by the first encoder in the current initial model; and obtaining the target feature character sequence based on the current sample feature vector.

[0200] Optionally, Figure 6 This is a structural block diagram of an electronic device according to an embodiment of this application. Figure 6 As shown, the electronic device 60 may include: one or more ( Figure 6 (Only one is shown in the image) Processor 602 and memory 604. The electronic device 60 may also include a memory controller to control and manage the memory 604; the electronic device 60 may also include a peripheral interface to connect to a radio frequency module, an audio module, and a display screen, etc.

[0201] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the object recommendation method and apparatus in this embodiment. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby implementing the object recommendation method described above. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to the electronic device 60 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0202] The processor can invoke information and application programs stored in memory via a transmission device to perform the following steps: receiving an object recommendation request and obtaining user description information and object description information of multiple objects; processing the object recommendation request, user description information, and target feature character sequence through a first encoder of the target model to obtain a first feature vector, wherein the target feature character sequence is the feature representation information learned by the first encoder during training; processing the object description information through a second encoder of the target model to obtain a second feature vector; and determining the object to be recommended corresponding to the object recommendation request from multiple objects based on the first feature vector and the second feature vector.

[0203] Optionally, the processor may also execute program code for the following steps: before processing the object recommendation request, user description information, and target feature character sequence through the first encoder of the target model, the method further includes: vectorizing the object recommendation request through the target embedding layer in the first encoder to obtain a first embedding vector; vectorizing the attribute parameters in the user description information through the target embedding layer to obtain a second embedding vector; vectorizing the historical behavior data in the user description information through the target embedding layer to obtain a third embedding vector; processing the object recommendation request, user description information, and target feature character sequence through the first encoder of the target model to obtain a first feature vector includes: processing the first embedding vector, the second embedding vector, the third embedding vector, and the target feature character sequence through the first encoder to obtain a first feature vector.

[0204] Optionally, the processor may also execute program code that performs the following steps: processing the object recommendation request, user description information, and target feature character sequence through the first encoder of the target model to obtain a first feature vector includes: processing the object recommendation request and user description information through the linear transformation layer in the first encoder of the target model to obtain a first feature character sequence; concatenating the first feature character sequence and the target feature character sequence to obtain a second feature character sequence; and extracting features from the second feature character sequence through the encoding layer in the first encoder of the target model to obtain a first feature vector.

[0205] Optionally, the processor may also execute program code for the following steps: extracting features from the second feature character sequence through the encoding layer in the first encoder of the target model to obtain a first feature vector, including: normalizing the second feature character sequence through the first normalization layer in the encoding layer to obtain a first initial feature vector; calculating the first initial feature vector through the attention layer in the encoding layer to obtain a calculated feature vector, and obtaining a second initial feature vector based on the first initial feature vector and the calculated feature vector; normalizing the second initial feature vector through the second normalization layer in the encoding layer to obtain a third initial feature vector; and obtaining the first feature vector based on the third initial feature vector and the second initial feature vector.

[0206] Optionally, the processor may also execute program code with the following steps: obtaining the first feature vector based on the third initial feature vector and the second initial feature vector includes: calculating the third initial feature vector and the second initial feature vector to obtain the fourth initial feature vector; obtaining the position index of the target feature character sequence in the second feature character sequence; and determining the first feature vector from the fourth initial feature vector based on the position index.

[0207] Optionally, the processor may also execute program code for the following steps: processing the object recommendation request and user description information through a linear transformation layer in the first encoder of the target model to obtain a first feature character sequence includes: processing the profile information in the object recommendation request and user description information through a first transformation layer in the linear transformation layer to obtain a first feature character subsequence, wherein the first feature character subsequence includes at least: the feature character corresponding to the object recommendation request and the character index information corresponding to the object recommendation request; processing the behavioral information in the user description information through a second transformation layer in the linear transformation layer to obtain a second feature character subsequence, wherein the parameters corresponding to the first transformation layer and the second transformation layer are different; and obtaining a first feature character sequence based on the first feature character subsequence and the second feature character subsequence.

[0208] Optionally, the processor may also execute program code for the following steps: processing the object description information through the second encoder of the target model to obtain the second feature vector includes: processing the object description information through the projection matrix set in the second encoder of the target model to obtain the projection vector set corresponding to the object description information, wherein the projection matrix set includes: query projection matrix, key projection matrix and value projection matrix, and the projection vector set includes: query projection vector, key projection vector and value projection vector; calculating the attention vector based on the query projection vector, key projection vector and value projection vector; calculating the attention vector through the feedforward network in the second encoder of the target model to obtain the calculated attention vector; and calculating the calculated attention vector and the attention vector to obtain the second feature vector.

[0209] Optionally, the processor may also execute program code with the following steps: calculating the attention vector based on the query projection vector, key projection vector, and value projection vector, including: segmenting and reshaping the key projection vector to obtain a first preset number of first latent space vectors; segmenting and reshaping the value projection vector to obtain a first preset number of second latent space vectors; processing the query projection vector to obtain a second preset number of third latent space vectors; and calculating the attention vector based on the first latent space vector, second latent space vector, and third latent space vector.

[0210] Optionally, the processor may also execute program code with the following steps: calculating the attention vector based on the first latent space vector, the second latent space vector, and the third latent space vector, including: calculating the transpose of the first latent space vector and the third latent space vector to obtain a first calculation result; normalizing the first calculation result based on the dimension information corresponding to the latent space vector to obtain a normalized calculation result; and calculating the normalized calculation result and the second latent space vector to obtain the attention vector.

[0211] Optionally, the processor may also execute program code with the following steps: The target model is trained using the following steps: A training sample set is obtained, wherein the training sample set consists of first sample description information of sample objects, sample recommendation requests, second sample description information of multiple sample objects, and real labels corresponding to multiple sample objects respectively, the real labels being used to characterize the matching degree between sample objects; The first sample description information, sample recommendation requests, and initial feature character sequences are processed by the first encoder of the initial model to obtain the first sample feature vector corresponding to the sample object, and the second sample description information is processed by the second encoder in the initial model to obtain the second sample feature vector corresponding to multiple sample objects respectively; Based on the first sample feature vector and the second sample feature vector, the predicted matching degree corresponding to multiple sample objects is obtained; The initial model is iterated based on the predicted matching degree and the real labels to obtain the target model.

[0212] Optionally, the processor may also execute program code with the following steps: before processing the first sample description information, sample recommendation request and initial feature character sequence through the first encoder of the initial model, the method further includes: obtaining the dimension information corresponding to the sample feature vector; and randomly initializing the initial feature character sequence based on the dimension information.

[0213] Optionally, the processor may also execute program code with the following steps: the method further includes: when it is detected that the current initial model meets the conditions for ending training, obtaining the current sample feature vector output by the first encoder in the current initial model; and obtaining the target feature character sequence based on the current sample feature vector.

[0214] Those skilled in the art will understand that Figure 6 The structure shown is for illustrative purposes only. Electronic device 60 can also be a smartphone, tablet computer, handheld computer, mobile internet device (MID), PAD and other terminal devices. Figure 6 This does not limit the structure of the aforementioned electronic device. For example, electronic device 60 may also include components that are more... Figure 6 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 6 The different configurations shown.

[0215] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0216] Example 5

[0217] Embodiments of this application also provide a computer program product. Optionally, in this embodiment, the computer program product can be used to store the program code executed by the object recommendation method provided in Embodiment 1.

[0218] Optionally, in this embodiment, the computer program product may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.

[0219] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0220] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0221] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

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

[0223] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0224] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0225] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. An object recommendation method, characterized in that, include: Receive object recommendation requests and obtain user description information and object description information for multiple objects; The first encoder of the target model processes the object recommendation request, the user description information, and the target feature character sequence to obtain a first feature vector, wherein the target feature character sequence is the feature representation information learned by the first encoder during training. The object description information is processed by the second encoder of the target model to obtain the second feature vector; Based on the first feature vector and the second feature vector, the object to be recommended corresponding to the object recommendation request is determined from the plurality of objects.

2. The method according to claim 1, characterized in that, Before processing the object recommendation request, the user description information, and the target feature character sequence through the first encoder of the target model, the method further includes: The object recommendation request is vectorized by the target embedding layer in the first encoder to obtain the first embedding vector. The target embedding layer performs vectorization processing on the attribute parameters in the user description information to obtain a second embedding vector. The target embedding layer performs vectorization processing on the historical behavior data in the user description information to obtain a third embedding vector. The first feature vector is obtained by processing the object recommendation request, the user description information, and the target feature character sequence through the first encoder of the target model, including: The first feature vector is obtained by processing the first embedding vector, the second embedding vector, the third embedding vector, and the target feature character sequence through the first encoder.

3. The method according to claim 1, characterized in that, The first feature vector is obtained by processing the object recommendation request, the user description information, and the target feature character sequence through the first encoder of the target model, including: The object recommendation request and the user description information are processed by the linear transformation layer in the first encoder of the target model to obtain the first feature character sequence; The first feature character sequence and the target feature character sequence are concatenated to obtain the second feature character sequence. The first feature vector is obtained by extracting features from the second feature character sequence through the encoding layer in the first encoder of the target model.

4. The method according to claim 3, characterized in that, The first feature vector is obtained by extracting features from the second feature character sequence through the encoding layer in the first encoder of the target model, including: The second feature character sequence is normalized by the first normalization layer in the encoding layer to obtain the first initial feature vector; The first initial feature vector is calculated by the attention layer in the coding layer to obtain the calculated feature vector, and a second initial feature vector is obtained based on the first initial feature vector and the calculated feature vector. The second initial feature vector is normalized by the second normalization layer in the coding layer to obtain the third initial feature vector; The first feature vector is obtained based on the third initial feature vector and the second initial feature vector.

5. The method according to claim 4, characterized in that, Based on the third initial feature vector and the second initial feature vector, the first feature vector is obtained as follows: The third initial feature vector and the second initial feature vector are calculated to obtain the fourth initial feature vector; Obtain the position index of the target feature character sequence in the second feature character sequence; The first feature vector is determined from the fourth initial feature vector based on the location index.

6. The method according to claim 3, characterized in that, The object recommendation request and the user description information are processed by the linear transformation layer in the first encoder of the target model to obtain the first feature character sequence, which includes: The first transformation layer in the linear transformation layer processes the profile information in the object recommendation request and the user description information to obtain a first feature character subsequence, wherein the first feature character subsequence includes at least: the feature character corresponding to the object recommendation request and the character index information corresponding to the object recommendation request; The behavioral information in the user description information is processed by the second transformation layer in the linear transformation layer to obtain the second feature character subsequence, wherein the parameters corresponding to the first transformation layer and the second transformation layer are different; The first feature character sequence is obtained based on the first feature character subsequence and the second feature character subsequence.

7. The method according to claim 1, characterized in that, The object description information is processed by the second encoder of the target model to obtain the second feature vector, which includes: The object description information is processed by the projection matrix set in the second encoder of the target model to obtain the projection vector set corresponding to the object description information. The projection matrix set includes a query projection matrix, a key projection matrix, and a value projection matrix, and the projection vector set includes a query projection vector, a key projection vector, and a value projection vector. An attention vector is calculated based on the query projection vector, the key projection vector, and the value projection vector. The attention vector is calculated by the feedforward network in the second encoder of the target model to obtain the calculated attention vector; The second feature vector is obtained by calculating the calculated attention vector and the attention vector.

8. The method according to claim 7, characterized in that, The attention vector is calculated based on the query projection vector, the key projection vector, and the value projection vector, and includes: The key projection vector is segmented and its shape reshaped to obtain a first preset number of first latent space vectors; The value projection vector is segmented and its shape reshaped to obtain the first preset number of second latent space vectors; The query projection vector is processed to obtain a second preset number of third latent space vectors; The attention vector is obtained by calculating based on the first latent space vector, the second latent space vector, and the third latent space vector.

9. The method according to claim 8, characterized in that, The attention vector is calculated based on the first latent space vector, the second latent space vector, and the third latent space vector, and includes: The transpose of the first latent space vector and the third latent space vector are calculated to obtain the first calculation result; The first calculation result is normalized based on the dimension information corresponding to the latent space vector. The normalized calculation result is as follows: The attention vector is obtained by calculating the normalized result and the second latent space vector.

10. The method according to claim 1, characterized in that, The target model is trained using the following steps: Obtain a training sample set, wherein the training sample set consists of first sample description information of sample objects, sample recommendation requests, second sample description information of multiple sample objects, and real labels corresponding to the multiple sample objects respectively, and the real labels are used to characterize the degree of matching between the sample objects and the sample objects; The first encoder of the initial model processes the first sample description information, the sample recommendation request, and the initial feature character sequence to obtain the first sample feature vector corresponding to the sample object. The second encoder in the initial model processes the second sample description information to obtain the second sample feature vectors corresponding to the multiple sample objects respectively. Based on the first sample feature vector and the second sample feature vector, the predicted matching degree corresponding to each of the plurality of sample objects is obtained; The initial model is iterated based on the predicted matching degree and the true label to obtain the target model.

11. The method according to claim 10, characterized in that, Before processing the first sample description information, the sample recommendation request, and the initial feature character sequence through the first encoder of the initial model, the method further includes: Obtain the dimensional information corresponding to the sample feature vector; Based on the dimensional information, the initial feature character sequence is obtained by random initialization.

12. The method according to claim 10, characterized in that, The method further includes: When it is detected that the current initial model meets the conditions for ending training, the current sample feature vector output by the first encoder in the current initial model is obtained; Based on the current sample feature vector, the target feature character sequence is obtained.

13. An object recommendation method, characterized in that, include: Receive object recommendation requests uploaded by clients; Retrieve user description information and object description information for multiple objects from the cloud server; The object recommendation request, the user description information, and the target feature character sequence are processed by the first encoder of the target model to obtain a first feature vector, wherein the target feature character sequence is the feature representation information learned by the first encoder during training; the object description information is processed by the second encoder of the target model to obtain a second feature vector; based on the first feature vector and the second feature vector, the object to be recommended corresponding to the object recommendation request is determined from the plurality of objects; The object to be recommended is returned to the client.

14. An object recommendation device, characterized in that, include: The receiving unit is used to receive object recommendation requests and obtain user description information and object description information of multiple objects; The first processing unit is configured to process the object recommendation request, the user description information, and the target feature character sequence through the first encoder of the target model to obtain a first feature vector, wherein the target feature character sequence is the feature representation information learned by the first encoder during training; The second processing unit is used to process the object description information through the second encoder of the target model to obtain the second feature vector; The first determining unit is used to determine the object to be recommended corresponding to the object recommendation request from the plurality of objects based on the first feature vector and the second feature vector.

15. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device on which the storage medium is located to perform the object recommendation method according to any one of claims 1 to 13.

16. An electronic device, characterized in that, include: Memory, which stores executable programs; A processor for running the program, wherein the program, when running, performs the object recommendation method according to any one of claims 1 to 13.

17. A computer program object, characterized in that, Includes a computer program or instructions that, when executed by a processor, implement the object recommendation method according to any one of claims 1 to 13.