Construction method of training data set, and method and device for recommending articles
By constructing fine-grained training data sets and generating definition data sets and matching data sets, the problems of low efficiency of recommendation rules and insufficient generalization capabilities in the existing technology are solved, and efficient and accurate item recommendations are achieved to meet the needs of the requirements of the existing technology. Diversified user needs.
Patent Information
- Application Number
- CN202411610179.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-12
- Publication Date
- 2025-02-18
AI Technical Summary
In the prior art, the method of configuring recommendation rules is inefficient and has low accuracy, while the traditional intelligent model method relies on a large amount of labeled data and cannot effectively meet the new needs of users, resulting in insufficient generalization capabilities of the model.
Using a zero-sample learning recommendation model, by constructing a training data set that is fine-grained based on the item attribute information of sample items, a definition data set and matching data set are generated, and image definition capabilities and item matching capabilities are provided to achieve accurate item recommendations.
It improves the accuracy and efficiency of the recommendation model, can better meet the diversified and personalized needs of users, and improves the item conversion rate of online trading platforms.
Smart Images

Figure CN119474873A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a method for constructing a training data set, a method for recommending items, and a device thereof. Background Art
[0002] In the business scenario of online trading platforms, how to meet users' diversified and personalized item needs and accurately and efficiently select recommended items for users is crucial to the development of the platform. Existing methods for recommending items can use the method of manually configuring recommendation rules to select recommended items that meet the rules, or use traditional intelligent model methods to build a large amount of labeled training data to cover various user needs and use models to predict recommended items for users.
[0003] In the process of implementing the present invention, the inventors found that the prior art has the following problems:
[0004] The existing methods for configuring recommendation rules are inefficient and their accuracy cannot meet the requirements; the traditional intelligent model method relies on a large amount of labeled data. For new user needs, that is, needs not covered in the training data, the model's generalization ability is not ideal, which affects the accuracy of the recommended items output by the model. Summary of the invention
[0005] In view of this, in order to utilize a recommendation model of zero-sample learning to determine recommended items, an embodiment of the present invention provides a method for constructing a training data set, a method for recommending items, and a device thereof based on an online trading platform scenario, realizes the construction of a fine-grained training data set based on item attribute information of sample items, provides high-dimensional features of items for subsequent recommendation models, facilitates the recommendation model to utilize the high-dimensional features of items for zero-sample learning, and provides image definition capabilities and item matching capabilities for the recommendation model by defining data sets and matching data sets, facilitates the subsequent use of recommendation models for accurate item recommendations, and thus better meets user needs.
[0006] To achieve the above object, according to one aspect of an embodiment of the present invention, a method for constructing a training data set is provided, comprising:
[0007] Determine a first sample item, and cluster and group the first sample items to obtain a similar sample item group; generate a definition data set based on item attribute information and item images of the items in the similar sample item group using a pre-built multimodal model;
[0008] Determine a second sample item and obtain an item summary corresponding to the second sample item; determine an item description of the second sample item based on the item attribute information of the second sample item, and generate a matching data set based on the item image of the second sample item, the item summary and the item description;
[0009] The definition data set and the matching data set are combined into the training data set.
[0010] Optionally, based on the item attribute information and item images of the items in the similar sample item group, a definition data set is generated using a pre-built multimodal model, including: selecting common attribute values from an attribute list consisting of the item attribute information of each item in the similar sample item group, and taking the items in the group having the common attribute values as candidate items; inputting the item image of the candidate item and the common attribute value into the multimodal model to generate a candidate item summary corresponding to the item image of the candidate item; and generating the definition data set based on the item image of the candidate item and the candidate item summary.
[0011] Optionally, a matching data set is generated based on the item image, the item summary and the item description of the second sample item, including: determining positive sample items in the second sample items, and for each of the positive sample items: composing a matching question with the item image and the item summary of the positive sample item; using a preset affirmative answer text and the item description of the positive sample item as an affirmative answer to the matching question; and constructing matching positive sample data of the positive sample item based on the matching question and the affirmative answer, thereby obtaining the matching positive sample data set of the second sample item.
[0012] Optionally, generating a matching data set based on the item image, the item summary and the item description of the second sample item also includes: determining negative sample items in the second sample items, and for each of the negative sample items: replacing the item attribute values contained in the item summary of the negative sample item using a pre-established attribute dictionary to obtain the item negative sample summary; forming a matching question with the item image of the negative sample item and the item negative sample summary; using a preset negative answer text and the item description of the negative sample item as a negative reply to the matching question; and constructing matching negative sample data of the negative sample item based on the matching question and the negative reply, thereby obtaining the matching negative sample data set of the second sample item.
[0013] Optionally, before determining the item description of the second sample item based on the item attribute information of the second sample item, the method further includes: counting the number of occurrences of each attribute value in the item attribute information of each item in the second sample item, and determining that the number of occurrences of each attribute value is less than a preset number threshold; if the number of occurrences of each attribute value includes an attribute value whose number of occurrences exceeds the number threshold, deleting the item and excluding it from participating in constructing the matching data set.
[0014] Optionally, after generating the matching data set, the method further includes: determining whether the total number of samples of the matching data set reaches a preset sample size; in response to the total number of samples not reaching the preset sample size, adjusting the number threshold so that the total number of samples of the matching data set generated according to the adjusted number threshold reaches the preset sample size.
[0015] According to a second aspect of an embodiment of the present invention, there is provided a method for recommending an item, comprising:
[0016] Acquire one or more requirement example images input by a user, each of the requirement example images containing at least one item attribute information of an item to be recommended;
[0017] The requirement example image is input into a pre-constructed recommendation model, so that the recommendation model generates an item summary of the item to be recommended according to the item attribute information of the training data set contained in one or more of the received requirement example images, so that the recommendation model finds a matching item that matches the item summary from an item pool, and outputs the matching item as a recommended item; the training data set of the recommendation model includes a definition data set and a matching data set, the definition data set and the matching data set are constructed according to any one of the methods provided in the first aspect of the embodiments of the present invention, and the item images in the definition data set and the matching data set have at least one common item attribute information with the requirement example image.
[0018] According to a third aspect of an embodiment of the present invention, there is provided a device for constructing a training data set, comprising:
[0019] A definition data set construction module is used to determine a first sample item and cluster and group the first sample item to obtain a similar sample item group; and generate a definition data set based on the item attribute information and item images of the items in the similar sample item group using a pre-constructed multimodal model;
[0020] a matching data set construction module, configured to determine a second sample item and obtain an item summary corresponding to the second sample item; determine an item description of the second sample item according to item attribute information of the second sample item, and generate a matching data set according to an item image of the second sample item, the item summary and the item description;
[0021] The training data set forming module is used to form the training data set by forming the definition data set and the matching data set.
[0022] According to a fourth aspect of an embodiment of the present invention, there is provided a device for recommending items, comprising:
[0023] An image acquisition module, used to acquire one or more requirement example images input by a user, each of the requirement example images containing at least one item attribute information of an item to be recommended;
[0024] A recommended item module is used to input the demand example image into a pre-built recommendation model so that the recommendation model generates an item summary of the item to be recommended based on the item attribute information of the training data set contained in one or more received demand example images, so that the recommendation model finds a matching item that matches the item summary from an item pool and outputs the matching item as a recommended item; the training data set of the recommendation model includes a definition data set and a matching data set, the definition data set and the matching data set are constructed according to any one of the methods provided in the first aspect of the embodiments of the present invention, and the item images in the definition data set and the matching data set have at least one common item attribute information with the demand example image.
[0025] According to a fifth aspect of an embodiment of the present invention, there is provided an electronic device for constructing a training data set, comprising:
[0026] one or more processors;
[0027] a storage device for storing one or more programs,
[0028] When the one or more programs are executed by the one or more processors, the one or more processors implement the method provided in the first aspect of the embodiment of the present invention.
[0029] According to a sixth aspect of an embodiment of the present invention, there is provided a computer-readable medium having a computer program stored thereon, wherein the program, when executed by a processor, implements the method provided in the first aspect of the embodiment of the present invention.
[0030] According to a seventh aspect of an embodiment of the present invention, there is provided a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method provided in the first aspect of the embodiment of the present invention is implemented.
[0031] An embodiment of the invention has the following advantages or beneficial effects: by determining the first sample item and clustering the first sample item to obtain a similar sample item group; based on the item attribute information and item images of the items in the similar sample item group, using a pre-built multimodal model, a definition data set is generated; the second sample item is determined, and the item summary corresponding to the second sample item is obtained; based on the item attribute information of the second sample item, the item description of the second sample item is determined, and based on the item image, item summary and item description of the second sample item, a matching data set is generated. The technical solution of combining the definition data set and the matching data set into a training data set realizes the construction of a fine-grained training data set for the sample items. The training data set constructed based on the item attribute information of the sample items can provide high-dimensional features of the items for the subsequent recommendation model, which is convenient for the recommendation model to use the high-dimensional features of the items for zero-sample learning, and the definition data set and the matching data set provide the recommendation model with image definition capability and item matching capability, which is convenient for the subsequent use of the recommendation model for accurate item recommendation, thereby better meeting user needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.
[0033] Figure 1 is a schematic diagram of the main process of the method for constructing a training data set according to an embodiment of the present invention;
[0034] Figure 2 is a flow chart of a method for constructing a definition data set according to an embodiment of the present invention;
[0035] Figure 3 is a detailed flowchart of a method for constructing a definition data set according to an embodiment of the present invention;
[0036] Figure 4 is a flow chart of a method for constructing a matching data set according to an embodiment of the present invention;
[0037] Figure 5 is a flowchart of a method for constructing a matching negative sample data set according to an embodiment of the present invention;
[0038] Figure 6 is a complete flow chart of a method for constructing a matching data set according to an embodiment of the present invention;
[0039] Figure 7 is a schematic diagram of the overall structure of a method for recommending items according to an embodiment of the present invention;
[0040] Figure 8 is a schematic diagram of main modules of a device for constructing a training data set according to an embodiment of the present invention;
[0041] Fig. 9 is a schematic diagram of main modules of an apparatus for recommending items according to an embodiment of the present invention;
[0042] Fig.10 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;
[0043] Fig.11 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. DETAILED DESCRIPTION
[0044] It should be noted that the acquisition, storage and application of user personal information involved in the technical solution of the present disclosure are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0045] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0046] In order to solve the problems existing in the prior art, the present invention uses a recommendation model of zero-sample learning to determine recommended items. Based on the online trading platform scenario, a method for constructing a training data set and a method for recommending items are provided. With item attribute information as the granularity, a definition data set and a matching data set are constructed respectively, wherein the definition data set is mainly used to train the model's ability to define the acquired item information; the matching data set is mainly used to train the model's ability to match and screen items. The present invention realizes the construction of a fine-grained training data set for sample items. The training data set constructed based on the item attribute information of the sample items can provide high-dimensional features of items for subsequent recommendation models, making it easier for the recommendation model to use the high-dimensional features of items for zero-sample learning; and by defining the data set and matching the data set, it is guaranteed that the recommendation model is used to make accurate item recommendations in the subsequent process, thereby better meeting user needs.
[0047] Figure 1 is a schematic diagram of the main process of the method for constructing a training data set according to an embodiment of the present invention, such as Figure 1 As shown, the method for constructing a training data set in an embodiment of the present invention includes the following steps S101 to S103.
[0048] Step S101, determine the first sample items, and cluster and group the first sample items to obtain a similar sample item group; generate a definition data set based on the item attribute information and item images of the items in the similar sample item group using a pre-built multimodal model.
[0049] Specifically, considering that the training data set plays an important role in the performance of the model, the embodiment of the present invention divides the process of recommending items determined by user needs into main steps, and constructs corresponding data sets for the steps, thereby ensuring accurate training of the model. In the embodiment of the present invention, the constructed training data set is divided into a definition data set and a matching data set according to the main steps.
[0050] The first sample items are screened out from the existing pool of items to be traded on the platform. The specific screening rules are that items that meet the specified number are randomly selected as the first sample items, or they are layered. The number of items to be drawn for each item category is determined according to the item category and the total number of first sample items. Items are drawn from the corresponding item category according to the determined number of items to be drawn, and then the items drawn from each item category are combined into the first sample items.
[0051] Furthermore, the purpose of building a dataset based on a definition is to train the model to summarize and conclude the corresponding item summary based on the information of the received items. The item summary is essentially the definition of the item, so the information of the input items should be similar items. First, it is necessary to cluster and group the items in the first sample items, and divide similar items into one group to obtain a similar sample item group.
[0052] The specific clustering and grouping method can use the item summaries corresponding to each item in the first sample items. The specific embodiment of the item summary on the trading platform is the item title on the page displaying the item, such as "Brand A Thickened Loose High-end Women's Down Cotton Jacket". Feature extraction is performed on the item title corresponding to each item in the first sample items. The specific feature extraction method can be obtained by querying a pre-built feature vector table, or by inputting each item title into a pre-built text pre-training network, and using the text pre-training network to perform feature extraction to obtain sample features. The sample features are then clustered and grouped using a clustering algorithm to identify similar sample items, and similar sample items are grouped together to obtain several similar sample item groups.
[0053] Furthermore, based on the similar sample item groups obtained by the above clustering, for each similar sample item group, according to the item attribute information (item material, color, etc.) and item images of the items in the group, and considering that the definition capability of the model requires the ability to convert and refine the text from the user's demand diagram to the text form of the item summary, the multimodal model commonly used in the industry is used to obtain the corresponding item summary, and then construct the definition data set.
[0054] Step S102: determine the second sample item and obtain the item summary corresponding to the second sample item; determine the item description of the second sample item according to the item attribute information of the second sample item, and generate a matching data set according to the item image of the second sample item, the item summary and the item description.
[0055] Specifically, the purpose of building based on the matching data set is to train the model to find matching items that match the item summary from the platform item pool according to the item summary of the item. First, the second sample items are determined. The method for determining the second sample items is similar to the method for determining the first sample items. The second sample items can be selected from the item pool by random sampling or stratified sampling, and the item summary corresponding to each item in the second sample items, that is, the item title of each item on the platform, is obtained at the same time.
[0056] Furthermore, although the item summary corresponding to the item in the second sample item, that is, the item title, contains item attribute information, due to the word limit of the item title and the user's readability, not all item attribute information of the sample item will be covered. In order to allow the subsequent recommendation model to learn the reason why there is a matching relationship between the item image and the item summary of the item in the second sample item, the attribute values in the item attribute information of the item can be randomly spliced, or spliced according to the criticality of the attribute, to generate the item description of the item, such as "cotton and linen apricot plaid high waist skirt". Then, a corresponding matching relationship between the item image, item summary and item description is established to obtain a matching data set.
[0057] It can be understood that the item titles of sample items in the platform are essentially textual definitions of items, such as "A certain brand's 2024 new retro high-waist slimming plaid skirt for women summer umbrella skirt", but it inevitably contains some redundant information related to promotions, such as "2024" and "new style", so it is necessary to filter redundant information from the item summary to filter out redundant information that is not related to the description of the item itself, such as year, "new style", "promotion", etc., where the year can be identified using regular expressions, and other redundant information can be set up in a redundant term table and identified through term matching. Therefore, after obtaining the item summary corresponding to the second sample item, the obtained item summary is filtered for redundant information to use the filtered item summary to construct a matching data set.
[0058] Step S103: Combining the definition data set and the matching data set into the training data set.
[0059] Specifically, the definition data set and matching data set constructed above are stored in the storage space of the training data set, and the definition data set and the matching data set are distinguished, so that in the subsequent training process of the zero-shot learning model, the corresponding data sets can be used for targeted fine-tuning or updating.
[0060] The embodiment of the present invention also provides a specific method for constructing a definition data set. Figure 2 is a flow chart of a method for constructing a definition data set according to an embodiment of the present invention. As another embodiment of the present invention, Figure 2 As shown, the construction method of defining a data set may include:
[0061] Step S201: determine first sample items, and cluster and group the first sample items to obtain a group of similar sample items.
[0062] Step S202: selecting a common attribute value from an attribute list consisting of the item attribute information of each item in the similar sample item group, and selecting the items in the group having the common attribute value as candidate items.
[0063] Specifically, based on clustering and grouping, a group of similar sample items is obtained, and a class of items with common attribute values needs to be further screened out as the data source for constructing a defined data set. Specifically, the attribute information of each item contained in the similar sample item group can be statistically summarized to obtain an item attribute information list. Then, a specified number k of attribute values are selected from the item attribute information list as common attribute values, such as "pink", "chiffon", and "summer", and the items with all common attribute values in the similar sample item group are selected as candidate items, which is equivalent to selecting a class of candidate items with common attribute values from the similar sample item group. In the embodiment of the present invention, k is usually selected from 3 to 4.
[0064] Step S203: input the item image of the candidate item and the common attribute value into the multimodal model to generate a candidate item summary corresponding to the item image of the candidate item.
[0065] Specifically, by utilizing the image-text understanding capability that the multimodal model excels at, the item images of the above-screened candidate items and the corresponding common attributes of the candidate items are input into the existing general multimodal model. For example, the prompt is "generate an item summary based on the common attributes of these items, including information such as color, style, design, pattern, popular elements, applicable season, applicable age, etc." The multimodal model uses its own image-text understanding capability to understand and summarize the image and text based on the item images and the corresponding common attribute values, and generates and outputs a summary of the candidate items.
[0066] Step S204: Generate the definition data set according to the item image of the candidate item and the candidate item summary.
[0067] Specifically, based on the candidate item summary generated above, a correspondence between the item image and the candidate item summary is established to generate a definition data set. , the candidate item summary is , then define the data format in the data set as: Prompt: , based on the common attributes of these items, generate an item summary. Answer: .
[0068] Figure 3 1 is a detailed flow chart of a method for constructing a definition data set according to an embodiment of the present invention. The item summary of each sample item in the first sample item is subjected to feature extraction through a text pre-training network to obtain sample features. The sample features are then clustered and grouped using a clustering algorithm to identify similar sample items therein, and similar sample items are grouped together to obtain a similar sample item group. Common attribute values are selected from the item attribute information list of each item in the similar sample item group, and the items in the group having common attribute values are used as candidate items. Finally, the item images and common attribute values of the candidate items are input into a universal multimodal model to generate candidate item summaries corresponding to the item images of the candidate items, and then a definition data set is constructed based on the item images and the candidate item summaries of the candidate items.
[0069] The embodiment of the present invention also provides a specific method for constructing a matching data set. Figure 4 is a flow chart of a method for constructing a matching data set according to an embodiment of the present invention. As another embodiment of the present invention, Figure 4 As shown, the method for constructing the matching data set may include:
[0070] Step S401: determine a second sample item, and obtain an item summary corresponding to the second sample item; determine an item description of the second sample item according to item attribute information of the second sample item.
[0071] According to one embodiment of the present invention, before determining the item description of the second sample item based on the item attribute information of the second sample item, the method further includes: counting the number of occurrences of each attribute value in the item attribute information of each item in the second sample item, and determining that the number of occurrences of each attribute value is less than a preset number threshold; if the number of occurrences of each attribute value includes an attribute value whose number of occurrences exceeds the number threshold, deleting the item and excluding it from participating in constructing the matching data set.
[0072] Specifically, the purpose of the matching data set is to train the matching ability of the recommendation model, so the balance of the matching data set affects the training effect. In order to ensure the balance of the matching data set, before determining the item description of the second sample item, the number of occurrences of each attribute value in the item attribute information of the second sample item is counted. For example, the attribute values of sample item A include "middle sleeve" and "round neck", where the attribute value "round neck" has appeared once in the constructed matching data, so the number of occurrences of "round neck" this time is 2. If the number of occurrences of each attribute value in the item attribute information is less than the preset number threshold, then the sample item can participate in the construction of the matching data set. If the number of occurrences of one or more attribute values in the item attribute information of the second sample item is greater than the preset number threshold, then it is determined that the number of occurrences of the attribute value is too many. In order to include as many sample items as possible in the limited matching data set, the sample items containing high-frequency attribute values are deleted and do not participate in the construction of the matching data set, which can effectively ensure the balance of the sample data of the matching data set.
[0073] Step S402, determining positive sample items in the second sample items, and for each of the positive sample items: forming a matching question with the item image and item summary of the positive sample item; using a preset affirmative answer text and the item description of the positive sample item as an affirmative answer to the matching question; constructing matching positive sample data of the positive sample item based on the matching question and the affirmative answer, thereby obtaining a matching positive sample data set of the second sample item.
[0074] Specifically, the positive sample items in the second sample items can be all the items in the second sample items. In this case, only the matching positive sample data set is constructed. The specified items in the second sample items can also be used as positive sample items, which is not specifically limited in the embodiment of the present invention. For each positive sample item, an association relationship between its item image and item summary is established, and assembled into a matching question; then the preset affirmative answer text, such as "match" and the item description of the positive sample item are assembled into an affirmative answer to the matching question, that is, the matching positive sample data consisting of the matching question and the corresponding affirmative answer is obtained, and then the matching positive sample data set of the second sample item is obtained.
[0075] For example, the image of the positive sample object is set to , first filter out redundant information from its item summary and get the filtered item summary, which is defined as , the generated item is described as , then the matching problem of the positive sample data in the positive sample data set is Promot: is an image, defined as , do the images match the definitions? The corresponding positive answer is: Yes, the image shows a , which matches the corresponding description.
[0076] In order to ensure the matching performance of the training model, the embodiment of the present invention provides a method for constructing a matching negative sample data set based on the matching positive sample data set constructed above. Figure 5 is a flow chart of a method for constructing a matching negative sample data set according to an embodiment of the present invention. As another embodiment of the present invention, Figure 5 As shown, the method for constructing a matching negative sample dataset may include:
[0077] Step S501: determine a second sample item, and obtain an item summary corresponding to the second sample item; determine an item description of the second sample item according to item attribute information of the second sample item.
[0078] According to one embodiment of the present invention, before determining the item description of the second sample item based on the item attribute information of the second sample item, the method further includes: counting the number of occurrences of each attribute value in the item attribute information of each item in the second sample item, and determining that the number of occurrences of each attribute value is less than a preset number threshold; if the number of occurrences of each attribute value includes an attribute value whose number of occurrences exceeds the number threshold, deleting the item and excluding it from participating in constructing the matching data set.
[0079] Specifically, the purpose of matching the negative sample data set is to reduce the mismatch of the recommendation model and improve the generalization ability of the recommendation model. The balance of the matching negative sample data set affects the training effect. In order to ensure the balance of the matching negative sample data set, before determining the item description of the second sample item, the number of occurrences of each attribute value in the item attribute information of the item in the second sample item is counted. If the number of occurrences of each attribute value in the item attribute information is less than the preset number threshold, then the sample item can participate in the construction of the matching negative sample data set. If the number of occurrences of one or more attribute values in the item attribute information of the item in the second sample item is greater than the preset number threshold, then it is determined that the number of occurrences of the attribute value is too many. In order to include as many sample items as possible in the limited matching negative sample data set, such sample items containing high-frequency attribute values are deleted and do not participate in the construction of the matching data set. This can effectively ensure the balance of the sample data of the matching negative sample data set.
[0080] Step S502, determining negative sample items in the second sample items, for each of the negative sample items: according to the item attribute values contained in the item summary of the negative sample item, using a pre-established attribute dictionary, replace the item attribute values to obtain the item negative sample summary; using the item image of the negative sample item and the item negative sample summary to form a matching question; using a preset negative answer text and the item description of the negative sample item as a negative answer to the matching question; constructing matching negative sample data of the negative sample item based on the matching question and the negative answer, thereby obtaining a matching negative sample data set of the second sample item.
[0081] Specifically, when constructing matching positive sample data and matching negative sample data, for each item in the second sample item, a random probability method is used to determine which of the second sample items are negative sample items and which are positive sample items. Based on the preset positive sample ratio p, a random probability value is generated between 0 and 1, and the size relationship between the random probability value and the positive sample ratio is compared. When the random probability value exceeds the preset positive sample ratio, it is determined that the current item is a negative sample item, and a matching negative sample data set is constructed at this time. Exemplarily, an embodiment of the present invention pre-sets the sample size in the matching positive sample data set to be the same as the sample size in the matching negative sample data set, that is, 1:1. Correspondingly, the ratio of positive samples is 0.5. When the random probability value is greater than 0.5, the current item is a negative sample item, and the matching negative sample data is constructed accordingly.
[0082] It can be understood that if the random probability value does not exceed the positive sample ratio, it is a positive sample item, and a matching positive sample data set needs to be constructed.
[0083] In addition, the method for determining the positive sample items and the negative sample items may also adopt a counting method. For example, the number of positive sample items is defined in advance as 2000, and the number of negative sample items is also defined as 2000. According to this quantity requirement, the items in the second sample items are alternately defined as positive sample items and negative sample items. The embodiment of the present invention does not specifically limit the method for determining the positive sample items and the negative sample items.
[0084] Furthermore, in order to meet the requirements of constructing matching negative sample data in the embodiment of the present invention, the embodiment of the present invention establishes an attribute dictionary based on the attribute information of the items in the item pool in advance. The attribute dictionary clarifies the equivalent relationship between the attribute values corresponding to the same attribute name. For example, for the attribute name: shoe closure method, the equivalent relationship of the corresponding attribute value includes: sleeve = slip-on = step-on.
[0085] Then, for each negative sample item, a specified number of target item attribute values are selected from the item attribute values contained in the item summary of the negative sample item. For each target item attribute value: determine the corresponding target attribute name according to the target item attribute value, then find all the candidate attribute values corresponding to the target attribute name in the attribute dictionary from the attribute dictionary, and select other attribute values that are not equivalent to the target item attribute value from these candidate attribute values, and use the selected other attribute values to replace the selected target item attribute value from the item summary of the negative sample item. After replacing all the target item attribute values, a new item summary of the negative sample item is obtained, and the new item summary is the negative sample summary.
[0086] Furthermore, an association relationship between the item image and the item negative sample summary is established and assembled into a matching question; then the preset negative answer text, such as "no match" and the item description of the negative sample item are assembled into a negative answer to the matching question, that is, matching negative sample data consisting of the matching question and the corresponding negative answer is obtained, and then the matching negative sample data set of the second sample item is obtained. In addition, in order to maintain the integrity of the information and further enable the recommendation model to better understand the reasons for the mismatch, the other attribute values corresponding to the attribute names of each target item when constructing the item summary of the negative sample item can also be spliced to obtain the item negative sample description, and the item negative sample description is also attached to the negative answer.
[0087] For example, the negative sample item image is set to , the generated item is described as The corresponding negative sample summary is , the negative sample of the item is described as Then the matching problem Prompt for the negative sample data in the negative sample dataset is: is an image, defined as , do the images match the definitions? Corresponding negative answer: No, the image shows a , while the description in the definition is .
[0088] Figure 6 : This is a complete flow chart of the method for constructing a matching data set according to an embodiment of the present invention. Based on the item image, item summary and item attribute information of each item in the second sample item, the number of occurrences of each attribute value in the item attribute information of the current item is counted, sample balancing is performed on the sample items, and items whose number of occurrences of each attribute value is less than a preset number threshold are selected to participate in the construction of the matching data set. Redundant information is filtered for the item summary of the sample items participating in the construction of the matching data set to obtain the filtered item summary, and the attribute values in the item attribute information of each item in the second sample item participating in the construction of the matching data set are spliced to generate item descriptions of each item.
[0089] Furthermore, a random probability method is used to generate a random probability value for the items in the current second sample items, and it is determined whether the random probability value does not exceed the preset positive sample ratio p. If the random probability value ≤ p, then the current item is determined to be a positive sample item, and a matching positive sample data set needs to be constructed: a matching question and a corresponding affirmative answer are constructed, and then a matching positive sample data set for the second sample item is generated. If the random probability value is greater than p, the current item is determined to be a negative sample item, and a matching negative sample data set needs to be constructed: according to the item attribute value contained in the negative sample item summary, the item attribute value is replaced using a pre-established attribute dictionary to obtain the item negative sample summary; a matching question and a corresponding negative answer are constructed, and then a matching negative sample data set for the second sample item is generated.
[0090] According to another embodiment of the present invention, after generating a matching data set, the method further includes: determining whether the total number of samples of the matching data set reaches a preset sample size; in response to the total number of samples not reaching the preset sample size, adjusting the number threshold so that the total number of samples of the matching data set generated according to the adjusted number threshold reaches the preset sample size.
[0091] Specifically, after generating the matching data set according to the above method, the total number of samples in the matching data set is counted. Of course, for the matching positive sample data and matching negative sample data set constructed above, it is necessary to count the total number of samples in the matching positive sample data and matching negative sample data set, and determine whether the total number of samples reaches the preset sample size. If the total number of samples does not reach the preset sample size, it is necessary to increase the number threshold of the above-mentioned balanced screening of sample items. The specific increase is determined according to the difference between the total number of samples and the preset sample size. If the difference is not particularly large, the number threshold can be slightly increased, for example, from the original 100 to 110. If the difference is large, the number threshold is increased more. The increased number threshold will allow some new sample items to be added, thereby increasing the total number of samples in the matching data set to achieve the purpose of the preset sample size.
[0092] Based on the above-mentioned method for constructing a training data set, an embodiment of the present invention also provides a method for recommending items, comprising: obtaining one or more demand example images input by a user, each of the demand example images containing at least one item attribute information of an item to be recommended; inputting the demand example images into a pre-constructed recommendation model, so that the recommendation model generates an item summary of the item to be recommended based on the item attribute information of the training data set contained in the received one or more demand example images, so that the recommendation model finds a matching item that matches the item summary from an item pool, and outputs the matching item as a recommended item; the training data set of the recommendation model comprises a definition data set and a matching data set, the definition data set and the matching data set are constructed according to any of the above-mentioned training data set methods, and the item images in the definition data set and the matching data set have at least one common item attribute information with the demand example images.
[0093] Specifically, when an online trading platform receives a browsing request or a search request sent by a user, it parses the request to obtain the user input demand example image contained therein. The demand example image in the embodiment of the present invention is an example image of an item that represents the user's browsing intention or purchase intention. The specific source can be an item picture from other trading platforms, or a real-life picture taken by the user. The number of demand example images is generally multiple, and of course it also supports inputting only one demand example image. Each demand example image input by the user should be related to the item to be recommended, and each demand example image contains at least one attribute information of the item to be recommended. For example, a user needs to search and browse for chandeliers in the living room of his home, and inputs pictures of chandeliers of different styles in a simple style that he likes and pictures of chandeliers in his friend's home as demand example images into the recommendation system. The item attribute names of these demand example images are all chandeliers, and the item style attributes are all simple or modern, but the specific style, material and other attributes are different.
[0094] Furthermore, a zero-shot learning method is adopted to use the definition dataset and matching dataset constructed above to train the recommendation model. The recommendation model is based on the definition dataset and matching dataset constructed at the granularity of item attribute information. The training learns the high-dimensional features of the items, and acquires and improves its own image definition ability and item matching ability from a fine-grained level.
[0095] When receiving a demand example image, even if the demand example image is different from the item image involved in the training data set, that is, the demand example image received by the recommendation model is new and different from the image demand involved in the training data set, and is an image that has not been intuitively learned in the training stage, but the demand example image and the item image in the training data set have something in common at the granularity of item attribute information, then the recommendation model can extract the item attribute information of the item to be recommended contained therein from each demand example image, and compare the item attribute information, use the common attribute values of each demand example image as the material for constructing the item summary, splice the various materials according to semantics, and generate an item summary of the item to be recommended extracted and summarized from these demand example images. The item definition in the embodiment of the present invention is generally in text form.
[0096] The recommendation model then searches for matching items that match the item summary from the currently selected item pool or the item pool determined according to the generated item definition based on the item summary text generated by the common attribute value. The items in the item pool of the embodiment of the present invention are derived from the items currently tradable on the online trading platform, which can be an item pool of different categories defined according to the item category, or an item pool divided according to other dimensions of the item. In addition, there are usually multiple matching items found, so they can be sorted according to the size of the matching relevance or the high and low scores, and the sorted recommended items are output so that users can quickly find the required items for trading.
[0097] According to one embodiment of the present invention, the recommendation model is constructed based on a multimodal large language model.
[0098] Specifically, taking into account the embodiments of the present invention, which involve image-type information and text-type information, in order to better exert the definition and matching capabilities of the recommendation model, the embodiments of the present invention choose to use a multimodal large language model to construct the recommendation model. The multimodal large language model can utilize multiple types of data information for a comprehensive and in-depth understanding, thereby ensuring the accuracy and efficiency of the recommendation model.
[0099] According to another embodiment of the present invention, the items in the item pool have item images; searching for a matching item that matches the item summary from the item pool includes: searching for a matching image that matches the item summary from each item image in the item pool, and using the item corresponding to the matching image as the matching item.
[0100] Specifically, the recommendation model constructed using a multimodal large language model is better at understanding images and texts. Each item in the item pool of the embodiment of the present invention has an item image. In order to improve matching efficiency and avoid the influence of text noise of each item in the item pool, the recommendation model of the embodiment of the present invention uses each item image in the item pool as a matching object, calculates the degree of matching between these item images and the generated item definitions, and matches and filters out matching images according to a preset matching program threshold, and uses the items corresponding to these matching images as matching items.
[0101] The embodiment of the present invention utilizes a multimodal large language model, a definition data set, a matching data set, and a zero-sample learning method to construct a recommendation model for meeting new user needs, extracts fine-grained attribute information from the user-input demand example image, and generates an item summary text at the attribute granularity of the item to be recommended based on the attribute information, completing the generation of the first-stage item definition; then, the item image and the item summary are matched and screened from the item pool based on the item summary to obtain a matching image, and then the matching item is determined to complete the second-stage item matching. This method of item matching based on fine-grained generated item summaries and using item images as matching objects can accurately and efficiently obtain recommended items, better meet the user's new needs, and solve the problem of deviation in the recommended items output by the recommendation model due to the new needs not participating in the training of the recommendation model, which effectively improves the item conversion rate of the online trading platform.
[0102] Figure 7 : is a schematic diagram of the overall structure of the method for recommending items according to an embodiment of the present invention. The construction of the matching data set and the construction of the definition data set are respectively integrated into a matching data set generation module and a definition data set generation module. The whole process is divided into two stages: a training stage and an online recommendation stage. The training stage is mainly based on multimodal data consisting of item images, item titles, and item attribute information of sample items. The matching data set generation module and the definition data set generation module are used to respectively construct the matching data set and the definition data set. The matching data set and the definition data set are then input into the recommendation model. By minimizing the loss function, the recommendation model constructed by the multimodal large language model is trained and adjusted. When the training converges, the trained recommendation model is obtained.
[0103] Furthermore, the acquired multiple demand example images are input into the trained recommendation model, so that the recommendation model generates an item summary of the item to be recommended according to the item attribute information of the item to be recommended contained in the received multiple demand example images, thereby enabling the recommendation model to search for matching items that match the item summary from the item pool, and output the matching items as recommended items that meet the demand example images.
[0104] The embodiment of the present invention is based on one or more acquired demand example images, and utilizes a zero-shot learning recommendation model constructed by joint training of a definition data set and a matching data set. According to the item attribute information contained in the demand example image, an item summary of the item to be recommended is first obtained, and then items are matched in an item pool according to the item summary to obtain recommended items that meet the demand example image, thereby realizing an intelligent, fine-grained, and accurate method for recommending items. The intelligent recommendation model generates an item summary based on fine-grained attribute information, and then matches items according to the fine-grained item summary, which greatly improves the accuracy of the recommended items output by the model when facing user needs that are not directly involved in the model, thereby better meeting user needs.
[0105] Figure 8 Schematic diagram of the main modules of the apparatus for constructing a training data set according to an embodiment of the present invention. Figure 8 As shown, the training data set construction device 800 mainly includes a definition data set construction module 801, a matching data set construction module 802 and a training data set assembly module 803.
[0106] The definition data set construction module 801 is used to determine the first sample items and cluster and group the first sample items to obtain a similar sample item group; based on the item attribute information and item images of the items in the similar sample item group, a definition data set is generated using a pre-constructed multimodal model;
[0107] The matching data set construction module 802 is used to determine the second sample item and obtain the item summary corresponding to the second sample item; determine the item description of the second sample item according to the item attribute information of the second sample item, and generate a matching data set according to the item image of the second sample item, the item summary and the item description;
[0108] The training data set forming module 803 is used to form the training data set by forming the definition data set and the matching data set.
[0109] According to one embodiment of the present invention, the definition data set construction module 801 is further used to: select common attribute values from an attribute list consisting of item attribute information of each item in the similar sample item group, and use the items in the group with the common attribute values as candidate items; input the item image of the candidate item and the common attribute value into the multimodal model to generate a candidate item summary corresponding to the item image of the candidate item; and generate the definition data set based on the item image of the candidate item and the candidate item summary.
[0110] According to another embodiment of the present invention, the matching data set construction module 802 is further used to: determine the positive sample items in the second sample items, and for each of the positive sample items: form a matching question with the item image and item summary of the positive sample item; use a preset affirmative answer text and the item description of the positive sample item as an affirmative answer to the matching question; and construct matching positive sample data of the positive sample item based on the matching question and the affirmative answer, thereby obtaining the matching positive sample data set of the second sample item.
[0111] According to another embodiment of the present invention, the matching data set construction module 802 is further used to: determine negative sample items in the second sample items, and for each of the negative sample items: replace the item attribute values contained in the item summary of the negative sample item using a pre-established attribute dictionary to obtain the item negative sample summary; form a matching question with the item image of the negative sample item and the item negative sample summary; use a preset negative answer text and the item description of the negative sample item as a negative answer to the matching question; and construct matching negative sample data of the negative sample item based on the matching question and the negative answer, thereby obtaining the matching negative sample data set of the second sample item.
[0112] According to another embodiment of the present invention, the training data set construction device 800 also includes a sample balancing module (not shown in the figure), which is used to: before determining the item description of the second sample item based on the item attribute information of the second sample item, count the number of occurrences of each attribute value in the item attribute information of each item in the second sample item, and determine that the number of occurrences of each attribute value is less than a preset number threshold; if the number of occurrences of each attribute value exceeds the number threshold, delete the item and do not participate in the construction of the matching data set.
[0113] According to another embodiment of the present invention, the training data set construction device 800 also includes a data set quantity verification module (not shown in the figure), which is used to: after generating a matching data set, determine whether the total number of samples in the matching data set reaches a preset sample size; in response to the total number of samples not reaching the preset sample size, adjust the number threshold so that the total number of samples of the matching data set generated according to the adjusted number threshold reaches the preset sample size.
[0114] Fig. 9 FIG. 1 is a schematic diagram of the main modules of the device for recommending items according to an embodiment of the present invention. Fig. 9 As shown, the device 900 for recommending items mainly includes an image acquisition module 901 and an item recommendation module 902 .
[0115] An image acquisition module 901 is used to acquire one or more requirement example images input by a user, each of which contains at least one item attribute information of an item to be recommended;
[0116] The recommended item module 902 is used to input the demand example image into a pre-constructed recommendation model so that the recommendation model generates an item summary of the item to be recommended based on the item attribute information of the training data set contained in one or more of the received demand example images, so that the recommendation model finds a matching item that matches the item summary from the item pool and outputs the matching item as a recommended item; the training data set of the recommendation model includes a definition data set and a matching data set, and the definition data set and the matching data set are constructed according to any of the methods of the training data set provided above, and the item images in the definition data set and the matching data set have at least one common item attribute information with the demand example image.
[0117] Fig.10 is an exemplary system architecture diagram to which embodiments of the present invention can be applied.
[0118] like Fig.10 As shown, the system architecture 1000 may include terminal devices 1001, 1002, 1003, a network 1004, and a server 1005. The network 1004 is used to provide a medium for communication links between the terminal devices 1001, 1002, 1003 and the server 1005. The network 1004 may include various connection types, such as wired, wireless communication links, or optical fiber cables, etc.
[0119] Users can use terminal devices 1001, 1002, 1003 to interact with server 1005 through network 1004 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 1001, 1002, 1003, such as item recommendation applications, etc. (only as an example).
[0120] The terminal devices 1001 , 1002 , and 1003 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers, etc.
[0121] Server 1005 may be a server that provides various services, such as a background management server (only for example) that supports the construction of a training data set by a user using terminal devices 1001, 1002, and 1003. The background management server may determine a first sample item, and cluster and group the first sample item to obtain a similar sample item group; generate a definition data set based on the item attribute information and item image of the items in the similar sample item group using a pre-built multimodal model; determine a second sample item, and obtain an item summary corresponding to the second sample item; determine an item description of the second sample item based on the item attribute information of the second sample item, and generate a matching data set based on the item image, the item summary, and the item description of the second sample item; combine the definition data set and the matching data set into the training data set, and feed back the processing results (such as the training data set, etc. - only for example) to the terminal device.
[0122] It should be noted that the method for constructing a training data set provided in the embodiment of the present invention is generally executed by the server 1005 , and accordingly, the device for constructing a training data set is generally disposed in the server 1005 .
[0123] It should be understood that Fig.10 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0124] Reference below Fig.11 , Fig.11 It is a schematic diagram of the structure of a computer system of a terminal device or a server suitable for implementing an embodiment of the present invention. Fig.11 The terminal device or server shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0125] like Fig.11As shown, the computer system 1100 includes a central processing unit (CPU) 1101, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1102 or a program loaded from a storage portion 1108 into a random access memory (RAM) 1103. In the RAM 1103, various programs and data required for the operation of the system 1100 are also stored. The CPU 1101, the ROM 1102, and the RAM 1103 are connected to each other via a bus 1104. An input / output (I / O) interface 1105 is also connected to the bus 1104.
[0126] The following components are connected to the I / O interface 1105: an input section 1106 including a keyboard, a mouse, etc.; an output section 1107 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 1108 including a hard disk, etc.; and a communication section 1109 including a network interface card such as a LAN card, a modem, etc. The communication section 1109 performs communication processing via a network such as the Internet. A drive 1110 is also connected to the I / O interface 1105 as needed. A removable medium 1111, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 1110 as needed, so that a computer program read therefrom is installed into the storage section 1108 as needed.
[0127] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 1109, and / or installed from the removable medium 1111. When the computer program is executed by the central processing unit (CPU) 1101, the above-mentioned functions defined in the system of the present invention are executed.
[0128] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination thereof.
[0129] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a sequence different from that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0130] The units involved in the embodiments of the present invention may be implemented by software or hardware. The units described may also be set in a processor, for example, it may be described as: a processor includes: a definition data set construction module, a matching data set construction module and a training data set construction module.
[0131] The names of these modules do not, in some cases, constitute limitations on the modules themselves. For example, a training data set assembly module may also be described as “a module for assembling the training data set from the definition data set and the matching data set”.
[0132] On the other hand, the present invention also provides a computer-readable medium, which may be included in the device described in the embodiment; or may exist independently without being assembled into the device. The computer-readable medium carries one or more programs, and when the one or more programs are executed by a device, the device includes: determining a first sample item, and clustering and grouping the first sample item to obtain a similar sample item group; generating a definition data set based on the item attribute information and item image of the items in the similar sample item group using a pre-built multimodal model; determining a second sample item, and obtaining an item summary corresponding to the second sample item; determining an item description of the second sample item based on the item attribute information of the second sample item, and generating a matching data set based on the item image, the item summary and the item description of the second sample item; and forming the definition data set and the matching data set into the training data set.
[0133] The technical solution according to the embodiment of the present invention has the following advantages or beneficial effects: by determining the first sample item and clustering the first sample item to obtain a similar sample item group; generating a definition data set based on the item attribute information and item images of the items in the similar sample item group using a pre-built multimodal model; determining the second sample item and obtaining the item summary corresponding to the second sample item; determining the item description of the second sample item based on the item attribute information of the second sample item, and generating a matching data set based on the item image, item summary and item description of the second sample item. The technical solution of combining the definition data set and the matching data set into a training data set realizes the construction of a fine-grained training data set for the sample items. The training data set constructed based on the item attribute information of the sample items can provide high-dimensional features of the items for the subsequent recommendation model, which is convenient for the recommendation model to use the high-dimensional features of the items for zero-sample learning, and provides the recommendation model with image definition capability and item matching capability through the definition data set and the matching data set, which is convenient for the subsequent use of the recommendation model for accurate item recommendation, thereby better meeting user needs.
[0134] The specific implementation methods described herein do not constitute limitations on the scope of protection of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention shall be included in the scope of protection of the present invention.
Claims
1. A method for constructing a training data set, characterized in that: include: Determine a first sample item, and cluster and group the first sample items to obtain a similar sample item group; generate a definition data set based on item attribute information and item images of the items in the similar sample item group using a pre-built multimodal model; Determine a second sample item and obtain an item summary corresponding to the second sample item; determine an item description of the second sample item based on the item attribute information of the second sample item, and generate a matching data set based on the item image of the second sample item, the item summary and the item description; The definition data set and the matching data set are combined into the training data set.
2. The method according to claim 1, characterized in that According to the item attribute information and item images of the items in the similar sample item group, a definition data set is generated using a pre-built multimodal model, including: Selecting a common attribute value from an attribute list consisting of the item attribute information of each item in the similar sample item group, and taking the items in the group having the common attribute value as candidate items; Inputting the item image of the candidate item and the common attribute value into the multimodal model to generate a candidate item summary corresponding to the item image of the candidate item; The definition data set is generated according to the item image of the candidate item and the candidate item summary.
3. The method according to claim 1, characterized in that Generating a matching data set according to the object image of the second sample object, the object summary and the object description, comprising: Determine positive sample items among the second sample items, and for each of the positive sample items: form a matching question with an item image and an item summary of the positive sample item; use a preset affirmative answer text and an item description of the positive sample item as an affirmative reply to the matching question; construct matching positive sample data of the positive sample item based on the matching question and the affirmative reply, thereby obtaining a matching positive sample data set of the second sample item.
4. The method according to claim 3, characterized in that Generating a matching data set according to the item image of the second sample item, the item summary and the item description, further comprising: Determine negative sample items in the second sample items, and for each of the negative sample items: replace the item attribute values contained in the item summary of the negative sample item using a pre-established attribute dictionary to obtain the item negative sample summary; form a matching question with the item image of the negative sample item and the item negative sample summary; use a preset negative answer text and the item description of the negative sample item as a negative answer to the matching question; construct matching negative sample data of the negative sample item based on the matching question and the negative answer, thereby obtaining a matching negative sample data set of the second sample item.
5. The method according to claim 1, characterized in that Before determining the item description of the second sample item according to the item attribute information of the second sample item, the method further includes: The number of occurrences of each attribute value in the item attribute information of each item in the second sample items is counted, and it is determined that the number of occurrences of each attribute value is less than a preset number threshold; if the number of occurrences of each attribute value has an attribute value whose number of occurrences exceeds the number threshold, the item is deleted and does not participate in constructing the matching data set.
6. The method according to claim 5, characterized in that After generating the matching data set, the method further includes: Determine whether the total number of samples in the matching data set reaches a preset sample size; In response to the total number of samples not reaching the preset sample size, the number threshold is adjusted so that the total number of samples of the matching data set generated according to the adjusted number threshold reaches the preset sample size.
7. A method for recommending an item, characterized in that: include: Acquire one or more requirement example images input by a user, each of the requirement example images containing at least one item attribute information of an item to be recommended; The requirement example image is input into a pre-constructed recommendation model, so that the recommendation model generates an item summary of the item to be recommended according to the item attribute information of the training data set contained in one or more of the received requirement example images, so that the recommendation model finds a matching item that matches the item summary from an item pool, and outputs the matching item as a recommended item; the training data set of the recommendation model includes a definition data set and a matching data set, the definition data set and the matching data set are constructed according to any one of the methods of claims 1 to 6, and the item images in the definition data set and the matching data set have at least one common item attribute information with the requirement example image.
8. A device for constructing a training data set, characterized in that: include: A definition data set construction module is used to determine a first sample item and cluster and group the first sample item to obtain a similar sample item group; and generate a definition data set based on the item attribute information and item images of the items in the similar sample item group using a pre-constructed multimodal model; a matching data set construction module, configured to determine a second sample item and obtain an item summary corresponding to the second sample item; determine an item description of the second sample item according to item attribute information of the second sample item, and generate a matching data set according to an item image of the second sample item, the item summary and the item description; The training data set forming module is used to form the training data set by forming the definition data set and the matching data set.
9. A device for recommending items, characterized in that: include: An image acquisition module, used to acquire one or more requirement example images input by a user, each of the requirement example images containing at least one item attribute information of an item to be recommended; A recommended item module, used for inputting the demand example image into a pre-constructed recommendation model, so that the recommendation model generates an item summary of the item to be recommended according to the item attribute information of the training data set contained in one or more received demand example images, so that the recommendation model finds a matching item that matches the item summary from the item pool, and outputs the matching item as a recommended item; the training data set of the recommendation model includes a definition data set and a matching data set, the definition data set and the matching data set are constructed according to any one of the methods of claims 1 to 6, and the item images in the definition data set and the matching data set have at least one common item attribute information with the demand example image.
10. A mobile electronic device terminal, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.
11. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.