A material automatic marking method, device and storage medium
By building a dictionary library and image library, combining optical character recognition and image pre-training models, an efficient solution for automatic marking of materials is realized, solving the demand for automatic marking of materials in the fast-moving consumer goods marketing field, and improving marking efficiency and model recognition ability.
Patent Information
- Application Number
- CN202210170536.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-24
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2042-02-24
AI Technical Summary
The existing technology cannot meet the automatic marking needs of materials in the fast-moving consumer goods marketing field. The traditional methods are time-consuming and labor-intensive, pure manual marking is inefficient, and machine training marking requires a large amount of data and is difficult to converge.
Build a dictionary library and image library, match the description information of the material through the dictionary library, use optical character recognition and image library to match unmatched materials, obtain label information, reduce the amount of manual annotation and folder management pressure, and use image pre-training model to extract feature vectors for image library match.
It realizes the high efficiency of automatic marking of materials, reduces the workload and pressure of marking, meets the automatic marking needs in the fast-moving consumer goods marketing field, avoids the labeling of massive training data, and improves the model recognition ability.
Smart Images

Figure CN114547360B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a material automatic marking method, device and storage medium. Background Art
[0002] With the advent of the self-media era, the content in the marketing field of fast-moving consumer goods has achieved rapid growth. When distributing content, the management of distributed materials is particularly important. How to improve the distribution management of materials is particularly important for both product content operation and content re-creation. In order to optimize the user experience of managing materials and improve the efficiency of users using materials, material labeling tools have emerged. The labeling methods in the prior art mainly include pure manual labeling, machine classification labeling through the content in different folder directories, and machine training classification labeling. The traditional pure manual labeling method is time-consuming and labor-intensive, making it less desirable for large-scale material labeling tasks; the labeling method through folder management involves too many rules and folder names in the post-processing process, which is difficult to cover completely; in the method of training labeling through machines, in order to meet the online accuracy requirements, the training data that needs to be labeled is too large, and when the category granularity is too fine, the model is difficult to converge and reason. Therefore, the existing labeling methods cannot meet the needs of automatic labeling of materials in the marketing field of fast-moving consumer goods. Summary of the invention
[0003] Therefore, the technical problem to be solved by the present invention is to overcome the problem that the marking method in the prior art cannot meet the demand for automatic marking of materials in the marketing field of fast-moving consumer goods.
[0004] In order to solve the above technical problems, the present invention provides a material automatic labeling method, comprising the steps of: constructing a dictionary library and a picture library for matching; obtaining a material provided by a user; reading first description information of the material, matching the first description information with the dictionary library, judging whether the matching is successful, and if the dictionary library of the first description information matches successfully, obtaining label information corresponding to the first description information and assigning it to the material, wherein the first description information includes the file name, attributes and / or the folder name of the material; if the dictionary library of the first description information matches unsuccessfully, reading text information in the material by an optical character recognition method, matching the text information with the dictionary library, judging whether the matching is successful, and if the dictionary library of the text information matches successfully, obtaining the label information corresponding to the text information and assigning it to the material; if the dictionary library of the text information matches unsuccessfully, matching the material with the picture library to obtain second description information of the material, wherein the second description information is the text matched in the picture library, matching the second description information with the dictionary library, judging whether the matching is successful, and if the dictionary library of the second description information matches successfully, obtaining the label information corresponding to the second description information and assigning it to the material.
[0005] Optionally, after the second description information is matched with a dictionary library and it is determined whether the match is successful, the method further includes the following steps: if the dictionary library match of the second description information is unsuccessful, setting the tag information of the material to blank.
[0006] Optionally, the method for constructing a dictionary library for matching includes: obtaining third description information of several commodities, creating the label information based on the third description information, the third description information including the name of the commodity and / or the attributes of the commodity; respectively determining the label information of several commodities; extracting trigger words from the third description information, and respectively configuring the trigger words to the corresponding label information, thereby obtaining the dictionary library.
[0007] Optionally, the method for constructing a gallery for matching includes: obtaining fourth description information and product images of a number of products, the fourth description information including the name of the product and / or the attributes of the product, and the fourth description information including the trigger word; extracting a feature vector of the product image; storing the index number of the product and the fourth description information in a mongodb database, and storing the index number of the product and the feature vector of the product image in a milvus database, thereby obtaining the gallery.
[0008] Optionally, the method for performing dictionary library matching includes: matching the first description information, text information or second description information with the trigger word in the dictionary library through an AC automaton algorithm, and acquiring the label information corresponding to the matched trigger word.
[0009] Optionally, the method for performing gallery matching includes: extracting the feature vector of the material, searching the milvus database for the feature vector of the product image that is closest to the feature vector of the material, obtaining the index number of the product corresponding to the feature vector of the retrieved image, and obtaining the corresponding fourth description information in the mongodb database based on the index number of the product, wherein the fourth description information obtained is the second description information matched by the material.
[0010] Optionally, the method for extracting the feature vector of the product image or the material includes: extracting the feature vector of the product image or the material using an image pre-training model.
[0011] In order to solve the above technical problems, the present invention also provides a material automatic marking device, comprising: a memory; and a processor connected to the memory, the processor being configured to: construct a dictionary library and a picture library for matching; obtain a material provided by a user; read the first description information of the material, match the first description information with the dictionary library, and determine whether the match is successful. If the dictionary library of the first description information matches successfully, obtain the label information corresponding to the first description information and assign it to the material, the first description information including the file name, attributes and / or the folder name of the material; if the dictionary library of the first description information matches unsuccessfully, read the text information in the material by an optical character recognition method, match the text information with the dictionary library, and determine whether the match is successful. If the dictionary library of the text information matches successfully, obtain the label information corresponding to the text information and assign it to the material; if the dictionary library of the text information matches unsuccessfully, match the material with the picture library to obtain the second description information of the material, the second description information is the text matched in the picture library, match the second description information with the dictionary library, and determine whether the match is successful. If the dictionary library of the second description information matches successfully, obtain the label information corresponding to the second description information and assign it to the material.
[0012] In order to solve the above technical problem, the present invention also provides a computer storage medium on which a computer program is stored, wherein the computer program implements the steps of the above method when executed by a machine.
[0013] The technical solution of the present invention has the following advantages:
[0014] 1. The present invention provides a material automatic labeling method, comprising the steps of: constructing a dictionary library and a picture library for matching; obtaining a material provided by a user; reading first description information of the material, matching the first description information with the dictionary library, and judging whether the matching is successful; if the dictionary library of the first description information matches successfully, obtaining label information corresponding to the first description information and assigning it to the material, wherein the first description information includes the file name, attributes and / or the folder name of the material; if the dictionary library of the first description information matches unsuccessfully, reading text information in the material by an optical character recognition method, matching the text information with the dictionary library, and judging whether the matching is successful; if the dictionary library of the text information matches successfully, obtaining the label information corresponding to the text information and assigning it to the material; if the dictionary library of the text information matches unsuccessfully, matching the material with the picture library to obtain second description information of the material, wherein the second description information is text matched in the picture library, matching the second description information with the dictionary library, and judging whether the matching is successful; if the dictionary library of the second description information matches successfully, obtaining the label information corresponding to the second description information and assigning it to the material.
[0015] The above-mentioned automatic labeling method of serial combination reduces the workload and work pressure of labeling, and improves the labeling efficiency. Specifically, by constructing a dictionary library for matching, the demand for automatic labeling is met, and the workload of pure manual labeling is reduced; by reading the text information in the material through the optical character recognition method, and matching the text information with the dictionary library, the folder information that needs to be processed can be reduced, the folder names are reduced, and the work pressure of writing rules for labeling by folder names is reduced; by constructing a picture library for matching, the material picture itself can be matched instead of doing classification tasks, and there is no need to train machine labeling on a large number of pictures. Therefore, the above-mentioned automatic labeling method can meet the demand for automatic labeling of materials in the marketing field of fast-moving consumer goods.
[0016] 2. Further, the method for constructing a gallery for matching includes: obtaining fourth description information and product images of a number of products, wherein the fourth description information includes the name of the product and / or the attributes of the product, and the fourth description information includes the trigger word; extracting the feature vector of the product image; storing the index number of the product and the fourth description information in a mongodb database, storing the index number of the product and the feature vector of the product image in a milvus database, thereby obtaining the gallery. The method for performing gallery matching includes: extracting the feature vector of the material, retrieving the feature vector of the product image that is closest to the feature vector of the material in the milvus database, obtaining the index number of the product corresponding to the feature vector of the retrieved image, obtaining the corresponding fourth description information in the mongodb database according to the index number of the product, and the fourth description information obtained is the second description information matched by the material.
[0017] By obtaining the fourth description information and product images of the products, and ensuring that the fourth description information of all products in the gallery contains the corresponding trigger words in the dictionary library, the gallery matching is used as the bottom-up step of the entire labeling method, avoiding the use of massive training data for classification tasks, thereby better meeting the needs of automatic labeling of materials in the marketing field of fast-moving consumer goods.
[0018] 3. Furthermore, the method for extracting the feature vector of the product image or the material includes: extracting the feature vector of the product image or the material using an image pre-training model. By using the image pre-training model to train the open source product data set, the accuracy of image feature vector extraction is established, and the model's ability to recognize the same product under different shooting conditions (such as the main and secondary images of the product, the arrangement and combination of different elements, and different shooting angles) is improved, thereby better meeting the needs of automatic labeling of materials in the marketing field of fast-moving consumer goods. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0020] Figure 1 A flowchart of a material automatic marking method provided in one embodiment of the present invention;
[0021] Figure 2A schematic diagram of a training process of an image pre-training model provided in one embodiment of the present invention;
[0022] Figure 3 A schematic diagram of an image pre-training model reasoning process provided in one embodiment of the present invention;
[0023] Figure 4 A module block diagram of an automatic material marking device provided in one embodiment of the present invention. DETAILED DESCRIPTION
[0024] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0025] In addition, the technical features involved in the different embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0026] An embodiment of the present invention provides a material automatic marking method, referring to Figure 1 , Figure 1 This is a flow chart of a material automatic marking method provided in one embodiment of the present invention. It should be understood that the method may also include additional blocks not shown and / or may omit the blocks shown, and the scope of the present invention is not limited in this respect. It includes the following steps:
[0027] At step 101 , a dictionary library and a picture library for matching are constructed.
[0028] Specifically, based on the data provided by the user, a dictionary library and a picture library are constructed for matching. The dictionary library and the picture library are offline modules, which are constructed manually, and user data can be supplemented regularly to improve the dictionary library and the picture library.
[0029] In some embodiments, a method for constructing a dictionary library for matching includes: obtaining third description information of a number of commodities, creating the label information based on the third description information, the label information including a number of first-level labels and a number of second-level labels corresponding to the first-level labels, the third description information including the name of the commodity and / or the attributes of the commodity; respectively determining the label information of the several commodities; extracting trigger words from the third description information, and respectively configuring the trigger words to the corresponding label information, thereby obtaining the dictionary library.
[0030] Specifically, a large amount of unlabeled data is obtained from the user, which includes a large amount of information such as the name and / or attributes corresponding to the commodity, namely the third description information. Through communication with the user, the metadata field that the user expects to use for labeling is determined and created as the label information, and is divided into a primary label and a secondary label classified under the primary label. For example, "Creative Home" is determined as a primary label, and "Floor Mat", "Doll", "Fitness", "Festival Gift", "Cushion", "Travel Goods" and "Fragrance" are determined as secondary labels classified under "Creative Home". More subordinate labels can also be set under the secondary label. Then, according to the third description information of different commodities, the label information of different commodities is determined respectively, and the trigger words are extracted from the third description information of different commodities. The trigger words are recognizable and representative words. For example, the name of a certain commodity is MINISO, and the attribute is a plush doll home fun holiday blind bag. The label information determined therefrom is the primary label "Creative Home" and the secondary label "Doll", and the trigger word extracted therefrom is "Plush Doll". After that, the trigger word is configured to the label information. Finally, a dictionary library containing a large number of trigger words and label information corresponding to each trigger word is obtained.
[0031] In some embodiments, the method for constructing a gallery for matching includes: obtaining fourth description information and product images of a number of products, the fourth description information including the name of the product and / or the attributes of the product, and the fourth description information including the trigger word; extracting a feature vector of the product image; storing the index number of the product and the fourth description information in a mongodb database, and storing the index number of the product and the feature vector of the product image in a milvus database, thereby obtaining the gallery.
[0032] Specifically, the fourth description information is substantially consistent with the third description information, and therefore, the fourth description information includes the trigger word. In some embodiments, the method of extracting the feature vector of the product image includes: extracting the feature vector of the product image using an image pre-training model.
[0033] refer to Figure 2In the process of training the image pre-training model, an open source data set in the e-commerce field is obtained. The data set contains different types of product images, as well as promotional images of the same product in different dimensions. For example, for the same facial cleanser, we can see from the display interface of Taobao and JD that merchants will place multiple display images for the same product. For the open source data set, after data enhancement, it is input into the multi-layer convolutional network layer and then converted into an image feature vector through the linear layer. The image feature vector enters the loss module for calculation. For different products, the cross entropy loss calculation formula is used to obtain loss 1. For different display images of the same product, the triplet loss is used to calculate loss 2. The final loss is the superposition of loss 1 and loss 2. Through back propagation and loss optimization, an optimized image pre-training model is obtained.
[0034] The cross entropy loss calculation formula is:
[0035] Where M represents the number of categories, y ic represents the sign function. The true category of sample i is 1 if it belongs to c, otherwise it is 0. ic It represents the predicted probability that the observed sample i belongs to category c.
[0036] Triplet loss calculation formula: loss2 = max(d(a, p)-d(a, n)+margin, 0)
[0037] a: anchor, indicating the anchor point; p: positive, a sample of the same category as a; n: negative, a sample of a different category; margin is a constant greater than 0. The ultimate optimization goal is to shorten the distance between a and p and increase the distance between a and n. d(a, p) indicates the distance between a and p, and d(a, n) indicates the distance between a and n.
[0038] refer to Figure 3 In the image pre-training model inference process, the optimized image pre-training model is adopted, and only the feature vector extraction module is used to extract feature vectors for all product images in the internal gallery. Through this image model inference process, feature vectors are extracted from massive product image data to build a gallery.
[0039] At step 102, the material provided by the user is obtained.
[0040] Specifically, the material is a picture material, and the material may include a file name and attribute information. A plurality of materials may be provided together in a folder.
[0041] In step 103, first description information of the material is read, where the first description information includes the file name, attributes of the material and / or the name of the folder where the material is located.
[0042] At step 104, the first description information is matched with a dictionary to determine whether the match is successful. If the match is successful, step 105 is executed to obtain the tag information corresponding to the first description information and assign it to the material. Specifically, assigning the tag information to the material means returning the tag information output by the dictionary as a result to the requester, completing the tagging of the material, and the tagging result can be displayed on the front-end computer page.
[0043] In some embodiments, the method for performing dictionary matching includes: matching the first description information with the trigger words in the dictionary through an AC automaton algorithm, and acquiring the tag information corresponding to the matched trigger words.
[0044] If the dictionary library of the first description information fails to match, step 106 is executed to read the text information in the material by an optical character recognition method.
[0045] Specifically, if the dictionary library matching does not output a matching result, it means that the match is not successful. The possible reason is that the material does not have a valid file name, attribute or folder name information, that is, this information may be some garbled information or does not contain information about the material itself. At this time, the next step of execution is started.
[0046] At step 107, the text information is matched with a dictionary to determine whether the match is successful. The matching method is referred to in the above embodiment. If the match is successful, step 108 is executed to obtain the tag information corresponding to the text information and assign it to the material. The dictionary matching method is referred to in the above embodiment and will not be repeated here.
[0047] If the dictionary library matching of the text information fails, step 109 is executed to perform a library matching on the material to obtain second description information of the material, where the second description information is the text matched in the library. Specifically, if the dictionary library matching of the text information fails, it may be because the user uploaded a pure picture without any text information.
[0048] In some embodiments, the method for performing gallery matching includes: extracting the feature vector of the material, searching the milvus database for the feature vector of the product image that is closest to the feature vector of the material, obtaining the index number of the product corresponding to the retrieved feature vector of the image, and obtaining the corresponding fourth description information in the mongodb database based on the index number of the product, wherein the fourth description information obtained is the second description information matched by the material.
[0049] Specifically, an optimized image pre-training model is adopted, and only the feature extraction module is used to extract feature vectors for an uploaded material. Then, a close material vector is retrieved in the milvus database, and the index number of the product corresponding to the material is returned. Then, the fourth description information corresponding to the index number is searched in the mongodb database, that is, the name and / or attribute information of the product corresponding to the material.
[0050] By using an image pre-training model to train an open source product dataset, the accuracy of image feature vector extraction is established, and the model's ability to recognize the same product under different shooting conditions (such as the main and secondary images of the product, the arrangement and combination of different elements, and different shooting angles) is improved, thereby better meeting the needs of automatic labeling of materials in the marketing field of fast-moving consumer goods.
[0051] Execute step 110, match the second description information with a dictionary library, and determine whether the match is successful. If the dictionary library of the second description information is successfully matched, execute step 111 to obtain the tag information corresponding to the second description information and assign it to the material. The dictionary library matching method refers to the above embodiment and will not be repeated here.
[0052] By obtaining the fourth description information and product images of the products, and ensuring that the fourth description information of all products in the gallery contains the corresponding trigger words in the dictionary library, the gallery matching is used as the bottom-up step of the entire labeling method, avoiding the use of massive training data for classification tasks, thereby better meeting the needs of automatic labeling of materials in the marketing field of fast-moving consumer goods.
[0053] If the dictionary library of the second description information fails to match, step 112 is executed to clear the tag information of the material, and finally send it to manual review.
[0054] The above-mentioned automatic labeling method of serial combination reduces the workload and work pressure of labeling, and improves the labeling efficiency. Specifically, by constructing a dictionary library for matching, the demand for automatic labeling is met, and the workload of pure manual labeling is reduced; by reading the text information in the material through the optical character recognition method, and matching the text information with the dictionary library, the folder information that needs to be processed can be reduced, the folder names are reduced, and the work pressure of writing rules for labeling by folder names is reduced; by constructing a picture library for matching, the material picture itself can be matched instead of doing classification tasks, and there is no need to train machine labeling on a large number of pictures. Therefore, the above-mentioned automatic labeling method can meet the demand for automatic labeling of materials in the marketing field of fast-moving consumer goods.
[0055] Figure 4 This is a block diagram of a material automatic marking device provided in one embodiment of the present invention. The device includes:
[0056] A memory 201; and a processor 202 connected to the memory 201, the processor 202 being configured to: construct a dictionary library and a picture library for matching; obtain a material provided by a user; read first description information of the material, match the first description information with the dictionary library, and determine whether the match is successful; if the dictionary library of the first description information matches successfully, obtain label information corresponding to the first description information and assign it to the material, the first description information including the file name, attributes and / or the folder name of the material; if the dictionary library of the first description information matches unsuccessfully, read text information in the material by an optical character recognition method, match the text information with the dictionary library, and determine whether the match is successful; if the dictionary library of the text information matches successfully, obtain the label information corresponding to the text information and assign it to the material; if the dictionary library of the text information matches unsuccessfully, match the material with the picture library to obtain second description information of the material, the second description information is the text matched in the picture library, match the second description information with the dictionary library, and determine whether the match is successful; if the dictionary library of the second description information matches successfully, obtain the label information corresponding to the second description information and assign it to the material.
[0057] In some embodiments, the processor 202 is further configured to: if the dictionary library of the second description information fails to match, then clear the tag information of the material.
[0058] In some embodiments, the processor 202 is further configured to: obtain third description information of several commodities, create the label information based on the third description information, the label information includes several first-level labels and several second-level labels corresponding to the first-level labels, and the third description information includes the name of the commodity and / or the attributes of the commodity; respectively determine the label information of several commodities; extract trigger words from the third description information, and respectively configure the trigger words to the corresponding label information, thereby obtaining the dictionary library.
[0059] In some embodiments, the processor 202 is further configured to: obtain fourth description information and product images of a number of products, the fourth description information including the name of the product and / or the attributes of the product, and the fourth description information including the trigger word; extract the feature vector of the product image; store the index number of the product and the fourth description information into a mongodb database, and store the index number of the product and the feature vector of the product image into a milvus database, thereby obtaining the gallery.
[0060] In some embodiments, the processor 202 is further configured to: match the first description information, text information or second description information with the trigger word in the dictionary library through an AC automaton algorithm, and obtain the tag information corresponding to the matched trigger word.
[0061] In some embodiments, the processor 202 is further configured to: extract the feature vector of the material, retrieve the feature vector of the product image that is closest to the feature vector of the material in the milvus database, obtain the index number of the product corresponding to the retrieved feature vector of the image, and obtain the corresponding fourth description information in the mongodb database based on the index number of the product, and the fourth description information obtained is the second description information matched by the material.
[0062] In some embodiments, the processor 202 is further configured to: extract a feature vector of the product image or the material using an image pre-training model.
[0063] The specific implementation method is referred to the aforementioned method embodiment and will not be described in detail here.
[0064] The present invention may be a method, an apparatus, a system and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for executing various aspects of the present invention.
[0065] A computer-readable storage medium may be a tangible device that can hold and store instructions used by an instruction execution device. A computer-readable storage medium may be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples of computer-readable storage media (a non-exhaustive list) include: 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), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, such as a punch card or a raised structure in a groove on which instructions are stored, and any suitable combination of the foregoing. As used herein, a computer-readable storage medium is not to be interpreted as a transient signal per se, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagating through a waveguide or other transmission medium (e.g., a light pulse through a fiber optic cable), or an electrical signal transmitted through a wire.
[0066] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0067] The computer program instructions for performing the operation of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages, such as Smalltalk, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. Computer-readable program instructions may be executed entirely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present invention.
[0068] Various aspects of the present invention are described herein with reference to the flow charts and / or block diagrams of the methods, devices (systems) and computer program products according to embodiments of the present invention. It should be understood that each box of the flow chart and / or block diagram and the combination of each box in the flow chart and / or block diagram can be implemented by computer-readable program instructions.
[0069] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processing unit of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0070] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0071] The flow chart and block diagram in the accompanying drawings show the possible architecture, function and operation of the system, method and computer program product according to multiple embodiments of the present invention. In this regard, each square box in the flow chart or block diagram can represent a part of a module, program segment or instruction, and a part of the module, program segment or instruction includes one or more executable instructions for realizing the specified logical function. In some alternative implementations, the function marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two continuous square boxes can actually be executed substantially in parallel, and they can sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs the specified function or action, or can be implemented with a combination of special hardware and computer instructions.
[0072] Note that, unless otherwise directly stated, all features disclosed in this specification (including any attached claims, abstracts and drawings) may be replaced by alternative features for achieving the same, equivalent or similar purposes. Therefore, unless otherwise explicitly stated, each feature disclosed is only an example of a group of equivalent or similar features. Where used, further, preferably, further and more preferably are simple beginnings for elaborating another embodiment based on the aforementioned embodiment, and the content of the further, preferably, further or more preferably followed by the combination with the aforementioned embodiment constitutes a complete construction of another embodiment. Several further, preferably, further or more preferably settings following the same embodiment can be arbitrarily combined to form another embodiment.
[0073] It should be understood by those skilled in the art that the embodiments of the present invention described above and shown in the accompanying drawings are only examples and do not limit the present invention. The purpose of the present invention has been fully and effectively achieved. The functional and structural principles of the present invention have been demonstrated and explained in the embodiments, and the embodiments of the present invention may be deformed or modified in any way without departing from the principles.
Claims
1. A material automatic marking method, characterized in that: The steps include: Build dictionary and image library for matching; Methods for building a dictionary library for matching include: Acquire third description information of a plurality of commodities, and create tag information based on the third description information, wherein the tag information includes a plurality of primary tags and a plurality of secondary tags corresponding to the primary tags, and the third description information includes the name of the commodity and / or the attribute of the commodity; respectively determining the label information of a plurality of the commodities; Extracting trigger words from the third description information, and assigning the trigger words to the corresponding tag information, thereby obtaining the dictionary library; Methods for building a matching gallery include: Acquire fourth description information and product images of a plurality of products, wherein the fourth description information includes the name of the product and / or the attribute of the product, and the fourth description information includes the trigger word; Extracting a feature vector of the product image; The index number of the commodity and the fourth description information are stored in a mongodb database, and the index number of the commodity and the feature vector of the commodity image are stored in a milvus database, thereby obtaining the image library; Get materials provided by users; Reading first description information of the material, performing dictionary matching on the first description information, and determining whether the matching is successful; if the dictionary matching of the first description information is successful, obtaining tag information corresponding to the first description information and assigning it to the material, wherein the first description information includes the file name, attributes and / or the name of the folder where the material is located; If the dictionary library match of the first description information fails, then read the text information in the material by an optical character recognition method, match the text information with the dictionary library, and determine whether the match is successful; if the dictionary library match of the text information succeeds, then obtain the label information corresponding to the text information and assign it to the material; If the dictionary library match of the text information is unsuccessful, the material is matched with the picture library to obtain the second description information of the material. The second description information is the text matched in the picture library. The second description information is matched with the dictionary library to determine whether the match is successful. If the dictionary library match of the second description information is successful, the label information corresponding to the second description information is obtained and assigned to the material.
2. The material automatic marking method according to claim 1, characterized in that: After matching the second description information with a dictionary and determining whether the match is successful, the following steps are further included: If the dictionary library of the second description information fails to match, the tag information of the material is cleared.
3. The material automatic marking method according to claim 1, characterized in that: The method for performing dictionary matching includes: matching the first description information, text information or second description information with the trigger word in the dictionary through an AC automaton algorithm, and acquiring the label information corresponding to the matched trigger word.
4. The material automatic marking method according to claim 3, characterized in that: The method for performing gallery matching includes: extracting a feature vector of the material, searching the milvus database for a feature vector of the product image that is closest to the feature vector of the material, obtaining an index number of the product corresponding to the retrieved feature vector of the image, and obtaining the corresponding fourth description information in the mongodb database according to the index number of the product, wherein the fourth description information obtained is the second description information matched by the material.
5. The material automatic marking method according to claim 4, characterized in that: The method for extracting the feature vector of the product image or the material includes: extracting the feature vector of the product image or the material using an image pre-training model.
6. A material automatic marking device, characterized in that: include: Memory; as well as a processor connected to the memory, the processor being configured to: Build dictionary and image library for matching; The dictionary library built for matching includes: Acquire third description information of a plurality of commodities, and create tag information based on the third description information, wherein the tag information includes a plurality of primary tags and a plurality of secondary tags corresponding to the primary tags, and the third description information includes the name of the commodity and / or the attribute of the commodity; respectively determining the label information of a plurality of the commodities; Extracting trigger words from the third description information, and assigning the trigger words to the corresponding tag information, thereby obtaining the dictionary library; The library built for matching includes: Acquire fourth description information and product images of a plurality of products, wherein the fourth description information includes the name of the product and / or the attribute of the product, and the fourth description information includes the trigger word; Extracting a feature vector of the product image; The index number of the commodity and the fourth description information are stored in a mongodb database, and the index number of the commodity and the feature vector of the commodity image are stored in a milvus database, thereby obtaining the image library; Get materials provided by users; Reading first description information of the material, performing dictionary matching on the first description information, and determining whether the matching is successful; if the dictionary matching of the first description information is successful, obtaining tag information corresponding to the first description information and assigning it to the material, wherein the first description information includes the file name, attributes and / or the name of the folder where the material is located; If the dictionary library match of the first description information fails, then read the text information in the material by an optical character recognition method, match the text information with the dictionary library, and determine whether the match is successful; if the dictionary library match of the text information succeeds, then obtain the label information corresponding to the text information and assign it to the material; If the dictionary library match of the text information is unsuccessful, the material is matched with the picture library to obtain the second description information of the material. The second description information is the text matched in the picture library. The second description information is matched with the dictionary library to determine whether the match is successful. If the dictionary library match of the second description information is successful, the label information corresponding to the second description information is obtained and assigned to the material.
7. A computer storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a machine, the steps of the method according to any one of claims 1 to 5 are implemented.
