Commodity classification method and device, equipment and medium

Through multi-dimensional feature vector fusion and autoregressive decoding technology, the problem that traditional methods are difficult to deal with complex product category relationships in e-commerce platforms is solved, efficient and accurate product classification is achieved, and the user experience of e-commerce platforms is improved.

CN120336916APending Publication Date: 2025-07-18广州商研网络科技有限公司
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202510418351.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-03
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

Traditional product classification methods are difficult to effectively capture the complex product category relationships in e-commerce platforms, especially when dealing with multi-level and multiple inheritance relationships, the classification accuracy is limited and cannot meet the dynamic changes of e-commerce platforms.

Method used

Multidimensional feature vector fusion and autoregressive decoding technology are adopted to obtain product classification system diagrams and multidimensional product information, encode and generate feature vectors in the graph, and use preset decoder to determine the target classification path, and combine it with abstract classification models to improve classification accuracy.

Benefits of technology

It significantly improves the accuracy and reliability of product classification, can dynamically refer to hierarchical structure information, reduce error propagation, ensure consistency of classification results, and meet the diversified needs of e-commerce platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120336916A_ABST
    Figure CN120336916A_ABST
Patent Text Reader

Abstract

The invention relates to a commodity classification method and device, equipment and a medium in the technical field of e-commerce. The method comprises the following steps: acquiring a commodity classification system diagram and multi-dimensional commodity information of a target commodity; encoding the multi-dimensional commodity information to obtain a multi-dimensional feature vector fusing the feature information of each dimension, and encoding each category in the commodity classification system graph to obtain an intra-graph feature vector of each category; fusing each intra-graph feature vector with a multi-dimensional feature vector to obtain a commodity category vector corresponding to each category, traversing each category in the commodity classification system graph, and adding the commodity category vectors of the traversed categories to an input coding sequence according to a traversing sequence; and adopting a preset decoder to carry out autoregression decoding on the input coding sequence, determining a target classification path in the commodity classification system diagram, and marking the target classification path as category information of the target commodity. According to the method, the commodities in the specified classification system can be efficiently and accurately classified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of e-commerce technologies, and particularly to a product classification method, its corresponding device, computer equipment, and computer-readable storage medium. Background Art

[0002] There is a wide variety of products on e-commerce platforms. Effective classification management is the key to enhancing user experience and platform operation efficiency. A hierarchical classification system can clearly show the relationships between product categories, which is not only convenient for users to browse and search but also provides structured support for product search, recommendation, and management on the platform. However, traditional product classification methods are inadequate when faced with complex data structures. Rule-based methods are simple and intuitive, but they rely on manually formulated rules and are difficult to adapt to the characteristics of dynamic changes in product categories. Support Vector Machines (SVMs) perform well in small-sample and non-linear scenarios, but their ability to process large-scale data is limited, and they cannot capture complex relationships between categories. Naive Bayes assumes that features are independent of each other, which is often not true in actual product classification, resulting in limited classification accuracy. In recent years, deep learning methods such as Convolutional Neural Networks (CNNs) and Recurrent Neural Networks (RNNs) have made significant progress in feature extraction. However, these methods usually assume that categories are independent of each other or have a simple tree-like hierarchical relationship, making it difficult to handle the complex relationships existing in e-commerce platform product categories.

[0003] Due to business requirements, the relationships between product categories on e-commerce platforms have now developed to be much more complex than those assumed by traditional technologies. Product categories not only have a one-to-one parent-child relationship, such as the "Clothing" category containing sub-categories like "Tops" and "Pants", but also allow for multiple inheritance relationships. For example, the category of "Sports Backpacks" can inherit from two parent categories, namely "Backpacks" and "Sports Supplies", at its upper level. This complexity makes it difficult for traditional classification methods to comprehensively capture the associations between categories. Especially when dealing with multi-level relationships simultaneously, the limitations of traditional technologies become more obvious.

[0004] In view of the deficiencies of traditional technologies, the applicant of this application has made corresponding explorations. Summary of the Invention

[0005] The primary objective of this application is to solve at least one of the above problems and provide a product classification method, its corresponding device, computer equipment, and computer-readable storage medium.

[0006] To meet the various objectives of this application, the following technical solutions are adopted in this application:

[0007] A product classification method provided to meet one of the objectives of this application includes the following steps:

[0008] Obtain a commodity classification system diagram and multi-dimensional commodity information of the target commodity, where the multi-dimensional commodity information includes commodity information corresponding to the target commodity in multiple dimensions;

[0009] Encode the multi-dimensional commodity information to obtain a multi-dimensional feature vector that integrates the feature information of each dimension, and encode each category in the commodity classification system diagram to obtain an in-diagram feature vector for each category;

[0010] Fuse each of the in-diagram feature vectors with the multi-dimensional feature vector to obtain a commodity category vector corresponding to each category. Traverse each category in the commodity classification system diagram, and add the commodity category vectors of the traversed categories to the input encoding sequence in the traversal order;

[0011] Use a preset decoder to perform autoregressive decoding on the input encoding sequence to determine the target classification path in the commodity classification system diagram, which is marked as the category information of the target commodity.

[0012] On the other hand, a commodity classification device provided to meet one of the purposes of this application includes a data acquisition module, a data encoding module, a sequence construction module, and an autoregressive decoding module. Among them, the data acquisition module is used to obtain a commodity classification system diagram and multi-dimensional commodity information of the target commodity, where the multi-dimensional commodity information includes commodity information corresponding to the target commodity in multiple dimensions; the data encoding module is used to encode the multi-dimensional commodity information to obtain a multi-dimensional feature vector that integrates the feature information of each dimension, and encode each category in the commodity classification system diagram to obtain an in-diagram feature vector for each category; the sequence construction module is used to fuse each of the in-diagram feature vectors with the multi-dimensional feature vector to obtain a commodity category vector corresponding to each category. Traverse each category in the commodity classification system diagram, and add the commodity category vectors of the traversed categories to the input encoding sequence in the traversal order; the autoregressive decoding module is used to use a preset decoder to perform autoregressive decoding on the input encoding sequence to determine the target classification path in the commodity classification system diagram, which is marked as the category information of the target commodity.

[0013] On yet another hand, a computer device provided to meet one of the purposes of this application includes a central processing unit and a memory. The central processing unit is used to call and run a computer program stored in the memory to execute the steps of the commodity classification method described in this application.

[0014] On yet another hand, a computer-readable storage medium provided to meet another purpose of this application stores a computer program implemented according to the commodity classification method in the form of computer-readable instructions. When the computer program is called and run by a computer, it executes the steps included in the method.

[0015] The technical solution of this application has many advantages, including but not limited to the following aspects:

