Information generation method and apparatus, electronic device, and computer readable medium
Patent Information
- Application Number
- CN202211066926.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-01
- Publication Date
- 2026-10-23
- Estimated Expiration
- 2042-09-01
AI Technical Summary
[0004]采用普适性的标签向量,往往无法较好地表征目标场景的特征信息,同时,采用普适性的物品向量,也往往无法较好地表现在活动场景下的物品的特征信息,由此,会导致得到的物品顺序信息的准确性较低
[0021]效果:通过本公开的一些实施例的信息生成方法依据所生成第三方面,本公开的一些实施例提供了一种电子设备,包括:一个或多个处理器;存储装置,其上存储有一个或多个程序,当一个或多个程序被一个或多个处理器执行,使得一个或多个处理器实现如第一方面中任一实现方式描述的方法。
Smart Images

Figure CN117708404B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of this disclosure relate to the field of computer technology, and more specifically to information generation methods, apparatus, electronic devices, and computer-readable media. Background Technology
[0002] Various applications often conduct item value reduction activities targeting specific scenarios. The typical approach to ranking item information during these activities is as follows: First, identify scenario tags associated with the target topic or holiday. Then, determine the universal tag vectors corresponding to these scenario tags. Next, perform word embedding on the item information for each item to obtain universal item vectors. Finally, rank the item information based on the similarity between the tag vectors and the item vectors.
[0003] However, when sorting item information using the above method, the following technical problems often arise:
[0004] Using universal label vectors often fails to adequately represent the feature information of the target scene. Similarly, using universal item vectors often fails to adequately represent the feature information of items in the activity scene. As a result, the accuracy of the obtained item order information is low. Summary of the Invention
[0005] The summary portion of this disclosure is intended to provide a brief overview of the concepts, which will be described in detail in the detailed description portion. This summary portion is not intended to identify key or essential features of the claimed technical solutions, nor is it intended to limit the scope of the claimed technical solutions.
[0006] Some embodiments of this disclosure provide information generation methods, apparatuses, electronic devices, and computer-readable media to address the technical problems mentioned in the background section above.
[0007] In a first aspect, some embodiments of this disclosure provide an information generation method, including: generating at least one positive keyword and at least one negative keyword associated with a pre-acquired target scene label; generating a label vector representing feature information of the target scene label based on the at least one positive keyword; determining an item vector corresponding to each item information in a pre-acquired item information set using an attention mechanism based on the at least one negative keyword and the at least one positive keyword, thereby obtaining an item vector set; and generating item order information for the item information set based on the item vector set and the label vector.
[0008] Optionally, generating a tag vector representing feature information of the target scene label based on the at least one positive keyword includes: performing vector transformation processing on each of the at least one positive keyword to generate a positive keyword vector, thereby obtaining a positive keyword vector set; performing a weighted summation on the positive keyword vectors included in the positive keyword vector set to obtain a first weighted summation vector; and generating the tag vector based on the first weighted summation vector.
[0009] Optionally, generating the tag vector based on the first weighted summation vector includes: determining item information whose association with the target scene tag satisfies a preset association condition, as scene-related item information, to obtain at least one scene-related item information; for each scene-related item information in the at least one scene-related item information, performing a scene-related item vector generation step: determining the scene-related item feature information set corresponding to the scene-related item information; performing vector transformation processing on each scene-related item feature information in the scene-related item feature information set to generate a scene-related item feature vector, to obtain a scene-related item feature vector set; generating a scene-related item vector corresponding to the scene-related item information based on the scene-related item feature vector set; and generating the tag vector based on the obtained scene-related item vector set and the first weighted summation vector.
[0010] Optionally, the above-mentioned determination of the item vector corresponding to each item information in the pre-acquired item information set using an attention mechanism based on at least one negative keyword and at least one positive keyword includes: determining the item feature vector set corresponding to the item information; and performing an item vector generation step based on the item feature vector set: performing vector transformation processing on each negative keyword in the at least one negative keyword to generate a negative keyword vector, thus obtaining a negative keyword vector set; performing weighted summation processing on the negative keyword vectors included in the negative keyword vector set to obtain a second weighted summation vector; determining the score information corresponding to each item feature vector in the item feature vector set using an attention mechanism based on the second weighted summation vector and the first weighted summation vector; multiplying each item feature vector in the item feature vector set with the corresponding score information to generate a multiplied vector, thus obtaining a multiplied vector set; and adding the multiplied vectors included in the multiplied vector set to obtain a summed vector, which serves as the item vector corresponding to the item information.
[0011] Optionally, the above-mentioned determination of the score information corresponding to each item feature vector in the item feature vector set using an attention mechanism based on the second weighted summation vector and the first weighted summation vector includes: multiplying the item feature vector with the second weighted summation vector to obtain a negative multiplication result; multiplying the item feature vector with the first weighted summation vector to obtain a positive multiplication result; determining the result in which the values of the negative multiplication result and the positive multiplication result satisfy the numerical condition as a candidate result; and determining the score information corresponding to the item feature vector based on the candidate result and the attention function corresponding to the attention mechanism.
[0012] Optionally, generating item order information for the item information set based on the item vector set and the tag vector includes: determining the vector similarity between each item vector in the item vector set and the tag vector; and sorting the item information included in the item information set according to the vector similarity corresponding to each item information in the item information set to obtain the item order information.
[0013] Optionally, the above method further includes: obtaining item adjustment information for the target scene tag; adjusting the order information of the items according to the item adjustment information to obtain the adjusted order information; and sending the adjusted order information to the target terminal.
[0014] Secondly, some embodiments of this disclosure provide an information generation apparatus, comprising: a first generation unit configured to generate at least one positive keyword and at least one negative keyword associated with a pre-acquired target scene label; a second generation unit configured to generate a label vector representing feature information of the target scene label based on the at least one positive keyword; a determination unit configured to determine, using an attention mechanism, an item vector corresponding to each item in a pre-acquired item information set based on the at least one negative keyword and the at least one positive keyword, thereby obtaining an item vector set; and a third generation unit configured to generate item order information for the item information set based on the item vector set and the label vector.
[0015] Optionally, the second generation unit can be configured to: perform vector transformation processing on each of the at least one positive keyword to generate a positive keyword vector, thereby obtaining a positive keyword vector set; perform weighted summation on the positive keyword vectors included in the positive keyword vector set to obtain a first weighted summation vector; and generate the tag vector based on the first weighted summation vector.
[0016] Optionally, the second generation unit can be configured to: determine item information whose association with the target scene tag satisfies a preset association condition, and use it as scene-related item information to obtain at least one scene-related item information; for each scene-related item information in the at least one scene-related item information, perform a scene-related item vector generation step: determine the scene-related item feature information set corresponding to the scene-related item information; perform vector transformation processing on each scene-related item feature information in the scene-related item feature information set to generate a scene-related item feature vector, and obtain a scene-related item feature vector set; generate a scene-related item vector corresponding to the scene-related item information based on the scene-related item feature vector set; and generate the tag vector based on the obtained scene-related item vector set and the first weighted sum vector.
[0017] Optionally, the determining unit can be configured to: determine the set of item feature vectors corresponding to the above-mentioned item information; and, based on the above-mentioned item feature vector set, perform an item vector generation step: perform vector transformation processing on each negative keyword in the at least one negative keyword to generate a negative keyword vector, thereby obtaining a negative keyword vector set; perform weighted summation processing on the negative keyword vectors included in the above-mentioned negative keyword vector set to obtain a second weighted summation vector; and, based on the second weighted summation vector and the first weighted summation vector, use an attention mechanism to determine the score information corresponding to each item feature vector in the above-mentioned item feature vector set; multiply each item feature vector in the above-mentioned item feature vector set with the corresponding score information to generate a multiplied vector, thereby obtaining a multiplied vector set; and add the multiplied vectors included in the above-mentioned multiplied vector set to obtain a summed vector, which serves as the item vector corresponding to the above-mentioned item information.
[0018] Optionally, the determining unit can be configured to: multiply the above-mentioned item feature vector with the above-mentioned second weighted summation vector to obtain a negative multiplication result; multiply the above-mentioned item feature vector with the above-mentioned first weighted summation vector to obtain a positive multiplication result; determine the result in which the values of the above-mentioned negative multiplication result and the above-mentioned positive multiplication result satisfy the numerical condition as a candidate result; and determine the score information corresponding to the above-mentioned item feature vector based on the above-mentioned candidate result and the attention function corresponding to the above-mentioned attention mechanism.
[0019] Optionally, the third generation unit can be configured to: determine the vector similarity between each item vector in the above item vector set and the above tag vector; and sort the item information included in the above item information set according to the vector similarity corresponding to each item information in the above item information set to obtain the above item order information.
[0020] Optionally, the above-mentioned device further includes: acquiring item adjustment information for the target scene tag; adjusting the order information of the items according to the item adjustment information to obtain adjusted order information; and sending the adjusted order information to the target terminal.
[0021] Effect: Based on the information generation method of some embodiments of this disclosure, and the generated third aspect, some embodiments of this disclosure provide an electronic device, including: one or more processors; a storage device having one or more programs stored thereon, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any implementation of the first aspect.
[0022] Fourthly, some embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method as described in any implementation of the first aspect.
[0023] The embodiments of this disclosure have the following beneficial target scene labels and item vector sets, which can accurately generate item order information. Specifically, the reason for the inaccuracy in generating item order information is that using universal label vectors often fails to adequately represent the feature information of the target scene. Similarly, using universal item vectors often fails to adequately represent the feature information of items within the activity scene, thus leading to low accuracy in the obtained item order information. Based on this, some embodiments of the information generation method of this disclosure first obtain target scene labels. Then, at least one positive keyword and at least one negative keyword associated with the target scene labels are generated. Here, directly embedding words into the target scene labels often results in universally applicable label vectors that cannot effectively reflect the main feature information of the target scene. Therefore, by determining at least one positive keyword associated with the target scene labels, label vectors that can reflect scene features can be subsequently generated. By determining at least one negative keyword associated with the target scene labels, these can be used to generate item vectors for the target scene. Then, based on the at least one positive keyword, label vectors representing the feature information of the target scene labels can be accurately generated. The generated label vectors can effectively reflect the main feature information of the target scene, which helps in generating accurate item order information. Furthermore, based on at least one negative keyword and at least one positive keyword, an attention mechanism can be used to accurately determine the item vector corresponding to each item in the pre-acquired item information set, thus obtaining an item vector set. Here, by utilizing the attention mechanism, the generated item vectors can more effectively represent the item features of the item in the target scene. Finally, based on the item vector set and the label vector, item order information for the aforementioned item information set can be accurately generated. Attached Figure Description
[0024] The above and other features, advantages, and aspects of the embodiments of this disclosure will become more apparent from the accompanying drawings and the following detailed description. 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 elements are not necessarily drawn to scale.
[0025] Figure 1 This is a schematic diagram illustrating an application scenario of an information generation method according to some embodiments of the present disclosure;
[0026] Figure 2 This is a flowchart of some embodiments of the information generation method according to this disclosure;
[0027] Figure 3 This is a flowchart of some other embodiments of the information generation method according to this disclosure;
[0028] Figure 4 This is a flowchart of yet another embodiment of the information generation method according to this disclosure;
[0029] Figure 5 These are schematic diagrams illustrating the structure of some embodiments of the information generation apparatus according to this disclosure;
[0030] Figure 6 This is a schematic diagram of the structure of an electronic device suitable for implementing some embodiments of the present disclosure. Detailed Implementation
[0031] Embodiments of this disclosure will now be described in more detail with reference to the accompanying drawings. While some embodiments of this disclosure are shown in the drawings, it should be understood that this disclosure can be implemented in various forms and should not be construed as limited to the embodiments set forth herein. Rather, these embodiments are provided to provide a more thorough and complete understanding of this disclosure. It should be understood that the accompanying drawings and embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of protection of this disclosure.
[0032] It should also be noted that, for ease of description, only the parts relevant to the invention are shown in the accompanying drawings. Unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other.
[0033] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are used only to distinguish different devices, modules or units, and are not used to limit the order of functions performed by these devices, modules or units or their interdependencies.
[0034] It should be noted that the terms "a" and "a plurality of" used in this disclosure are illustrative rather than restrictive, and those skilled in the art should understand that, unless otherwise expressly indicated in the context, they should be understood as "one or more".
[0035] The names of messages or information exchanged between multiple devices in the embodiments of this disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
[0036] This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.
[0037] Figure 1 This is a schematic diagram illustrating an application scenario of an information generation method according to some embodiments of the present disclosure.
[0038] exist Figure 1In this application scenario, firstly, the electronic device 101 can generate at least one positive keyword 103 and at least one negative keyword 104 associated with a pre-acquired target scene label 102. In this application scenario, the target scene label 102 can be "seaside tourism". At least one positive keyword 103 can include: positive keyword 1031, positive keyword 1032, and positive keyword 1033. The positive keyword 1031 can be "seaside". The positive keyword 1032 can be "beach". The positive keyword 1033 can be "island". At least one negative keyword 104 can include: negative keyword 1041, negative keyword 1042, and negative keyword 1043. The negative keyword 1041 can be "home". The negative keyword 1042 can be "work clothes". The negative keyword 1043 can be "formal wear". Then, the electronic device 101 can generate a label vector 105 representing the feature information of the target scene label 102 based on the at least one positive keyword 103. In this application scenario, the tag vector 105 can be "[9, 12, 33, 12, 3, 4]". Next, the electronic device 101, based on at least one negative keyword 104 and at least one positive keyword 103, uses an attention mechanism to determine the item vector corresponding to each item in the pre-acquired item information set 106, resulting in an item vector set 107. In this application scenario, the item information vector set 106 includes: item information vector 1061, item information vector 1062, and item information vector 1063. Item information vector 1061 can be "swimsuit". Item information vector 1062 can be "diving goggles". Item information vector 1063 can be "sunscreen". Item information vector 1061 corresponds to item vector 1071. Item information vector 1062 corresponds to item vector 1072. Item information vector 1063 corresponds to item vector 1073. Item vector 1071 can be "[3, 42, 1, 4]". The aforementioned item vector 1072 can be "[2, 32, 7, 9]". The aforementioned item vector 1073 can be "[35, 2, 0, 7]". Finally, the electronic device 101 can generate item order information 108 for the aforementioned item information set 106 based on the aforementioned item vector set 106 and the aforementioned tag vector 102. In this application scenario, the item order information 108 can be "[swimsuit, sunscreen, diving goggles]".
[0039] It should be noted that the aforementioned electronic device 101 can be either hardware or software. When the electronic device is hardware, it can be implemented as a distributed cluster consisting of multiple servers or terminal devices, or as a single server or a single terminal device. When the electronic device is software, it can be installed in the hardware devices listed above. It can be implemented as, for example, multiple software programs or software modules used to provide distributed services, or as a single software program or software module. No specific limitations are made here.
[0040] It should be understood that Figure 1 The number of electronic devices shown is merely illustrative. Any number of electronic devices can be used depending on the implementation requirements.
[0041] Continue to refer to Figure 2 The flowchart 200 illustrates some embodiments of the information generation method according to this disclosure. The information generation method includes the following steps:
[0042] Step 201: Generate at least one positive keyword and at least one negative keyword associated with the pre-acquired target scene tags.
[0043] In some embodiments, the execution subject of the above information generation method (e.g. Figure 1 The electronic device 101 shown can generate at least one positive keyword and at least one negative keyword associated with a pre-acquired target scene tag. The target scene tag can be a label indicating a target scene. In practice, the target scene can be an activity scenario that a target application (App) will be conducting. The activity scenario can be the scene in which the target activity takes place. The target activity can be an activity that will be conducted in the target application. For example, the target activity could be a clothing promotion or a beach vacation. The target application could be an e-commerce application. Positive keywords can be keywords that reflect the scene characteristics of the target scene. Negative keywords can be keywords whose corresponding characteristics differ significantly from the scene characteristics of the target scene. Scene characteristics refer to the scene features of the target scene. For example, the target scene is a "beach vacation" scene. At least one positive keyword can include: "swimsuit," "ship," "sunscreen," and "sunny." At least one negative keyword can include: "formal wear," "home wear," "suit," and "snow."
[0044] As an example, firstly, the aforementioned execution entity can acquire multiple articles associated with the target scene label. Then, it performs word segmentation on these articles to obtain a word set. Next, it filters out words from this word set whose frequency is greater than a predetermined frequency, obtaining at least one word. Then, it inputs the target scene label and the at least one word into a pre-trained Transformer encoding network to obtain an initial scene vector and at least one word vector. Simultaneously, it determines the vector distance between the initial scene vector and each word vector in the at least one word vector. Finally, words corresponding to word vectors with a vector distance greater than a predetermined distance are designated as negative keywords. Words corresponding to word vectors with a vector distance less than a predetermined distance are designated as positive keywords.
[0045] Step 202: Generate a label vector representing the feature information of the target scene label based on at least one positive keyword.
[0046] In some embodiments, the execution entity may generate a label vector representing feature information of the target scene label based on at least one positive keyword.
[0047] As an example, firstly, the aforementioned execution entity can input at least one positive keyword into the pre-trained Transformer encoding network to obtain at least one positive encoding vector. Then, the aforementioned execution entity can fuse the at least one positive encoding vector to obtain a fused vector, which serves as the label vector.
[0048] In some optional implementations of certain embodiments, generating a label vector representing feature information of the target scene label based on at least one positive keyword may include the following steps:
[0049] The first step is for the aforementioned executing entity to perform vector transformation processing on each of the at least one positive keyword to generate a positive keyword vector, thus obtaining a positive keyword vector set.
[0050] As an example, the aforementioned execution entity can input each positive keyword from at least one positive keyword into a pre-trained word embedding (Word2vec, Word to vector) model to generate a positive keyword vector, thus obtaining a positive keyword vector set.
[0051] The second step is for the aforementioned executing entity to perform a weighted summation of the positive keyword vectors included in the aforementioned positive keyword vector set to obtain the first weighted summation vector.
[0052] As an example, the aforementioned executing entity can average the positive keyword vectors included in the positive keyword vector set to obtain an average vector, which can then be used as the first weighted summation vector.
[0053] Third, the aforementioned executing entity can generate the aforementioned label vector based on the aforementioned first weighted summation vector.
[0054] As an example, the aforementioned executing entity can determine the aforementioned first weighted summation vector as the aforementioned label vector.
[0055] Optionally, generating the label vector based on the first weighted summation vector may include the following steps:
[0056] The first step involves the executing entity identifying item information whose association with the target scene tag meets preset association conditions. This information is then used as scene-related item information, resulting in at least one scene-related item. The preset association conditions can be that the item information's association degree with the target scene tag is greater than a predetermined value. The association degree characterizes the relationship between the target scene tag and the item information.
[0057] As an example, firstly, the aforementioned executing entity can obtain a table representing the degree of association between the target scene and various item information. Then, it filters out item information with a corresponding association degree greater than a predetermined threshold from the table, and uses this information as scene-related item information, thus obtaining at least one scene-related item information.
[0058] The second step involves the execution entity performing a scene-related item vector generation step for each of the at least one scene-related item information mentioned above.
[0059] In the first sub-step, the aforementioned executing entity can determine the set of scene-related item feature information corresponding to the aforementioned scene-related item information. The scene-related item feature information can be the item feature information of the scene-related items. Specifically, the scene-related item feature information can include, but is not limited to, at least one of the following: image features of the scene-related items, color features of the scene-related items, and weight features of the scene-related items.
[0060] In the second sub-step, the aforementioned executing entity can perform vector transformation processing on each scene-related item feature information in the aforementioned scene-related item feature information set to generate scene-related item feature vectors, thereby obtaining a scene-related item feature vector set.
[0061] As an example, the aforementioned execution entity can input the feature information of each scene-related item in the aforementioned scene-related item feature information set into a pre-trained word embedding model to generate scene-related item feature vectors, thereby obtaining a scene-related item feature vector set.
[0062] In the third sub-step, the aforementioned executing entity can generate scene-related item vectors corresponding to the scene-related item information based on the aforementioned scene-related item feature vector set.
[0063] As an example, the aforementioned executing entity can average the scene-related item feature vectors included in the scene-related item feature vector set to obtain the scene-related item vector corresponding to the aforementioned scene-related item information.
[0064] Third, the aforementioned executing entity can generate the aforementioned tag vector based on the obtained scene-related item vector set and the aforementioned first weighted summation vector.
[0065] As an example, firstly, the aforementioned execution entity can determine the average value of the scene-related item vectors included in the scene-related item vector set, thus obtaining the scene-related item average vector. Then, the aforementioned execution entity can determine the average value between the scene-related item average vector and the first weighted sum vector, thus obtaining the average vector, which serves as the aforementioned label vector.
[0066] Step 203: Based on at least one negative keyword and at least one positive keyword, use an attention mechanism to determine the item vector corresponding to each item in the pre-acquired item information set, and obtain the item vector set.
[0067] In some embodiments, the execution entity may determine the item vector corresponding to each item information in the pre-acquired item information set by using an attention mechanism based on at least one negative keyword and at least one positive keyword, thereby obtaining an item vector set.
[0068] As an example, firstly, the execution entity can perform vector transformation processing on each of the at least one positive keyword to generate a positive keyword vector, resulting in a positive keyword vector set. Then, the execution entity can perform vector transformation processing on each of the at least one negative keyword to generate a negative keyword vector, resulting in a negative keyword vector set. Next, the execution entity can combine the positive and negative keyword vector sets to obtain a combined vector. Furthermore, the execution entity can determine the scene-related item feature information set corresponding to the scene-related item information. Finally, the execution entity can determine the combined vector as the query vector in the self-attention mechanism. The scene-related item feature information set is determined as key vectors and value vectors. Using the function corresponding to the self-attention mechanism, the item vector corresponding to each item in the pre-acquired item information set is determined, resulting in an item vector set.
[0069] Step 204: Generate item order information for the above item information set based on the above item vector set and the above tag vector.
[0070] In some embodiments, the execution entity can generate item order information for the item information set based on the item vector set and the tag vector. The item order information represents the degree of fit between each item in the item information set and the target scene tag. The item order information can be a sequence of item information. Items appearing earlier in the item information sequence are more closely related to the target scene tag. For example, the item information set includes "apple," "sun umbrella," and "flower pot." The target scene tag could be "seaside tourism." The corresponding item information sequence could be ["sun umbrella," "apple," "flower pot"]. In this case, "sun umbrella" is the most closely related to the target scene tag.
[0071] As an example, firstly, the aforementioned execution entity can input the aforementioned item vector set and the aforementioned label vector into a similarity determination network to obtain a similarity value corresponding to each item vector. Then, based on the order of similarity values from largest to smallest, the item information set corresponding to the item vector set is sorted to obtain item order information. The similarity determination network can be a Convolutional Neural Network (CNN).
[0072] In some optional implementations of certain embodiments, generating item order information for the item information set based on the item vector set and the tag vector may include the following steps:
[0073] The first step is for the executing entity to determine the vector similarity between each item vector in the item vector set and the tag vector.
[0074] As an example, the aforementioned execution entity can determine the cosine distance between each item vector in the item vector set and the aforementioned label vector as vector similarity.
[0075] The second step is for the executing entity to sort the item information included in the item information set according to the similarity of the vector corresponding to each item information in the item information set, so as to obtain the item order information.
[0076] As an example, the aforementioned execution entity can sort the item information included in the aforementioned item information set in ascending order based on the similarity of the vectors corresponding to each item information in the aforementioned item information set, thereby obtaining the aforementioned item order information.
[0077] For example, the item information set includes: "apple", "sun umbrella", and "flower pot". The vector similarity for "apple" is "0.4". The vector similarity for "sun umbrella" is "0.9". The vector similarity for "flower pot" is "0.78". Then the item order information could be: ["apple", "flower pot", "sun umbrella"].
[0078] The above embodiments of this disclosure have the following beneficial effects: The information generation method of some embodiments of this disclosure can accurately generate item order information based on the generated target scene tags and item vector sets. Specifically, the reason for the inaccuracy of the generated item order information is that using universal tag vectors often fails to adequately represent the feature information of the target scene. Similarly, using universal item vectors often fails to adequately represent the feature information of items within the activity scene, thus leading to low accuracy in the obtained item order information. Based on this, the information generation method of some embodiments of this disclosure first obtains target scene tags. Then, it generates at least one positive keyword and at least one negative keyword associated with the target scene tags. Here, directly embedding words into the target scene tags often results in universally applicable tag vectors that cannot effectively reflect the main feature information of the target scene. Therefore, by determining at least one positive keyword associated with the target scene tags, tag vectors that can reflect scene features can be subsequently generated. By determining at least one negative keyword associated with the target scene tags, these can be used to generate item vectors for the target scene. Then, based on the at least one positive keyword, tag vectors representing the feature information of the target scene tags can be accurately generated. The generated label vectors effectively reflect the main features of the target scene, facilitating the subsequent generation of accurate item order information. Furthermore, based on at least one negative keyword and at least one positive keyword, an attention mechanism is used to accurately determine the item vector corresponding to each item in the pre-acquired item information set, resulting in an item vector set. Here, by utilizing the attention mechanism, the generated item vectors can more effectively represent the item features in the target scene. Finally, based on the item vector set and the label vectors, accurate item order information for the aforementioned item information set can be generated.
[0079] Further reference Figure 3 The diagram illustrates a flow 300 of another embodiment of the information generation method according to the present disclosure. This information generation method includes the following steps:
[0080] Step 301: Generate at least one positive keyword and at least one negative keyword associated with the pre-acquired target scene tags.
[0081] Step 302: Generate a label vector representing the feature information of the target scene label based on at least one positive keyword.
[0082] Step 303: Determine the set of item feature vectors corresponding to the item information.
[0083] In some embodiments, the executing entity (e.g. Figure 1 The electronic device 101 shown can determine the set of item feature vectors corresponding to the above-mentioned item information. The item feature vectors can represent the item feature information of the item information. Specifically, the item feature information can be, but is not limited to, at least one of the following: item price information, item image information, item color information, and item weight information.
[0084] As an example, firstly, the aforementioned execution entity can obtain the set of item feature information corresponding to the item information. Then, the aforementioned execution entity can input each item feature information in the item feature set into the word embedding model to output the item feature vector, thus obtaining the item feature vector set.
[0085] Step 304: Based on the above item feature vector set, perform the item vector generation step:
[0086] Step 3041: Perform vector transformation processing on each of the at least one negative keyword to generate a negative keyword vector, thus obtaining a negative keyword vector set.
[0087] In some embodiments, the execution entity may perform vector transformation processing on each of the at least one negative keyword to generate a negative keyword vector, thereby obtaining a negative keyword vector set.
[0088] As an example, the aforementioned executing entity can input each of the at least one negative keyword into the aforementioned word embedding model to generate a negative keyword vector, thereby obtaining a negative keyword vector set.
[0089] Step 3042: Perform a weighted summation on the negative keyword vectors included in the above negative keyword vector set to obtain a second weighted summation vector.
[0090] In some embodiments, the execution entity may perform a weighted summation of the negative keyword vectors included in the negative keyword vector set to obtain a second weighted summation vector.
[0091] As an example, the aforementioned executing entity can average the negative keyword vectors included in the aforementioned negative keyword vector set to obtain an average vector, which can then be used as the second weighted summation vector.
[0092] Step 3043: Based on the second weighted summation vector and the first weighted summation vector, use the attention mechanism to determine the score information corresponding to each item feature vector in the item feature vector set.
[0093] In some embodiments, the execution entity may determine the score information corresponding to each item feature vector in the item feature vector set using an attention mechanism, based on the second weighted summation vector and the first weighted summation vector. The score information characterizes the importance of the item feature vector to the label vector.
[0094] In some optional implementations of certain embodiments, the determination of the score information corresponding to each item feature vector in the item feature vector set using an attention mechanism based on the second weighted summation vector and the first weighted summation vector may include the following steps:
[0095] The first step is for the executing entity to multiply the item feature vector by the second weighted summation vector to obtain the negative multiplication result.
[0096] The second step is for the executing entity to multiply the item feature vector by the first weighted summation vector to obtain a positive multiplication result.
[0097] Third, the aforementioned implementing entity can determine the result that satisfies the numerical condition between the above negative multiplication result and the above positive multiplication result as a candidate result.
[0098] The numerical condition is that the result is the largest of the negative multiplication result and the positive multiplication result.
[0099] Fourth, the executing entity can determine the score information corresponding to the item feature vector based on the candidate results and the attention function corresponding to the attention mechanism.
[0100] The attention function will not be elaborated upon here.
[0101] As an example, the aforementioned execution entity can input the candidate results into the attention function to obtain the score information corresponding to the feature vector of the aforementioned items.
[0102] Step 3044: Multiply each item feature vector in the above item feature vector set with its corresponding score information to generate a multiplied vector, thus obtaining a multiplied vector set.
[0103] In some embodiments, the execution entity may multiply each item feature vector in the item feature vector set with its corresponding score information to generate a multiplication vector, thereby obtaining a multiplication vector set.
[0104] Step 3045: Add the multiplication vectors included in the above multiplication vector set to obtain the summed vector, which serves as the item vector corresponding to the above item information.
[0105] In some embodiments, the execution entity may add the multiplication vectors included in the multiplication vector set to obtain a summed vector, which serves as the item vector corresponding to the item information.
[0106] Step 305: Generate item order information for the above item information set based on the above item vector set and the above tag vector.
[0107] In some embodiments, the specific implementation of steps 301-302 and 305 and their resulting technical effects can be found in [reference needed]. Figure 2 Steps 201-202 and 204 in the corresponding embodiments will not be repeated here.
[0108] from Figure 3 It can be seen from this that, with Figure 2 Compared to the description of some corresponding embodiments, Figure 3 In some corresponding embodiments, the information generation method flow 300 further emphasizes the specific steps of using an attention mechanism to determine the item vector corresponding to the item information. Thus, the scheme described in these embodiments utilizes an attention mechanism to determine the association between each item feature vector in the item feature vector set corresponding to the item information and at least one negative keyword and at least one positive keyword (i.e., the score information corresponding to each item feature vector). This takes into account the importance of each item feature vector in the item feature vector set corresponding to the item information under the target scene label. Therefore, based on the score information corresponding to each item feature vector, item vectors for the target scene label can be generated more accurately, making the item vectors more representative under the scene corresponding to the target scene label.
[0109] Further reference Figure 4 The diagram illustrates a flow 400 of yet another embodiment of the information generation method according to the present disclosure. This information generation method includes the following steps:
[0110] Step 401: Generate at least one positive keyword and at least one negative keyword associated with the pre-acquired target scene tags.
[0111] Step 402: Generate a label vector representing the feature information of the target scene label based on at least one positive keyword.
[0112] Step 403: Based on at least one negative keyword and at least one positive keyword, use an attention mechanism to determine the item vector corresponding to each item information in the pre-acquired item information set, and obtain the item vector set.
[0113] Step 404: Generate item order information for the above item information set based on the above item vector set and the above tag vector.
[0114] In some embodiments, the specific implementation of steps 401-404 and the resulting technical effects can be found in [reference needed]. Figure 2 Steps 201-204 in the corresponding embodiments will not be repeated here.
[0115] Step 405: Obtain item adjustment information for the above target scene tags.
[0116] In some embodiments, the executing entity (e.g. Figure 1 The electronic device 101 shown can acquire item adjustment information for the aforementioned target scene label.
[0117] Step 406: Based on the above item adjustment information, adjust the order information of the above items to obtain the adjusted order information.
[0118] In some embodiments, the execution entity can process the item order information based on the item adjustment information to obtain adjusted order information. The item adjustment information refers to the information that sorts the item set corresponding to the item information set under the target scene tag. For example, the item adjustment information could be the removal information of the target item or the addition information of the target item.
[0119] In practice, the item order information is ["sun umbrella", "apple", "flower pot"]. Item adjustment information could be: move the newly added item "beach" to the top. Therefore, the adjusted order information would be ["beach", "sun umbrella", "apple", "flower pot"].
[0120] Step 407: Send the adjusted sequence information to the target terminal.
[0121] In some embodiments, the executing entity may send the adjusted sequence information to the target terminal. Specifically, the target terminal may be, but is not limited to, at least one of the following: a target display terminal, a target storage terminal, and a target rendering terminal. The target display terminal may be a terminal that displays the adjusted sequence information. The target storage terminal may be a terminal that stores the adjusted sequence information. The target rendering terminal may be a terminal that renders an item information page based on the adjusted sequence information.
[0122] from Figure 4 It can be seen from this that, with Figure 2 Compared to the description of some corresponding embodiments, Figure 4The flow 400 of the information generation method in some corresponding embodiments further emphasizes the specific steps for subsequent processing of item adjustment information. Therefore, the solutions described in these embodiments can dynamically adjust the item order information based on the item adjustment information. The adjusted order information is then sent to the target terminal for subsequent use in scene activities corresponding to the target scene tag.
[0123] Further reference Figure 5 As an implementation of the methods shown in the above figures, this disclosure provides some embodiments of an information generation apparatus, which are similar to... Figure 2 Corresponding to the method embodiments shown, the device can be specifically applied to various electronic devices.
[0124] like Figure 5 As shown, an information generation device 500 includes: a first generation unit 501, a second generation unit 502, a determining unit 503, and a third generation unit 504. The first generation unit 501 is configured to generate at least one positive keyword and at least one negative keyword associated with a pre-acquired target scene label; the second generation unit 502 is configured to generate a label vector representing feature information of the target scene label based on the at least one positive keyword; the determining unit 503 is configured to determine, using an attention mechanism, the item vector corresponding to each item in a pre-acquired item information set based on the at least one negative keyword and the at least one positive keyword, thereby obtaining an item vector set; and the third generation unit 504 is configured to generate item order information for the item information set based on the item vector set and the label vector.
[0125] In some optional implementations of some embodiments, the second generation unit 502 may be further configured to: perform vector transformation processing on each of the at least one positive keyword to generate a positive keyword vector, thereby obtaining a positive keyword vector set; perform weighted summation on the positive keyword vectors included in the positive keyword vector set to obtain a first weighted summation vector; and generate the tag vector based on the first weighted summation vector.
[0126] In some optional implementations of certain embodiments, the second generation unit 502 may be further configured to: determine item information whose association with the target scene tag satisfies a preset association condition, as scene-related item information, to obtain at least one scene-related item information; for each scene-related item information in the at least one scene-related item information, perform a scene-related item vector generation step: determine the scene-related item feature information set corresponding to the scene-related item information; perform vector transformation processing on each scene-related item feature information in the scene-related item feature information set to generate a scene-related item feature vector, to obtain a scene-related item feature vector set; generate a scene-related item vector corresponding to the scene-related item information based on the scene-related item feature vector set; and generate the tag vector based on the obtained scene-related item vector set and the first weighted sum vector.
[0127] In some optional implementations of certain embodiments, the determining unit 503 may be further configured to: determine the item feature vector set corresponding to the item information; and, based on the item feature vector set, perform an item vector generation step: perform vector transformation processing on each negative keyword in the at least one negative keyword to generate a negative keyword vector, thereby obtaining a negative keyword vector set; perform weighted summation processing on the negative keyword vectors included in the negative keyword vector set to obtain a second weighted summation vector; and, based on the second weighted summation vector and the first weighted summation vector, use an attention mechanism to determine the score information corresponding to each item feature vector in the item feature vector set; multiply each item feature vector in the item feature vector set with the corresponding score information to generate a multiplied vector, thereby obtaining a multiplied vector set; and add the multiplied vectors included in the multiplied vector set to obtain a summed vector, which serves as the item vector corresponding to the item information.
[0128] In some optional implementations of certain embodiments, the determining unit 503 may be further configured to: multiply the item feature vector by the second weighted summation vector to obtain a negative multiplication result; multiply the item feature vector by the first weighted summation vector to obtain a positive multiplication result; determine the result in which the values of the negative multiplication result and the positive multiplication result satisfy the numerical condition as a candidate result; and determine the score information corresponding to the item feature vector based on the candidate result and the attention function corresponding to the attention mechanism.
[0129] In some optional implementations of some embodiments, the third generation unit 504 may be further configured to: determine the vector similarity between each item vector in the item vector set and the tag vector; and sort the item information included in the item information set according to the vector similarity corresponding to each item information in the item information set to obtain the item order information.
[0130] In some optional implementations of certain embodiments, the above-mentioned device 500 further includes: an item adjustment information acquisition unit, an information processing unit, and a sending unit (not shown in the figure). The item adjustment information acquisition unit can be configured to acquire item adjustment information for the target scene tag. The information processing unit can be configured to perform sequence information processing on the item sequence information based on the item adjustment information to obtain adjusted sequence information. The sending unit can be configured to send the adjusted sequence information to the target terminal.
[0131] It is understandable that the units described in the device 500 are related to the reference. Figure 2 The steps in the described method correspond accordingly. Therefore, the operations, features, and beneficial effects described above for the method also apply to the device 500 and the units contained therein, and will not be repeated here.
[0132] The following is for reference. Figure 6 It illustrates electronic devices suitable for implementing some embodiments of this disclosure (e.g., Figure 1 A schematic diagram of the structure of electronic device 101)600 in the middle. Figure 6 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this disclosure.
[0133] like Figure 6 As shown, electronic device 600 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 601, which can perform various appropriate actions and processes according to a program stored in read-only memory (ROM) 602 or a program loaded from storage device 608 into random access memory (RAM) 603. RAM 603 also stores various programs and data required for the operation of electronic device 600. Processing device 601, ROM 602, and RAM 603 are interconnected via bus 604. Input / output (I / O) interface 605 is also connected to bus 604.
[0134] Typically, the following devices can be connected to I / O interface 605: input devices 606 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 607 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 608 including, for example, magnetic tapes, hard disks, etc.; and communication devices 609. Communication device 609 allows electronic device 600 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 6 An electronic device 600 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively. Figure 6 Each box shown can be associated with a scene and a device, or multiple devices can be associated with a scene as needed.
[0135] In particular, according to some embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, some embodiments of this disclosure include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device 609, or installed from a storage device 608, or installed from a ROM 602. When the computer program is executed by the processing device 601, it performs the functions defined above in the methods of some embodiments of this disclosure.
[0136] It should be noted that, in some embodiments of this disclosure, the computer-readable medium described above may be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. 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 thereof. More specific examples of a 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, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In some embodiments of this disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device. In some embodiments of this disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0137] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0138] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device. The aforementioned computer-readable medium carries one or more programs that, when executed by the electronic device, cause the electronic device to: generate at least one positive keyword and at least one negative keyword associated with a pre-acquired target scene label; generate a label vector representing feature information of the target scene label based on the at least one positive keyword; determine, using an attention mechanism, the item vector corresponding to each item in a pre-acquired item information set based on the at least one negative keyword and the at least one positive keyword, thereby obtaining an item vector set; and generate item order information for the item information set based on the item vector set and the label vector.
[0139] Computer program code for performing operations of some embodiments of this disclosure can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, and conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0140] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may be associated with a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0141] The units described in some embodiments of this disclosure can be implemented in software or hardware. The described units can also be housed in a processor; for example, a processor may be described as including a first generation unit, a second generation unit, a determining unit, and a third generation unit. The names of these units do not necessarily limit the specific unit; for example, the first generation unit may be described as "a unit that generates at least one positive keyword and at least one negative keyword associated with a pre-acquired target scene label."
[0142] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0143] The above description is merely a selection of preferred embodiments of this disclosure and an explanation of the technical principles employed. Those skilled in the art should understand that the scope of the invention involved in the embodiments of this disclosure is not limited to technical solutions formed by specific combinations of the above-described technical features, but should also cover other technical solutions formed by arbitrary combinations of the above-described technical features or their equivalents without departing from the above-described inventive concept. For example, technical solutions formed by substituting the above-described features with (but not limited to) technical features with similar functions disclosed in the embodiments of this disclosure.
Claims
1. An information generation method, comprising: Generate at least one positive keyword and at least one negative keyword associated with the pre-acquired target scene tags; Based on the at least one positive keyword, generate a label vector representing the feature information of the target scene label; Based on the at least one negative keyword and the at least one positive keyword, an attention mechanism is used to determine the item vector corresponding to each item information in the pre-acquired item information set, thereby obtaining an item vector set; Based on the item vector set and the tag vector, generate item order information for the item information set.
2. The method according to claim 1, wherein, The step of generating a label vector representing feature information of the target scene label based on the at least one positive keyword includes: Each positive keyword in the at least one positive keyword is subjected to vector transformation processing to generate a positive keyword vector, thereby obtaining a positive keyword vector set; The positive keyword vectors included in the positive keyword vector set are weighted and summed to obtain the first weighted sum vector; The label vector is generated based on the first weighted summation vector.
3. The method according to claim 2, wherein, The step of generating the label vector based on the first weighted summation vector includes: Item information whose association with the target scene tag satisfies the preset association conditions is identified as scene-associated item information, thus obtaining at least one scene-associated item information; For each scene-related item in the at least one scene-related item information, perform the scene-related item vector generation step: Determine the set of scene-related item feature information corresponding to the scene-related item information; Each scene-related item feature information in the scene-related item feature information set is subjected to vector transformation processing to generate a scene-related item feature vector, thus obtaining a scene-related item feature vector set; Based on the set of feature vectors of scene-related items, generate scene-related item vectors corresponding to the scene-related item information; The tag vector is generated based on the obtained scene-related item vector set and the first weighted sum vector.
4. The method according to claim 2, wherein, The step of determining the item vector corresponding to each item in the pre-acquired item information set using an attention mechanism based on the at least one negative keyword and the at least one positive keyword includes: Determine the set of item feature vectors corresponding to the item information; Based on the item feature vector set, perform the item vector generation step: Each negative keyword in the at least one negative keyword is subjected to vector transformation processing to generate a negative keyword vector, thereby obtaining a negative keyword vector set; The negative keyword vectors included in the negative keyword vector set are weighted and summed to obtain a second weighted sum vector; Based on the second weighted summation vector and the first weighted summation vector, an attention mechanism is used to determine the score information corresponding to each item feature vector in the item feature vector set; Each item feature vector in the item feature vector set is multiplied by its corresponding score information to generate a multiplication vector, thus obtaining a set of multiplication vectors. The multiplication vectors included in the set of multiplication vectors are added together to obtain a summed vector, which serves as the item vector corresponding to the item information.
5. The method according to claim 4, wherein, The step of determining the score information corresponding to each item feature vector in the item feature vector set using an attention mechanism based on the second weighted summation vector and the first weighted summation vector includes: Multiply the item feature vector by the second weighted summation vector to obtain the negative multiplication result; Multiply the item feature vector by the first weighted summation vector to obtain the front-end multiplication result; The result in which the values of the negative multiplication result and the positive multiplication result satisfy the numerical condition is determined as the candidate result; Based on the candidate results and the attention function corresponding to the attention mechanism, the score information corresponding to the item feature vector is determined.
6. The method according to claim 1, wherein, The step of generating item order information for the item information set based on the item vector set and the tag vector includes: Determine the vector similarity between each item vector in the item vector set and the tag vector; Based on the similarity of the vector corresponding to each item in the item information set, the item information included in the item information set is sorted to obtain the item order information.
7. The method according to claim 1, wherein, The method further includes: Obtain item adjustment information for the target scene tag; Based on the item adjustment information, the item sequence information is adjusted to obtain the adjusted sequence information; The adjusted sequence information is sent to the target terminal.
8. An information generation device, comprising: The first generation unit is configured to generate at least one positive keyword and at least one negative keyword associated with a pre-acquired target scene label; The second generation unit is configured to generate a label vector representing feature information of the target scene label based on the at least one positive keyword; The determining unit is configured to determine the item vector corresponding to each item information in the pre-acquired item information set based on the at least one negative keyword and the at least one positive keyword, using an attention mechanism, to obtain an item vector set; The third generation unit is configured to generate item order information for the item information set based on the item vector set and the tag vector.
9. An electronic device, comprising: One or more processors; Storage device, on which one or more programs are stored, When the one or more programs are executed by the one or more processors, the one or more processors implement the method as described in any one of claims 1-7.
10. A computer-readable medium having a computer program stored thereon, wherein, When the program is executed by the processor, it implements the method as described in any one of claims 1-7.
Citation Information
Patent Citations
Method and device for generating information
CN112287173A
Large-scale image tagging using image-to-topic embedding
US20180267997A1