CN117314590A - Method and device for generating commodity detail page, terminal equipment and readable storage medium - Google Patents

Method and device for generating commodity detail page, terminal equipment and readable storage medium Download PDF

Info

Publication number
CN117314590A
CN117314590A CN202311606105.7A CN202311606105A CN117314590A CN 117314590 A CN117314590 A CN 117314590A CN 202311606105 A CN202311606105 A CN 202311606105A CN 117314590 A CN117314590 A CN 117314590A
Authority
CN
China
Prior art keywords
commodity
image
generating
description
text
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311606105.7A
Other languages
Chinese (zh)
Inventor
徐约可
谢国斌
马明
罗官
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Dadaoyun Technology Co ltd
Original Assignee
Shenzhen Dadaoyun Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Dadaoyun Technology Co ltd filed Critical Shenzhen Dadaoyun Technology Co ltd
Priority to CN202311606105.7A priority Critical patent/CN117314590A/en
Publication of CN117314590A publication Critical patent/CN117314590A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/58Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually
    • G06F16/5866Retrieval characterised by using metadata, e.g. metadata not derived from the content or metadata generated manually using information manually generated, e.g. tags, keywords, comments, manually generated location and time information
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Business, Economics & Management (AREA)
  • Accounting & Taxation (AREA)
  • Finance (AREA)
  • General Engineering & Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Health & Medical Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Strategic Management (AREA)
  • Artificial Intelligence (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computing Systems (AREA)
  • Marketing (AREA)
  • General Business, Economics & Management (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Multimedia (AREA)
  • Economics (AREA)
  • Development Economics (AREA)
  • Library & Information Science (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The application is applicable to the technical field of computers, and provides a method and a device for generating commodity detail pages, terminal equipment and a readable storage medium. The generation method of the commodity detail page comprises the following steps: acquiring commodity images and corresponding commodity descriptions; inputting the commodity image into an image recognition model to obtain corresponding commodity information; generating description text based on commodity information and commodity description; determining a theme style based on the commodity image and the descriptive text; obtaining a template corresponding to the theme style; and generating a commodity detail page according to the commodity image, the description text and the template. According to the embodiment of the invention, the commodity detail page of the corresponding style is automatically generated according to the commodity image and the corresponding commodity description input by the user, the generated commodity detail page has high correlation with the data input by the user, and meanwhile, the generation efficiency is improved and the cost is reduced.

Description

Method and device for generating commodity detail page, terminal equipment and readable storage medium
Technical Field
The application belongs to the technical field of computers, and particularly relates to a method and a device for generating a commodity detail page, terminal equipment and a readable storage medium.
Background
With the rapid development of internet technology, more and more consumers choose to purchase the required goods on the internet, and merchants make detailed pages of the goods for the goods. The commodity detail page is a detailed display page of commodities on the online shopping platform, and contains information such as detailed description, pictures, prices, specifications, parameters, user evaluation and the like of the commodities, so that consumers can know and evaluate the commodities.
In the related art, when a merchant makes a commodity detail page, commodity images are usually required to be manually processed to obtain the commodity detail page, and the method is time-consuming, labor-consuming, low in efficiency and high in cost.
Disclosure of Invention
The embodiment of the application provides a method, a device, terminal equipment and a readable storage medium for generating an item detail page, which can solve the problems of lower efficiency and higher cost when the item detail page is manufactured in the related technology.
In a first aspect, an embodiment of the present application provides a method for generating an item detail page, including:
acquiring commodity images and corresponding commodity descriptions;
inputting the commodity image into an image recognition model to obtain corresponding commodity information;
generating description text based on commodity information and commodity description;
Determining a theme style based on the commodity image and the descriptive text;
obtaining a template corresponding to the theme style;
and generating a commodity detail page according to the commodity image, the description text and the template.
In a second aspect, an embodiment of the present application provides a device for generating an item detail page, including:
the first acquisition module is used for acquiring commodity images and corresponding commodity descriptions;
the input module is used for inputting the commodity image into the image recognition model to obtain corresponding commodity information;
the first generation module is used for generating description text based on commodity information and commodity description;
the determining module is used for determining the theme style based on the commodity image and the description text;
the second acquisition module is used for acquiring templates corresponding to the theme styles;
and the second generation module is used for generating the commodity detail page according to the commodity image, the description text and the template.
In a third aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method for generating an item detail page described above when the processor executes the computer program.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the above-described method for generating an item detail page.
In a fifth aspect, embodiments of the present application provide a computer program product, which when run on a terminal device, causes the terminal device to perform the above-described method of generating an item detail page.
Compared with the prior art, the beneficial effects of the embodiment of the application are as follows: according to the embodiment of the application, the commodity image and the corresponding commodity description are acquired, the commodity image is input into the image recognition model to obtain corresponding commodity information, the description text is generated based on the commodity information and the commodity description, the theme style is determined based on the commodity image and the description text, the template corresponding to the theme style is acquired, and finally the commodity detail page is generated according to the commodity image, the description text and the template. According to the embodiment of the application, the commodity detail page in the corresponding style can be automatically generated according to the commodity image and the corresponding commodity description input by the user, the generated commodity detail page has high correlation with the data input by the user, and meanwhile, the generation efficiency is improved and the cost is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required for the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic implementation flow chart of a method for generating an item detail page according to an embodiment of the present application;
fig. 2 is a schematic diagram of an implementation flow for obtaining commodity information according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an implementation flow of generating an item detail page provided by an embodiment of the present application;
FIG. 4 is a schematic diagram of an implementation flow for generating descriptive text provided by an embodiment of the present application;
FIG. 5 is a schematic flow chart of one implementation of determining a theme style provided in an embodiment of the present application;
FIG. 6 is a schematic flow chart of another implementation of determining a theme style provided by an embodiment of the present application;
FIG. 7 is a schematic flowchart of an implementation of a training image recognition model according to an embodiment of the present application;
FIG. 8 is a schematic diagram of an implementation flow of filtering irrelevant images according to an embodiment of the present disclosure;
FIG. 9 is a schematic diagram of a device for generating a detailed page of an article according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a terminal device provided in an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present application without making any inventive effort, are intended to be protected herein.
It is noted that the terms "comprising," "including," and "having," and any variations thereof, in the description and claims of the present application and in the foregoing figures, are intended to cover non-exclusive inclusions. For example, a process, method, terminal, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus. In the claims, specification, and drawings of this application, relational terms such as "first" and "second," and the like are used solely to distinguish one entity/operation/object from another entity/operation/object without necessarily requiring or implying any such real-time relationship or order between such entities/operations/objects.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
With the rapid development of internet technology, more and more consumers choose to purchase the required goods on the internet, and merchants make detailed pages of the goods for the goods. The commodity detail page is a detailed display page of commodities on the online shopping platform, and contains information such as detailed description, pictures, prices, specifications, parameters, user evaluation and the like of the commodities, so that consumers can know and evaluate the commodities. In the related art, when a merchant makes a commodity detail page, commodity images are usually required to be manually processed to obtain the commodity detail page, and the method is time-consuming, labor-consuming, low in efficiency and high in cost.
In view of this, the embodiment of the application can automatically generate the commodity detail page of the corresponding style according to the commodity image and the corresponding commodity description input by the user, and the generated commodity detail page has high correlation with the data input by the user, so that the generation efficiency is improved and the cost is reduced.
In order to illustrate the technical solution of the present application, the following description is made by specific examples.
Fig. 1 shows a schematic implementation flow chart of a method for generating an item detail page according to an embodiment of the present application, where the method may be applied to a terminal device. The terminal device may be a mobile phone, tablet computer, notebook computer, ultra-mobile personal computer (UMPC), netbook, etc.
Specifically, the above-described method of generating the item detail page may include the following steps S101 to S104.
Step S101, acquiring commodity images and corresponding commodity descriptions.
The commodity image is an image of a commodity, and may be an image of a complete commodity (for example, a complete image of a piece of clothing), or an image of a partial commodity (for example, a collar of a piece of clothing). The commodity description is a text for describing commodity characteristics and is used for introducing corresponding commodity placement characteristics, such as parameters, materials and the like of commodities.
In the embodiment of the application, the user can upload the commodity image to the terminal device, and the uploaded commodity image can be one or more. For some merchandise images, the user may also upload corresponding merchandise descriptions. For example, for a commodity image for introducing information such as a material and a parameter of a commodity, a user may upload a commodity description corresponding to the commodity image, for example, a commodity description introducing information such as a material and a parameter. The terminal device can acquire commodity images uploaded by a user in real time or stored in a memory in advance and corresponding commodity descriptions.
Step S102, inputting the commodity image into an image recognition model to obtain corresponding commodity information.
The commodity information may be characteristic information of a commodity described in the commodity image. For example, the type, location, color, etc. of the garment. The image recognition model can adopt a convolutional neural network for recognizing the characteristics of the commodity image so as to obtain corresponding commodity information.
In the embodiment of the application, the terminal device may input the commodity image into the image recognition model, recognize the characteristics of the commodity in the commodity image by the image recognition model, and finally output corresponding commodity information.
And step S103, generating description text based on the commodity information and the commodity description.
The descriptive text may be used to introduce related information of the corresponding commodity, and may be a natural language or a set of words.
In the embodiment of the application, the terminal device may input the commodity information and the commodity description into the text generation model to obtain the description text.
Step S104, determining the theme style based on the commodity image and the description text.
Wherein the theme style may be used to determine the design style of the item detail page.
In the embodiment of the application, different commodity images correspond to different image styles, and different descriptive texts correspond to different emotion colors. The terminal device can analyze the merchandise image and the descriptive text to determine the theme style.
Step S105, a template corresponding to the theme style is obtained.
The user can store various templates corresponding to different theme styles into a memory of the terminal device in advance.
In the embodiment of the application, after determining the theme style, the terminal device may call the template corresponding to the theme style from the memory.
And step S106, generating a commodity detail page according to the commodity image, the description text and the template.
In the embodiment of the application, after the commodity image, the description text and the template are obtained, the terminal device can fill the commodity image and the corresponding description text to the designated position according to the arrangement design of the template, and finally the commodity detail page is generated.
It will be appreciated that, in addition to physical commodities, virtual commodities (e.g. electronic books, music, movies, games, software, etc.) or non-physical commodities (e.g. service class products) may also be generated through the above steps S101 to S106.
Compared with the prior art, the beneficial effects of the embodiment of the application are as follows: according to the embodiment of the application, the commodity image and the corresponding commodity description are acquired, the commodity image is input into the image recognition model to obtain corresponding commodity information, the description text is generated based on the commodity information and the commodity description, the theme style is determined based on the commodity image and the description text, the template corresponding to the theme style is acquired, and finally the commodity detail page is generated according to the commodity image, the description text and the template. According to the embodiment of the application, the commodity detail page in the corresponding style can be automatically generated according to the commodity image and the corresponding commodity description input by the user, the generated commodity detail page has high correlation with the data input by the user, and meanwhile, the generation efficiency is improved and the cost is reduced.
As shown in fig. 2, in some embodiments of the present application, the inputting the commodity image into the image recognition model to obtain the corresponding commodity information may specifically include steps S201 to S204.
Wherein the commodity information includes a classification result.
Step S201, inputting the commodity image into an image recognition model to obtain corresponding commodity characteristics.
In embodiments of the present application, the image recognition model may recognize features of an input commodity image. Therefore, the terminal equipment inputs the commodity image into the image recognition model, and corresponding commodity characteristics can be obtained.
Specifically, after the commodity image is input into the image recognition model, the convolution layer of the image recognition model can perform convolution processing on the commodity image, initially extract the features in the commodity image through the convolution kernel, perform convolution operation, perform element multiplication on the convolution kernel and the local area of the commodity image, and add the results to obtain the feature map. And carrying out pooling operation (such as maximum pooling or average pooling) by the pooling layer, and reducing the space dimension of the feature map so as to extract commodity features.
Step S202, commodity features are mapped into corresponding feature vectors.
In the embodiment of the application, the terminal device can map commodity features into corresponding feature vectors through the image recognition model.
Specifically, after extracting the commodity features, the fully connected layer of the image recognition model can connect each pixel in the feature map to each neuron of the next layer, so as to convert the high-dimensional feature representation into a form suitable for classification or recognition. The full join layer may map commodity features into a fixed length feature vector through matrix multiplication and activation functions (e.g., reLU).
Step S203, calculating the similarity of the corresponding commodity image based on the feature vector.
In the embodiment of the present application, through the processing in step S201 and step S202, each commodity image has a corresponding feature vector, and at this time, the terminal device may calculate the similarity between different commodity images by using a distance measurement method (such as euclidean distance, cosine similarity, and the like) according to the feature vector corresponding to each commodity image.
And step S204, classifying the commodity images according to the similarity to obtain a classification result.
The classification result is used for representing the category of the commodity in the commodity image, namely, representing which commodities belong to the same category.
In the embodiment of the present application, the terminal device may compare the similarity of the commodity images with a preset threshold (may be set according to actual needs), and classify the commodity images not lower than the preset threshold into a class. It should be noted that a group of merchandise images may be divided into a plurality of categories, i.e., there may be a plurality of categories in the classification result. By classifying the commodity images, the commodity images with high similarity are classified into the same category, so that the commodity images are convenient to manage and process subsequently.
According to the method and the device, the commodity characteristics of the commodity images are extracted, the similarity between the images is calculated according to the commodity characteristics, the commodity images are finally classified according to the similarity, the commodity images are classified into different categories, management of the commodity images can be facilitated, and further processing is conducted according to the categories of the commodity images.
As shown in fig. 3, in some embodiments of the present application, the generating the item detail page according to the item image, the description text, and the template may specifically include step S301 and step S302.
Step S301, sorting the commodity images according to the sorting result and a preset sorting strategy to obtain the sorting sequence of the commodity images.
The sorting strategy is used for indicating how the commodity images are sorted according to the sorting result. Different ordering strategies may exist for different goods. The arrangement order is used to indicate the arrangement order of the different merchandise images in the merchandise detail page.
In the embodiment of the present application, the terminal device may acquire the sorting policy pre-stored in the memory or input in real time by the user, and sort the commodity images according to the sorting policy and the sorting result obtained in the above steps S201 to S204.
For example, it is assumed that a user inputs a set of commodity images regarding clothes, and after the above-described classification process, the classification result of the set of commodity images includes classifications of neckline, cuffs, hem, front fly, rear fly, and the like. Meanwhile, the terminal equipment is assumed to acquire a sorting strategy aiming at clothes, and the content of the sorting strategy is that images are arranged in the sequence from top to bottom and from front to back. At this time, the terminal device may sort the sorting results of the group of commodity images according to the sorting result and the sorting policy in the order from top to bottom and from front to back, that is, in the order of the collar, the front fly, the rear fly cuffs and the clothing swing.
Step S302, generating a commodity detail page according to the arrangement sequence, commodity images, description texts and templates.
In the embodiment of the application, after the arrangement sequence, the commodity images, the description text and the template are obtained, the terminal device can fill the commodity images and the corresponding description text into the template according to the arrangement sequence of the commodity images, so that the commodity detail page is obtained.
According to the method and the device for sorting the commodity images, the commodity images are arranged according to the arrangement sequence obtained according to the sorting result, so that the sorting of the finally generated commodity detail pages is more reasonable, and the user satisfaction is improved.
As shown in fig. 4, in some embodiments of the present application, the generation of the description text based on the commodity information and the commodity description may specifically include step S401 and step S402.
Step S401, inputting commodity information and commodity description into a text generation model to gradually generate description text.
The text generation model may adopt a natural language generation technology (NLG), and generate corresponding descriptive text according to the input information.
In the embodiment of the present application, the terminal device may input the commodity information and the commodity description into the text generation model. In the process of generating the descriptive text, the text generation model can predict the next most likely word or character from the word stock based on probability distribution according to the current context, commodity information and commodity description, specifically can calculate the probability of the next word or character by using a softmax function, and select the most suitable word according to the probability size to gradually generate the descriptive text.
And step S402, stopping generating the description text and outputting the description text when the termination condition is reached.
The termination condition may be used to instruct to stop generating the descriptive text, specifically may be generating a text with a specific length, generating an end symbol of a specific mark, reaching a limit of the number of times of generation, and the like, and may be set by itself according to needs.
In the embodiment of the present application, in the process of generating the description text, when the termination condition is reached, the terminal device may stop generating the description text, and output the description text at this time as the final description text. For example, when an end symbol (e.g., period) of a specific mark is generated, the terminal device may stop generating the descriptive text at this time and output the descriptive text at this time as the final descriptive text.
As shown in fig. 5, in some embodiments of the present application, the above-described determining the theme style based on the commodity image and the descriptive text may specifically include steps S501 to S503.
Step S501, emotion analysis is carried out on the descriptive text, and emotion colors of the descriptive text are obtained.
In the embodiment of the application, the terminal device may use a natural language processing technology to perform emotion analysis on the generated description text, so as to obtain emotion tendencies of the description text, such as positive, negative, neutral, and the like. And judging the emotion colors of the descriptive text, such as happiness, sadness, relaxation and the like, according to the emotion tendencies of the descriptive text and the corresponding relation between the preset emotion tendencies and emotion colors.
Step S502, carrying out feature analysis on the commodity image to obtain the image style of the commodity image.
In the embodiment of the present application, the terminal device may analyze the features of the commodity image, such as color, contrast, texture, and the like, by using the image recognition model, and then infer the image style of the commodity image, such as brightness, softness, and antique, according to the features of the commodity image and the corresponding relationship between the preset features and the image style.
Step S503, determining the theme style based on the emotion color and the image style.
In the embodiment of the application, after the emotion color of the descriptive text and the image style of the commodity image are obtained, the terminal device can combine the emotion color and the image style to determine the theme style. Specifically, weights can be given to emotion colors describing texts and image styles of commodity images, and then theme styles are determined according to the emotion colors of the texts and the weights of the image styles of the commodity images.
According to the method and the device for processing the text description, the emotion analysis is carried out on the text description, the feature analysis is carried out on the commodity image, the emotion color of the text description and the image style of the commodity image are obtained respectively, and finally the theme style can be accurately determined, so that the relevance between the commodity detail page generated later and the text description and the commodity image is higher.
As shown in fig. 6, in other embodiments of the present application, the above-mentioned determining the theme style based on the commodity image and the description text may specifically further include steps S601 to S604.
Step S601, acquiring additional data of the commodity image, and obtaining a first image style of the commodity image based on the additional data.
The additional data is environmental data added when acquiring the commodity image, such as shooting time (may include specific time, season, etc.), shooting place, and the like.
In the embodiment of the application, the terminal device may acquire the additional data from the commodity image, and obtain the first image style based on the additional data and the preset correspondence between the additional data and the first image style.
Step S602, carrying out group feature analysis on the commodity image, extracting common features of the commodity image, and obtaining a second image style of the commodity image based on the common features.
In the embodiment of the present application, the terminal device may perform group feature analysis on a plurality of commodity images (for example, works of art), extract features (for example, lines, colors, etc.) shared by the commodity images, and obtain the second image style according to the common features of the commodity images and the correspondence between the common features and the second image style.
Step S603, extracting keywords from the descriptive text, and obtaining style trends of the descriptive text based on the keywords.
In the embodiment of the present application, the terminal device may extract keywords (for example, winter, cold, etc.) in the description text, and then obtain the style tendency according to the keywords and the corresponding relationship between the preset keywords and the style tendency.
Step S604, a theme style is determined based on the first image style, the second image style, and the style trend.
In the embodiment of the present application, the terminal device may assign weights to the first image style, the second image style, and the style tendency, and determine the theme style according to the weights of the first image style, the second image style, and the style tendency.
It will be appreciated that the terminal device may simultaneously assign a weight to one or more of the emotion color of the descriptive text, the image style of the merchandise image, the first image style of the merchandise image, the second image style of the merchandise image, and the style trend, thereby determining the final theme style.
Before the image recognition model is used for analyzing the characteristics of the commodity image and obtaining the corresponding commodity information, the image recognition model needs to be trained. As shown in fig. 7, the method may further include steps S701 to S705 before inputting the commodity image into the image recognition model to obtain the corresponding commodity information.
Step S701, constructing an image recognition model to be trained.
In embodiments of the present application, convolutional Neural Networks (CNNs) may be employed to construct the image recognition models to be trained. Different CNN architectures, for example LeNet, alexNet, VGG, resNet, can be specifically selected according to actual needs.
Step S702, an image to be trained is obtained, and preprocessing is carried out on the image to be trained to obtain a training set.
In the embodiment of the application, the terminal device can obtain commodity images in a large scale from a network, can also obtain commodity images input by a user, takes the commodity images as images to be trained, and preprocesses the commodity images to obtain a training set.
Specific pretreatment processes may include: standardization, resizing, data enhancement, etc. Normalization can provide data with zero mean and unit variance to improve model stability and convergence speed. Resizing may resize pictures of different sizes to the same size for input into the network. The data enhancement can generate more training samples through rotation, overturning, translation, scaling and the like, so that the diversity and the robustness of the data are improved.
Step S703, defining a loss function.
The loss function is used for supervising the image recognition model to be trained to train.
In the embodiment of the present application, the terminal device may define a suitable loss function according to actual needs. For example, in a classification task, a cross entropy loss function is used; in the target detection task, a combined loss function of bounding box regression loss and classification loss is used.
Step S704, training the image recognition model to be trained by using the training set.
In the embodiment of the application, the terminal device may input the training set into the image recognition model to be trained, and train the image recognition model to be trained. The training process is a process of optimizing network parameters by a back-propagation algorithm.
Specifically, in each round of training, the terminal device may input a batch of commodity images into the image recognition model to be trained for forward propagation, calculate the value of the loss function, calculate the gradient of the parameter by using a backward propagation algorithm, and update the parameter.
And step S705, when the training stopping condition is met, stopping training the image recognition model to be trained to obtain the image recognition model.
In the embodiment of the present application, when the training stop condition is satisfied (for example, a preset training round is reached, a value of the loss function reaches a preset value, etc.), the training of the model may be considered to be completed at this time, and at this time, the terminal device may stop training the image recognition model to be trained, so as to obtain the image recognition model.
In some scenes, some irrelevant images may be mixed in the commodity images input by the user, and if the irrelevant images are made into commodity detail pages, the user is likely to be dissatisfied with the generated commodity detail pages, and the commodity detail pages need to be regenerated.
In view of this, as shown in fig. 8, after generating the description text based on the commodity information and the commodity description, the method may further include steps S801 to S808 before determining the theme style based on the commodity image and the description text.
Step S801, inputting the commodity image into an image recognition model to obtain corresponding commodity characteristics.
Step S802, commodity features are mapped into corresponding feature vectors.
Step S803, a first similarity of the corresponding commodity image is calculated based on the feature vector.
In the embodiment of the present application, the first similarity is identical to the similarity in step S203 described above. The specific operation procedures of the steps S801 to S803 may refer to the steps S201 to S203, and will not be described herein.
Step S804, filtering the commodity image with the first similarity lower than the first similarity threshold.
In the embodiment of the application, the first similarity threshold can be set according to actual needs, and when the first similarity of a certain commodity image is lower than the first similarity threshold, the commodity image can be described as an incoherent image and can be filtered so as not to influence the subsequent generation of commodity detail pages.
In step S805, text vector quantization is described, and a description text vector is obtained.
In the embodiment of the application, the terminal device can use the bag of words model, TF-IDF, word2Vec and other technologies to vector the description text and obtain the description text vector.
Step S806, vectorizing the corresponding commodity description to obtain a commodity description vector.
In the embodiment of the present application, the terminal device may use a bag of words model, TF-IDF, word2Vec, and other technologies to vectorize the commodity description corresponding to the description text in the above step S805, so as to obtain a commodity description vector.
Step S807, a second similarity between the descriptive text vector and the corresponding article description vector is calculated.
In the embodiment of the application, the terminal device may calculate a second similarity between the description text vector and the corresponding commodity description vector.
Step S808, filtering the commodity image with the second similarity lower than the second similarity threshold.
In the embodiment of the application, the second similarity threshold can be set according to actual needs, and when the second similarity corresponding to a certain commodity image is lower than the second similarity threshold, the commodity image can be described as an incoherent image and can be filtered so as not to influence the subsequent generation of commodity detail pages.
According to the method and the device for the image analysis, the similarity between the commodity images and the similarity between the description text and the commodity description are calculated, and the commodity images with the similarity lower than the similarity threshold value are subjected to double filtration, so that the fact that irrelevant images exist in the generated commodity detail pages is further avoided, and therefore the use experience of users is improved.
Fig. 9 is a schematic structural diagram of an apparatus for generating an item detail page according to an embodiment of the present application, where the apparatus 9 for generating an item detail page may be configured on a terminal device, and specifically, the apparatus 9 for generating an item detail page may include:
the first acquiring module 901 is configured to acquire a commodity image and a corresponding commodity description;
the input module 902 is configured to input a commodity image into the image recognition model to obtain corresponding commodity information;
a first generation module 903, configured to generate a description text based on the commodity information and the commodity description;
a determining module 904 for determining a theme style based on the commodity image and the descriptive text;
a second obtaining module 905, configured to obtain a template corresponding to the theme style;
a second generation module 906, configured to generate an item detail page according to the item image, the description text, and the template.
Compared with the prior art, the beneficial effects of the embodiment of the application are as follows: according to the embodiment of the application, the commodity image and the corresponding commodity description are acquired, the commodity image is input into the image recognition model to obtain corresponding commodity information, the description text is generated based on the commodity information and the commodity description, the theme style is determined based on the commodity image and the description text, the template corresponding to the theme style is acquired, and finally the commodity detail page is generated according to the commodity image, the description text and the template. According to the embodiment of the application, the commodity detail page in the corresponding style can be automatically generated according to the commodity image and the corresponding commodity description input by the user, the generated commodity detail page has high correlation with the data input by the user, and meanwhile, the generation efficiency is improved and the cost is reduced.
In some embodiments of the present application, the commodity information includes a classification result, and the input module 902 is further configured to: inputting the commodity image into an image recognition model to obtain corresponding commodity characteristics; mapping commodity features into corresponding feature vectors; calculating the similarity of the corresponding commodity images based on the feature vectors; and classifying the commodity images according to the similarity to obtain a classification result.
In some embodiments of the present application, the second generating module 906 is further configured to: sorting the commodity images according to the classification result and a preset sorting strategy to obtain the sorting sequence of the commodity images; and generating the commodity detail page according to the arrangement sequence, commodity images, description texts and templates.
In some embodiments of the present application, the first generating module 903 is further configured to: inputting commodity information and commodity description into a text generation model to gradually generate a description text; and when the termination condition is reached, stopping generating the description text, and outputting the description text.
In some embodiments of the present application, the determining module 904 is further configured to: carrying out emotion analysis on the descriptive text to obtain emotion colors of the descriptive text; carrying out feature analysis on the commodity image to obtain the image style of the commodity image; the theme style is determined based on the emotion colors and the image style.
In some embodiments of the present application, the apparatus 9 for generating an item detail page may further include a training module, configured to: constructing an image recognition model to be trained; acquiring an image to be trained, and preprocessing the image to be trained to obtain a training set; defining a loss function, wherein the loss function is used for supervising an image recognition model to be trained to train; training the image recognition model to be trained by using the training set; and when the training stopping condition is met, stopping training the image recognition model to be trained to obtain the image recognition model.
In some embodiments of the present application, the apparatus 9 for generating an item detail page may further include a filtering module, configured to: inputting the commodity image into an image recognition model to obtain corresponding commodity characteristics; mapping commodity features into corresponding feature vectors; calculating a first similarity of the corresponding commodity image based on the feature vector; filtering commodity images with the first similarity lower than a first similarity threshold value; vectorizing the descriptive text to obtain descriptive text vectors; vectorizing the corresponding commodity description to obtain a commodity description vector; calculating a second similarity between the descriptive text vector and the corresponding commodity descriptive vector; and filtering the commodity image with the second similarity lower than the second similarity threshold.
Fig. 10 is a schematic diagram of a terminal device according to an embodiment of the present application. The terminal device 10 may include: a processor 1001, a memory 1002, and a computer program 1003, such as a generation program, stored in the memory 1002 and executable on the processor 1001. The processor 1001 implements the steps in the above-described embodiment of the method for generating the item detail pages when executing the computer program 1003, for example, steps S101 to S106 shown in fig. 1. Alternatively, the processor 1001 implements the functions of the modules/units in the above-described apparatus embodiments when executing the computer program 1003, for example, a first acquisition module 901, an input module 902, a first generation module 903, a determination module 904, a second acquisition module 905, and a second generation module 906 shown in fig. 9.
The computer program may be divided into one or more modules/units, which are stored in the memory 1002 and executed by the processor 1001 to complete the present application. The one or more modules/units may be a series of computer program instruction segments capable of performing the specified functions, which instruction segments are used for describing the execution of the computer program in the terminal device.
The terminal device may include, but is not limited to, a processor 1001, a memory 1002. It will be appreciated by those skilled in the art that fig. 10 is merely an example of a terminal device and is not limiting of the terminal device, and may include more or fewer components than shown, or may combine some components, or different components, e.g., the terminal device may also include input and output devices, network access devices, buses, etc.
The processor 1001 may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 1002 may be an internal storage unit of the terminal device, such as a hard disk or a memory of the terminal device. The memory 1002 may be an external storage device of the terminal device, for example, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card) or the like. Further, the memory 1002 may also include both an internal storage unit and an external storage device of the terminal device. The memory 1002 is used for storing the computer program and other programs and data required by the terminal device. The memory 1002 may also be used to temporarily store data that has been output or is to be output.
It should be noted that, for convenience and brevity of description, the structure of the above terminal device may also refer to a specific description of the structure in the method embodiment, which is not repeated herein.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
Embodiments of the present application also provide a computer readable storage medium storing a computer program that, when executed by a processor, may implement the steps in the method for generating an item detail page described above.
Embodiments of the present application provide a computer program product that, when executed on a mobile terminal, enables the mobile terminal to implement the steps in the method for generating an item detail page described above.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus/terminal device and method may be implemented in other manners. For example, the apparatus/terminal device embodiments described above are merely illustrative, e.g., the division of the modules or units is merely a logical function division, and there may be additional divisions in actual implementation, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection via interfaces, devices or units, which may be in electrical, mechanical or other forms.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each method embodiment described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth. It should be noted that the computer readable medium contains content that can be appropriately scaled according to the requirements of jurisdictions in which such content is subject to legislation and patent practice, such as in certain jurisdictions in which such content is subject to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
The above embodiments are only for illustrating the technical solution of the present application, and are not limiting; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.

Claims (10)

1. A method for generating a detail page of an article, comprising:
acquiring commodity images and corresponding commodity descriptions;
inputting the commodity image into an image recognition model to obtain corresponding commodity information;
generating description text based on the commodity information and the commodity description;
determining a theme style based on the commodity image and the descriptive text;
obtaining a template corresponding to the theme style;
and generating a commodity detail page according to the commodity image, the description text and the template.
2. The method for generating a detailed commodity page according to claim 1, wherein said commodity information includes a classification result, and said inputting said commodity image into an image recognition model to obtain corresponding commodity information comprises:
Inputting the commodity image into the image recognition model to obtain corresponding commodity characteristics;
mapping the commodity features into corresponding feature vectors;
calculating the similarity of the corresponding commodity images based on the feature vectors;
and classifying the commodity images according to the similarity to obtain a classification result.
3. The method for generating a commodity details page according to claim 2, wherein said generating a commodity details page from said commodity image, said descriptive text and said template comprises:
sorting the commodity images according to the classification result and a preset sorting strategy to obtain the sorting sequence of the commodity images;
and generating a commodity detail page according to the arrangement sequence, the commodity image, the description text and the template.
4. The method for generating an item detail page according to claim 1, wherein the generating a description text based on the item information and the item description includes:
inputting the commodity information and the commodity description into a text generation model to gradually generate a description text;
and stopping generating the description text when the termination condition is reached, and outputting the description text.
5. The method of generating an item detail page according to claim 1, wherein said determining a theme style based on the item image and the descriptive text includes:
carrying out emotion analysis on the description text to obtain emotion colors of the description text;
performing feature analysis on the commodity image to obtain an image style of the commodity image;
the theme style is determined based on the emotion colors and the image style.
6. The method of generating a product detail page according to claim 1, wherein before said inputting said product image into an image recognition model to obtain corresponding product information, said method further comprises:
constructing an image recognition model to be trained;
acquiring an image to be trained, and preprocessing the image to be trained to obtain a training set;
defining a loss function, wherein the loss function is used for supervising the image recognition model to be trained for training;
training the image recognition model to be trained by utilizing the training set;
and when the training stopping condition is met, stopping training the image recognition model to be trained to obtain the image recognition model.
7. The method of generating an item detail page according to claim 1, wherein after said generating a description text based on said item information and said item description, said method further comprises, before said determining a theme style based on said item image and said description text:
Inputting the commodity image into the image recognition model to obtain corresponding commodity characteristics;
mapping the commodity features into corresponding feature vectors;
calculating first similarity of the corresponding commodity images based on the feature vectors;
filtering the commodity images with the first similarity lower than a first similarity threshold;
vectorizing the descriptive text to obtain descriptive text vectors;
vectorizing the corresponding commodity description to obtain a commodity description vector;
calculating a second similarity between the descriptive text vector and the corresponding commodity descriptive vector;
and filtering the commodity image with the second similarity lower than a second similarity threshold.
8. A generation apparatus of a commodity detail sheet, characterized by comprising:
the first acquisition module is used for acquiring commodity images and corresponding commodity descriptions;
the input module is used for inputting the commodity image into an image recognition model to obtain corresponding commodity information;
the first generation module is used for generating description text based on the commodity information and the commodity description;
a determining module for determining a theme style based on the commodity image and the descriptive text;
The second acquisition module is used for acquiring the template corresponding to the theme style;
and the second generation module is used for generating a commodity detail page according to the commodity image, the description text and the template.
9. A terminal device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method of generating item detail pages as claimed in any one of claims 1 to 7 when the computer program is executed.
10. A computer-readable storage medium storing a computer program, wherein the computer program when executed by a processor implements the steps of a method of generating an item detail page as claimed in any one of claims 1 to 7.
CN202311606105.7A 2023-11-29 2023-11-29 Method and device for generating commodity detail page, terminal equipment and readable storage medium Pending CN117314590A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311606105.7A CN117314590A (en) 2023-11-29 2023-11-29 Method and device for generating commodity detail page, terminal equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311606105.7A CN117314590A (en) 2023-11-29 2023-11-29 Method and device for generating commodity detail page, terminal equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN117314590A true CN117314590A (en) 2023-12-29

Family

ID=89255612

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311606105.7A Pending CN117314590A (en) 2023-11-29 2023-11-29 Method and device for generating commodity detail page, terminal equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN117314590A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101958773B1 (en) * 2018-09-19 2019-03-15 (주)세이브플러스 Method, apparatus and computer-readable medium for making product detail page based on web-toon story
CN110428310A (en) * 2019-08-08 2019-11-08 上海白纳电子商务有限公司 A kind of generation method and device of commodity details page
CN112862558A (en) * 2019-11-28 2021-05-28 阿里巴巴集团控股有限公司 Method and system for generating product detail page and data processing method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101958773B1 (en) * 2018-09-19 2019-03-15 (주)세이브플러스 Method, apparatus and computer-readable medium for making product detail page based on web-toon story
CN110428310A (en) * 2019-08-08 2019-11-08 上海白纳电子商务有限公司 A kind of generation method and device of commodity details page
CN112862558A (en) * 2019-11-28 2021-05-28 阿里巴巴集团控股有限公司 Method and system for generating product detail page and data processing method

Similar Documents

Publication Publication Date Title
Kao et al. Visual aesthetic quality assessment with a regression model
CN108345587B (en) Method and system for detecting authenticity of comments
CN112100387B (en) Training method and device of neural network system for text classification
US20160364633A1 (en) Font recognition and font similarity learning using a deep neural network
CN110827129A (en) Commodity recommendation method and device
US20120303615A1 (en) Image-based popularity prediction
US11544510B2 (en) System and method for multi-modal image classification
CN110647696A (en) Business object sorting method and device
CN113762309B (en) Object matching method, device and equipment
CN110413825B (en) Street-clapping recommendation system oriented to fashion electronic commerce
CN111784372A (en) Store commodity recommendation method and device
CN111915400A (en) Personalized clothing recommendation method and device based on deep learning
Wang et al. PalGAN: Image colorization with palette generative adversarial networks
CN113657087A (en) Information matching method and device
CN111523315B (en) Data processing method, text recognition device and computer equipment
Xia et al. Clothing classification using transfer learning with squeeze and excitation block
CN113869371A (en) Model training method, clothing fine-grained segmentation method and related device
Minija et al. Food recognition using neural network classifier and multiple hypotheses image segmentation
CN117314590A (en) Method and device for generating commodity detail page, terminal equipment and readable storage medium
Liu et al. Design and implementation of hair recommendation system based on face recognition
Maros et al. Image aesthetics and its effects on product clicks in E-commerce search
CN114359767A (en) Product data processing method and device, storage medium and processor
CN113762257B (en) Identification method and device for mark in make-up brand image
Yuan et al. Salient object contour extraction based on pixel scales and hierarchical convolutional network
CN113344613B (en) Data matching method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination