Target classification method, storage medium and computer terminal

By using a classification model to perform hierarchical classification of the target objects, the problem of low efficiency in existing technologies is solved, and efficient multi-level classification is achieved.

CN114565444BActive Publication Date: 2026-03-27ALIBABA (CHINA) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-11
Publication Date
2026-03-27

AI Technical Summary

Technical Problem

Existing technologies have low efficiency in classifying winning bids, making it difficult to achieve efficient hierarchical classification.

Method used

A classification model is used to perform hierarchical classification of the target objects. The model is trained using a combination of an autoencoder language module, an anti-overfitting layer, and a fully connected layer, combined with a cross-entropy loss function. The hierarchical classification is performed by focusing on the language model of the right-hand character.

Benefits of technology

It enables multi-level classification of the target objects, improves classification efficiency, and achieves better classification results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114565444B_ABST
    Figure CN114565444B_ABST
Patent Text Reader

Abstract

The application discloses a target classification method, a storage medium and a computer terminal. The method comprises the following steps: acquiring a target object; performing hierarchical classification on the target object by using a classification model to obtain a target classification result of the target object, wherein the target classification result comprises a plurality of hierarchical target categories, and the categories belong to a plurality of hierarchical industry categories contained in a preset industry classification. The application solves the technical problem of low classification efficiency of the target in the related art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of object classification, and more specifically, to an object classification method, storage medium, and computer terminal. Background Technology

[0002] Currently, bidding recommendations aim to recommend effective bidding opportunities that companies are interested in. Categorizing the bids helps to screen candidate bidding companies and improve the accuracy of recommendations. Generally, the bids are categorized manually by domain experts, which is inefficient.

[0003] There is currently no effective solution to the above problems. Summary of the Invention

[0004] This application provides a method for classifying objects, a storage medium, and a computer terminal to at least solve the technical problem of low efficiency in classifying objects in related technologies.

[0005] According to one aspect of the embodiments of this application, a target object classification method is provided, comprising: obtaining a target object; performing hierarchical classification on the target object using a classification model to obtain a target classification result of the target object, wherein the target classification result includes: multiple levels of target categories, and the categories belong to multiple levels of industry categories included in a preset industry classification.

[0006] According to another aspect of the embodiments of this application, a target classification method is provided, comprising: obtaining a target dataset, wherein the target dataset contains original targets and multiple levels of original categories corresponding to the original targets, the original categories belonging to multiple levels of industry categories included in a preset industry classification; and training a classification model using the target dataset, wherein the classification model is used to perform hierarchical classification of the target targets to obtain a target classification result of the target targets.

[0007] According to another aspect of the embodiments of this application, a target classification device is provided, comprising: an acquisition module for acquiring a target target; and a classification module for performing hierarchical classification of the target target using a classification model to obtain a target classification result of the target target, wherein the target classification result includes: multiple levels of target categories, and the categories belong to multiple levels of industry categories included in a preset industry classification.

[0008] According to another aspect of the embodiments of this application, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored program, wherein, when the program is running, it controls the device where the computer-readable storage medium is located to execute any of the above-described object classification methods.

[0009] According to another aspect of the embodiments of this application, a computer terminal is also provided, including: a memory and a processor, wherein the processor is configured to run a program stored in the memory, wherein the program executes the object classification method of any of the above-mentioned methods when it runs.

[0010] In this embodiment, the target object is first obtained, and then a classification model is used to perform hierarchical classification of the target object to obtain the target classification result. The target classification result includes multiple levels of target categories, which belong to multiple levels of industry categories included in a preset industry classification, thus improving classification efficiency. It is noteworthy that using a classification model allows for hierarchical classification of the target object, resulting in multiple levels of target categories. This enables multi-level classification of the target object, achieving better classification results. Furthermore, since the target object is classified using a classification model, its classification efficiency is significantly improved, thereby solving the technical problem of low efficiency in classifying target objects in related technologies. Attached Figure Description

[0011] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:

[0012] Figure 1 This is a hardware structure block diagram of a computer terminal (or mobile device) for implementing a target classification method according to an embodiment of this application;

[0013] Figure 2 This is a flowchart of a subject matter classification method according to an embodiment of this application;

[0014] Figure 3 This is a schematic diagram of a subject matter sorting device according to an embodiment of this application;

[0015] Figure 4 This is a structural block diagram of a computer terminal according to an embodiment of this application;

[0016] Figure 5 This is a flowchart of another object classification method according to an embodiment of this application;

[0017] Figure 6 This is a schematic diagram of another object sorting device according to an embodiment of this application. Detailed Implementation

[0018] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0019] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0020] First, some nouns or terms that appear in the description of the embodiments of this application shall be interpreted as follows:

[0021] Subject matter: In this application, it refers to the products or services claimed in the tender document;

[0022] Hierarchical classification: There is a visible hierarchical structure between the categories to be classified;

[0023] Currently, short text classification is a very important branch of natural language recognition. Classic models focusing on short text classification include FastText and TextCNN, while those focusing on hierarchical classification include Hierarchical Multi-Label Classification (HFT-CNN). Unlike conventional short text classification, hierarchical classification tasks involve two core features: a) the input is a noun representing the target, and b) the input is a hierarchical structure. For feature a), the target is typically a short text of 10 characters or less, consisting of nouns or attributive phrases, with later characters indicating greater importance, such as "laptop" or "property management services." For feature b), the classification is hierarchical, constrained by hierarchical levels, and mutually exclusive between different classes within the same level. Non-hierarchical classification models, such as FastText, can directly predict the final class, but they struggle to guarantee inter-class mutual exclusion and intra-class clustering.

[0024] In this application, for cases where models that focus more on the "right-side" characters have insufficient support for hierarchical classification, a language model can be used to provide good support for hierarchical classification. By leveraging the parameter sharing mechanism of the model, a character sequence environment in which "the leftmost character is more important than the leftmost N characters" can be constructed. The model can then be trained to focus on the right-side characters, thereby achieving compatibility of the language model with the two core features mentioned above.

[0025] Example 1

[0026] According to an embodiment of this application, an embodiment of a target classification method is also provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0027] The methods and embodiments provided in this application can be executed on mobile terminals, computer terminals, or similar computing devices. Figure 1 A hardware block diagram of a computer terminal (or mobile device) for implementing a target classification method is shown. Figure 1 As shown, the computer terminal 10 (or mobile device 10) may include one or more processors 102 (shown as 102a, 102b, ..., 102n in the figure) 102 (processor 102 may include, but is not limited to, a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of a BUS bus), a network interface, a power supply, and / or a camera. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.

