Product information pushing method and device, equipment and storage medium

By acquiring and fusing the features of multi-modal description data, using the attention mechanism to generate representational features, and sorting them in the large language model, the problem of inaccurate product information push is solved and more efficient user product selection and information push are achieved. .

CN118586975APending Publication Date: 2024-09-03CSC FINANCIAL CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202410580188.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-11
Publication Date
2024-09-03

AI Technical Summary

Technical Problem

It is difficult to effectively improve the accuracy of product information push with existing technology. It is difficult for users to choose the desired product among many products, and the information push is not accurate enough.

Method used

By obtaining multi-modal description data, extracting the features of each modality, and integrating the query data based on the attention mechanism, generating highly representative features, inputting the large language model for sorting, and pushing product information to users based on the sorting results.

Benefits of technology

It improves the accuracy of product information push, adapts to changing product information push scenarios, and uses the universality of large language models and large sample training to output more accurate ranking results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118586975A
    Figure CN118586975A
Patent Text Reader

Abstract

The embodiment of the invention provides a product information pushing method and device, equipment and a storage medium, and relates to the technical field of information processing, and the method comprises the steps: obtaining multi-modal description data of each candidate product; for each candidate product, extracting a first feature of each piece of modal description data; obtaining first query data, first key data and first value data corresponding to each mode of each candidate product based on the first feature; fusing the first query data based on an attention mechanism to obtain second query data, and according to the second query data, extracting second features representing candidate products from the first key data and the first value data corresponding to each modal; respectively inputting the second feature and the push information screening condition into an embedded layer and an input layer of a large language model, and sorting the candidate products to obtain a sorting result; and pushing the product information to the user based on the sorting result. By applying the technical scheme provided by the embodiment of the invention, the accuracy of pushing the product information to the user is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information processing technology, and in particular to a method, device, equipment and storage medium for pushing product information. Background Art

[0002] There are a great variety of products on the market today. On the one hand, in order to promote product sales, the platform needs to increase the exposure of products to users and push various product information that users may be interested in to users. On the other hand, users need to choose products from many products. In order to help users choose the products they need, the platform also needs to push various product information that users may be interested in to users.

[0003] In view of the above situation, it is necessary to provide a product information push solution. Summary of the invention

[0004] The purpose of the embodiments of the present application is to provide a product information push method, device, equipment and storage medium to improve the accuracy of pushing product information to users. The specific technical solution is as follows:

[0005] In a first aspect of an embodiment of the present application, a method for pushing product information is provided, the method comprising:

[0006] Obtain multimodal description data for each candidate product;

[0007] For each candidate product, extract the first feature of the description data of each modality of the candidate product;

[0008] Based on the first feature corresponding to each modality of each candidate product, the first query data, the first key data and the first value data corresponding to each modality of each candidate product are obtained; for each candidate product, the first query data corresponding to each modality are fused based on the attention mechanism to obtain the second query data, and according to the second query data, the second feature representative of the candidate product is extracted from the first key data and the first value data corresponding to each modality respectively;

[0009] Inputting the second feature corresponding to each candidate product into the embedding layer of the large language model, and inputting the push information screening condition into the input layer of the large language model, sorting each candidate product, and obtaining the sorting result output by the large language model;

[0010] Product information is pushed to the user based on the ranking result.

[0011] In some embodiments, for each candidate product, fusing the first query data corresponding to each modality based on the attention mechanism to obtain the second query data includes:

[0012] For each candidate product, data fusion is performed in the following manner to obtain the second query data corresponding to the candidate product:

[0013] splicing the first query data corresponding to each modality of the candidate product, and performing a one-dimensional convolution transformation on the spliced ​​first query data to obtain a first transformation result;

[0014] Normalizing the first transformation result, and performing nonlinear transformation on the normalized result to obtain a second transformation result;

[0015] Performing pooling processing on the second transformation result to obtain a third transformation result;

[0016] Performing a one-dimensional convolution transformation on the third transformation result to obtain a fourth transformation result;

[0017] Normalizing the fourth transformation result, and performing nonlinear transformation on the normalized result to obtain a fifth transformation result;

[0018] The fifth transformation result is used as a weight coefficient to perform weighted calculation on the first query data corresponding to each mode of the candidate product to obtain the second query data corresponding to the candidate product.

[0019] In some embodiments, extracting, according to the second query data, second features representative of the candidate product from the first key data and the first value data corresponding to each modality, respectively, includes:

[0020] Based on the second query data and the first key data corresponding to each modality, generate attention data corresponding to each modality respectively;

[0021] The first value data corresponding to each modality is superimposed on the attention data corresponding to each modality to obtain a second feature representative of the candidate product in each modality.

[0022] In some embodiments, based on the first feature of each modality of each candidate product, the first query data, first key data and first value data corresponding to each modality of each candidate product are obtained; for each candidate product, the first query data corresponding to each modality are fused based on the attention mechanism to obtain the second query data, and according to the second query data, the second feature representative of the candidate product is extracted from the first key data and the first value data corresponding to each modality, respectively, including:

[0023] The first feature corresponding to each modality of each candidate product is input into a pre-trained first model to obtain a second feature output by the first model that is representative of the candidate product.

[0024] In some embodiments, the first model is trained by:

[0025] Obtaining first sample features of the description data of each mode of each first sample product;

[0026] Inputting the first sample features corresponding to each mode of each first sample product into the data transformation layer of the initial model, obtaining the first sample query data, first sample key data and first sample value data corresponding to each mode of each first sample product output by the data transformation layer, wherein the initial model further includes: a data fusion layer and a feature extraction layer;

[0027] For each first sample product, the first sample query data corresponding to each modality of the first sample product is input into the data fusion layer for data fusion based on the attention mechanism, so as to obtain the second sample query data corresponding to the first sample product output by the data fusion layer;

[0028] Input the second sample query data corresponding to each first sample product, the first sample key data and the first sample value data corresponding to each modality of each first sample product into the feature extraction layer, and extract the second sample features representative of each candidate product from the input first sample key data and the first sample value data;

[0029] Inputting the second sample features corresponding to each first sample product into the embedding layer of the large language model, and inputting the push information screening condition into the input layer of the large language model, sorting each first sample product, and obtaining the first sample sorting result output by the large language model;

[0030] Based on the first sample sorting result and the label sorting result of the first sample product under the push information screening condition, obtain the first model loss value of the initial model;

[0031] Based on the loss value of the first model, parameters of each network layer of the initial model are adjusted to obtain the first model.

[0032] In some embodiments, the model parameters of the large language model are adjusted in the following manner:

[0033] Inputting each modality description data of each second sample product into a pre-trained second model to obtain third sample features corresponding to each modality of each second sample product output by the second model;

[0034] Inputting the third sample features corresponding to each modality of each second sample product into the pre-trained first model to obtain the fourth sample features output by the first model;

[0035] Inputting the fourth sample feature corresponding to each second sample product into the embedding layer of the large language model, and inputting the push information screening condition into the input layer of the large language model, sorting each second sample product, and obtaining the second sample sorting result output by the large language model;

[0036] Based on the second sample sorting result and the label sorting result of the second sample product under the push information screening condition, obtaining a second model loss value of the large language model;

[0037] Based on the second model loss value, parameters of each network layer of the large language model are adjusted to obtain an adjusted large language model.

[0038] In some embodiments, the multimodal description data includes one or more of the following: image description data, numerical description data, and text description data;

[0039] and / or

[0040] The types of push information screening conditions include one or more of the following: questions, content generation, and content understanding.

[0041] In a second aspect of an embodiment of the present application, a product information push device is provided, the device comprising:

[0042] An acquisition module, used to acquire multimodal description data of each candidate product;

[0043] A first extraction module is used to extract, for each candidate product, a first feature of the description data of each modality of the candidate product;

[0044] A second extraction module is used to obtain first query data, first key data and first value data corresponding to each modality of each candidate product based on the first feature corresponding to each modality of each candidate product; for each candidate product, the first query data corresponding to each modality is fused based on the attention mechanism to obtain second query data, and according to the second query data, second features representative of the candidate product are extracted from the first key data and the first value data corresponding to each modality respectively;

