Product labeling methods, devices, equipment, and media

By using a multilingual encoder and classifier for a text classification model, the problems of high training cost and semantic bias in multilingual models in cross-border e-commerce are solved, and efficient and accurate product label mapping is achieved.

CN115563280BActive Publication Date: 2026-03-13BUSINESS LINE COMMERCIAL PTE LTD
View PDF 3 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the context of cross-border e-commerce, existing multilingual models suffer from high training sample costs and semantic bias when mapping product labels, and cannot accurately represent the features of different languages.

Method used

A multilingual encoder using a text classification model extracts deep semantic information from text information and performs classification mapping through a classifier. The multilingual encoder and classifier are trained to adapt to the representation of text information in different language versions as encoded feature vectors in the same semantic space. Parallel corpora are used for supervised training, reducing the cost of manual annotation and improving training efficiency.

Benefits of technology

It achieves a unified understanding of textual information described in multiple languages, reduces the difficulty and cost of training samples, improves the efficiency of classification tasks, and ensures the accuracy and consistency of product labels.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115563280B_ABST
    Figure CN115563280B_ABST
Patent Text Reader

Abstract

This application relates to a product labeling method, apparatus, device, and medium in the field of computer technology. The method includes: acquiring text information of a target product, the text information including product description information; extracting deep semantic information of the text information using a multilingual encoder of a text classification model to obtain corresponding encoded feature vectors, wherein the multilingual encoder is adapted to represent text information describing the same meaning in different languages ​​as encoded feature vectors in the same semantic space; and using a classifier of the text classification model to perform classification mapping based on the encoded feature vectors to obtain corresponding product labels. The text classification model implemented in this application requires simple preparation of training samples, does not require a large amount of manual labeling cost, is highly efficient in training, and can ensure the accuracy of the text classification model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of e-commerce technology, and in particular to a product labeling method and the corresponding apparatus, computer equipment, and computer-readable storage medium. Background Technology

[0002] In e-commerce platform applications, tagging products based on their textual information is a frequent occurrence. For example, for products listed on a merchant's platform, on the one hand, various category attributes need to be identified based on the corresponding textual information of the products, and then corresponding product tags are used to label the product objects to facilitate product search, recommendation, and sorting.

[0003] In the cross-border e-commerce environment, the textual information of goods often involves descriptions in multiple languages. Therefore, existing technologies such as multi-lingualbert, which implement multilingual models, map the corresponding product tags based on the semantics of the textual information of goods. On the one hand, the training samples required for this model are textual information described in multiple languages, and each textual information needs to be labeled with its corresponding product tag, so the cost of preparing training samples is very high. On the other hand, although it can perform corresponding feature representations on textual information described in multiple languages, it lacks alignment training of the corresponding feature representation space for textual information describing the same meaning in multiple languages. It cannot well represent the features of different languages ​​in the same feature space, resulting in semantic bias and failing to accurately map product tags.

[0004] In view of this, the applicant has long been engaged in research in related fields, and has therefore taken a different approach to solve the industry problems in the e-commerce sector. Summary of the Invention

[0005] The primary objective of this application is to solve at least one of the aforementioned problems by providing a product labeling method and corresponding apparatus, computer equipment, and computer-readable storage medium.

[0006] To achieve the various objectives of this application, the following technical solution is adopted:

[0007] A product labeling method provided for one of the purposes of this application includes the following steps:

[0008] Obtain text information about the target product, including product description information;

[0009] A multilingual encoder using a text classification model extracts deep semantic information from the text information to obtain corresponding encoded feature vectors. The multilingual encoder is suitable for representing text information that describes the same meaning in different languages ​​as encoded feature vectors in the same semantic space.

[0010] The classifier using the text classification model performs classification mapping based on the encoded feature vector to obtain the corresponding product labels.

[0011] In a further embodiment, before extracting the deep semantic information of the text information using a multilingual encoder employing a text classification model, the following steps are also included:

[0012] The multilingual encoder is trained to convergence by using sentence pairs composed of text information described in the first language version and the second language version, so that it is suitable for representing the text information described in the first language version or the second language version as encoded feature vectors belonging to the same semantic space.

[0013] The text classification model is constructed by connecting the multilingual encoder to a classifier. The text classification model is trained to convergence using training samples and supervision labels corresponding to the preset classification task, so that it is suitable for determining the category information corresponding to the text information described in the first language version or the second language version.

[0014] In a further embodiment, before training the multilingual encoder to a convergent state using sentence pairs constructed from text information described in the first language version and the second language version, the following steps are also included:

[0015] Obtain a dataset containing text information described in a first language version and its corresponding supervisory labels, wherein the supervisory labels contain pre-labeled category information of the text information;

[0016] The translated text of the first language version description is obtained as the corresponding second language version. The text information of the first language version and the second language version, as well as the supervision label representing whether the descriptions of the two text information are the same, are used to form a mapping relationship data in the training set.

[0017] The sentence pairs required for training the multilingual encoder are constructed by identifying different language versions of the same text information from the training set.

[0018] Text information in any language version and its corresponding supervisory label are determined from the training set and used as training samples and supervisory labels for training the text classification model, respectively.

[0019] In a further embodiment, the multilingual encoder is trained to a convergent state by using text information described in a first language version and a second language version to form sentence pairs, making it suitable for representing text information described in the first language version or the second language version as encoded feature vectors belonging to the same semantic space, including the following steps:

[0020] Two different language versions of the same text information are used to form sentence pairs as positive samples, and one different language version of two different text information are used to form sentence pairs as negative samples. The positive and negative samples are labeled with different supervision labels.

[0021] A single positive sample or negative sample is used as the first training sample and input into the multilingual encoder to extract the deep semantic information corresponding to the two text information to obtain the encoding feature vector corresponding to the two text information.

[0022] The similarity between the two text information in the first training sample is calculated based on the corresponding encoded feature vectors of the two text information.

[0023] Using the supervision label corresponding to the first training sample, the loss value of the similarity is determined. When the loss value does not reach the preset threshold, the weights of the multilingual encoder are updated, and other first training samples are called to iteratively train the multilingual encoder until convergence.

[0024] In a further embodiment, the text classification model is constructed by connecting the multilingual encoder to a classifier. The text classification model is trained to a convergent state using training samples and supervision labels corresponding to a preset classification task, making it suitable for determining the category information corresponding to text information described in a first language version or a second language version. This includes the following steps:

[0025] Text information in any language version and its pre-annotated supervision labels are obtained and used as the second training sample and its supervision label, respectively.

[0026] A multilingual encoder using a text classification model extracts deep semantic information from the second training sample to obtain the corresponding encoded feature vector;

[0027] The classifier of the text classification model performs classification mapping based on the encoded feature vector to obtain the corresponding product label; the supervision label of the second training sample is used to determine the loss value of the product label; when the loss value does not reach the preset threshold, the weight of the text classification model is updated, and other second training samples are called to iteratively train the text classification model until convergence.

[0028] In a further embodiment, when the loss value does not reach a preset threshold, the text classification model is updated with weights, and iterative training continues using other second training samples until the model converges, including:

[0029] During the weight update process of the text classification model, the weights of the multilingual encoder of the text classification model are fixed, and the weight update is performed only on the classifier.

[0030] In a further embodiment, the product label belongs to a member of a preset product category label set in an e-commerce application scenario, or belongs to a member of an information security type label set.

