Methods, apparatus, electronic devices and storage media for determining article types

Through the method of combining word segmentation and part-of-word library, the item type is automatically determined, which solves the problem of low-quality item classification efficiency in the prior art, and achieves more efficient and accurate item classification.

CN113627180BActive Publication Date: 2024-12-10BEIJING WODONG TIANJUN INFORMATION TECH CO LTD +1
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202010387043.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-09
Publication Date
2024-12-10
Estimated Expiration
2040-05-09

AI Technical Summary

Technical Problem

In the prior art, the classification of items requires manual intervention, resulting in high time and labor costs and low efficiency.

Method used

通过获取物品信息,使用分词模型进行分词,并根据预存储的词性库和分类模型确定物品类型,利用物品信息的词性序列进行自动分类。

Benefits of technology

It improves the accuracy and efficiency of item classification, avoids the time and cost consumption of manual classification, and enhances the ability to express and generalize types.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113627180B_ABST
    Figure CN113627180B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, device, electronic device and storage medium for determining the type of an item, and relates to the field of computer technology. A specific implementation of the method includes: obtaining item information of a target item, the item information including the name and function information of the target item; segmenting the item information according to a segmentation model to obtain the segmentations included in the item information; determining the part of speech of each segmentation included in the item information according to pre-stored part of speech library information, and obtaining a part of speech sequence corresponding to the item information; determining the type of the target item according to the part of speech sequence and the classification model. This implementation can avoid the problem that manual classification consumes a lot of time and labor costs, and is inefficient.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device, electronic device and storage medium for determining the type of an item. Background Art

[0002] In some online shopping platforms, each item often uses information related to the item's function as its name. For example, TV stands, TV mounts, and other accessory items that need to be adapted to specific models or main items will include the name of the corresponding main item in their names. When users shop online for items they need, they usually enter keywords to search. The platform filters the item names based on the keywords entered to obtain the filtering results, and users can select the items they need from the filtering results. However, if the user needs to select the main item, and filters by the main item name, the filtering results will include the item information of the accessory items related to the main item. At this time, the user needs to spend more effort to select the required item from the item information including the accessory items.

[0003] To avoid the above problems, staff usually classify items into main and accessories, so that when the user enters the keyword as main item information, the corresponding main item is displayed, and when the user enters the keyword as accessory information, the corresponding accessory item is displayed, thereby reducing the user's energy in selecting the required items.

[0004] In the process of implementing the present invention, the inventors found that there are at least the following problems in the prior art:

[0005] In order to ensure the accuracy of item classification, manual classification is usually used to classify the main parts of the items. However, manual classification consumes a lot of time and labor costs, and is inefficient. Summary of the invention

[0006] In view of this, embodiments of the present invention provide a method, device, system and storage medium for determining the type of an item, which can avoid the problem of manual classification consuming a lot of time and labor costs and low efficiency.

[0007] To achieve the above objective, according to one aspect of an embodiment of the present invention, a method for determining the type of an item is provided.

[0008] A method for determining an item type according to an embodiment of the present invention includes: acquiring item information of a target item, the item information including the name and function information of the target item; segmenting the item information according to a segmentation model to obtain the segmentations included in the item information; determining the part of speech of each segmentation included in the item information according to pre-stored part-of-speech library information to obtain a part-of-speech sequence corresponding to the item information; and determining the type of the target item according to the part-of-speech sequence and a classification model.

[0009] In one embodiment, the part-of-speech library information includes part-of-speech library information of an item part-of-speech library and part-of-speech library information of a grammar part-of-speech library, and the item part-of-speech library is established according to the item information;

[0010] The determining the part of speech of each word included in the item information according to the pre-stored part of speech library includes:

[0011] For each participle included in the item information, determine whether the participle belongs to the item part-of-speech library. If so, determine the part-of-speech of the participle according to the part-of-speech library information of the item part-of-speech library. If not, determine the part-of-speech of the participle according to the part-of-speech library information of the grammatical part-of-speech library.

[0012] In yet another embodiment, the part-of-speech library information of the article part-of-speech library includes the part-of-speech identifiers corresponding to the article part-of-speech library, and the part-of-speech library information of the grammatical part-of-speech library includes the part-of-speech identifiers corresponding to the grammatical part-of-speech library;

[0013] The determining the part of speech of the word segment according to the part of speech library information of the article part of speech library includes:

[0014] Determine the part-of-speech identifier corresponding to the item part-of-speech library as the part-of-speech of the segmented word;

[0015] The determining the part of speech of the word segment according to the part of speech library information of the grammatical part of speech library comprises:

[0016] The part-of-speech identifier corresponding to the grammatical part-of-speech library is determined as the part-of-speech of the segmented word.

[0017] In yet another embodiment, determining the type of the target item according to the part-of-speech sequence and the classification model includes:

[0018] Inputting the part-of-speech sequence into the classification model, and calculating the probability value of the target object belonging to each category;