[0045] A sorting module, used to input the second feature corresponding to each candidate product into the embedding layer of the large language model, and input the push information screening condition into the input layer of the large language model, sort the candidate products, and obtain the sorting result output by the large language model;

[0046] A push module is used to push product information to users based on the sorting results.

[0047] In some embodiments, the second extraction module is specifically used to:

[0048] For each candidate product, data fusion is performed in the following manner to obtain the second query data corresponding to the candidate product:

[0049] splicing the first query data corresponding to each modality of the candidate product, and performing a one-dimensional convolution transformation on the spliced ​​first query data to obtain a first transformation result;

[0050] Normalizing the first transformation result, and performing nonlinear transformation on the normalized result to obtain a second transformation result;

[0051] Performing pooling processing on the second transformation result to obtain a third transformation result;

[0052] Performing a one-dimensional convolution transformation on the third transformation result to obtain a fourth transformation result;

[0053] Normalizing the fourth transformation result, and performing nonlinear transformation on the normalized result to obtain a fifth transformation result;

[0054] The fifth transformation result is used as a weight coefficient to perform weighted calculation on the first query data corresponding to each mode of the candidate product to obtain the second query data corresponding to the candidate product.

[0055] In some embodiments, the second extraction module is specifically used to:

[0056] Based on the second query data and the first key data corresponding to each modality, generate attention data corresponding to each modality respectively;

[0057] The first value data corresponding to each modality is superimposed on the attention data corresponding to each modality to obtain a second feature representative of the candidate product in each modality.

[0058] In some embodiments, the second extraction module is specifically used to:

[0059] The first feature corresponding to each modality of each candidate product is input into a pre-trained first model to obtain a second feature output by the first model that is representative of the candidate product.

[0060] In some embodiments, the first model is trained by:

[0061] Obtaining first sample features of the description data of each mode of each first sample product;

[0062] Inputting the first sample features corresponding to each mode of each first sample product into the data transformation layer of the initial model, obtaining the first sample query data, first sample key data and first sample value data corresponding to each mode of each first sample product output by the data transformation layer, wherein the initial model further includes: a data fusion layer and a feature extraction layer;

[0063] For each first sample product, the first sample query data corresponding to each modality of the first sample product is input into the data fusion layer for data fusion based on the attention mechanism, so as to obtain the second sample query data corresponding to the first sample product output by the data fusion layer;

[0064] Input the second sample query data corresponding to each first sample product, the first sample key data and the first sample value data corresponding to each modality of each first sample product into the feature extraction layer, and extract the second sample features representative of each candidate product from the input first sample key data and the first sample value data;

[0065] Inputting the second sample features corresponding to each first sample product into the embedding layer of the large language model, and inputting the push information screening condition into the input layer of the large language model, sorting each first sample product, and obtaining the first sample sorting result output by the large language model;

[0066] Based on the first sample sorting result and the label sorting result of the first sample product under the push information screening condition, obtain the first model loss value of the initial model;

[0067] Based on the loss value of the first model, parameters of each network layer of the initial model are adjusted to obtain the first model.

[0068] In some embodiments, the model parameters of the large language model are adjusted in the following manner:

[0069] Inputting each modality description data of each second sample product into a pre-trained second model to obtain third sample features corresponding to each modality of each second sample product output by the second model;

[0070] Inputting the third sample features corresponding to each modality of each second sample product into the pre-trained first model to obtain the fourth sample features output by the first model;

[0071] Inputting the fourth sample feature corresponding to each second sample product into the embedding layer of the large language model, and inputting the push information screening condition into the input layer of the large language model, sorting each second sample product, and obtaining the second sample sorting result output by the large language model;

[0072] Based on the second sample sorting result and the label sorting result of the second sample product under the push information screening condition, obtaining a second model loss value of the large language model;

[0073] Based on the second model loss value, parameters of each network layer of the large language model are adjusted to obtain an adjusted large language model.

[0074] In some embodiments, the multimodal description data includes one or more of the following: image description data, numerical description data, text description data; and / or

[0075] The types of push information screening conditions include one or more of the following: questions, content generation, and content understanding.

[0076] In a third aspect of the embodiments of the present application, an electronic device is provided, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus;

[0077] Memory, used to store computer programs;

[0078] The processor is used to implement any method described in the first aspect when executing a program stored in the memory.

[0079] In a fourth aspect of the embodiments of the present application, a computer-readable storage medium is provided, wherein a computer program is stored in the computer-readable storage medium, and when the computer program is executed by a processor, any method described in the first aspect is implemented.

[0080] In a fifth aspect of the embodiments of the present application, a computer program product comprising instructions is provided, which, when executed on a computer, enables the computer to execute any of the methods described in the first aspect above.

[0081] Beneficial effects of the embodiments of the present application:

[0082] In the technical solution provided by the embodiment of the present application, the electronic device obtains multimodal description data of each candidate product; and for each candidate product, the first feature of each modal description data is extracted respectively; then for each candidate product, the first feature corresponding to each modality is converted into first query data, first key data and first value data, and the first query data corresponding to each modality is fused based on the attention mechanism. In the second query data obtained after the fusion, information that is more representative of the candidate product will be given higher attention, and the second feature that is representative of the candidate product is extracted from the original first key data and the first value data according to the second query data. In this way, the first feature of the extracted description data of each modality is fully utilized, and the obtained second feature can more comprehensively and accurately characterize the candidate product; after obtaining the second feature, the electronic device combines the second feature with the push information screening condition The embedding layer and the input layer of the large language model are input respectively, so as to obtain the large language model according to the push information screening conditions, based on the second feature that is representative of each candidate product, and the sorting result output by sorting each candidate product, and then push the product information to the user according to the above sorting result, use the large language model to understand the push information screening conditions, and the large language model sorts each candidate product according to the understood semantic information, instead of using a pre-trained sorting model with a clear goal to sort. The large language model used in the embodiment of the present application is more universal than the sorting model with a clear goal, and can adapt to the changing product information push scenarios. The large language model trained with a large number of samples has a more accurate output sorting result, and the product information is pushed to the user according to the above sorting result, thereby improving the accuracy of pushing product information to the user.

[0083] Of course, implementing any product or method of the present application does not necessarily require achieving all of the advantages described above at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0084] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application, and for ordinary technicians in this field, other embodiments can also be obtained based on these drawings.

[0085] Figure 1 A schematic diagram of a process flow of a method for pushing product information provided in an embodiment of the present application;

[0086] Figure 2 A detailed flow chart of step S14 provided in an embodiment of the present application;

[0087] Figure 3 A schematic diagram of a flow chart of a training method of a first model provided in an embodiment of the present application;

[0088] Figure 4 A schematic diagram of the structure of the data fusion layer provided in an embodiment of the present application;

[0089] Figure 5 A schematic diagram of a flow chart of a method for adjusting model parameters of a large language model provided in an embodiment of the present application;

[0090] Figure 6 An example flowchart of the training process of each model in an embodiment of the present application is provided for an embodiment of the present application;

[0091] Figure 7 A schematic diagram of the structure of a product information push device provided in an embodiment of the present application;

[0092] Figure 8 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0094] There are a great variety of products on the market today. On the one hand, in order to promote product sales, the platform needs to increase the exposure of products to users and push various product information that users may be interested in to users. On the other hand, users need to choose products from many products. In order to help users choose the products they need, the platform also needs to push various product information that users may be interested in to users.

[0095] In view of the above situation, it is necessary to provide a product information push solution.

[0096] The present application embodiment provides a method for pushing product information, such as Figure 1 As shown, the method includes the following steps. For the convenience of description, the electronic device is used as the execution subject for description below.

[0097] Step S11, obtaining multimodal description data of each candidate product.