[0028] It should be noted that the aforementioned one or more processors 102 and / or other data processing circuitry are generally referred to herein as "data processing circuitry". This data processing circuitry may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuitry may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10 (or mobile device). This data processing circuitry serves as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).

[0029] The memory 104 can be used to store software programs and modules of application software, such as the program instructions / data storage device corresponding to the object classification method in this embodiment. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby realizing the object classification method described above. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor 102, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0030] The transmission device 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission device 106 includes a Network Interface Controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission device 106 may be a Radio Frequency (RF) module, used for wireless communication with the Internet.

[0031] The display can be, for example, a touchscreen liquid crystal display (LCD) that allows the user to interact with the user interface of the computer terminal 10 (or mobile device).

[0032] It should be noted here that, in some optional embodiments, the above... Figure 1 The computer device (or mobile device) shown may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that... Figure 1 This is only one instance of a specific particular instance and is intended to illustrate the types of components that may exist in the aforementioned computer device (or mobile device).

[0033] Under the aforementioned operating environment, this application provides the following: Figure 2 The classification method of the target objects is shown. Figure 2 This is a flowchart of a subject matter classification method according to an embodiment of this application. For example... Figure 2 As shown, the method may include the following steps:

[0034] Step S202: Obtain the target object.

[0035] The aforementioned target object can be either a physical product or a service.

[0036] In one alternative embodiment, short text of the target object, such as a noun or attributive phrase, can be obtained, wherein the later the word is in the text, the stronger its importance, such as "laptop" or "property management services".

[0037] The aforementioned target objects can be those included in the "Statistical Product Classification Catalog".

[0038] Step S204: Use a classification model to perform hierarchical classification of the target object to obtain the target classification result.

[0039] The target classification results include: multiple levels of target categories, which belong to multiple levels of industry categories included in the preset industry classification.

[0040] The above classification model can classify target objects at different levels, and an industry classification can contain different levels of industry categories.

[0041] In one optional embodiment, the target object can be classified in multiple levels using a classification model to obtain target categories at multiple levels. The target object can be classified at the first level to obtain its category at the first level. The target object can be classified at the second level based on the target object and its category at the first level to obtain its category at the second level. The target object can be classified at the third level based on the target object and its category at the second level, and so on, to obtain target categories at multiple levels.

[0042] In another optional embodiment, the National Industrial Classification of Economic Activities can be used as the classification system to obtain multiple levels of industry categories for the target object within the National Industrial Classification of Economic Activities. Specifically, the final subcategories of the National Industrial Classification of Economic Activities can be expanded using the Statistical Product Classification Catalog to establish the relationship between the existing target object and the National Industrial Classification of Economic Activities. The final subcategories are used as the "target objects," and the preceding subcategories of the National Industrial Classification of Economic Activities are used as the classifications of the "target objects" to create a target dataset. This target dataset can then be used to train the aforementioned classification model.

[0043] Through the above steps, the target object is first obtained, and then a classification model is used to perform hierarchical classification of the target object, resulting in a target classification result. This result includes multiple levels of target categories, each belonging to multiple levels of industry categories within a predefined industry classification, thus improving classification efficiency. It is noteworthy that using a classification model allows for hierarchical classification of the target object, resulting in multiple levels of target categories. This enables multi-level classification of the target object, achieving better classification results. Furthermore, because the classification is performed using a classification model, its efficiency is significantly improved, thereby solving the technical problem of low efficiency in target object classification in related technologies.

[0044] In the above embodiments of this application, a classification model is used to perform hierarchical classification of a target object to obtain a target classification result. This includes: constructing first input data based on the target object and a preset category; classifying the first input data using a classification model to obtain the category of the current level; repeatedly executing the steps of constructing second input data based on the target object and the category of the current level, and classifying the second input data using a classification model to obtain the category of the next level, until the number of classifications reaches a preset number; and generating a target classification result based on the category of the current level and at least one category of the next level.

[0045] The above preset category is empty, represented by none.

[0046] The preset number of times mentioned above can be set by the user. For example, it can be set to 4 times, so that the target object can be classified in 4 levels.

[0047] In one optional embodiment, first input data can be constructed based on the target object and a preset category. The first input data is input into a classification model, and the category of the target object and the preset category at the current level is obtained through the classification model. Second input data can be constructed based on the target object and the category at the current level, and the second input data is input into a classification model, and the category of the target object and the category at the current level is obtained through the classification model, until the number of classifications reaches 4. Based on the category at the current level and at least three categories at the next lower level, a target classification result is generated.

[0048] In the above embodiments of this application, the method further includes: obtaining a target dataset, wherein the target dataset contains original targets and original categories of multiple levels corresponding to the original targets; constructing multiple first training samples based on the target dataset, wherein each first training sample includes: an input sample and a first category, the input sample contains the original targets and the original category of the current level, or the original targets and a preset category, the first category being the original category of the first level, or the original category of the next level below the current level; and training the classification model using the multiple first training samples.

[0049] The above preset category can be none.

[0050] The original subject matter mentioned above can be an existing subject matter, which can be obtained from the "Statistical Product Classification Catalogue".

[0051] In one alternative embodiment, the classification model is trained by taking "target object, current category" as input and "next level category" as label data organization. Any target object can belong to the [P1, P2, P3, P4] category. If there are less than 4 levels, none can be used to fill in the gaps. Thus, four first training samples can be formed for the target object.

[0052] In another optional embodiment, the original target object can be a fiberglass desk. Fiberglass desks can belong to [manufacturing, education, arts and crafts, sports and entertainment products manufacturing, education and office supplies manufacturing, teaching models and teaching aids manufacturing]. Therefore, four first training samples can be constructed. The first training sample can be a fiberglass desk; none, whose corresponding first category can be manufacturing, and so on. The first training sample can also be fiberglass desk: manufacturing, whose corresponding first category can be education, arts and crafts, sports and entertainment products manufacturing; the first training sample can also be fiberglass desk: education, arts and crafts, sports and entertainment products manufacturing, whose corresponding first category can be education and office supplies manufacturing; the first training sample can also be fiberglass desk: education and office supplies manufacturing, whose corresponding first category can be teaching models and teaching aids manufacturing. When multiple first training samples are obtained, the classification model can be trained using these multiple first training samples so that the classification model can perform multi-level classification of the target object.

[0053] In the above embodiments of this application, the classification model includes: an autoencoder language module, an overfitting prevention layer, and at least one fully connected layer connected in sequence; the classification model is trained using the cross-entropy loss function.

[0054] The aforementioned autoencoder language module can be an autoencoder language model (Bidirectional Encoder Representations from Transformers, abbreviated as BERT).

[0055] The aforementioned dropout layer refers to the process of temporarily removing neural network units from the network with a certain probability during the training of a deep learning network to prevent overfitting.

