Recommended copywriting generation method and device, equipment, medium and program product
By establishing a similarity matching between the item representation vector generation model and the copy representation vector set, the copy format problems and unclear delivery effects in the existing art of item recommendation copy generation are solved, and accurate and efficient recommendation copy generation is achieved, reducing business risks.
Patent Information
- Application Number
- CN202311642452.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-01
- Publication Date
- 2025-06-03
AI Technical Summary
When generating copywriting for item recommendations, the copywriting problem is prone to problems, such as inconsistent sentences and inconsistent themes of the item, and unclear delivery effect, resulting in increased business risks.
By in response to the pre-cached item representation vector set does not exist in the item representation vector corresponding to the requested item information, the object representation vector generation model is used to determine the target item representation vector, and the vector similarity is calculated with each copy representation vector in the pre-stored copy representation vector set, and a recommended copy for the requested item information is generated.
It realizes the accurate and efficient generation of recommended copy for requested item information, reducing the risk of copy format problems and unclear delivery effect, and reducing business risks.
Smart Images

Figure CN120086602A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present disclosure relate to the field of computer technologies, and particularly to a method, apparatus, device, medium, and program product for generating recommended copywriting. Background Art
[0002] Currently, by placing item copywriting, the advantageous feature information of the corresponding item can be effectively displayed to attract user attention. For generating item copywriting, the commonly used method is to generate recommended copywriting corresponding to the item to be recommended based on a pre-trained Seq2Seq (Sequence to Sequence) model.
[0003] However, the inventors found that when using the above method to generate item copywriting, the following technical problems often exist:
[0004] The generated recommended copywriting may have significant copywriting form problems (such as unsmooth sentences, inconsistent item themes, etc.), and the placement effect is not clear, resulting in a large business risk when using the generated recommended copywriting to display the item to be recommended.
[0005] The above information disclosed in this background art section is only used to enhance the understanding of the background of the inventive concept, and thus, it may include information that does not form the prior art known to ordinary skilled artisans in this country. Summary of the Invention
[0006] The content part of the present disclosure is used to briefly introduce concepts that will be described in detail in the following detailed implementation part. The content part of the present disclosure is not intended to identify the key features or essential features of the claimed technical solution, nor is it intended to limit the scope of the claimed technical solution.
[0007] Some embodiments of the present disclosure propose a method, apparatus, electronic device, computer-readable medium, and program product for generating recommended copywriting to solve the technical problems mentioned in the above background art section.
[0008] In a first aspect, some embodiments of the present disclosure provide a method for generating recommended copywriting, including: in response to determining that there is no item representation vector corresponding to the requested item information in the pre-cached set of item representation vectors, using an item representation vector generation model to determine an item representation vector for the above-mentioned requested item information as a target item representation vector; determining the vector similarity between each copywriting representation vector in the pre-stored set of copywriting representation vectors and the above-mentioned target item representation vector to obtain a set of vector similarities; for each item copywriting in the corresponding item copywriting set, determining a set of copywriting click information corresponding to the copywriting content of the above-mentioned item copywriting in various copywriting styles; and generating at least one recommended copywriting for the above-mentioned requested item information according to the obtained set of copywriting click information and the above-mentioned set of vector similarities.
[0009] Optionally, the above-mentioned item representation vector generation model is a bidirectional encoding network based on a multi-head attention mechanism; and the using the item representation vector generation model to determine an item representation vector for the above-mentioned requested item information includes: performing information preprocessing on the above-mentioned requested item information to obtain preprocessed item information; inputting the above-mentioned preprocessed item information into the above-mentioned bidirectional encoding network based on a multi-head attention mechanism to generate a set of word vectors; and performing global average pooling on the above-mentioned set of word vectors to generate the above-mentioned item representation vector.
[0010] Optionally, the above-mentioned generating at least one recommended copywriting for the above-mentioned requested item information according to the obtained set of copywriting click information and the above-mentioned set of vector similarities includes: performing normalization processing on each set of copywriting click information in the above-mentioned set of copywriting click information to generate a set of normalized information to obtain a set of normalized information groups; and generating the above-mentioned at least one recommended copywriting according to the above-mentioned set of normalized information groups and the above-mentioned set of vector similarities.
[0011] Optionally, the above-mentioned generating the above-mentioned at least one recommended copywriting according to the above-mentioned set of normalized information groups and the above-mentioned set of vector similarities includes: for each set of normalized information in the above-mentioned set of normalized information groups, performing the following score generation steps: for each normalized information in the above-mentioned set of normalized information, performing the following determination steps: multiplying the above-mentioned normalized information by the corresponding copywriting click information to obtain a first multiplication result; determining the exposure amount in the copywriting style corresponding to the above-mentioned normalized information; performing summation processing on the obtained set of first multiplication results to obtain a first summation result; performing summation processing on the obtained set of exposure amounts to obtain a second summation result; dividing the above-mentioned first summation result by the above-mentioned second summation result to obtain a division value as a copywriting score; and generating the above-mentioned at least one recommended copywriting according to the obtained set of copywriting scores and the above-mentioned set of vector similarities.
[0012] Optionally, generating the at least one recommended copywriting according to the obtained copywriting score set and the vector similarity set includes: multiplying each copywriting score in the copywriting score set by the corresponding vector similarity in the vector similarity set to generate a second multiplication result and obtain a second multiplication result set; screening out the item copywriting corresponding to the second multiplication result in the item copywriting set that meets the preset numerical condition as the recommended copywriting to obtain the at least one recommended copywriting.
[0013] Optionally, the copywriting representation vector set is generated through the following steps: performing copywriting preprocessing on each item copywriting in the item copywriting set to generate preprocessed copywriting and obtain a preprocessed copywriting set; inputting each preprocessed copywriting in the preprocessed copywriting set into a copywriting representation vector generation model to generate copywriting representation vectors and obtain the copywriting representation vector set.
[0014] Optionally, the copywriting representation vector generation model and the item representation vector generation model are trained through the following steps: obtaining a set of positive sample pairs, where each positive sample pair includes: an item copywriting and item information associated with the item copywriting; for each positive sample pair in the set of positive sample pairs, performing the following sample generation steps: determining a set of category information and a set of brand information associated with the target item copywriting, where the target item copywriting is the item copywriting in the positive sample pair; constructing at least one negative sample pair for the target item copywriting, where the negative sample pair includes: the target item copywriting and target item information, where the category information corresponding to the target item information does not exist in the set of category information, and the brand information corresponding to the target item information does not exist in the set of brand information; training the initial copywriting representation vector generation model and the initial item representation vector generation model according to the obtained set of negative sample pairs and the set of positive sample pairs to obtain the copywriting representation vector generation model and the item representation vector generation model.
[0015] Optionally, based on the obtained negative sample pair set and the positive sample pair set, training the initial copywriting feature vector generation model and the initial item feature vector generation model to obtain a copywriting feature vector generation model and an item feature vector generation model, including: setting training hyperparameters for the negative sample pair set; for each negative sample pair in the negative sample pair set, inputting the target item copywriting included in the negative sample pair into the initial copywriting feature vector generation model to generate a target copywriting feature vector, and inputting the target item information included in the negative sample pair into the initial item feature vector generation model to generate a first item feature vector; for each positive sample pair in the positive sample pair set, inputting the item information included in the positive sample pair into the initial item feature vector generation model to generate a second item feature vector; according to the obtained target copywriting feature vector set, the first item feature vector set, the second item feature vector, and the training hyperparameters, using a target loss function to generate a first loss value set for the positive sample pair set and a second loss value set for the negative sample pair set; training the initial copywriting feature vector generation model according to the first loss value set to obtain a copywriting feature vector generation model, and training the initial item feature vector generation model according to the second loss value set to obtain an item feature vector generation model.
[0016] Optionally, the method further includes: in response to determining that there is an item feature vector corresponding to the requested item information in the item feature vector set, determining the item feature vector corresponding to the requested item information as the target item feature vector; generating at least one recommended copywriting according to the target item feature vector and the copywriting feature vector set.
[0017] In a second aspect, some embodiments of the present disclosure provide a recommended copywriting generation device, including: a first determination unit configured to, in response to determining that there is no item feature vector corresponding to the requested item information in the pre-cached item feature vector set, use the item feature vector generation model to determine an item feature vector for the requested item information as the target item feature vector; a second determination unit configured to determine the vector similarity between each copywriting feature vector in the pre-stored copywriting feature vector set and the target item feature vector to obtain a vector similarity set; a third determination unit configured to, for each item copywriting in the corresponding item copywriting set, determine a copywriting click information group corresponding to the copywriting content of the item copywriting in various copywriting styles; a generation unit configured to generate at least one recommended copywriting for the requested item information according to the obtained copywriting click information group set and the vector similarity set.
[0018] Optionally, the above-mentioned item representation vector generation model is a bidirectional encoding network based on the multi-head attention mechanism; and the first determination unit can be configured to: perform information preprocessing on the above-mentioned requested item information to obtain preprocessed item information; input the above-mentioned preprocessed item information into the above-mentioned bidirectional encoding network based on the multi-head attention mechanism to generate a set of word vectors; perform global average pooling on the above-mentioned set of word vectors to generate the above-mentioned item representation vector.
[0019] Optionally, the generation unit can be configured to: perform normalization processing on each copywriting click information group in the above-mentioned copywriting click information group set to generate a normalized information group, obtaining a set of normalized information groups; generate the above-mentioned at least one recommended copywriting according to the above-mentioned set of normalized information groups and the above-mentioned vector similarity set.
[0020] Optionally, the generation unit can be configured to: for each normalized information group in the above-mentioned set of normalized information groups, perform the following score generation steps: for each normalized information in the above-mentioned normalized information group, perform the following determination steps: multiply the above-mentioned normalized information by the corresponding copywriting click information to obtain a first multiplication result; determine the exposure amount under the copywriting style corresponding to the above-mentioned normalized information; perform summation processing on the obtained set of first multiplication results to obtain a first summation result; perform summation processing on the obtained set of exposure amounts to obtain a second summation result; divide the above-mentioned first summation result by the above-mentioned second summation result to obtain a division value as the copywriting score; generate the above-mentioned at least one recommended copywriting according to the obtained set of copywriting scores and the above-mentioned vector similarity set.
[0021] Optionally, the generation unit can be configured to: multiply each copywriting score in the above-mentioned set of copywriting scores by the corresponding vector similarity in the above-mentioned vector similarity set to generate a second multiplication result, obtaining a set of second multiplication results; screen out the item copywritings corresponding to the second multiplication results in the above-mentioned item copywriting set that meet the preset numerical conditions as the recommended copywritings, obtaining the above-mentioned at least one recommended copywriting.
[0022] Optionally, the above-mentioned set of copywriting representation vectors is generated through the following steps: perform copywriting preprocessing on each item copywriting in the above-mentioned item copywriting set to generate preprocessed copywriting, obtaining a set of preprocessed copywriting; input each preprocessed copywriting in the above-mentioned set of preprocessed copywriting into a copywriting representation vector generation model to generate a copywriting representation vector, obtaining the above-mentioned set of copywriting representation vectors.
[0023] Optionally, the above-mentioned copywriting representation vector generation model and the above-mentioned item representation vector generation model are trained through the following steps: obtaining a set of positive sample pairs, where each positive sample pair includes: item copywriting and item information associated with the item copywriting; for each positive sample pair in the above-mentioned set of positive sample pairs, perform the following sample generation steps: determining a set of category information and a set of brand information associated with the target item copywriting, where the above-mentioned target item copywriting is the item copywriting in the above-mentioned positive sample pair; constructing at least one negative sample pair for the above-mentioned target item copywriting, where the negative sample pair includes: the above-mentioned target item copywriting and target item information, where the category information corresponding to the above-mentioned target item information does not exist in the above-mentioned set of category information, and the brand information corresponding to the above-mentioned target item information does not exist in the above-mentioned set of brand information; according to the obtained set of negative sample pairs and the above-mentioned set of positive sample pairs, perform model training on the initial copywriting representation vector generation model and the initial item representation vector generation model to obtain the copywriting representation vector generation model and the item representation vector generation model.
[0024] In a third aspect, some embodiments of the present disclosure provide an electronic device, including: one or more processors; a storage device having one or more programs stored thereon, and when the one or more programs are executed by the one or more processors, the one or more processors are caused to implement the method described in any implementation manner of the first aspect.
[0025] In a fourth aspect, some embodiments of the present disclosure provide a computer-readable medium having a computer program stored thereon, where the program, when executed by a processor, implements the method described in any implementation manner of the first aspect.
[0026] In a fifth aspect, some embodiments of the present disclosure provide a computer program product including a computer program, where the computer program, when executed by a processor, implements the method described in any implementation manner of the first aspect above.
[0027] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: Through the recommended copywriting generation method of some embodiments of the present disclosure, which is related to artificial intelligence, at least one recommended copywriting for the requested item information can be accurately and efficiently determined. Specifically, the reason for the inaccurate generated recommended copywriting is that the generated recommended copywriting may have large copywriting form problems (for example, unsmooth sentences, inconsistent item themes, etc.), and the placement effect is not clear, resulting in a large business risk when using the generated recommended copywriting to display the item to be recommended. Based on this, in the recommended copywriting generation method of some embodiments of the present disclosure, first, in response to determining that there is no item representation vector corresponding to the requested item information in the pre-cached item representation vector set, an item representation vector generation model is used to determine an item representation vector for the above-mentioned requested item information as the target item representation vector. Here, on the premise that there is no item representation vector corresponding to the requested item information in the item representation vector set, an item representation vector generation model can be used to accurately generate an item representation vector that can represent the item semantic information corresponding to the requested item. It should be noted that the determined target item representation vector is used to quickly match the item copywriting with matching semantic content subsequently. Then, the vector similarity between each copywriting representation vector in the pre-stored copywriting representation vector set and the above-mentioned target item representation vector is determined to obtain a vector similarity set. Here, the degree of association between the copywriting corresponding to the copywriting representation vector and the requested item is determined by the way of vector similarity. This facilitates the subsequent accurate generation of at least one recommended copywriting. Further, the item copywriting sets corresponding to the pre-stored copywriting representation vector sets are all copywritings with pre-determined corresponding placement effects. By determining the vector similarity between the target item representation vector and each copywriting representation vector in the copywriting representation vector set, at least one recommended copywriting can be accurately screened out from the item copywriting set subsequently. Furthermore, for each item copywriting in the corresponding item copywriting set, the copywriting click information group corresponding to the copywriting content of the above-mentioned item copywriting under various copywriting styles is determined. Here, by adding the copywriting click information group of the copywriting content of the item copywriting under each copywriting style, the placement effect of at least one recommended copywriting can be guaranteed subsequently, and copywriting form problems can be avoided. Finally, according to the obtained copywriting click information group set and the above-mentioned vector similarity set, at least one recommended copywriting for the above-mentioned requested item information can be accurately generated. In summary, through the pre-cached item representation vector set and the pre-stored copywriting representation vector set, the item representation vector corresponding to the requested item information and the copywriting representation vector with a relatively high corresponding semantic similarity can be quickly determined. In addition, through the copywriting click information group, the placement effect of the corresponding item copywriting can be effectively represented. Thus, from the two perspectives of semantic similarity and placement effect, at least one recommended copywriting for the requested item information can be accurately and efficiently determined. BRIEF DESCRIPTION OF THE DRAWINGS
[0028] In conjunction with the accompanying drawings and with reference to the following specific embodiments, the above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent. Throughout the drawings, the same or similar reference numerals denote the same or similar elements. It should be understood that the drawings are schematic and the elements and elements are not necessarily drawn to scale.
[0029] Figures 1 - 2 is a schematic diagram of an application scenario of a recommended copywriting generation method according to some embodiments of the present disclosure;
[0030] Figure 3 is a flowchart of some embodiments of the recommended copywriting generation method according to the present disclosure;
[0031] Figure 4 is a flowchart of some other embodiments of the recommended copywriting generation method according to the present disclosure;
[0032] Figure 5 is a schematic structural diagram of some embodiments of the recommended copywriting generation apparatus according to the present disclosure;
[0033] Figure 6 is a schematic structural diagram of an electronic device suitable for implementing some embodiments of the present disclosure. Specific Embodiments
[0034] The embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although some embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. On the contrary, these embodiments are provided to more thoroughly and completely understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not used to limit the protection scope of the present disclosure.
[0035] In addition, it should be noted that for the sake of convenience of description, only the parts related to the relevant invention are shown in the drawings. Without conflict, the embodiments in the present disclosure and the features in the embodiments can be combined with each other.
[0036] It should be noted that the concepts such as "first" and "second" mentioned in the present disclosure are only used to distinguish different devices, modules, or units, and are not used to limit the order or interdependence relationship of the functions performed by these devices, modules, or units.
[0037] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive. Those skilled in the art should understand that unless otherwise clearly stated in the context, it should be understood as "one or more".
[0038] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of these messages or information.
[0039] For operations such as the collection, storage, and use of the information involved in the present disclosure (such as copy click information), before performing the corresponding operations, relevant organizations or individuals shall fulfill obligations including conducting an information security impact assessment, fulfilling the obligation of notification to the information subject, and obtaining the prior authorization and consent of the information subject.
[0040] The present disclosure will be described in detail below with reference to the accompanying drawings and in conjunction with embodiments.
[0041] Figures 1 - 2 It is a schematic diagram of an application scenario of a recommended copy generation method according to some embodiments of the present disclosure.
[0042] In Figures 1 - 2In the application scenario, first, the electronic device 101 can, in response to determining that there is no item representation vector corresponding to the requested item information 103 in the pre-cached item representation vector set 102, use the item representation vector generation model 104 to determine the item representation vector for the above-mentioned requested item information 103 as the target item representation vector 105. In this application scenario, the requested item information 103 can be "laptop computer". The target item representation vector 105 can be "laptop computer feature vector". Then, the electronic device 101 can determine the vector similarity between each copywriting representation vector in the pre-stored copywriting representation vector set 106 and the above-mentioned target item representation vector, obtaining a vector similarity set 107. In this application scenario, the vector similarity set 107 includes: the vector similarity 1071 between the target item representation vector 105 and the copywriting representation vector 1061, the vector similarity 1072 between the target item representation vector 105 and the copywriting representation vector 1062, and the vector similarity 1073 between the target item representation vector 105 and the copywriting representation vector 1063. The vector similarity 1071 can be "0.6". The vector similarity 1072 can be "0.8". The vector similarity 1073 can be "0.97". Next, for each item copywriting in the corresponding item copywriting set 108, the electronic device 101 can determine the copywriting click information group corresponding to the copywriting content of the above item copywriting in various copywriting styles. In this application scenario, various copywriting styles include: single product large picture style, single product three-picture style, and single product multi-picture style. The item copywriting set 108 includes: laptop copywriting 1081, computer copywriting 1082, and laptop computer copywriting 1083. The copywriting click information group 109 corresponding to the laptop copywriting 1081 includes: the copywriting click information 1091 corresponding to the single product large picture style, the copywriting click information 1092 corresponding to the single product three-picture style, and the copywriting click information 1093 corresponding to the single product multi-picture style. The copywriting click information 1091 can be "Single product large picture style click information: 1045". The copywriting click information 1092 can be "Single product three-picture style click information: 965". The copywriting click information 1093 can be "Single product multi-picture style click information: 1967". The copywriting click information group 110 corresponding to the computer copywriting 1082 includes: the copywriting click information 1101 corresponding to the single product large picture style, the copywriting click information 1102 corresponding to the single product three-picture style, and the copywriting click information 1103 corresponding to the single product multi-picture style. The copywriting click information 1101 can be "Single product large picture style click information: 675". The copywriting click information 1102 can be "Single product three-picture style click information: 215". The copywriting click information 1103 can be "Single product multi-picture style click information: 896".The copywriting click information group 111 corresponding to the laptop copywriting 1083 includes: the copywriting click information 1111 corresponding to the single-item large picture style, the copywriting click information 1112 corresponding to the single-item three-picture style, and the copywriting click information 1113 corresponding to the single-item multi-picture style. The copywriting click information 1111 can be "Single-item large picture style click information: 665". The copywriting click information 1112 can be "Single-item three-picture style click information: 215". The copywriting click information 1113 can be "Single-item multi-picture style click information: 906". Finally, the electronic device 101 can generate at least one recommended copywriting 113 for the above-mentioned requested item information 103 according to the obtained copywriting click information set 112 and the above-mentioned vector similarity set 106. In this application scenario, at least one recommended copywriting 113 includes: computer copywriting 1082 and laptop copywriting 1083.
[0043] It should be noted that the above-mentioned electronic device 101 can be hardware or software. When the electronic device is hardware, it can be implemented as a distributed cluster composed of multiple servers or terminal devices, or can be implemented as a single server or a single terminal device. When the electronic device is embodied as software, it can be installed in the above-mentioned listed hardware devices. It can be implemented as, for example, multiple software or software modules for providing distributed services, or can be implemented as a single software or software module. No specific limitation is made here.
[0044] It should be understood that Figures 1 - 2 the number of electronic devices in
[0045] Continuing to refer to Figure 3 , a flowchart 300 of some embodiments of the recommended copywriting generation method according to the present disclosure is shown. The recommended copywriting generation method includes the following steps:
[0046] Step 301, in response to determining that there is no item representation vector corresponding to the requested item information in the pre-cached item representation vector set, use the item representation vector generation model to determine the item representation vector for the above-mentioned requested item information as the target item representation vector.
[0047] In some embodiments, in response to determining that there is no item representation vector corresponding to the requested item information in the pre-cached item representation vector set, the execution subject of the above-mentioned recommended copywriting generation method (such as Figure 1The electronic device 101 shown can utilize an item representation vector generation model to determine an item representation vector for the above-mentioned requested item information as the target item representation vector. Among them, the item representation vector can represent the semantic feature information of the item. For example, the semantic feature information can include topic feature information. The above-mentioned item representation vector set can be stored in the target database in the form of key-value pairs. For example, the target database can be a Redis (Remote Dictionary Server) database. The item representation vectors in the above-mentioned item representation vector set can be generated based on the item representation vector generation model. The above-mentioned requested item information can be the item information for a copywriting matching request. The above-mentioned copywriting matching request can be a request to match a batch of items with corresponding batch of copywriting. The item corresponding to the above-mentioned requested item information can be an item in a certain batch of items. In practice, the above-mentioned requested item information can be the item information corresponding to the requested item. The above-mentioned requested item information can be information in the form of a multi-tuple. Specifically, the requested item information includes: requested item identifier, requested item name, first-level category noun corresponding to the requested item, and brand corresponding to the requested item. The item representation vector corresponding to the requested item information can be a vector representing the semantic features of the item corresponding to the requested item. The item representation vector generation model can be a pre-trained model for generating item representation vectors corresponding to items. In practice, the above-mentioned item representation vector generation model can be a Transformer model.
[0048] It should be noted that the item representation vector set can be a vector set generated based on the item representation vector set in an offline state.
[0049] As an example, first, the above-mentioned execution entity can perform word segmentation processing on the requested item information to obtain a word set. Then, each word in the word set is input into the item representation vector generation model to output a word vector set. Finally, the respective word vectors in the word vector set are vector-concatenated to obtain a concatenated vector as the target item representation vector.
[0050] In some optional implementation manners of some embodiments, the above-mentioned item representation vector generation model is a bidirectional encoding network (BERT, Bidirectional Encoder Representations from Transformer) model based on a multi-head attention mechanism.
[0051] Optionally, the above-mentioned utilization of the item representation vector generation model to determine the item representation vector for the above-mentioned requested item information may include the following steps:
[0052] In the first step, the above-mentioned execution entity can perform information preprocessing on the above-mentioned requested item information to obtain preprocessed item information.
[0053] As an example, the above-mentioned execution entity can adjust the information length of the requested item information to generate first adjusted information as the preprocessed item information. In practice, the information length of the first adjusted information can be "50". When the requested item information exceeds 50, only the item information with a length of 50 in the requested item information is retained. When the requested item information is less than 50, a target symbol is added at the end of the requested item information for padding. The length of the padded item information is "50". The above-mentioned target symbol can be "[PADDING]".
[0054] In the second step, the above-mentioned execution entity can input the above-mentioned preprocessed item information into the above-mentioned bidirectional encoding network based on the multi-head attention mechanism to generate a set of word vectors.
[0055] In the third step, the above-mentioned execution entity can perform global average pooling (Global Average Pooling) on the above-mentioned set of word vectors to generate the above-mentioned item representation vector.
[0056] Step 302: Determine the vector similarity between each copywriting representation vector in the pre-stored copywriting representation vector set and the above-mentioned target item representation vector to obtain a vector similarity set.
[0057] In some embodiments, the above-mentioned execution entity can determine the vector similarity between each copywriting representation vector in the pre-stored copywriting representation vector set and the above-mentioned target item representation vector to obtain a vector similarity set. Among them, the vector similarity can represent the similarity between the copywriting representation vector and the target item representation vector. Similarly, the vector similarity can represent the semantic matching degree between the corresponding item copywriting and the item to be requested. The greater the vector similarity, the higher the semantic matching degree between the corresponding item copywriting and the item to be requested. The copywriting representation vector can represent the copywriting semantic information of the item copywriting. The above-mentioned copywriting representation vector set can be pre-stored in the Faiss (Facebook AI Similarity Search, similar vector retrieval library) vector retrieval engine.
[0058] It should be noted that the copywriting representation vector set can be a vector set generated offline based on the copywriting representation vector set.
[0059] As an example, the above-mentioned execution entity can determine the cosine similarity between each copywriting representation vector in the pre-stored copywriting representation vector set and the above-mentioned target item representation vector to obtain a cosine similarity set as the vector similarity set.
[0060] In some optional implementation manners of some embodiments, the above-mentioned copywriting representation vector set is generated through the following steps:
[0061] First step, perform text preprocessing on each item text in the above item text set to generate preprocessed text, and obtain a preprocessed text set.
[0062] As an example, the above execution entity can adjust the information length of the item text to generate second adjustment information as the preprocessed text. In practice, the information length of the second adjustment information can be "30". When the text length exceeds 50, only the item text information with a length of 50 in the item text is retained. When the text length is less than 50, a target symbol is added at the end of the item text for padding. The length of the padded item text is "50". The above target symbol can be "[PADDING]".
[0063] Second step, input each preprocessed text in the above preprocessed text set into a text representation vector generation model to generate text representation vectors, and obtain the above text representation vector set.
[0064] Among them, the text representation vector generation model can be a pre-trained model for generating text representation vectors. In practice, the text representation vector generation model can be a bidirectional encoding network based on the multi-head attention mechanism.
[0065] Optionally, the above text representation vector generation model and the above item representation vector generation model are trained through the following steps:
[0066] First step, obtain a set of positive sample pairs. Among them, each positive sample pair includes: an item text and item information associated with the item text. The item text and item information included in the positive sample pair have the same semantic information such as the corresponding theme.
[0067] Second step, for each positive sample pair in the above set of positive sample pairs, perform the following sample generation steps:
[0068] Sub-step 1, determine the set of category information and the set of brand information associated with the target item text. Among them, the above target item text is the item text in the above positive sample pair. Among them, the category information in the set of category information associated with the target item text can be category information that matches the target item text. Similarly, the brand information in the associated set of brand information can be brand information that matches the target item text.
[0069] Sub-step 2, construct at least one negative sample pair for the above target item text. Among them, the negative sample pair includes: the above target item text and target item information. Among them, the category information corresponding to the above target item information does not exist in the above set of category information. The brand information corresponding to the above target item information does not exist in the above set of brand information.
[0070] It should be noted that for each positive sample pair, there is at least one corresponding negative sample pair. The item copywriting information included in the positive sample pair is the same as the item copywriting information included in the corresponding negative sample. The category information corresponding to the item information included in the negative sample pair is different from each category information in the category information set corresponding to the corresponding positive sample pair. The brand information corresponding to the item information included in the negative sample pair is different from each brand information in the brand information set corresponding to the corresponding positive sample pair.
[0071] In the third step, according to the obtained negative sample pair set and the above positive sample pair set, the initial copywriting feature vector generation model and the initial item feature vector generation model are trained to obtain a copywriting feature vector generation model and an item feature vector generation model.
[0072] As an example, the above execution entity can use the negative sample pair set and the positive sample pair set as model training samples, and train the initial copywriting feature vector generation model and the initial item feature vector generation model through contrastive learning training to obtain a copywriting feature vector generation model and an item feature vector generation model.
[0073] Optionally, the above-mentioned training of the initial copywriting feature vector generation model and the initial item feature vector generation model according to the obtained negative sample pair set and the above positive sample pair set to obtain a copywriting feature vector generation model and an item feature vector generation model may include the following steps:
[0074] In the first step, the above execution entity can set training hyperparameters for the above negative sample pair set.
[0075] Among them, the training hyperparameters are model trainable parameters set for the associated loss value corresponding to the negative sample pair. The associated loss value can represent the semantic difference between the target item copywriting and the target item information in the negative sample pair. In practice, when the difference between the target item information and the target item copywriting in the negative sample pair is greater than the value corresponding to the training hyperparameter, the associated loss value corresponding to the above negative sample pair is set to "0". Such a loss setting method can improve the loss calculation speed and accelerate the convergence speed of the model.
[0076] In the second step, for each negative sample pair in the above negative sample pair set, the above execution entity can input the target item copywriting included in the above negative sample pair into the initial copywriting feature vector generation model to generate a target copywriting feature vector, and input the target item information included in the above negative sample pair into the initial item feature vector generation model to generate a first item feature vector.
[0077] In the third step, for each positive sample pair in the above positive sample pair set, the above execution entity inputs the item information included in the above positive sample pair into the initial item feature vector generation model to generate a second item feature vector.
[0078] In the fourth step, the above-mentioned execution entity can use the target loss function to generate a first loss value set for the above-mentioned positive sample pair set and a second loss value set for the above-mentioned negative sample pair set according to the obtained target copywriting representation vector set, the first item representation vector set, the second item representation vector, and the above-mentioned training hyperparameters.
[0079] As an example, the above-mentioned execution entity can generate the first loss value set and the second loss value set through the following formula:
[0080]
[0081] where can be a loss value. Here, for the input sample pair being a positive sample pair, then is the first loss value. For the input sample pair being a negative sample pair, then is the second loss value. x p can be a positive sample pair. C i can be the i-th item copywriting. S m can be the m-th item information. x n can be a negative sample pair. S k can be the k-th item information. can be the copywriting representation vector corresponding to the i-th item copywriting. can be the item representation vector corresponding to the m-th item information. can be the item representation vector corresponding to the k-th item information. can represent and the cosine distance between vectors. can represent and the cosine distance between vectors.
[0082] As another example, the above-mentioned execution entity can use the cosine distance calculation function to determine a first cosine distance set for the target copywriting representation vector set and the first item representation vector set as the first loss value set. Similarly, use the cosine distance calculation function to determine a second cosine distance set for the target copywriting representation vector and the second item representation vector set as the second loss value set.
[0083] In the fifth step, the initial copywriting representation vector generation model is trained according to the above-mentioned first loss value set to obtain a copywriting representation vector generation model, and the initial item representation vector generation model is trained according to the above-mentioned second loss value set to obtain an item representation vector generation model.
[0084] As an example, the above-mentioned execution entity may perform an averaging process on the first loss value set to obtain a first average loss value. In response to determining that the first average loss value is less than a predetermined value, the initial copywriting representation vector generation model is determined as the copywriting representation vector generation model. In response to the first average loss value being greater than or equal to the first value, the model parameters of the initial copywriting representation vector generation model are updated by backpropagation to obtain the copywriting representation vector generation model. Similarly, the training method of the item representation vector generation model can refer to the training method of the copywriting representation vector generation model.
[0085] Step 303: For each item copy in the corresponding item copy set, determine the copy click information group corresponding to the copy content of the above item copy in various copy styles.
[0086] In some embodiments, the above-mentioned execution entity may, for each item copy in the corresponding item copy set, determine the copy click information group corresponding to the copy content of the above item copy in various copy styles. Among them, the copy style may be the style of the item copy. Specifically, the copy style may include: single-item large picture style, single-item three-picture style, single-item multi-picture style. The copy click information may be information related to copy clicks. In practice, the copy click information may be the click count of the copy or the click-through rate of the copy. Among them, the number of copy styles included in each copy style is the same as the number of pieces of copy click information in the copy click information group.
[0087] For example, for the copy content of the item copy being "Red Wine_***Wine Bestseller - Low Price, Great Value", the click count under the single-item large picture style is "100", the click count under the single-item three-picture style is "150", and the click count under the single-item multi-picture style is "60".
[0088] Step 304: Generate at least one recommended copy for the above-requested item information according to the obtained copy click information group set and the above vector similarity set.
[0089] In some embodiments, the above-mentioned execution entity may generate at least one recommended copy for the above-requested item information according to the obtained copy click information group set and the above vector similarity set. Among them, the recommended copy may be an item copy in the item copy set that matches the semantic content such as the corresponding theme of the requested item. The number of recommended copies included in the above at least one recommended copy may be preset. For example, the number of recommended copies may be 20.
[0090] As an example, the above-mentioned execution entity can add up the click information of each copywriting click information group in the copywriting click information set to generate added information, obtaining an added information set. Then, the added information in the added information set is multiplied correspondingly with the vector similarities in the vector similarity set to obtain a multiplied information set. Finally, a predetermined number of item copywritings with the largest corresponding multiplied information are selected from the item copywriting set as at least one recommended copywriting.
[0091] In some optional implementation manners of some embodiments, after step 304, the steps further include:
[0092] First step, in response to determining that there is an item representation vector corresponding to the above-mentioned requested item information in the above-mentioned item representation vector set, the above-mentioned execution entity can determine the item representation vector corresponding to the above-mentioned requested item information as the target item representation vector.
[0093] Second step, the above-mentioned execution entity can generate the above-mentioned at least one recommended copywriting according to the above-mentioned target item representation vector and the above-mentioned copywriting representation vector set. Here, the specific implementation manner will not be elaborated. Refer to the above-mentioned generation manner of the above-mentioned at least one recommended copywriting.
[0094] The above-mentioned various embodiments of the present disclosure have the following beneficial effects: Through the recommended copywriting generation method of some embodiments of the present disclosure, which is related to artificial intelligence, at least one recommended copywriting for the requested item information can be accurately and efficiently determined. Specifically, the reason for the inaccuracy of the generated recommended copywriting is that the generated recommended copywriting may have significant copywriting form problems (such as unsmooth sentences, inconsistent item themes, etc.), and the placement effect is unclear, resulting in a large business risk when using the generated recommended copywriting to display the item to be recommended. Based on this, in the recommended copywriting generation method of some embodiments of the present disclosure, first, in response to determining that there is no item representation vector corresponding to the requested item information in the pre-cached item representation vector set, an item representation vector generation model is used to determine an item representation vector for the above-mentioned requested item information as the target item representation vector. Here, on the premise that there is no item representation vector corresponding to the requested item information in the item representation vector set, the item representation vector generation model can be used to accurately generate an item representation vector that can represent the item semantic information corresponding to the requested item. It should be noted that the determined target item representation vector is used to quickly match item copywriting with matching semantic content subsequently. Then, the vector similarity between each copywriting representation vector in the pre-stored copywriting representation vector set and the above-mentioned target item representation vector is determined to obtain a vector similarity set. Here, the vector similarity method is used to determine the association degree between the copywriting corresponding to the copywriting representation vector and the requested item. This facilitates the subsequent accurate generation of at least one recommended copywriting. Further, the item copywriting sets corresponding to the pre-stored copywriting representation vector sets are all copywritings with pre-determined placement effects. By determining the vector similarity between the target item representation vector and each copywriting representation vector in the copywriting representation vector set, at least one recommended copywriting can be accurately screened out from the item copywriting set subsequently. Furthermore, for each item copywriting in the corresponding item copywriting set, the copywriting click information group corresponding to the copywriting content of the above-mentioned item copywriting under various copywriting styles is determined. Here, by adding the copywriting click information group of the copywriting content of the item copywriting under each copywriting style, the placement effect of at least one recommended copywriting can be ensured subsequently, and copywriting form problems can be avoided. Finally, according to the obtained copywriting click information group set and the above-mentioned vector similarity set, at least one recommended copywriting for the above-mentioned requested item information can be accurately generated. In summary, through the pre-cached item representation vector set and the pre-stored copywriting representation vector set, the item representation vector corresponding to the requested item information and the copywriting representation vector with a relatively high corresponding semantic similarity can be quickly determined. In addition, through the copywriting click information group, the placement effect of the corresponding item copywriting can be effectively represented. Thus, from the two perspectives of semantic similarity and placement effect, at least one recommended copywriting for the requested item information can be accurately and efficiently determined.
[0095] Further referenceFigure 4 , a process 400 of some other embodiments of the recommended copywriting generation method according to the present disclosure is shown. The recommended copywriting generation method includes the following steps:
[0096] Step 401, in response to determining that there is no item representation vector corresponding to the requested item information in the pre-cached item representation vector set, use the item representation vector generation model to determine the item representation vector for the above-mentioned requested item information as the target item representation vector.
[0097] Step 402, determine the vector similarity between each copywriting representation vector in the pre-stored copywriting representation vector set and the above-mentioned target item representation vector to obtain a vector similarity set.
[0098] Step 403, for each item copy in the corresponding item copy set, determine the copy click information group corresponding to the copy content of the above-mentioned item copy in various copy styles.
[0099] Step 404, perform normalization processing on each copy click information group in the above-mentioned copy click information group set to generate a normalized information group to obtain a normalized information group set.
[0100] In some embodiments, the execution entity (such as Figure 1 the electronic device 101 shown) may perform normalization processing on each copy click information group in the above-mentioned copy click information group set to generate a normalized information group to obtain a normalized information group set.
[0101] As an example, the above-mentioned execution entity may perform normalization processing through the following formula:
[0102]
[0103] where ω i may be the normalized information corresponding to the i-th copy click information. μ i may be the i-th copy click information. m may be the number of copy click information included in the copy click information group corresponding to the i-th copy click information.
[0104] Step 405, generate the above-mentioned at least one recommended copywriting according to the above-mentioned normalized information group set and the above-mentioned vector similarity set.
[0105] In some embodiments, the above-mentioned execution entity may generate the above-mentioned at least one recommended copywriting according to the above-mentioned normalized information group set and the above-mentioned vector similarity set.
[0106] As an example, first, the above-mentioned execution entity can multiply each normalized information in the normalized information set by the corresponding vector similarity to generate a multiplied value, obtaining a set of multiplied value sets. Then, perform an averaging process on each multiplied value set in the set of multiplied value sets to obtain an average result, obtaining a set of average results. Finally, according to the magnitudes corresponding to the respective average results in the set of average results, screen out the item copywriting whose corresponding average result magnitude is among the top target number from the item copywriting set as the recommended copywriting, obtaining at least one recommended copywriting.
[0107] In some optional implementation manners of some embodiments, generating the at least one recommended copywriting according to the above-mentioned normalized information set and the above-mentioned vector similarity set may include the following steps:
[0108] First step, for each normalized information group in the above-mentioned normalized information set, perform the following score generation steps:
[0109] Sub-step 1, for each normalized information in the above-mentioned normalized information group, perform the following determination steps:
[0110] First sub-step, the above-mentioned execution entity can multiply the above-mentioned normalized information by the corresponding copywriting click information to obtain a first multiplied result.
[0111] Second sub-step, the above-mentioned execution entity can determine the exposure amount under the copywriting style corresponding to the above-mentioned normalized information.
[0112] Sub-step 2, the above-mentioned execution entity can perform a summation process on the obtained set of first multiplied results to obtain a first summation result.
[0113] Sub-step 3, the above-mentioned execution entity can perform a summation process on the obtained set of exposure amounts to obtain a second summation result.
[0114] Sub-step 4, divide the above-mentioned first summation result by the above-mentioned second summation result to obtain a division value as the copywriting score.
[0115] Second step, generate the at least one recommended copywriting according to the obtained set of copywriting scores and the above-mentioned vector similarity set.
[0116] As an example, first, the above-mentioned execution entity can screen out the copywriting scores greater than a predetermined value from the set of copywriting scores as the target copywriting scores, obtaining a set of target copywriting scores. Then, according to the vector similarity set, sort the subset of item copywriting corresponding to the set of target copywriting scores to obtain an item copywriting subsequence. Finally, screen out at least one item copywriting from the item copywriting subsequence as the at least one recommended copywriting.
[0117] In some alternative implementations of some embodiments, generating the at least one recommended copy based on the obtained copy score set and the vector similarity set may include the following steps:
[0118] First, multiply each copy score in the copy score set by the corresponding vector similarity in the vector similarity set to generate a second multiplication result, obtaining a second multiplication result set. Among them, there is a one-to-one correspondence between the copy scores in the copy score set and the item copies in the item copy set. There is a one-to-one correspondence between the item copies in the item copy set and the vector similarities in the vector similarity set. Then, there is a one-to-one correspondence between the copy scores in the copy score set and the vector similarities in the vector similarity set.
[0119] Second, screen out the item copies in the item copy set whose corresponding second multiplication results meet the preset numerical conditions as recommended copies, obtaining the at least one recommended copy. Among them, the preset numerical condition may be that the item copy is the one in the item copy set whose corresponding second multiplication result is greater than or equal to a predetermined value.
[0120] In some embodiments, for the specific implementation of steps 401-403 and the technical effects brought by them, reference may be made to Figure 3 Steps 301-303 in the corresponding embodiments, which will not be elaborated here.
[0121] From Figure 4 it can be seen that compared with the description of some corresponding embodiments, Figure 2 for the process 400 of the recommended copy generation method in some corresponding embodiments, by normalizing each copy click information group, the influence of the copy style on the copy delivery effect is eliminated. Thus, at least one recommended copy can be accurately screened out from the item copy set. Figure 4 Correspondingly, further referring to
[0122] As an implementation of the methods shown in the above figures, some embodiments of a recommended copy generation device are provided in the present disclosure. These device embodiments correspond to Figure 5 the method embodiments shown, and the recommended copy generation device can be specifically applied to various electronic devices. Figure 2 As shown in
[0123] Such as Figure 5As shown in the figure, a recommended copywriting generation device 500 includes: a first determination unit 501, a second determination unit 502, a third determination unit 503, and a generation unit 504. Among them, the first determination unit 501 is configured to, in response to determining that there is no item representation vector corresponding to the requested item information in the pre-cached item representation vector set, use the item representation vector generation model to determine the item representation vector for the above-mentioned requested item information as the target item representation vector; the second determination unit 502 is configured to determine the vector similarity between each copywriting representation vector in the pre-stored copywriting representation vector set and the above-mentioned target item representation vector to obtain a vector similarity set; the third determination unit 503 is configured to, for each item copy in the corresponding item copy set, determine the copy click information group corresponding to the copy content of the above-mentioned item copy in various copywriting styles; the generation unit 504 is configured to generate at least one recommended copywriting for the above-mentioned requested item information according to the obtained copy click information group set and the above-mentioned vector similarity set.
[0124] In some optional implementation manners of some embodiments, the above-mentioned item representation vector generation model is a bidirectional encoding network based on a multi-head attention mechanism; and the first determination unit 501 may further be configured to: perform information preprocessing on the above-mentioned requested item information to obtain preprocessed item information; input the above-mentioned preprocessed item information into the above-mentioned bidirectional encoding network based on a multi-head attention mechanism to generate a word vector set; perform global average pooling on the above-mentioned word vector set to generate the above-mentioned item representation vector.
[0125] In some optional implementation manners of some embodiments, the generation unit 504 may further be configured to: perform normalization processing on each copy click information group in the above-mentioned copy click information group set to generate a normalized information group, obtaining a normalized information group set; generate the above-mentioned at least one recommended copywriting according to the above-mentioned normalized information group set and the above-mentioned vector similarity set.
[0126] In some optional implementation manners of some embodiments, the generation unit 504 may further be configured to: for each normalized information group in the above-mentioned normalized information group set, perform the following score generation steps: for each normalized information in the above-mentioned normalized information group, perform the following determination steps: multiply the above-mentioned normalized information by the corresponding copy click information to obtain a first multiplication result; determine the exposure amount in the copywriting style corresponding to the above-mentioned normalized information; perform summation processing on the obtained first multiplication result group to obtain a first summation result; perform summation processing on the obtained exposure amount group to obtain a second summation result; divide the above-mentioned first summation result by the above-mentioned second summation result to obtain a division value as the copywriting score; generate the above-mentioned at least one recommended copywriting according to the obtained copywriting score set and the above-mentioned vector similarity set.
[0127] In some alternative implementations of some embodiments, the generating unit 504 may further be configured to: multiply each copywriting score in the above copywriting score set by the corresponding vector similarity in the above vector similarity set to generate a second multiplication result, obtaining a second multiplication result set; screen out the item copywriting corresponding to the second multiplication result that meets the preset numerical condition from the above item copywriting set as the recommended copywriting, obtaining the above at least one recommended copywriting.
[0128] In some alternative implementations of some embodiments, the above copywriting characterization vector set is generated through the following steps: perform copywriting preprocessing on each item copywriting in the above item copywriting set to generate preprocessed copywriting, obtaining a preprocessed copywriting set; input each preprocessed copywriting in the above preprocessed copywriting set into a copywriting characterization vector generation model to generate copywriting characterization vectors, obtaining the above copywriting characterization vector set.
[0129] In some alternative implementations of some embodiments, the above copywriting characterization vector generation model and the above item characterization vector generation model are trained through the following steps: obtain a set of positive sample pairs, where each positive sample pair includes: an item copywriting and item information associated with the item copywriting; for each positive sample pair in the above set of positive sample pairs, perform the following sample generation steps: determine a set of category information and a set of brand information associated with the target item copywriting, where the above target item copywriting is the item copywriting in the above positive sample pair; construct at least one negative sample pair for the above target item copywriting, where the negative sample pair includes: the above target item copywriting and target item information, where the category information corresponding to the above target item information does not exist in the above set of category information, and the brand information corresponding to the above target item information does not exist in the above set of brand information; perform model training on the initial copywriting characterization vector generation model and the initial item characterization vector generation model according to the obtained set of negative sample pairs and the above set of positive sample pairs to obtain the copywriting characterization vector generation model and the item characterization vector generation model.
[0130] It can be understood that the various units described in the recommended copywriting generation device 500 correspond to the respective steps in the method described in the reference Figure 2 Therefore, the operations, features, and beneficial effects described above for the method also apply to the recommended copywriting generation device 500 and the units included therein, and will not be repeated here.
[0131] Next, refer to Figure 6 , which shows a schematic structural diagram of an electronic device (such as Figure 1 the electronic device 101 in) 600 suitable for implementing some embodiments of the present disclosure. Figure 6 The electronic device shown is only an example and should not impose any limitations on the functions and usage scope of the embodiments of the present disclosure.
[0132] As Figure 6 shown, the electronic device 600 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 601, which may perform various appropriate actions and processes according to a program stored in the read-only memory 602 or a program loaded from the storage device 608 into the random access memory 603. In the random access memory 603, various programs and data required for the operation of the electronic device 600 are also stored. The processing device 601, the read-only memory 602, and the random access memory 603 are connected to each other through a bus 604. The input / output interface 605 is also connected to the bus 604.
[0133] Generally, the following devices may be connected to the input / output interface 605: an input device 606 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 607 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 608 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 609. The communication device 609 may allow the electronic device 600 to communicate with other devices wirelessly or wirelessly to exchange data. Although Figure 6 the electronic device 600 with various devices is shown, it should be understood that it is not required to implement or include all the shown devices. Instead, more or fewer devices may be implemented or included. Figure 6 Each block shown in
[0134] particular, according to some embodiments of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, some embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program codes for performing the methods shown in the flowcharts. In such some embodiments, the computer program may be downloaded and installed from the network through the communication device 609, or installed from the storage device 608, or installed from the read-only memory 602. When the computer program is executed by the processing device 601, the above-mentioned functions defined in the methods of some embodiments of the present disclosure are executed.
[0135] It should be noted that in some embodiments of the present disclosure, the above-mentioned computer-readable medium may be a computer-readable signal medium, a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In some embodiments of the present disclosure, the computer-readable storage medium may be any tangible medium that contains or stores a program, which can be used by or in conjunction with an instruction execution system, apparatus, or device. In some embodiments of the present disclosure, the computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The computer-readable signal medium may also be any computer-readable medium other than the computer-readable storage medium, which can send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0136] In some embodiments, the client and the server can communicate using any currently known or future-developed network protocol such as HTTP (HyperText Transfer Protocol), and can be interconnected with digital data communication in any form or medium (e.g., a communication network). Examples of communication networks include local area networks ("LANs"), wide area networks ("WANs"), the Internet (e.g., the Internet), and end-to-end networks (e.g., ad hoc end-to-end networks), as well as any currently known or future-developed networks.
[0137] The above computer-readable medium may be included in the above electronic device; or may exist separately without being assembled into the electronic device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by the electronic device, the electronic device is caused to: in response to determining that there is no item representation vector corresponding to the requested item information in the pre-cached set of item representation vectors, use an item representation vector generation model to determine an item representation vector for the above requested item information as a target item representation vector; determine the vector similarity between each copywriting representation vector in the pre-stored set of copywriting representation vectors and the above target item representation vector to obtain a set of vector similarities; for each item copy in the corresponding item copy set, determine a set of copywriting click information corresponding to the copy content of the above item copy under various copywriting styles; generate at least one recommended copywriting for the above requested item information according to the obtained set of copywriting click information sets and the above set of vector similarities.
[0138] Computer program code for performing the operations of some embodiments of the present disclosure may be written in one or more programming languages or combinations thereof. The above programming languages include object-oriented programming languages such as Java, Smalltalk, C++; and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, executed as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).
[0139] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram may represent a module, a segment of a program, or a part of code that contains one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks shown may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as combinations of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0140] The units described in some embodiments of the present disclosure can be implemented in software or in hardware. The described units can also be provided in a processor. For example, it can be described as: a processor includes a first determination unit, a second determination unit, a third determination unit, and a generation unit. Among them, the names of these units do not constitute a limitation to the unit itself in some cases. For example, the generation unit can also be described as "a unit that generates at least one recommended copy for the above-mentioned requested item information according to the obtained copy click information set and the above-mentioned vector similarity set".
[0141] The functions described above herein can be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that can be used include: Field Programmable Gate Array (FPGA), Application Specific Integrated Circuit (ASIC), Application Specific Standard Product (ASSP), System on Chip (SOC), Complex Programmable Logic Device (CPLD), and so on.
[0142] Some embodiments of the present disclosure also provide a computer program product, including a computer program that, when executed by a processor, implements any one of the above-mentioned recommended copy generation methods.
[0143] The above description is only some preferred embodiments of the present disclosure and an explanation of the applied technical principles. Those skilled in the art should understand that the scope of the invention involved in the embodiments of the present disclosure is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above inventive concept. For example, technical solutions formed by mutually replacing the above features with (but not limited to) technical features having similar functions disclosed in the embodiments of the present disclosure.
Claims
1. A method for generating recommended copywriting, including: In response to determining that there is no item representation vector corresponding to the requested item information in the pre-cached set of item representation vectors, using an item representation vector generation model to determine an item representation vector for the requested item information as the target item representation vector; Determine the vector similarity between each copywriting representation vector in the pre-stored set of copywriting representation vectors and the target item representation vector to obtain a set of vector similarities; For each item copy in the corresponding item copy set, determine the copy click information group corresponding to the copy content of the item copy under various copywriting styles; Generate at least one recommended copywriting for the requested item information according to the obtained set of copy click information groups and the set of vector similarities.
2. The method according to claim 1, wherein, The item representation vector generation model is a bidirectional encoding network based on a multi-head attention mechanism; and The step of using the item representation vector generation model to determine an item representation vector for the requested item information includes: Perform information preprocessing on the requested item information to obtain preprocessed item information; Input the preprocessed item information into the bidirectional encoding network based on the multi-head attention mechanism to generate a set of word vectors; Perform global average pooling on the set of word vectors to generate the item representation vector.
3. The method according to claim 1, wherein, The step of generating at least one recommended copywriting for the requested item information according to the obtained set of copy click information groups and the set of vector similarities includes: Perform normalization processing on each copy click information group in the set of copy click information groups to generate a normalized information group, obtaining a set of normalized information groups; Generate the at least one recommended copywriting according to the set of normalized information groups and the set of vector similarities.
4. The method according to claim 3, wherein, The step of generating the at least one recommended copywriting according to the set of normalized information groups and the set of vector similarities includes: For each normalized information group in the set of normalized information groups, perform the following score generation steps: For each normalized information in the normalized information group, perform the following determination steps: Multiply the normalized information by the corresponding copy click information to obtain a first multiplication result; Determine the exposure amount under the copywriting style corresponding to the normalized information; Perform a summation process on the obtained set of first multiplication results to obtain a first summation result; Perform a summation process on the obtained set of exposure amounts to obtain a second summation result; Divide the first summation result by the second summation result to obtain a division value as the copywriting score; Generate the at least one recommended copywriting according to the obtained set of copywriting scores and the set of vector similarities.
5. The method according to claim 4, wherein, The step of generating the at least one recommended copywriting according to the obtained set of copywriting scores and the set of vector similarities includes: Multiply each copywriting score in the set of copywriting scores by the corresponding vector similarity in the set of vector similarities to generate a second multiplication result, obtaining a set of second multiplication results; Screen out the item copywriting in the item copywriting set whose corresponding second multiplication result meets the preset numerical conditions as the recommended copywriting to obtain the at least one recommended copywriting.
6. The method according to claim 1, wherein, the copywriting feature vector set is generated through the following steps: Perform copywriting preprocessing on each item copywriting in the item copywriting set to generate preprocessed copywriting, obtaining a preprocessed copywriting set; Input each preprocessed copywriting in the preprocessed copywriting set into a copywriting feature vector generation model to generate copywriting feature vectors, obtaining the copywriting feature vector set.
7. The method according to claim 5, wherein, the copywriting feature vector generation model and the item feature vector generation model are trained through the following steps: Obtain a set of positive sample pairs, where each positive sample pair includes: an item copywriting and item information associated with the item copywriting; For each positive sample pair in the set of positive sample pairs, perform the following sample generation steps: Determine the set of category information and the set of brand information associated with the target item copywriting, where the target item copywriting is the item copywriting in the positive sample pair; Construct at least one negative sample pair for the target item copywriting, where the negative sample pair includes: the target item copywriting and target item information, where the category information corresponding to the target item information does not exist in the set of category information, and the brand information corresponding to the target item information does not exist in the set of brand information; According to the obtained set of negative sample pairs and the set of positive sample pairs, perform model training on the initial copywriting feature vector generation model and the initial item feature vector generation model to obtain the copywriting feature vector generation model and the item feature vector generation model.
8. The method according to claim 7, wherein, the performing model training on the initial copywriting feature vector generation model and the initial item feature vector generation model according to the obtained set of negative sample pairs and the set of positive sample pairs to obtain the copywriting feature vector generation model and the item feature vector generation model includes: Set training hyperparameters for the set of negative sample pairs; For each negative sample pair in the set of negative sample pairs, input the target item copywriting included in the negative sample pair into the initial copywriting feature vector generation model to generate a target copywriting feature vector, and input the target item information included in the negative sample pair into the initial item feature vector generation model to generate a first item feature vector; For each positive sample pair in the set of positive sample pairs, input the item information included in the positive sample pair into the initial item feature vector generation model to generate a second item feature vector; According to the obtained set of target copywriting feature vectors, the set of first item feature vectors, the second item feature vector, and the training hyperparameters, use a target loss function to generate a first set of loss values for the set of positive sample pairs and a second set of loss values for the set of negative sample pairs; Based on the first set of loss values, the initial copywriting representation vector generation model is trained to obtain a copywriting representation vector generation model, and based on the second set of loss values, the initial item representation vector generation model is trained to obtain an item representation vector generation model.
9. The method according to claim 1, wherein, the method further includes: in response to determining that there is an item representation vector corresponding to the requested item information in the item representation vector set, determining the item representation vector corresponding to the requested item information as the target item representation vector; generating at least one recommended copywriting based on the target item representation vector and the copywriting representation vector set.
10. A recommended copywriting generation device, including: a first determination unit configured to, in response to determining that there is no item representation vector corresponding to the requested item information in the pre-cached item representation vector set, use the item representation vector generation model to determine an item representation vector for the requested item information as the target item representation vector; a second determination unit configured to determine the vector similarity between each copywriting representation vector in the pre-stored copywriting representation vector set and the target item representation vector to obtain a vector similarity set; a third determination unit configured to, for each item copy in the corresponding item copy set, determine a copy click information group corresponding to the copy content of the item copy in various copywriting styles; a generation unit configured to generate at least one recommended copywriting for the requested item information based on the obtained set of copy click information groups and the vector similarity set.
11. An electronic device, including: one or more processors; a storage device having stored thereon one or more programs, when the one or more programs are executed by the one or more processors, causing the one or more processors to implement the method according to any one of claims 1-9.
12. A computer-readable medium having stored thereon a computer program, wherein, the computer program, when executed by a processor, implements the method according to any one of claims 1-9.
13. A computer program product including a computer program which, when executed by a processor, implements the method according to any one of claims 1-9.