[0031] On the other hand, a product labeling device provided to meet one of the purposes of this application includes an information acquisition module, a text encoding module, and a text classification module. The information acquisition module is used to acquire text information of a target product, including product description information. The text encoding module is used to extract deep semantic information of the text information using a multilingual encoder based on a text classification model to obtain corresponding encoded feature vectors. The multilingual encoder is adapted to represent text information describing the same meaning in different languages ​​as encoded feature vectors in the same semantic space. The text classification module is used to perform classification mapping based on the encoded feature vectors using a classifier of the text classification model to obtain corresponding product labels.

[0032] In a further embodiment, before the information acquisition module, the system further includes: an encoder training module, used to train the multilingual encoder to a convergent state using sentence pairs formed by text information described in a first language version and a second language version, so that it is suitable for representing the text information described in the first language version or the second language version as encoded feature vectors belonging to the same semantic space; and a classifier training module, used to connect the multilingual encoder to a classifier to form the text classification model, and train the text classification model to a convergent state using training samples and supervision labels corresponding to a preset classification task, so that it is suitable for determining the category information corresponding to the text information described in the first language version or the second language version.

[0033] In a further embodiment, before the encoder training module, the system further includes: a dataset acquisition module, used to acquire a dataset containing text information described in a first language version and its corresponding supervision labels, wherein the supervision labels contain pre-annotated category information of the text information; a training set construction module, used to acquire translated text of the text information described in the first language version as the corresponding second language version, and store the text information of the first language version and the second language version and the supervision labels representing whether the descriptions of the two text information are the same as the first language version and the second language version as a mapping relationship data in the training set; a first training sample construction module, used to determine different language versions of the same text information from the training set to construct sentence pairs required for training the multilingual encoder; and a second training sample construction module, used to determine text information of any language version and the corresponding supervision labels from the training set as training samples and supervision labels required for training the text classification model.

[0034] In a further embodiment, the encoder training module includes: a first sample acquisition submodule, used to acquire two different language versions of the same text information as a sentence pair as a positive sample, acquire one different language version of each of two different text information as a negative sample, and label the positive and negative samples with corresponding different supervision labels; a first text encoding submodule, used to input a single positive sample or the negative sample as a first training sample into the multilingual encoder, extract the deep semantic information corresponding to the two text information, and obtain the encoding feature vectors corresponding to the two text information; a similarity calculation submodule, used to calculate the similarity between the two text information in the first training sample based on the encoding feature vectors corresponding to the two text information; and a first iterative training submodule, used to determine the loss value of the similarity using the supervision label corresponding to the first training sample, and when the loss value does not reach a preset threshold, to perform weight updates on the multilingual encoder and continue to call other first training samples to perform iterative training on the multilingual encoder until convergence.

[0035] In a further embodiment, the classifier training module includes: a second sample acquisition submodule, used to acquire text information in any language version and its pre-annotated supervision labels as second training samples and their supervision labels respectively; a second text encoding submodule, used to extract deep semantic information of the second training samples using a multilingual encoder of the text classification model to obtain corresponding encoded feature vectors; a text classification submodule, used to perform classification mapping based on the encoded feature vectors using the classifier of the text classification model to obtain corresponding product labels; and a second iterative training submodule, used to determine the loss value of the product labels using the supervision labels of the second training samples, and when the loss value does not reach a preset threshold, to update the weights of the text classification model and continue to call other second training samples to iteratively train the text classification model until convergence.

[0036] In a further embodiment, the second iterative training submodule includes: a weight fixation unit, used to fix the weights of the multilingual encoder of the text classification model during the weight update process of the text classification model, and only perform weight updates on the classifier.

[0037] In another aspect, a computer device provided for one of the purposes of this application includes a central processing unit and a memory, the central processing unit being used to invoke and run a computer program stored in the memory to perform the steps of the product labeling method described in this application.

[0038] In another aspect, a computer-readable storage medium is provided to suit another purpose of this application, which stores in the form of computer-readable instructions a computer program implemented according to the product labeling method, which, when invoked by a computer, performs the steps included in the method.

[0039] The technical solution of this application has many advantages, including but not limited to the following aspects:

[0040] This application employs a multilingual encoder with a text classification model to represent the textual information of a target product, obtaining a corresponding encoded feature vector. A classifier then maps this encoded feature vector to obtain the corresponding product label. On one hand, because the multilingual encoder possesses a unified understanding of the textual information of products described in multiple languages, it ensures the model's ability to classify the textual information of products described in multiple languages, accurately classifying the product label.

[0041] On the other hand, the multilingual encoder can be trained to acquire the unified understanding of textual information describing products in multiple languages. Specifically, by acquiring textual information describing a product in only one language and translating it into corresponding textual information describing it in multiple languages, a sufficient amount of parallel corpus involving multilingual descriptions can be obtained. Then, using parallel corpus describing the same meaning—that is, textual information describing the same meaning in two different languages—sentence pairs are formed. Supervision labels representing the two textual information describing the same meaning are used to label these sentence pairs. Training is then performed using these sentence pairs and their supervision labels. After the multilingual encoder converges, it can acquire the aforementioned ability. Therefore, this method significantly reduces the difficulty of preparing training samples involving multilingual descriptions, simplifies labeling, eliminates the need for manual labeling costs, and is highly efficient, effectively encoding textual information describing multiple languages.

[0042] Furthermore, the multilingual encoder is followed by a classifier to form the text classification model of this application. Since the multilingual encoder can encode multiple languages, the semantic space represented by the encoded feature vectors output by the corresponding encodings of multiple languages ​​describing the same meaning is the same. Therefore, it is not necessary to use text information described in multiple languages ​​for multiple training sessions for the classification task. Only one training session is needed, using text information described in any one language and labeling it with the corresponding product tag as a supervision tag. This allows the text classification model to learn the ability to classify text information described in multiple languages ​​into the corresponding product tags, greatly improving the training efficiency of the classification task. Attached Figure Description

[0043] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:

[0044] Figure 1 This is a flowchart illustrating a typical embodiment of the product labeling method of this application;

[0045] Figure 2 This is a schematic diagram illustrating the structure and training process of the text classification model in the embodiments of this application;

[0046] Figure 3 This is a schematic diagram illustrating the process of preparing training samples corresponding to the multilingual encoder and text classification model in the embodiments of this application;

[0047] Figure 4 This is a schematic diagram of the training process of the multilingual encoder in the embodiments of this application;

[0048] Figure 5 This is a schematic diagram illustrating the training process of the text classification model in an embodiment of this application;

[0049] Figure 6 This is a schematic block diagram of the product label marking device of this application;

[0050] Figure 7 This is a schematic diagram of the structure of a computer device used in this application. Detailed Implementation

[0051] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain this application, and should not be construed as limiting this application.

[0052] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms “a,” “an,” “the,” and “the” used herein may also include the plural forms. It should be further understood that the term “comprising” as used in this application means the presence of the stated features, integers, steps, operations, elements, and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. It should be understood that when we say an element is “connected” or “coupled” to another element, it can be directly connected or coupled to the other element, or there may be intermediate elements. Furthermore, “connected” or “coupled” as used herein can include wireless connections or wireless coupling. The term “and / or” as used herein includes all or any units and all combinations of one or more associated listed items.

[0053] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.

[0054] Those skilled in the art will understand that the terms "client," "terminal," and "terminal device" as used herein include both devices that receive wireless signals, devices that only possess wireless signal receiver capabilities without transmission capabilities, and devices with receiving and transmitting hardware, devices that have receiving and transmitting hardware capable of bidirectional communication over a bidirectional communication link. Such devices may include: cellular or other communication devices such as personal computers or tablets, having single-line displays, multi-line displays, or cellular or other communication devices without multi-line displays; PCS (Personal Communications Service) that can combine voice, data processing, fax, and / or data communication capabilities; PDA (Personal Digital Assistant) that may include a radio frequency receiver, pager, internet / intranet access, web browser, notepad, calendar, and / or GPS (Global Positioning System) receiver; and conventional laptops and / or handheld computers or other devices that have and / or include radio frequency receivers. As used herein, "client," "terminal," and "terminal device" can be portable, transportable, installed in a means of transportation (air, sea, and / or land), or suitable and / or configured to operate locally and / or in a distributed manner, operating in any other location on Earth and / or in space. "Client," "terminal," and "terminal device" as used herein can also be a communication terminal, an internet access terminal, or a music / video playback terminal, such as a PDA, a MID (Mobile Internet Device), and / or a mobile phone with music / video playback capabilities, or a smart TV, set-top box, etc.

[0055] The hardware referred to by the names "server," "client," and "service node" in this application is essentially an electronic device with the equivalent capabilities of a personal computer. It is a hardware device with the necessary components revealed by the von Neumann architecture, such as a central processing unit (including an arithmetic logic unit and a control unit), memory, input devices, and output devices. The computer program is stored in its memory, and the central processing unit loads the program stored in the secondary storage into the main memory to run it, execute the instructions in the program, and interact with the input and output devices to complete specific functions.

[0056] It should be noted that the concept of "server" used in this application can also be extended to the case of server clusters. Based on the network deployment principles understood by those skilled in the art, the servers should be logically divided. Physically, these servers can be independent of each other but accessible through interfaces, or they can be integrated into a single physical computer or a computer cluster. Those skilled in the art should understand this flexibility and should not use it to constrain the implementation of the network deployment method in this application.

[0057] One or more of the technical features of this application, unless explicitly specified herein, can be deployed on a server and accessed by a client remotely calling the online service interface provided by the server, or can be directly deployed and run on a client for access.

[0058] Unless otherwise specified, the neural network models referenced or potentially referenced in this application may be deployed on a remote server and invoked remotely on the client, or deployed on a client with the capability to invoke directly. In some embodiments, when running on the client, the corresponding intelligence may be acquired through transfer learning in order to reduce the requirements on the client's hardware resources and avoid excessive consumption of the client's hardware resources.

[0059] Unless otherwise specified, all data involved in this application may be stored remotely on a server or on a local terminal device, as long as it is suitable for use by the technical solution of this application.

[0060] Those skilled in the art will understand that although the various methods in this application are described based on the same concept and thus present commonality among them, they can be performed independently unless otherwise specified. Similarly, the various embodiments disclosed in this application are all based on the same inventive concept; therefore, concepts expressed in the same way, as well as concepts that are appropriately changed for convenience but are expressed differently, should be understood equivalently.

[0061] Unless otherwise expressly stated, the various embodiments disclosed in this application can be combined in a cross-cutting manner to flexibly construct new embodiments, as long as such combination does not depart from the inventive spirit of this application and can meet the needs of the prior art or solve a certain deficiency in the prior art. Those skilled in the art should be aware of such modifications.

[0062] The product labeling method of this application can be programmed into a computer program product and deployed on a client or server for execution. For example, in an exemplary application scenario of this application, it can be deployed on the server of an e-commerce platform. In this way, the method can be executed by human-computer interaction with the process of the computer program product through a graphical user interface by accessing the interface opened after the computer program product is run.

[0063] Please see Figure 1 The product labeling method of this application, in its typical embodiment, includes the following steps:

[0064] Step S1100: Obtain text information of the target product, wherein the text information includes product description information;

[0065] The e-commerce platform in this application scenario primarily refers to a cross-border e-commerce platform, which allows each online store to operate on a corresponding independent site, providing services to the public. Public users can access the online store's pages through various channels, including but not limited to the online store's built-in pages and social media information display pages. Public users can directly access the corresponding pages of the online store through links on these channels.

[0066] A common scenario for tagging products is during the product listing process. For example, when a merchant on an e-commerce platform lists a new product, they enter basic information, including product images and text. After entering this information, the new product is designated as the target product. This triggers the e-commerce platform to determine the corresponding product tags based on the entered text information, and finally, the determined product tags are used to label the target product. Therefore, when a merchant lists a new product, after completing the entry of basic information, the new product can be designated as the target product, and the entered text information can be retrieved to subsequently determine the corresponding product tags for the target product.

[0067] The text information of the target product may include any one or more of the following: product title, product details text, attribute data, category tags, etc. The determined text information may undergo preprocessing to remove stop words, punctuation marks, etc., to ensure it is clean text before use. In one embodiment, the product title can be used as the text information of the target product. Since the product title is usually a concise description of the product's characteristics, it can save time in collecting useful information from a large amount of product information. Furthermore, in a cross-border e-commerce environment, the text information of the target product generally involves descriptions in multiple languages, such as Chinese, English, German, French, Spanish, Thai, Japanese, etc.

[0068] Step S1200: The multilingual encoder using the text classification model extracts the deep semantic information of the text information and obtains the corresponding encoding feature vector. The multilingual encoder is suitable for representing text information that describes the same meaning in different languages ​​as encoding feature vectors in the same semantic space.

[0069] The multilingual encoder described above is suitable for vector representation and multi-layer semantic space transformation learning of input text. It can be selected from a variety of known models, including but not limited to BERT, RNN, BiLSTM, BiGRU, RoBERTa, ALBert, ERNIE, BERT-WWM, etc.

[0070] Sufficient text information of goods can be collected from cross-border e-commerce platforms. Two text information items describing the same meaning in two different languages ​​form a sentence pair. These two text information items can be obtained by describing the same text information in two different languages. For example, the two text information items are "blackcurrant fudge vitamin C fruit candy snacks" and "Blackcurrant fudge vitamin C fruit candy snacks". These sentence pairs are labeled with supervision tags indicating the similarity of the descriptions of the two text information items. Based on this, multiple sentence pairs and their corresponding supervision tags can be obtained for supervised training of the multilingual encoder. During this supervised training process, a single sentence pair and its corresponding supervision tag are obtained. The multilingual encoder extracts the deep semantic information corresponding to the two text information items in the sentence pair, obtaining encoded feature vectors representing the semantic space corresponding to the two text information items. Then, the vector distance between the two encoded feature vectors is calculated as the similarity. A preset loss value calculation function is used, and the loss value corresponding to the similarity is calculated based on the supervision tag labeled for the sentence pair. When the loss value does not reach a preset threshold, the weights of the multilingual encoder are updated, and other sentence pairs are called to iteratively train the multilingual encoder until convergence. The multilingual encoder trained to convergence can then be used to represent text information describing the same meaning in different languages ​​as encoded feature vectors in the same semantic space. Based on this, a text classification model can be constructed by following the multilingual encoder with a classifier. The calculation of the vector distance, the loss value calculation function, and the supervision labels can be flexibly implemented by those skilled in the art based on prior knowledge or experimental data.

[0071] Based on the above, it is easy to understand that the multilingual encoder of the text classification model, after being trained to convergence, learns that it can extract the corresponding deep semantic information for text information described in multiple languages ​​and output the encoded feature vector representing the corresponding semantic space. Among them, the ability to represent the encoded feature vectors corresponding to text information describing the same meaning in different languages ​​as the same semantic space can be achieved by using the multilingual encoder to encode the text information of the target product, extract its deep semantic information, and obtain the encoded feature vector representing the semantic space corresponding to the text information.

[0072] Step S1300: The classifier of the text classification model performs classification mapping based on the encoded feature vector to obtain the corresponding product label.

