Model generation method, information generation method, device and equipment
By using an attention-based feature extraction model that combines historical and current search terms to generate item category information, the problem of inaccurate category intent recognition caused by semantic ambiguity in the LSTM model is solved, and more accurate item category information generation is achieved.
Patent Information
- Application Number
- CN202410564746.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-08
- Publication Date
- 2025-11-14
AI Technical Summary
In existing technologies, the search term intent recognition based on LSTM models suffers from semantic ambiguity, resulting in inaccurate category intent recognition information.
A feature extraction model based on the first and second attention mechanisms is adopted. By combining the historical search term set and the current search term, item category information is generated through initial feature extraction and prediction layers. The model is trained using training data to achieve accurate generation of item category information.
By combining historical and current search terms for semantic disambiguation, the ability to predict item category information with personalization has been improved, resulting in more accurate category intent recognition.
Smart Images

Figure CN120951998A_ABST
Abstract
Description
Technical Field
[0001] The embodiments disclosed herein relate to the field of computer technology, and more specifically to model generation methods, information generation methods, apparatus, and devices. Background Technology
[0002] Currently, intent recognition of user-input search terms has become a major development direction in various fields. For example, in e-commerce, this intent recognition can effectively enhance the accuracy of product recall. The common approach for intent recognition of input search terms is to use a Long Short-Term Memory (LSTM) network model to generate category intent recognition information for the search terms.
[0003] However, the inventors discovered that when using the above method to generate intent recognition information, the following technical problems often arise:
[0004] The search terms have semantic ambiguity, which makes the generated category intent recognition information inaccurate.
[0005] The information disclosed in this background section is only intended to enhance the understanding of the background of the inventive concept, and therefore may contain information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0006] 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.
[0007] Some embodiments of this disclosure provide model generation methods, information generation methods, apparatuses, electronic devices, computer-readable media, and program products to address the technical problems mentioned in the background section above.
[0008] In a first aspect, some embodiments of this disclosure provide a model generation method, comprising: acquiring training data, wherein the training data includes: a historical search term set, a current search term, and actual item category information; inputting the historical search term set and the current search term into a first initial feature extraction model based on a first attention mechanism to generate a historical word feature information set and the current word feature information, wherein the initial item category information generation model includes: the first initial feature extraction model based on the first attention mechanism, a second initial feature extraction model based on a second attention mechanism, and an initial item category information prediction layer; generating attention feature information based on the historical word feature information set and the current word feature information, using the second initial feature extraction model based on the second attention mechanism; inputting the attention feature information into the initial item category information prediction layer to generate item category prediction information; and generating an item category information generation model based on the item category prediction information and the initial item category information generation model.
[0009] Optionally, the training data may further include at least one of the following: user feature data, historical click category dataset; and the generation of attention feature information using the second initial feature extraction model based on the second attention mechanism, based on the historical word feature information set and the current word feature information, including: generating user representation feature information for the user feature data; generating historical click category feature information corresponding to each historical click category data in the historical click category dataset, to obtain a historical click category feature information set; and inputting the user representation feature information and / or the historical word feature information set, the historical word feature information set, and the current word feature information into the second initial feature extraction model to generate attention feature information.
[0010] Secondly, some embodiments of this disclosure provide a model generation apparatus, comprising: a first acquisition unit configured to acquire training data, wherein the training data includes: a historical search term set, a current search term, and actual item category information; a first input unit configured to input the historical search term set and the current search term into a first initial feature extraction model based on a first attention mechanism, respectively, to generate a historical word feature information set and the current word feature information, wherein the initial item category information generation model includes: the first initial feature extraction model based on the first attention mechanism, a second initial feature extraction model based on a second attention mechanism, and an initial item category information prediction layer; a first generation unit configured to generate attention feature information based on the historical word feature information set and the current word feature information, using the second initial feature extraction model based on the second attention mechanism; a second input unit configured to input the attention feature information into the initial item category information prediction layer to generate item category prediction information; and a second generation unit configured to generate an item category information generation model based on the item category prediction information and the initial item category information generation model.
[0011] Optionally, the training data may further include at least one of the following: user feature data, historical click category dataset; and the first generation unit may be configured to: generate user representation feature information for the user feature data; generate historical click category feature information corresponding to each historical click category data in the historical click category dataset, to obtain a historical click category feature information set; input the user representation feature information and / or the historical word feature information set and the current word feature information from the historical click category feature information set into the second initial feature extraction model to generate attention feature information. Thirdly, some embodiments of this disclosure provide a method for generating item category intention information, including: obtaining first user association information for a target user, wherein the first user association information includes: a historical search term set and a current search term; inputting the historical search term set and the current search term into a pre-trained item category information generation model to generate item category prediction information as target item category prediction information, wherein the item category information generation model is generated based on the model generation method of the first aspect; and generating item category intention information for the target user based on the target item category prediction information.
[0012] Optionally, generating item category intention information for the target user based on the target item category prediction information includes: obtaining second user association information; inputting the second user association information into a pre-trained item category intention generation model to generate item category intention prediction information; and generating the item category intention information based on the target item category prediction information and the item category intention prediction information.
[0013] Optionally, the aforementioned first user-related information further includes at least one of the following: user feature data, historical click category dataset; and the aforementioned inputting the aforementioned historical search term set and the aforementioned current search term into a pre-trained item category information generation model to generate item category prediction information includes: inputting the aforementioned user feature data and / or the aforementioned historical click category dataset, the aforementioned historical search term set and the aforementioned current search term into a pre-trained item category information generation model to generate item category prediction information.
[0014] Optionally, the above method further includes: sending at least one item category information corresponding to the above item category intention information to the recommended item information generation terminal.
[0015] Fourthly, some embodiments of this disclosure provide an information generation apparatus, comprising: a second acquisition unit configured to acquire first user association information for a target user, wherein the first user association information includes: a historical search term set and a current search term; a third generation unit configured to input the historical search term set and the current search term into a pre-trained item category information generation model to generate item category prediction information as target item category prediction information, wherein the item category information generation model is generated based on the model generation method of the first aspect; and a fourth generation unit configured to generate item category intention information for the target user based on the target item category prediction information.
[0016] Optionally, the third generation unit can be configured to: obtain second user association information; input the second user association information into a pre-trained item category intention generation model to generate item category intention prediction information; and generate the item category intention information based on the target item category prediction information and the item category intention prediction information.
[0017] Optionally, the aforementioned first user association information further includes at least one of the following: user feature data, historical click category dataset; and the third generation unit can be configured to: input the aforementioned user feature data and / or the aforementioned historical click category dataset, the aforementioned historical search term set and the aforementioned current search term into a pre-trained item category information generation model to generate item category prediction information.
[0018] Optionally, the device further includes: sending at least one item category information corresponding to the above-mentioned item category intention information to the recommended item information generation terminal.
[0019] Fifthly, some embodiments of this disclosure provide an electronic device, including: one or more processors; and 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 of the implementations of the first and third aspects.
[0020] Sixthly, 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 of the implementations of the first and third aspects.
[0021] In a seventh aspect, some embodiments of this disclosure provide a computer program product, including a computer program that, when executed by a processor, implements the methods described in any of the implementations of the first and third aspects above.
[0022] The above embodiments of this disclosure have the following beneficial effects: By using the model generation method of some embodiments of this disclosure to generate a model based on item category information, item category information can be generated accurately. Specifically, the reason why the relevant item category information is not accurate enough is that the search terms have semantic ambiguity, resulting in inaccurate category intent recognition information. Based on this, the model generation method of some embodiments of this disclosure first acquires training data. The training data includes: a historical search term set, the current search term, and actual item category information. Here, the acquired training data is used for model training of the subsequent initial item category information generation model. Since the training data includes a historical search term set and the current search term, the initial item category information generation model can not only learn more semantic information about the current search term, but also learn semantic information about the historical search term set, thereby achieving feature information aggregation. From these historical search term sets, the learning of user preference features related to the current search term can be strengthened, and semantic disambiguation can be performed by combining them with the current search term, improving the personalized prediction ability of subsequent item category information. Then, the aforementioned historical search term set and the current search term are respectively input into the first initial feature extraction model based on the first attention mechanism to generate a historical word feature information set. The initial item category information generation model includes: the aforementioned first initial feature extraction model based on the first attention mechanism, a second initial feature extraction model based on the second attention mechanism, and an initial item category information prediction layer. Here, the first initial feature extraction model based on the first attention mechanism can accurately and personalizedly extract word feature information. Next, based on the aforementioned historical word feature information set and the current word feature information, attention feature information is generated using the aforementioned second initial feature extraction model based on the second attention mechanism. Here, the second initial feature extraction model based on the second attention mechanism can accurately extract and fuse feature information from the historical word feature information set and the current word feature information. Furthermore, the aforementioned attention feature information is input into the aforementioned initial item category information prediction layer to accurately generate item category prediction information. Finally, based on the aforementioned item category prediction information and the aforementioned initial item category information generation model, an accurate item category information generation model is generated. In summary, by adding historical search term sets to the training data, semantic disambiguation can be achieved by combining them with the current search term. Furthermore, by using a first initial feature extraction model based on a first attention mechanism and a second initial feature extraction model based on a second attention mechanism, accurate extraction and fusion of word feature information from historical search term sets and the current search term can be achieved. Attached Figure Description
[0023] 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.
[0024] Figure 1 This is a schematic diagram illustrating an application scenario of a model generation method according to some embodiments of the present disclosure;
[0025] Figure 2 This is a flowchart of some embodiments of the model generation method according to this disclosure;
[0026] Figure 3 These are flowcharts of other embodiments of the model generation method according to this disclosure;
[0027] Figure 4 This is a flowchart of some embodiments of the information generation method according to this disclosure;
[0028] Figure 5 This is a schematic diagram of the structure of some embodiments of the model generation apparatus according to the present disclosure;
[0029] Figure 6 These are schematic diagrams illustrating the structure of some embodiments of the information generation apparatus according to this disclosure;
[0030] Figure 7 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] Before performing any of the operations involving the collection, storage, or use of user personal information (such as the first user's associated information) disclosed in this disclosure, the relevant organizations or individuals shall fulfill their obligations, including conducting personal information security impact assessments, informing the personal information subjects, and obtaining prior authorization and consent from the personal information subjects.
[0037] This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.
[0038] Figure 1 This is a schematic diagram illustrating an application scenario of a model generation method according to some embodiments of the present disclosure.
[0039] exist Figure 1 In the application scenario, firstly, the electronic device 101 can acquire training data 102. This training data 102 includes: a historical search term set 103, a current search term 104, and actual item category information. In this application scenario, the historical search term set 103 may include "summer clothes" and "pure cotton." The current search term 104 may be "top." Then, the electronic device 101 can input the historical search term set 103 and the current search term 104 into a first initial feature extraction model 1071 based on a first attention mechanism to generate a historical word feature information set 108. The initial item category information generation model 107 includes: the first initial feature extraction model 1071 based on the first attention mechanism, a second initial feature extraction model 1072 based on a second attention mechanism, and an initial item category information prediction layer 1073. Next, the electronic device 101 can generate attention feature information 106 based on the historical word feature information set 108 and the current word feature information 109, using the second initial feature extraction model 1072 based on the second attention mechanism. Furthermore, the electronic device 101 can input the aforementioned attention feature information 106 into the aforementioned initial item category information prediction layer 1073 to generate item category prediction information 105. In this application scenario, the item category prediction information 105 can be "jacket category", "cashmere sweater category", or "short coat category". Finally, the electronic device 101 can generate an item category information generation model based on the aforementioned item category prediction information 105 and the aforementioned initial item category information generation model 107.
[0040] 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.
[0041] 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.
[0042] Continue to refer to Figure 2 The diagram illustrates a flow 200 of some embodiments of a model generation method according to the present disclosure. The model generation method includes the following steps:
[0043] Step 201: Obtain training data.
[0044] In some embodiments, the execution entity of the above model generation method (e.g. Figure 1 The electronic device 101 shown can acquire training data via a wired or wireless connection. The training data can be data samples used for model training in subsequent initial item category information generation models. The training data includes: a historical search term set, the current search term, and actual item category information. Historical search terms can be the words searched in the past by the user corresponding to the current search term. The current search term can be the word currently entered by the user. For example, in the e-commerce field, historical search terms in the historical search term set could be "summer clothes." The current search term could be "tops." Actual item category information can be a set of recommended item category information corresponding to the current search term. Recommended item category information can be the item category information of recommended items. For example, for the current search term "tops," the actual item category information could include: sun protection tops, shirts, and jackets.
[0045] It should be noted that the number of historical search terms included in the historical search term set can be preset. If the number of historical search terms in the training data's historical search term set is less than a predetermined threshold, term filling can be performed.
[0046] Step 202: Input the above-mentioned historical search term set and the above-mentioned current search term into the first initial feature extraction model based on the first attention mechanism to generate the historical word feature information set and the current word feature information.
[0047] In some embodiments, the execution entity can input the historical search term set and the current search term into a first initial feature extraction model based on a first attention mechanism, respectively, to generate a historical word feature information set and a current word feature information set. The initial item category information generation model includes: the first initial feature extraction model based on the first attention mechanism, a second initial feature extraction model based on a second attention mechanism, and an initial item category information prediction layer. The initial item category information generation model can be an item category information generation model that has not yet finished training. The item category information generation model can be a model that generates item category information. Item category information can be at least one item category of item information to be recommended to the user who inputs the current search term. The first initial feature extraction model can be a first feature extraction model that has not yet finished training. The first feature extraction model can be a model that extracts word feature information. In practice, the first feature extraction model based on the first attention mechanism can be a single Transformer layer. That is, the first feature extraction model can include: a multi-head attention mechanism (MultiHead) model and a feedforward neural network (FNN) model. The Transformer layer has a vector dimension of 1024 and 8 multi-head attention points. For each input word, a "[CLS]" embedding representing semantic features is concatenated, and the output corresponding to this embedding is selected to obtain the semantic representations of n historical search terms. All input words share the same Transformer layer, i.e., use the same parameters. There is a one-to-one correspondence between the historical word feature information in the historical word feature information set and the historical search terms in the historical search term set. Historical word feature information can represent the semantic features of historical search terms. Current word feature information can represent the semantic features of the current search term. The second initial feature extraction model can be a second feature extraction model that has not yet finished training. In practice, the second initial feature extraction model based on the second attention mechanism can be a single Transformer layer. The Transformer layer has a vector dimension of 512 and 2 multi-head attention points. The initial item category information prediction layer can be an item category information prediction layer that has not yet finished training. The item category information prediction layer can be a network layer that outputs item category information. Specifically, the item category information prediction layer can include linear layers and activation function layers. The activation function corresponding to the activation function layer can be the Sigmoid function.
[0048] Step 203: Based on the above-mentioned historical word feature information set and the above-mentioned current word feature information, attention feature information is generated using the above-mentioned second initial feature extraction model based on the second attention mechanism.
[0049] In some embodiments, the execution entity may generate attention feature information based on the historical word feature information set and the current word feature information, using the second initial feature extraction model based on the second attention mechanism. The attention feature information includes fused feature information representing the historical word feature information set and the current word feature information.
[0050] As an example, the aforementioned execution entity can directly input the historical word feature information set and the current word feature information into the second initial feature extraction model based on the second attention mechanism to generate attention feature information.
[0051] Step 204: Input the above attention feature information into the above initial item category information prediction layer to generate item category prediction information.
[0052] In some embodiments, the executing entity may input the attention feature information into the initial item category information prediction layer to generate item category prediction information. The item category prediction information may be prediction information about item categories.
[0053] Step 205: Generate an item category information generation model based on the above item category prediction information and the above initial item category information generation model.
[0054] In some embodiments, the executing entity may generate an item category information generation model based on the item category prediction information and the initial item category information generation model. The item category information generation model may be a trained neural network model.
[0055] As an example, firstly, the aforementioned execution entity can generate loss information between the predicted item category information and the corresponding actual item category information. This loss information characterizes the information difference between the predicted item category information and the corresponding actual item category information. The corresponding actual item category information can be the actual item category information corresponding to the target training data. For example, the execution entity can use CrossEntropy Loss to calculate the loss function to generate loss information for the predicted item category information and the corresponding actual item category information. Then, in response to determining that the loss information is less than a target value, the initial item category information generation model is determined as the item category information generation model. In response to determining that the loss information is greater than or equal to the target value, the initial item category information generation model is updated through backpropagation based on the loss information to generate an updated item category information generation model. Finally, training data is acquired again, and based on the acquired training data and the updated item category information generation model, the model is updated again to generate the final item category information generation model.
[0056] The above embodiments of this disclosure have the following beneficial effects: By using the model generation method of some embodiments of this disclosure to generate a model based on item category information, item category information can be generated accurately. Specifically, the reason why the relevant item category information is not accurate enough is that the search terms have semantic ambiguity, resulting in inaccurate category intent recognition information. Based on this, the model generation method of some embodiments of this disclosure first acquires training data. The training data includes: a historical search term set, the current search term, and actual item category information. Here, the acquired training data is used for model training of the subsequent initial item category information generation model. Since the training data includes a historical search term set and the current search term, the initial item category information generation model can not only learn more semantic information about the current search term, but also learn semantic information about the historical search term set, thereby achieving feature information aggregation. From these historical search term sets, the learning of user preference features related to the current search term can be strengthened, and semantic disambiguation can be performed by combining them with the current search term, improving the personalized prediction ability of subsequent item category information. Then, the aforementioned historical search term set and the current search term are respectively input into the first initial feature extraction model based on the first attention mechanism to generate a historical word feature information set. The initial item category information generation model includes: the aforementioned first initial feature extraction model based on the first attention mechanism, a second initial feature extraction model based on the second attention mechanism, and an initial item category information prediction layer. Here, the first initial feature extraction model based on the first attention mechanism can accurately and personalizedly extract word feature information. Next, based on the aforementioned historical word feature information set and the current word feature information, attention feature information is generated using the aforementioned second initial feature extraction model based on the second attention mechanism. Here, the second initial feature extraction model based on the second attention mechanism can accurately extract and fuse feature information from the historical word feature information set and the current word feature information. Furthermore, the aforementioned attention feature information is input into the aforementioned initial item category information prediction layer to accurately generate item category prediction information. Finally, based on the aforementioned item category prediction information and the aforementioned initial item category information generation model, an accurate item category information generation model is generated. In summary, by adding historical search term sets to the training data, semantic disambiguation can be achieved by combining them with the current search term. Furthermore, by using a first initial feature extraction model based on a first attention mechanism and a second initial feature extraction model based on a second attention mechanism, accurate extraction and fusion of word feature information from historical search term sets and the current search term can be achieved.
[0057] Further reference Figure 3 The diagram illustrates a flow 300 of another embodiment of the model generation method according to this disclosure. The model generation method includes the following steps:
[0058] Step 301: Obtain training data.
[0059] Step 302: Input the above-mentioned historical search term set and the above-mentioned current search term into the first initial feature extraction model based on the first attention mechanism to generate the historical word feature information set and the current word feature information.
[0060] Step 303: Generate user representation feature information based on the above user feature data.
[0061] In some embodiments, the executing entity (e.g. Figure 1 The electronic device 101 shown can generate user representation feature information based on the aforementioned user feature data. The user feature data can be data related to user characteristics. Specifically, user characteristics can be, but are not limited to, at least one of the following: user gender, user age group, and user geographical location. The user representation feature information can represent the semantic content information of the user feature data. Specifically, the user representation feature information can be information in vector form. The user feature data can be discrete information that has been segmented and discretized.
[0062] It should be noted that user characteristic data can be obtained in real time through online data tracking.
[0063] Furthermore, user characteristic data, including user gender, age group, and geographic location, can be predicted using relevant neural network models, thus possessing timeliness.
[0064] As an example, firstly, the aforementioned execution entity can obtain a vector table set for the user feature set. There is a one-to-one correspondence between the user features in the user feature set and the vector tables in the vector table set. Each vector table can include the vector representation of each feature value corresponding to a user feature. Then, at least one user feature corresponding to the user feature data is determined. Next, based on at least one vector table corresponding to the at least one user feature, the vector representation information of the associated data corresponding to the at least one user feature is determined. Finally, the obtained vector representation information set is fused to generate user representation feature information.
[0065] Step 304: Generate historical click category feature information corresponding to each historical click category data in the above historical click category dataset, and obtain the historical click category feature information set.
[0066] In some embodiments, the aforementioned executing entity can generate historical click category feature information corresponding to each historical click category data in the aforementioned historical click category dataset, thereby obtaining a historical click category feature information set. The historical click category dataset can be a set of data categories corresponding to the datasets historically clicked by the user inputting the current search term. For example, the dataset historically clicked by the user can be a dataset for each item. The data category set can be the respective item categories corresponding to each item. The historical click category feature information can characterize the semantic information of the data content features corresponding to the historical click category data.
[0067] It should be noted that the number of click categories corresponding to the historical click category data is less than the predetermined number of categories. If the number of click categories corresponding to the historical click category data is less than the predetermined number of categories, the click categories corresponding to the historical click category data will be supplemented.
[0068] As an example, the aforementioned executing entity can use the category representation vector table to determine the historical click category feature information corresponding to each historical click category data in the aforementioned historical click category dataset, thereby obtaining a set of historical click category feature information. The category representation vector table represents the correspondence between item categories and their corresponding category representation vectors.
[0069] Step 305: Input the above-mentioned user representation feature information and / or the above-mentioned historical click category feature information set, the above-mentioned historical word feature information set, and the above-mentioned current word feature information into the above-mentioned second initial feature extraction model to generate attention feature information.
[0070] In some embodiments, the execution entity may input the user representation feature information and / or the historical click category feature information set, the historical word feature information set, and the current word feature information into the second initial feature extraction model to generate attention feature information.
[0071] Step 306: Input the above attention feature information into the above initial item category information prediction layer to generate item category prediction information.
[0072] Step 307: Generate an item category information generation model based on the above item category prediction information and the above initial item category information generation model.
[0073] In some embodiments, the specific implementation of steps 301, 302, and 306-307 and their resulting technical effects can be found in [reference needed]. Figure 2 Steps 201, 202, 204, and 205 in the corresponding embodiments will not be repeated here.
[0074] from Figure 3 It can be seen from this that, with Figure 2Compared to the description of some corresponding embodiments, Figure 3 In some corresponding embodiments, the model generation method process 300 adds user feature data to the training data, thereby effectively improving the model's ability to search for personalized category intents of users with different attribute information, and enabling the model generated using item category information to generate item category information more accurately.
[0075] Continue to refer to Figure 4 The flowchart 400 illustrates some embodiments of the information generation method according to this disclosure. The information generation method includes the following steps:
[0076] Step 401: Obtain the first user association information for the target user.
[0077] In some embodiments, the entity executing the above-described method for generating item category intent information (e.g., an electronic device) can acquire first user association information for a target user via wired or wireless means. The target user can be a user who inputs the current search term and is to generate item category information. The first user association information includes: a historical search term set and the current search term. The first user association information can be user association information that is associated with the target user. The historical search term set can be a set of terms from the target user's historical searches.
[0078] Step 402: Input the above-mentioned historical search term set and the above-mentioned current search term into the pre-trained item category information generation model to generate item category prediction information, which is used as the target item category prediction information.
[0079] In some embodiments, the executing entity may input the historical search term set and the current search term into a pre-trained item category information generation model to generate item category prediction information, which serves as the target item category prediction information. The item category information generation model is generated based on a model generation method.
[0080] In some optional implementations of some embodiments, the aforementioned first user association information further includes at least one of the following: user feature data, historical click category dataset.
[0081] Optionally, the aforementioned executing entity may input the aforementioned user feature data and / or the aforementioned historical click category dataset, the aforementioned historical search term set, and the aforementioned current search term into a pre-trained item category information generation model to predict biological category information.
[0082] As an example, the aforementioned execution entity can input the aforementioned user feature data, historical search term set, and current search term into a pre-trained item category information generation model to generate item category prediction information.
[0083] As another example, the aforementioned entity can input the user's click category dataset, historical search term set, and current search term into the item category information generation model to generate item category prediction information.
[0084] Step 403: Based on the above target item category prediction information, generate item category preference information for the above target users.
[0085] In some embodiments, the executing entity can generate item category preference information for the target user based on the target item category prediction information. This item category preference information can represent the various item categories that the target user is interested in.
[0086] As an example, the aforementioned implementing entity can determine the target item category prediction information as item category intention information.
[0087] In some optional implementations of certain embodiments, generating item category preference information for the target user based on the target item category prediction information may include the following steps:
[0088] The first step is to obtain the second user's associated information.
[0089] The second user association information can be user line information associated with the target user. The user information included in the first user association information and the second user association information are different.
[0090] The second step involves inputting the aforementioned second user association information into a pre-trained item category intention generation model to generate item category intention prediction information. This model can be a non-personalized category prediction model. In practice, it can be an LSTM (Long Short-Term Memory) model. The item category intention prediction information can represent the target user's intention information regarding item categories.
[0091] The third step is to generate the above-mentioned item category intention information based on the above-mentioned target item category prediction information and the above-mentioned item category intention prediction information.
[0092] As an example, the aforementioned implementing entity can fuse the target item category prediction information and the item category intention prediction information to generate fused information, which serves as the item category intention information.
[0093] As another example, the aforementioned implementing entity can use the item category intention prediction information to verify the target item prediction category information. Upon successful verification, the second item prediction category information is determined as the item category intention information.
[0094] In some optional implementations of certain embodiments, after step 403, the steps further include:
[0095] The aforementioned implementing entity can send at least one item category information corresponding to the aforementioned item category preference information to the recommended item information generation terminal. The recommended item information generation terminal can generate terminal information corresponding to the item category information.
[0096] The above embodiments of this disclosure have the following beneficial effects: By using the item category intention information generation method of some embodiments of this disclosure and the item category information generation model, item category information can be generated accurately.
[0097] Further reference Figure 5 As an implementation of the methods shown in the above figures, this disclosure provides some embodiments of a model generation apparatus, which are similar to... Figure 2 Corresponding to the method embodiments shown, this model generation apparatus can be specifically applied to various electronic devices.
[0098] like Figure 5 As shown, a model generation device 500 includes: a first acquisition unit 501, a first input unit 502, a first generation unit 503, a second input unit 504, and a second generation unit 505. The system includes the following components: a first acquisition unit 501, configured to acquire training data, which includes a historical search term set, a current search term, and actual item category information; a first input unit 502, configured to input the historical search term set and the current search term into a first initial feature extraction model based on a first attention mechanism, respectively, to generate a historical word feature information set and the current word feature information, wherein the initial item category information generation model includes the first initial feature extraction model based on the first attention mechanism, a second initial feature extraction model based on a second attention mechanism, and an initial item category information prediction layer; a first generation unit 503, configured to generate attention feature information based on the historical word feature information set and the current word feature information, using the second initial feature extraction model based on the second attention mechanism; a second input unit 504, configured to input the attention feature information into the initial item category information prediction layer, to generate item category prediction information; and a second generation unit 505, configured to generate an item category information generation model based on the item category prediction information and the initial item category information generation model.
[0099] In some optional implementations of some embodiments, the training data may further include at least one of the following: user feature data, historical click category dataset; and the first generation unit 503 may be further configured to: generate user representation feature information for the user feature data; generate historical click category feature information corresponding to each historical click category data in the historical click category dataset, to obtain a historical click category feature information set; and input the user representation feature information and / or the historical click category feature information set, the historical word feature information set, and the current word feature information into the second initial feature extraction model to generate attention feature information.
[0100] It is understandable that the units described in the model generation apparatus 500 and the reference Figure 2 The steps in the described method correspond to each other. Therefore, the operations, features, and beneficial effects described above for the method also apply to the model generation device 500 and the units contained therein, and will not be repeated here.
[0101] Further reference Figure 6 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 4 Corresponding to the method embodiments shown, this information generation device can be specifically applied to various electronic devices.
[0102] like Figure 6 As shown, an information generation device 600 includes a second acquisition unit 601, a third generation unit 602, and a fourth generation unit 603. The second acquisition unit 601 is configured to acquire first user association information for a target user, wherein the first user association information includes a historical search term set and a current search term. The third generation unit 602 is configured to input the historical search term set and the current search term into a pre-trained item category information generation model to generate item category prediction information as the target item category prediction information, wherein the item category information generation model is generated based on a model generation method. The fourth generation unit 603 is configured to generate item category preference information for the target user based on the target item category prediction information.
[0103] In some optional implementations of some embodiments, the fourth generation unit 603 may be further configured to: obtain second user association information; input the second user association information into a pre-trained item category intention generation model to generate item category intention prediction information; and generate the item category intention information based on the target item category prediction information and the item category intention prediction information.
[0104] In some optional implementations of some embodiments, the first user association information mentioned above further includes at least one of the following: user feature data, historical click category dataset; and the third generation unit 602 may be further configured to: input the user feature data and / or the historical click category dataset, the historical search term set and the current search term into a pre-trained item category information generation model to generate item category prediction information.
[0105] In some optional implementations of certain embodiments, the above-mentioned item category preference information generation device 600 further includes a sending unit (not shown in the figure). The sending unit can be configured to send at least one item category information corresponding to the above-mentioned item category preference information to the recommended item information generation terminal.
[0106] It is understandable that the units described in the information generation device 600 and the reference Figure 4 The steps in the described method correspond to each other. Therefore, the operations, features, and beneficial effects described above for the method also apply to the information generation device 600 and the units contained therein, and will not be repeated here.
[0107] The following is for reference. Figure 7 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)700 in the middle. Figure 7 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.
[0108] like Figure 7 As shown, the electronic device 700 may include a processing unit (e.g., a central processing unit, a graphics processing unit, etc.) 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory 702 or a program loaded from a storage device 708 into a random access memory 703. The random access memory 703 also stores various programs and data required for the operation of the electronic device 700. The processing unit 701, the read-only memory 702, and the random access memory 703 are interconnected via a bus 704. An input / output interface 705 is also connected to the bus 704.
[0109] Typically, the following devices can be connected to the input / output interface 705: input devices 706 including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 707 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 708 including, for example, magnetic tape, hard disk, etc.; and communication devices 709. Communication device 709 allows electronic device 700 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 7 An electronic device 700 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 7 Each box shown can represent a device or multiple devices as needed.
[0110] 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 709, or installed from a storage device 708, or installed from a read-only memory 702. When the computer program is executed by the processing device 701, it performs the functions defined in the methods of some embodiments of this disclosure.
[0111] 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.
[0112] 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.
[0113] 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, which, when executed by the electronic device, cause the electronic device to: acquire training data, wherein the training data includes: a historical search term set, a current search term, and actual item category information; input the historical search term set and the current search term into a first initial feature extraction model based on a first attention mechanism, respectively, to generate a historical word feature information set and current word feature information, wherein the initial item category information generation model includes: the aforementioned first initial feature extraction model based on the first attention mechanism, a second initial feature extraction model based on a second attention mechanism, and an initial item category information prediction layer; generate attention feature information based on the aforementioned historical word feature information set and the current word feature information, using the aforementioned second initial feature extraction model based on the second attention mechanism; input the attention feature information into the aforementioned initial item category information prediction layer to generate item category prediction information; and generate an item category information generation model based on the aforementioned item category prediction information and the aforementioned initial item category information generation model. Obtain first user association information for the target user, wherein the first user association information includes: historical search term set and current search term; input the historical search term set and the current search term into a pre-trained item category information generation model to generate item category prediction information, which serves as the target item category prediction information, wherein the item category information generation model is generated based on a model generation method; generate item category intention information for the target user based on the target item category prediction information.
[0114] 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).
[0115] 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 represent 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.
[0116] 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 acquisition unit, a first input unit, a first generation unit, a second input unit, and a second generation unit. The names of these units do not necessarily limit the specific unit; for example, the first acquisition unit may also be described as a "unit for acquiring training data."
[0117] 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.
[0118] Some embodiments of this disclosure also provide a computer program product, including a computer program that, when executed by a processor, implements any of the model training methods or item category intention information generation methods described above.
[0119] 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. A model generation method, comprising: Acquire training data, wherein the training data includes: historical search term set, current search term and actual item category information; The historical search term set and the current search term are respectively input into the first initial feature extraction model based on the first attention mechanism to generate the historical word feature information set and the current word feature information. The initial item category information generation model includes: the first initial feature extraction model based on the first attention mechanism, the second initial feature extraction model based on the second attention mechanism, and the initial item category information prediction layer. Based on the historical word feature information set and the current word feature information, attention feature information is generated using the second initial feature extraction model based on the second attention mechanism; The attention feature information is input into the initial item category information prediction layer to generate item category prediction information; Based on the predicted item category information and the initial item category information generation model, an item category information generation model is generated.
2. The method according to claim 1, wherein, The training data also includes at least one of the following: user feature data, historical click category dataset; and The step of generating attention feature information based on the historical word feature information set and the current word feature information, using the second initial feature extraction model based on the second attention mechanism, includes: Generate user representation feature information based on the user feature data; Generate historical click category feature information corresponding to each historical click category data in the historical click category dataset to obtain a historical click category feature information set; The user representation feature information and / or the historical click category feature information set, the historical word feature information set, and the current word feature information are input into the second initial feature extraction model to generate attention feature information.
3. An information generation method, comprising: Obtain first user association information for the target user, wherein the first user association information includes: historical search term set and current search term; The historical search term set and the current search term are input into a pre-trained item category information generation model to generate item category prediction information, which serves as the target item category prediction information. The item category information generation model is generated based on the method described in any one of claims 1-2. Based on the target item category prediction information, generate item category preference information for the target user.
4. The method according to claim 3, wherein, The step of generating item category preference information for the target user based on the target item category prediction information includes: Obtain the second user's associated information; The second user association information is input into a pre-trained item category intention generation model to generate item category intention prediction information; Based on the target item category prediction information and the item category intent prediction information, the item category intent information is generated.
5. The method according to claim 3, wherein, The first user association information also includes at least one of the following: user feature data, historical click category dataset; as well as The step of inputting the historical search term set and the current search term into a pre-trained item category information generation model to generate item category prediction information includes: The user feature data and / or the historical click category dataset, the historical search term set, and the current search term are input into a pre-trained item category information generation model to generate item category prediction information.
6. The method according to claim 3, wherein, The method further includes: Send at least one item category information corresponding to the item category preference information to the recommended item information generation terminal.
7. A model generation apparatus, comprising: The first acquisition unit is configured to acquire training data, wherein the training data includes: a historical search term set, the current search term, and actual item category information; The first input unit is configured to input the historical search term set and the current search term into the first initial feature extraction model based on the first attention mechanism, respectively, to generate a historical word feature information set and a current word feature information set. The initial item category information generation model includes: the first initial feature extraction model based on the first attention mechanism, the second initial feature extraction model based on the second attention mechanism, and the initial item category information prediction layer. The first generation unit is configured to generate attention feature information based on the historical word feature information set and the current word feature information, using the second initial feature extraction model based on the second attention mechanism; The second input unit is configured to input the attention feature information into the initial item category information prediction layer to generate item category prediction information; The second generation unit is configured to generate an item category information generation model based on the item category prediction information and the initial item category information.
8. An information generation device, comprising: The second acquisition unit is configured to acquire first user association information for the target user, wherein the first user association information includes: a historical search term set and the current search term; The third generation unit is configured to input the historical search term set and the current search term into a pre-trained item category information generation model to generate item category prediction information as target item category prediction information, wherein the item category information generation model is generated based on the method described in any one of claims 1-2; The fourth generation unit is configured to generate item category preference information for the target user based on the target item category prediction information.
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-6.
10. A computer-readable medium having a computer program stored thereon, wherein, When the computer program is executed by a processor, it implements the method as described in any one of claims 1-6.
11. A computer program product comprising a computer program that, when executed by a processor, implements the method according to any one of claims 1-6.