[0056] In an alternative embodiment, a BERT classification model can be built using a BERT+dropout+fully connected (FC) layer and a cross-entropy loss function as the basic network structure. That is, the output of the BERT classification task can be connected to a dropout layer, the dropout layer can be connected to a fully connected layer, and the model can be trained using the cross-entropy loss function. A three-layer FC can be used, with 128 hidden nodes in each layer.

[0057] In the above embodiments of this application, the classification model includes a language model. The classification model is used to perform hierarchical classification of target objects to obtain target classification results. This includes: constructing an input sequence based on a preset length, preset depth, target object, and preset value; performing hierarchical classification of the input sequence using the language model to obtain an output sequence, wherein the output sequence contains target objects and target identification information, wherein the target identification information is used to identify target categories at multiple levels; extracting the target identification information contained in the output sequence; and obtaining the category corresponding to the target identification information to obtain the target classification result.

[0058] The aforementioned preset length can be the maximum length of the defined sequence, the aforementioned preset depth can be the maximum depth of the hierarchical classification, and the aforementioned preset value can be none. It is used to fill the classification hierarchy to the preset depth when the classification hierarchy is difficult to reach.

[0059] Currently, there is more focus on the "right-side" character model, which has insufficient support for hierarchical classification. In this application, hierarchical classification can be well supported based on the language model. The parameter sharing mechanism of the model can be used to construct a character sequence environment in which "the left 1 character is more important than the left N characters", so that the model can pay more attention to the right-side characters and has better compatibility with hierarchical classification.

[0060] The target identification information mentioned above can be displayed in positions p1, p2, p3, and p4. The target categories at the above multiple levels can be manufacturing, cultural, educational, arts and crafts, sports and entertainment products manufacturing, cultural and office supplies manufacturing, and teaching models and teaching aids manufacturing.

[0061] In one optional embodiment, taking the prediction of the classification result of fiberglass desks as an example, a preset depth T can be set to 5 and a preset length M to 15. When the actual category level of the target object is less than T, it is padded to T with the preset value; the padding value on the left side of the input data can pad the data to the length M-1; the start symbol [s] is padded on the left side of the input data. When M=15 and T=5, the input sequence can be constructed as follows: [s][pad][pad][pad] Fiberglass desk: p1 p2 p3 p4 none.

[0062] In the data construction method described above, because the category hierarchy p2 pays more attention to p1 than to more distant information (such as the name of the object), p3 pays more attention to p2, and so on, and the sequence in the hierarchy part accounts for a large proportion, the model, after training, tends to focus more on the characters on the right side of the sequence. Therefore, in the object part, the model will pay more attention to "class" and "desk" than to "glass" and "steel". For example, when M=15 and T=5, the fiberglass desk belongs to [Manufacturing, Educational, Arts and Crafts, Sports and Entertainment Products Manufacturing, Educational Office Supplies Manufacturing, Teaching Models and Teaching Aids Manufacturing], and the corresponding token_id is [P1 P2 P3 P4]. That is, the final output sequence can be [s][pad][pad][pad]Fiberglass Desk:P1 P2 P3 P4 none, where P1 P2 P3 P4 can be target identification information. By mapping the target identification information, the target classification result can be obtained, that is, the fiberglass desk belongs to [Manufacturing, Educational, Arts and Crafts, Sports and Entertainment Products Manufacturing, Educational Office Supplies Manufacturing, Teaching Models and Teaching Aids Manufacturing].

[0063] In another optional embodiment, when predicting the classification result, the output sequence can be truncated, and only the part after ":" can be truncated, and none can be removed. The target identification information can be mapped back to the hierarchical classification name, which is the hierarchical classification corresponding to the target object.

[0064] In the above embodiments of this application, constructing an input sequence based on a preset length, a preset depth, a target object, and a preset value includes: constructing a first subsequence based on the preset value, wherein the classification depth corresponding to the first subsequence is the preset depth; constructing a second subsequence based on a first preset symbol, preset fill data, a target object, and a second preset symbol, wherein the preset fill data is located to the left of the target object, the first preset symbol is located to the left of the preset fill data, and the second preset symbol is located to the right of the target object; and concatenating the first subsequence and the second subsequence to construct an input sequence, wherein the length of the input sequence is the preset length.

[0065] In one optional embodiment, the preset depth can be determined according to the number of classification levels of the target object to be obtained. If 5 classification levels are required, the preset depth can be set to 5. However, if the target object actually only has 4 classification levels, the 4 classification levels of the first subsequence can be supplemented to 5 classification levels by using none.

[0066] The first preset symbol mentioned above can be a start symbol, such as [s]. The preset padding data mentioned above can be a padding value, such as [pad]. The target object mentioned above can be the name of the target object. The second preset symbol mentioned above can be a separator, such as ":". The preset length mentioned above can be a pre-set length, which can be determined based on the commonly used name length of the target object and the classification level.

[0067] In one optional embodiment, the first subsequence and the second subsequence can be spliced ​​together according to a preset length. During the splicing process, the preset padding data can be increased or decreased so that the final input sequence length can reach the preset length.

[0068] In the above embodiments of this application, extracting target identifier information contained in the output sequence includes: obtaining a string located after the second preset symbol in the output sequence; removing preset values ​​contained in the string to obtain a target string; and extracting target identifier information contained in the target string.

[0069] In one optional embodiment, the string following the second preset symbol in the output sequence can be obtained. This string contains the target identification information corresponding to the target classification result. After obtaining the string, the "none" part can be removed from the string, and the remaining string is the target string. The target identification information contained in the target string can be extracted and mapped back to the hierarchical classification name to finally obtain the target classification result corresponding to the target object.

[0070] In the above embodiments of this application, obtaining the target dataset includes: obtaining a first dataset and a second dataset, wherein the first dataset contains industry categories, and the second dataset contains multiple preset targets and multiple statistical categories in a preset statistical classification; extending the second dataset to the first dataset to generate an augmented classification; and constructing the target dataset based on the augmented classification.

[0071] The first dataset mentioned above can be the "National Economic Industry Classification". The "National Economic Industry Classification" is a classification of national economic industries by the National Bureau of Statistics based on the principle of homogeneity of economic activities. It consists of 4 levels, 20 major categories, and 57,543 subcategories.

[0072] The second dataset mentioned above can be the "Statistical Product Classification Catalog," which is a unified classification and coding system for physical products and services in socio-economic activities. It has 5 levels and 36,148 subcategories, which clearly correspond to the subcategories in the "National Economic Industry Classification." The subcategories of the "Statistical Product Classification Catalog" are specific physical goods and services, such as fiberglass desks and forestry planting and management services, commonly found in teaching aid procurement tenders and greening service tenders. For simplicity, the "National Economic Industry Classification" will be referred to as the industry classification, and the "Statistical Product Classification Catalog" as the statistical classification.

