Model training methods, information generation methods and devices

By constructing a unified pre-trained language model with a multi-head attention layer and a residual connection layer, the problem of resource consumption in filling in product attribute information on e-commerce platforms is solved, and efficient and accurate automatic prediction of product attributes is achieved, which is suitable for the recognition of massive types of products.

CN114693994BActive Publication Date: 2025-10-28BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210320106.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-29
Publication Date
2025-10-28
Estimated Expiration
2042-03-29

AI Technical Summary

Technical Problem

On e-commerce platforms, merchants face significant challenges in filling in product attribute information, including the high costs of labeling and database construction. This is especially true in scenarios with a massive variety of product types, where existing technologies struggle to efficiently identify the attribute information of new products.

Method used

A unified pre-trained language model is constructed using a multi-head attention layer and a residual connection layer. Machine learning methods are used to deeply fuse product category information and image information to train an attribute prediction model, enabling automatic prediction of multiple categories and attributes.

Benefits of technology

It improves the efficiency and accuracy of attribute information generation, reduces model training and deployment costs, and adapts to the recognition needs of massive types of goods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114693994B_ABST
    Figure CN114693994B_ABST
Patent Text Reader

Abstract

Embodiments of this disclosure provide a model training method, an information generation method, and an apparatus. The model training method includes: first, acquiring a training sample set, which includes sample images corresponding to sample items, category information and attribute information of the sample items, and attribute values ​​corresponding to the attribute information; then, constructing a unified pre-trained language model including a multi-head attention layer and a residual connection layer; finally, using machine learning methods, taking the category information and attribute information of the sample items as input to the multi-head attention layer, the sample images corresponding to the sample items as input to the residual connection layer, and the attribute values ​​corresponding to the attribute information as the expected output, to train the unified pre-trained language model to obtain an attribute prediction model. By using the sample images corresponding to the sample items, the category information and attribute information of the sample items to train the attribute prediction model, the efficiency and accuracy of attribute value generation are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments disclosed herein relate to the fields of computer technology and internet technology, specifically to the fields of data processing and artificial intelligence technology, and particularly to model training methods and apparatus. Background Technology

[0002] On e-commerce platforms, a massive number of products are listed and updated every day. During this process, merchants need to fill in the product attribute information, which results in a lot of information to fill in and a long product delivery time.

[0003] Using product images uploaded by merchants to intelligently and accurately identify product information is an effective solution. Currently, there are two main technical solutions: 1) Modeling separately for different categories and attributes. This approach requires building a large number of models in scenarios with a massive number of product types, consuming significant annotation resources, machine training, and deployment costs. 2) Finding similar products based on image similarity interfaces and then extracting pre-filled attributes. This approach relies on an accurate and rich retrieval library, requiring high library construction costs, and lacks the ability to identify new products. Summary of the Invention

[0004] Embodiments of this disclosure provide a model training method, an information generation method, an apparatus, an electronic device, and a computer-readable medium.

[0005] In a first aspect, embodiments of this disclosure provide a model training method, which includes: acquiring a training sample set, wherein the training sample set includes sample images corresponding to sample items, category information and attribute information of the sample items, and attribute values ​​corresponding to the attribute information; constructing a unified pre-trained language model including a multi-head attention layer and a residual connection layer; and using machine learning methods, using the category information and attribute information of the sample items as input to the multi-head attention layer, the sample images corresponding to the sample items as input to the residual connection layer, and the attribute values ​​corresponding to the attribute information as the expected output, training the unified pre-trained language model to obtain an attribute prediction model.

[0006] In some embodiments, obtaining a training sample set includes: obtaining sample images corresponding to multiple sample items, category information of each sample item, multiple initial attribute information of each sample item, and initial attribute values ​​corresponding to each initial attribute information; performing preprocessing operations on the multiple initial attribute information and the initial attribute values ​​corresponding to each initial attribute information of each sample item to obtain processed attribute information and processed attribute values; and forming a training sample set by combining the sample images corresponding to multiple sample items, the category information of each sample item, the processed attribute information and processed attribute values ​​corresponding to each sample item.

[0007] In some embodiments, the preprocessing operation includes at least one of the following: merging the initial attribute values ​​corresponding to each initial attribute information to obtain merged attribute values; filtering the multiple initial attribute information of each sample item to obtain filtered attribute information; enhancing the initial attribute values ​​corresponding to each initial attribute information to obtain enhanced attribute values; and calibrating the initial attribute values ​​corresponding to each initial attribute information to obtain calibrated attribute values.

[0008] In some embodiments, the initial attribute values ​​corresponding to each initial attribute information are merged to obtain merged attribute values, including: obtaining a set of attribute vectors corresponding to multiple initial attribute values ​​based on a semantic model; and clustering the set of attribute vectors to determine the merged attribute values.

[0009] In some embodiments, filtering is performed on multiple initial attribute information for each sample item to obtain filtered attribute information, including: for each sample item, inputting the sample image, category information and initial attribute information of the sample item into a unified pre-trained language model to obtain the predicted attribute value of the initial attribute information; obtaining the prediction accuracy of the predicted attribute value; deleting the initial attribute information corresponding to the prediction accuracy being less than a preset threshold to obtain the filtered attribute information.

[0010] In some embodiments, information calibration is performed on the initial attribute value corresponding to each initial attribute information to obtain a calibrated attribute value, including: for the initial attribute value corresponding to each initial attribute information, information calibration is performed based on the voting method of similar items and attribute values ​​corresponding to the sample item to obtain a calibrated attribute value; and / or for the initial attribute value corresponding to each initial attribute information, information calibration is performed based on the item attribute value corresponding to the user's historical data to obtain a calibrated attribute value.

[0011] In some embodiments, the attribute prediction model includes an attribute classification model for performing a classification task and / or an attribute generation model for performing a generation task.

[0012] Secondly, embodiments of this disclosure provide an information generation method, which includes: acquiring a target image corresponding to a target item, category information and attribute information of the target item; inputting the target image, category information and attribute information of the target item into an attribute prediction model to obtain attribute values ​​of the attribute information, wherein the attribute prediction model is acquired based on the above-described model training method.

[0013] In some embodiments, the attribute prediction model is an attribute generation model; and, inputting the target image, the category information and attribute information of the target item into the attribute prediction model to obtain the attribute value of the attribute information includes: inputting the target image, the category information and attribute information of the target item into the attribute generation model to obtain the attribute value of the attribute information and the description text corresponding to the target item.

[0014] Thirdly, embodiments of this disclosure provide a model training apparatus, comprising: an acquisition module configured to acquire a training sample set, wherein the training sample set includes sample images corresponding to sample items, category information and attribute information of the sample items, and attribute values ​​corresponding to the attribute information; a construction module configured to construct a unified pre-trained language model including a multi-head attention layer and a residual connection layer; and a training module configured to use machine learning methods to train the unified pre-trained language model by taking the category information and attribute information of the sample items as input to the multi-head attention layer, the sample images corresponding to the sample items as input to the residual connection layer, and the attribute values ​​corresponding to the attribute information as the expected output, to obtain an attribute prediction model.

[0015] In some embodiments, the acquisition module includes: an acquisition unit configured to acquire sample images corresponding to multiple sample items, category information of each sample item, multiple initial attribute information of each sample item, and initial attribute values ​​corresponding to each initial attribute information; a preprocessing unit configured to perform preprocessing operations on the multiple initial attribute information and the initial attribute values ​​corresponding to each initial attribute information of each sample item to obtain processed attribute information and processed attribute values; and a composition unit configured to compose a training sample set by combining the sample images corresponding to multiple sample items, the category information of each sample item, the processed attribute information and processed attribute values ​​corresponding to each sample item.