[0016] In this application, by encoding the multi-dimensional commodity information of the target commodity, a multi-dimensional feature vector integrating the feature information of each dimension is obtained. At the same time, each category in the commodity classification system diagram is encoded to generate an in-diagram feature vector. By fusing each in-diagram feature vector with the multi-dimensional feature vector, a commodity category vector corresponding to each category is obtained, and these vectors are added to the input encoding sequence in the order of traversing the diagram. Finally, a preset autoregressive decoder is used for decoding to determine the target classification path and label it as the category information of the commodity. It can be seen that through multi-modal fusion, the comprehensive utilization of commodity information is realized, and the classification features in the multi-dimensional information of the commodity are integrated into the multi-dimensional feature vector through the encoding process. At the same time, the in-diagram feature vectors of the commodity classification system diagram learn the relationship features between the category itself and the categories connected to it, so that the final commodity category vector obtained by fusing the multi-dimensional features and the in-diagram features not only contains the features of the commodity itself, but also implies the hierarchical relationship between the categories. Such a fusion mechanism is more expressive than relying solely on text features or category features, further improving the accuracy of classification. On this basis, the decoder can utilize the global modeling ability and the sequence generation characteristics of autoregressive decoding. When predicting each category label, it will dynamically refer to the previously predicted labels, so as to integrate the hierarchical structure information into the prediction process. This mechanism not only reduces error propagation, but also ensures the hierarchical consistency of the classification results, making the classification results more in line with the actual category structure, significantly improving the accuracy and reliability of classification, helping to quickly match the commodities required by users, and significantly enhancing the shopping experience. Description of the Drawings

[0017] The above and / or additional aspects and advantages of this application will become obvious and easy to understand from the following description of the embodiments in conjunction with the drawings, where:

[0018] Figure 1 is a schematic flowchart of a typical embodiment of the commodity classification method of this application;

[0019] Figure 2 is a principle block diagram of the commodity classification device of this application;

[0020] Figure 3 is a schematic structural diagram of a computer device adopted by this application. Detailed Embodiments

[0021] Embodiments of the present application will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application and should not be construed as limiting the present application.

[0022] Those skilled in the art of the present technology can understand that, unless specifically stated otherwise, the singular forms "a", "an", "the", and "said" used herein may also include the plural forms. It should be further understood that the term "comprising" used in the specification of the present application means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or their groups. It should be understood that when we say that an element is "connected" or "coupled" to another element, it can be directly connected or coupled to other elements, or there may also be intermediate elements. In addition, the "connection" or "coupling" used herein may include wireless connection or wireless coupling. The phrase "and / or" used herein includes all or any unit and all combinations of one or more of the associated listed items.

[0023] Those skilled in the art of the present technology can understand that, unless otherwise defined, all terms used herein (including technical terms and scientific terms) have the same meaning as the general understanding of those of ordinary skill in the art to which the present application belongs. It should also be understood that terms such as those defined in a general dictionary should be understood to have a meaning consistent with the meaning in the context of the prior art, and will not be interpreted in an idealized or overly formal sense unless specifically defined as here.

[0024] Those skilled in the art can understand that the "client", "terminal", and "terminal device" used herein include both devices with a wireless signal receiver that only has the ability to receive and no transmitting ability, and devices with receiving and transmitting hardware that have the receiving and transmitting hardware capable of two-way communication on a two-way communication link. Such devices may include: cellular or other communication devices such as personal computers, tablet computers, etc., which have a single-line display or a multi-line display or a cellular or other communication device without a multi-line display; PCS (Personal Communications Service), which can combine voice, data processing, fax, and / or data communication capabilities; PDA (Personal Digital Assistant), which may include a radio frequency receiver, a pager, Internet / intranet access, a web browser, a notepad, a calendar, and / or a GPS (Global Positioning System) receiver; conventional laptop and / or palm-top computers or other devices, which are conventional laptop and / or palm-top computers or other devices with and / or including a radio frequency receiver. The "client", "terminal", and "terminal device" used herein can be portable, transportable, installed in a vehicle (air, sea, and / or land), or suitable for and / or configured to run locally, and / or run in a distributed manner at any other location on the earth and / or in space. The "client", "terminal", and "terminal device" used herein can also be a communication terminal, an Internet access terminal, a music / video playback terminal, for example, it can be a PDA, a MID (Mobile Internet Device), and / or a mobile phone with music / video playback function, or it can also be a smart TV, a set-top box, and other devices.

[0025] The hardware referred to by names such as "server", "client", and "service node" in this application is essentially an electronic device with the equivalent capabilities of a personal computer, which is a hardware device with the necessary components disclosed by the von Neumann principle, including a central processing unit (including an arithmetic unit and a controller), a memory, an input device, and an output device. The computer program is stored in its memory, and the central processing unit loads the program stored in the external memory into the memory for execution, executes the instructions in the program, and interacts with the input / output devices to complete specific functions.

[0026] It should be noted that the concept of "server" in this application can similarly be extended to the case of server clusters. According to the network deployment principles understood by those skilled in the art, the servers should be logically divided. Physically, these servers can either be independent of each other but can be invoked through interfaces, or integrated into a physical computer or a set of computer clusters. Those skilled in the art should understand this flexibility and should not be restricted by this when implementing the network deployment method of this application.

[0027] One or several technical features of this application, unless expressly specified, can either be deployed on the server and accessed by the client remotely invoking the online service interface provided by the server, or directly deployed and run on the client for access.

[0028] The neural network models cited or potentially cited in this application, unless expressly specified, can either be deployed on a remote server and remotely invoked on the client, or deployed on a client capable of handling the device and directly invoked. In some embodiments, when it runs on the client, its corresponding intelligence can be obtained through transfer learning to reduce the requirements for the client's hardware operating resources and avoid excessive occupation of the client's hardware operating resources.

[0029] All kinds of data involved in this application, unless expressly specified, can either be remotely stored on the server or stored on the local terminal device, as long as it is suitable for being invoked by the technical solution of this application.

[0030] Those skilled in the art should be aware that although the various methods of this application are described based on the same concept and thus show commonality with each other, these methods can be independently executed unless otherwise specified. Similarly, for each of the embodiments disclosed in this application, they are all proposed based on the same inventive concept. Therefore, for concepts with the same expression, as well as concepts that are only appropriately transformed for convenience although the expression is different, they should be equivalently understood.

[0031] For each of the embodiments to be disclosed in this application, unless expressly pointed out that there is a mutually exclusive relationship between them, the relevant technical features involved in each embodiment can be cross-combined to flexibly construct new embodiments, as long as this combination does not deviate from the creative spirit of this application and can meet the requirements in the prior art or solve certain deficiencies in the prior art. Those skilled in the art should be aware of this flexibility.

[0032] A commodity classification method of the present application can be programmed as a computer program product and implemented by running on a client or a server. For example, in an exemplary application scenario of the present application, it can be implemented by deploying it on the server of an e-commerce platform. Thus, by accessing the interface opened after the computer program product runs, human-computer interaction can be performed with the process of the computer program product through a graphical user interface to execute this method.

[0033] Please refer to Figure 1 , in a typical embodiment of the commodity classification method of the present application, it includes the following steps:

[0034] Step S1100: Obtain a commodity classification system diagram and multi-dimensional commodity information of the target commodity, where the multi-dimensional commodity information includes commodity information corresponding to the target commodity in multiple dimensions;

[0035] In an e-commerce platform, any commodity to be classified can be used as the target commodity.

[0036] The commodity classification system diagram includes each category belonging to the commodity classification system. This system classifies categories hierarchically. Each category belonging to the next lower level is a further refinement of the category belonging to the level above it. Moreover, between each adjacent two levels, the upper level and the lower level are corresponding to two categories through a directed connection pointing from top to bottom. In addition, a category belonging to the upper level can have directed connections to more than one category of the level below it. Those skilled in the art can set the commodity classification system diagram according to the disclosure here according to business needs. In one embodiment, the commodity classification system takes a tree structure as the main framework, classifies commodity categories by gradual refinement (for example, a path in the tree: Food → Processed Food → Snacks → Puffed Food). In addition, to adapt to specific business scenarios, it is allowed to have directed connections between some categories and more than one category of the level above it. For example, the category of "Baby Tops" can have directed connections to the two categories of "Clothing" and "Maternity and Baby" of the level above it.

