Search

CN-114429599-B - Category classification method, category classification device, electronic device and storage medium

CN114429599BCN 114429599 BCN114429599 BCN 114429599BCN-114429599-B

Abstract

The disclosure relates to category classification methods, devices, electronic equipment and storage media, and relates to the technical field of computers. The method comprises the steps of obtaining video data through implementation of the category classification method provided by the embodiment of the disclosure, wherein the video data comprise commodity information, processing the video data to generate commodity feature vectors of the commodity information, and determining target level categories corresponding to the commodity information according to the commodity feature vectors and a plurality of target category prediction tables, wherein each target category prediction table comprises a plurality of category vectors, each target category prediction table corresponds to one category level, and tree-shaped relations are arranged among the category vectors in different target category prediction tables. Thus, the accuracy of category classification can be improved.

Inventors

  • WAN YAN

Assignees

  • 北京达佳互联信息技术有限公司

Dates

Publication Date
20260512
Application Date
20211224

Claims (19)

  1. 1. A method of category classification, the method comprising: Acquiring video data, wherein the video data comprises commodity information; Performing video frame extraction on the video data to obtain a target image, and performing voice recognition on the video data to obtain a target text, wherein the target image and the target text comprise commodity information, the target image and the target text have semantic association relationship, and the target image and the target text exist in pairs; inputting the target image into a trained image processing model to generate an image feature vector; Inputting the target text into a trained deep language representation model to generate a text feature vector; Connecting the image feature vector and the text feature vector to generate a commodity feature vector of the commodity information; Respectively calculating the similarity between the commodity characteristic vector and a plurality of first-level category vectors in a target category prediction table of a first category hierarchy, and screening K target first-level category vectors with the highest similarity with the commodity characteristic vector from the plurality of first-level category vectors by adopting a beam searching method based on a preset beam width, wherein K is an integer larger than 1 and is equal to the beam width; Determining and acquiring a plurality of corresponding secondary category vectors in a target category prediction table of a second category level according to the tree-like relation between the K target primary category vectors and the category vectors in different target category prediction tables; based on the similarity between the commodity characteristic vector and the plurality of secondary category vectors and also based on the beam width, screening K target secondary category vectors from the plurality of secondary category vectors by adopting a beam searching method; and the like, until the similarity between the commodity feature vector and the determined N-level category vectors is calculated respectively, and a target N-level category vector corresponding to the commodity feature vector is determined, wherein N is the number of target category prediction tables; and determining the target level category of the commodity information according to the target N-level category vector, wherein each target category prediction table comprises a plurality of category vectors, each target category prediction table corresponds to one category level, and tree-shaped relations are arranged among the category vectors in different target category prediction tables.
  2. 2. The method according to claim 1, characterized in that the method further comprises: randomly initializing a plurality of sample category prediction tables, wherein the sample category prediction tables comprise a plurality of sample category vectors, each sample category prediction table corresponds to a category level, and tree relations exist among the sample category vectors in different sample category prediction tables; the method comprises the steps of obtaining a training sample set, wherein the training sample set comprises a plurality of sample commodity information and sample level categories corresponding to the sample commodity information; processing the sample commodity information to generate a sample commodity feature vector of the sample commodity information; Determining a predicted target level category corresponding to the sample commodity information according to the sample commodity feature vector and a plurality of sample category prediction tables; Calculating a sample loss value according to the predicted target level category and the sample level category; and updating the sample category prediction table according to the sample loss value, and generating the target category prediction table.
  3. 3. The method according to claim 2, characterized in that the method further comprises: under the condition that the sample commodity information is input into an image processing model to generate a sample commodity feature vector of the sample commodity information, updating the image processing model according to the sample loss value to generate a trained image processing model; Or under the condition that the sample commodity information is input into a depth language representation model to generate a sample commodity feature vector of the sample commodity information, updating the depth language representation model according to the sample loss value to generate a trained depth language representation model; Or under the condition that the sample commodity information is input into an image processing model and a depth language representation model to generate a sample commodity feature vector of the sample commodity information, updating the image processing model and the depth language representation model according to the sample loss value to generate a trained image processing model and a trained depth language representation model.
  4. 4. The method according to claim 1, characterized in that the method further comprises: And updating the target category prediction table according to the new category and/or the reduced category.
  5. 5. The method of claim 4, wherein updating the target category prediction table according to the new category comprises: Randomly initializing a plurality of newly-added sample category prediction tables, wherein the newly-added sample category prediction tables comprise a plurality of newly-added sample category vectors, each newly-added sample category prediction table corresponds to a category hierarchy, and tree-shaped relations are arranged among the newly-added sample category vectors in different newly-added sample category prediction tables; the method comprises the steps of obtaining a new training sample set of the new category, wherein the new training sample set comprises a plurality of new sample commodity information and a new sample level category corresponding to the new sample commodity information; processing the newly-added sample commodity information to generate a newly-added sample commodity feature vector of the newly-added sample commodity information; Determining a new predicted target level category corresponding to the new sample commodity information according to the new sample commodity feature vector and a plurality of new sample category prediction tables; calculating a new sample loss value according to the new predicted target level category and the new sample level category; and updating the new sample category prediction table according to the new sample loss value, and generating a new target category prediction table.
  6. 6. The method of claim 5, wherein the new target category prediction table includes at least one new category vector therein, the method further comprising: And updating the new category vector in the new and added target category prediction table to the target category prediction table, and updating the target category prediction table.
  7. 7. The method according to any one of claims 4 to 6, wherein updating the target category prediction table according to the reduction category comprises: and deleting the category vector corresponding to the reduction category from the target category prediction table, and updating the target category prediction table.
  8. 8. The method of claim 7, wherein deleting the category vector corresponding to the reduced category from the target category prediction table comprises: Deleting the category vector corresponding to the reduction category in a first target category prediction table in which the reduction category is located, and And deleting the category vector with the tree relation with the first target category vector in at least one second target category prediction table behind the category level corresponding to the first target category prediction table according to the tree relation among the category vectors in different target category prediction tables.
  9. 9. A category classification device, the device comprising: The data acquisition unit is used for acquiring video data, wherein the video data comprises commodity information; The data processing unit is used for carrying out video frame extraction on the video data to obtain a target image, and carrying out voice recognition on the video data to obtain a target text; the commodity information is included in the target image and the target text, the target image and the target text have a semantic association relationship, and the target image and the target text exist in pairs; inputting the target image into a trained image processing model to generate an image feature vector, inputting the target text into a trained depth language representation model to generate a text feature vector, and connecting the image feature vector and the text feature vector to generate a commodity feature vector of the commodity information; a category determining unit, configured to determine a category of a target hierarchy corresponding to the commodity information according to the commodity feature vector and a plurality of target category prediction tables, where each target category prediction table includes a plurality of category vectors, each target category prediction table corresponds to a category hierarchy, and tree relationships exist between the category vectors in different target category prediction tables; the category determination unit includes: The first vector determining module is used for respectively calculating the similarity between the commodity characteristic vector and a plurality of first-level class vectors in the target class prediction table of the first class level, and based on a preset beam width, adopting a beam searching method to screen K target first-level class vectors with highest similarity with the commodity characteristic vector from the plurality of first-level class vectors, wherein K is an integer larger than 1 and is equal to the beam width; The second vector determining module is used for determining and acquiring a plurality of corresponding secondary category vectors in the target category prediction table of the second category level according to the tree-shaped relation between the K target primary category vectors and the category vectors in the different target category prediction tables; based on the similarity between the commodity characteristic vector and the plurality of secondary category vectors and also based on the beam width, screening K target secondary category vectors from the plurality of secondary category vectors by adopting a beam searching method; The third vector determining module is used for carrying out the same analogy until the similarity between the commodity feature vector and the determined N-level category vectors is calculated respectively, and determining a target N-level category vector corresponding to the commodity feature vector, wherein N is the number of target category prediction tables; And the first category determining module is used for determining the target level category of the commodity information according to the target N-level category vector.
  10. 10. The apparatus of claim 9, wherein the apparatus further comprises: An initialization unit, configured to randomly initialize a plurality of sample category prediction tables, where the sample category prediction table includes a plurality of sample category vectors, each sample category prediction table corresponds to a category hierarchy, and tree relationships exist between the sample category vectors in different sample category prediction tables; the training sample set comprises a plurality of sample commodity information and sample level categories corresponding to the sample commodity information; The sample processing unit is used for processing the sample commodity information and generating a sample commodity feature vector of the sample commodity information; the prediction unit is used for determining a prediction target level category corresponding to the sample commodity information according to the sample commodity feature vector and the plurality of sample category prediction tables; A calculation unit configured to calculate a sample loss value from the prediction target hierarchy category and the sample hierarchy category; And the target generation unit is used for updating the sample category prediction table according to the sample loss value and generating the target category prediction table.
  11. 11. The apparatus of claim 10, wherein the apparatus further comprises: a first model updating unit, configured to update, when the sample commodity information is input to an image processing model and a sample commodity feature vector of the sample commodity information is generated, the image processing model according to the sample loss value, and generate a trained image processing model; Or under the condition that the sample commodity information is input into a depth language representation model to generate a sample commodity feature vector of the sample commodity information, updating the depth language representation model according to the sample loss value to generate a trained depth language representation model; Or under the condition that the sample commodity information is input into an image processing model and a depth language representation model to generate a sample commodity feature vector of the sample commodity information, updating the image processing model and the depth language representation model according to the sample loss value to generate a trained image processing model and a trained depth language representation model.
  12. 12. The apparatus of claim 9, wherein the apparatus further comprises: and the updating unit is used for updating the target category prediction table according to the new category and/or the reduced category.
  13. 13. The apparatus of claim 12, wherein the updating unit comprises: The system comprises a new sample category prediction table, a new initialization module and a new sample category prediction module, wherein the new sample category prediction table comprises a plurality of new sample category vectors, each new sample category prediction table corresponds to a category hierarchy, and tree-shaped relations are arranged among the new sample category vectors in different new sample category prediction tables; The new training sample set comprises a plurality of new sample commodity information and new sample level categories corresponding to the new sample commodity information; The new sample processing module is used for processing the new sample commodity information and generating a new sample commodity feature vector of the new sample commodity information; The new-addition prediction module is used for determining a new-addition prediction target level category corresponding to the new-addition sample commodity information according to the new-addition sample commodity feature vector and a plurality of new-addition sample category prediction tables; A new calculation module for calculating a new sample loss value according to the new predicted target level category and the new sample level category; And the new target generation module is used for updating the new sample category prediction table according to the new sample loss value and generating a new target category prediction table.
  14. 14. The apparatus of claim 13, wherein the updating unit comprises: and the new target updating module is used for updating the new category vector in the new target category prediction table into the target category prediction table and updating the target category prediction table, wherein the new target category prediction table comprises at least one new category vector.
  15. 15. The apparatus according to any one of claims 12 to 14, wherein the updating unit comprises: and the first deleting module is used for deleting the category vector corresponding to the reduction category from the target category prediction table and updating the target category prediction table.
  16. 16. The apparatus of claim 15, wherein the first deletion module is specifically configured to delete, in a first target category prediction table in which the reduction category is located, a category vector corresponding to the reduction category, and delete, in at least one second target category prediction table after a category level corresponding to the first target category prediction table, a category vector having a tree relationship with the first target category vector according to a tree relationship between the category vectors in different target category prediction tables.
  17. 17. An electronic device, comprising: A processor; a memory for storing the processor-executable instructions; wherein the processor is configured to execute the instructions to implement the category classification method of any one of claims 1 to 8.
  18. 18. A storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform the category classification method of any one of claims 1 to 8.
  19. 19. A computer program product comprising a computer program which, when executed by a processor, implements the category classification method according to any one of claims 1 to 8.