[0073] The classifier of the text classification model can be an MLP (feedforward neural network), where the output layer receives the encoded feature vector output by the multilingual encoder as input, the hidden layer maps the encoded feature vector to a preset classification space, the classification space representing the corresponding product label, and the output layer uses a corresponding nonlinear activation function to calculate the classification probability corresponding to each of the classification spaces, and determines the product label corresponding to the classification space with the highest classification probability as the output. The nonlinear activation function can be implemented as needed by those skilled in the art.

[0074] After constructing the text classification model as described in the previous step, it can be further trained on downstream classification tasks applicable to a preset e-commerce application scenario until the text classification model converges. Then, it can be used in the e-commerce application scenario to perform the corresponding downstream classification tasks. The classifier of the text classification model performs classification mapping based on the encoded feature vector output by the multilingual encoder, outputting corresponding product tags. The e-commerce application scenario can be a product category classification scenario or an information security type classification scenario to which the product's text information belongs. The product tags corresponding to the e-commerce application scenario belong to a preset product category tag set or a member of an information security type tag set within the e-commerce application scenario. The training of the downstream classification tasks will be further disclosed in subsequent embodiments; this step will not be discussed further here.

[0075] E-commerce platforms can construct product category tag sets to categorize and organize the massive number of products in their online stores, meaning each product has its corresponding category tag. These product category tag sets can be multi-layered classification systems, containing multiple classification levels, with each level containing multiple specific category tags.

[0076] E-commerce platforms can construct a set of information security type tags to indicate the information security type tags to which the text information of a product belongs. The set of information security type tags can contain multiple information security type tags, such as fraud, pornography, violence, etc.

[0077] Based on the above, a classifier for a text classification model that has been pre-trained to convergence can be used to classify and map the encoded feature vectors according to the semantic space represented by the encoded feature vectors corresponding to the text information of the target product, thereby obtaining the product label corresponding to the target product.

[0078] As can be seen from the typical embodiments of this application, the technical solution of this application has many advantages, including but not limited to the following aspects:

[0079] This application employs a multilingual encoder with a text classification model to represent the textual information of a target product, obtaining a corresponding encoded feature vector. A classifier then maps this encoded feature vector to obtain the corresponding product label. On one hand, because the multilingual encoder possesses a unified understanding of the textual information of products described in multiple languages, it ensures the model's ability to classify the textual information of products described in multiple languages, accurately classifying the product label.

[0080] On the other hand, the multilingual encoder can be trained to acquire the unified understanding of textual information describing products in multiple languages. Specifically, by acquiring textual information describing a product in only one language and translating it into corresponding textual information describing it in multiple languages, a sufficient amount of parallel corpus involving multilingual descriptions can be obtained. Then, using parallel corpus describing the same meaning—that is, textual information describing the same meaning in two different languages—sentence pairs are formed. Supervision labels representing the two textual information describing the same meaning are used to label these sentence pairs. Training is then performed using these sentence pairs and their supervision labels. After the multilingual encoder converges, it can acquire the aforementioned ability. Therefore, this method significantly reduces the difficulty of preparing training samples involving multilingual descriptions, simplifies labeling, eliminates the need for manual labeling costs, and is highly efficient, effectively encoding textual information describing multiple languages.

[0081] Furthermore, the multilingual encoder is followed by a classifier to form the text classification model of this application. Since the multilingual encoder can encode multiple languages, the semantic space represented by the encoded feature vectors output by the corresponding encodings of multiple languages ​​describing the same meaning is the same. Therefore, it is not necessary to use text information described in multiple languages ​​for multiple training sessions for the classification task. Only one training session is needed to use text information described in any one language, label it with the corresponding product tag, and perform the classification task. This allows the text classification model to learn the ability to classify text information described in multiple languages ​​into the corresponding product tag, greatly improving the training efficiency of the classification task.

[0082] Please see Figure 2 In a further embodiment, before step S1100, which involves using a multilingual encoder based on a text classification model to extract the deep semantic information of the text, the following steps are also included:

[0083] Step S1010: Train the multilingual encoder to a convergent state by using text information described in the first language version and the second language version to form sentence pairs, so that it is suitable for representing the text information described in the first language version or the second language version as encoded feature vectors belonging to the same semantic space.

[0084] The text information described in the second language version can be obtained by translating the text information described in the first language version. The first language version can be any language, such as Chinese, English, German, French, Spanish, Thai, Japanese, etc. The second language version can be any language other than the first language version. Accordingly, the text information described in the first language version and the second language version constitutes a sentence pair, in which the two text information describe the same meaning in different languages. Furthermore, in order for the sentence pair to involve multiple languages, not limited to two languages, for the same text information, its first language version description is respectively paired with its multiple second language version descriptions to form multiple sentence pairs. Exemplary examples: [Chinese, English], [Chinese, German], [Chinese, French], [Chinese, Spanish], [Chinese, Thai], [Chinese, Japanese].

[0085] Referring to the above, sufficient text information of products can be obtained from e-commerce platforms. The current language version is used as the first language version. This first language version is then translated into multiple corresponding second language versions. For the same product, the first language version description is paired with its various second language versions to form multiple sentence pairs. This constructs multiple sentence pairs corresponding to the text information of each product. Supervision labels are used to label each sentence pair, indicating that the descriptions of the two text pieces are the same. The multilingual encoder is trained to convergence using each sentence pair and its supervision labels. It is easy to understand that these sentence pairs are actually parallel corpora. During training, through supervised learning of the parallel corpora, the multilingual encoder can learn the correlation between different languages, i.e., multiple language expressions of the same meaning. This enables the multilingual encoder to encode text information described in multiple language versions. Furthermore, the encoded representations of the first language version or various second language versions describing the same meaning belong to the same semantic space.

[0086] Step S1020: The multilingual encoder is followed by a classifier to form the text classification model. The text classification model is trained to convergence using training samples and supervision labels corresponding to the preset classification task, so that it is suitable for determining the category information corresponding to the text information described in the first language version or the second language version.

[0087] The preset classification task can be product category classification or information security type classification of the product's text information. For product category classification, sufficient product text information corresponding to different category tags can be manually collected as training samples based on a product category tag set, with the corresponding category tags serving as supervisory tags for the training samples. For information security type classification of the product's text information, sufficient product text information corresponding to different information security type tags can be manually collected as training samples based on an information security type tag set, with the corresponding information security type tags serving as supervisory tags for the training samples. It is easy to understand that the sufficient product text information collected in the previous step can be pre-collected according to the information disclosed here, laying the groundwork for the training samples required in this step, while the sentence pairs required for training in the previous step can be constructed with reference to the information disclosed in the previous step.

[0088] The category information refers to the product tag corresponding to the product. For different preset classification tasks, the product tag output by the text classification model trained to convergence belongs to different tag sets. The product tag may belong to a member of the preset product category tag set in the e-commerce application scenario, or it may belong to a member of the information security type tag set.

[0089] Using training samples and supervision labels corresponding to the preset classification task disclosed above, the constructed text classification model is trained to a convergent state. The training samples only need to be text information described in the current language version, i.e., the first language version. During the training, through supervised learning of the training samples, the text classification model can learn the semantic space to which the encoded feature vectors of the training samples belong, and classify them into a preset classification space that represents the classification space of the supervision labels. The supervision labels are used as the output product labels. The preset classification space represents the members in the label set of the corresponding preset classification task.

[0090] Accordingly, since the multilingual encoder is suitable for representing text information described in the first language version or the second language version as encoded feature vectors belonging to the same semantic space, the text classification model is suitable for determining the category information corresponding to the text information described in the first language version or the second language version after the training has converged.

[0091] In this embodiment, the multilingual encoder is trained to represent text information described in either the first or second language as encoded feature vectors belonging to the same semantic space. Sufficient parallel corpus involving multiple languages ​​can be obtained by translating text information described in one language into corresponding text information described in multiple languages. Then, sentence pairs are formed using parallel corpus describing the same meaning, i.e., text information described in two languages ​​respectively. Supervision labels representing the two text information describing the same meaning are used to identify these sentence pairs. Training can then be performed using these sentence pairs and their supervision labels. Once the multilingual encoder converges, the ability is acquired. This significantly reduces the difficulty of preparing training samples involving multiple language descriptions, simplifies annotation, eliminates the need for manual annotation, and ensures efficient training, effectively encoding text information described in multiple languages.

[0092] Furthermore, the text classification model is constructed by connecting the multilingual encoder to a classifier. Since the multilingual encoder can encode multiple languages, the semantic space represented by the encoded feature vectors output by the corresponding encodings for multiple languages ​​describing the same meaning is the same. Therefore, it is not necessary to use training samples described in multiple languages ​​for multiple training sessions for the classification task. Only one training session using training samples described in any one language is needed for the text classification model to learn the ability to classify text information described in multiple languages ​​into corresponding product labels, which greatly improves the training efficiency of the classification task.

[0093] Please see Figure 3 In a further embodiment, before step S1010, which involves training the multilingual encoder to a convergent state using text information described in the first and second language versions to form sentence pairs, the following steps are also included:

[0094] Step S1000: Obtain a dataset containing text information described in a first language version and its corresponding supervision labels, wherein the supervision labels contain pre-labeled category information of the text information;

[0095] The category information refers to the product tag corresponding to the product. For different preset classification tasks, the corresponding tag sets of the product tags output by the text classification model trained to convergence are different. The preset classification task can be product category classification or information security type classification of the product's text information. The product tag can belong to a member of the preset product category tag set in the e-commerce application scenario or a member of the information security type tag set.

[0096] In one embodiment, for the preset classification task being product category classification, sufficient text information of products corresponding to different category tags can be manually collected as a dataset based on a product category tag set. For each text information, its current language version description is used as the first language version description. Furthermore, corresponding category tags are labeled as supervisory tags. Exemplary examples include Product 1 [Chinese, Top-Skirt-Dress], Product 2 [Chinese, Bottom-Pants-Cargo Pants], etc.

[0097] In another embodiment, for the preset classification task of classifying the information security type of the product's text information, a sufficient amount of product text information corresponding to different information security type tags can be manually collected as a dataset based on the information security type tag set. For each piece of text information, its current language version description is used as the first language version description, and further, the corresponding information security type tag is labeled as a supervision tag. Exemplary examples include Product 1 [Chinese, Fraud], Product 2 [Chinese, Pornography], Product 3 [Chinese, Violence], etc.

[0098] Step S1001: Obtain the translated text of the text information described in the first language version as the corresponding second language version, and store the text information of the first language version and the second language version, as well as the supervision label representing whether the descriptions of the two text information are the same, as a mapping relationship data in the training set.

[0099] The text information described in each first language version of the dataset can be translated into multiple languages, such as Chinese, English, German, French, Spanish, Thai, Japanese, etc., using human translation or translation tools, to obtain multiple translated texts as corresponding multiple second language versions. Supervision labels are then assigned to each first language version of the text information and its corresponding multiple second language versions to indicate whether the descriptions of the two text information are the same. For example, if the second language version is a translation of the first language version, then the descriptions of the two corresponding text information are the same, and the supervision label can be set to 1.

[0100] The text information of each first language version, and the corresponding text information of multiple second language versions, along with supervision labels, constitute mapping relationship data, which is stored in the training set. An example of this mapping relationship data is product 1 [Chinese, English, German, French, Spanish, Thai, Japanese, 1].

[0101] Step S1002: Determine different language versions of the same text information from the training set to construct the sentence pairs required for training the multilingual encoder;

[0102] From the various mapping relationship data stored in the training set, different language versions of the same text information are identified to form sentence pairs. Exemplary examples include product 1 [Chinese, English], [Chinese, German], [Chinese, French], [Chinese, Spanish], [Chinese, Thai], [Chinese, Japanese], product 2 [Chinese, English], [Chinese, German], [Chinese, French], [Chinese, Spanish], [Chinese, Thai], [Chinese, Japanese], etc. Each sentence pair and its corresponding supervision label are used to train the multilingual encoder.

[0103] Step S1003: Determine the text information of any language version and the corresponding supervision label from the training set as the training samples and supervision labels required for training the text classification model.

[0104] Based on the supervision labels assigned to the text information of each first language version in step S1001, obtain sufficient text information of goods corresponding to each different supervision label from the training set. This text information only requires any one language version.

[0105] In one exemplary embodiment, for the preset classification task of product category classification, the Chinese description text information of products 1, 3, 5, etc., corresponding to the supervision label "top-skirt-dress", and the Chinese description text information of products 2, 4, 6, etc., corresponding to the supervision label "bottom-pants-work pants" are obtained from the training set. This obtains the supervision labels corresponding to each category label in the product category label set, and sufficient text information corresponding to them. Each text information and its supervision label are used as the training samples and supervision labels required for training the text classification model.

[0106] In another exemplary embodiment, for the preset classification task of classifying the information security type of the text information of the product, the Chinese description text information of products 1, 4, 9, etc., corresponding to the supervision label of fraud, and the Chinese description text information of products 2, 6, 8, etc., corresponding to the supervision label of pornography, are obtained from the training set. Thus, the supervision labels corresponding to each information security type label in the information security type label set are obtained, along with sufficient text information. Each text information and its supervision label are used as the training samples and supervision labels required for training the text classification model.

[0107] In this embodiment, by constructing a training set at once, the training samples and their supervision labels corresponding to the training of the multilingual encoder and text classification model can be obtained, which is highly efficient and convenient.

[0108] Please see Figure 4In a further embodiment, step S1010, training the multilingual encoder to a convergent state using sentence pairs constructed from text information described in the first language version and the second language version, so that it is suitable for representing text information described in the first language version or the second language version as encoded feature vectors belonging to the same semantic space, includes the following steps:

[0109] Step S1011: Obtain sentence pairs consisting of two different language versions of the same text information as positive samples, and obtain sentence pairs consisting of one different language version of each of two different text information as negative samples, and label the positive samples and negative samples with corresponding different supervision labels.

[0110] Referring to steps S1000-1002, obtain the text information of the same product, namely the first language version and its corresponding second language version, to form sentence pairs as positive samples. In order to ensure the reliability, robustness and generalization ability of the multilingual encoder trained later, at the same time, obtain the text information of different products, each with a different language version, to form sentence pairs as negative samples. The recommended negative samples are products of similar categories.

[0111] For example, the positive samples can be product 1 [Chinese, English], [Chinese, German], [Chinese, French], [Chinese, Spanish], [Chinese, Thai], [Chinese, Japanese], product 2 [Chinese, English], [Chinese, German], [Chinese, French], [Chinese, Spanish], [Chinese, Thai], [Chinese, Japanese], etc., and the negative samples can be [product 1 "Chinese", product 2 "English"], [product 3 "French", product 4 "German"], [product 5 "Spanish", product 6 "Thai"], etc.

[0112] Furthermore, corresponding labels can be assigned to the positive and negative samples to characterize whether the descriptions of the two text information are corresponding supervision labels. For example, the supervision label for a positive sample is 1, and the supervision label for a negative sample is 0.