[0073] In an alternative embodiment, the second dataset can be extended into the first dataset to generate augmented classifications. The target dataset can be constructed based on the augmented classifications. The various levels of statistical classifications can be extended into industry categories according to the correspondence of the expansion steps.

[0074] In the above embodiments of this application, expanding the second dataset to the first dataset to generate an augmented classification includes: obtaining multiple levels of industry categories in the first dataset and constructing a first list, wherein the first list contains multiple first data items; constructing a second list based on multiple levels of statistical categories in the second dataset, wherein the second list contains multiple second data items; determining the fitness of each first data item based on the connection relationship between each first data item and each second data item; determining the target index of the first data item corresponding to the maximum fitness in the first list; and binding other statistical categories in the second dataset to the target industry category corresponding to the target index in the first list when the target index is not a preset index.

[0075] The preset sequence number mentioned above can be 0.

[0076] In one optional embodiment, when expanding the second dataset to the first dataset to generate augmented classifications, the industry classification can first be categorized, removing 20 subclasses with only a single level 1 major category. Then, levels 2-4 of the industry classification can be used to form a Q list, which is the first list mentioned above. Levels 1-3 of the statistical classification can be used to form a P list. For any p category belonging to the P list, which is the second list mentioned above, a better association classification is matched from Q according to the category matching method described above, that is, the fitness of each first data item is determined. The target index of the first data item corresponding to the maximum fitness can be determined in the first list. If the target index is not 0, then the current p category level 4-5 is bound to levels 1-4 of Q; otherwise, it is not bound. This binding logic may result in multiple bindings between industry classifications and statistical classifications. After binding p categories to Q, the resulting expanded industry classifications are the augmented classifications.

[0077] In the above embodiments of this application, the second dataset is extended to the first dataset to generate an augmented classification, including: determining that the end category in the augmented classification is the original target; determining that the target preceding category of multiple levels corresponding to the end category in the augmented classification is the original category, wherein the target preceding category is the preceding category belonging to the industry category.

[0078] In one alternative embodiment, the end category name of the augmented classification can be used as the "target object", and the industry classification part of the preceding category of the end category can be used as the classification of the "target object", thus constructing "target object-multi-level classification" data.

[0079] The aforementioned target preceding categories are those that have a high degree of matching with the industry category.

[0080] In an optional embodiment, the statistical classification at each level can be expanded to the final category of the industry according to the following expansion steps. The category matching method can be defined as follows: input statistical classification sequence p, industry classification sequence list Q = [q1, ..., qm], and output as the industry classification number idx with a high degree of matching with the statistical classification. Optionally, the industry classification number idx can be determined by the following steps:

[0081] 1) For the statistical classification sequence p = [pn1, pn2, pn3], if the three category names exist, delete the words "product" / "service" at the end of the category name string to get p' = [pn1', pn2', pn3'];

[0082] 2) For the k-th term qk in Q, qk = [qkn1, qkn2, qkn3], the fitness value can be calculated using the following formula:

[0083]

[0084] IsSubStr(pni',qkni) is 1 when pni' is a continuous substring of qkni, and 0 otherwise.

[0085] 3) Repeat step (2) from k=1 to k=m, taking the largest non-zero value in fitness_k and returning its index idx. If the largest value is 0, return 0. The index idx can be calculated using the following formula:

[0086]

[0087] The above are merely preferred embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.

[0088] It should be noted that, for the sake of simplicity, the foregoing method embodiments are all described as a series of actions. However, those skilled in the art should understand that this application is not limited to the described order of actions, as some steps may be performed in other orders or simultaneously according to this application. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions and modules involved are not necessarily essential to this application.

[0089] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods according to the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods of the various embodiments of this application.

[0090] Example 2

[0091] According to embodiments of this application, a target classification apparatus for implementing the above-described target classification method is also provided, such as... Figure 3 As shown, the device 300 includes: an acquisition module 302 and a classification module 304.

[0092] The acquisition module 302 is used to acquire the target object; the classification module 304 is used to perform hierarchical classification of the target object using a classification model to obtain the target classification result of the target object. The target classification result includes: multiple levels of target categories, and the categories belong to multiple levels of industry categories included in the preset industry classification.

[0093] It should be noted that the acquisition module 402 and classification module 404 mentioned above correspond to steps S202 to S204 in Embodiment 1. The two modules and their corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above modules, as part of the device, can run in the computer terminal 10 provided in Embodiment 1.

[0094] In the above embodiments of this application, the classification module includes: a first construction unit, a classification unit, and a generation unit.

[0095] The system comprises the following components: a construction unit for constructing first input data based on the target object and a preset category; a classification unit for classifying the first input data using a classification model to obtain the category at the current level; a classification unit for repeatedly constructing second input data based on the target object and the category at the current level, and classifying the second input data using a classification model to obtain the category at the next level, until the number of classifications reaches a preset number; and a generation unit for generating the target classification result based on the category at the current level and at least one category at the next level.

[0096] In the above embodiments of this application, the device further includes: a construction module and a training module.

[0097] The acquisition module is also used to acquire the target dataset, which contains the original target and the original categories of multiple levels corresponding to the original target; the construction module is used to construct multiple first training samples based on the target dataset, wherein each first training sample includes: an input sample and a first category, the input sample contains the original target and the original category of the current level, or the original target and a preset category, and the first category is the original category of the first level, or the original category of the next level after the current level; the training module is also used to train the classification model using multiple first training samples.

[0098] In the above embodiments of this application, the classification model includes: an autoencoder language module, an overfitting prevention layer, and at least one fully connected layer connected in sequence; the training module is also used to train the classification model using the cross-entropy loss function.

[0099] In the above embodiments of this application, the classification model includes a language model, and the classification module further includes an extraction unit and a first acquisition unit.

[0100] The construction unit is used to construct an input sequence based on a preset length, preset depth, target object, and preset value; the classification unit is used to perform hierarchical classification on the input sequence using a language model to obtain an output sequence, wherein the output sequence contains target object and target identification information, wherein the target identification information is used to identify target categories at multiple levels; the extraction unit is used to extract the target identification information contained in the output sequence; and the first acquisition unit is used to acquire the category corresponding to the target identification information to obtain the target classification result.

[0101] In the above embodiments of this application, the building unit includes: a first building subunit and a splicing subunit.

