Object classification method and device, medium and equipment

By constructing a multi-level category system with tree structure and using language models for semantic matching, the existing object classification methods are solved, and more efficient and accurate object classification is achieved.

CN120030381APending Publication Date: 2025-05-23ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411988897.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-05-23

AI Technical Summary

Technical Problem

Existing object classification methods are inefficient and the classification results are not accurate enough, making it difficult to effectively manage and retrieve diverse products or objects.

Method used

A multi-level category system is constructed in a tree structure, each node represents a category word, the child node belongs to the parent node, and the node path represents object classification. Semantic matching is performed with the help of language model, and the semantic matching relationship between the description information of the object to be classified and the node path are determined, and then object classification is determined.

Benefits of technology

Through precise semantic analysis of the category system and language model, more efficient and more accurate object classification is achieved, avoiding the development of classification algorithms and improving classification efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120030381A_ABST
    Figure CN120030381A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an object classification method and device, a medium and equipment. A multi-level category system is constructed, the category system can be represented through a tree structure, and each node of the tree structure represents a category word; category words represented by child nodes belong to category words represented by parent nodes; each node path of the tree structure represents an object classification. On the basis of a category system represented by a tree structure, semantic matching is carried out on description information of a to-be-classified object and node paths in the tree structure by means of the semantic analysis capability of a language model, and at least one target node path having a semantic matching relationship with the description information is determined; and the object classification corresponding to the to-be-classified object can be obtained. In addition, the technical scheme can be applied to a trusted execution environment, so that the description information of the to-be-classified object is prevented from being leaked.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of artificial intelligence technology, and in particular to an object classification method, device, medium and equipment. Background Art

[0002] Object classification is the process of dividing a collection of objects into different categories. Object classification is necessary in some application scenarios. For example, e-commerce platforms need to categorize the products listed by merchants so that customers can search for products of interest based on the product category.

[0003] The present disclosure aims to provide an object classification solution with higher efficiency and more accurate effect. Summary of the Invention

[0004] The embodiment of the present specification provides an object classification method, wherein a category system represented by a tree structure is pre-constructed, wherein each node of the tree structure represents a category word; the category word represented by the child node is subordinate to the category word represented by the parent node; and each node path of the tree structure represents an object classification;

[0005] The method comprises:

[0006] Get the description information of the object to be classified;

[0007] Invoking a language model to determine at least one target node path having a semantic matching relationship with the description information;

[0008] An object classification corresponding to the object to be classified is determined according to the at least one target node path.

[0009] The embodiment of the present specification provides an object classification device, wherein a category system represented by a tree structure is pre-constructed, wherein each node of the tree structure represents a category word; the category word represented by the child node is subordinate to the category word represented by the parent node; and each node path of the tree structure represents an object classification;

[0010] The device comprises:

[0011] Acquisition module, obtains the description information of the object to be classified;

[0012] A calling module calls a language model to determine at least one target node path having a semantic matching relationship with the description information;

[0013] A determination module determines an object classification corresponding to the object to be classified according to the at least one target node path.

[0014] An embodiment of this specification also provides a computer program product, which stores at least one instruction, and the at least one instruction is suitable for being loaded by a processor and executing the above method steps.

[0015] An embodiment of this specification further provides a storage medium, wherein the storage medium stores a computer program, and the computer program is suitable for being loaded by a processor and executing the steps of the above method.

[0016] An embodiment of this specification further provides an electronic device, comprising: a processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the steps of the above method.

[0017] In the technical solution of this specification, a multi-level category system is constructed. This category system can be represented by a tree structure, in which each node of the tree structure represents a category word; the category word represented by the child node is subordinate to the category word represented by the parent node; and each node path of the tree structure represents an object classification. Based on the category system represented by the tree structure, with the help of the semantic analysis capability of the language model, the description information of the object to be classified can be semantically matched with the node path in the tree structure, and at least one target node path with a semantic matching relationship with the description information can be determined, thereby obtaining the object classification corresponding to the object to be classified. In addition, the above technical solution can be applied in a trusted execution environment to avoid leakage of the description information of the object to be classified.

[0018] The above technical solution, on the one hand, ensures that, in a tree-structured category system, the semantic scope of the category term represented by the parent node is always greater than that of the category term represented by the child node, following the order from the root node to the leaf node. Therefore, each node path represents a category, resulting in relatively accurate classification. Furthermore, classification is achieved by semantically matching the description of the object to be classified with the node path using an existing language model. This not only eliminates the need for classification algorithm development but also improves classification efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 This is a flow chart of an object classification method provided in an embodiment of this specification;

[0020] Figure 2 This is a schematic diagram of the category system provided in the embodiments of this specification;

[0021] Figure 3 This is a schematic diagram of the structure of an object classification device provided in an embodiment of this specification;

[0022] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this specification. DETAILED DESCRIPTION

[0023] To make the purpose, technical solutions, and advantages of this specification more clear, the technical solutions of this specification will be clearly and completely described below in conjunction with the specific embodiments of this specification and the corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this specification, not all of them. This solution can be applied in a trusted execution environment. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without making any creative efforts are within the scope of protection of this specification.

[0024] Object classification refers to the process of dividing a group of objects into different categories based on specific criteria or characteristics. Existing object classification methods suffer from low efficiency and inaccurate classification results. For ease of understanding, let's use the aforementioned object as an example. E-commerce platforms offer a wide variety of products, ranging from daily necessities to luxury goods, covering nearly every consumer need. While this product diversity enriches consumer choice, it also presents challenges in category management. Faced with tens of thousands of products, consumers often feel confused and unsure how to quickly find the items they are interested in. Therefore, e-commerce platforms need to effectively categorize the products listed by merchants to facilitate quick search and enhance the shopping experience.

[0025] It is easy to understand that the above objects are not limited to commodities, but can also be employees, students, work tasks, etc. In the corresponding application scenarios, there is a need for object classification.

[0026] Existing object classification methods rely on simple keyword rules, but the descriptive information of the objects to be classified is often diverse, making it difficult to accurately match the description of the objects to be classified with the keyword rules. Training AI models capable of accurate classification is costly, and implementation efficiency is low. Furthermore, existing object classification methods are based on a relatively simple category system, making it difficult to achieve precise classification.

[0027] To solve the above technical problems, in one or more embodiments of the present disclosure, a multi-level category system is constructed. This category system can be represented by a tree structure, where each node of the tree structure represents a category word; the category word represented by the child node is subordinate to the category word represented by the parent node; and each node path of the tree structure represents an object classification. Based on the category system represented by the tree structure, the semantic analysis capability of the language model can be used to semantically match the description information of the object to be classified with the node path in the tree structure, determine at least one target node path that has a semantic matching relationship with the description information, and then obtain the object classification corresponding to the object to be classified.

[0028] The above technical solution, on the one hand, ensures that, in a tree-structured category system, the semantic scope of the category term represented by the parent node is always greater than that of the category term represented by the child node, following the order from the root node to the leaf node. Therefore, each node path represents a category, resulting in relatively accurate classification. Furthermore, classification is achieved by semantically matching the description of the object to be classified with the node path using an existing language model. This not only eliminates the need for classification algorithm development but also improves classification efficiency.

[0029] The technical solution of the present disclosure is described in detail below with reference to the accompanying drawings.

[0030] Figure 1 The following is a flow chart of an object classification method provided by the present disclosure, which includes the following steps:

[0031] S100: Obtain description information of the object to be classified.

[0032] Figure 1 The method flow shown can be applied to programs that automatically execute logic.

[0033] In execution Figure 1 Before implementing the method, a category system that supports refined classification needs to be pre-built. This category system can be represented as a tree structure. Each node in the tree structure represents a category term; the category term represented by the child node is subordinate to the category term represented by the parent node; and each node path in the tree structure represents an object classification.

[0034] Figure 2 This is a schematic diagram of the category system provided by the present disclosure. Figure 2 As shown, taking commodities as an example, the tree structure has two root nodes. The first root node represents the category term "electronics," and the second root node represents the category term "food." For example, the root node "Electronics" is the parent node, and its child nodes include "Portable," "Vehicle," and "Home Appliances." "Portable" is a more detailed category subordinate to "Electronics." "Home Appliances" is the parent node, and its child nodes include "TV," "Air Conditioner," and "Washing Machine," which are more detailed categories subordinate to "Home Appliances."