[0016] In some embodiments, the preprocessing unit is further configured to: merge the initial attribute values ​​corresponding to each initial attribute information to obtain merged attribute values; filter the multiple initial attribute information of each sample item to obtain filtered attribute information; enhance the initial attribute values ​​corresponding to each initial attribute information to obtain enhanced attribute values; and calibrate the initial attribute values ​​corresponding to each initial attribute information to obtain calibrated attribute values.

[0017] In some embodiments, the preprocessing unit is further configured to: obtain a set of attribute vectors corresponding to multiple initial attribute values ​​based on a semantic model; cluster the set of attribute vectors to determine the merged attribute values.

[0018] In some embodiments, the preprocessing unit is further configured to: input the sample image, category information and initial attribute information of the sample item into a unified pre-trained language model for each sample item to obtain the predicted attribute value of the initial attribute information; obtain the prediction accuracy of the predicted attribute value; delete the initial attribute information corresponding to the prediction accuracy being less than a preset threshold to obtain the filtered attribute information.

[0019] In some embodiments, the preprocessing unit is further configured to: perform information calibration based on a voting method for similar items and attribute values ​​corresponding to sample items for each initial attribute value, to obtain a calibrated attribute value; and / or perform information calibration based on item attribute values ​​corresponding to user historical data for each initial attribute value, to obtain a calibrated attribute value.

[0020] In some embodiments, the attribute prediction model includes an attribute classification model for performing a classification task and / or an attribute generation model for performing a generation task.

[0021] Fourthly, embodiments of this disclosure provide an information generation apparatus, which includes: an acquisition module configured to acquire a target image corresponding to a target item, category information of the target item, and attribute information; and a generation module configured to input the target image, category information of the target item, and attribute information into an attribute prediction model to obtain attribute values ​​of the attribute information, wherein the attribute prediction model is acquired based on the aforementioned model training method.

[0022] In some embodiments, the attribute prediction model is an attribute generation model; and the generation module is further configured to: input the target image, the category information of the target item and the attribute information into the attribute generation model to obtain the attribute values ​​of the attribute information and the description text corresponding to the target item.

[0023] Fifthly, embodiments of this disclosure provide an electronic device comprising: one or more processors; a storage device having one or more programs stored thereon; and, when the one or more programs are executed by the one or more processors, causing the one or more processors to implement a model training method or an information generation method as described in any embodiment of the first aspect.

[0024] In a sixth aspect, embodiments of this disclosure provide a computer-readable medium having a computer program stored thereon that, when executed by a processor, implements the model training method or information generation method as described in any embodiment of the first aspect.

[0025] The model training method, information generation method, and apparatus provided in the embodiments of this disclosure involve the execution entity first acquiring a training sample set, which includes sample images corresponding to sample items, category information and attribute information of the sample items, and attribute values ​​corresponding to the attribute information. Then, a unified pre-trained language model including a multi-head attention layer and a residual connection layer is constructed. Finally, using machine learning methods, the category information and attribute information of the sample items are used as input to the multi-head attention layer, the sample images corresponding to the sample items are used as input to the residual connection layer, and the attribute values ​​corresponding to the attribute information are used as the expected output to train the unified pre-trained language model, thereby obtaining an attribute prediction model. The attribute prediction model is trained using the sample images corresponding to the sample items, the category information and attribute information of the sample items, enabling deep fusion of image information, category information, and attribute information. This allows the trained attribute prediction model to predict attribute values ​​based on the deep fusion of category information, attribute information, and image information, automatically predicting attribute values ​​and achieving prediction of multiple categories and attributes, thus improving the generation efficiency and accuracy of attribute values. Attached Figure Description

[0026] Other features, objects, and advantages of this disclosure will become more apparent from the following detailed description of non-limiting embodiments with reference to the accompanying drawings:

[0027] Figure 1 This is an exemplary system architecture diagram to which one embodiment of this disclosure can be applied;

[0028] Figure 2 This is a flowchart of an embodiment of the model training method according to the present disclosure;

[0029] Figure 3 This is a flowchart of one embodiment of obtaining a training sample set according to this disclosure;

[0030] Figure 4 This is a flowchart of one embodiment of the preprocessing operation according to this disclosure;

[0031] Figure 5 This is a flowchart of an embodiment of the information generation method according to the present disclosure;

[0032] Figure 6 This is a schematic diagram of the structure of an embodiment of the model training apparatus according to the present disclosure;

[0033] Figure 7 This is a schematic diagram of the structure of an embodiment of the information generation apparatus according to the present disclosure;

[0034] Figure 8 This is a schematic diagram of the structure of an electronic device suitable for implementing embodiments of the present disclosure. Detailed Implementation

[0035] The present disclosure will now be described in further detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the relevant disclosure and not intended to limit it. Furthermore, it should be noted that, for ease of description, only the parts relevant to the disclosure are shown in the accompanying drawings.

[0036] It should be noted that, unless otherwise specified, the embodiments and features described in this disclosure can be combined with each other. This disclosure will now be described in detail with reference to the accompanying drawings and embodiments.

[0037] Figure 1 An exemplary system architecture 100 is shown that can be applied to the model training method, information generation method, model training apparatus, and information generation apparatus of embodiments of the present disclosure.

[0038] like Figure 1 As shown, system architecture 100 may include terminal devices 104, 105, and 106, network 107, and servers 101, 102, and 103. Network 107 serves as the medium for providing communication links between terminal devices 104, 105, and 106 and servers 101, 102, and 103. Network 107 may include various connection types, such as wired or wireless communication links or fiber optic cables, etc.

[0039] Users can interact with servers 101, 102, and 103 belonging to the same server cluster via network 107 through terminal devices 104, 105, and 106 to receive or send information. Various applications can be installed on terminal devices 104, 105, and 106, such as product display applications, data analysis applications, and search applications.

[0040] Terminal devices 104, 105, and 106 can be either hardware or software. When the terminal device is hardware, it can be any electronic device with a display screen that supports communication with the server, including but not limited to smartphones, tablets, laptops, and desktop computers. When the terminal device is software, it can be installed in the electronic devices listed above. It can be implemented as multiple software programs or software modules, or as a single software program or software module. No specific limitations are made here.

[0041] Servers 101, 102, and 103 can be servers that provide various services, such as backend servers that receive requests sent by terminal devices with which they have established communication connections. The backend servers can receive and analyze the requests sent by the terminal devices and generate processing results.

[0042] Servers 101, 102, and 103 can acquire a training sample set, which includes sample images corresponding to sample items, category information and attribute information of sample items, and attribute values ​​corresponding to the attribute information. Then, servers 101, 102, and 103 can construct a unified pre-trained language model including a multi-head attention layer and a residual connection layer. Finally, servers 101, 102, and 103 can use machine learning methods to train the unified pre-trained language model by using the category information and attribute information of sample items as input to the multi-head attention layer, the sample images corresponding to sample items as input to the residual connection layer, and the attribute values ​​corresponding to the attribute information as the expected output, thereby obtaining an attribute prediction model.

[0043] Alternatively, servers 101, 102, and 103 can obtain the target image, category information, and attribute information of the target item. Then, servers 101, 102, and 103 can input the target image, category information, and attribute information of the target item into the attribute prediction model. The attribute prediction model processes the target image, category information, and attribute information of the target item to obtain the attribute values ​​of the attribute information.