[0102] The first construction subunit is used to construct a first subsequence based on preset values, and the classification depth corresponding to the first subsequence is a preset depth. The first construction subunit is also used to construct a second subsequence based on a first preset symbol, preset fill data, a target object, and a second preset symbol, wherein the preset fill data is located to the left of the target object, the first preset symbol is located to the left of the preset fill data, and the second preset symbol is located to the right of the target object. The splicing subunit is also used to splice the first subsequence and the second subsequence to construct an input sequence, wherein the length of the input sequence is a preset length.

[0103] In the above embodiments of this application, the device further includes: a determining module and a constructing module.

[0104] The acquisition module is also used to acquire the target dataset, which contains the original target objects and the original categories at multiple levels corresponding to the original target objects; the determination module is used to determine the original identification information corresponding to the original categories; the construction module is also used to construct a second training sample based on the target dataset, wherein the second training sample is generated based on a preset length, a preset depth, the original target objects and the original identification information; the training module is also used to train the language model using the second training sample.

[0105] In the above embodiments of this application, the extraction unit includes: an acquisition subunit, a rejection subunit, and an extraction subunit.

[0106] The sub-unit is used to obtain the string located after the second preset symbol in the output sequence; the sub-unit is used to remove the preset value contained in the string to obtain the target string; and the sub-unit is used to extract the target identifier information contained in the target string.

[0107] In the above embodiments of this application, the acquisition module further includes: a second acquisition unit, an extension unit, and a second construction unit.

[0108] The second acquisition unit is used to acquire the first dataset and the second dataset. The first dataset contains industry categories, and the second dataset contains multiple preset targets and multiple statistical categories in the preset statistical classification. The expansion unit is used to expand the second dataset to the first dataset to generate augmented classifications. The second construction unit is used to construct the target dataset based on the augmented classifications.

[0109] In the above embodiments of this application, the extension unit includes: a second construction subunit, a first determination subunit, and a binding subunit.

[0110] The second construction subunit is used to obtain industry categories at multiple levels in the first dataset and construct a first list, wherein the first list contains multiple first data items; the second construction subunit is also used to construct a second list based on statistical categories at multiple levels in the second dataset, wherein the second list contains multiple second data items; the first determination subunit is used to determine the fitness of each first data item based on the connection relationship between each first data item and each second data item; the determination subunit is also used to determine the target index of the first data item corresponding to the maximum fitness in the first list; the binding subunit is used to bind other statistical categories in the second dataset to the target industry category corresponding to the target index in the first list when the target index is not a preset index.

[0111] In the above embodiments of this application, the extension unit further includes: a second determining subunit.

[0112] The second determining subunit is used to determine that the end category in the augmented classification is the original target; the second determining subunit is also used to determine that the target preceding category of multiple levels corresponding to the end category in the augmented classification is the original category, wherein the target preceding category is the preceding category belonging to the industry category.

[0113] It should be noted that the preferred implementation schemes involved in the above embodiments of this application are the same as the schemes, application scenarios and implementation processes provided in Embodiment 1, but are not limited to the schemes provided in Embodiment 1.

[0114] Example 3

[0115] Embodiments of this application may provide a computer terminal, which may be any computer terminal device in a group of computer terminals. Optionally, in this embodiment, the aforementioned computer terminal may also be replaced by a mobile terminal or other terminal device.

[0116] Optionally, in this embodiment, the computer terminal may be located in at least one of a plurality of network devices in a computer network.

[0117] In this embodiment, the computer terminal described above can execute the program code for the following steps in the target classification method: obtaining the target target; performing hierarchical classification of the target target using a classification model to obtain the target classification result of the target target, wherein the target classification result includes: multiple levels of target categories, and the categories belong to multiple levels of industry categories included in the preset industry classification.

[0118] Optionally, Figure 4 This is a structural block diagram of a computer terminal according to an embodiment of this application. Figure 4 As shown, the computer terminal A may include: one or more (only one is shown in the figure) processors and memory.

[0119] The memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the object classification method and apparatus in this application embodiment. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, thereby realizing the aforementioned object classification method. The memory may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include memory remotely located relative to the processor, and these remote memories can be connected to terminal A via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0120] The processor can access the information and application programs stored in the memory via the transmission device to perform the following steps: acquire the target object; perform hierarchical classification of the target object using a classification model to obtain the target classification result of the target object, wherein the target classification result includes: multiple levels of target categories, and the categories belong to multiple levels of industry categories included in the preset industry classification.

[0121] Optionally, the processor may also execute program code with the following steps: In the above embodiments of this application, the target object is hierarchically classified using a classification model to obtain the target object's target classification result, including: constructing first input data based on the target object and a preset category; classifying the first input data using a classification model to obtain the category of the current level; repeatedly executing the steps of constructing second input data based on the target object and the category of the current level, and classifying the second input data using a classification model to obtain the category of the next level, until the number of classifications reaches a preset number; generating a target classification result based on the category of the current level and at least one category of the next level.

[0122] Optionally, the processor may also execute program code for the following steps: obtaining a target dataset, wherein the target dataset contains original targets and original categories at multiple levels corresponding to the original targets; constructing multiple first training samples based on the target dataset, wherein each first training sample includes: an input sample and a first category, the input sample containing the original targets and the original category at the current level, or the original targets and a preset category, the first category being the original category at the first level, or the original category at the next level below the current level; and training the classification model using the multiple first training samples.

[0123] Optionally, the processor may also execute program code that includes the following steps: the classification model comprises: an autoencoder language module, an overfitting prevention layer, and at least one fully connected layer connected in sequence; and the classification model is trained using a cross-entropy loss function.

[0124] Optionally, the processor may also execute program code with the following steps: constructing an input sequence based on a preset length, preset depth, target object, and preset value; performing hierarchical classification on the input sequence using a language model to obtain an output sequence, wherein the output sequence contains target object and target identification information, wherein the target identification information is used to identify target categories at multiple levels; extracting the target identification information contained in the output sequence; obtaining the category corresponding to the target identification information to obtain the target classification result.

[0125] Optionally, the processor may also execute program code for the following steps: constructing a first subsequence based on preset values, wherein the classification depth corresponding to the first subsequence is a preset depth; constructing a second subsequence based on a first preset symbol, preset fill data, a target object, and a second preset symbol, wherein the preset fill data is located to the left of the target object, the first preset symbol is located to the left of the preset fill data, and the second preset symbol is located to the right of the target object; concatenating the first subsequence and the second subsequence to construct an input sequence, wherein the length of the input sequence is a preset length.

[0126] Optionally, the processor may also execute program code for the following steps: obtaining a target dataset, wherein the target dataset contains original objects and original categories at multiple levels corresponding to the original objects; determining the original identification information corresponding to the original categories; constructing a second training sample based on the target dataset, wherein the second training sample is generated based on a preset length, a preset depth, the original objects, and the original identification information; and training the language model using the second training sample.