[0019] The type with the largest probability value is determined as the type to which the target object belongs.

[0020] In yet another embodiment, before determining the part of speech of each word included in the item information according to the pre-stored part of speech library information, the method further includes:

[0021] Building a part-of-speech library according to the item information of the item belonging to the target type, and setting a part-of-speech identifier corresponding to the part-of-speech library;

[0022] The part-of-speech library and the part-of-speech identifiers corresponding to the part-of-speech library are determined as the part-of-speech library information.

[0023] To achieve the above objective, according to another aspect of an embodiment of the present invention, a device for determining the type of an item is provided.

[0024] In yet another embodiment, determining the part of speech of each word included in the item information according to the pre-stored part of speech library information to obtain the part of speech sequence corresponding to the item information includes:

[0025] Determining the part of speech of each word included in the item information according to the pre-stored part of speech library information;

[0026] The parts of speech of each participle are arranged in the order in which each participle constitutes the item information to obtain the part-of-speech sequence.

[0027] An apparatus for determining an item type according to an embodiment of the present invention comprises: an acquisition unit, used to acquire item information of a target item, the item information comprising a name and function information of the target item; a word segmentation unit, used to segment the item information according to a word segmentation model, and obtain the word segments included in the item information; a determination unit, used to determine the part of speech of each word included in the item information according to pre-stored part of speech library information, and obtain a part of speech sequence corresponding to the item information; the determination unit is further used to determine the type of the target item according to the part of speech sequence and a classification model.

[0028] In one embodiment, the part-of-speech library information includes part-of-speech library information of an item part-of-speech library and part-of-speech library information of a grammar part-of-speech library, and the item part-of-speech library is established according to item description information;

[0029] The determining unit is specifically configured to:

[0030] For each participle included in the item information, determine whether the participle belongs to the item part-of-speech library. If so, determine the part-of-speech of the participle according to the part-of-speech library information of the item part-of-speech library. If not, determine the part-of-speech of the participle according to the part-of-speech library information of the grammatical part-of-speech library.

[0031] In another embodiment, the part-of-speech library information of the article part-of-speech library includes a part-of-speech identifier corresponding to the article part-of-speech library; the determining unit is specifically configured to determine the part-of-speech identifier corresponding to the article part-of-speech library as the part-of-speech of the segmented word;

[0032] The part-of-speech library information of the grammatical part-of-speech library includes the part-of-speech identifier corresponding to the grammatical part-of-speech library; the determining unit is specifically used to determine the part-of-speech identifier corresponding to the grammatical part-of-speech library as the part-of-speech of the segmented word.

[0033] In yet another embodiment, the determining unit is specifically configured to:

[0034] Inputting the part-of-speech sequence into the classification model, and calculating the probability value of the target object belonging to each category;

[0035] The type with the largest probability value is determined as the type to which the target object belongs.

[0036] In yet another embodiment, the apparatus further comprises:

[0037] A construction unit, configured to construct a part-of-speech library according to the item information of the item belonging to the target type, and set a part-of-speech identifier corresponding to the part-of-speech library;

[0038] The determining unit is further configured to determine the part-of-speech library and the part-of-speech identifiers corresponding to the part-of-speech library as the part-of-speech library information.

[0039] In yet another embodiment, the determining unit is specifically configured to:

[0040] Determining the part of speech of each word included in the item information according to the pre-stored part of speech library information;

[0041] The parts of speech of each participle are arranged in the order in which each participle constitutes the item information to obtain the part-of-speech sequence.

[0042] To achieve the above objective, according to another aspect of an embodiment of the present invention, an electronic device is provided.

[0043] An electronic device according to an embodiment of the present invention includes: one or more processors; a storage device for storing one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the method for determining the type of an item provided by the embodiment of the present invention.

[0044] To achieve the above objective, according to another aspect of an embodiment of the present invention, a computer readable medium is provided.

[0045] A computer-readable medium according to an embodiment of the present invention stores a computer program, and when the program is executed by a processor, the method for determining the type of an item provided by the embodiment of the present invention is implemented.

[0046] One embodiment of the above invention has the following advantages or beneficial effects: In the embodiment of the present invention, the object information of the target object is first obtained, and the object information includes the name and function information of the target object, which can be used to classify the object; then the object information is segmented according to the word segmentation model to obtain the word segments included in the object information, and the word segments of each word included in the object information are determined according to the pre-stored word segmentation library information, and the word segmentation sequence corresponding to the object information is obtained; then the type of the target object is determined according to the word segmentation sequence and the classification model. In this way, in the embodiment of the present invention, the target object is classified based on the word segmentation sequence of the object information, which has stronger type feature expression ability and generalization ability, can shield the influence of the word features in the object information on the classification results, and make the grammatical structure of the object information more considered during classification, thereby ensuring the accuracy of classification, and avoiding the problem that manual classification consumes a lot of time and labor costs and is inefficient.