[0098] The candidate product may be any type of product, such as daily necessities, electronic products, electronic courses, film and television drama memberships, or any product available for purchase by users. The multimodal description data may include one or more of the following: image description data, numerical description data, and text description data, that is, the above modalities may include image modalities, numerical modalities, or text modalities. The image description data of the candidate product may be a physical picture of the candidate product or a sales trend chart, etc.; the numerical description data of the candidate product may be the product parameters of the candidate product, the historical sales of the candidate product, the click-through rate of the candidate product, or the purchase rate of the candidate product, etc.; the text description data of the candidate product may be the instructions of the candidate product or recent news reports related to the candidate product, etc. For the physical pictures, product parameters, and instructions of the candidate product, etc., the electronic device may obtain them from the database of the candidate product; for the historical sales, click-through rate, and purchase rate of the candidate product, etc., the electronic device may obtain them from the background database of the multimedia platform; for news reports related to the candidate product, the electronic device may search for the candidate product name or product category on a search engine or a media platform, thereby capturing news reports related to the candidate product.

[0099] Step S12: for each candidate product, extract the first feature of the description data of each mode of the candidate product.

[0100] For description data of different modalities, the electronic device extracts features in the description data, i.e., the first feature, in different ways. For example, for numerical description data, the electronic device can input the numerical description data into any of the following models to extract the first feature in the numerical description data: LSTM (Long Short-Term Memory), AGRU (Attention Gated Recurrent Unit), CNN (Convolutional Neural Network), ACNN (Attention Convolutional Neural Network) or MLP (Multi Layer Perceptron). For image description data, the electronic device can input the image description data into ViT (Vision Transformer) to extract the first feature in the image description data. For text description data, the electronic device can input the text description data into BERT (Bidirectional Encoder Representation from Transformers) to extract the first feature in the text description data. The above-mentioned models for extracting the first feature can also be called feature encoders.

[0101] In addition to the above-mentioned method of inputting the description data into the model to extract the first feature, the electronic device can also use the corresponding algorithm of each modality to extract the first feature. For example, the electronic device can use the point feature extraction operator to extract the first feature in the image description data; the electronic device can count the DF (Document Frequent), IG (Information Divergence) or MI (Mutual Information) in the text description data as the first feature; the electronic device can also use the principal component analysis method, the entropy method or the hierarchical analysis method and other algorithms to extract the first feature in the numerical description data.

[0102] For each multimodal description data of a candidate product, the electronic device uses the algorithms or models corresponding to each modality as described above to extract the first features of each modality description data of the candidate product.

[0103] Step S13, based on the first feature corresponding to each modality of each candidate product, obtain the first query data, the first key data and the first value data corresponding to each modality of each candidate product.

[0104] The first query data is used to query the characterization value of the information in the first feature for the candidate product; the first key data is the information in the first feature to be queried, which is used to compare with the first query data to obtain the characterization value of the information in the first feature corresponding to the first query data for the candidate product, that is, attention data; the first value data is essentially the first feature, and the first value data can be the first feature or data obtained by linearly transforming the first feature.

[0105] The electronic device multiplies the first feature corresponding to each modality with the query weight matrix, key weight matrix and value weight matrix corresponding to the modality, respectively, to obtain the first query data, first key data and first value data corresponding to the modality, wherein the query weight matrix, key weight matrix and value weight matrix can be the preset query weight matrix, key weight matrix and value weight matrix corresponding to each modality, or can be the query weight matrix, key weight matrix and value weight matrix obtained through model training.

[0106] In one example, the electronic device obtains first query data, first key data, and first value data corresponding to each modality based on first features corresponding to numerical value, image, and text modalities of candidate product A.

[0107] The first feature corresponding to the numerical mode of candidate product A is S1, and the query weight matrix, key weight matrix, and value weight matrix corresponding to the numerical mode are W Q1 , W K1 and W V1 , the electronic device connects S1 and W Q1, W K1 and W V1 Multiply them respectively to get the first query data Q corresponding to the numerical mode 1 =W Q1 ×S1, first key data K 1 =W K1 ×S1, first value data V 1 =W V1 ×S1. The first feature corresponding to the image modality of candidate product A is S2, and the query weight matrix, key weight matrix, and value weight matrix corresponding to the image modality are W Q2 , W K2 and W V2 , the electronic device connects S2 and W Q2 , W K2 and W V2 Multiply them respectively to get the first query data Q corresponding to the image modality 2 =W Q2 ×S2, first key data K 2 =W K2 ×S2, first value data V 2 =W V2 ×S2. The first feature corresponding to the text mode of candidate product A is S3, and the query weight matrix, key weight matrix, and value weight matrix corresponding to the image mode are W Q3 , W K3 and W V3 , the electronic device connects S3 and W Q3 , W K3 and W V3 Multiply them respectively to get the first query data Q corresponding to the image modality 3 =W Q3 ×S3, first key data K 3 =W K3 ×S3, first value data V 3 =W V3 ×S3. The dimensions of the query weight matrix, key weight matrix, and value weight matrix corresponding to each modality are configurable, and the dimensions of the first query data corresponding to different modalities can be made the same through configuration.

[0108] Step S14: for each candidate product, the first query data corresponding to each modality is fused based on the attention mechanism to obtain the second query data.

[0109] For each candidate product, after obtaining the first query data corresponding to each modality, the electronic device can fuse the first query data of each modality based on the attention mechanism to obtain the second query data. For example, the electronic device can splice the first query data of each modality into a whole, apply the attention mechanism to the splicing result, and obtain the second query data.

[0110] Continuing with the example in step S13 above, the electronic device obtains Q 1 , Q 2 and Q 3 After that, Q 1 , Q 2 and Q 3 Splice to get the spliced ​​Q 1 -Q 2 -Q 3 , apply the attention mechanism to Q 1 -Q 2 -Q 3 , the electronic device gives Q based on the attention mechanism 1 -Q 2 -Q 3 Different information in the image has different attention, that is, different information is given different weight coefficients. Among them, the more representative the information of the candidate product is, the higher the attention is, and the higher the weight coefficient is; the less representative the information of the candidate product is, the lower the attention is, and the lower the weight coefficient is. The electronic device then uses the weight coefficient obtained above to convert Q 1 -Q 2 -Q 3 The information in is multiplied by the corresponding weight coefficient to obtain the second query data Q corresponding to the candidate product 123 .

[0111] Step S15: extracting second features representative of the candidate product from the first key data and the first value data corresponding to each modality according to the second query data.

[0112] Since in step S14, the information in the second query data has been assigned weight coefficients according to the weights obtained based on the attention mechanism and the strength of its representativeness for the candidate products, the electronic device can use the second query data to query the second features that are representative of the candidate products in the first key data and first value data corresponding to each modality.

[0113] In some embodiments, the electronic device may implement the above step S15 based on the following steps a1-a2.

[0114] Step a1, based on the second query data and the first key data corresponding to each modality, generate the attention data corresponding to each modality respectively.

[0115] The electronic device can multiply the second query data by the first key data of each modality, or can first perform dimensionality upscaling or dimensionality reduction processing on the first key data of each modality, and then multiply the second query data by the processed first key data of each modality to obtain the attention data corresponding to each modality.

[0116] Continuing with the example in step S14 above, the electronic device obtains the second query data Q 123 After that, the second query data Q 123 Multiply the first key data corresponding to each mode respectively. 123 The first key data K corresponding to the numerical mode 1 Multiply them together to get the attention data Q corresponding to the numerical mode 123 K 1 T ; Q 123 The first key data K corresponding to the image modality 2 Multiply them together to get the attention data Q corresponding to the image modality 123 K 2 T ; Q 123 The first key data K corresponding to the text mode 3 Multiply them together to get the attention data Q corresponding to the text modality 123 K 3 T .

[0117] Step a2, superimposing the first value data corresponding to each modality on the attention data corresponding to each modality, to obtain a second feature representative of the candidate product in each modality.

[0118] The electronic device may multiply the attention data corresponding to each modality with the first value data to obtain a second feature representative of the candidate product in each modality. The electronic device may also first normalize the attention data, for example, by using softmax (normalized exponential function) to process the attention data, and then multiply the normalized attention data with the first value data to obtain a second feature representative of the candidate product in each modality.