[0037] The multiple dimensions include text, images, and structured numerical values. The corresponding product information for each dimension is the text information, image information, and structured numerical value information of the corresponding product. The text information includes the product title of the product and text-based parameters such as brand, manufacturer, etc., or may also include text content extracted from each image of the product that helps with product classification. The image information includes each image used to display the product. The structured numerical value information includes the numerical parameters of the product, or may also include sales-based numerical values. The numerical parameters are usually used to standardize and transparently display the characteristics and / or functions of the product, helping consumers quickly understand the specific attributes of the product, facilitating comparison and selection, such as the price, size, material, model, etc. of the product; the sales-based numerical values can be numerical values representing various sales attributes of the product, including any one or more of inventory, sales volume, consumer ratings, etc. The product title, image information, and numerical parameters are usually edited by the merchant listing the product as needed before listing the product and submitted to the e-commerce platform for storage for use in product display. The sales-based numerical values are usually maintained and updated by the e-commerce platform with real-time numerical values of various sales attributes.

[0038] It is not difficult to understand that merchants like to add text content to product images when preparing them, mainly to highlight the selling points of the product, attract consumers' attention, and / or convey promotional information. Because text can directly convey key information, such as "long-lasting fragrance, top note:..., middle note..., base note:...", "time-limited discount", etc., helping consumers quickly understand the uses, characteristics, and / or discount strength of the product, thus stimulating the desire to purchase and enhancing the attractiveness and sales conversion rate of the product. These types of text content describing the uses, characteristics, etc. of the product help with product classification, while text content directly stating promotions such as discount strength does not help with product classification. Therefore, in order to extract text content from each image of the product that helps with product classification, all text content in all images can be first extracted through OCR or other image text recognition algorithms, and then by inputting corresponding prompt text to a large language model, guiding or asking the model to extract text content from all the text content that helps with product classification. The prompt text can be flexibly edited by those skilled in the art according to the above disclosure, and editing methods such as few-shot examples and / or chain of thought can be used.

[0039] Step S1200: Encode the multi-dimensional product information to obtain a multi-dimensional feature vector integrating the feature information of each dimension, and encode each category in the product classification system diagram to obtain the in-diagram feature vector of each category;

[0040] During the encoding process of the commodity classification system diagram, a graph neural network architecture is adopted to perform feature learning on hierarchical classification relationships. First, each commodity category is initialized as an embedding vector (such as random initialization or pre-trained semantic vectors based on the category name) as a single node. The core of the network is to enable each node to iteratively aggregate the feature information of its adjacent nodes and update its own feature representation, that is, the in-graph feature vector. For example, in a graph convolutional network (GCN), each node updates its own representation through the weighted average of the features of its parent and child nodes, and the weights are determined by the connection strength between nodes. For a graph network with an attention mechanism (GAT), the network dynamically calculates the attention weights of the parent node to the current node. For example, the connection weights between "baby tops" and the two nodes of "clothing" and "mother and baby" in the upper layer may distinguish the semantic relevance through a multi-head attention mechanism, so as to more accurately fuse cross-level features. Those skilled in the art can flexibly choose the specific type of graph neural network. In the recommended embodiment, the graph neural network selects GraphSAGE, which adopts a neighbor sampling strategy, fixes and samples a certain number of layers of neighbors (such as parent and sibling nodes) for each node, and integrates multi-hop neighborhood information through an aggregation function (such as LSTM, pooling), which is particularly suitable for dealing with sparse connection problems in large-scale classification systems. After multiple rounds of information propagation, the in-graph feature vectors of each category node will simultaneously contain its own semantics, hierarchical position, and cross-category association information, forming a low-dimensional dense vector that can represent its topological position and semantic relationship in the classification system. This encoding method enables the model to capture complex associations in the classification system, such as the multi-level inheritance relationship between "puffed food" and "snacks" and "processed food", and the cross-tree connection relationship between "baby tops" and the "mother and baby" category. Those skilled in the art can flexibly implement the pre-training of the graph neural network based on the commodity classification system diagram, so that after training to convergence, it can acquire the ability to accurately represent the in-graph feature vectors of each category in the diagram.

[0041] In a further embodiment, the steps for encoding multi-dimensional feature vectors corresponding to multi-dimensional commodity information are as follows:

[0042] Step S1210: Use the text encoding network, image encoding network, and numerical encoding network in a preset multi-modal encoding model to encode the corresponding text information, image information, and structured numerical information in the multi-dimensional commodity information respectively, and obtain the corresponding text encoding vector, image encoding vector, and structure encoding vector;

[0043] The text encoding network is a deep learning model in the field of natural language processing, used to extract, compress, and represent the semantic features of text. Its core encoding function is to map high-dimensional text information (such as character sequences and / or word sets and / or sentence structures) into low-dimensional dense vectors (i.e., text encoding vectors), capturing semantic associations, grammar rules, and context features in the text. The recommended model selection is the BERT model, and any other model such as Transfomer Encoder, RoBERTa, XLM-RoBERTa, MPNet, Bi LSTM, GPT, etc. can also be used.

[0044] The image encoding network is a deep learning model in the field of computer vision, used to extract, compress, and represent the semantic features of images. Its core encoding function is to map high-dimensional image information (such as pixel matrices) into low-dimensional dense vectors (i.e., image encoding vectors), capturing image semantic features such as visual semantics and / or texture details and / or spatial relationship features in the image. The recommended model selection is the ViT (Vision Transformer) model, and any other model such as the CNN model, the deep convolutional model EfficientNet, DenseNet, Resnet, etc. can also be used.

[0045] The numerical encoding network performs normalization encoding on each structured numerical value to obtain the corresponding structure encoding vectors. The normalization algorithm used for the specific encoding process can be any one or any combination of Min-Max normalization, Z-Score standardization, logarithmic normalization, etc.

[0046] Step S1220: The multi-modal fusion network in the multi-modal encoding model fuses the text encoding vector, the image encoding vector, and the structure encoding vector to obtain a multi-dimensional feature vector.

[0047] It can be implemented as a multi-modal fusion network based on any one or any combination of weighted fusion, concatenation fusion, Hadamard product fusion, PCA (Principal Component Analysis), mRMR (Maximal Relevance Minimal Redundancy algorithm), multi-head attention mechanism, gated attention mechanism, self-attention mechanism, etc., enabling it to fuse the encoding vectors corresponding to text, images, and structures in different modalities into a joint representation to obtain a multi-dimensional feature vector. In one embodiment, the multi-modal fusion network performs weighted fusion on the text encoding vector, the image encoding vector, and the structure encoding vector to obtain a multi-dimensional feature vector. The sum of the weights corresponding to each vector participating in the fusion is 1, and the specific numerical values of each weight can be flexibly assigned by those skilled in the art according to the importance of each modality for classification.