[0047] The further effects of the above-mentioned non-conventional optional manner will be described below in conjunction with the specific implementation manner. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] The accompanying drawings are used to better understand the present invention and do not constitute an improper limitation of the present invention.

[0049] Figure 1 is a schematic diagram of a main process of a method for determining an item type according to an embodiment of the present invention;

[0050] Figure 2 is a schematic diagram of a principle for determining the type of an item according to an embodiment of the present invention;

[0051] Figure 3 is a schematic diagram of another main process of a method for determining an item type according to an embodiment of the present invention;

[0052] Figure 4 is a schematic diagram of main units of an apparatus for determining an object type according to an embodiment of the present invention;

[0053] Figure 5 is an exemplary system architecture diagram to which embodiments of the present invention may be applied;

[0054] Figure 6 It is a schematic diagram of the structure of a computer system suitable for implementing the embodiment of the present invention. DETAILED DESCRIPTION

[0055] The following is a description of exemplary embodiments of the present invention in conjunction with the accompanying drawings, including various details of the embodiments of the present invention to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present invention. Similarly, for clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0056] It should be pointed out that the embodiments of the present invention and the features in the embodiments may be combined with each other if there is no conflict.

[0057] An embodiment of the present invention provides a system for determining the type of an item. The system can be used in a scenario of classifying items, such as a scenario of classifying items by main part type and accessory type.

[0058] An embodiment of the present invention provides a method for determining the type of an item, which can be executed by a computing device or a server, such as Figure 1 As shown, the method includes the following steps.

[0059] S101: Acquire item information of a target item.

[0060] The item information includes the name and function information of the target item.

[0061] The embodiment of the present invention can be used to classify items, so the more accurate the item information is, the more accurate the classification can be. The item information can include information that can reflect the type of the target item, such as the name of the target item, functional information, etc. The functional information represents the corresponding information of the target item when it is used or realizes its function. For example, the target item is a TV mount of a certain brand, its name is TV mount, and its function is to mount a TV of a certain brand, so the functional information can include the use of a certain brand.

[0062] In the scenario where items are classified into main item type and accessory type, accessory items are usually used in conjunction with corresponding main items, so the item information of the accessory items may include relevant information of the corresponding main items.

[0063] S102: Segment the item information according to the segmentation model to obtain the segmentations included in the item information.

[0064] Among them, the word segmentation model is pre-trained.

[0065] In the embodiment of the present invention, the word segmentation model can adopt a commonly used model, such as a pyltp model, and then the adopted model is trained with data in the application scenario of the embodiment of the present invention, so that the trained word segmentation model can accurately segment the item information of the item in the application scenario of the embodiment of the present invention. In this step, the item information can be input into the word segmentation model, and then the segmentations included in the item information are obtained.

[0066] S103: Determine the part of speech of each word segment included in the item information according to the pre-stored part of speech library information, and obtain a part of speech sequence corresponding to the item information.

[0067] The part-of-speech sequence usually only includes the part-of-speech of each word in the item information. In the embodiment of the present invention, part-of-speech library information can be pre-set and stored. After the word included in the item information is obtained, the part-of-speech of each word included in the item information can be determined according to the part-of-speech library information, and then the part-of-speech of each word is sorted according to the order in which each word constitutes the item information, so as to obtain the part-of-speech sequence corresponding to the item information.

[0068] The part-of-speech library information may include part-of-speech library information of an item part-of-speech library and part-of-speech library information of a grammatical part-of-speech library, wherein the item part-of-speech library is established based on the item information. In an embodiment of the present invention, in order to reduce the influence of word features on the classification results, an item part-of-speech library may be established according to the needs of a specific application scenario. The way to establish an item part-of-speech library may be: summarize the words that have a greater influence on the classification results in the item information of each item, and then classify these words, and use the words of the same type as an item part-of-speech library. For example, words belonging to a brand may be summarized to establish an item part-of-speech library whose part of speech is the brand. Since the item information usually also includes some words that do not belong to the item part-of-speech library, the part of speech of these words can be determined based on the grammatical part-of-speech library. The grammatical part-of-speech library is a part-of-speech library established based on the part of speech in the general linguistic sense, for example, a part-of-speech library for nouns, pronouns, prepositions, and the like.

[0069] Based on the part-of-speech library information of the item part-of-speech library and the part-of-speech library information of the grammatical part-of-speech library, the method for determining the part-of-speech of each participle in this step can be: for each participle included in the item information, determine whether the participle belongs to the item part-of-speech library, if so, determine the part-of-speech of the participle according to the part-of-speech library information of the item part-of-speech library, if not, determine the part-of-speech of the participle according to the part-of-speech library information of the grammatical part-of-speech library.