[0035] Easy to understand, Figure 2 Any node path in the tree structure shown represents an object category. For example, "food - grain and oil - seasoning" represents an object category. Figure 2 This is only an example. In actual applications, the category system can be more complex, which means that the corresponding tree structure will include many levels and many nodes.

[0036] In one or more embodiments of the present disclosure, the descriptive information of the object to be classified serves as the basis for classification. As a specific example, if the object to be classified is a product on an e-commerce platform, the descriptive information of the object to be classified may be the title information of the e-commerce page used to sell the product. When executing step S100, the title information of the e-commerce page used to sell the product may be obtained, and the product name may be extracted from the title information as the descriptive information of the product.

[0037] It should be noted that named entity recognition (NER) technology can be used to extract the product name of the product from the title information of the e-commerce page as the description information of the product to be classified.

[0038] S102: Calling a language model to determine at least one target node path having a semantic matching relationship with the description information.

[0039] 104: Determine an object classification corresponding to the object to be classified according to the at least one target node path.

[0040] Before executing step S102 , the description information of the object to be classified may be subjected to text preprocessing, such as removing useless redundant information, performing word segmentation, and the like.

[0041] The language model described in this disclosure refers to an artificial intelligence model with the ability to semantically analyze and understand language text. In some embodiments, a large language model (LLM), such as ChatGpt4o, can be used to implement semantic analysis and understanding capabilities.

[0042] In some embodiments, before executing step S102 , the language model may be fine-tuned based on a preset category system so that the language model is more suitable for performing tasks under this category system.

[0043] Because the language model has the ability of semantic analysis and understanding, even if the category words in the preset category system are quite different from the description information of the object to be classified, the language model can still achieve semantic matching between the category words with large literal differences but relatively close semantics and the description information.

[0044] It should be noted that two language texts have a semantic matching relationship, which means that the two language texts have semantic similarities, and this similarity can be used as a classification criterion.

[0045] It is easy to understand that a single category word that has a semantic matching relationship with the descriptive information may not necessarily indicate the true classification of the object to be classified, but a node path that has a semantic matching relationship with the descriptive information (meaning that the category word represented by each node on the path has a semantic matching relationship with the descriptive information) is likely to indicate the true classification of the object to be classified.

[0046] It is easy to understand that as a basic implementation method of step S102, it is only necessary to interact with the language model once, and prompt the language model with the language analysis task to be performed (finding the node path that has a semantic matching relationship with the description information from each node path in the tree structure), and the language model can perform the task.

[0047] Here we take an example to illustrate the above implementation. Figure 2 Consider the category system shown. Assuming the description of the product to be classified is "smart display," a prompt can be constructed: "The product description is "smart display." Please refer to the following category tree structure to find the node path that semantically matches "smart display." The category tree structure is... (this can be a textual description of the tree structure or a diagram of the tree structure). This prompt is input into the language model, and the language model outputs two target node sequences: "Electronics - Portable - Laptop" and "Electronics - Appliances - Television."

[0048] In addition, as an optional implementation of step S102, a prompt statement can be input into the language model to prompt the language model to output: among the multiple root nodes of the tree structure, a root node that has a semantic matching relationship with the description information. Then, the root node output by the language model is determined as the target parent node, and the following steps are performed in a loop:

[0049] A prompt statement is input into the language model to prompt the language model to output: a child node in the next level child node of the target parent node that has a semantic matching relationship with the description information; the target parent node is reset to the child node output by the language model; wherein the loop stopping condition includes: the target parent node is a leaf node.

[0050] That is to say, semantic analysis is performed one by one with the help of language models in the order from the root node to the leaf node of the tree structure. Specifically, each time a node bifurcates, only one parent node is involved, and the language model is called to determine which child node of this parent node has a semantic matching relationship with the description information.

[0051] Furthermore, the subnodes that have a semantic matching relationship with the descriptive information specifically include: subnodes that have a semantic matching relationship with both the descriptive information and the premise information. The premise information includes: the node path that the language model has output. In other words, each time a prompt is input to the language model, the node path that the language model has output in all previous iterations must also be input. This allows the language model to refer more closely to the context of the entire semantic analysis process in each iteration and provide more accurate analysis results.