[0044] It should be noted that a server can be either hardware or software. When a server is hardware, it can be any electronic device that provides various services to terminal devices. When a server is software, it can be implemented as multiple software programs or software modules providing various services to terminal devices, or it can be implemented as a single software program or software module providing various services to terminal devices. No specific limitations are made here.

[0045] It should be noted that the model training method or information generation method provided in the embodiments of this disclosure can be executed by servers 101, 102, and 103. Accordingly, the model training device or information generation device is disposed in servers 101, 102, and 103.

[0046] It should be understood that Figure 1 The number of terminal devices, networks and servers in the embodiment is merely illustrative. Any number of terminal devices, networks and servers may be provided as required.

[0047] Continue to refer Figure 2 The diagram illustrates a flow 200 of an embodiment of a model training method according to the present disclosure. The model training method includes the following steps:

[0048] Step 210: Obtain the training sample set.

[0049] In this step, the model training method runs on the execution entity (e.g., Figure 1Servers 101, 102, and 103 can read sample images, category information, attribute information, and attribute values ​​corresponding to sample items from the item display platform or a local database via the network. The aforementioned executing entity can obtain sample images corresponding to multiple sample items, and each sample item can correspond to one type of category information, multiple types of attribute information, and each type of attribute information can correspond to one attribute value.

[0050] Among them, the sample items can be items displayed on e-commerce platforms, such as clothes, shoes, and accessories; the category information of the sample items can refer to the classification information of items on e-commerce platforms, such as the category information of clothing, such as women's clothing and men's clothing; the attribute information of the sample items can refer to the information used to describe the sample items, such as the attribute information of clothing, such as collar type, sleeve length type, fit, applicable object type, and other descriptive information; the attribute value corresponding to the attribute information can refer to the specific content of the attribute information, such as collar type, which can include various collar types such as round neck and V-neck, and sleeve length type, which can include various sleeve lengths such as long sleeve and short sleeve.

[0051] As an example, the aforementioned execution entity can obtain sample images corresponding to sample items from an e-commerce platform. The sample item is a garment, and the category information for this garment is women's clothing. Its attribute information includes collar type, sleeve length type, and fit. The attribute values ​​for each attribute can be represented as follows: collar type is round neck, sleeve length type is long sleeve, and fit is loose. The aforementioned execution entity can then use the garment image, the women's clothing category, the collar type, sleeve length type, and fit attribute information, as well as the collar type attribute of round neck, the sleeve length attribute of long sleeve, and the fit attribute of loose, as training samples in the training sample set.

[0052] Step 220: Construct a unified pre-trained language model including a multi-head attention layer and a residual connection layer.

[0053] In this step, after obtaining the training sample set, the aforementioned execution entity can construct a unified pre-trained language model including a multi-head attention layer and a residual connection layer. This unified pre-trained language model is the unilm (Unified Language Model Pre-training for Natural Language Understanding and Generation) model, which can be translated as a unified pre-trained language model for natural language understanding and generation. The framework of the unilm model consists of a multi-layer Transformer network. Furthermore, in related technologies, the Transformer network is a neural network composed of an encoder and a decoder. The input sequence X is directly summed after word embedding and positional encoding, serving as the input to the encoder. The input vector passes through a multi-head self-attention layer, then is input to the residual connection layer for residual connection and normalization, and then fed into the next fully connected layer (position-wise feed-forward network). After another residual connection and normalization, the result is output to the decoder. The aforementioned execution entity can then construct a unified pre-trained language model, including a multi-head attention layer and a residual connection layer, based on the Transformer network in related technologies.

[0054] Step 230: Using machine learning methods, the category information and attribute information of the sample items are used as input to the multi-head attention layer, the sample image corresponding to the sample items is used as input to the residual connection layer, and the attribute value corresponding to the attribute information is used as the expected output. The unified pre-trained language model is trained to obtain the attribute prediction model.

[0055] In this step, after the aforementioned execution entity obtains the training sample set and constructs the unified pre-trained language model, it can use machine learning methods to train the unified pre-trained language model based on the training sample set to obtain an attribute prediction model for predicting the attribute values ​​corresponding to attribute information.

[0056] Specifically, the aforementioned execution entity can input the category information, attribute information, and corresponding sample image of the sample item into the unified pre-trained language model. The category information and attribute information of the sample item are used as input to the multi-head attention layer, and the corresponding sample image of the sample item is used as input to the residual connection layer. After processing by the unified pre-trained language model, the predicted attribute value corresponding to the attribute information can be obtained. The network structure of the unified pre-trained language model can be the network framework of the unilm model in related technologies, and the parameter processing flow in other network layers can also refer to the processing flow of the unilm model in related technologies.

[0057] In this process, the execution entity concatenates category information and attribute information as text input to the Embedding Lookup layer of the unified pre-trained language model for vectorization, obtaining concatenated vectors corresponding to the category information and attribute information. The sample image is also processed by image vectorization to obtain image vectors. The execution entity can then input the concatenated vectors into a multi-head attention layer for processing to obtain the output results. The output results are then input into the residual connection layer, and the image vectors are also input into the residual connection layer. The image vectors and concatenated vectors are fused together, and various required local feature vectors are obtained in the continuously stacked Transformer network.

[0058] During training, the aforementioned execution entity can use the attribute values ​​corresponding to the attribute information in the training sample set as the expected output. Then, it compares the predicted attribute values ​​with the expected output to determine if the predicted attribute values ​​meet the constraints. If the predicted attribute values ​​do not meet the constraints, the network parameters of the unified pre-trained language model are adjusted, and the category information, attribute information, and corresponding sample images of the sample items are input again to continue training. If the predicted attribute values ​​meet the constraints, the model training is complete, and the attribute prediction model is obtained. The constraint can be that the difference between the predicted attribute value and the attribute value corresponding to the attribute information in the training sample set meets a preset threshold. This preset threshold can be pre-set based on experience, and this disclosure does not specifically limit it.

[0059] As an optional implementation, the attribute prediction model may include an attribute classification model for performing classification tasks and / or an attribute generation model for performing generation tasks.

[0060] Specifically, the unified pre-trained language model constructed by the aforementioned execution entity is a multi-layer Transformer network capable of simultaneously achieving three pre-training objectives. Due to the addition of a sequence-to-sequence training method, it can perform both NLU (Natural Language Understanding) and NLG (Natural Language Generation) tasks. For the NLU task, the execution entity can fine-tune the unified pre-trained language model into a bidirectional Transformer encoder, enabling it to perform text classification. For the NLG task, the execution entity can fine-tune the unified pre-trained language model using self-attention masks during pre-training, enabling it to perform text generation.

[0061] During the training process of the unified pre-trained language model using the training sample set, the aforementioned execution entities can fine-tune the unified pre-trained language model to varying degrees, enabling it to perform different tasks. This results in an attribute classification model for performing classification tasks and / or an attribute generation model for performing generation tasks. Specifically, the attribute classification model can perform classification processing based on the input image, category information, and attribute information, outputting the classification result corresponding to the attribute information, i.e., the attribute value corresponding to the attribute information. Similarly, the attribute generation model can perform generation processing based on the input image, category information, and attribute information, outputting the generation result corresponding to the attribute information, i.e., the attribute value corresponding to the attribute information.

[0062] Furthermore, during the training process, the aforementioned execution entity uses word (attribute value) granular encoding, which enables one decoding prediction to generate one attribute value, and puts multiple attributes into a batch to perform prediction of multiple attribute values ​​in parallel. By increasing the batch processing capacity, it achieves performance similar to a general classifier. One SKU (stock keeping unit) only needs one batch prediction to generate all the attribute values ​​to be predicted.

[0063] In this implementation, by fine-tuning and training a unified pre-trained language model based on the same batch of training samples, two prediction models capable of handling different tasks are generated. This enables the generated models to handle different prediction tasks, such as generating an attribute classification model based on a classification task and generating an attribute generation model based on a generation task. This adapts to different task requirements and improves the efficiency and diversity of model training.

[0064] The model training method provided in the embodiments of this disclosure involves the execution entity first acquiring a training sample set, which includes sample images corresponding to sample items, category information and attribute information of the sample items, and attribute values ​​corresponding to the attribute information. Then, a unified pre-trained language model including a multi-head attention layer and a residual connection layer is constructed. Finally, using machine learning methods, the category information and attribute information of the sample items are used as input to the multi-head attention layer, the sample images corresponding to the sample items are used as input to the residual connection layer, and the attribute values ​​corresponding to the attribute information are used as the expected output to train the unified pre-trained language model, thereby obtaining an attribute prediction model. The attribute prediction model is trained using the sample images corresponding to the sample items, the category information and attribute information of the sample items, enabling deep fusion of image information, category information, and attribute information. This allows the trained attribute prediction model to predict attribute values ​​based on the deep fusion of category information, attribute information, and image information, automatically predicting attribute values ​​and achieving prediction of multiple categories and attributes, thus improving the generation efficiency and accuracy of attribute values.

[0065] refer to Figure 3 , Figure 3 The flowchart shown illustrates one embodiment of obtaining a training sample set, namely step 210 above, which may include the following steps:

[0066] Step 310: Obtain sample images corresponding to multiple sample items, category information of each sample item, multiple initial attribute information of each sample item, and initial attribute values ​​corresponding to each initial attribute information.

[0067] In this step, the terminal can display an item information entry interface to the user on the screen. This interface includes sections for entering the item image, category information, attribute information, and attribute values. Users can upload an item image, enter the item's category information, attribute information, and corresponding attribute values ​​on the entry interface. For example, a user might upload an image of a garment on the terminal's entry interface and need to enter the garment's category information (women's clothing), attribute information (collar type, sleeve length type, fit, etc.), and the corresponding attribute values ​​for each attribute (crew neck, long sleeves, loose fit, etc.).