[0113] Step S1012: Input a single positive sample or negative sample as the first training sample into the multilingual encoder, extract the deep semantic information corresponding to the two text information, and obtain the encoding feature vector corresponding to the two text information.

[0114] The first training sample is segmented into words to obtain a corresponding segmented text sequence, where each element corresponds to a word in the first training sample. In the segmented text sequence, start and end symbols are added to the beginning and end of corresponding text messages.

[0115] Referring to a pre-defined reference lexicon used by the multilingual encoder, each word in the segmented text sequence is converted into an encoding feature of the corresponding word in the reference lexicon, and these encoding features are constructed into corresponding encoding vectors. The encoding vectors are then processed by the embedding and encoding layers of the multilingual encoder to extract features, revealing deep semantic information corresponding to the two text pieces in the first training sample. This deep semantic information includes each word in the first training sample, and the corresponding feature representation is obtained based on attention interactions within its context. Furthermore, since the start symbol is not a word or character with actual meaning but participates in the attention interaction, it can represent the semantics expressed by the corresponding text information as a whole. Therefore, the start symbols corresponding to the two text pieces in the first training sample are obtained as the encoding feature vectors of those two text pieces. The start symbol, end symbol, and reference lexicon can be implemented by those skilled in the art based on prior knowledge or experimental data.

[0116] Step S1013: Calculate the similarity between the two text information in the first training sample based on the corresponding encoded feature vectors of the two text information.

[0117] Calculate the vector distance between the corresponding encoded feature vectors of the two text information pieces to characterize the similarity between the two text information pieces in the first training sample.

[0118] When calculating the aforementioned vector distance, any of the large-scale vector retrieval engines such as Faiss, ElasticSearch, and Milvus can be used, or any existing algorithm such as cosine similarity, dot product, Manhattan distance, or Euclidean distance can be employed.

[0119] Step S1014: Using the supervision label corresponding to the first training sample, determine the loss value of the similarity. When the loss value does not reach the preset threshold, update the weights of the multilingual encoder and continue to call other first training samples to perform iterative training on the multilingual encoder until convergence.

[0120] The preset cross-entropy loss function is invoked. This function can be flexibly set by those skilled in the art based on prior knowledge or experimental experience. The cross-entropy loss value of the similarity is calculated based on the supervision label corresponding to the first training sample. When the cross-entropy loss value reaches the preset threshold, it indicates that the multilingual coding model has been trained to a convergent state, and the training of the multilingual encoder can be terminated.

[0121] When the loss value does not reach the preset threshold, it indicates that the multilingual encoder has not converged. Therefore, the gradient of the multilingual encoder is updated according to the loss value. Usually, the weight parameters of each part of the multilingual encoder are corrected through backpropagation so that the multilingual encoder is closer to convergence. Then, other first training samples, i.e., positive samples or negative samples, are called to iteratively train the multilingual encoder until the multilingual encoder is trained to a convergent state.

[0122] This embodiment reveals that after training to convergence, the multilingual encoder learns to extract the corresponding deep semantic information from text information described in multiple languages ​​and outputs encoded feature vectors representing the corresponding semantic space. The encoder has the ability to represent the encoded feature vectors corresponding to text information describing the same meaning in different languages ​​as the same semantic space.

[0123] Please see Figure 5 In a further embodiment, step S1020, which involves connecting the multilingual encoder to a classifier to form the text classification model, and training the text classification model to a convergent state using training samples and supervision labels corresponding to a preset classification task, so that it is suitable for determining the category information corresponding to text information described in the first language version or the second language version, includes the following steps:

[0124] Step S1021: Obtain the text information of any language version and its pre-annotated supervision label as the second training sample and its supervision label, respectively;

[0125] Obtain text information in any language version and its pre-annotated supervision labels as the second training samples and their supervision labels, respectively.

[0126] Referring to steps S1000-1003, based on the supervision labels marked for each first language version of the text information in step S1001, obtain sufficient text information of goods corresponding to each different supervision label from the training set. This text information only needs to be in any one language version.

[0127] In one exemplary embodiment, for the preset classification task being product category classification, the Chinese description text information of products 1, 3, 5, etc., corresponding to the supervision label "top-skirt-dress", and the Chinese description text information of products 2, 4, 6, etc., corresponding to the supervision label "bottom-pants-work pants" are obtained from the training set. This obtains the supervision labels corresponding to each category label in the product category label set, and sufficient text information corresponding to them. Each text information and its supervision label are used as the second training sample and supervision label required for training the text classification model.

[0128] In another exemplary embodiment, for the preset classification task of classifying the information security type of the text information of the product, the Chinese description text information of products 1, 4, 9, etc., corresponding to the supervision label of fraud, and the Chinese description text information of products 2, 6, 8, etc., corresponding to the supervision label of pornography, are obtained from the training set. Thus, the supervision labels corresponding to each information security type label in the information security type label set are obtained, and sufficient text information corresponding to them is obtained. Each text information and its supervision label are used as the second training sample and supervision label required for training the text classification model.

[0129] It is understood that, referring to the two exemplary embodiments above, the second training samples and their supervision labels corresponding to the two classification tasks applicable to e-commerce application scenarios can be obtained for training the text classification model. It is not difficult to understand that the supervision label is a member belonging to the preset product category label set under the e-commerce application scenario, or a member belonging to the information security type label set, that is, a product label.

[0130] Those skilled in the art should know that by training a text classification model using the second training samples and their supervision labels corresponding to the two classification tasks respectively, two text classification models applicable to the two classification tasks can be obtained. For ease of discussion, the following will refer to them collectively as the second training samples and their supervision labels, but in practice, they can be the second training samples and their supervision labels corresponding to any classification task.

[0131] Step S1022: Use a multilingual encoder of a text classification model to extract the deep semantic information of the second training sample and obtain the corresponding encoded feature vector;

[0132] The second training sample is segmented to obtain the corresponding segmented text sequence, where each element corresponds to a word unit in the second training sample.

[0133] Referring to a pre-defined reference lexicon used by the multilingual encoder, each word in the segmented text sequence is converted into an encoding feature of the corresponding word in the reference lexicon, and these encoding features are constructed into a corresponding encoding vector. The encoding vector is then processed by the embedding and encoding layers in the multilingual encoder to extract features, thereby extracting the deep semantic information corresponding to the text information in the second training sample, and obtaining the corresponding encoding feature vector. This deep semantic information contains each word in the second training sample, and the feature representation is obtained based on attention interactions within its context.

[0134] Step S1023: The classifier of the text classification model performs classification mapping based on the encoded feature vector to obtain the corresponding product label;

[0135] The classifier of the text classification model classifies text based on the encoded feature vectors, mapping them to a preset classification space. This classification space represents corresponding product tags, which can be members of a preset product category tag set for e-commerce applications or members of an information security type tag set. Furthermore, a corresponding nonlinear activation function is used to calculate the classification probability corresponding to each of the classification spaces, and the product tag corresponding to the classification space with the highest probability is determined as the output. The nonlinear activation function can be implemented as needed by those skilled in the art.

[0136] Step S1024: Using the supervision label of the second training sample, determine the loss value of the product label. When the loss value does not reach the preset threshold, update the weights of the text classification model and continue to call other second training samples to iteratively train the text classification model until convergence.

[0137] The preset cross-entropy loss function is called. This function can be flexibly set by those skilled in the art based on prior knowledge or experimental experience. The second half of the historical advertising text included in the second training sample is used as the second supervision label. The cross-entropy loss value of the second half of the text is calculated. When the cross-entropy loss value reaches the preset threshold, it indicates that the text classification model has been trained to a convergent state, and the model training can be terminated.