[0070] For each participle included in the item information, we can first determine whether it belongs to the item part-of-speech library. When the participle belongs to the item part-of-speech library, we need to determine the part-of-speech based on the part-of-speech library information of the item part-of-speech library. When the participle does not belong to the item part-of-speech library, we can determine the part-of-speech based on the part-of-speech library information of the grammatical part-of-speech library, that is, we can determine the part-of-speech based on linguistic logic.

[0071] When constructing each part-of-speech library, a corresponding part-of-speech identifier is usually set for each part-of-speech library to refer to the part-of-speech of each word in the part-of-speech library. Therefore, the method of determining the part-of-speech according to the part-of-speech library information of the part-of-speech library can be to determine the part-of-speech identifier corresponding to the part-of-speech library to which the part-of-speech belongs as the part-of-speech of the part-of-speech. Specifically, determining the part-of-speech of the part-of-speech according to the part-of-speech library information of the item part-of-speech library can be performed as follows: determining the part-of-speech identifier corresponding to the item part-of-speech library as the part-of-speech of the part-of-speech; determining the part-of-speech according to the part-of-speech library information of the grammatical part-of-speech library can be performed as follows: determining the part-of-speech identifier corresponding to the grammatical part-of-speech library as the part-of-speech of the part-of-speech.

[0072] It should be noted that multiple item part-of-speech libraries can be established according to demand, and the part-of-speech library information can include the part-of-speech library information of each item part-of-speech library. For example, in the scenario of classifying items by main part type and accessory type, the item part-of-speech library can include a brand part-of-speech library, a main part product part-of-speech library, an accessory product part-of-speech library, and so on. When determining the part of speech based on the item part-of-speech library, the participle needs to be matched with each item part-of-speech library in turn to determine whether it belongs to the item part-of-speech library. If it does, the part-of-speech identifier corresponding to the item part-of-speech library to which it belongs is determined as the part-of-speech of the participle. The grammatical part-of-speech library is established based on linguistics. There may be a scenario where a participle belongs to multiple lexicons. At this time, the part-of-speech of the participle needs to be determined based on the language logic in the item information.

[0073] S104: Determine the type of the target item according to the part-of-speech sequence and the classification model.

[0074] The classification model is pre-trained. After determining the part-of-speech sequence of the item information in step S103, the part-of-speech sequence can be input into the classification model, and then the type of the target item can be determined according to the result of the classification model.

[0075] The classification model can be a text classification model, such as fasttext or LSTM, etc., and then trained by the part-of-speech sequence of each item information in the application scenario of the embodiment of the present invention. The result output by the classification model can be the probability value of the input part-of-speech sequence belonging to each classification model. Then, this step can determine the type to which the part-of-speech sequence belongs, that is, the type to which the target item belongs, based on the probability that the part-of-speech sequence belongs to each classification model. Specifically, it can be performed as follows: input the part-of-speech sequence into the classification model, calculate the probability value of the target item belonging to each type; determine the type with the largest probability value as the type to which the target item belongs.

[0076] For example, in a scenario where items are classified into main part type and accessory type, after the part-of-speech sequence of the target item is input into the classification model, the probability values ​​of the target item belonging to the main part type and the accessory type can be calculated, and then the type with the largest probability value can be determined as the type to which the target item belongs.

[0077] In the embodiment of the present invention, the object information of the target object is first obtained, and the object information includes the name and function information of the target object, which can be used to classify the object; then the object information is segmented according to the segmentation model to obtain the segmentations included in the object information, and the part of speech of each segmentation included in the object information is determined according to the pre-stored part of speech library information, and the part of speech sequence corresponding to the object information is obtained; then the type of the target object is determined according to the part of speech sequence and the classification model. In this way, in the embodiment of the present invention, the target object is classified based on the part of speech sequence of the object information, which has a stronger type feature expression ability and generalization ability, can shield the influence of the word features in the object information on the classification results, and make the grammatical structure of the object information more considered during classification, thereby ensuring the accuracy of classification, and avoiding the problem that the manual classification method consumes a lot of time and labor costs and is inefficient.

[0078] The embodiment of the present invention can be specifically used in a scenario where the main accessory type of an item is determined, such as Figure 2 The figure shows a schematic diagram of the principle of an embodiment of the present invention in this scenario. Figure 1 The embodiment shown, as Figure 2 As shown, the implementation of the embodiment of the present invention may include two parts, one part is a priori knowledge module, and the other part is a main accessory identification module. The priori knowledge module is used to establish a word part library applicable to this scenario and train a model applicable to this scenario. The main accessory identification module is used to determine the type of each item based on the word part library and model obtained by the priori knowledge module, that is, to determine whether the item is a main part or an accessory.