[0052] Here we take an example to illustrate the above implementation. Figure 2 In the category system shown, assuming the description of the product to be classified is "smart display," we can construct prompt 1: "Given the product description is "smart display," please tell me which of the following category terms has a semantic match with this product: electronics and food." Input this prompt 1 into the language model, and the language model outputs "electronics." Continue constructing prompt 2: "Given the product has a semantic match with "electronics," please tell me which of the following category terms has a semantic match with this product: portable, vehicle, and home appliance." Input this prompt 2 into the language model, and the language model outputs "home appliance." Continue constructing prompt 3: Given the product has a semantic match with "electronics" and "home appliance," please tell me which of the following category terms has a semantic match with this product: television, air conditioner, and washing machine. Input this prompt 3 into the language model, and the language model outputs "television." Summarizing the results output by the language model in response to prompts 1-3, we can obtain the target node sequence as "electronics-home appliances-television". Therefore, the classification result of "smart display" is "electronics-home appliances-television".

[0053] Alternatively, as another optional implementation of step S102, a prompt statement is input to the language model, prompting the language model to output: at least two root nodes in the tree structure that have a semantic match with the description information, and confidence probabilities corresponding to the at least two root nodes. Each root node output by the language model is determined as a target parent node, and the following steps are performed in a loop:

[0054] For each target parent node, a prompt statement is input into the language model to prompt the language model to output: at least two child nodes in the next level of child nodes of the target parent node that have a semantic matching relationship with the description information, and the confidence probabilities corresponding to the at least two child nodes respectively; each child node output by the language model is re-determined as a target parent node; wherein the loop stopping condition includes: each target parent node is a leaf node.

[0055] That is to say, in the order from the root node to the leaf node of the tree structure, semantic analysis is performed one by one with the help of the language model. Specifically, each time a node bifurcates, it involves the bifurcation of at least two parent nodes, and the language model is called to determine which child nodes (at least two) under each target parent node have a semantic matching relationship with the description information. The reason for doing this is that when analyzing the tree structure layer by layer, if there is only one target parent node determined by the previous layer, and this target parent node is wrong, then this error will propagate to the next layer, resulting in error accumulation, and ultimately a completely wrong classification may be obtained at the leaf node. To alleviate this problem, a strategy can be adopted to let the language model output at least two results each time (confidence is ordered from high to low, and at least two results are selected in turn). This provides an opportunity to correct previous errors when analyzing at a lower level.

[0056] In addition, in the above embodiment, since at least two target node paths may be determined in step S102, in step S104, when at least two target node paths are determined, for each target node path, the average confidence probability corresponding to the target node path can be determined based on the confidence probability corresponding to each node on the target node path; and the object classification corresponding to the object to be classified can be determined based on the target node path with the highest corresponding average confidence probability.

[0057] It's important to note that when performing semantic analysis at each level of the tree structure, the language model determines the degree of semantic match between each candidate node and the description information, calculating a confidence probability. As you can see, the higher the confidence probability, the higher the semantic match.

[0058] Furthermore, the subnodes that have a semantic matching relationship with the descriptive information specifically include: subnodes that have a semantic matching relationship with both the descriptive information and the premise information. The premise information includes: the node path that the language model has output. In other words, each time a prompt is input to the language model, the node path that the language model has output in all previous iterations must also be input. This allows the language model to refer more closely to the context of the entire semantic analysis process in each iteration and provide more accurate analysis results.