[0048] In order to ensure the accuracy of the multi-modal feature vectors output by the multi-modal encoding model, the model is pre-trained to a convergent state. During the process of training the model using a pre-prepared training set, the model outputs corresponding multi-dimensional feature vectors for the multi-dimensional commodity information of two commodities in a single training sample in the training set. Then, a vector similarity algorithm is used to calculate the similarity between these two multi-dimensional feature vectors. Furthermore, the loss value between this similarity and the supervision label of this training sample, that is, the value corresponding to whether the category information of the two commodities is the same (the value is 1 if they are the same, and 0 if they are different), is calculated. After updating the network parameters in the model according to the loss value, the above process is iteratively executed using other training samples in the training set and their supervision labels. After continuously iteratively updating the model, when the loss value between the result of inferring any training sample and the supervision label of this training sample is lower than a preset threshold, it is confirmed that the model has been trained to a convergent state and the iteration ends. The training set and the preset threshold can be flexibly set by those skilled in the art according to the disclosure herein.

[0049] Step S1300: Fuse each of the in-graph feature vectors with the multi-dimensional feature vector to obtain a commodity category vector corresponding to each category. Traverse each category in the commodity classification system graph, and add the commodity category vector of the traversed category to the input encoding sequence in the traversal order;

[0050] The fusion between the feature vectors in each graph and the multi-dimensional feature vectors can be achieved based on any one or more of weighted fusion, splicing fusion, Hadamard product fusion, PCA (Principal Component Analysis), mRMR (Minimum Redundancy Maximum Relevance), multi-head attention mechanism, gated attention mechanism, and self-attention mechanism, so as to obtain the commodity category vectors corresponding to each category. Further, depth-first search (DFS, Depth First Search) or breadth-first search (BFS, Breadth First Search) can be adopted. Those skilled in the art can flexibly choose one according to the hierarchical depth of the commodity classification system and / or the complexity of differentiation at each level. When using DFS, based on the vertical exploration strategy, it preferentially delves into the branch structure along the increasing direction of the hierarchy of the commodity classification system. Its traversal logic is as follows: starting from the root node (such as the "clothing" category), it extends layer by layer along the directed connection to the bottom leaf node (such as "baby top"), and then backtracks to the unexplored parent node and continues to extend downward. This traversal method can form a continuous coding sequence of "parent class → subclass → grandchild class", which is particularly suitable for capturing classification paths with strong inheritance relationships (such as the vertical semantic association of "food → processed food → snacks → puffed food"). When encountering a cross-tree connection node (such as "baby top" connecting both the "clothing" and "mother and baby" parent classes), DFS needs to avoid repeated traversal through an access marking mechanism, and only add its feature vector to the sequence when it is first visited to ensure the integrity of cross-level semantics. Further, add the commodity category corresponding to each traversed node to the input coding sequence;

[0051] When using BFS, based on the horizontal exploration strategy, it preferentially traverses the nodes layer by layer along the same-level horizontal direction of the classification hierarchy of the commodity classification system. Its traversal logic is as follows: first process all nodes at the same level (such as "clothing", "food", "mother and baby" at the first level), then process the direct subclasses of each node in turn (such as "top", "processed food", etc. at the second level), and finally form a coding sequence of "root layer → middle layer → leaf layer". This traversal method emphasizes more on the global topological structure of the classification system, especially suitable for scenarios where it is necessary to balance the weights of multiple branches (such as nodes that are associated with multiple parent classes at the same time). For cross-tree connection nodes, BFS adds the subclasses to the queue to be processed when any parent class is traversed, but restricts the insertion position of cross-tree nodes through a level counter to prevent level confusion (for example, inserting the feature vector of "baby top" to the next level of the levels where all its parent classes are located). Further, add the commodity category corresponding to each traversed node to the input coding sequence.

[0052] Step S1400: Use a preset decoder to perform autoregressive decoding on the input coding sequence to determine the target classification path in the commodity classification system graph, and label it as the category information of the target commodity.

[0053] The encoder is pre-trained to a converged state and learns the ability to autoregressively decode the classification path in the commodity classification system diagram based on the input encoding sequence. Those skilled in the art can flexibly implement the training of the encoder according to the disclosure here, or implement it according to the further relevant disclosure of the following embodiments.

[0054] Specifically, the decoder receives the input encoding sequence, dynamically captures cross-level semantic associations based on the attention mechanism in the decoder of the Transformer architecture, and adopts the causal masking mechanism to ensure that the decoding at each time step depends only on the current and decoded node information, forming a path generation mechanism that conforms to the autoregressive characteristics. During the decoding process, the decoder mainly performs cross-attention calculations on the in-graph feature vectors of various category nodes in the input sequence and the multi-dimensional feature vectors of the target commodity through the multi-head attention mechanism to dynamically evaluate the matching degree between the candidate category and the commodity features. Each step of decoding outputs the probability distribution of the current path node, and the optimal expansion path is selected by directly applying the greedy search strategy or applying the greedy search strategy after applying the beam search strategy (the beam parameter is greater than one) until reaching the leaf node of the classification system diagram, and finally a classification path is output, which is used as the target classification path. Thus, the category information of the target commodity is labeled as the target classification path.

[0055] According to the typical embodiments of the present application, it can be known that the technical solution of the present application has many advantages, including but not limited to the following aspects:

[0056] In this application, by encoding the multi-dimensional product information of the target product, a multi-dimensional feature vector integrating the feature information of each dimension is obtained. At the same time, each category in the product classification system diagram is encoded to generate an in-diagram feature vector. By fusing each in-diagram feature vector with the multi-dimensional feature vector, a product category vector corresponding to each category is obtained, and these vectors are added to the input encoding sequence in the order of traversing the diagram. Finally, a preset autoregressive decoder is used for decoding to determine the target classification path and label it as the category information of the product. It can be seen that through multi-modal fusion, the comprehensive utilization of product information is realized, and the classification features in the multi-dimensional information of the product are fused into the multi-dimensional feature vector through the encoding process. At the same time, the in-diagram feature vector of the product classification system diagram learns the relationship features between the category itself and the categories connected to it, so that the final product category vector obtained by fusing the multi-dimensional feature and the in-diagram feature not only contains the features of the product itself, but also implies the hierarchical relationship between categories. Such a fusion mechanism is more expressive than relying solely on text features or category features, further improving the classification accuracy. On this basis, the decoder can utilize the global modeling ability and the sequence generation feature of autoregressive decoding. When predicting each category label, it will dynamically refer to the previously predicted labels, thus integrating the hierarchical structure information into the prediction process. This mechanism not only reduces error propagation, but also ensures the hierarchical consistency of the classification results, making the classification results more in line with the actual category structure, significantly improving the accuracy and reliability of classification, helping to quickly match the products required by users, and significantly enhancing the shopping experience.

[0057] In a further embodiment, after step S1400, using a preset decoder to perform autoregressive decoding on the input encoding sequence to determine the target classification path in the product classification system diagram and label it as the category information of the target product, the following steps are included:

[0058] Step S1500, using an abstract classification model prepared corresponding to the classification path to which the category information belongs, to determine the abstract category to be verified and its confidence level according to the multi-dimensional feature vector of the target product;

[0059] The abstract classification model has been pre-trained to a converged state and learned the ability to determine the abstract category distribution according to the multi-dimensional feature vector. The abstract category distribution includes the confidence levels of each abstract category in the abstract category set. The abstract category set includes all the abstract categories corresponding to the products belonging to the classification path of the category information provided in advance for the model to learn to perform abstract classification on the products belonging to this classification path. Thus, by inputting the multi-dimensional feature vector of the target product into this abstract classification model, the abstract category distribution can be inferred by this model, and then each abstract category corresponding to the top ranking according to the confidence level from high to low is used as the abstract category to be verified respectively.