[0079] Specifically, the prior knowledge module mainly includes two parts: one is the word segmentation / part-of-speech tagging improvement model, and the other is the classification model based on the part-of-speech sequence. In the embodiment of the present invention, the core part-of-speech of the corresponding application scenario and the corresponding part-of-speech library, i.e., the item part-of-speech library, can be determined based on the item part-of-speech library and the grammatical part-of-speech library ( Figure 2(not shown in the figure) to train the improved segmentation / part-of-speech tagging model. The improved segmentation / part-of-speech tagging model can achieve the segmentation and part-of-speech tagging of item information, that is, in the embodiment of the present invention, step S102 and step S103 are integrated, and the segmentation of item information and determination of the part-of-speech sequence are achieved through the improved segmentation / part-of-speech tagging model. The improved segmentation / part-of-speech tagging model can be obtained by training the original main part item information and accessory item information as a training set based on the existing segmentation and part-of-speech tagging model according to the part-of-speech library information determined according to the specific application scenario. The classification model based on the part-of-speech sequence, that is, the main accessory classification model, can be obtained by training the part-of-speech sequence training set obtained by the improved segmentation / part-of-speech tagging model. In the main accessory recognition module, the item information of the input target item can first be segmented according to the improved segmentation / part-of-speech tagging model and the part-of-speech sequence can be obtained, and then the part-of-speech sequence can be input into the main accessory classification model to obtain the recognition result of the main accessory type, that is, determine the type to which the target item belongs.

[0080] For example, the method for constructing a part-of-speech library in an embodiment of the present invention may be as follows. Constructing an item part-of-speech library may include: a brand word library, a main item word library, an accessory item word library, and a key mark word library (the words in the main item word library and the accessory item word library all belong to the item word library, and the part-of-speech identifier is np). Among them, the words included in the brand word library may be [AA, SS, DD, DD, FF, GG, HH, ..., JJ], the words included in the main item word library may be [TV, flat-screen TV, LCD TV, air conditioner, washing machine, drum washing machine, razor, ..., electric water heater], the words included in the accessory item word library may be [accessories, hanger, bracket, washing machine protective cover, knife head, knife net, ..., refrigerator cover], and the words included in the key mark word library may be [applicable, applicable to, adaptable, included, attached, attached, presented, presented, presented, ..., suitable for]. The brand word library is set to brand, the main item word library is set to main, the accessory item word library is set to fitting, and the key mark word library is set to key. The grammatical word library is established based on linguistics, and the word library is set to: the word mark of punctuation is wp, the word mark of number is m, the word mark of quantifier is q, the word mark of general noun is n, the word mark of noun modifier is b, the word mark of noun modifier of product word is bb, the word mark of foreign word is ws, and the word mark of noun modifier of adjective is a.

[0081] The word segmentation / part-of-speech tagging model segments the input item information and tags each word with a part-of-speech identifier. When tagging the part-of-speech, it is possible to first determine whether each word belongs to the item part-of-speech library. If so, the part-of-speech identifier of the item part-of-speech library is marked. If not, the part-of-speech identifier of the traditional part of speech is marked according to the grammatical part-of-speech library, such as quantity, noun, etc.

[0082] Combine the following Figure 2 The principle schematic diagram shown in the figure specifically illustrates the method for determining the type of an item in the scenario of determining the main accessory type of an item in an embodiment of the present invention. Figure 3 As shown, the method includes the following steps.

[0083] S301: Acquire item information of a target item.

[0084] Among them, in some scenarios, since the title of an item usually includes the name of the item and information related to its function, and item screening is also implemented based on the title of the item, in an embodiment of the present invention, the title of the item can be directly used as the item information.

[0085] For example, taking the target item with the title "AA (PHIL) 55-inch 4K Ultra High Definition Color TV Artificial Intelligence Network Android LCD Flat-Panel WiFi TV Large Screen HDR 60 Standard Base + Wall Mount Bracket" as an example, AA in the title is the brand and PHIL is the English name of the brand. This title includes the name of the target item and the main product information corresponding to the function implementation, which can be directly used as the item information of the target item for subsequent processing.

[0086] S302: Determine the part-of-speech sequence of the item information by improving the model through word segmentation / part-of-speech tagging.

[0087] Among them, through Figure 2 The improved word segmentation / part-of-speech tagging model shown can segment item information and tag the part-of-speech identifier of each segmentation, thereby obtaining a part-of-speech sequence of the item information.

[0088] For example, for the item information "AA (PHIL) 55-inch 4K ultra-high-definition color TV artificial intelligence network Android LCD flat-panel WiFi TV large screen HDR 60 standard base + wall mount", according to Figure 2The word segmentation and part-of-speech tagging results of the part-of-speech library constructed in the example shown can be as follows: [{"pos":"brand","word":"AA(PHIL)"}, {"pos":"m","word":"55"}, {"pos":"q","word":"inch"}, {"pos":"m","word":"4k"}, {"pos":"b","word":"ultra high definition"}, {"pos":"main","word":"color TV"}, {"pos":"n","word":"artificial intelligence network"}, {"pos":"brand","word":"Android"}, {"pos":"n","word":"LCD"}, {"pos":"np","word":"tablet"}, {"pos":" ws", "word":"wifi"}, {"pos":"main", "word":"tv"}, {"pos":"n", "word":"big screen"}, {"pos":"brand", "word":"hdr"}, {"pos":"wp", "word":""}, {"pos":"m", "word":"60"}, {"pos":"wp", "word":""}, {"pos":"key", "word":"standard"}, {"pos":"fitting", "word":"base"}, {"pos":"wp", "word":"+"}, {"pos":"np", "word":"wall-mounted"}, {"pos":"fitting", "word":"rack"}]. Among them, "pos" is the marked part-of-speech tag and "word" is the corresponding participle.

[0089] Through the above part-of-speech tagging, we can get the part-of-speech sequence of item information: brand mqmb main nbrand n np ws main n brand wp m wp key fitting wp np fitting.

[0090] S303: Input the part-of-speech sequence of the item information into the main accessory classification model to determine the type to which the target item belongs.

[0091] The part-of-speech sequence obtained in step S302 is input into the trained main-accessory classification model, and the type of the target item is obtained by calculating the probability value of the part-of-speech sequence belonging to the main item and the accessory item, that is, the type with a high probability value is the type to which the target item belongs.

[0092] In the embodiment of the present invention, the item information of the item is converted into a part-of-speech sequence, and then the main accessories are classified. Traditional text classification models are based on the original text. On the one hand, features are constructed by generating word vectors for characters or words in the text. This method is greatly affected by the quality of the generated word vectors, and pays more attention to keyword features and ignores sentence structure. On the other hand, it strictly relies on sufficient sampling of the categories to be covered, has a low expansion speed, and has limited generalization ability. The text classification method based on part-of-speech sequence in the embodiment of the present invention relies on the grammatical structure information of the part-of-speech sequence of the text. Since the grammatical structure of the titles of most main items and accessory items is consistent, when expanding the coverage of items in a new category, it is only necessary to expand the words included in the specific part-of-speech library of the category, such as the main item vocabulary library and the accessory item vocabulary library, so as to achieve fast and accurate type recognition of the main and accessory items in the new category, which greatly improves the generalization ability and expansion speed of classification; in addition, targeted part-of-speech settings can be made for different classification purposes to highlight the influence of special and keyword properties on the classification results. For example, in the classification of main and accessory items, the parts of speech such as main part ('main'), accessory ('fitting') and key marker ('key') have a great influence on the classification results, so a special classification model can be customized to generate, which is very flexible and versatile.

[0093] It should be noted that in the embodiments of the present invention, accessory items refer to auxiliary parts that are equipped with articles or machinery, or parts that can enhance product functions or performance outside the standard configuration. Main accessories refer to the main parts of articles other than accessory items, and the two are collectively referred to as main accessories. In the commonly used word segmentation / part-of-speech tagging models, in addition to pyltp, jieba, HanLP, Stanford CoreNLP and other frameworks or models that can increase word segmentation vocabulary and perform part-of-speech tagging can also be used. In the classification model, in addition to fasttext and LSTM, BiLSTM, GRU, Bert and other models can also be used after training and tuning to achieve better results.

[0094] In order to solve the problems existing in the prior art, an embodiment of the present invention provides a device 400 for determining the type of an item, such as Figure 4 As shown, the device 400 includes:

[0095] An acquisition unit 401 is used to acquire item information of a target item, wherein the item information includes a name and function information of the target item;

[0096] A word segmentation unit 402, configured to segment the item information according to a word segmentation model to obtain the word segments included in the item information;

[0097] A determination unit 403 is used to determine the part of speech of each word included in the item information according to the pre-stored part of speech library information, and obtain a part of speech sequence corresponding to the item information;

[0098] The determination unit 403 is further configured to determine the type of the target item according to the part-of-speech sequence and the classification model.

[0099] It should be understood that the manner of implementing the embodiments of the present invention is different from the Figure 1 The method of the illustrated embodiment is the same and will not be repeated here.

[0100] In one implementation of the embodiment of the present invention, the part-of-speech library information includes part-of-speech library information of an item part-of-speech library and part-of-speech library information of a grammar part-of-speech library, and the item part-of-speech library is established according to item description information;

[0101] The determining unit 403 is specifically configured to:

[0102] For each participle included in the item information, determine whether the participle belongs to the item part-of-speech library. If so, determine the part-of-speech of the participle according to the part-of-speech library information of the item part-of-speech library. If not, determine the part-of-speech of the participle according to the part-of-speech library information of the grammatical part-of-speech library.

[0103] In another implementation of the embodiment of the present invention, the part-of-speech library information of the article part-of-speech library includes a part-of-speech identifier corresponding to the article part-of-speech library; the determining unit 403 is specifically configured to determine the part-of-speech identifier corresponding to the article part-of-speech library as the part-of-speech of the segmented word;

[0104] The part-of-speech library information of the grammatical part-of-speech library includes the part-of-speech identifier corresponding to the grammatical part-of-speech library; the determining unit 403 is specifically configured to determine the part-of-speech identifier corresponding to the grammatical part-of-speech library as the part-of-speech of the segmented word.

[0105] In another implementation of the embodiment of the present invention, the determining type 403 is specifically used for:

[0106] Inputting the part-of-speech sequence into the classification model, and calculating the probability value of the target object belonging to each category;

[0107] The type with the largest probability value is determined as the type to which the target object belongs.

[0108] In another implementation of the embodiment of the present invention, the apparatus 400 further includes:

[0109] A construction unit, configured to construct a part-of-speech library according to the item information of the item belonging to the target type, and set a part-of-speech identifier corresponding to the part-of-speech library;

[0110] The determining unit 403 is further configured to determine the part-of-speech library and the part-of-speech identifiers corresponding to the part-of-speech library as the part-of-speech library information.

[0111] In another implementation of the embodiment of the present invention, the determining unit 403 is specifically configured to:

[0112] Determining the part of speech of each word included in the item information according to the pre-stored part of speech library information;

[0113] The parts of speech of each participle are arranged in the order in which each participle constitutes the item information to obtain the part of speech sequence.

[0114] It should be understood that the manner of implementing the embodiments of the present invention is different from the Figure 1 or Figure 3 The method of the illustrated embodiment is the same and will not be repeated here.

[0115] In the embodiment of the present invention, the object information of the target object is first obtained, and the object information includes the name and function information of the target object, which can be used to classify the object; then the object information is segmented according to the segmentation model to obtain the segmentations included in the object information, and the part of speech of each segmentation included in the object information is determined according to the pre-stored part of speech library information, and the part of speech sequence corresponding to the object information is obtained; then the type of the target object is determined according to the part of speech sequence and the classification model. In this way, in the embodiment of the present invention, the target object is classified based on the part of speech sequence of the object information, which has a stronger type feature expression ability and generalization ability, can shield the influence of the word features in the object information on the classification results, and make the grammatical structure of the object information more considered during classification, thereby ensuring the accuracy of classification, and avoiding the problem that the manual classification method consumes a lot of time and labor costs and is inefficient.

[0116] According to an embodiment of the present invention, the present invention also provides an electronic device and a readable storage medium.

[0117] The electronic device of the present invention comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the one processor, and the instructions are executed by the at least one processor so that the at least one processor executes the method for determining the type of an item provided in an embodiment of the present invention.

[0118] Figure 5 An exemplary system architecture 500 is shown to which the method for determining the type of an item or the apparatus for determining the type of an item according to an embodiment of the present invention can be applied.

[0119] like Figure 5As shown, system architecture 500 may include terminal devices 501, 502, 503, a network 504 and a server 505. Network 504 is used to provide a medium for communication links between terminal devices 501, 502, 503 and server 505. Network 504 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.

[0120] Users can use terminal devices 501, 502, 503 to interact with server 505 through network 504 to receive or send messages, etc. Various communication client applications can be installed on terminal devices 501, 502, 503, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only as examples).