[0059] Here we take an example to illustrate the above implementation. Figure 2In the category system shown, assuming the description of the product to be classified is "multi-grain rice cake," we can construct prompt 1: Given the product description "multi-grain rice cake," please tell me which of the following category terms has a semantic match with this product: electronics and food. Input this prompt 1 into the language model, and the language model outputs a confidence probability of 99% for "food" and 1% for "electronics." Next, construct prompt 2: Given a confidence probability of 99% for "food" and 1% for "electronics," please tell me which of the following category terms has a semantic match with this product: portable, vehicle, home appliance, snacks, and grain and oil. Input this prompt 2 into the language model, and the language model outputs a confidence probability of 55% for "snacks" and 45% for "grain and oil." Continue to construct prompt 3: "Snacks" - confidence probability 55%, "Cereals and Oils" - confidence probability 45%, please tell me which of the following category words has a semantic match with this product: puffed food, nuts, rice and flour, seasoning, and oil. Input this prompt 3 into the language model and obtain the language model output of "rice and flour" - 75% and "nuts" - 25%. Summarizing the results output by the language model in response to prompts 1-3, we can obtain two target node sequences: sequence 1 is "food-snacks-nuts" and sequence 2 is "food-cereals and oils-rice and flour." The average confidence probability corresponding to sequence 1 is (99% + 55% + 25%) / 3 ≈ 0.6, and the average confidence probability corresponding to sequence 2 is (99% + 45% + 75%) / 3 ≈ 0.7. Therefore, "food-cereals and oils-rice and flour" is the classification result of "multi-grain rice cake".

[0060] In addition, considering that the semantics of the description information of some objects is ambiguous, or the semantics of the category words in the preset category system are ambiguous, further error correction can be performed based on the classification results obtained in steps S102-S104 to further improve the classification accuracy.

[0061] For example, a product description might read "Super easy-to-use cosmetic cotton swabs." Following steps S102-S104, the product might be categorized as "Daily Chemicals - Skin Care - Medical Devices," when it should actually be categorized as "Daily Chemicals - Beauty - Beauty Tools." The following error correction strategy is designed to address this type of issue.

[0062] The idea of error correction is based on the premise that by using a tree-structured category system and with the help of a language model, the accuracy of the classification results for each object to be classified is not low (experimental tests show that the classification accuracy rate reaches 85%). Therefore, the classification status of the classified objects can be used as a reliable data source for statistical analysis.

[0063] Regarding error correction ideas, specifically, the description information of each classified object includes a set of classification keywords (at least one classification keyword). Classification keywords refer to keywords that will affect the object classification results. For example, "Super easy-to-use cosmetic cotton swabs" includes two classification keywords, namely makeup and cotton swabs. Based on statistical methods, the number of classified objects, the number of categories, and the classification keywords included in each classified object can be used as the data basis for statistical analysis. The following formula can be obtained:

[0064]

[0065] Wherein, item represents the target category; word represents the classification keyword; P(item|word1,…,wordn) represents the probability that the classified object belongs to the target category under the condition that the classification keyword set contained in the description information of the classified object is word1 to wordn; P(word1,…,wordn|item) represents the proportion of classified objects whose description information contains the classification keyword set from word1 to wordn under the target category; P(item) represents the proportion of classified objects that belong to the target category among all classified objects; P(word) represents the proportion of classified objects that contain the classification keyword word among all classified objects.

[0066] For each classified object, a preset formula is used to calculate the probability that the object belongs to each category. If the maximum calculated probability corresponds to a category other than the current category of the object, the category of the object can be adjusted to the category corresponding to the maximum value. Experimental tests have shown that using this error correction approach can achieve a classification accuracy rate of 92%.

[0067] Here is an overall summary of the technical solutions provided by the present disclosure.

[0068] The technical solution provided by the present disclosure may only include the link of classifying objects using a tree-structured category system and a language model (referred to as link 1), utilizing the category system design of the tree-structured results, with the help of the semantic analysis ability of the language model, and combining the language model to output at least two nodes with semantic matching relationships from high to low according to the confidence probability, adding pre-set information, etc., which can improve efficiency while ensuring accuracy.

[0069] In addition, the technical solution provided by the present disclosure may include not only step 1, but also a step of correcting the object classification to which each classified object belongs (referred to as step 2). Moreover, as more and more objects to be classified are settled as classified objects through step 1, step 2 can be repeated to continuously correct all classification results, making the classification results increasingly accurate.

[0070] Figure 3 This is a schematic diagram of the structure of an object classification device provided by the present disclosure, wherein a category system represented by a tree structure is pre-constructed, wherein each node of the tree structure represents a category word; the category word represented by the child node is subordinate to the category word represented by the parent node; and each node path of the tree structure represents an object classification;