Description

Category classification method, category classification device, electronic device and storage medium Technical Field The present disclosure relates to the field of computer technologies, and in particular, to a category classification method, apparatus, electronic device, and storage medium. Background The electronic commerce commodity library is a core foundation stone sold by electronic commerce. All the existing large Internet E-commerce platforms are required to establish an E-commerce commodity library, commodity information which can be sold is issued outwards through the platform every day, and a user enters the platform to conduct selective transaction. In the commodity auditing and issuing stage, the platform needs to audit commodities issued by merchants, including identifying whether the categories in commodity information issued by the merchants are mounted correctly. In the related art, the platform identifies categories in commodity information issued by merchants in a manual auditing mode, but the manual auditing mode is low in efficiency and low in accuracy. Disclosure of Invention The disclosure provides a category classification method, a category classification device, electronic equipment and a storage medium, so as to at least solve the problems of low manual auditing efficiency and low accuracy of an e-commerce platform in the related technology. The technical scheme of the present disclosure is as follows: According to a first aspect of an embodiment of the present disclosure, a category classification method is provided, which includes obtaining video data, wherein the video data includes commodity information, processing the video data to generate commodity feature vectors of the commodity information, and determining target level categories corresponding to the commodity information according to the commodity feature vectors and a plurality of target category prediction tables, wherein each target category prediction table includes a plurality of category vectors, each target category prediction table corresponds to a category level, and tree-shaped relations are provided among the category vectors in different target category prediction tables. Thus, the accuracy of category classification can be improved. According to a second aspect of the embodiment of the present disclosure, a category classification device is provided, which includes a data acquisition unit, a data processing unit, a category determination unit, and a category classification unit, wherein the data acquisition unit is configured to acquire video data, the video data includes commodity information, the data processing unit is configured to process the video data to generate commodity feature vectors of the commodity information, the category determination unit is configured to determine a target level category corresponding to the commodity information according to the commodity feature vectors and a plurality of target category prediction tables, each target category prediction table includes a plurality of category vectors, each target category prediction table corresponds to one category level, and tree relationships exist between the category vectors in different target category prediction tables. According to a third aspect of embodiments of the present disclosure, there is provided an electronic device comprising a processor, a memory for storing instructions executable by the processor, wherein the processor is configured to execute the instructions to implement the category classification method as described in the first aspect above. According to a fourth aspect of embodiments of the present disclosure, there is provided a storage medium, which when executed by a processor of an electronic device, enables the electronic device to perform the category classification method as described in the first aspect above. According to a fifth aspect of embodiments of the present disclosure, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the category classification method as described in the first aspect above. The technical scheme provided by the embodiment of the disclosure at least brings the following beneficial effects: the category classification method provided by the embodiment of the disclosure is implemented to obtain video data, wherein the video data comprises commodity information, commodity feature vectors of the commodity information are generated by processing the video data, target level categories corresponding to the commodity information are determined according to the commodity feature vectors and a plurality of target category prediction tables, each target category prediction table comprises a plurality of category vectors, each target category prediction table corresponds to one category level, and tree relations are formed among the category vectors in different target category prediction tables. Thus, the accuracy