[0121] The terminal devices 501 , 502 , and 503 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.

[0122] The server 505 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 501, 502, and 503. The backend management server may analyze and process the received data such as product information query requests, and feed back the processing results (such as product information - only an example) to the terminal device.

[0123] It should be noted that the method for determining the type of an item provided in the embodiment of the present invention is generally executed by the server 505 , and accordingly, the device for determining the type of an item is generally disposed in the server 505 .

[0124] It should be understood that Figure 5 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.

[0125] Reference below Figure 6 , which shows a schematic diagram of the structure of a computer system 600 suitable for implementing an embodiment of the present invention. Figure 6 The computer system shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.

[0126] like Figure 6As shown, the computer system 600 includes a central processing unit (CPU) 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a storage part 608 into a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the system 600 are also stored. The CPU 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0127] The following components are connected to the I / O interface 605: an input section 606 including a keyboard, a mouse, etc.; an output section 607 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 608 including a hard disk, etc.; and a communication section 609 including a network interface card such as a LAN card, a modem, etc. The communication section 609 performs communication processing via a network such as the Internet. A drive 610 is also connected to the I / O interface 605 as needed. A removable medium 611, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 610 as needed, so that a computer program read therefrom is installed into the storage section 608 as needed.

[0128] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 609, and / or installed from the removable medium 611. When the computer program is executed by the central processing unit (CPU) 601, the above-mentioned functions defined in the system of the present invention are executed.