[0138] In one embodiment, if the loss value does not reach a preset threshold, it indicates that the model has not converged. Therefore, the model is updated with gradients based on the loss value. Typically, the weight parameters of each part of the model are corrected through backpropagation to make the model closer to convergence. Then, the next training sample in the training set is called to iteratively train the model until the model is trained to a convergent state.

[0139] In another embodiment, if the loss value does not reach a preset threshold, it indicates that the model has not converged. Therefore, gradient updates are performed on the model based on this loss value. To prevent the multilingual encoder of the text classification model from disrupting its encoding of the semantic space corresponding to the input during the training of the classification task, the parameters of the multilingual encoder can be fixed, and only the weights of the classifier are updated. Typically, backpropagation is used to correct the classifier's weight parameters to further bring the text classification model closer to convergence. Then, other second training samples in the training set are used to iteratively train the model until it reaches a convergent state. It can be understood that the aforementioned implementation of training only the classifier of the text classification model can significantly save training time for the text classification model without affecting the model's semantic understanding of multiple languages.

[0140] This embodiment reveals, on the one hand, the supervised training process of the text classification model for two classification tasks applicable to e-commerce scenarios. This allows the classifier to determine the corresponding product tags based on the output of the multilingual encoder after the model has converged during training. Furthermore, since the multilingual encoder can encode multiple languages, the semantic space represented by the encoded feature vectors output from multiple languages ​​describing the same meaning is identical. Therefore, it eliminates the need for multiple training iterations using text information described in multiple languages. Only one training iteration using text information described in any one language and its corresponding product tag as a supervised label is required. This allows the text classification model to learn the ability to classify text information described in multiple languages ​​into corresponding product tags, significantly improving the training efficiency of the classification task. On the other hand, it provides a simple and efficient way to obtain two text classification models applicable to the two classification tasks.

[0141] Please see Figure 6 This invention provides a product labeling device to meet one of the purposes of this application. It is a functional embodiment of the product labeling method of this application. The device includes an information acquisition module 1100, a text encoding module 1200, and a text classification module 1300. The information acquisition module 1100 is used to acquire text information of the target product, including product description information. The text encoding module 1200 is used to extract deep semantic information of the text information using a multilingual encoder of a text classification model to obtain corresponding encoded feature vectors. The multilingual encoder is adapted to represent text information describing the same meaning in different languages ​​as encoded feature vectors in the same semantic space. The text classification module 1300 is used to perform classification mapping based on the encoded feature vectors using a classifier of the text classification model to obtain corresponding product labels.

[0142] In a further embodiment, before the information acquisition module 1100, the system further includes: an encoder training module, used to train the multilingual encoder to a convergent state using sentence pairs formed by text information described in a first language version and a second language version, so that it is suitable for representing the text information described in the first language version or the second language version as encoded feature vectors belonging to the same semantic space; and a classifier training module, used to connect the multilingual encoder to a classifier to form the text classification model, and train the text classification model to a convergent state using training samples and supervision labels corresponding to a preset classification task, so that it is suitable for determining the category information corresponding to the text information described in the first language version or the second language version.

[0143] In a further embodiment, before the encoder training module, the system further includes: a dataset acquisition module, used to acquire a dataset containing text information described in a first language version and its corresponding supervision labels, wherein the supervision labels contain pre-annotated category information of the text information; a training set construction module, used to acquire translated text of the text information described in the first language version as the corresponding second language version, and store the text information of the first language version and the second language version and the supervision labels representing whether the descriptions of the two text information are the same as the first language version and the second language version as a mapping relationship data in the training set; a first training sample construction module, used to determine different language versions of the same text information from the training set to construct sentence pairs required for training the multilingual encoder; and a second training sample construction module, used to determine text information of any language version and the corresponding supervision labels from the training set as training samples and supervision labels required for training the text classification model.

[0144] In a further embodiment, the encoder training module includes: a first sample acquisition submodule, used to acquire two different language versions of the same text information as a sentence pair as a positive sample, acquire one different language version of each of two different text information as a negative sample, and label the positive and negative samples with corresponding different supervision labels; a first text encoding submodule, used to input a single positive sample or the negative sample as a first training sample into the multilingual encoder, extract the deep semantic information corresponding to the two text information, and obtain the encoding feature vectors corresponding to the two text information; a similarity calculation submodule, used to calculate the similarity between the two text information in the first training sample based on the encoding feature vectors corresponding to the two text information; and a first iterative training submodule, used to determine the loss value of the similarity using the supervision label corresponding to the first training sample, and when the loss value does not reach a preset threshold, to perform weight updates on the multilingual encoder and continue to call other first training samples to perform iterative training on the multilingual encoder until convergence.

[0145] In a further embodiment, the classifier training module includes: a second sample acquisition submodule, used to acquire text information in any language version and its pre-annotated supervision labels as second training samples and their supervision labels respectively; a second text encoding submodule, used to extract deep semantic information of the second training samples using a multilingual encoder of the text classification model to obtain corresponding encoded feature vectors; a text classification submodule, used to perform classification mapping based on the encoded feature vectors using the classifier of the text classification model to obtain corresponding product labels; and a second iterative training submodule, used to determine the loss value of the product labels using the supervision labels of the second training samples, and when the loss value does not reach a preset threshold, to update the weights of the text classification model and continue to call other second training samples to iteratively train the text classification model until convergence.

[0146] In a further embodiment, the second iterative training submodule includes: a weight fixation unit, used to fix the weights of the multilingual encoder of the text classification model during the weight update process of the text classification model, and only perform weight updates on the classifier.

[0147] To address the aforementioned technical problems, embodiments of this application also provide computer equipment. For example... Figure 7 The diagram shows the internal structure of a computer device. The computer device includes a processor, a computer-readable storage medium, a memory, and a network interface connected via a system bus. The computer-readable storage medium stores an operating system, a database, and computer-readable instructions. The database may store a sequence of control information. When the computer-readable instructions are executed by the processor, the processor can implement a product labeling method. The processor of the computer device provides computing and control capabilities to support the operation of the entire computer device. The memory of the computer device may store computer-readable instructions. When the computer-readable instructions are executed by the processor, the processor can execute the product labeling method of this application. The network interface of the computer device is used for communication with a terminal. Those skilled in the art will understand that… Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0148] In this embodiment, the processor is used to execute... Figure 6The system contains the specific functions of each module and its sub-modules, and the memory stores the program code and various data required to execute these modules or sub-modules. The network interface is used for data transmission between the user terminal and the server. In this embodiment, the memory stores the program code and data required to execute all modules / sub-modules in the product labeling device of this application, and the server can call the server's program code and data to execute the functions of all sub-modules.

[0149] This application also provides a storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the product labeling method of any embodiment of this application.

[0150] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. This computer program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. The aforementioned storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0151] In summary, the text classification model implemented in this application requires simple training sample preparation, does not require a large amount of manual annotation cost, is highly efficient in training, and can ensure the accuracy of the text classification model.

[0152] Those skilled in the art will understand that the steps, measures, and solutions in the various operations, methods, and processes discussed in this application can be alternated, modified, combined, or deleted. Furthermore, other steps, measures, and solutions in the various operations, methods, and processes discussed in this application can also be alternated, modified, rearranged, decomposed, combined, or deleted. Furthermore, steps, measures, and solutions in the prior art that are similar to those disclosed in this application can also be alternated, modified, rearranged, decomposed, combined, or deleted.

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