[0060] Step S1510: When the confidence level meets the preset condition, confirm that the abstract category to be verified is the target abstract category and append it to the category information.

[0061] To ensure that abstract categories with a sufficiently high confidence level are included in the final product classification result, thereby guaranteeing the reliability and accuracy of the classification. A preset threshold is used to measure the confidence level of the abstract category to be verified. When the confidence level of the abstract category to be verified exceeds this preset threshold, it means that the confidence level is large enough at this time to confirm the abstract category to be verified as the target abstract category, and then append it to the category information of the target product, so as to enrich the association between the target product and the user's consumption needs; conversely, when the confidence level of the abstract category to be verified is less than or equal to this preset threshold, it means that the confidence level is insufficient at this time, and the abstract category to be verified is confirmed as a failed verification, and the unreliable and / or inaccurate abstract category is abandoned and not appended to the target product.

[0062] In this embodiment, first, by using an abstract classification model to analyze the multi-dimensional feature vector of the target product, the abstract category to be verified related to the product and its confidence level can be quickly and accurately determined. Further, by setting a preset threshold to measure the confidence level of the abstract category to be verified, it is ensured that only abstract categories with a sufficiently high confidence level will be included in the final product classification result. This mechanism effectively improves the reliability and accuracy of the classification, avoids classification errors caused by insufficient confidence level, and guarantees the quality of the product classification. It can be seen that an abstract analysis method based on multi-dimensional feature vectors is realized, making the product classification more comprehensive and detailed, covering not only concrete classifications but also being able to delve into the abstract characteristics of products, such as usage scenarios, target audiences, etc., so as to better meet the diverse needs of users and enhance the relevance between products and users' consumption needs. In addition, it has high practicality and operability, can be widely applied to application scenarios such as accurate product recommendation, search, and associated purchase on e-commerce platforms, and has important commercial value and application prospects.

[0063] In a further embodiment, before step S1500: using an abstract classification model prepared corresponding to the classification path to which the category information belongs to determine the abstract category to be verified and its confidence level according to the multi-dimensional feature vector of the target product, the following steps are included:

[0064] Step S2500: Obtain multiple subordinate products belonging to the same classification path in the product classification system diagram, and obtain the set of user expression texts generated corresponding to each subordinate product when interacting with the user to meet the preset conditions;

[0065] In order to construct an abstract classification model that is pre-trained to a convergent state for each classification path in the product classification system diagram. For each classification path belonging to the product classification system diagram, taking a single classification path as an example, first, all products whose category information of the product is labeled as this classification path are obtained and used as affiliated products belonging to this classification path respectively. Further, for each affiliated product, the user expression texts generated by the interaction behavior between the affiliated product and the user, which represents that the user is interested in the product, are collected and assembled into a user expression text set. The user expression texts generated by the interaction behavior include, but are not limited to: the search text entered during the search when the user clicks or purchases the product after the search ("entry-level camping equipment"); after the customer service of the product or other users who follow the product reply to the user with a reply text that meets the user's needs for the product, the question text corresponding to when the user asks a question ("User asks: Is it suitable for camping on the plateau; Customer or other users answer: Dear, it is very suitable"); the positive review text provided when the user gives a positive review of the product ("This tent has very good windproof effect in rainy days"). In addition, the question-and-answer session records corresponding to the conversation between the user and the customer service and / or other users of the product, and all the comments on the product can be collected first, and then they are handed over to the large language model according to the aforementioned specific requirements for the question text and the positive review text respectively, so as to extract the corresponding question text and positive review text from the question-and-answer session records and all the comments respectively.

[0066] Step S2510: Determine an abstract category set related to user consumption needs based on each of the user expression text sets;

[0067] In one embodiment, first, each user expression text in all user expression text sets is vectorized by a pre-trained model such as Bert to obtain corresponding text feature vectors. Then, a clustering algorithm (such as K-means, hierarchical clustering) is applied to cluster the text feature vectors, so that vectors corresponding to similar text semantics are divided into the same cluster. Thus, the corresponding clusters are determined. Further, for each cluster, all user expression texts belonging to this cluster are tokenized, and the corresponding token sets are assembled into a token set. Then, the pre-trained Bert model is called to vectorize each token in the token set to obtain corresponding token feature vectors. Furthermore, a vector distance algorithm is used to calculate the similarity between the vector semantic representation corresponding to the cluster center and the token feature vectors corresponding to each token in the token set, and the tokens with similarity exceeding a preset threshold are selected as abstract categories. Thus, the corresponding abstract categories selected from each cluster are assembled into an abstract category set. The preset threshold can be set by those skilled in the art as needed. The vector semantic representation corresponding to each cluster center can be flexibly determined by those skilled in the art, and this step will not be elaborated here.

[0068] Step S2520: Determine the affiliated products corresponding to the user expression text set containing the abstract categories in the abstract category set. Use the multi-dimensional feature vector obtained by encoding the multi-dimensional product information of the affiliated products as training samples, and label the supervision labels of the training samples according to each included abstract category.

[0069] For each user expression text set corresponding to an affiliated product, determine whether the user expression text set contains any abstract category in the abstract category set. When it contains, determine each included abstract category. Then, use the multi-dimensional feature vector determined based on the multi-dimensional product information of the affiliated product as a single training sample. Furthermore, in the abstract category distribution, label the classification probabilities corresponding to each of the aforementioned included abstract categories as 1, and label the classification probabilities of the remaining abstract categories as 0. Use the labeled actual abstract category distribution as the supervision label of the training sample. The abstract category distribution is used to represent the classification probabilities (i.e., confidence levels) corresponding to each abstract category in the abstract category set. For example, if a certain potato chip product has a strong association with the two abstract categories of "leisure scenario" and "festival gift", then in its supervision label, that is, the classification probabilities at the corresponding positions of these two abstract categories in the actual abstract category distribution are assigned as 1, and the classification probabilities at the remaining positions are 0.

[0070] Step S2530: Aggregate each of the training samples and their supervision labels to form an abstract classification training set, which is used to train the abstract classification model corresponding to the classification path, enabling it to learn the ability to determine the abstract category distribution based on the multi-dimensional feature vector. The abstract category distribution includes the confidence levels of each abstract category in the abstract category set.

[0071] Perform end-to-end training on the abstract classification model using the abstract classification training set. The model architecture can be a multi-layer perceptron (MLP) and / or a fully connected network with an attention mechanism. The input layer receives the multi-modal feature vector, the hidden layer uses Dropout to prevent overfitting, and the output layer uses the Softmax activation function to generate the confidence levels of each abstract category in the abstract category distribution. During the training process, introduce the Focal Loss function to iteratively evaluate the loss value of the model and then update the parameters in the model accordingly, so as to alleviate the problem of abstract category imbalance. After iteratively training the model to the convergence state, the model can learn the correlation between the multi-dimensional feature vector and each abstract category in the abstract category set, and thus can determine the abstract category distribution based on the multi-dimensional feature vector.

[0072] In this embodiment, it is disclosed how to train an abstract classification model for each classification path in the commodity classification system diagram. After the training converges, based on the concrete classification paths that have been assigned to the commodity, it can further classify various abstract categories that match the commodity, so as to improve the comprehensiveness of commodity classification, enabling more accurate matching of suitable commodities for users when matching user needs later and enhancing the user experience.

[0073] In a further embodiment, step S2510 of determining an abstract category set related to user consumption needs based on each of the user expression text sets includes the following steps:

[0074] Step S2511: Perform a normalization format process on each of the user expression text sets to obtain corresponding formatted text sets;

[0075] The normalization format process of the user expression text set aims to eliminate the unstructured problems caused by the diversity of data sources and expression differences in the original data. Specifically, it includes standardizing and cleaning special symbols (such as meaningless words like "unknown", "b / o", etc.), inconsistent case, spelling mistakes, and redundant characters (spaces, punctuation marks that have no impact on semantics) in the user expression text. By applying regular expression matching and replacement techniques, non-standard user inputs (such as "Limited-time offer!!!") are converted into a unified format (such as "Limited-time offer"), and at the same time, natural language processing tools are used to normalize the colloquial expressions (such as unifying "Baby's clothes and pants" into "Baby clothing"). This process can be automated by using mature text processing libraries (such as Apache Commons Text) to ensure the semantic consistency and computational friendliness of the text data during subsequent analysis. For cases involving a mixture of multiple languages, language recognition is also required, such as converting text expressed in multiple languages into the same language expression, and finally forming structured and semantically clear user expression texts, and then integrating these user expression texts into a formatted text set.

[0076] Step S2512: Construct a prompt text containing the formatted text set to guide the large language model to generate corresponding abstract categories based on the relevance between the user expressions in the formatted text set and the concrete features of user consumption needs.

[0077] The construction of the prompt text is to provide clear guidance and context information to the large language model, enabling it to better understand the consumption needs contained in the user's expressed text and generate accurate abstract categories accordingly. The prompt text can include some guiding questions or instructions, such as "Based on the following user's expressed text, extract the abstract categories related to consumption needs. The concrete features of consumption needs usually include the effect feedback of the product (e.g., for clothing products: slimming), application scenarios (e.g., for clothing products: hot spring), applicable events (e.g., for clothing products: competition), target audience (e.g., for clothing products: girlfriend), social value (going viral), etc.", and then list the formatted user's expressed text. Such prompt text can help the large language model focus on the key information in the user's expressed text, combine its pre-trained knowledge and understanding of consumption needs, and generate corresponding abstract categories, thus realizing the abstraction from the specific user's expression to the abstract category that matches the consumption needs, providing support for subsequent classification and analysis.

[0078] In this embodiment, by leveraging the vast knowledge learned by the large language model from the real world and its accurate understanding and reasoning capabilities, it is possible to quickly and accurately extract the abstract categories corresponding to the potential product characteristics that meet the user's consumption needs from the standardized user's expressed text generated after the interaction between the user and the products they are interested in, according to the guidance.

[0079] In a further embodiment, after step S2511 of performing normalization formatting on each of the user's expressed text sets to obtain the corresponding formatted text sets, the following steps are included:

[0080] Step S2521: Use a preset named entity recognition model to recognize the formatted text set, and extract the entity words belonging to the corresponding target entity types in the set as the abstract categories to be confirmed. The target entity types include any one or more of effect feedback, application scenario, applicable event, target audience, and social value;

[0081] The core principle of the named entity recognition model is to label each word or phrase in the formatted text set as a specific entity category through sequence annotation. Specifically, the training task of named entity recognition usually first annotates the text input into the model based on annotation rules (such as BIO, BIOES, and BMES, etc.). Among them, B represents the starting position of the entity word, I represents the middle part of the entity word, and O represents the non-entity part. These annotation rules help the model clarify the boundaries and categories of entities. For the entity words in the text input into the model, they are manifested as the corresponding words or phrases belonging to the target entity types, while the non-entity words are manifested as the corresponding words or phrases not belonging to the target entity types.

[0082] The training process of the named entity recognition model relies on a large amount of labeled training data. By learning the context features, lexical features, and semantic features in this data, the model can capture the patterns and regularities of different target entity types. For example, the model can recognize that "slim fit" belongs to the effect feedback, "hot spring" belongs to the application scenario, "competition" belongs to the applicable event, "girlfriend" belongs to the target audience, and "going viral" belongs to the social value, etc. This learning process of training the model to the convergence state enables the model to accurately identify the entity words corresponding to the target entity types based on the context and semantic information when facing unseen input text.

[0083] Furthermore, in terms of the structure of the named entity recognition model, it is recommended to use Bert + BiLSTM + CRF. The BiLSTM + CRF model captures the context dependencies through a bidirectional recurrent neural network and optimizes the annotation sequence by combining a conditional random field, thereby improving the accuracy of entity recognition. The BERT model, based on the pre-trained Transformer architecture, can accurately capture the deep semantic information in the text through a bidirectional encoding mechanism, further enhancing the ability to recognize entity words in complex contexts. The model trained to the convergence state can extract the entity words from the formatted text set and use them as the abstract categories to be confirmed.

[0084] Step S2531: When the semantic integrity of the abstract category to be confirmed meets the preset conditions, confirm the abstract category to be confirmed as an abstract category.

[0085] The judgment of semantic integrity is based on whether the information expressed by the entity word is specific and complete enough. For example, words such as "like" and "recommend" although express the emotional needs of users and are easily classified as entity words belonging to the effect feedback and social value, they are too abstract to accurately describe the specific needs or intentions of users. In contrast, words such as "slim fit", "hot spring", and "competition" have clear semantic directivity and can be directly associated with the specific needs of users for goods. Through the judgment of semantic integrity, those abstract categories with truly practical and complete meanings can be screened out, avoiding resource waste caused by overly broad abstract categories. For example, if "like" is used as an abstract category, subsequent classification and analysis may fall into an overly general level and cannot provide users with a clear consumption recommendation and / or accurate consumption demand matching. By screening out abstract categories with high semantic integrity, it can be ensured that the corresponding abstract categories are more focused on the real consumption needs of users.

[0086] In terms of specific implementation, hint texts containing each abstract category to be confirmed can be constructed to guide the large language model to analyze the semantic integrity of each abstract category to be confirmed. Then, the abstract categories to be confirmed whose semantic integrity meets the standard reflecting the user's consumption needs are confirmed and output as abstract categories. An example of a hint text: "The following are the abstract categories to be screened. Please screen out the abstract categories with qualified semantic integrity according to the following requirements and instructions:

[0087] Semantic integrity judgment criteria: The abstract category should be directly related to specific consumption needs or product characteristics; the abstract category should have a clear semantic orientation and be able to clearly describe the user's specific needs or usage scenarios; the abstract category should not be too broad or vague, and avoid using words such as 'like' and'recommend' that cannot directly reflect specific needs.

[0088] Screening requirements: Please analyze the semantic integrity of each abstract category to be confirmed one by one, and judge whether it meets the above criteria. For the abstract categories with qualified semantic integrity, please directly confirm and finally output.

[0089] Example illustration: Examples that do not meet the requirements: 'like','recommend' (too abstract and cannot be directly related to specific needs); examples that meet the requirements: 'fitted' (effect feedback), 'hot spring' (application scenario), 'competition' (applicable event), 'girlfriend' (target audience), 'going viral' (social value).

[0090] In this embodiment, by performing named entity recognition on the formatted text set, the entity words corresponding to the target entity type are recognized as the abstract categories to be confirmed. On this basis, the abstract categories with qualified semantic integrity are further selected. It can be seen that ensuring that the abstract categories focus on the user's real consumption needs can avoid being too broad to match the needs.