[0119] Continuing with the example in step a1 above, the electronic device can first use softmax to normalize the attention data corresponding to each modality. The electronic device uses softmax to normalize the attention data Q corresponding to the numerical modality. 123 K 1 T Normalize and get softmax(Q 123 K 1 T ); The electronic device uses softmax to focus on the attention data Q corresponding to the image modality 123 K 2 T Normalize and get softmax(Q 123 K 2 T ); The electronic device uses softmax to focus on the attention data Q corresponding to the text modality123 K 3 T Normalize and get softmax(Q 123 K 3 T After the attention data is normalized, the electronic device multiplies the attention data corresponding to each mode after the normalization process with the first value data corresponding to each mode to obtain the second feature softmax (Q 123 K 1 T )V 1 , the second feature softmax(Q 123 K 2 T )V 2 , the second feature softmax(Q 123 K 3 T )V 3 .

[0120] In the technical solution provided in the embodiment of the present application, the electronic device generates attention data corresponding to each modality based on the second query data and the first key data corresponding to each modality, and then superimposes the first value data corresponding to each modality on the obtained attention data corresponding to each modality, thereby obtaining the second feature. In the above scheme, when the electronic device generates attention data, it combines the information of the modality included in the first key data and the information of all other modalities included in the second query data. Compared with generating self-attention data for each modality using the first query data and the first key data of the modality itself, the cross-generated attention data combines the information in the first query data of different modalities, so that the obtained second feature can more accurately characterize the candidate product.

[0121] Step S16, input the second feature corresponding to each candidate product into the embedding layer of the large language model, and input the push information screening condition into the input layer of the large language model, sort the candidate products, and obtain the sorting result output by the large language model.

[0122] The above-mentioned large language model can use the input push information screening condition as a guide word, perform analysis based on the guide word combined with data features, and then generate the result indicated by the push information screening condition.

[0123] Among them, the push information screening condition can also be called instruction data, indicating the result that the user or developer wants the large language model to output. The push information screening condition can include one or more of the following: questions, content generation, and content understanding. In one example, the push information screening condition can be a question: "Which candidate products are helpful for learning?" The large language model can analyze the relevance of the candidate products to learning based on this question, combined with the second features of each candidate product in the input embedding layer, and then sort the candidate products according to the relevance of the candidate products to learning, and output the sorting results. In one example, the push information screening condition can also be content generation: "Based on the performance of the candidate products, generate a ranking of the candidate products from high to low performance." The large language model can analyze the performance of the candidate products based on the push information screening condition, combined with the second features of each candidate product in the input embedding layer, and then sort the candidate products from high to low according to performance according to the performance of the candidate products, and output the sorting results. In one example, the push information filtering condition can also be content understanding: "Analyze the performance of candidate products". The large language model can analyze the performance of the candidate products based on the push information filtering condition and the second feature of each candidate product in the input embedding layer, and then sort the candidate products from high to low according to the performance, or sort them from low to high according to the performance, and output the sorting results.

[0124] The push information screening condition can be a sentence or a paragraph input by the user once or multiple times. The large language model can be deployed on an electronic device or on any background server. The large language model includes an embedding layer and an input layer. The electronic device can directly embed the second feature corresponding to each candidate product extracted in the above step S15 into the embedding layer of the large language model, and the large language model no longer needs to perform feature extraction processing on the multimodal description data of each candidate product. The electronic device also inputs the push information screening condition into the input layer of the large language model. The large language model first performs feature extraction processing on the push information screening condition, understands the semantics of the push information screening condition, and then sorts each candidate product according to the semantics of the push information screening condition and the second feature corresponding to each candidate product, outputs the sorting result, and the electronic device obtains the sorting result of the large language model.

[0125] Step S17: Push product information to the user based on the sorting result.

[0126] After obtaining the ranking results output by the large language model, the electronic device can push product information to the user in the form the user wants based on the ranking results and the semantics of the push information screening conditions understood, combined with the above ranking results. For example, the electronic device can directly display the ranking results on the interaction interface of the electronic device, or the electronic device can select the top 10 candidate products to display on the interaction interface of the electronic device, without limitation.

[0127] In the technical solution provided by the embodiment of the present application, the electronic device obtains multimodal description data of each candidate product; and for each candidate product, the first feature of each modal description data is extracted respectively; then for each candidate product, the first feature corresponding to each modality is converted into first query data, first key data and first value data, and the first query data corresponding to each modality is fused based on the attention mechanism. In the second query data obtained after the fusion, information that is more representative of the candidate product will be given higher attention, and the second feature that is representative of the candidate product is extracted from the original first key data and the first value data according to the second query data. In this way, the first feature of the extracted description data of each modality is fully utilized, and the obtained second feature can more comprehensively and accurately characterize the candidate product; after obtaining the second feature, the electronic device combines the second feature with the push information screening condition The embedding layer and the input layer of the large language model are input respectively, so as to obtain the large language model according to the push information screening conditions, based on the second feature that is representative of each candidate product, and the sorting result output by sorting each candidate product, and then push the product information to the user according to the above sorting result, use the large language model to understand the push information screening conditions, and the large language model sorts each candidate product according to the understood semantic information, instead of using a pre-trained sorting model with a clear goal to sort. The large language model used in the embodiment of the present application is more universal than the sorting model with a clear goal, and can adapt to the changing product information push scenarios. The large language model trained with a large number of samples has a more accurate output sorting result, and the product information is pushed to the user according to the above sorting result, thereby improving the accuracy of pushing product information to the user.

[0128] In some embodiments, the electronic device may also Figure 2 The method shown herein obtains second query data by fusing the first query data corresponding to each modality of each candidate product for each candidate product, that is, the above step S14 may include the following sub-steps.

[0129] Step S21, concatenating the first query data corresponding to each modality of each candidate product, and performing a one-dimensional convolution transformation on the concatenated first query data to obtain a first transformation result.

[0130] For each candidate product, the electronic device may splice the first query data corresponding to each modality of the candidate product, such as directly connecting the first query data corresponding to each modality in series, and then the electronic device performs a one-dimensional convolution transformation on the spliced ​​first query data to obtain a first transformation result, wherein the one-dimensional convolution transformation uses pre-trained convolution kernel parameters. The electronic device may also perform deduplication processing after splicing the first query data corresponding to each modality of the candidate product, delete duplicate information, and retain one copy, and then perform a one-dimensional convolution transformation on the first query data after deduplication processing. The electronic device performs a one-dimensional convolution transformation on the spliced ​​first query data to further extract features in the first query data.

[0131] Step S22, normalizing the first transformation result, and performing nonlinear transformation on the normalized result to obtain a second transformation result.

[0132] For the convenience of calculation, the electronic device may normalize the first transformation result to obtain a second transformation result. Specifically, the electronic device may normalize the first transformation result by using maximum normalization or minimum normalization. The electronic device then applies a nonlinear function, such as a Sigmoid function, a tanh (hyperbolic tangent) function, or a ReLU (Rectified Linear Unit) function, to the normalized result of the first transformation result to obtain a second transformation result.

[0133] Step S23, performing pooling processing on the second transformation result to obtain a third transformation result.

[0134] To further extract features from the second transformation result and speed up the calculation, the electronic device may perform pooling on the second transformation result to obtain a third transformation result. For example, the electronic device may perform mean pooling or maximum pooling on the second transformation result to obtain a third transformation result.

[0135] Step S24, performing a one-dimensional convolution transformation on the third transformation result to obtain a fourth transformation result.

[0136] To further extract features from the third transformation result, the electronic device may perform a one-dimensional convolution transformation on the third transformation result, where the one-dimensional convolution transformation uses pre-trained convolution kernel parameters.

[0137] Step S25, normalizing the fourth transformation result, and performing nonlinear transformation on the normalized result to obtain a fifth transformation result.

[0138] To facilitate calculation, the electronic device can normalize the fourth transformation result and perform a nonlinear transformation on the normalized result to obtain a fifth transformation result. Specifically, the electronic device can normalize the first transformation result by using maximum normalization or minimum normalization, and then apply a nonlinear function, such as a Sigmoid function, a tanh function, or a ReLU function, to the normalized result of the fourth transformation to obtain a fifth transformation result.

[0139] Step S26, using the fifth transformation result as a weight coefficient, performing weighted calculation on the concatenated first query data to obtain second query data corresponding to the candidate product.

[0140] The convolution kernel parameters used in the above-mentioned multiple convolution transformations of the first query data can be obtained through pre-training. After the above-mentioned transformations, the fifth transformation result obtained is the strength of the representation of the candidate product by different information in the spliced ​​first query data. The electronic device uses the fifth transformation result as the weight coefficient to perform weighted calculation on the spliced ​​first query data, and can obtain the second query data corresponding to the candidate product.

[0141] In the technical solution provided in the embodiment of the present application, the electronic device uses multi-layer transformation to obtain weight coefficients, so as to more comprehensively obtain the information in the first query data corresponding to each modality after splicing. The obtained weight coefficients can more accurately reflect the strength of the representation of different information in the first query data corresponding to each modality after splicing for the candidate product, so that the second query data obtained after weighted calculation using the above-mentioned weight coefficients can accurately reflect the strength of the representation of different information in the first query data for the candidate product, and then the second feature extracted according to the second query data can more accurately characterize the candidate product.

[0142] In some embodiments, the steps of extracting the second feature representative of the candidate product from the first feature corresponding to each modality of each candidate product in the above steps S13-S15 can be implemented using a pre-trained first model. The electronic device can directly input the first feature corresponding to each modality of each candidate product into the pre-trained first model to obtain the second feature representative of the candidate product output by the first model. In the technical solution provided in the embodiment of the present application, the first model pre-trained with a large number of samples is used to extract the second feature representative of the candidate product from the first feature, which is more accurate than the second feature extracted by the traditional algorithm, and the subsequent ranking results of the candidate products obtained by the electronic device based on the second feature are also more accurate.

[0143] In some embodiments, the first model can be Figure 3The method may include the following steps S31-S37. The first model may be trained on the above-mentioned electronic device or on any background server. For the sake of distinction, the following description is made with the first device as the execution subject of the first model training process.

[0144] Step S31, obtaining first sample features of description data of each mode of each first sample product.

[0145] The first sample product may include any type of product, such as daily necessities, electronic products, electronic courses, film and television drama memberships, or any product available for purchase by the user. The description data of each modality of the first sample product may include one or more of the following: image description data, numerical description data, and text description data. Specifically, reference may be made to the description of the multimodal description data of the candidate product in step S11.

[0146] After acquiring the multimodal description data of each first sample product, the first device may obtain the first sample feature of the description data of each modality of each first sample product. For example, the first device may input the description data of each modality of each first sample product into a pre-trained feature extraction model. For details, please refer to the description of the model for extracting the first feature in the above step S12, which will not be repeated here.

[0147] Step S32, inputting the first sample features corresponding to each mode of each first sample product into the data transformation layer of the initial model, obtaining the first sample query data, first sample key data and first sample value data corresponding to each mode of each first sample product output by the data transformation layer.

[0148] The initial model may include a data conversion layer, which may convert the first sample features corresponding to each modality of each first sample product input by the first device into first sample query data, first sample key data, and first sample value data corresponding to each modality of each first sample product. For example, the data conversion layer may include an initial query weight matrix, an initial key weight matrix, and an initial value weight matrix corresponding to each modality, and the data conversion layer may multiply the first sample features corresponding to each modality of each first sample product with the initial query weight matrix, the initial key weight matrix, and the initial value weight matrix corresponding to each modality, respectively, to obtain and output the first sample query data, the first sample key data, and the first sample value data corresponding to each modality of each first sample product.

[0149] The first device inputs the first sample features corresponding to each modality of each first sample product into the data transformation layer of the initial model, and can obtain the first sample query data, first sample key data and first sample value data corresponding to each modality of each first sample product output by the data transformation layer.

[0150] After the first model is obtained through training, the data transformation layer is the data transformation layer of the first model, and subsequent data transformation layers can be used to implement the above step S13. The electronic device inputs the first feature corresponding to each modality of each candidate product into the data transformation layer of the first model, and can obtain the first query data, first key data and first value data corresponding to each modality of each candidate product.

[0151] In addition to the data transformation layer, the initial model may also include: a data fusion layer and a feature extraction layer. The following steps S33 and S34 respectively utilize the data fusion layer and the feature extraction layer of the initial model.

[0152] Step S33: for each first sample product, the first sample query data corresponding to each modality of the first sample product is input into the data fusion layer for data fusion based on the attention mechanism, so as to obtain the second sample query data corresponding to the first sample product output by the data fusion layer.

[0153] The data fusion layer can fuse the first sample query data corresponding to each modality of each first sample product based on the attention mechanism to obtain the second sample query data corresponding to the first sample product. For example, the data fusion layer can first splice the first sample query data corresponding to each modality of the first sample product; then, based on the attention mechanism, give higher attention, i.e., weight coefficient, to the information that is highly representative of the first sample product in the spliced ​​first sample query data; the data fusion layer then uses the weight coefficient obtained based on the attention mechanism to perform weighted calculation on the spliced ​​first sample query data to obtain the second sample query data corresponding to the first sample product, and then use the second sample query data to query the second sample features that are representative of the first sample product in the first sample key data and the first sample value data corresponding to each modality.

[0154] The first device can input the first sample query data corresponding to each modality of the first sample product into the data fusion layer for data fusion based on the attention mechanism for each first sample product, so as to obtain the second sample query data corresponding to the first sample product output by the data fusion layer.

[0155] After the first model is trained, the data fusion layer is the data fusion layer of the first model, and the subsequent data fusion layer can be used to implement the above step S14. For each candidate product, the electronic device inputs the first query data corresponding to each modality into the data fusion layer of the first model to obtain the second query data.

[0156] The above-mentioned data fusion layer can also adopt the residual attention mechanism, that is, during the training process of the first model, residual information can be added each time the parameters of the data fusion layer are adjusted, so as to avoid the gradient of the parameter change being too large, and further avoid the problems of gradient disappearance and gradient explosion that may occur during the training process of the first model, thereby improving the accuracy of the first model finally obtained.

[0157] The above data fusion layer can also use the above Figure 2 The method shown in , fuses the first sample query data corresponding to each modality to obtain the second sample query data. On this basis, Figure 4 As shown in Figure 1, we can also combine the residual attention mechanism to add residual information each time we adjust the parameters of the data fusion layer to train the data fusion layer. Figure 4 In , from top to bottom, each sublayer of the data fusion layer transforms the first sample query data in turn. The first sublayer is a one-dimensional convolution layer, which can be used for the one-dimensional convolution transformation processing in step S21; the second sublayer is a fusion layer of the normalization layer and the nonlinear transformation layer, which can be used for the normalization processing and nonlinear transformation in step S22, and the data input to the sublayer is normalized and nonlinearly transformed in turn, wherein the nonlinear function included in the nonlinear transformation layer can also be called an activation function, and any one of the Sigmoid function, tanh function or ReLU function can be used; the third sublayer is a pooling layer (marked with a dotted box in the figure), including a maximum pooling layer and a mean pooling layer, which can be used for the pooling processing in step S23; the The four sublayers are one-dimensional convolution layers, which can be used for the one-dimensional convolution transformation in step S24; the fifth sublayer is a fusion layer of the normalization layer and the nonlinear transformation layer, which can be used for the normalization processing and nonlinear transformation in step S25, and the data input to the sublayer is subjected to normalization processing and nonlinear transformation in turn, wherein the nonlinear function included in the nonlinear transformation layer can also adopt any one of the Sigmoid function, the tanh function or the ReLU function; the sixth sublayer is a gating layer, which uses the fifth transformation result, i.e., the weight coefficient, to multiply the information in the first sample query data by the corresponding weight coefficient to obtain the second sample query data. When adjusting the parameters of the gating layer, the residual information can be added, so as to avoid the gradient of the parameter change being too large, thereby avoiding the problems of gradient disappearance and gradient explosion that may occur during the training process of the first model.

[0158] Step S34, input the second sample query data corresponding to each first sample product, the first sample key data and the first sample value data corresponding to each modality of each first sample product into the feature extraction layer, and extract the second sample features representative of each candidate product from the input first sample key data and first sample value data.

[0159] The feature extraction layer can extract the second feature representative of the candidate product from the first sample key data and the first sample value data corresponding to each modality of each first sample product according to the second sample query data. Specifically, the description of extracting the second feature representative of the candidate product from the first key data and the first value data corresponding to each modality according to the second query data in the above step S15 and steps a1-a2 can be referred to, and will not be repeated here.

[0160] The first device can input the second sample query data corresponding to each first sample product, the first sample key data and the first sample value data corresponding to each modality of each first sample product into the feature extraction layer, thereby obtaining the second sample features representative of each candidate product output by the feature extraction layer.

[0161] After the first model is obtained through training, the feature extraction layer is the feature extraction layer of the first model, and subsequent feature extraction layers can be used to implement the above step S15. The electronic device inputs the second query data corresponding to each candidate product, the first key data and the first value data corresponding to each modality of each candidate product into the feature extraction layer to obtain the second feature.

[0162] Step S35, input the second sample features corresponding to each first sample product into the embedding layer of the large language model, and input the push information screening conditions into the input layer of the large language model, sort the first sample products, and obtain the first sample sorting result output by the large language model.

[0163] The large language model can be any trained open source large language model, which can perform semantic understanding on the push information screening conditions, and then combine the embedded second sample features to sort the first sample products, and output the sorting results required by the push screening conditions.

[0164] The first device can input the second sample features corresponding to each first sample product into the embedding layer of the large language model, and input the push information screening conditions into the input layer of the large language model, so as to obtain the first sample ranking results of the first sample products output by the large language model.

[0165] Step S36, based on the first sample sorting result and the label sorting result of the first sample product under the push information screening condition, obtain the first model loss value of the initial model.

[0166] After obtaining the first sample sorting result, the first device can compare the first sample sorting result with the labeled sorting result of the first sample product under the push information screening condition, and calculate the first model loss value of the initial model. For example, if the first sample sorting result is the same as the labeled sorting result, the first model loss value is 0; if the first sample sorting result is different from the sorting of 30% of the first sample products in the labeled sorting result, the first model loss value is 30%. For another example, the developer can preset the first loss function, and the first device can calculate the first model loss value of the initial model based on the first sample sorting result and the labeled sorting result of the first sample product under the push information screening condition according to the preset first loss function.

[0167] Step S37: Based on the loss value of the first model, adjust the parameters of each network layer of the initial model to obtain the first model.

[0168] After obtaining the first model loss value of the initial model, the first device can adjust the parameters of each network layer of the initial model according to the first model loss value, and continue to execute the above steps S31-S36 until the obtained first model loss value is less than the first preset loss threshold, and the adjusted initial model can be used as the first model.

[0169] In the technical solution provided in the embodiment of the present application, the first model is trained by a large number of samples, and the first model is subsequently used to extract the second feature in the first feature that is representative of the candidate product. This is more accurate than extracting the second feature using a traditional algorithm, and the subsequent ranking results of the candidate products obtained based on the second feature are also more accurate.

[0170] In addition to training the first model used in the above steps S13-S15, the embodiment of the present application can also fine-tune the large language model used in step S16. We can obtain any trained open source large language model. In order to better combine the application scenario of product information recommendation in the embodiment of the present application, we can also use the modal description data of the second sample product to further adjust the obtained trained open source large language model. In step S16, the electronic device can use the adjusted large language model to sort the candidate products and output the sorting results.

[0171] In some embodiments, the model parameters of the large language model used in step S16 can be obtained by Figure 5 The method shown in the figure includes the following steps S51-S55. The model parameters of the large language model can be adjusted on the above electronic device, or on the first device or any background server. For the sake of distinction, the following description is made with the second device as the execution subject of the model parameter adjustment process of the large language model.

[0172] Step S51, inputting each modality description data of each second sample product into a pre-trained second model, and obtaining third sample features corresponding to each modality of each second sample product output by the second model.

[0173] The second model can be the model mentioned in the above step S12, which is used to extract features from each modal description data, for example, LSTM, AGRU, CNN and other models used to extract features of numerical description data. For details, please refer to the description in step S12, which will not be repeated here.

[0174] The second device can input the modal description data of each second sample product into a pre-trained second model, thereby obtaining third sample features corresponding to each modality of each second sample product output by the second model.

[0175] Step S52: input the third sample features corresponding to each modality of each second sample product into the pre-trained first model to obtain the fourth sample features output by the first model.

[0176] The first model can be obtained by Figure 3 The first model can be trained by the method in the above method, or it can be trained by other methods. The first model can extract the fourth sample features corresponding to each second sample product according to the third sample features corresponding to each modality of each second sample product.

[0177] The second device can input the third sample features corresponding to each modality of each second sample product into the pre-trained first model, thereby obtaining the fourth sample features corresponding to each second sample product output by the first model.

[0178] Step S53, input the fourth sample feature corresponding to each second sample product into the embedding layer of the large language model, and input the push information screening condition into the input layer of the large language model, sort the second sample products, and obtain the second sample sorting result output by the large language model.

[0179] After obtaining the fourth sample features corresponding to each second sample product, the second device can input the fourth sample features corresponding to each second sample product into the embedding layer of the large language model, and input the push information screening conditions into the input layer of the large language model. The large language model can semantically understand the push information screening conditions, and then combine the fourth sample features of the embedding layer to sort the second sample products and output the sorting results required by the push screening conditions. The second device can obtain the second sample sorting results of the second sample products output by the large language model.

[0180] Step S54: obtaining a second model loss value of the large language model based on the second sample sorting result and the label sorting result of the second sample product under the push information screening condition.

[0181] After obtaining the second sample sorting result, the second device can compare the second sample sorting result with the labeled sorting result of the second sample product under the push information screening condition, and calculate the second model loss value of the large language model. For example, if the second sample sorting result is the same as the labeled sorting result, the second model loss value is 0; if the second sample sorting result is different from the sorting of 30% of the second sample products in the labeled sorting result, the second model loss value is 30%. For another example, the developer can preset the second loss function, and the second device can calculate the second model loss value of the large language model based on the second sample sorting result and the labeled sorting result of the second sample product under the push information screening condition according to the preset second loss function.

[0182] Step S55: Based on the second model loss value, adjust the parameters of each network layer of the large language model to obtain an adjusted large language model.

[0183] After obtaining the second model loss value of the large language model, the second device can adjust the parameters of each network layer of the large language model according to the second model loss value, and continue to execute the above steps S51-S54 until the obtained second model loss value is less than the second preset loss threshold. The adjusted large language model can then be used to sort the candidate products in the above step S16.

[0184] Since the pre-trained open source large language model itself is obtained by training with a large number of samples, in order to avoid a significant impact on the model parameters of the large language model itself, we can set bypass parameters for each network layer of the large language model and set a smaller weight for the bypass parameters. When adjusting the model parameters of each network layer of the large language model, the second device will only adjust the bypass parameters, thereby enabling the adjusted large language model to better combine with the application scenario of product information recommendation in the embodiment of the present application while avoiding affecting the accuracy of the large language model itself.

[0185] Different devices and storage spaces can be used for the above-mentioned product information push process and model training process. For example, during the product information push process, the electronic device can call the first model, the second model or the large language model from other devices or background servers, and the model parameters of these models are stored in other devices or background servers, which can reduce the storage resource occupation of the electronic device, thereby speeding up the product information push process. For another example, for the training process of the first model, the model parameters of the initial model can be stored on the first device. When the first device trains the initial model, the output first sample sorting result can be displayed by the display device on other devices. The above product information push process and model training process adopt a multi-device multi-storage space method, which can also be called a multi-machine (device) multi-card (storage card) method, which can avoid excessive computing resources or storage resources occupation of a certain device, and avoid overloading of certain devices affecting the product information push process or model training process.

[0186] In order to more completely illustrate the training process of the above models, the present application embodiment provides the following examples in combination with the examples in the above description: Figure 6 A complete example is shown below. Figure 6 Provide explanation.

[0187] First, the second model can be trained. The second model can be trained on a third device, which can be the above electronic device, the first device or the second device, or other background servers. Figure 6 In the example shown, for the description data in numerical, image and textual modalities, the AGRU, ViT, and BERT models, i.e., the second model, can be trained respectively to perform feature extraction of the corresponding modalities.

[0188] Secondly, the first device can use the above Figure 3 After the second model is trained, the first sample features of the description data of each modality of each first sample product can be extracted based on the trained second model; and the first model can be trained based on the obtained pre-trained open source large language model. The first model includes a data transformation layer that can transform the first sample features into Q 1 , Q 2 , Q 3 Wait for the first sample query data, K 1 , K 2 , K 3 etc. The first sample key data, and V 1 、V 2 、V 3 The first model also includes a data fusion layer, which can 1 , Q 2 , Q3 The first sample query data is fused based on the residual attention mechanism to obtain the second sample query data Q 123 The first model also includes a feature extraction layer, which can extract second sample features representative of the first sample product from the first sample key data and the first sample value data corresponding to each modality according to the second sample query data. The first device calculates the first model loss value and adjusts the model parameters of the first model based on the first sample sorting result and the label sorting result of the first sample product under the push information screening condition.

[0189] Finally, the second device can use the above Figure 5 The model parameters of the large language model are adjusted in the manner shown. Based on the trained first model and the second model, the second device inputs the description data of each modality of the second sample product into the pre-trained second model to obtain the third sample features corresponding to each modality of each second sample product output by the second model; then the third sample features corresponding to each modality of each second sample product are input into the pre-trained first model to obtain the fourth sample features output by the first model; finally, the fourth sample features are input into the embedding layer of the large language model, and the push information screening conditions are input into the input layer of the large language model to obtain the second sample sorting results. Based on the second sample sorting results and the labeled sorting results of the second sample products under the push information screening conditions, the second device calculates the second model loss value and adjusts the model parameters of the large language model.

[0190] Corresponding to the above product information push method, such as Figure 7 As shown, the embodiment of the present application also provides a product information push device, the device comprising:

[0191] An acquisition module 71 is used to acquire multimodal description data of each candidate product;

[0192] A first extraction module 72 is used to extract, for each candidate product, a first feature of the description data of each modality of the candidate product;

[0193] The second extraction module 73 is used to obtain the first query data, the first key data and the first value data corresponding to each modality of each candidate product based on the first feature corresponding to each modality of each candidate product; for each candidate product, the first query data corresponding to each modality is fused based on the attention mechanism to obtain the second query data, and according to the second query data, the second feature representative of the candidate product is extracted from the first key data and the first value data corresponding to each modality;

[0194] A sorting module 74 is used to input the second feature corresponding to each candidate product into the embedding layer of the large language model, and input the push information screening condition into the input layer of the large language model, sort the candidate products, and obtain the sorting result output by the large language model;

[0195] The push module 75 is used to push product information to users based on the sorting results.

[0196] In the technical solution provided by the embodiment of the present application, the electronic device obtains multimodal description data of each candidate product; and for each candidate product, the first feature of each modal description data is extracted respectively; then for each candidate product, the first feature corresponding to each modality is converted into first query data, first key data and first value data, and the first query data corresponding to each modality is fused based on the attention mechanism. In the second query data obtained after the fusion, information that is more representative of the candidate product will be given higher attention, and the second feature that is representative of the candidate product is extracted from the original first key data and the first value data according to the second query data. In this way, the first feature of the extracted description data of each modality is fully utilized, and the obtained second feature can more comprehensively and accurately characterize the candidate product; after obtaining the second feature, the electronic device combines the second feature with the push information screening condition The embedding layer and the input layer of the large language model are input respectively, so as to obtain the large language model according to the push information screening conditions, based on the second feature that is representative of each candidate product, and the sorting result output by sorting each candidate product, and then push the product information to the user according to the above sorting result, use the large language model to understand the push information screening conditions, and the large language model sorts each candidate product according to the understood semantic information, instead of using a pre-trained sorting model with a clear goal to sort. The large language model used in the embodiment of the present application is more universal than the sorting model with a clear goal, and can adapt to the changing product information push scenarios. The large language model trained with a large number of samples has a more accurate output sorting result, and the product information is pushed to the user according to the above sorting result, thereby improving the accuracy of pushing product information to the user.

[0197] In some embodiments, the second extraction module 73 may be specifically used for:

[0198] For each candidate product, data fusion is performed in the following manner to obtain the second query data corresponding to the candidate product:

[0199] splicing the first query data corresponding to each modality of the candidate product, and performing a one-dimensional convolution transformation on the spliced ​​first query data to obtain a first transformation result;

[0200] Normalizing the first transformation result, and performing nonlinear transformation on the normalized result to obtain a second transformation result;

[0201] Performing pooling processing on the second transformation result to obtain a third transformation result;

[0202] Performing a one-dimensional convolution transformation on the third transformation result to obtain a fourth transformation result;

[0203] Normalizing the fourth transformation result, and performing nonlinear transformation on the normalized result to obtain a fifth transformation result;

[0204] The fifth transformation result is used as a weight coefficient to perform weighted calculation on the first query data corresponding to each mode of the candidate product to obtain the second query data corresponding to the candidate product.

[0205] In some embodiments, the second extraction module 73 may be specifically used for:

[0206] Based on the second query data and the first key data corresponding to each modality, generate attention data corresponding to each modality respectively;

[0207] The first value data corresponding to each modality is superimposed on the attention data corresponding to each modality to obtain a second feature representative of the candidate product in each modality.

[0208] In some embodiments, the second extraction module 73 may be specifically used for:

[0209] The first feature corresponding to each modality of each candidate product is input into a pre-trained first model to obtain a second feature output by the first model that is representative of the candidate product.

[0210] In some embodiments, the first model can be trained in the following way:

[0211] Obtaining first sample features of the description data of each mode of each first sample product;

[0212] Inputting the first sample features corresponding to each mode of each first sample product into the data transformation layer of the initial model, obtaining the first sample query data, first sample key data and first sample value data corresponding to each mode of each first sample product output by the data transformation layer, wherein the initial model further includes: a data fusion layer and a feature extraction layer;

[0213] For each first sample product, the first sample query data corresponding to each modality of the first sample product is input into the data fusion layer for data fusion based on the attention mechanism, and the second sample query data corresponding to the first sample product output by the data fusion layer is obtained;

[0214] Input the second sample query data corresponding to each first sample product, the first sample key data and the first sample value data corresponding to each modality of each first sample product into the feature extraction layer, and extract the second sample features representative of each candidate product from the input first sample key data and the first sample value data;

[0215] Input the second sample features corresponding to each first sample product into the embedding layer of the large language model, input the push information screening condition into the input layer of the large language model, sort the first sample products, and obtain the first sample sorting result output by the large language model;

[0216] Based on the first sample sorting result and the label sorting result of the first sample product under the push information screening condition, obtaining a first model loss value of the initial model;

[0217] Based on the loss value of the first model, the parameters of each network layer of the initial model are adjusted to obtain the first model.

[0218] In some embodiments, the model parameters of the large language model may be adjusted in the following manner:

[0219] Inputting each modality description data of each second sample product into a pre-trained second model to obtain third sample features corresponding to each modality of each second sample product output by the second model;

[0220] Inputting the third sample features corresponding to each modality of each second sample product into the pre-trained first model to obtain the fourth sample features output by the first model;

[0221] Input the fourth sample feature corresponding to each second sample product into the embedding layer of the large language model, input the push information screening condition into the input layer of the large language model, sort the second sample products, and obtain the second sample sorting result output by the large language model;

[0222] Based on the second sample sorting result and the label sorting result of the second sample product under the push information screening condition, obtaining a second model loss value of the large language model;

[0223] Based on the loss value of the second model, parameters of each network layer of the large language model are adjusted to obtain an adjusted large language model.

[0224] In some embodiments, the multimodal description data may include one or more of the following: image description data, numerical description data, text description data; and / or

[0225] The types of push information screening conditions may include one or more of the following: questions, content generation, and content understanding.

[0226] The present application also provides an electronic device, such as Figure 8 As shown, it includes a processor 81, a communication interface 82, a memory 83 and a communication bus 84, wherein the processor 81, the communication interface 82, and the memory 83 communicate with each other through the communication bus 84.

[0227] A memory 83, for storing computer programs;

[0228] The processor 81 is used to implement any of the above-mentioned product information push methods when executing the program stored in the memory 83.

[0229] The communication bus mentioned in the above electronic device can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0230] The communication interface is used for communication between the above electronic device and other devices.

[0231] The memory may include a random access memory (RAM) or a non-volatile memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0232] The above-mentioned processor can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.

[0233] In another embodiment provided in the present application, a computer-readable storage medium is provided, in which a computer program is stored. When the computer program is executed by a processor, the steps of any of the above-mentioned product information push methods are implemented.

[0234] In another embodiment provided in the present application, a computer program product including instructions is also provided, which, when executed on a computer, enables the computer to execute the steps of any product information push method in the above-mentioned embodiments.

[0235] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the process or function described in the embodiment of the present application is generated in whole or in part. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions may be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from a website site, computer, server or data center by wired (e.g., coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) mode to another website site, computer, server or data center. The computer-readable storage medium may be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more available media integrated. The available medium may be a magnetic medium, (e.g., a floppy disk, a hard disk, a tape), an optical medium (e.g., a DVD), or a semiconductor medium (e.g., a solid-state drive Solid State Disk (SSD)), etc.

[0236] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0237] Each embodiment in this specification is described in a related manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device, electronic device, storage medium and computer program product embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.

[0238] The above description is only a preferred embodiment of the present application and is not intended to limit the protection scope of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application are included in the protection scope of the present application.

Claims

1. A product information push method, characterized in that: The method comprises: Obtain multimodal description data for each candidate product; For each candidate product, extract the first feature of the description data of each modality of the candidate product; Based on the first feature corresponding to each modality of each candidate product, obtain first query data, first key data, and first value data corresponding to each modality of each candidate product; For each candidate product, the first query data corresponding to each modality is fused based on the attention mechanism to obtain second query data, and according to the second query data, a second feature representative of the candidate product is extracted from the first key data and the first value data corresponding to each modality respectively; Inputting the second feature corresponding to each candidate product into the embedding layer of the large language model, and inputting the push information screening condition into the input layer of the large language model, sorting each candidate product, and obtaining the sorting result output by the large language model; Product information is pushed to the user based on the ranking result.