[0068] The aforementioned executing entity can obtain item information filled in by different users on an e-commerce platform via the network. Using the items on the e-commerce platform as sample items, the category information filled in by users as the category information of the sample items, the attribute information filled in by users as multiple initial attribute information for each sample item, and the attribute values ​​filled in by users as the initial attribute values ​​corresponding to each initial attribute information, the executing entity can obtain multiple sample items from the e-commerce platform and obtain the sample image corresponding to each sample item, the category information of each sample item, the multiple initial attribute information of each sample item, and the initial attribute values ​​corresponding to each initial attribute information.

[0069] Step 320: Perform preprocessing operations on the multiple initial attribute information and the initial attribute value corresponding to each initial attribute information for each sample item to obtain the processed attribute information and the processed attribute value.

[0070] In this step, the aforementioned executing entity obtains sample images corresponding to multiple sample items, category information for each sample item, multiple initial attribute information for each sample item, and initial attribute values ​​corresponding to each initial attribute information through the e-commerce platform. Due to issues such as unpredictability of some attribute information and non-standard attribute value input, preprocessing operations can be performed on the multiple initial attribute information and the initial attribute values ​​corresponding to each initial attribute information for each sample item to obtain processed attribute information and processed attribute values. This preprocessing operation can represent filtering and unifying of the initial attribute information and initial attribute values, and can include operations such as improving and eliminating attribute information and attribute values ​​as found in existing technologies.

[0071] Step 330: The sample images corresponding to multiple sample items, the category information of each sample item, the processed attribute information and the processed attribute values ​​corresponding to each sample item are combined to form a training sample set.

[0072] In this step, after the aforementioned execution entity performs preprocessing operations on the multiple initial attribute information and the initial attribute value corresponding to each initial attribute information for each sample item, it can form a training sample set by combining the sample images corresponding to multiple sample items, the category information of each sample item, the processed attribute information and the processed attribute value corresponding to each sample item. Thus, the training sample set can include the sample images corresponding to multiple sample items, the category information and attribute information of each sample item, and the attribute value corresponding to the attribute information.

[0073] In this implementation, by preprocessing the initial samples, the processed attribute information and processed attribute values ​​are combined to form a training sample set. This allows for the filtering and unification of the initial data, making the training data in the training sample set more complete, improving the accuracy and balance of the training data in the training sample set, and providing high-quality training data for model training.

[0074] refer to Figure 4 , Figure 4 A flowchart illustrating an embodiment of a preprocessing operation is provided. The preprocessing operation includes at least one of the following: merging the initial attribute values ​​corresponding to each initial attribute information to obtain merged attribute values; filtering the multiple initial attribute information of each sample item to obtain filtered attribute information; enhancing the multiple initial attribute information of each sample item to obtain enhanced attribute information; and calibrating the initial attribute values ​​corresponding to each initial attribute information to obtain calibrated attribute values. Each preprocessing operation can be executed sequentially, in parallel, or partially; the execution order of each preprocessing operation is not critical. The above preprocessing operation may include the following steps:

[0075] Step 410: Merge the initial attribute values ​​corresponding to each initial attribute information to obtain merged attribute values.

[0076] In this step, due to the lack of unified standards for filling in attribute values ​​on e-commerce platforms, different users fill in inconsistent attribute values, resulting in different users expressing the same attribute value in different ways. The aforementioned execution entity obtains the initial attribute values ​​filled in by different users on the e-commerce platform, and the same initial attribute value may be expressed in different ways.

[0077] The aforementioned executing entity statistically analyzes the initial attribute values ​​corresponding to different sample items, obtaining the same attribute value for different sample items. Then, the executing entity performs semantic analysis on these same attribute values, merging attribute values ​​expressed in different ways to achieve a unified representation, resulting in merged attribute values.

[0078] As an example, after the aforementioned executing entity obtains multiple initial attribute information of different sample items and the initial attribute value corresponding to each initial attribute information, if it determines that the same initial attribute value of multiple sample items is expressed as male, male, man, etc., the aforementioned executing entity can unify the different expressions of the same initial attribute value, that is, merge these initial attribute values, for example, make these initial attribute values ​​uniformly expressed as male, thereby obtaining the merged attribute value.

[0079] As an optional implementation, step 410 above, which merges the initial attribute values corresponding to each initial attribute information to obtain the merged attribute values, may include the following steps:

[0080] First, based on the semantic model, obtain a set of attribute vectors corresponding to multiple initial attribute values.

[0081] Specifically, the above-mentioned execution entity can obtain sample images corresponding to multiple sample items, category information of each sample item, multiple initial attribute information of each sample item, and initial attribute values corresponding to each initial attribute information in an e-commerce platform. The e-commerce platform also includes title information for describing each sample item, where the title information can correspond to the attribute values of the sample item.