Claims

1. A commodity label marking method characterized by comprising: The method comprises the following steps: obtaining text information of a target product, the text information comprising description information of the product; extracting deep semantic information of the text information by using a multilingual encoder of a text classification model, and obtaining a corresponding encoding feature vector, the multilingual encoder being adapted to represent text information describing the same meaning in different languages as encoding feature vectors in the same semantic space; classifying and mapping according to the encoding feature vector by using a classifier of the text classification model, and obtaining a corresponding product label; Before the step of extracting deep semantic information of the text information by using the multilingual encoder of the text classification model, the method further comprises the following steps: training the multilingual encoder to a convergent state by using sentence pairs of text information described in a first language version and a second language version, so that the multilingual encoder is adapted to represent text information described in the first language version or the second language version as encoding feature vectors belonging to the same semantic space, comprising: obtaining two different language versions of the same text information as a positive sample, obtaining a sentence pair of two different text information in different language versions as a negative sample, and labeling corresponding different supervision labels for the positive sample and the negative sample; inputting a single positive sample or negative sample as a first training sample into the multilingual encoder, extracting deep semantic information corresponding to the two text information, and obtaining encoding feature vectors corresponding to the two text information; calculating the similarity between the two text information in the first training sample according to the encoding feature vectors corresponding to the two text information; determining the loss value of the similarity by using the supervision label corresponding to the first training sample, and implementing weight update on the multilingual encoder when the loss value does not reach a preset threshold, and continuing to call other first training samples to implement iterative training on the multilingual encoder until convergence; connecting the classifier after the multilingual encoder to form the text classification model, training the text classification model to a convergent state by using training samples and supervision labels corresponding to a preset classification task, so that the text classification model is adapted to determine the category information corresponding to text information described in the first language version or the second language version.

2. The merchandise tag labeling method of claim 1, wherein Before training the multilingual encoder to a convergent state by using sentence pairs of text information described in a first language version and a second language version, the method further comprises the following steps: obtaining a data set containing text information described in a first language version and corresponding supervision labels, the supervision labels containing pre-labeled category information of the text information; obtaining a translated text of the text information described in the first language version as a corresponding second language version, and storing the text information in the first language version and the second language version and the supervision label representing whether the description of the two text information is the same in a mapping relationship data in the training set; determining different language versions of the same text information from the training set to construct sentence pairs required for training the multilingual encoder; determining text information in any language version and the corresponding supervision label from the training set as a training sample and a supervision label required for training the text classification model, respectively.

3. The merchandise tag labeling method of claim 1, wherein The text classification model is constituted by connecting the multilingual encoder with the classifier, the text classification model is trained to a convergent state by using training samples and supervision labels corresponding to a preset classification task, and the text classification model is adapted to determine category information corresponding to text information described in a first language version or a second language version, and includes the following steps: Obtain text information in an arbitrary language version and its pre-labeled supervision label as a second training sample and its supervision label, respectively; Extract deep semantic information of the second training sample by using the multilingual encoder of the text classification model to obtain a corresponding encoding feature vector; Classify and map the encoding feature vector by using the classifier of the text classification model to obtain a corresponding product label; Determine a loss value of the product label by using the supervision label of the second training sample, update the weight of the text classification model when the loss value does not reach a preset threshold, and continue to call other second training samples to implement iterative training on the text classification model until convergence.

4. The merchandise tag labeling method of claim 3, wherein When the loss value does not reach the preset threshold, the weight of the text classification model is updated, and other second training samples are continuously called to implement iterative training until the model converges, including: During the process of updating the weight of the text classification model, the weight of the multilingual encoder of the text classification model is fixed, and only the weight of the classifier is updated.

5. The merchandise tag labeling method of claim 1, wherein The product label belongs to a member in a preset product category label set in an e-commerce application scenario or a member in an information security type label set.

6. A commodity label marking apparatus characterized by comprising: It includes: An information acquisition module is configured to acquire text information of a target product, wherein the text information includes description information of the product; A text encoding module is configured to extract deep semantic information of the text information by using a multilingual encoder of a text classification model to obtain a corresponding encoding feature vector, wherein the multilingual encoder is adapted to represent text information obtained by describing the same meaning in different languages as an encoding feature vector in the same semantic space; A text classification module is configured to classify and map the encoding feature vector by using a classifier of the text classification model to obtain a corresponding product label; Before the multilingual encoder of the text classification model extracts the deep semantic information of the text information, it further includes: The text information described in the first language version and the second language version is used to train the multilingual encoder to a convergent state, so that the text information described in the first language version or the second language version is represented as an encoded feature vector belonging to the same semantic space, comprising: obtaining a sentence pair composed of two different language versions of the same text information as a positive sample, obtaining a sentence pair composed of one different language version of each of two different text information as a negative sample, and labeling the corresponding different supervision labels for the positive sample and the negative sample; inputting a single positive sample or negative sample as a first training sample to the multilingual encoder, extracting the deep semantic information corresponding to the two text information, and obtaining the encoded feature vectors corresponding to the two text information; according to the encoded feature vectors corresponding to the two text information, the similarity between the two text information in the first training sample is calculated; using the supervision label corresponding to the first training sample, the loss value of the similarity is determined, and when the loss value does not reach a preset threshold, the weight of the multilingual encoder is updated, and other first training samples are continuously called to implement iterative training of the multilingual encoder until convergence; The text classification model is composed of the multilingual encoder followed by a classifier, and the text classification model is trained to a convergent state using training samples and supervision labels corresponding to a preset classification task, so that it is suitable for determining the category information corresponding to the text information described in the first language version or the second language version.

7. The merchandise tag labeling apparatus of claim 6, wherein The text encoding module further comprises: an encoder training module for training the multilingual encoder to a convergent state using sentence pairs composed of text information described in the first language version and the second language version, so that the text information described in the first language version or the second language version is represented as an encoded feature vector belonging to the same semantic space; and a classifier training module for constructing the text classification model by connecting the multilingual encoder with a classifier, and training the text classification model to a convergent state using training samples and supervision labels corresponding to a preset classification task, so that it is suitable for determining the category information corresponding to the text information described in the first language version or the second language version.

8. The merchandise tag labeling apparatus of claim 6, wherein The encoder training module further comprises: a dataset acquisition module, configured to acquire a dataset containing text information described in a first language version and corresponding supervision labels, wherein the supervision labels contain pre-labeled category information of the text information; a training set construction module, configured to acquire translated text of the text information described in the first language version as corresponding second language version, and to construct a mapping relationship data from the text information in the first language version and the second language version and supervision labels representing whether the two pieces of text information are the same, and store the mapping relationship data in a training set; a first training sample construction module, configured to determine different language versions of the same text information from the training set to construct sentence pairs required for training the multilingual encoder; and a second training sample construction module, configured to determine text information in any language version and corresponding supervision labels from the training set as training samples and supervision labels required for training the text classification model, respectively.

9. A computer device comprising a central processing unit and a memory, characterized in that The central processing unit is configured to call and run a computer program stored in the memory to perform the steps of the method according to any one of claims 1 to 5.

10. A computer-readable storage medium, characterized in that, The computer program is stored in the form of computer readable instructions and is implemented according to the method of any one of claims 1 to 5, and when the computer program is called and run by a computer, the steps included in the corresponding method are performed.

Citation Information

Patent Citations

  • Text classification method and related device

    CN112214605A

  • Text processing method and device, equipment, storage medium and computer program product

    CN114676255A

  • Cross-lingual classification using multilingual neural machine translation

    US20200342182A1