[0127] Optionally, the processor may also execute program code that performs the following steps: obtains the string following the second preset symbol in the output sequence; removes the preset value contained in the string to obtain the target string; and extracts the target identifier information contained in the target string.

[0128] Optionally, the processor may also execute program code for the following steps: obtaining a first dataset and a second dataset, wherein the first dataset contains industry categories and the second dataset contains multiple preset targets and multiple statistical categories in a preset statistical classification; extending the second dataset to the first dataset to generate an augmented classification; and constructing a target dataset based on the augmented classification.

[0129] Optionally, the processor may also execute program code that performs the following steps: obtaining industry categories at multiple levels in the first dataset and constructing a first list, wherein the first list contains multiple first data items; constructing a second list based on statistical categories at multiple levels in the second dataset, wherein the second list contains multiple second data items; determining the fitness of each first data item based on the connection relationship between each first data item and each second data item; determining the target sequence number of the first data item corresponding to the maximum fitness in the first list; and binding other statistical categories in the second dataset to the target industry category corresponding to the target sequence number in the first list if the target sequence number is not a preset sequence number.

[0130] Optionally, the processor may also execute program code that performs the following steps: determining the end category in the augmented classification as the original target; determining the target preceding category of multiple levels corresponding to the end category in the augmented classification as the original category, wherein the target preceding category is a preceding category belonging to the industry category.

[0131] This application provides a method for classifying objects. First, the target object is obtained. Then, a classification model is used to perform hierarchical classification of the target object, resulting in a target classification result. This result includes multiple levels of target categories, each belonging to multiple levels of industry categories within a preset industry classification, thus improving classification efficiency. It is noteworthy that using a classification model allows for hierarchical classification of the target object, resulting in multiple levels of target categories. This enables multi-level classification of the object, achieving better classification results. Furthermore, since the classification is performed using a classification model, the classification efficiency is significantly improved, thereby solving the technical problem of low efficiency in object classification in related technologies.

[0132] Those skilled in the art will understand that Figure 4 The structure shown is for illustrative purposes only. The computer terminal can also be a smartphone (such as an Android phone, an iOS phone, etc.), a tablet computer, a PDA, a mobile Internet device (MID), a PAD, and other terminal devices. Figure 4 This does not limit the structure of the aforementioned electronic device. For example, computer terminal A may also include components that are more... Figure 4 The more or fewer components shown (such as network interfaces, display devices, etc.), or having the same Figure 4 The different configurations shown.

[0133] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be implemented by a program instructing the hardware related to the terminal device. The program can be stored in a computer-readable storage medium, which may include: flash drive, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0134] Example 4

[0135] Embodiments of this application also provide a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the object classification method provided in the above embodiments.

[0136] Optionally, in this embodiment, the storage medium may be located in any computer terminal in a group of computer terminals in a computer network, or in any mobile terminal in a group of mobile terminals.

[0137] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: obtaining a target dataset, wherein the target dataset contains original targets and original categories of multiple levels corresponding to the original targets; constructing multiple first training samples based on the target dataset, wherein each first training sample includes: an input sample and a first category, the input sample containing the original targets and the original category of the current level, or the original targets and a preset category, the first category being the original category of the first level, or the original category of the next level below the current level; and training the classification model using the multiple first training samples.

[0138] Optionally, the aforementioned storage medium is also configured to store program code for performing the following steps: the classification model includes: an autoencoder language module, an overfitting prevention layer, and at least one fully connected layer connected in sequence; the classification model is trained using a cross-entropy loss function.

[0139] Optionally, the aforementioned storage medium is further configured to store program code for performing the following steps: constructing an input sequence based on a preset length, preset depth, target object, and preset value; performing hierarchical classification on the input sequence using a language model to obtain an output sequence, wherein the output sequence contains target object and target identification information, wherein the target identification information is used to identify target categories at multiple levels; extracting the target identification information contained in the output sequence; obtaining the category corresponding to the target identification information to obtain the target classification result.

[0140] Optionally, the storage medium is further configured to store program code for performing the following steps: constructing a first subsequence based on preset values, wherein the classification depth corresponding to the first subsequence is a preset depth; constructing a second subsequence based on a first preset symbol, preset fill data, a target object, and a second preset symbol, wherein the preset fill data is located to the left of the target object, the first preset symbol is located to the left of the preset fill data, and the second preset symbol is located to the right of the target object; concatenating the first subsequence and the second subsequence to construct an input sequence, wherein the length of the input sequence is a preset length.

[0141] Optionally, the storage medium is further configured to store program code for performing the following steps: obtaining a target dataset, wherein the target dataset contains original targets and original categories at multiple levels corresponding to the original targets; determining the original identification information corresponding to the original categories; constructing a second training sample based on the target dataset, wherein the second training sample is generated based on a preset length, a preset depth, the original targets, and the original identification information; and training the GPT-2 model using the second training sample.

[0142] Optionally, the storage medium is also configured to store program code for performing the following steps: obtaining the string following the second preset symbol in the output sequence; removing the preset value contained in the string to obtain the target string; and extracting the target identifier information contained in the target string.

[0143] Optionally, the aforementioned storage medium is also configured to store program code for performing the following steps: obtaining a first dataset and a second dataset, wherein the first dataset contains industry categories and the second dataset contains multiple preset targets and multiple statistical categories in a preset statistical classification; extending the second dataset to the first dataset to generate an augmented classification; and constructing a target dataset based on the augmented classification.

[0144] Optionally, the aforementioned storage medium is also configured to store program code for performing the following steps: obtaining multiple levels of industry categories in the first dataset and constructing a first list, wherein the first list contains multiple first data items; constructing a second list based on multiple levels of statistical categories in the second dataset, wherein the second list contains multiple second data items; determining the fitness of each first data item based on the connection relationship between each first data item and each second data item; determining the target sequence number of the first data item corresponding to the maximum fitness in the first list; and binding other statistical categories in the second dataset to the target industry category corresponding to the target sequence number in the first list if the target sequence number is not a preset sequence number.

[0145] Optionally, the storage medium is also configured to store program code for performing the following steps: determining the end category in the augmented classification as the original target; determining the target preceding category of multiple levels corresponding to the end category in the augmented classification as the original category, wherein the target preceding category is a preceding category belonging to the industry category.

[0146] This application provides a method for classifying objects. First, the target object is obtained. Then, a classification model is used to perform hierarchical classification of the target object, resulting in a target classification result. This result includes multiple levels of target categories, each belonging to multiple levels of industry categories within a preset industry classification, thus improving classification efficiency. It is noteworthy that using a classification model allows for hierarchical classification of the target object, resulting in multiple levels of target categories. This enables multi-level classification of the object, achieving better classification results. Furthermore, since the classification is performed using a classification model, the classification efficiency is significantly improved, thereby solving the technical problem of low efficiency in object classification in related technologies.