2. The method according to claim 1, characterized in that For each candidate product, the first query data corresponding to each modality is fused based on the attention mechanism to obtain the second query data, including: For each candidate product, data fusion is performed in the following manner to obtain the second query data corresponding to the candidate product: splicing the first query data corresponding to each modality of the candidate product, and performing a one-dimensional convolution transformation on the spliced ​​first query data to obtain a first transformation result; Normalizing the first transformation result, and performing nonlinear transformation on the normalized result to obtain a second transformation result; Performing pooling processing on the second transformation result to obtain a third transformation result; Performing a one-dimensional convolution transformation on the third transformation result to obtain a fourth transformation result; Normalizing the fourth transformation result, and performing nonlinear transformation on the normalized result to obtain a fifth transformation result; The fifth transformation result is used as a weight coefficient to perform weighted calculation on the first query data corresponding to each mode of the candidate product to obtain the second query data corresponding to the candidate product.

3. The method according to claim 1, characterized in that The extracting, according to the second query data, second features representative of the candidate product from the first key data and the first value data corresponding to each modality respectively, includes: Based on the second query data and the first key data corresponding to each modality, generate attention data corresponding to each modality respectively; The first value data corresponding to each modality is superimposed on the attention data corresponding to each modality to obtain a second feature representative of the candidate product in each modality.