[0071] The device comprises:

[0072] Acquisition module 301, acquires description information of the object to be classified;

[0073] The calling module 302 calls the language model to determine at least one target node path having a semantic matching relationship with the description information;

[0074] The determination module 303 determines the object classification corresponding to the object to be classified according to the at least one target node path.

[0075] The above-mentioned device embodiments correspond to the method embodiments. For detailed descriptions, please refer to the description of the method embodiments, which will not be repeated here. The device embodiments are obtained based on the corresponding method embodiments and have the same technical effects as the corresponding method embodiments. For detailed descriptions, please refer to the corresponding method embodiments.

[0076] The embodiments of this specification also provide a computer storage medium, which can store multiple instructions, and the instructions are suitable for being loaded by a processor to execute the method of the embodiments of this disclosure.

[0077] This specification also provides a computer program product, which stores at least one instruction. The at least one instruction is loaded by the processor and executes the method of the embodiment of the present disclosure.

[0078] The embodiments of this specification also provide Figure 4 The electronic device shown in the figure is a schematic diagram of its structure. At the hardware level, the electronic device includes a processor, an internal bus, a network interface, memory, and non-volatile storage, and may also include other necessary hardware. The processor reads the corresponding computer program from the non-volatile storage into the memory and then runs it to implement the above-mentioned voice activity detection method.

[0079] Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of software and hardware, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0080] In the 1990s, technological improvements could be clearly distinguished as either hardware improvements (for example, improvements to circuit structures like diodes, transistors, and switches) or software improvements (improvements to process flows). However, with the advancement of technology, many process flow improvements today can now be considered direct improvements to hardware circuit structures. Designers almost always create the corresponding hardware circuit structure by programming the improved process flow into the hardware circuit. Therefore, it cannot be said that a process flow improvement cannot be implemented using hardware modules. For example, a programmable logic device (PLD), such as a field programmable gate array (FPGA), is an integrated circuit whose logical function is determined by user programming. Designers can "integrate" a digital system on a PLD through their own programming, without having to hire a chip manufacturer to design and manufacture a dedicated integrated circuit chip. Moreover, nowadays, instead of manually fabricating integrated circuit chips, this programming is mostly done using "logic compiler" software. This is similar to the software compiler used when developing programs. Before compilation, the original code must also be written in a specific programming language, called a hardware description language (HDL). There is not just one HDL, but many, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art will also understand that by simply programming the method flow in one of these hardware description languages and then programming it into an integrated circuit, a hardware circuit that implements the logic method flow can be easily obtained.

[0081] The controller can be implemented in any suitable manner. For example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also know that in addition to implementing the controller in a purely computer-readable program code format, the controller can be implemented in the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers by logically programming the method steps. Therefore, such a controller can be considered a hardware component, and the devices included therein for implementing various functions can also be considered as structures within the hardware component. Or even, the devices for implementing various functions can be considered as both software modules that implement the method and structures within the hardware component.

[0082] The systems, devices, modules, or units described in the above embodiments may be implemented by computer chips or entities, or by products having certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0083] For the convenience of description, the above devices are described as being divided into various units according to their functions. Of course, when implementing this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0084] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0085] This specification is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0086] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0087] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0088] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0089] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0090] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0091] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.

[0092] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Thus, this specification may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0093] This specification may be described in the general context of computer-executable instructions, such as program modules, executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, and the like that perform specific tasks or implement specific abstract data types. This specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communications network. In a distributed computing environment, program modules may be located in both local and remote computer storage media, including storage devices.

[0094] The various embodiments in this specification are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences between the other embodiments. In particular, the system embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the description of the method embodiments.

[0095] The foregoing is merely an example of the present invention and is not intended to limit the present invention. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present invention are intended to be included within the scope of the claims of the present invention.

Claims

1. A method for classifying an object, wherein: Pre-constructing a category system represented by a tree structure, wherein each node of the tree structure represents a category word; The category word represented by the child node is subordinate to the category word represented by the parent node; Each node path of the tree structure represents an object classification; The method comprises: Get the description information of the object to be classified; Calling a language model to determine at least one target node path having a semantic matching relationship with the description information; An object classification corresponding to the object to be classified is determined according to the at least one target node path.