[0147] Example 5

[0148] According to an embodiment of this application, an embodiment of a target classification method is also provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0149] Figure 5 This is a flowchart of a subject classification method according to an embodiment of this application, such as... Figure 5 As shown, the method may include the following steps:

[0150] Step S502: Obtain the target dataset.

[0151] The target dataset contains the original target objects and the original categories corresponding to the original target objects at multiple levels. The original categories belong to the industry categories at multiple levels included in the preset industry classification.

[0152] Step S504: Train the classification model using the target dataset.

[0153] The classification model is used to perform hierarchical classification of the target objects and obtain the target classification results.

[0154] In the above embodiments of this application, training the classification model using the target dataset includes: constructing multiple first training samples based on the target dataset, wherein each first training sample includes: an input sample and a first category, the input sample includes the original target and the original category of the current level, or the original target and a preset category, the first category is the original category of the first level, or the original category of the next level below the current level; and training the classification model using multiple first training samples.

[0155] In the above embodiments of this application, the classification model includes: an autoencoder language module, an overfitting prevention layer, and at least one fully connected layer connected in sequence; the classification model is trained using the cross-entropy loss function.

[0156] In the above embodiments of this application, the classification model includes a language model. The method further includes: determining the original identifier information corresponding to the original category; constructing a second training sample based on the target dataset, wherein the second training sample is generated based on a preset length, a preset depth, the original target, and the original identifier information; and training the language model using the second training sample, wherein the language model is used to perform hierarchical classification of the input sequence to obtain an output sequence, the input sequence being constructed based on a preset length, a preset depth, the target target, and a preset value, and the target classification result being obtained based on the category corresponding to the target identifier information contained in the output sequence.

[0157] In the above embodiments of this application, obtaining the target dataset includes: obtaining a first dataset and a second dataset, wherein the first dataset contains industry categories, and the second dataset contains multiple preset targets and multiple statistical categories in a preset statistical classification; extending the second dataset to the first dataset to generate an augmented classification; and constructing the target dataset based on the augmented classification.

[0158] In the above embodiments of this application, expanding the second dataset to the first dataset to generate an augmented classification includes: obtaining multiple levels of industry categories in the first dataset and constructing a first list, wherein the first list contains multiple first data items; constructing a second list based on multiple levels of statistical categories in the second dataset, wherein the second list contains multiple second data items; determining the fitness of each first data item based on the connection relationship between each first data item and each second data item; determining the target index of the first data item corresponding to the maximum fitness in the first list; and binding other statistical categories in the second dataset to the target industry category corresponding to the target index in the first list when the target index is not a preset index.

[0159] In the above embodiments of this application, the second dataset is extended to the first dataset to generate an augmented classification, including: determining that the end category in the augmented classification is the original target; determining that the target preceding category of multiple levels corresponding to the end category in the augmented classification is the original category, wherein the target preceding category is the preceding category belonging to the industry category.

[0160] It should be noted that the preferred implementation schemes involved in the above embodiments of this application are the same as the schemes, application scenarios and implementation processes provided in Embodiment 1, but are not limited to the schemes provided in Embodiment 1.

[0161] Example 6

[0162] According to an embodiment of this application, a target classification device for the above-described target classification method is also provided, such as... Figure 6 As shown, the device 600 includes: an acquisition module 602 and a training module 604.

[0163] The acquisition module is used to acquire the target dataset, which contains the original target objects and the original categories corresponding to the original target objects at multiple levels. The original categories belong to the multiple levels of industry categories included in the preset industry classification. The classification model is trained using the target dataset, which is used to perform hierarchical classification of the target objects to obtain the target classification results of the target objects.

[0164] It should be noted that the acquisition module 602 and training module 604 mentioned above correspond to steps S502 to S504 in Embodiment 5. The two modules and their corresponding steps implement the same instances and application scenarios, but are not limited to the content disclosed in Embodiment 1. It should be noted that the above modules, as part of the device, can run in the computer terminal 10 provided in Embodiment 1.

[0165] In the above embodiments of this application, the training module includes: a construction unit and a training unit.

[0166] The construction unit is used to construct multiple first training samples based on the target dataset. Each first training sample includes an input sample and a first category. The input sample contains the original target and the original category of the current level, or the original target and a preset category. The first category is the original category of the first level, or the original category of the next level after the current level. The training unit is used to train the classification model using multiple first training samples.

[0167] In the above embodiments of this application, the classification model includes: an autoencoder language module, an overfitting prevention layer, and at least one fully connected layer connected in sequence; the classification model is trained using the cross-entropy loss function.

[0168] In the above embodiments of this application, the device further includes: a determining module and a constructing module.

[0169] The module is used to determine the original identification information corresponding to the original category; the module is used to construct a second training sample based on the target dataset, wherein the second training sample is generated based on a preset length, a preset depth, the original target, and the original identification information; the module is also used to train the language model using the second training sample, wherein the language model is used to perform hierarchical classification on the input sequence to obtain the output sequence, wherein the input sequence is constructed based on a preset length, a preset depth, the target, and a preset value, and the target classification result is obtained based on the category corresponding to the target identification information contained in the output sequence.

[0170] In the above embodiments of this application, the acquisition module includes: an acquisition unit, an extension unit, and a construction unit.

[0171] The acquisition unit is used to acquire the first dataset and the second dataset. The first dataset contains industry categories, and the second dataset contains multiple preset targets and multiple statistical categories in the preset statistical classification. The expansion unit is used to expand the second dataset to the first dataset to generate augmented classifications. The construction unit is used to construct the target dataset based on the augmented classifications.

[0172] In the above embodiments of this application, the extension unit includes: a construction subunit, a first determination subunit, and a binding subunit.

[0173] The sub-unit is used to obtain industry categories at multiple levels in the first dataset and construct a first list, wherein the first list contains multiple first data items; the sub-unit is also used to construct a second list based on statistical categories at multiple levels in the second dataset, wherein the second list contains multiple second data items; the sub-unit is used to determine the fitness of each first data item based on the connection relationship between each first data item and each second data item; the sub-unit is also used to determine the target index of the first data item corresponding to the maximum fitness in the first list; the sub-unit is also used to bind other statistical categories in the second dataset to the target industry category corresponding to the target index in the first list when the target index is not a preset index.

[0174] In the above embodiments of this application, the extension unit further includes: a second determining subunit.