[0091] In a further embodiment, before step S1400, that is, using a preset decoder to perform autoregressive decoding on the input encoding sequence to determine the target classification path in the commodity classification system diagram and labeling it as the category information of the target commodity, the following steps are included:

[0092] Step S2400: Obtain a preset decoding training set, where the decoding training set contains multiple training samples and their supervision labels;

[0093] The decoding training set contains multiple training samples and their supervision labels. These training samples and supervision labels are used to train the decoder so that the decoder can learn how to autoregressively decode the classification path in the commodity classification system diagram according to the input encoded sequence. The training samples are usually the input encoded sequences corresponding to some commodities with the correct classification paths already labeled, while the supervision labels are the actual correct classification paths of these commodities in the commodity classification system diagram. Through the decoding training set, the decoder can learn the association between different input encoded sequences and classification paths, and those skilled in the art can flexibly construct this training set according to the disclosure herein.

[0094] Step S2410: Invoke the decoding training set to train the decoder so that it acquires the ability to autoregressively decode the classification path in the commodity classification system diagram according to the input encoded sequence.

[0095] During the training process, the decoder will, according to the training samples and their supervision labels in the decoding training set, continuously adjust its own parameters so that the classification path inferred based on the training samples is consistent with the supervision labels. This training process usually involves some machine learning algorithms, such as loss calculation algorithms, gradient descent algorithms, backpropagation algorithms, etc., to optimize the inference performance of the decoder. As the training is iteratively executed, the decoder gradually learns how to extract useful information from the input encoded sequence and map it to the correct classification path. Through repeated iterations until the inference performance of the decoder meets the standard, that is, it can accurately decode the vast majority of training samples into the correct classification paths defined by their supervision labels, it is confirmed that the decoder is trained to the convergence state at this time. Thus, the decoder has the ability to autoregressively decode the correct classification path in the commodity classification system diagram according to the input encoded sequence.

[0096] In this embodiment, the training process of the decoder is disclosed to ensure that after being trained to convergence, it can quickly and accurately autoregressively decode the classification path mapped and associated with the input encoded sequence in the commodity classification system diagram.

[0097] Please refer to Figure 2, A commodity classification device provided to meet one of the purposes of the present application is a functional embodiment of the commodity classification method of the present application. The device includes a data acquisition module 1100, a data encoding module 1200, a sequence construction module 1300, and an autoregressive decoding module 1400. Among them, the data acquisition module 1100 is used to acquire a commodity classification system diagram and multi-dimensional commodity information of a target commodity, and the multi-dimensional commodity information includes commodity information corresponding to the target commodity in multiple dimensions; the data encoding module 1200 is used to encode the multi-dimensional commodity information to obtain a multi-dimensional feature vector integrating feature information of each dimension, and encode each category in the commodity classification system diagram to obtain an intra-graph feature vector of each category; the sequence construction module 1300 is used to fuse each intra-graph feature vector with the multi-dimensional feature vector respectively to obtain a commodity category vector corresponding to each category, traverse each category in the commodity classification system diagram, and add the commodity category vectors of the traversed categories to the input encoding sequence in the traversal order; the autoregressive decoding module 1400 is used to perform autoregressive decoding on the input encoding sequence by using a preset decoder to determine a target classification path in the commodity classification system diagram, which is marked as the category information of the target commodity.

[0098] In a further embodiment, the data encoding module 1200 includes: a multi-modal encoding sub-module, which is used to encode the corresponding text information, image information, and structured numerical information in the multi-dimensional commodity information by using a text encoding network, an image encoding network, and a numerical encoding network in a preset multi-modal encoding model respectively to obtain corresponding text encoding vectors, image encoding vectors, and structural encoding vectors; a multi-modal fusion sub-module, which is used to fuse the text encoding vectors, image encoding vectors, and structural encoding vectors by using a multi-modal fusion network in the multi-modal encoding model to obtain a multi-dimensional feature vector.

[0099] In a further embodiment, after the autoregressive decoding module 1400, it includes: an abstract classification sub-module, which is used to use an abstract classification model prepared corresponding to the classification path to which the category information belongs to determine a to-be-verified abstract category and its confidence level according to the multi-dimensional feature vector of the target commodity; an abstract addition sub-module, which is used to confirm the to-be-verified abstract category as the target abstract category and add it to the category information when the confidence level meets a preset condition.

[0100] In a further embodiment, before the abstract classification sub-module, it includes: a data acquisition sub-module, configured to acquire a plurality of affiliated products belonging to the same classification path in the product classification system diagram, and acquire a set of user expression texts generated corresponding to each affiliated product when an interaction satisfying a preset condition occurs with a user; a set construction sub-module, configured to determine an abstract category set associated with the user's consumption needs based on each set of user expression texts; a sample annotation sub-module, configured to determine the affiliated products corresponding to the set of user expression texts containing the abstract categories in the abstract category set, use the multi-dimensional feature vector obtained by encoding the multi-dimensional product information of the affiliated products as a training sample, and label the supervision label of the training sample according to each abstract category included; a first model training sub-module, configured to collect each training sample and its supervision label to form an abstract classification training set, and use it to train the abstract classification model corresponding to the classification path, so that it learns the ability to determine the abstract category distribution according to the multi-dimensional feature vector, where the abstract category distribution includes the confidence levels of each abstract category in the abstract category set.

[0101] In a further embodiment, the set construction sub-module includes: a formatting processing sub-module, configured to perform normalization formatting processing on each set of user expression texts to obtain a corresponding set of formatted texts; a large model inference sub-module, configured to construct a prompt text containing the set of formatted texts, and use it to guide the large language model to generate corresponding abstract categories based on the relevance between the user expressions in the set of formatted texts and the concrete features of the user's consumption needs.

[0102] In a further embodiment, after the formatting processing sub-module, it includes: an entity recognition sub-module, configured to use a preset named entity recognition model to recognize the set of formatted texts, and extract the entity words belonging to the target entity type corresponding in the set as the abstract categories to be confirmed, where the target entity type includes any one or more of effect feedback, application scenario, applicable event, audience group, and social value; an abstract confirmation sub-module, configured to confirm the abstract category to be confirmed as an abstract category when the semantic integrity of the abstract category to be confirmed meets the preset condition.

[0103] In a further embodiment, before the autoregressive decoding module 1400, it includes: a training set acquisition sub-module, configured to acquire a preset decoding training set, where the decoding training set contains a plurality of training samples and their supervision labels; a second model training sub-module, configured to call the decoding training set to train the decoder, so that it learns the ability to autoregressively decode the classification path in the product classification system diagram according to the input encoded sequence.

[0104] To solve the above technical problems, an embodiment of the present application also provides a computer device. As Figure 3As shown, it is a schematic diagram of the internal structure of a computer device. The computer device includes a processor, a computer-readable storage medium, a memory, and a network interface connected via a system bus. Among them, the computer-readable storage medium of the computer device stores an operating system, a database, and computer-readable instructions. The database can store a control information sequence. When the computer-readable instructions are executed by the processor, the processor can implement a commodity classification method. The processor of the computer device is used to provide computing and control capabilities to support the operation of the entire computer device. The memory of the computer device can store computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor can execute the commodity classification method of the present application. The network interface of the computer device is used to connect and communicate with a terminal. Those skilled in the art can understand that Figure 3 The structure shown in is only a block diagram of some structures related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine some components, or have different component arrangements.