[0082] The above-mentioned execution entity can construct a semantic model according to the title information of the sample item. The semantic model can be a semantic analysis model for outputting word vectors, and the semantic model can be a Word2Vec model. The Word2Vec model is a model that learns semantic knowledge in an unsupervised manner from a large amount of text corpora. It is widely used in natural language processing (NLP). The Word2Vec model can simplify the processing of text content into vector operations in a K-dimensional vector space by training, and represent the semantic information of words in the form of word vectors by learning the text. Then the above-mentioned execution entity inputs the obtained multiple initial attribute values into the semantic model. The semantic model processes the input multiple initial attribute values, outputs an attribute vector corresponding to each initial attribute value, and forms a set of attribute vectors with the multiple attribute vectors.

[0083] Second, cluster the set of attribute vectors to determine the merged attribute values.

[0084] Specifically, after the above-mentioned execution entity obtains a set of attribute vectors corresponding to multiple initial attribute values, it uses a clustering algorithm to cluster the attribute vectors in the set of attribute vectors, aggregates similar and co-occurring attribute values, and obtains multiple candidate synonym sets. Each candidate synonym set includes multiple similar and co-occurring attribute values. For example, the first candidate synonym set includes "male", "gentleman", "man", etc., and the second candidate synonym set includes "female", "lady", "woman", etc. Then the above-mentioned execution entity can select an attribute value from the attribute values included in each candidate synonym set according to a preset rule, and use this attribute value as the merged attribute value corresponding to the attribute values in the candidate synonym set. Among them, the preset rule can be a pre-set word selection rule, which can be to select the word with the highest frequency of occurrence, or to select the word with the largest word count, etc. The present disclosure does not make specific limitations on this.

[0085] Optionally, after obtaining multiple candidate synonym sets, the executing entity can send these sets to the terminal. The terminal then displays the received candidate synonym sets to the verification user, who verifies the attribute values ​​in each set to determine if they are correct. If correct, the user sends a confirmation message to the executing entity, which then processes each candidate synonym set to determine the merged attribute values.

[0086] In this implementation, by performing semantic analysis and clustering on each initial attribute value, the information of the initial attribute values ​​can be merged to obtain attribute values ​​with unified representation, thereby improving the accuracy of attribute values ​​in the training sample set.

[0087] Step 420: Filter the multiple initial attribute information of each sample item to obtain the filtered attribute information.

[0088] In this step, since the attribute information of the sample items on the e-commerce platform is obtained by the user based on the actual information of the sample items, there will be some attribute information in the sample items that cannot be predicted from the image. The aforementioned execution entity obtains the initial attribute information filled in by different users on the e-commerce platform. Among the multiple initial attribute information filled in, there will be unpredictable attribute information. For example, the initial attribute information of clothing may include unpredictable initial attribute information such as clothing material, clothing place of origin, and production date.

[0089] The aforementioned execution entity can pre-set a preset attribute information database consisting of unpredictable attribute information. After obtaining multiple initial attribute information for each sample item, it compares the multiple initial attribute information for each sample item with each unpredictable attribute information in the preset attribute information database. If the multiple initial attribute information includes unpredictable attribute information, then the initial attribute information is filtered, thereby achieving information filtering of multiple initial attribute information for each sample item to obtain filtered attribute information. The filtered attribute information can all be predicted based on the image.

[0090] As an optional implementation, step 420 above, which filters the multiple initial attribute information of each sample item to obtain filtered attribute information, may include the following steps:

[0091] The first step is to input the sample image, category information, and initial attribute information of each sample item into a unified pre-trained language model to obtain the predicted attribute values ​​of the initial attribute information.

[0092] Specifically, after obtaining sample images corresponding to multiple sample items, category information for each sample item, multiple initial attribute information for each sample item, and initial attribute values ​​corresponding to each initial attribute information, the aforementioned executing entity can input the sample image, category information, and initial attribute information of each sample item into a unified pre-trained language model for each sample item. This unified pre-trained language model can be similar to the one described above. Figure 2 An untrained unified pre-trained language model in China can also be one of the above. Figure 2 The attribute prediction model is trained using machine learning methods. The unified pre-trained language model can process the sample images, category information, and initial attribute information of the input sample items to obtain the predicted attribute values ​​of the initial attribute information.

[0093] The second step is to obtain the prediction accuracy of the predicted attribute values.

[0094] Specifically, after obtaining the predicted attribute values ​​of the initial attribute information using a unified pre-trained language model, the aforementioned executing entity can compare the predicted attribute values ​​with the initial attribute values ​​corresponding to the initial attribute information, and determine the prediction accuracy of the predicted attribute values ​​using the accuracy calculation method in related technologies.

[0095] As an example, after the execution entity obtains the predicted attribute value corresponding to the initial attribute information, it processes the predicted attribute value and the initial attribute value corresponding to the initial attribute information, calculates the similarity between the predicted attribute value and the initial attribute value corresponding to the initial attribute information using a similarity calculation method, and uses this similarity as the prediction accuracy of the predicted attribute value. The higher the similarity, the closer the predicted attribute value is to the initial attribute value, and the higher the prediction accuracy.

[0096] The third step is to delete the initial attribute information corresponding to the prediction accuracy being less than the preset threshold, and obtain the filtered attribute information.

[0097] Specifically, after determining the prediction accuracy of the predicted attribute value, the aforementioned executing entity compares the prediction accuracy with a preset threshold to determine whether the prediction accuracy is less than the preset threshold. This preset threshold can be pre-set based on experience, and this disclosure does not specifically limit it. If it is determined that the prediction accuracy is less than the preset threshold, the initial attribute value corresponding to that prediction accuracy is deleted to obtain filtered attribute information.

[0098] Optionally, the execution entity compares the prediction accuracy with a preset threshold, and stores the initial attribute information corresponding to prediction accuracy less than the preset threshold in a preset information database. This database includes the predicted initial attribute information corresponding to prediction accuracy less than the preset threshold. The execution entity can send the preset information database to a terminal, which then displays it to a verification user. The verification user verifies multiple initial attribute information entries in the database to determine whether the initial attribute information cannot be predicted based on the image. If it is determined that the initial attribute information in the database cannot be predicted based on the image, a confirmation message can be sent to the execution entity, which can then delete the initial attribute information from the database, thus determining the filtered attribute information.

[0099] In this implementation, by predicting and judging the accuracy of each initial attribute information, information filtering of the initial attribute information can be achieved, removing attribute information that cannot be predicted from the image, thereby improving the accuracy of attribute information in the training sample set.

[0100] Step 430: Enhance the initial attribute value corresponding to each initial attribute information to obtain the enhanced attribute value.

[0101] In this step, the aforementioned executing entity obtains sample images corresponding to multiple sample items, category information for each sample item, multiple initial attribute information for each sample item, and initial attribute values ​​corresponding to each initial attribute information from the e-commerce platform. Since the item information for each sample item is filled in by different users, the distribution of initial attribute values ​​among different sample items is extremely uneven. The sample size of initial attribute values ​​under some initial attribute information can even differ by hundreds or thousands of times. Training the model on an imbalanced dataset will lead to a lack of generalization ability and a tendency to uniformly predict attribute values ​​with large magnitudes. Therefore, it is necessary to balance the dataset.

[0102] The aforementioned execution entity can statistically analyze the initial attribute values ​​of each sample item to identify the initial attribute values ​​with the smallest data volume. Then, the execution entity can perform information augmentation on these initial attribute values, which may include data augmentation methods such as mirroring and mixup (mixed-class augmentation), to obtain augmented attribute values.

[0103] As an example, the aforementioned execution entity statistically analyzes the initial attribute values ​​of each sample item, identifies the initial attribute values ​​with less data, and then uses the mirror-flipping data augmentation method to augment these initial attribute values, obtaining the augmented attribute values. Alternatively, the initial attribute values ​​with less data are augmented using the mixup data augmentation method, resulting in the augmented attribute values. Or, some of the initial attribute values ​​with less data are augmented using the mirror-flipping data augmentation method, while the remaining initial attribute values ​​with less data are augmented using the mixup data augmentation method, resulting in the augmented attribute values.

[0104] Step 440: Perform information calibration on the initial attribute value corresponding to each initial attribute information to obtain the calibrated attribute value.

[0105] In this step, since the attribute information of sample items on the e-commerce platform is obtained by users based on the actual information of the sample items, the attribute values ​​corresponding to the attribute information may be inaccurate. After the execution entity obtains the sample images corresponding to multiple sample items, the category information of each sample item, multiple initial attribute information of each sample item, and the initial attribute values ​​corresponding to each initial attribute information, it can input the sample image, category information, and initial attribute information of each sample item into a unified pre-trained language model for each sample item. This unified pre-trained language model can be similar to the one described above. Figure 2 An untrained unified pre-trained language model in China can also be one of the above. Figure 2 The attribute prediction model is trained using machine learning methods. The unified pre-trained language model can process the sample images, category information, and initial attribute information of the input sample items to obtain the predicted attribute values ​​of the initial attribute information.

[0106] The aforementioned execution entity compares the initial attribute value corresponding to each initial attribute information with the corresponding predicted attribute value to calibrate the initial attribute value corresponding to each initial attribute information, determine whether the initial attribute value corresponding to the initial attribute information is accurate, delete or modify inaccurate initial attribute values, and obtain calibrated attribute values.

[0107] As an optional implementation, step 440 above, which involves calibrating the initial attribute value corresponding to each initial attribute information to obtain a calibrated attribute value, may include the following steps: for each initial attribute value corresponding to the initial attribute information, performing information calibration based on a voting method for similar items and attribute values ​​corresponding to the sample item to obtain a calibrated attribute value; and / or, for each initial attribute value corresponding to the initial attribute information, performing information calibration based on item attribute values ​​corresponding to user historical data to obtain a calibrated attribute value.

[0108] Specifically, after obtaining sample images corresponding to multiple sample items, category information for each sample item, multiple initial attribute information for each sample item, and initial attribute values ​​corresponding to each initial attribute information, the aforementioned executing entity can perform a similar item search based on the sample images of the sample items to obtain similar items. The executing entity can obtain the attribute information and attribute values ​​of the similar items and compare them with the initial attribute information and initial attribute values ​​of the sample items using an attribute value voting method. If the attribute values ​​are the same as those of multiple similar items, the initial attribute values ​​are calibrated to obtain calibrated attribute values.

[0109] Alternatively, the aforementioned implementing entity can collect users' historical data on e-commerce platforms. This historical data may include users' historical search data, which may contain multiple attribute values. It can then further obtain the searched items corresponding to the historical search data and, based on the user's clicks on these items, determine the correspondence between the searched items and the attribute values. We assume that the attribute values ​​of the items clicked by the user correspond to the attribute values ​​in the historical search data. The aforementioned implementing entity can determine the item attribute values ​​corresponding to the user's historical data based on the user's historical data associated with the sample items, and then calibrate the initial attribute values ​​corresponding to each initial attribute information based on the item attribute values ​​to obtain calibrated attribute values.

[0110] The aforementioned executing entity may simultaneously perform information calibration on the initial attribute value corresponding to each initial attribute information through both of the above information calibration methods, or may perform information calibration on the initial attribute value corresponding to each initial attribute information through one of the information calibration methods. This disclosure does not make any specific limitations on this.

[0111] In this implementation, information calibration is performed by using the initial attribute value corresponding to each initial attribute information, which enables the accuracy judgment of the initial attribute value and improves the accuracy of attribute values ​​in the training sample set.

[0112] In this implementation, the preprocessing operations on the initial training samples are achieved through information merging, information filtering, information augmentation and information calibration, which can obtain higher quality training samples, make the training data in the training sample set more complete, improve the accuracy and balance of the training data in the training sample set, and provide high-quality training data for model training.

[0113] refer to Figure 5 , Figure 5 This illustrates a flow 500 of an embodiment of the information generation method according to the present disclosure. The information generation method may include the following steps:

[0114] Step 510: Obtain the target image, category information, and attribute information of the target item.