[0129] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0130] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a unit, a program segment, or a part of a code, and the above-mentioned unit, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0131] The units involved in the embodiments of the present invention may be implemented by software or hardware. The units described may also be arranged in a processor, for example, it may be described as: a processor includes an acquisition unit, a word segmentation unit, and a determination unit. The names of these units do not constitute a limitation on the units themselves in some cases, for example, the acquisition unit may also be described as a "unit of the function of the acquisition unit".

[0132] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device executes the method for determining the type of an item provided by the present invention.

[0133] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may occur depending on design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for determining the type of an item, characterized in that: include: Acquire item information of a target item, wherein the item information includes the name and function information of the target item; Segmenting the item information according to a segmentation model to obtain segmentations included in the item information; According to the pre-stored part-of-speech library information, the part-of-speech of each participle included in the item information is determined, and a part-of-speech sequence corresponding to the item information is obtained; wherein the part-of-speech library information includes a plurality of item part-of-speech libraries, words in the item information of each item that affect the classification result are determined and classified, and words belonging to the same type are used as an item part-of-speech library, and each item part-of-speech library is set with a corresponding part-of-speech identifier, and the part-of-speech identifier of the item part-of-speech library to which each participle belongs is determined as the part-of-speech of each participle; The type of the target object is determined according to the part-of-speech sequence and the classification model.