2. The method of claim 1, wherein: The object to be classified is a commodity.

3. The method according to claim 2, wherein obtaining description information of the object to be classified comprises: Obtaining title information of an e-commerce page for selling the product; The product name is extracted from the title information as the description information of the product.

4. The method of claim 1, wherein: The language model is a large language model LLM.

5. The method of claim 4, wherein: The language model is fine-tuned in advance based on the category system.

6. The method of claim 1, calling a language model to determine at least one target node path having a semantic matching relationship with the description information, comprising: Inputting a prompt sentence into the language model to prompt the language model to output: a root node having a semantic matching relationship with the description information among the multiple root nodes of the tree structure; The root node output by the language model is determined as the target parent node, and the following steps are performed in a loop: Inputting a prompt sentence into the language model to prompt the language model to output: a child node in a next-level child node of the target parent node that has a semantic matching relationship with the description information; The target parent node is reset to a child node output by the language model; wherein the loop stopping condition includes: the target parent node is a leaf node.

7. The method of claim 1, calling a language model to determine at least one target node path having a semantic matching relationship with the description information, comprising: Inputting a prompt sentence into the language model to prompt the language model to output: at least two root nodes having a semantic matching relationship with the description information among the multiple root nodes of the tree structure, and confidence probabilities corresponding to the at least two root nodes respectively; Determine each root node output by the language model as a target parent node, and loop through the following steps: For each target parent node, input a prompt sentence into the language model to prompt the language model to output: at least two child nodes in the next level of child nodes of the target parent node that have a semantic matching relationship with the description information, and confidence probabilities corresponding to the at least two child nodes respectively; Each child node output by the language model is re-determined as a target parent node; wherein the loop stopping condition includes: each target parent node is a leaf node.

8. The method according to claim 6 or 7, wherein: The sub-nodes having a semantic matching relationship with the description information specifically include: A sub-node having a semantic matching relationship with both the description information and the premise information; the premise information includes: a node path output by the language model.

9. The method of claim 7, wherein determining the object classification corresponding to the object to be classified according to the at least one target node path comprises: When at least two target node paths are determined, for each target node path, according to the confidence probability corresponding to each node on the target node path, an average confidence probability corresponding to the target node path is determined; The object classification corresponding to the object to be classified is determined according to the target node path corresponding to the highest average confidence probability.

10. The method according to claim 1, further comprising: For each classified object, a preset formula is used to calculate the probability that the classified object belongs to each category; If the category corresponding to the maximum value in the calculated probability is not the category to which the classified object currently belongs, the category to which the classified object currently belongs is adjusted to the category corresponding to the maximum value; Wherein, the preset formula includes: Among them, item represents the target classification; word represents the classification keyword; P(item|word1,…,wordn) represents the probability that the classified object belongs to the target classification under the condition that the classification keyword set contained in the description information of the classified object is word1 to wordn; P(word1,…,wordn|item) represents the proportion of classified objects whose description information contains the classification keyword set from word1 to wordn under the target classification; P(item) represents the proportion of classified objects that belong to the target classification among all classified objects; P(word) represents the proportion of classified objects that contain the classification keyword word among all classified objects.

11. An object classification device, wherein: Pre-constructing a category system represented by a tree structure, wherein each node of the tree structure represents a category word; The category word represented by the child node is subordinate to the category word represented by the parent node; Each node path of the tree structure represents an object classification; The device comprises: An acquisition module obtains description information of the object to be classified; A calling module calls a language model to determine at least one target node path having a semantic matching relationship with the description information; A determination module determines the object classification corresponding to the object to be classified according to the at least one target node path.

12. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 10 are implemented.

13. An electronic device, characterized in that: include: A processor and a memory; wherein the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the steps of the method as claimed in any one of claims 1 to 10.

14. A computer program product having at least one instruction stored thereon, characterized in that: When the at least one instruction is executed by the processor, the steps of the method described in any one of claims 1 to 10 are implemented.

Citation Information

Cited By

  • Entity classification method based on tree thinking chain reasoning

    CN120687904A