[0105] In this embodiment, the processor is used to execute Figure 2 the specific functions of each module and its sub-modules in. The memory stores the program codes and various types of data required to execute the above modules or sub-modules. The network interface is used for data transmission between the user terminal and the server. The memory in this embodiment stores the program codes and data required to execute all modules / sub-modules in the commodity classification device of the present application. The server can call the program codes and data of the server to execute the functions of all sub-modules.

[0106] The present application also provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors are caused to execute the steps of the commodity classification method according to any embodiment of the present application.

[0107] Those of ordinary skill in the art can understand that to implement all or part of the processes in the above embodiments of the method of the present application, it can be completed by instructing relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above methods. Among them, the aforementioned storage medium can be a computer-readable storage medium such as a magnetic disk, an optical disk, a read-only memory (ROM), or a random access memory (RAM), etc.

[0108] In summary, the present application can classify commodities efficiently, comprehensively, and accurately, providing important assistance for a variety of extended application scenarios.

[0109] Those skilled in the art can understand that the various operations, methods, steps, measures, and solutions in the processes discussed in this application can be alternated, changed, combined, or deleted. Further, other steps, measures, and solutions in the various operations, methods, and processes discussed in this application can also be alternated, changed, rearranged, decomposed, combined, or deleted. Further, those in the prior art that have steps, measures, and solutions in the various operations, methods, and processes disclosed in this application can also be alternated, changed, rearranged, decomposed, combined, or deleted.

[0110] The above are only partial embodiments of this application. It should be noted that for those of ordinary skill in the art, without departing from the principle of this application, several improvements and refinements can be made, and these improvements and refinements should also be regarded as the protection scope of this application.

Claims

1. A commodity classification method, characterized in that, It includes the following steps: Obtain a commodity classification system diagram and multi-dimensional commodity information of a target commodity, where the multi-dimensional commodity information includes commodity information corresponding to the target commodity under multiple dimensions; Encode the multi-dimensional commodity information to obtain a multi-dimensional feature vector that integrates the feature information of each dimension, and encode each category in the commodity classification system diagram to obtain an intra-diagram feature vector for each category; Fuse each of the intra-diagram feature vectors with the multi-dimensional feature vector respectively to obtain a commodity category vector corresponding to each category, traverse each category in the commodity classification system diagram, and add the commodity category vectors of the traversed categories to the input encoding sequence in the traversal order; Use a preset decoder to perform autoregressive decoding on the input encoding sequence to determine a target classification path in the commodity classification system diagram, and label it as the category information of the target commodity.

2. The merchandise classification method according to claim 1, characterized in that, Encoding the multi-dimensional commodity information to obtain a multi-dimensional feature vector that integrates the feature information of each dimension includes the following steps: Use the text encoding network, image encoding network, and numerical encoding network in a preset multi-modal encoding model to encode the corresponding text information, image information, and structured numerical information in the multi-dimensional commodity information respectively to obtain corresponding text encoding vectors, image encoding vectors, and structure encoding vectors; The multi-modal fusion network in the multi-modal encoding model fuses the text encoding vector, image encoding vector, and structure encoding vector to obtain a multi-dimensional feature vector.

3. The commodity classification method according to claim 1, wherein After using a preset decoder to perform autoregressive decoding on the input encoding sequence to determine a target classification path in the commodity classification system diagram and labeling it as the category information of the target commodity, it includes the following steps: Use an abstract classification model prepared corresponding to the classification path to which the category information belongs to determine a to-be-verified abstract category and its confidence level according to the multi-dimensional feature vector of the target commodity; When the confidence level meets a preset condition, confirm the to-be-verified abstract category as the target abstract category and append it to the category information.

4. The merchandise classification method according to claim 3, wherein, Before using an abstract classification model prepared corresponding to the classification path to which the category information belongs to determine a to-be-verified abstract category and its confidence level according to the multi-dimensional feature vector of the target commodity, it includes the following steps: Obtain multiple subordinate commodities belonging to the same classification path in the commodity classification system diagram, and obtain a set of user expression texts generated corresponding to each subordinate commodity's interaction with the user that meets a preset condition; Determine a set of abstract categories related to user consumption needs based on each set of user expression texts; Determine the subordinate commodities corresponding to the set of user expression texts that include the abstract categories in the set of abstract categories, use the multi-dimensional feature vector obtained by encoding the multi-dimensional commodity information of the subordinate commodities as a training sample, and label the supervision label of the training sample according to each included abstract category. Collect each of the training samples and its supervision label to form an abstract classification training set, which is used to train the abstract classification model corresponding to the classification path, enabling it to acquire the ability to determine the abstract category distribution based on the multi-dimensional feature vector. The abstract category distribution includes the confidence levels of each abstract category in the abstract category set.

5. The merchandise classification method according to claim 4, wherein Based on each of the user statement text sets, determine an abstract category set related to the user's consumption needs, including the following steps: Perform a normalization format process on each of the user statement text sets to obtain the corresponding formatted text set; Construct a prompt text containing the formatted text set, and use it to guide the large language model to generate the corresponding abstract category based on the relevance between the user statements in the formatted text set and the concrete features of the user's consumption needs.

6. The merchandise classification method according to claim 5, characterized in that, After performing a normalization format process on each of the user statement text sets to obtain the corresponding formatted text set, include the following steps: Use a preset named entity recognition model to recognize the formatted text set, and extract the entity words belonging to the corresponding entity type of the target entity type as the abstract category to be confirmed. The target entity type includes any one or more of effect feedback, application scenario, applicable event, audience group, and social value; When the semantic integrity of the abstract category to be confirmed meets the preset conditions, confirm the abstract category to be confirmed as an abstract category.

7. The merchandise classification method according to claim 1, wherein Before using a preset decoder to perform autoregressive decoding on the input encoding sequence to determine the target classification path in the commodity classification system diagram and label it as the category information of the target commodity, include the following steps: Obtain a preset decoding training set, which contains multiple training samples and their supervision labels; Call the decoding training set to train the decoder, enabling it to acquire the ability to autoregressively decode the classification path in the commodity classification system diagram based on the input encoding sequence.

8. A commodity classification device, characterized in that, Include: A data acquisition module for acquiring the commodity classification system diagram and the multi-dimensional commodity information of the target commodity. The multi-dimensional commodity information includes the commodity information corresponding to the target commodity in multiple dimensions; A data encoding module for encoding the multi-dimensional commodity information to obtain a multi-dimensional feature vector that integrates the feature information of each dimension, and encoding each category in the commodity classification system diagram to obtain the in-graph feature vector of each category; A sequence construction module for respectively fusing each of the in-graph feature vectors with the multi-dimensional feature vector to obtain the commodity category vector corresponding to each category, traversing each category in the commodity classification system diagram, and adding the commodity category vectors of the traversed categories to the input encoding sequence in the traversal order; An autoregressive decoding module for using a preset decoder to perform autoregressive decoding on the input encoding sequence to determine the target classification path in the commodity classification system diagram and label it as the category information of the target commodity.

9. A computer device, comprising a central processing unit and a memory, characterized in that, The central processing unit is used to call and run the computer program stored in the memory to execute the steps of the method described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that It stores a computer program implemented by the method according to any one of claims 1 to 7 in the form of computer-readable instructions. When the computer program is called and run by a computer, it executes the steps included in the corresponding method.

Citation Information

Cited By

  • Commodity feature attribute-oriented intelligent classification method and system

    CN121188638A

  • Intelligent classification method and system for commodity characteristic attributes

    CN121188638B