4. The method according to claim 1, characterized in that: The method includes: obtaining first query data, first key data, and first value data corresponding to each modality of each candidate product based on the first feature of each modality of each candidate product; obtaining second query data by fusing the first query data corresponding to each modality based on the attention mechanism for each candidate product; and extracting second features representative of the candidate product from the first key data and the first value data corresponding to each modality according to the second query data, including: The first feature corresponding to each modality of each candidate product is input into a pre-trained first model to obtain a second feature output by the first model that is representative of the candidate product.

5. The method according to claim 4, characterized in that The first model is trained in the following way: Obtaining first sample features of the description data of each mode of each first sample product; Inputting the first sample features corresponding to each mode of each first sample product into the data transformation layer of the initial model, obtaining the first sample query data, first sample key data and first sample value data corresponding to each mode of each first sample product output by the data transformation layer, wherein the initial model further includes: a data fusion layer and a feature extraction layer; For each first sample product, the first sample query data corresponding to each modality of the first sample product is input into the data fusion layer for data fusion based on the attention mechanism, so as to obtain the second sample query data corresponding to the first sample product output by the data fusion layer; Input the second sample query data corresponding to each first sample product, the first sample key data and the first sample value data corresponding to each modality of each first sample product into the feature extraction layer, and extract the second sample features representative of each candidate product from the input first sample key data and the first sample value data; Inputting the second sample features corresponding to each first sample product into the embedding layer of the large language model, and inputting the push information screening condition into the input layer of the large language model, sorting each first sample product, and obtaining the first sample sorting result output by the large language model; Based on the first sample sorting result and the label sorting result of the first sample product under the push information screening condition, obtain the first model loss value of the initial model; Based on the loss value of the first model, parameters of each network layer of the initial model are adjusted to obtain the first model.