2. The method according to claim 1, characterized in that: The part-of-speech library information includes part-of-speech library information of an article part-of-speech library and part-of-speech library information of a grammar part-of-speech library, and the article part-of-speech library is established according to the article information; The determining the part of speech of each word included in the item information according to the pre-stored part of speech library includes: For each participle included in the item information, determine whether the participle belongs to the item part-of-speech library. If so, determine the part-of-speech of the participle according to the part-of-speech library information of the item part-of-speech library. If not, determine the part-of-speech of the participle according to the part-of-speech library information of the grammatical part-of-speech library.

3. The method according to claim 2, characterized in that The part-of-speech library information of the article part-of-speech library includes the part-of-speech identifiers corresponding to the article part-of-speech library, and the part-of-speech library information of the grammatical part-of-speech library includes the part-of-speech identifiers corresponding to the grammatical part-of-speech library; The determining the part of speech of the word segment according to the part of speech library information of the article part of speech library includes: Determine the part-of-speech identifier corresponding to the item part-of-speech library as the part-of-speech of the segmented word; The determining the part of speech of the word segment according to the part of speech library information of the grammatical part of speech library comprises: The part-of-speech identifier corresponding to the grammatical part-of-speech library is determined as the part-of-speech of the segmented word.

4. The method according to claim 1, characterized in that: The determining the type of the target item according to the part-of-speech sequence and the classification model includes: Inputting the part-of-speech sequence into the classification model, and calculating the probability value of the target object belonging to each category; The type with the largest probability value is determined as the type to which the target object belongs.

5. The method according to claim 1, characterized in that: Before determining the part of speech of each word included in the item information according to the pre-stored part of speech library information, the method further includes: Building a part-of-speech library according to the item information of the item belonging to the target type, and setting a part-of-speech identifier corresponding to the part-of-speech library; The part-of-speech library and the part-of-speech identifiers corresponding to the part-of-speech library are determined as the part-of-speech library information.

6. The method according to claim 1, characterized in that The step of determining the part of speech of each word included in the item information according to the pre-stored part of speech library information and obtaining the part of speech sequence corresponding to the item information includes: Determining the part of speech of each word included in the item information according to the pre-stored part of speech library information; The parts of speech of each participle are arranged in the order in which each participle constitutes the item information to obtain the part-of-speech sequence.

7. A device for determining the type of an item, characterized in that: include: An acquisition unit, configured to acquire item information of a target item, wherein the item information includes a name and function information of the target item; A word segmentation unit, used to segment the item information according to a word segmentation model to obtain the word segmentations included in the item information; A determination unit is used to determine the part of speech of each segmented word included in the item information according to pre-stored part of speech library information, and obtain a part of speech sequence corresponding to the item information; wherein the part of speech library information includes multiple item part of speech libraries, determine the words that affect the classification result in the item information of each item and classify them, and words belonging to the same type are used as an item part of speech library, each item part of speech library is set with a corresponding part of speech identifier, and the part of speech identifier of the item part of speech library to which each segmented word belongs is determined as the part of speech of each segmented word; The determination unit is further used to determine the type of the target object according to the part-of-speech sequence and the classification model.

8. The device according to claim 7, characterized in that The part-of-speech library information includes part-of-speech library information of an item part-of-speech library and part-of-speech library information of a grammar part-of-speech library, and the item part-of-speech library is established according to item description information; The determining unit is specifically configured to: For each participle included in the item information, determine whether the participle belongs to the item part-of-speech library. If so, determine the part-of-speech of the participle according to the part-of-speech library information of the item part-of-speech library. If not, determine the part-of-speech of the participle according to the part-of-speech library information of the grammatical part-of-speech library.

9. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 6.

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

Citation Information

Patent Citations

  • Part of speech labeling method and device, program product and memory medium

    CN108170674A

  • Method and device for predicting public opinion index, computer device and readable storage medium

    CN109087205A

  • Text entity recognition method and device, electronic device, and storage medium

    CN109145294A

  • Method and device for determining similar word set, and electronic device

    CN109388801A

  • Method and device for estimating part of speech

    JP1996297670A