[0175] The second determining subunit is also used to determine that the end category in the augmented classification is the original target; the second determining subunit is also used to determine that the target preceding category of multiple levels corresponding to the end category in the augmented classification is the original category, wherein the target preceding category is the preceding category belonging to the industry category.

[0176] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0177] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0178] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.

[0179] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

[0180] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0181] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.

[0182] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.

Claims

1. A method for classifying objects, characterized in that, include: Obtain the target dataset, wherein the target dataset contains the original target objects and the original categories corresponding to the original target objects at multiple levels, and the original categories belong to the industry categories at multiple levels contained in the preset industry classification. The classification model is trained using the target dataset, wherein the classification model is used to perform hierarchical classification of the target objects to obtain the target classification results of the target objects; Obtaining the target dataset includes: Based on the industry categories at multiple levels in the first dataset, multiple first data items are obtained, and based on the statistical categories at multiple levels in the second dataset, multiple second data items are obtained. Based on the connection relationship between each first data item and each second data item, determine the fitness of each first data item; Determine the target index of the first data item corresponding to the maximum fitness in the first list; If the target serial number is not a preset serial number, other statistical categories in the second dataset are bound to the target industry category of the target serial number in the first list to construct the target dataset, wherein the first list contains the plurality of first data items.

2. The method according to claim 1, characterized in that, Training the classification model using the target dataset includes: Multiple first training samples are constructed based on the target dataset. Each first training sample includes an input sample and a first category. The input sample contains the original target and the original category of the current level, or the original target and a preset category. The first category is the original category of the first level, or the original category of the next level after the current level. The classification model is trained using the multiple first training samples.

3. The method according to claim 2, characterized in that, The classification model comprises: an autoencoder language module, an overfitting prevention layer, and at least one fully connected layer connected in sequence; the classification model is trained using a cross-entropy loss function.

4. The method according to claim 1, characterized in that, The classification model includes a language model, and the method further includes: Determine the original identifier information corresponding to the original category; A second training sample is constructed based on the target dataset, wherein the second training sample is generated based on a preset length, a preset depth, the original target, and the original identification information; The language model is trained using the second training sample, wherein the language model is used to perform hierarchical classification on the input sequence to obtain an output sequence, the input sequence is constructed based on the preset length, the preset depth, the target object and the preset value, and the target classification result is obtained based on the category corresponding to the target identification information contained in the output sequence.

5. The method according to claim 1, characterized in that, Obtaining the target dataset includes: Obtain a first dataset and a second dataset, wherein the first dataset contains the industry category, and the second dataset contains multiple preset targets and multiple statistical categories in a preset statistical classification; The second dataset is extended to the first dataset to generate augmented classifications; The target dataset is constructed based on the augmented classification.

6. The method according to claim 5, characterized in that, The second dataset is extended to the first dataset to generate augmented classifications, including: Obtain industry categories at multiple levels from the first dataset and construct a first list, wherein the first list contains multiple first data items; Based on the statistical categories of multiple levels in the second dataset, a second list is constructed, wherein the second list contains multiple second data items; Based on the connection relationship between each first data item and each second data item, the suitability of each first data item is determined; Determine the target index of the first data item corresponding to the maximum fitness in the first list; If the target sequence number is not a preset sequence number, other statistical categories in the second dataset are bound to the target industry category corresponding to the target sequence number in the first list.

7. The method according to claim 5, characterized in that, The second dataset is extended to the first dataset to generate augmented classifications, including: The end category in the augmented classification is determined to be the original target object; The target preceding category of multiple levels corresponding to the end category in the augmented classification is determined as the original category, wherein the target preceding category is the preceding category belonging to the industry category.

8. A method for classifying objects, characterized in that, include: To acquire the target object; The target object is hierarchically classified using a classification model to obtain the target object's target classification result, wherein the target classification result includes: multiple levels of target categories, and the categories belong to multiple levels of industry categories included in a preset industry classification. The classification model is trained on the target dataset. When the target index is not a preset index, the target dataset is constructed by binding other statistical categories in the second dataset to the target industry category of the target index in the first list. The target index is the index of the first data item corresponding to the determined maximum fitness in the first list. The fitness of each first data item is obtained based on the connection relationship between each first data item and each second data item. Multiple first data items are obtained based on multiple levels of industry categories in the first dataset. The second data items are obtained based on multiple levels of statistical categories in the second dataset. The first list contains multiple first data items.

9. The method according to claim 8, characterized in that, The target object is hierarchically classified using a classification model to obtain the target object's classification result, including: The first input data is constructed based on the target object and the preset category; The first input data is classified using the classification model to obtain the category of the current level; Repeat the steps of constructing second input data based on the target object and the current level category, and classifying the second input data using the classification model to obtain the next level category, until the number of classifications reaches the preset number; The target classification result is generated based on the category of the current level and at least one category of the next level.

10. The method according to claim 8, characterized in that, The classification model includes a language model, wherein the target object is hierarchically classified using the classification model to obtain the target object's classification result, including: An input sequence is constructed based on a preset length, a preset depth, the target object, and a preset value; The input sequence is hierarchically classified using the language model to obtain an output sequence, wherein the output sequence contains the target object and target identification information, wherein the target identification information is used to identify the target categories at multiple levels; Extract the target identification information contained in the output sequence; Obtain the category corresponding to the target identification information to obtain the target classification result.

11. The method according to claim 10, characterized in that, An input sequence is constructed based on a preset length, a preset depth, the target object, and a preset value, including: A first subsequence is constructed based on the preset value, and the classification depth corresponding to the first subsequence is the preset depth. A second sub-sequence is constructed based on a first preset symbol, preset fill data, the target object, and a second preset symbol, wherein the preset fill data is located to the left of the target object, the first preset symbol is located to the left of the preset fill data, and the second preset symbol is located to the right of the target object; The first subsequence and the second subsequence are concatenated to construct the input sequence, wherein the length of the input sequence is the preset length.

12. The method according to claim 10, characterized in that, Extracting the target identification information contained in the output sequence includes: Obtain the string following the second preset symbol in the output sequence; Remove the preset values ​​contained in the string to obtain the target string; Extract the target identifier information contained in the target string.

13. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored program, wherein, when the program is executed, it controls the device on which the computer-readable storage medium is located to perform the object classification method according to any one of claims 1 to 12.

14. A computer terminal, characterized in that, include: A memory and a processor, the processor being configured to run a program stored in the memory, wherein the program, when executed, performs the object classification method according to any one of claims 1 to 12.

Citation Information

Patent Citations

  • Industrial classification model training method and device, industry classification model using method and device, equipment and medium

    CN112417150A

  • Document classification method and device, computer equipment and storage medium

    CN113515629A

  • Industry category identification method and device, medium and computer program product

    CN113591979A