[0115] In this step, the model training method runs on the execution entity (e.g., Figure 1 Servers 101, 102, and 103 can obtain the target image corresponding to the target item, the category information and attribute information of the target item, wherein the category information and attribute information of the target item can be information obtained by the user based on the target item on the terminal.

[0116] Step 520: Input the target image, category information and attribute information of the target item into the attribute prediction model to obtain the attribute values ​​of the attribute information.

[0117] In this step, after the execution entity obtains the target image, category information, and attribute information of the target item, it can input the target image, category information, and attribute information of the target item into the attribute prediction model. The multi-head attention layer in the attribute prediction model can process the category information and attribute information of the target item to obtain a spliced ​​vector. The residual connection layer in the attribute prediction model can process the spliced ​​vector and the image vector corresponding to the target image. The attribute prediction model outputs the attribute value corresponding to the attribute information.

[0118] As an example, if the target item is clothing, the category information is women's clothing, and the attribute information is collar type, then the above-mentioned execution entity inputs the target image corresponding to the clothing, the women's clothing category, and the collar type into the attribute prediction model. The multi-head attention layer in the attribute prediction model can process the women's clothing category and the collar type to obtain a spliced ​​vector. The residual connection layer in the attribute prediction model can process the spliced ​​vector and the image vector corresponding to the target image. The attribute prediction model outputs the attribute value corresponding to the collar type as round neck.

[0119] The aforementioned attribute prediction model is obtained based on the aforementioned attribute prediction model training method, that is, it can be based on the aforementioned... Figure 2-4 The steps involved in obtaining the attribute prediction model enable it to predict various target images, category information, and attribute information.

[0120] The information generation method provided in the embodiments of this disclosure involves the execution entity first obtaining the target image, category information, and attribute information of the target item, and then inputting the target image, category information, and attribute information of the target item into an attribute prediction model to obtain the attribute value of the attribute information. The attribute prediction model is obtained based on the above-mentioned model training method and can automatically predict the attribute value of the attribute information, realize the prediction of multiple categories and multiple attributes, and improve the generation efficiency and accuracy of the attribute value of the attribute information.

[0121] As an optional implementation, the attribute prediction model is an attribute generation model; and, in step 520 above, inputting the target image, the category information and attribute information of the target item into the attribute prediction model to obtain the attribute value of the attribute information may include the following steps: inputting the target image, the category information and attribute information of the target item into the attribute generation model to obtain the attribute value of the attribute information and the description text corresponding to the target item.

[0122] Specifically, the aforementioned attribute prediction model can include an attribute classification model and an attribute generation model. If the attribute prediction model is an attribute generation model, the executing entity inputs the target image, the category information of the target item, and the attribute information into the attribute generation model. The attribute generation model processes the input content and generates attribute values ​​corresponding to the attribute information. Furthermore, the attribute generation model can also generate descriptive text to describe the target item based on the generated attribute values. In this implementation, generating attribute values ​​and descriptive text through the attribute generation model enables more specific and accurate generation of target item information, improving model performance.

[0123] Further reference Figure 6 As an implementation of the methods shown in the above figures, this disclosure provides an embodiment of a model training apparatus. This apparatus embodiment is similar to... Figure 2 The method embodiments shown correspond to those described.

[0124] like Figure 6 As shown, the model training device 600 in this embodiment may include: an acquisition module 610, a construction module 620, and a training module 630.

[0125] The acquisition module 610 is configured to acquire a training sample set, which includes sample images corresponding to sample items, category information and attribute information of sample items, and attribute values ​​corresponding to the attribute information.

[0126] Module 620 is configured to build a unified pre-trained language model that includes a multi-head attention layer and a residual connection layer.

[0127] The training module 630 is configured to use machine learning methods to train a unified pre-trained language model by taking the category information and attribute information of the sample items as input to the multi-head attention layer, the sample image corresponding to the sample items as input to the residual connection layer, and the attribute value corresponding to the attribute information as the expected output, to obtain an attribute prediction model.

[0128] In some optional implementations of this embodiment, the acquisition module includes: an acquisition unit configured to acquire sample images corresponding to multiple sample items, category information of each sample item, multiple initial attribute information of each sample item, and initial attribute values ​​corresponding to each initial attribute information; a preprocessing unit configured to perform preprocessing operations on the multiple initial attribute information and the initial attribute values ​​corresponding to each initial attribute information of each sample item to obtain processed attribute information and processed attribute values; and a composition unit configured to compose a training sample set by combining the sample images corresponding to multiple sample items, the category information of each sample item, the processed attribute information and processed attribute values ​​corresponding to each sample item.

[0129] In some optional implementations of this embodiment, the preprocessing unit is further configured to: merge the initial attribute values ​​corresponding to each initial attribute information to obtain merged attribute values; filter the multiple initial attribute information of each sample item to obtain filtered attribute information; enhance the initial attribute values ​​corresponding to each initial attribute information to obtain enhanced attribute values; and calibrate the initial attribute values ​​corresponding to each initial attribute information to obtain calibrated attribute values.

[0130] In some optional implementations of this embodiment, the preprocessing unit is further configured to: obtain a set of attribute vectors corresponding to multiple initial attribute values ​​based on the semantic model; cluster the set of attribute vectors to determine the merged attribute values.

[0131] In some optional implementations of this embodiment, the preprocessing unit is further configured to: input the sample image, category information and initial attribute information of each sample item into a unified pre-trained language model to obtain the predicted attribute value of the initial attribute information; obtain the prediction accuracy of the predicted attribute value; delete the initial attribute information corresponding to the prediction accuracy being less than a preset threshold to obtain the filtered attribute information.

[0132] In some optional implementations of this embodiment, the preprocessing unit is further configured to: perform information calibration based on the voting method of similar items and attribute values ​​corresponding to the sample item for the initial attribute value corresponding to each initial attribute information, to obtain the calibrated attribute value; and / or perform information calibration based on the item attribute value corresponding to the user's historical data for the initial attribute value corresponding to each initial attribute information, to obtain the calibrated attribute value.

[0133] In some alternative implementations of this embodiment, the attribute prediction model includes an attribute classification model for performing a classification task and / or an attribute generation model for performing a generation task.

[0134] The model training apparatus provided in the above embodiments of this disclosure first obtains a training sample set, which includes sample images corresponding to sample items, category information and attribute information of the sample items, and attribute values ​​corresponding to the attribute information. Then, a unified pre-trained language model including a multi-head attention layer and a residual connection layer is constructed. Finally, using machine learning methods, the category information and attribute information of the sample items are used as input to the multi-head attention layer, the sample images corresponding to the sample items are used as input to the residual connection layer, and the attribute values ​​corresponding to the attribute information are used as the expected output to train the unified pre-trained language model, thereby obtaining an attribute prediction model. The attribute prediction model is trained using the sample images corresponding to the sample items, the category information and attribute information of the sample items, so that the image information, category information and attribute information can be deeply integrated. The trained attribute prediction model predicts attribute values ​​based on the deep integration of category information, attribute information and image information, and can automatically predict the attribute values ​​of attribute information, realize the prediction of multiple categories and multiple attributes, and improve the generation efficiency and accuracy of attribute values ​​of attribute information.

[0135] Those skilled in the art will understand that the above-described apparatus also includes other well-known structures, such as processors and memories. To avoid unnecessarily obscuring the embodiments of this disclosure, these well-known structures are... Figure 6 Not shown in the image.

[0136] Further reference Figure 7 As an implementation of the methods shown in the above figures, this disclosure provides an embodiment of an information generation apparatus. This apparatus embodiment is similar to... Figure 5 The method embodiments shown correspond to those described.

[0137] like Figure 7 As shown, the information generation device 700 of this embodiment may include: an acquisition module 710 and a generation module 720.

[0138] The acquisition module 710 is configured to acquire the target image, category information and attribute information of the target item corresponding to the target item;

[0139] The generation module 720 is configured to input the target image, the category information and attribute information of the target item into the attribute prediction model to obtain the attribute values ​​of the attribute information, wherein the attribute prediction model is obtained based on the above model training method.

[0140] In some optional implementations of this embodiment, the attribute prediction model is an attribute generation model; and the generation module is further configured to: input the target image, the category information of the target item and the attribute information into the attribute generation model to obtain the attribute values ​​of the attribute information and the description text corresponding to the target item.

[0141] The information generation apparatus provided in the above embodiments of this disclosure first obtains the target image, category information and attribute information of the target item corresponding to the target item, and then inputs the target image, category information and attribute information of the target item into the attribute prediction model to obtain the attribute value of the attribute information. The attribute prediction model is obtained based on the above model training method and can automatically predict the attribute value of the attribute information, realize the prediction of multiple categories and multiple attributes, and improve the generation efficiency and accuracy of the attribute value of the attribute information.

[0142] Those skilled in the art will understand that the above-described apparatus also includes other well-known structures, such as processors and memories. To avoid unnecessarily obscuring the embodiments of this disclosure, these well-known structures are... Figure 7 Not shown in the image.

[0143] The following is for reference. Figure 8 The diagram illustrates a structural schematic of an electronic device 800 suitable for implementing embodiments of the present disclosure. Terminal devices in embodiments of the present disclosure may include, but are not limited to, mobile terminals such as smart screens, laptops, tablets, PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 8 The terminal device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments of this disclosure.

[0144] like Figure 8 As shown, the electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processor, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803. The RAM 803 also stores various programs and data required for the operation of the electronic device 800. The processing device 801, ROM 802, and RAM 803 are interconnected via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.

[0145] Typically, the following devices can be connected to I / O interface 805: input devices 806 including, for example, touchscreens, touchpads, keyboards, mice, cameras, microphones, accelerometers, gyroscopes, etc.; output devices 807 including, for example, liquid crystal displays (LCDs), speakers, vibrators, etc.; storage devices 808 including, for example, magnetic tapes, hard disks, etc.; and communication devices 809. Communication device 809 allows electronic device 800 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 8An electronic device 800 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 8 Each box shown can represent a device or multiple devices as needed.

[0146] Specifically, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, 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 809, or installed from a storage device 808, or installed from a ROM 802. When the computer program is executed by a processing device 801, it performs the functions defined in the methods of embodiments of this disclosure. It should be noted that the computer-readable medium of embodiments of this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. The computer-readable storage medium can 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 computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, 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 devices, magnetic storage devices, or any suitable combination thereof. In 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 connection with an instruction execution system, apparatus, or device. In 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 may also 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. Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.

[0147] Computer program code for performing the operations of embodiments of this disclosure can be written in one or more programming languages ​​or a combination thereof. Programming languages ​​include object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as 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 it can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0148] 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 application. 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.