6. The method according to claim 1, characterized in that The model parameters of the large language model are adjusted in the following manner: Inputting each modality description data of each second sample product into a pre-trained second model to obtain third sample features corresponding to each modality of each second sample product output by the second model; Inputting the third sample features corresponding to each modality of each second sample product into the pre-trained first model to obtain the fourth sample features output by the first model; Inputting the fourth sample feature corresponding to each second sample product into the embedding layer of the large language model, and inputting the push information screening condition into the input layer of the large language model, sorting each second sample product, and obtaining the second sample sorting result output by the large language model; Based on the second sample sorting result and the label sorting result of the second sample product under the push information screening condition, obtaining a second model loss value of the large language model; Based on the second model loss value, parameters of each network layer of the large language model are adjusted to obtain an adjusted large language model.

7. The method according to any one of claims 1 to 6, characterized in that: The multimodal description data includes one or more of the following: image description data, numerical description data, text description data; and / or The types of push information screening conditions include one or more of the following: questions, content generation, and content understanding.

8. A product information push device, characterized in that: The device comprises: An acquisition module, used to acquire multimodal description data of each candidate product; A first extraction module is used to extract, for each candidate product, a first feature of the description data of each modality of the candidate product; A second extraction module is used to obtain first query data, first key data and first value data corresponding to each modality of each candidate product based on the first feature corresponding to each modality of each candidate product; for each candidate product, the first query data corresponding to each modality is fused based on the attention mechanism to obtain second query data, and according to the second query data, second features representative of the candidate product are extracted from the first key data and the first value data corresponding to each modality respectively; A sorting module, used to input the second feature corresponding to each candidate product into the embedding layer of the large language model, and input the push information screening condition into the input layer of the large language model, sort the candidate products, and obtain the sorting result output by the large language model; A push module is used to push product information to users based on the sorting results.

9. An electronic device, characterized in that: It includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, for implementing the method according to any one of claims 1 to 7 when executing a program stored in a memory.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Axial flow compressor blade profile optimization method based on main and auxiliary agent models and related device

    CN121167941A

  • Axial flow compressor airfoil optimization method based on primary and secondary agent model and related device

    CN121167941B