Method for generating classification model, method and device for item classification
By generating a directed graph with weights and filtering target nodes and paths, the time-consuming and labor-intensive problem of manual construction of in-store navigation is solved, and the rapid classification and reasonable affiliation of items are achieved, and efficiency and accuracy are improved.
Patent Information
- Application Number
- CN202210055242.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-01-18
- Publication Date
- 2025-05-27
- Estimated Expiration
- 2042-01-18
AI Technical Summary
In the prior art, manual construction of in-store navigation is time-consuming and labor-intensive, and the product affiliation is unreasonable, resulting in inefficiency and inaccurate classification.
By obtaining in-store navigation of different items in the application, generating a directed graph with weights based on word segmentation results, filtering target nodes and paths, and generating classification models to achieve rapid classification and reasonable affiliation of items.
It realizes automated item classification and in-store navigation management, improves classification efficiency and accuracy, and reduces the cost of manual construction and maintenance.
Smart Images

Figure CN114282627B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technologies, and in particular, to a method for generating a classification model, a method and device for item classification. Background Art
[0002] LBS (Location Based Services) instant retail e-commerce is different from traditional e-commerce, and mainly takes the in-store browsing and trading scenario as its business form. Therefore, whether it is for merchants to manage goods in the store daily or for users to browse and search for goods in the store, it mainly depends on the merchant's internal product navigation in the store - that is, "in-store navigation". Among them, in-store navigation can also be understood as the unified in-store grouping set by LBS merchants for products. For example, on the consumer side, after a user enters an online store, the grouping displayed on the left is the in-store navigation. All products in the online store are hung under different in-store navigations.
[0003] Currently, in-store navigation depends on merchants to build and maintain it by themselves. Specifically, based on the merchant's understanding of the products and the layout of the offline shelves, the construction and maintenance of in-store navigation are achieved through a division of labor method.
[0004] However, due to the large number and diverse types of products, the method of manually constructing in-store navigation not only has high requirements for personnel, but also takes a long time, and may even cause the problem of unreasonable in-store navigation to which products are attached. Summary of the Invention
[0005] Embodiments of this application provide a method for generating a classification model, a method and device for item classification, so as to at least solve the technical problems of time-consuming, laborious, and unreasonable product attachment caused by manually constructing in-store navigation in the prior art.
[0006] According to one aspect of the embodiments of this application, a method for generating a classification model is provided, and the method includes:
[0007] Obtain the in-store navigation corresponding to different items in the application program, where the in-store navigation is the category adjacent to the item;
[0008] Generate a weighted directed graph based on the word segmentation result of the in-store navigation, where the word segmentation result includes the segmented words after word segmentation of the in-store navigation, and each segmented word corresponds to a node in the weighted directed graph, and the edge between adjacent nodes has a weight representing the association relationship between the segmented words corresponding to the adjacent nodes;
[0009] Determine a preset number of target nodes in the weighted directed graph in descending order of the target value of the nodes, where the target value of the node is equal to the sum of the weights of the edges pointing from the node to adjacent nodes;
[0010] Generate a classification model based on the target paths in each of the target nodes, where the target path is the path with the maximum sum of weights of the edges starting from the target node, and the classification model includes an attribute combination composed of the category attributes corresponding to each segmented word under each target path.
[0011] Optionally, generating a weighted directed graph based on the word segmentation result of the in-store navigation includes:
[0012] For each in-store navigation, obtain the word segmentation path corresponding to the in-store navigation based on each segmented word in the word segmentation result of the in-store navigation and the position of each segmented word in the in-store navigation;
[0013] Aggregate the word segmentation paths corresponding to different in-store navigations according to the same segmented words to obtain the weighted directed graph.
[0014] Optionally, for each in-store navigation, the word segmentation path corresponding to the in-store navigation has a target weight, and the target weight is a weight determined based on the order of the in-store navigation among all in-store navigations in the application, the sales volume of items under the in-store navigation, and the quantity of items under the in-store navigation.
[0015] Optionally, the target weight is equal to the sum of the product of a first preset weight and a first parameter, the product of a second preset weight and a second parameter, and the product of a third preset weight and a third parameter;
[0016] where the sum of the first preset weight, the second preset weight, and the third preset weight is equal to 1; the first parameter is equal to the reciprocal of the order of the in-store navigation among all in-store navigations in the application; the second parameter is equal to the ratio of the sales volume of items under the in-store navigation to the sales volume of items under all in-store navigations; the third parameter is equal to the ratio of the quantity of items under the in-store navigation to the quantity of items under all in-store navigations.
[0017] Optionally, generating a classification model based on the target paths in each of the target nodes includes:
[0018] For each target path, generate a word collocation combination based on the segmented words corresponding to the nodes in the target path;
[0019] For each word collocation combination, determine the attribute combination corresponding to the word collocation combination based on the mapping relationship between the category attributes and category attribute values of items in the application, where the attribute combination is a combination of the category attributes corresponding to each segmented word in the word collocation combination when each segmented word is used as the category attribute value;
[0020] Combining the attribute combinations corresponding to each of the above-mentioned word collocations, and determining them as the classification model.
[0021] Optionally, obtaining the in-store navigation corresponding to different items in the application program, including:
[0022] Obtaining candidate data, where the candidate data includes: each in-store navigation of different online stores in the application program and the attribute information of the items under each in-store navigation;
[0023] Filtering out the in-store navigations that meet the preset conditions from the candidate data.
[0024] According to another aspect of the embodiments of the present application, a method for classifying items is provided, and the method includes:
[0025] Obtaining the attribute information of the target item;
[0026] Based on the attribute information, determining the attribute collocation combination of the target item, where the attribute collocation combination is a combination composed of the category attributes corresponding to each segmented word after segmenting the item name in the attribute information;
[0027] Determining the target attribute combination that matches the attribute collocation combination in the classification model, where the classification model is obtained based on the generation method of the classification model as described above;
[0028] Based on the target attribute combination, determining the category to which the target item belongs.
[0029] According to another aspect of the embodiments of the present application, a classification model generation device is provided, and the device includes:
[0030] An acquisition module, configured to acquire the in-store navigation corresponding to different items in the application program, where the in-store navigation is the category adjacent to the item;
[0031] A graph structure module, configured to generate a weighted directed graph based on the segmentation result of the in-store navigation, where the segmentation result includes the segmented words after segmenting the in-store navigation, and each segmented word corresponds to a node in the weighted directed graph, and the edge between adjacent nodes has a weight representing the association relationship between the segmented words corresponding to the adjacent nodes;
[0032] A node module, configured to determine a preset number of target nodes in the weighted directed graph in the order from largest to smallest of the target values of the nodes, where the target value of the node is equal to the sum of the weights of the edges pointing from the node to the adjacent nodes;
[0033] A model module for generating a classification model based on the target paths in each of the target nodes, where the target path is the path with the largest sum of weights of the edges starting from the target node, and the classification model includes an attribute combination composed of the category attributes corresponding to each segmented word under each target path.
[0034] Optionally, the graph structure module includes:
[0035] A path unit for obtaining the segmented path corresponding to each in-store navigation based on each segmented word in the segmented result of the in-store navigation and the position of each segmented word in the in-store navigation.
[0036] A graph structure unit for aggregating the segmented paths corresponding to different in-store navigations according to the same segmented words to obtain the weighted directed graph.
[0037] Optionally, for each in-store navigation, the segmented path corresponding to the in-store navigation has a target weight, and the target weight is a weight determined based on the order of the in-store navigation among all in-store navigations in the application, the sales volume of the items under the in-store navigation, and the quantity of the items under the in-store navigation.
[0038] Optionally, the target weight is equal to the sum of the product of the first preset weight and the first parameter, the product of the second preset weight and the second parameter, and the product of the third preset weight and the third parameter;
[0039] where the sum of the first preset weight, the second preset weight, and the third preset weight is equal to 1; the first parameter is equal to the reciprocal of the order of the in-store navigation among all in-store navigations in the application; the second parameter is equal to the ratio of the sales volume of the items under the in-store navigation to the sales volume of the items under all in-store navigations; the third parameter is equal to the ratio of the quantity of the items under the in-store navigation to the quantity of the items under all in-store navigations.
[0040] Optionally, the model module includes:
[0041] A first combination unit for generating a word collocation combination for each target path based on the segmented words corresponding to the nodes in the target path.
[0042] A second combination unit for determining the attribute combination corresponding to each word collocation combination based on the mapping relationship between the category attributes and category attribute values of the items in the application, where the attribute combination is a combination composed of the category attributes corresponding to each segmented word when each segmented word is used as the category attribute value.
[0043] A model unit for determining the corresponding attribute combination of each of the above-mentioned collocations of words as the classification model.
[0044] Optionally, the acquisition module includes:
[0045] An acquisition unit for acquiring candidate data, where the candidate data includes: each in-store navigation of different online stores in the application and the attribute information of items under each in-store navigation;
[0046] A screening unit for screening out the in-store navigations that meet the preset conditions from the candidate data.
[0047] According to another aspect of the embodiments of the present application, there is provided an item classification device, the device includes:
[0048] An item module for acquiring the attribute information of a target item;
[0049] A first determination module for determining, based on the attribute information, the attribute collocation combination of the target item, where the attribute collocation combination is a combination composed of the category attributes corresponding to each segmented word after word segmentation of the item name in the attribute information;
[0050] A second determination module for determining the target attribute combination that matches the attribute collocation combination in the classification model, where the classification model is obtained based on the above-mentioned classification model generation method;
[0051] A classification module for determining the category to which the target item belongs based on the target attribute combination.
[0052] According to another aspect of the embodiments of the present application, there is provided an electronic device, including:
[0053] A processor, a memory, and a computer program stored on the memory and executable on the processor, where when the processor executes the program, it implements the above-mentioned classification model generation method or the above-mentioned item classification method.
[0054] According to another aspect of the embodiments of the present application, there is provided a readable storage medium, when the instructions in the readable storage medium are executed by the processor of an electronic device, enabling the electronic device to execute the above-mentioned classification model generation method or the above-mentioned item classification method.
[0055] In an embodiment of the present application, the in-store navigation corresponding to different items is obtained, and a weighted directed graph is generated based on the segmentation results of the in-store navigation. Based on the characteristics of the graph structure, the data of each in-store navigation are gathered together, and the weighted directed graph is used to represent the segmentation words in different in-store navigations and the association between the segmentation words. By screening the target nodes in the weighted directed graph, the segmentation words that are more widely used in the in-store navigation can be determined. By selecting the target path from each path starting from the target node, the segmentation words that are most reasonably matched with the widely used segmentation words can be determined, and then based on the category attributes corresponding to the segmentation words, multiple attribute combinations that are widely used and reasonably matched can be obtained. The multiple attribute combinations are used as a classification model, so that the classification model can be used to easily realize the rapid classification of items, and at the same time, the rationality of the items being attached to the in-store navigation can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments of the present application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0057] Figure 1 A flowchart of the steps of the method for generating a classification model provided in an embodiment of the present application;
[0058] Figure 2 A display diagram for in-store navigation;
[0059] Figure 3 One of the schematic diagrams showing a weighted directed graph provided in an embodiment of the present application;
[0060] Figure 4 A schematic diagram of the in-store navigation word segmentation results provided in an embodiment of the present application;
[0061] Figure 5 The second schematic diagram of a weighted directed graph provided in an embodiment of the present application;
[0062] Figure 6 A schematic diagram of a storage structure of candidate data provided in an embodiment of the present application;
[0063] Figure 7 A flowchart of the method for classifying items provided in an embodiment of the present application;
[0064] Figure 8 This is one of the schematic diagrams showing the object classification results provided in the embodiment of the present application;
[0065] Figure 9The second schematic diagram for displaying the item classification result provided by the embodiment of the present application;
[0066] Figure 10 The actual application schematic diagram of the method for item classification provided by the embodiment of the present application;
[0067] Figure 11 The structural block diagram of the generating device for the classification model provided by the embodiment of the present application
[0068] Figure 12 The structural block diagram of the device for item classification provided by the embodiment of the present application. Detailed implementation manners
[0069] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
[0070] It should be understood that the "one embodiment" or "an embodiment" mentioned throughout the specification means that a specific feature, structure, or characteristic related to the embodiment is included in at least one embodiment of the present application. Therefore, the appearances of "in one embodiment" or "in an embodiment" throughout the specification do not necessarily refer to the same embodiment. In addition, these specific features, structures, or characteristics can be combined in any suitable manner in one or more embodiments.
[0071] In various embodiments of the present application, it should be understood that the magnitudes of the serial numbers of the following processes do not mean the order of execution, and the execution order of each process should be determined by its function and internal logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
[0072] See Figure 1 , the embodiment of the present application provides a method for generating a classification model, and the method includes:
[0073] Step 101: Obtain the in-store navigation corresponding to different items in the application program.
[0074] In this step, the application is an application installed on an electronic device for selling or displaying items. For example, an application used by a merchant in a physical store to search for items or goods. It can be understood that the application contains the items sold or displayed by the merchant and the categories to which the items belong. The category is a classification, that is, a classification implemented according to the attributes of the goods, which will not be described in detail here. Among them, the categories can be divided into first-level categories, second-level categories, etc. The in-store navigation is the category adjacent to the item. For an application with a first-level category set, the in-store navigation is the first-level category. For an application with a second-level category set, the in-store navigation is the second-level category. As Figure 2 shown, for an application with a first-level category set, the in-store navigation 21 is the first-level category adjacent to the item 22.
[0075] Step 102: Generate a weighted directed graph based on the word segmentation results of the in-store navigation.
[0076] In this step, the word segmentation results include the segmented words after the in-store navigation is segmented, as shown in Table 1 below:
[0077] In-store navigation Word segmentation result Sunflower bouquet Sunflower, bouquet 33-stem rose bouquet 33 stems, rose, bouquet Fresh flower section for graduation season - Sunflower section Graduation, fresh flowers, section, sunflower, section Sunflowers for graduation season Graduation, sunflower, flower Qixi rose bouquet Qixi, rose, bouquet
[0078] Table 1
[0079] In Table 1, the in-store navigation column contains five pieces of data, and the word segmentation result column contains five word segmentation results of the in-store navigation. A weighted directed graph can be understood as a graph structure in which there is a direction between nodes and the edges between nodes have weights. As Figure 3 shown, the weighted directed graph includes five different nodes. Figure 3 Taking only five nodes as an example for illustration, the weighted directed graph in the embodiments of the present application is not limited to five. There is a direction between adjacent nodes, that is, the arrow direction. The edges between adjacent nodes have weights, namely w1, w2, w3, w4, w5, w6, w7, w8. Here, a weighted directed graph will be generated based on all the word segmentation results of the in-store navigation, so that each segmented word corresponds to a node in the weighted directed graph, and the edges between adjacent nodes have weights representing the association relationship between the segmented words corresponding to the adjacent nodes. Among them, each edge has a direction, and its direction is determined by the order of the respective corresponding segmented words in the in-store navigation. Taking "sunflower bouquet" as an example, "sunflower" is before "bouquet", then the direction of the edge between the first node corresponding to "sunflower" and the second node corresponding to "bouquet" is from the first node to the second node. The greater the weight of the edge, the closer the relationship between the two segmented words corresponding to the adjacent nodes, and it can also be understood that the collocation of the two segmented words is more reasonable.
[0080] Step 103: Determine a preset number of target nodes in the weighted directed graph in descending order of the target values of the nodes.
[0081] In this step, the target value of the node is equal to the sum of the weights of the edges that point from the node to the adjacent nodes. For example, if a target node has 5 adjacent nodes, and all directions point to the adjacent nodes, then there are 5 edges starting from the target node. The target value of the target node is equal to the sum of the weights of these 5 edges. Here, the larger the target value of the node, the more times the participle words corresponding to the node are used in the in-store navigation, that is, the more widely the participle words are used. The preset number is a number pre-set based on user needs, for example, it can be 10, but not limited to this. The target value of the target node is greater than or equal to all nodes in the weighted directed graph except the target node.
[0082] Step 104: Generate a classification model based on the target path in each target node.
[0083] In this step, the target path is the path with the largest sum of weights of the edges starting from the target node. It is understandable that the number of paths starting from each target node can be one or more. If the number of paths is only one, the target path is the path; if the number of paths is multiple, the sum of weights of the edges on each path is calculated, and the path with the largest calculation result is determined as the target path. The classification model includes an attribute combination composed of category attributes corresponding to each segmentation word under each target path. Here, the segmentation word is the word in the store navigation, and the store navigation is associated with the item, and the item has a category attribute, so the segmentation word corresponds to the category attribute. For example, if the segmentation word is "sunflower", then its corresponding category attribute is the main flower material; if the segmentation word is "bouquet", then its corresponding category attribute is style. Correspondingly, if the segmentation words corresponding to each node under a certain target path are "sunflower" and "bouquet", the attribute combination is "main flower material + style". It should be noted that an attribute combination can be obtained based on each target path. Since there are multiple target paths, the classification model can be regarded as a set composed of all attribute combinations.
[0084] In an embodiment of the present application, the in-store navigation corresponding to different items is obtained, a weighted directed graph is generated based on the segmentation results of the in-store navigation, the data of each in-store navigation is gathered together based on the characteristics of the graph structure, and the weighted directed graph is used to represent the segmentation words in different in-store navigations and the association between the segmentation words. By screening the target nodes in the weighted directed graph, the segmentation words that are more widely used in the in-store navigation can be determined. By selecting the target path from each path starting from the target node, the segmentation words that are most reasonably matched with the more widely used segmentation words can be determined, and then based on the category attributes corresponding to the segmentation words, multiple attribute combinations that are widely used and reasonably matched can be obtained. The multiple attribute combinations are used as a classification model, so that the classification model can be used to easily realize the rapid classification of items, and at the same time, the rationality of the items being attached to the in-store navigation can be improved.
[0085] Optionally, based on the word segmentation results of in-store navigation, a weighted directed graph is generated, including:
[0086] For each in-store navigation, based on each segmented word in the word segmentation results of the in-store navigation and the position of each segmented word in the in-store navigation, a segmented path corresponding to the in-store navigation is obtained.
[0087] It should be noted that for each in-store navigation, a segmented path will be obtained. For example, if the in-store navigation is "sunflower bouquet", its corresponding segmented path points from "sunflower" to "bouquet". Specifically, relevant information such as each in-store navigation and the word segmentation results of each in-store navigation can be aggregated together, and different types of data can be stored using different fields, thus facilitating the generation of a weighted directed graph. As Figure 4 shown, taking the relevant data of three in-store navigations as an example for illustration, for the relevant data of the in-store navigation "sunflower bouquet", the relevant data includes: the specific noun of the in-store navigation, that is, "sunflower bouquet", the word segmentation results "sunflower" and "bouquet"; the specific name of each segmented word in the classified segmented items, the order in the in-store navigation, and the item attribute corresponding to it when it is used as an item attribute value. Here, the item attribute is the category attribute in the above embodiment. The situations of the in-store navigations "33 rose bouquets" and "graduation season fresh flower area - sunflower area" are similar to that of the in-store navigation "sunflower bouquet", and will not be elaborated here.
[0088] Aggregate the segmented paths corresponding to different in-store navigations according to the same segmented words to obtain a weighted directed graph.
[0089] It should be noted that after a large number of segmented paths are aggregated according to the same segmented words, a weighted directed graph will be obtained by using nodes instead of segmented words. It can be understood that when aggregating each segmented path according to the same segmented words, the same two segmented words and the same edges in different segmented paths overlap, thus aggregating different segmented paths together. The segmented words corresponding to different nodes in the weighted directed graph are different. After the same edges overlap, the weight of the overlapping edge is equal to the sum of the weights of each edge before overlapping. For example, there are edges pointing from sunflower to bouquet in all three segmented paths, and the weights of each edge are 0.1, 0.20, and 0.3 respectively. After aggregation, the three edges become one edge, and the weight W = 0.1 + 0.20 + 0.3 = 0.6.
[0090] As Figure 5 shown, it is a schematic diagram showing the weighted directed graph. Through Figure 5It can be seen that the segmented words corresponding to the first node are "condolences", the segmented words corresponding to the second node are "graduation season", the segmented words corresponding to the third node are "blessings", the segmented words corresponding to the fourth node are "flower baskets", the segmented words corresponding to the fifth node are "carnations", the segmented words corresponding to the sixth node are "fresh flowers", the segmented words corresponding to the seventh node are "weddings", the segmented words corresponding to the eighth node are "roses", the segmented words corresponding to the ninth node are "red", the segmented words corresponding to the tenth node are "99 pieces", the segmented words corresponding to the eleventh node are "bouquets", and the segmented words corresponding to the twelfth node are "Qixi Festival". Correspondingly, the target value M of the second node is M = 0.16 + 0.23 + 0.28 + 0.12 = 0.79. The paths starting from the second node include the first path pointing from the second node to the first node, the second path pointing from the second node to the eleventh node, the third path pointing from the second node to the third node, and the fourth path pointing from the second node to the fourth node; among them, since the sum of the weights of the edges on the third path is the largest, when the second node is the target node, the third path is the target path of the second node.
[0091] In the embodiments of the present application, a large number of segmented paths are generated by using different in-store navigations, and aggregation is performed based on the large number of segmented paths, so that a weighted directed graph can be quickly generated.
[0092] Optionally, for each in-store navigation, the segmented path corresponding to the in-store navigation has a target weight, and the target weight is a weight determined based on the order of the in-store navigation among all in-store navigations in the application, the sales volume of items under the in-store navigation, and the quantity of items under the in-store navigation.
[0093] It should be noted that for each piece of in-store navigation data, the three parts of information, namely its order among all in-store navigations, the sales volume of items under the in-store navigation, and the quantity of in-store navigation items, are very important for the in-store navigation. Therefore, based on this, the weights of the segmented paths corresponding to different in-store navigations can be set to different values. Of course, the weights of the segmented paths corresponding to different in-store navigations can also be set to the same value. It can be understood that the weight of the segmented path is equal to the weight of each edge in the segmented path. Among them, there is an edge between adjacent segmented words in the segmented path.
[0094] In the embodiments of the present application, by taking into account the navigation order that is closely related to the in-store navigation, the sales volume of items under the in-store navigation, and the quantity of in-store navigation items, different target weights are generated for the segmented paths corresponding to different in-store navigations, thereby improving the accuracy of the classification model.
[0095] Optionally, the target weight is equal to the sum of the product of the first preset weight and the first parameter, the product of the second preset weight and the second parameter, and the product of the third preset weight and the third parameter;
[0096] Among them, the sum of the first preset weight, the second preset weight, and the third preset weight is equal to 1; the first parameter is equal to the reciprocal of the order of the in-store navigation among all in-store navigations in the application; the second parameter is equal to the ratio of the sales volume of items under the in-store navigation to the sales volume of items under all in-store navigations; the third parameter is equal to the ratio of the number of items under the in-store navigation to the number of items under all in-store navigations.
[0097] It should be noted that the first preset weight, the second preset weight, and the third preset weight are weight values determined based on the importance degrees of the navigation order, the sales volume of items under the in-store navigation, and the number of in-store navigation items respectively. As shown in Table 2 below:
[0098] Field name Weight Weight label Navigation order 0.35 Weight1 Sales volume of items under in-store navigation 0.45 Weight3 Number of items in in-store navigation 0.2 Weight2
[0099] Table 2
[0100] In Table 2, the navigation order is the order of the in-store navigation among all in-store navigations in the application. The first preset weight is equal to 0.35, the second preset weight is equal to 0.45, and the third preset weight is equal to 0.2, but not limited to this. The target weight can be calculated using Formula 1.
[0101] Formula 1:
[0102] Among them, w a represents the target weight, S represents the order of the in-store navigation among all in-store navigations in the application, q represents the sales volume of items under the in-store navigation, q max represents the sales volume of items under all in-store navigations, t represents the number of items under the in-store navigation, t max represents the number of items under all in-store navigations, Weight 1 represents the first preset weight, Weight 2 represents the second preset weight, Weight 3 represents the third preset weight.
[0103] In the embodiments of the present application, different weight values are assigned to the order of the in-store navigation among all in-store navigations in the application, the sales volume of items under the in-store navigation, and the number of items under the in-store navigation, and a reasonable target weight can be calculated using the formula.
[0104] Optionally, based on the target paths in each target node, a classification model is generated, including:
[0105] For each target path, based on the segmented words corresponding to the nodes in the target path, a collocation combination of words is generated;
[0106] For each collocation combination, based on the mapping relationship between the category attributes and category attribute values of the items in the application, determine the attribute combination corresponding to the collocation combination.
[0107] It should be noted that the attribute combination is the combination of various category attributes corresponding to each segmented word in the collocation combination when used as the category attribute value. The mapping relationship between the category attributes and category attribute values of the items in the application is shown in Table 3 below:
[0108]
[0109] Table 3
[0110] When the collocation combination is 99 roses, the corresponding attribute combination is the number of flowers + main flower material or the number of branches + main flower material. Specifically, each collocation combination can be in the form shown in Formula 2. Each attribute combination can be in the form shown in Formula 3.
[0111] Formula 2: Formula 3:
[0112] Determine the attribute combination corresponding to each collocation combination as the classification model.
[0113] In the embodiments of the present application, first generate collocation combinations based on the target path, and then quickly generate attribute combinations based on the collocation combinations to obtain the classification model.
[0114] Optionally, obtain the in-store navigation corresponding to different items in the application, including:
[0115] Obtain candidate data, where the candidate data includes: each in-store navigation of different online stores in the application and the attribute information of the items under each in-store navigation.
[0116] It should be noted that when the online statistical data of the items reaches the scale of hundreds of millions, it can objectively reflect the real situation of the items. Query the in-store navigation and the attribute information of the items in the same type of application and different online stores through the data warehouse. Specifically, this information includes in-store navigation, the title of the item, the item category attribute information, the commodity background category, etc. As Figure 6 shown, it is a schematic diagram of the storage structure of the candidate data. Among them, the honeycomb field is the area to which the physical store corresponding to the online store belongs.
[0117] Filter out the in-store navigation in the candidate data that meets the preset conditions.
[0118] It should be noted that by screening the in-store navigation data through preset conditions, some useless, redundant or non-standard data can be removed. Specifically, first, the items are scored based on the attribute information of the items, and the first type of items with scores lower than the target score are removed; then, according to the business scope and sellable qualifications of the online store, combined with the background categories of the products, the second type of items that are not within the business scope of the store or do not meet the sellable qualifications are removed; finally, the in-store navigation without hanging items or defined as "unclassified" is removed, and the remaining in-store navigation is the in-store navigation that meets the preset conditions.
[0119] It can be understood that when obtaining candidate data, the in-store navigation data of stores under the same area (cell) can be processed to obtain a classification model, and then the classification model can be used to classify the items in the stores under the same area, so that merchants can obtain in-store navigation applicable to their cells or the areas to which they belong.
[0120] In the embodiments of the present application, different classification models can be obtained according to local conditions for different regions, so that in-store navigation more applicable to the present cell can be provided for relevant merchants.
[0121] See Figure 7 , the embodiments of the present application also provide a method for classifying items, and the method includes:
[0122] Step 701: Obtain the attribute information of the target item.
[0123] In this step, the target item can be any item sold or displayed online. The attribute information includes the name of the target item, the category attribute of the target item, etc.
[0124] Step 702: Determine the attribute combination of the target item based on the attribute information.
[0125] In this step, the attribute combination is a combination composed of the category attributes corresponding to the segmented words after segmenting the item name in the attribute information. For example, if the item name is "sunflower bouquet", the category attribute corresponding to sunflower is the main flower material, and the category attribute corresponding to bouquet is the style; the attribute combination corresponding to sunflower bouquet is the main flower material + style.
[0126] Step 703: Determine the target attribute combination in the classification model that matches the attribute combination, where the classification model is obtained based on the classification model generation method in the above embodiments.
[0127] In this step, the similarity between the attribute combination and the target attribute combination in the classification model is the highest.
[0128] Step 704: Determine the category to which the target item belongs based on the target attribute combination.
[0129] In this step, the classification to which the target item belongs is the classification indicated by the target attribute combination. For example, if the target attribute combination is main flower material + style and the item name is "33 - stem sunflower bouquet", then the classification to which the target item belongs is sunflower bouquet. If there is already an in - store navigation for sunflower bouquets, then "33 - stem sunflower bouquet" is attached to the in - store navigation of sunflower bouquets. If there is no in - store navigation for sunflower bouquets, then an in - store navigation for sunflower bouquets needs to be created first, and then the target item is attached to this in - store navigation.
[0130] In the embodiments of the present application, the classification model can easily achieve the rapid classification of items, and at the same time, it can also improve the rationality of the attachment of items under the in - store navigation.
[0131] The embodiments of the present application can utilize information such as the region and cellular network of the merchant to generate in - store navigations with corresponding characteristics, which is convenient for the refined operation of the merchant. As Figure 8 shown, for merchants not near schools, in the in - store navigation or the first item classification result 81 in their stores, only blue baby's breath bouquet, sunflower mixed bouquet, colorful baby's breath bouquet, white baby's breath bouquet, small sunflower bouquet, and pink baby's breath bouquet are attached under fresh flower bouquets; 33 red roses for lovers, 52 red roses for girlfriend, 19 pink carnations, 33 white roses for lovers, 19 mixed - color carnations, 52 white roses for girlfriend, and 11 carnations are attached under fresh flower supermarket. There are various different types of items in the fresh flower supermarket and fresh flower bouquets, and the distinguishability of each item is relatively high, and there is no further distinction. Using the item classification method provided by the embodiments of the present application to classify each item in the first item classification result 81, the second item classification result 82 is obtained. In the second item classification result 82, the in - store navigation includes red roses, white roses, romantic roses, baby's breath, sunflowers, and carnations. The distinguishability of the items under each in - store navigation is relatively low, and the attachment of each item is more reasonable.
[0132] As Figure 9 shown, for merchants near schools, in the in - store navigation or the third item classification result 91 in their stores, [Valentine's Day] 33 red roses, [Valentine's Day] 52 red roses, pink carnations for teachers and elders, romantic rose and baby's breath for encounter, pink roses for love, graduation season sunflower mix, Teacher's Day sunflower fresh mix, and Teacher's Day sunflower and white lisianthus are attached under fresh flower supermarket; Using the item classification method provided by the embodiments of the present application to classify each item in the third item classification result 91, the fourth item classification result 92 is obtained. In the fourth item classification result 92, the in - store navigation includes Valentine's Day special zone, Teacher's Day special zone, and graduation season special zone.
[0133] As Figure 10 shown, it is a schematic diagram of the actual application of the item classification method provided by the embodiments of the present application, including:
[0134] Step 1: Obtain the products and in-store navigation data of a large number of stores in the area.
[0135] Step 2: Coarsely screen the data set, filter out the products with poor quality, the products without store qualifications, the classifications without associated products, and other category stores in Step 1 to obtain an effective product classification data set.
[0136] Step 3: Process the product and in-store navigation data. Classify the products according to the background categories, perform word segmentation on the in-store navigation to construct a feature word library, obtain the product transaction data, calculate scores based on indicators such as sales volume and word frequency to obtain in-store classifications (in-store navigation) exceeding the threshold, and finally obtain effective in-store navigation.
[0137] Step 4: Based on the effective in-store navigation, obtain the feature formula. Specifically, obtain the background category tree, perform word segmentation on the in-store navigation to obtain a weighted directed graph; cluster the weighted directed graph based on the honeycomb (area) to identify special feature words under different honeycombs, and finally use the mapping relationship between the category attributes and the category attribute values to determine the feature formula of the in-store navigation, that is, the classification model in the above application embodiment.
[0138] Step 5: Input the product to generate the in-store navigation in the area.
[0139] In the embodiment of the present application, for a new store, multi-dimensional information such as product data and in-store navigation is used to automatically generate the in-store navigation of the store, helping the new store to start business quickly; at the same time, it can effectively identify the common and different features of items, helping merchants to perform automatic operation of items, greatly reducing the labor cost of merchants to manage and maintain the in-store navigation; it can also use information such as the merchant's region and honeycomb to generate in-store navigation with corresponding characteristics, facilitating the refined operation of merchants.
[0140] See Figure 11 , the embodiment of the present application also provides a generation device for a classification model, and the device includes:
[0141] An acquisition module 1101, configured to acquire the in-store navigation corresponding to different items in the application program, where the in-store navigation is the category adjacent to the item;
[0142] A graph structure module 1102, configured to generate a weighted directed graph based on the word segmentation result of the in-store navigation, where the word segmentation result includes the segmented words after word segmentation of the in-store navigation, each segmented word corresponds to a node in the weighted directed graph, and the edge between adjacent nodes has a weight representing the association relationship between the segmented words corresponding to the adjacent nodes;
[0143] The node module 1103 is used to determine a preset number of target nodes in the weighted directed graph in the order of the target values of the nodes from large to small, where the target value of a node is equal to the sum of the weights of the edges pointing from the node to adjacent nodes;
[0144] The model module 1104 is used to generate a classification model based on the target paths in each target node, where the target path is the path with the largest sum of the weights of the edges starting from the target node, and the classification model includes an attribute combination composed of the category attributes corresponding to each segmented word under each target path.
[0145] Optionally, the graph structure module 1102 includes:
[0146] The path unit is used to obtain the segmented path corresponding to the in-store navigation based on each segmented word in the segmented result of the in-store navigation and the position of each segmented word in the in-store navigation for each in-store navigation;
[0147] The graph structure unit is used to aggregate the segmented paths corresponding to different in-store navigations according to the same segmented words to obtain a weighted directed graph.
[0148] Optionally, for each in-store navigation, the segmented path corresponding to the in-store navigation has a target weight, and the target weight is a weight determined based on the order of the in-store navigation among all the in-store navigations in the application, the sales volume of the items under the in-store navigation, and the quantity of the items under the in-store navigation.
[0149] Optionally, the target weight is equal to the sum of the product of the first preset weight and the first parameter, the product of the second preset weight and the second parameter, and the product of the third preset weight and the third parameter;
[0150] where the sum of the first preset weight, the second preset weight, and the third preset weight is equal to 1; the first parameter is equal to the reciprocal of the order of the in-store navigation among all the in-store navigations in the application; the second parameter is equal to the ratio of the sales volume of the items under the in-store navigation to the total sales volume of the items under all the in-store navigations; the third parameter is equal to the ratio of the quantity of the items under the in-store navigation to the total quantity of the items under all the in-store navigations.
[0151] Optionally, the model module 1104 includes:
[0152] The first combination unit is used to generate a word collocation combination for each target path based on the segmented words corresponding to the nodes in the target path;
[0153] The second combination unit is used to determine the attribute combination corresponding to the word collocation combination based on the mapping relationship between the category attributes and the category attribute values of the items in the application for each word collocation combination, where the attribute combination is a combination composed of the category attributes corresponding to each segmented word as the category attribute value in the word collocation combination;
[0154] The model unit is used to determine the attribute combination corresponding to each word combination as a classification model.
[0155] Optionally, the acquisition module 1101 includes:
[0156] An acquisition unit, configured to acquire candidate data, wherein the candidate data includes: each in-store navigation of different online stores in the application and attribute information of items under each in-store navigation;
[0157] The screening unit is used to screen the candidate data to obtain the in-store navigation that meets the preset conditions.
[0158] The generation device of the classification model provided in the embodiment of the present application can achieve Figures 1 to 6 To avoid repetition, the various processes of implementing the method for generating the classification model in the method embodiment will not be described here.
[0159] In an embodiment of the present application, the in-store navigation corresponding to different items is obtained, a weighted directed graph is generated based on the segmentation results of the in-store navigation, the data of each in-store navigation is gathered together based on the characteristics of the graph structure, and the weighted directed graph is used to represent the segmentation words in different in-store navigations and the association between the segmentation words. By screening the target nodes in the weighted directed graph, the segmentation words that are more widely used in the in-store navigation can be determined. By selecting the target path from each path starting from the target node, the segmentation words that are most reasonably matched with the widely used segmentation words can be determined, and then based on the category attributes corresponding to the segmentation words, multiple attribute combinations that are widely used and reasonably matched can be obtained. The multiple attribute combinations are used as a classification model, so that the classification model can be used to easily realize the rapid classification of items, and at the same time, the rationality of the items being attached to the in-store navigation can be improved.
[0160] See also Figure 12 The present application also provides an object classification device, the device comprising:
[0161] The item module 1201 is used to obtain the attribute information of the target item;
[0162] The first determination module 1202 is used to determine the attribute collocation combination of the target item based on the attribute information, wherein the attribute collocation combination is a combination of category attributes corresponding to each segmented word after the segmentation of the item name in the attribute information;
[0163] The second determination module 1203 is used to determine a target attribute combination that matches the attribute collocation combination in the classification model, wherein the classification model is obtained based on the above classification model generation method;
[0164] The classification module 1204 is used to determine the category to which the target object belongs based on the target attribute combination.
[0165] In the embodiment of the present application, the classification model can be used to easily realize the rapid classification of items, and at the same time, the rationality of the item registration under the in-store navigation can be improved.
[0166] On the other hand, an embodiment of the present application further provides an electronic device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method for generating a classification model provided in the above-mentioned embodiments of the application or the method for classifying objects provided in the above-mentioned embodiments of the application is implemented.
[0167] On the other hand, an embodiment of the present application further provides a readable storage medium. When the instructions in the readable storage medium are executed by a processor of an electronic device, the electronic device can execute the classification model generation method provided in the above application embodiments or the object classification method provided in the above application embodiments.
[0168] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.
[0169] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.
[0170] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0171] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements on some of the technical features; and these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the various embodiments of the present application.
Claims
1. A method for generating a classification model, characterized in that, the method includes: Obtain the in-store navigation corresponding to different items in the application, where the in-store navigation is the category adjacent to the item; Based on the word segmentation result of the in-store navigation, generate a weighted directed graph, where the word segmentation result includes the segmented words after word segmentation of the in-store navigation, and each segmented word corresponds to a node in the weighted directed graph, and the edges between adjacent nodes have weights representing the association relationship between the segmented words corresponding to the adjacent nodes; Determine a preset number of target nodes in the weighted directed graph in the order of decreasing target values of the nodes, where the target value of the node is equal to the sum of the weights of the edges pointing from the node to adjacent nodes; Generate a classification model based on the target path in each target node, where the target path is the path with the largest sum of the weights of the edges starting from the target node, and the classification model includes an attribute combination composed of the category attributes corresponding to each segmented word under each target path; Among them, the generating a weighted directed graph based on the word segmentation result of the in-store navigation includes: For each in-store navigation, based on the segmented words in the word segmentation result of the in-store navigation and the position of each segmented word in the in-store navigation, obtain the segmented path corresponding to the in-store navigation; Aggregate the segmented paths corresponding to different in-store navigations according to the same segmented words to obtain the weighted directed graph; Among them, for each in-store navigation, the segmented path corresponding to the in-store navigation has a target weight, and the target weight is a weight determined based on the order of the in-store navigation among all in-store navigations in the application, the sales volume of the items under the in-store navigation, and the number of items under the in-store navigation; Among them, the target weight is equal to the sum of the product of the first preset weight and the first parameter, the product of the second preset weight and the second parameter, and the product of the third preset weight and the third parameter; Among them, the sum of the first preset weight, the second preset weight, and the third preset weight is equal to 1; the first parameter is equal to the reciprocal of the order of the in-store navigation among all in-store navigations in the application; the second parameter is equal to the ratio of the sales volume of the items under the in-store navigation to the sales volume of the items under all in-store navigations; the third parameter is equal to the ratio of the number of items under the in-store navigation to the number of items under all in-store navigations.
2. The method according to claim 1, characterized in that, the generating a classification model based on the target path in each target node includes: For each target path, generate a word collocation combination based on the segmented words corresponding to the nodes in the target path; For each word collocation combination, based on the mapping relationship between the category attributes and category attribute values of the items in the application, determine the attribute combination corresponding to the word collocation combination, where the attribute combination is a combination composed of the category attributes corresponding to each segmented word when each segmented word is used as the category attribute value; Combining the attribute combinations corresponding to each of the above-mentioned word collocations, and determining them as the classification model.
3. The method according to claim 1, wherein, obtaining the in-store navigation corresponding to different items in the application program, including: obtaining candidate data, wherein the candidate data includes: each in-store navigation of different online stores in the application program and the attribute information of the items under each in-store navigation; screening out the in-store navigation that meets the preset conditions from the candidate data.
4. A method for classifying items, wherein, the method includes: obtaining the attribute information of the target item; based on the attribute information, determining the attribute collocation combination of the target item, wherein the attribute collocation combination is a combination composed of the category attributes corresponding to each segmented word after segmenting the item name in the attribute information; determining the target attribute combination that matches the attribute collocation combination in the classification model, wherein the classification model is obtained by the generation method of the classification model according to any one of claims 1-3; based on the target attribute combination, determining the category to which the target item belongs.
5. A device for generating a classification model, wherein, the device includes: an acquisition module, configured to acquire the in-store navigation corresponding to different items in the application program, wherein the in-store navigation is the category adjacent to the item; a graph structure module, configured to generate a weighted directed graph based on the segmentation result of the in-store navigation, wherein the segmentation result includes the segmented words after segmenting the in-store navigation, and each of the segmented words corresponds to a node in the weighted directed graph, and the edge between adjacent nodes has a weight representing the association relationship between the segmented words corresponding to the adjacent nodes; a node module, configured to determine a preset number of target nodes in the weighted directed graph in the order from largest to smallest of the target values of the nodes, wherein the target value of the node is equal to the sum of the weights of the edges pointing from the node to the adjacent nodes; a model module, configured to generate a classification model based on the target path in each of the target nodes, wherein the target path is the path with the largest sum of the weights of the edges starting from the target node, and the classification model includes an attribute combination composed of the category attributes corresponding to each segmented word under each target path; wherein, the graph structure module includes: a path unit, configured to, for each in-store navigation, obtain the segmented path corresponding to the in-store navigation based on each segmented word in the segmentation result of the in-store navigation and the position of each segmented word in the in-store navigation; a graph structure unit, configured to aggregate the segmented paths corresponding to different in-store navigations according to the same segmented words to obtain the weighted directed graph; wherein, for each in-store navigation, the segmented path corresponding to the in-store navigation has a target weight, and the target weight is a weight determined based on the order of the in-store navigation in all in-store navigations of the application program, the sales volume of the items under the in-store navigation, and the quantity of the items under the in-store navigation. Wherein, the target weight is equal to the sum of the product of the first preset weight and the first parameter, the product of the second preset weight and the second parameter, and the product of the third preset weight and the third parameter; Wherein, the sum of the first preset weight, the second preset weight, and the third preset weight is equal to 1; the first parameter is equal to the reciprocal of the order of the in-store navigation in all in-store navigations of the application; the second parameter is equal to the ratio of the sales volume of items under the in-store navigation to the sales volume of items under all in-store navigations; the third parameter is equal to the ratio of the number of items under the in-store navigation to the number of items under all in-store navigations.
6. The device according to claim 5, characterized in that the model module includes: a first combination unit configured to generate a word collocation combination for each of the target paths based on the segmented words corresponding to the nodes in the target path; a second combination unit configured to determine, for each of the word collocation combinations, an attribute combination corresponding to the word collocation combination based on the mapping relationship between the category attributes and the category attribute values of the items in the application, wherein the attribute combination is a combination of the category attributes corresponding to each of the segmented words as the category attribute values in the word collocation combination; a model unit configured to determine the attribute combinations corresponding to the word collocation combinations as the classification model.
7. The device according to claim 5, characterized in that the acquisition module includes: an acquisition unit configured to acquire candidate data, wherein the candidate data includes: each in-store navigation of different online stores in the application and the attribute information of the items under each in-store navigation; a screening unit configured to screen out the in-store navigations that meet the preset conditions from the candidate data.
8. An item classification device, characterized in that the device includes: an item module configured to acquire the attribute information of a target item; a first determination module configured to determine, based on the attribute information, an attribute collocation combination of the target item, wherein the attribute collocation combination is a combination of the category attributes corresponding to the segmented words after segmenting the item name in the attribute information; a second determination module configured to determine a target attribute combination that matches the attribute collocation combination in the classification model, wherein the classification model is obtained by the classification model generation method according to any one of claims 1-3; a classification module configured to determine the classification to which the target item belongs based on the target attribute combination.
9. An electronic device, characterized in that it includes: a processor, a memory, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the program, it implements the classification model generation method according to one or more of claims 1-3 or the item classification method according to claim 4.
10. A readable storage medium, characterized in that when the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is enabled to execute the classification model generation method according to one or more of claims 1-3 or the item classification method according to claim 4.
Citation Information
Patent Citations
Category path recognition method and system
CN103902545A
Commodity classification method and device, electronic equipment and storage medium
CN111340566A