[0149] The units described in the embodiments of this application can be implemented in software or hardware. The described units can also be housed in a processor; for example, a processor can be described as including an acquisition module, a construction module, and a training module, wherein the names of these modules do not necessarily limit the module itself.

[0150] In another aspect, this application also provides a computer-readable medium, which may be included in the aforementioned electronic device or may exist independently without being assembled into the electronic device. The computer-readable medium carries one or more programs, which, when executed by the electronic device, cause the electronic device to: acquire a training sample set, wherein the training sample set includes sample images corresponding to sample items, category information and attribute information of the sample items, and attribute values ​​corresponding to the attribute information; construct a unified pre-trained language model including a multi-head attention layer and a residual connection layer; and use machine learning methods to train the unified pre-trained language model by using the category information and attribute information of the sample items as input to the multi-head attention layer, the sample images corresponding to the sample items as input to the residual connection layer, and the attribute values ​​corresponding to the attribute information as the expected output, thereby obtaining an attribute prediction model.

[0151] The above description is merely a preferred embodiment 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 training method, the method comprising: A preprocessing operation is performed on multiple initial attribute information and the corresponding initial attribute value for each of the multiple sample items to obtain processed attribute information and processed attribute values. The preprocessing operation includes: for each sample item, inputting the sample image, category information and initial attribute information of the sample item into a unified pre-trained language model to obtain the predicted attribute value of the initial attribute information; obtaining the prediction accuracy of the predicted attribute value; deleting the initial attribute information corresponding to the prediction accuracy being less than a preset threshold to obtain filtered attribute information. The training sample set consists of sample images corresponding to multiple sample items, category information of each sample item, processed attribute information and processed attribute values ​​corresponding to each sample item; Construct a unified pre-trained language model that includes a multi-head attention layer and a residual connection layer; Using machine learning methods, the category information and attribute information of the sample items are used as inputs to the multi-head attention layer, the sample images corresponding to the sample items are used as inputs to the residual connection layer, and the attribute values ​​corresponding to the attribute information are used as the expected output. The unified pre-trained language model is then trained to obtain an attribute prediction model.

2. The method according to claim 1, wherein, The preprocessing operation also includes at least one of the following: The initial attribute values ​​corresponding to each initial attribute information are merged to obtain the merged attribute values. Information enhancement is performed on the initial attribute value corresponding to each initial attribute information to obtain the enhanced attribute value; The initial attribute value corresponding to each initial attribute information is calibrated to obtain the calibrated attribute value.

3. The method according to claim 2, wherein, The step of merging the initial attribute values ​​corresponding to each initial attribute information to obtain merged attribute values ​​includes: Based on the semantic model, obtain a set of attribute vectors corresponding to multiple initial attribute values; Cluster the attribute vector set to determine the merged attribute values.

4. The method according to claim 2, wherein, The step of calibrating the initial attribute value corresponding to each initial attribute information to obtain the calibrated attribute value includes: For each initial attribute value, information calibration is performed based on the voting method of similar items and attribute values ​​corresponding to the sample item to obtain the calibrated attribute value; and / or For each initial attribute value, the information is calibrated based on the item attribute values ​​corresponding to the user's historical data to obtain the calibrated attribute value.

5. The method according to claim 1, wherein, The attribute prediction model includes an attribute classification model for performing classification tasks and / or an attribute generation model for performing generation tasks.

6. An information generation method, the method comprising: Obtain the target image corresponding to the target item, the category information and attribute information of the target item; The target image, the category information and attribute information of the target item are input into the attribute prediction model to obtain the attribute value of the attribute information, wherein the attribute prediction model is obtained based on the method of any one of claims 1-5.

7. The method according to claim 6, wherein, The attribute prediction model is an attribute generation model; And, the step of inputting the target image, the category information and attribute information of the target item into the attribute prediction model to obtain the attribute values ​​of the attribute information includes: The target image, the category information and attribute information of the target item are input into the attribute generation model to obtain the attribute values ​​of the attribute information and the description text corresponding to the target item.

8. A model training apparatus, the apparatus comprising: The acquisition module includes: an acquisition unit configured to acquire sample images corresponding to multiple sample items, category information of each sample item, multiple initial attribute information of each sample item, and initial attribute values ​​corresponding to each initial attribute information; a preprocessing unit configured to, for each sample item, input the sample image, category information, and initial attribute information of the sample item into a unified pre-trained language model to obtain predicted attribute values ​​of the initial attribute information; acquire the prediction accuracy of the predicted attribute values; delete the initial attribute information corresponding to the prediction accuracy being less than a preset threshold to obtain filtered attribute information; and a composition unit configured to compose a training sample set by combining the sample images corresponding to multiple sample items, the category information of each sample item, the processed attribute information corresponding to each sample item, and the processed attribute values. The building block is configured to build a unified pre-trained language model that includes a multi-head attention layer and a residual connection layer. The training module is configured to use machine learning methods to train the unified pre-trained language model by taking the category information and attribute information of the sample items as input to the multi-head attention layer, the sample image corresponding to the sample items as input to the residual connection layer, and the attribute value corresponding to the attribute information as the expected output, to obtain the attribute prediction model.

9. The apparatus according to claim 8, wherein, The preprocessing unit is further configured to be at least one of the following: The initial attribute values ​​corresponding to each initial attribute information are merged to obtain the merged attribute values. Information enhancement is performed on the initial attribute value corresponding to each initial attribute information to obtain the enhanced attribute value; The initial attribute value corresponding to each initial attribute information is calibrated to obtain the calibrated attribute value.

10. The apparatus according to claim 9, wherein, The preprocessing unit is further configured to: Based on the semantic model, obtain a set of attribute vectors corresponding to multiple initial attribute values; Cluster the attribute vector set to determine the merged attribute values.

11. The apparatus according to claim 9, wherein, The preprocessing unit is further configured to: For each initial attribute information, the initial attribute value is calibrated based on the voting method of similar items and attribute values ​​corresponding to the sample item to obtain the calibrated attribute value. and / or For each initial attribute value, the information is calibrated based on the item attribute values ​​corresponding to the user's historical data to obtain the calibrated attribute value.

12. The apparatus according to claim 8, wherein, The attribute prediction model includes an attribute classification model for performing classification tasks and / or an attribute generation model for performing generation tasks.

13. An information generation apparatus, the apparatus comprising: The acquisition module is configured to acquire the target image corresponding to the target item, the category information and attribute information of the target item; The generation module is configured to input the target image, the category information and attribute information of the target item into the attribute prediction model to obtain the attribute value of the attribute information, wherein the attribute prediction model is obtained based on the method of any one of claims 1-5.

14. The apparatus according to claim 13, wherein, The attribute prediction model is an attribute generation model; and the generation module is further configured to: The target image, the category information and attribute information of the target item are input into the attribute generation model to obtain the attribute values ​​of the attribute information and the description text corresponding to the target item.

15. An electronic device comprising: One or more processors; 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 as described in any one of claims 1-7.

16. A computer-readable medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the method as described in any one of claims 1-7.

Citation Information

Patent Citations

  • Article attribute information processing method and device, electronic equipment and storage medium

    CN111860575A

  • Attribute value prediction method and device, computer system and readable storage medium

    CN113762316A

  • Image data processing method and device, storage medium and processor

    CN114168777A