CN113821589B - Text label determining method and device, computer equipment and storage medium - Google Patents

Text label determining method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN113821589B
CN113821589B CN202110651238.0A CN202110651238A CN113821589B CN 113821589 B CN113821589 B CN 113821589B CN 202110651238 A CN202110651238 A CN 202110651238A CN 113821589 B CN113821589 B CN 113821589B
Authority
CN
China
Prior art keywords
text
target text
label
matched
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110651238.0A
Other languages
Chinese (zh)
Other versions
CN113821589A (en
Inventor
张倩汶
闫昭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN202110651238.0A priority Critical patent/CN113821589B/en
Publication of CN113821589A publication Critical patent/CN113821589A/en
Application granted granted Critical
Publication of CN113821589B publication Critical patent/CN113821589B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3344Query execution using natural language analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/33Querying
    • G06F16/3331Query processing
    • G06F16/334Query execution
    • G06F16/3346Query execution using probabilistic model
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/35Clustering; Classification
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/30Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
    • G06F16/36Creation of semantic tools, e.g. ontology or thesauri
    • G06F16/367Ontology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/194Calculation of difference between files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/20Natural language analysis
    • G06F40/279Recognition of textual entities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/30Semantic analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N20/00Machine learning

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Artificial Intelligence (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Health & Medical Sciences (AREA)
  • Audiology, Speech & Language Pathology (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Medical Informatics (AREA)
  • Evolutionary Computation (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Probability & Statistics with Applications (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Animal Behavior & Ethology (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a text label determining method and device, computer equipment and storage medium, comprising the following steps: acquiring a target text and a label to be matched, acquiring a feature vector set of the target text and a feature vector set of the label to be matched according to the target text and the label to be matched, acquiring a correlation feature set according to the feature vector set of the target text and the feature vector set of the label to be matched, wherein the correlation feature set comprises correlation features between text units and correlation features between the text units and attribute labels, acquiring the probability that the target text respectively belongs to each attribute label according to the correlation feature set, and determining the target label corresponding to the target text according to the probability that the target text respectively belongs to each attribute label. By the method, the acquired characteristic information can reflect the text and the information of the labels more accurately, so that the accuracy of determining the labels corresponding to the text is improved.

Description

Text label determining method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of natural language processing in the field of artificial intelligence, and in particular, to a method and apparatus for determining a text label, a computer device, and a storage medium.
Background
Text representation plays an important role in model performance. For early models, it was crucial to extract the necessary hand-made features, which can be extracted by deep neural networks (deep neural networks, DNN). Each word in the text can be represented by a particular vector, which is obtained by word embedding techniques. While the bi-directional coded representation (bidirectional encoder representations from transformers, BERT) model can rely on the attention mechanism to map the global dependency between input and output, which is an important turning point for the development of the text label determination task.
Currently, text is automatically labeled by multiple labels, and multiple label classification learning can be performed after a sample is characterized, wherein the sample can be text, image or audio. By generating a contextualized word vector and extracting dependencies between all words to provide context information for the classification task, however, the context information is used only to generate a text representation, but the information conveyed by the tag itself is ignored, the resulting classification tag may deviate from the true situation, and therefore, how to classify the text tag more accurately is a problem to be solved.
Disclosure of Invention
The embodiment of the application provides a text label determining method and device, computer equipment and storage medium, wherein an acquired target text comprises at least two text units, and a label to be matched comprises at least one attribute label, and the relevance characteristics between the text units and the attribute labels are acquired, so that the relevance between the labels and the texts can be further considered on the basis of considering information conveyed between the texts, and the resolving power of the extracted characteristics is enhanced, and therefore the acquired characteristic information can more accurately reflect the texts and the information of the labels, so that the accuracy of determining the labels corresponding to the texts is improved.
In view of this, a first aspect of the present application provides a method for determining a text label, including:
obtaining a target text and a label to be matched, wherein the target text comprises at least two text units, and the label to be matched comprises at least one attribute label;
according to the target text and the label to be matched, a feature vector set of the target text and a feature vector set of the label to be matched are obtained;
Acquiring a correlation feature set according to a feature vector set of a target text and a feature vector set of a label to be matched, wherein the correlation feature set comprises correlation features between text units and correlation features between the text units and attribute labels;
acquiring the probability that the target text belongs to each attribute tag according to the correlation feature set;
And determining a target label corresponding to the target text according to the probability that the target text belongs to each attribute label, wherein the target label comprises at least one attribute label.
The second aspect of the present application provides a text label determining apparatus, including:
The device comprises an acquisition module, a matching module and a matching module, wherein the acquisition module is used for acquiring a target text and a to-be-matched tag, the target text comprises at least two text units, and the to-be-matched tag comprises at least one attribute tag;
The acquisition module is also used for acquiring a feature vector set of the target text and a feature vector set of the label to be matched according to the target text and the label to be matched;
the obtaining module is further used for obtaining a correlation feature set according to the feature vector set of the target text and the feature vector set of the tag to be matched, wherein the correlation feature set comprises correlation features among text units and correlation features among the text units and the attribute tag;
the acquisition module is also used for acquiring the probability that the target text respectively belongs to each attribute tag according to the correlation feature set;
the determining module is used for determining the target label corresponding to the target text according to the probability that the target text respectively belongs to each attribute label, wherein the target label comprises at least one attribute label.
In one possible embodiment, the tags to be matched comprise at least two attribute tags;
the set of correlation features also includes correlation features between attribute tags.
In one possible implementation manner, the obtaining module is specifically configured to generate a target text sequence according to the target text and the tag to be matched, where the target text sequence includes a text sequence of the target text and a text sequence of the tag to be matched;
And carrying out coding processing on the target text sequence to obtain a feature vector set of the target text and a feature vector set of the label to be matched.
In one possible implementation manner, the text label determining device further comprises a processing module;
the processing module is used for carrying out word segmentation processing on the target text to obtain a text sequence of the target text;
Word segmentation is carried out on the tags to be matched to obtain text sequences of the tags to be matched;
And performing splicing processing on the text sequence of the target text and the text sequence of the label to be matched to obtain the target text sequence.
In one possible implementation manner, the processing module is specifically configured to encode a text sequence of the target text and a text sequence of the tag to be matched to obtain a feature vector corresponding to each text unit and a feature vector corresponding to each attribute tag;
generating a feature vector set of the target text according to the feature vector corresponding to each text unit;
and generating a feature vector set of the label to be matched according to the feature vector corresponding to each attribute label.
In one possible implementation manner, the obtaining module is specifically configured to obtain, according to the relevance feature set, an attention weight vector set, where the attention weight vector set includes at least two attention weight vectors, the attention weight vectors are in one-to-one correspondence with the text units, and the attention weight vectors represent weights of the text units in the target text that are related to the attribute tags;
acquiring a text feature vector set according to the target text and the attention weight vector set;
and acquiring the probability that the target text respectively belongs to each attribute tag according to the text feature vector set and the tags to be matched.
In one possible implementation manner, the obtaining module is specifically configured to perform convolution processing on the correlation feature set to obtain an attention weight vector set;
the acquisition module is specifically used for processing the target text and the attention weight vector set to acquire a text feature vector set.
In one possible embodiment, the tags to be matched comprise at least two attribute tags;
The determining module is specifically configured to determine, as a target probability, at least one probability that a probability that the target text respectively belongs to each attribute tag is greater than a first classification threshold;
And determining the attribute label corresponding to the target probability as the target label corresponding to the target text.
In one possible implementation, the tags to be matched are single attribute tags;
The determining module is specifically configured to determine the tag to be matched as the target tag corresponding to the target text when the probability that the target text belongs to the attribute tag is greater than the second classification threshold.
In one possible implementation manner, the obtaining module is specifically configured to obtain, through a first feature processing layer of the classification model, a feature vector set of the target text and a feature vector set of the tag to be matched based on the target text and the tag to be matched;
the acquisition module is specifically used for acquiring a correlation feature set through a second feature processing layer of the classification model based on the feature vector set of the target text and the feature vector set of the label to be matched;
the acquisition module is specifically used for acquiring the probability that the target text belongs to each attribute tag respectively through a convolution layer of the classification model based on the correlation feature set;
The determining module is specifically configured to determine, based on probabilities that the target text belongs to each attribute tag, a target tag corresponding to the target text through a full-connection layer of the classification model.
In one possible implementation manner, the text label determining device further comprises a training module;
The system comprises an acquisition module, a matching module and a matching module, wherein the acquisition module is further used for acquiring a target text sample set, a label sample to be matched and a real label set, the target text sample set comprises at least two target text samples, the target text sample comprises at least two text units, and the label sample to be matched comprises at least one attribute label;
The acquisition module is further used for acquiring a feature vector set of the target text sample set and a feature vector set of the label sample to be matched through a first feature processing layer of the classification model to be trained based on the target text sample set and the label sample to be matched;
The obtaining module is further configured to obtain a correlation feature sample set through a second feature processing layer of the classification model to be trained based on the feature vector set of the target text sample set and the feature vector set of the label sample to be matched, where the correlation feature sample set includes correlation features between text units of each target text sample and attribute labels of each label sample to be matched;
the acquisition module is further used for acquiring probability sets of each attribute label respectively belonging to text units of each target text sample through a convolution layer of the classification model to be trained based on the correlation characteristic sample sets;
The obtaining module is further configured to obtain, based on the probability set that the text unit of each target text sample belongs to each attribute tag, a prediction tag set corresponding to the target text sample set through a full connection layer of the classification model to be trained, where the prediction tag set includes a plurality of prediction tags, and each prediction tag includes at least one attribute tag;
The training module is used for training the classification model to be trained based on the prediction label set and the real label set to obtain the classification model.
In one possible implementation manner, the training module is specifically configured to update model parameters of the classification model to be trained according to the target loss function based on the prediction tag set and the real tag set, so as to obtain the classification model.
A third aspect of the application provides a computer readable storage medium having instructions stored therein which, when run on a computer, cause the computer to perform the methods of the above aspects.
From the above technical solutions, the embodiment of the present application has the following advantages:
In the embodiment of the application, a method for determining a text label is provided, firstly, a target text and a label to be matched are obtained, the target text comprises at least two text units, the label to be matched comprises at least one attribute label, then, a feature vector set of the target text and a feature vector set of the label to be matched are obtained according to the target text and the label to be matched, a correlation feature set is obtained according to the feature vector set of the target text and the feature vector set of the label to be matched, the correlation feature set comprises correlation features among the text units and the attribute labels, further, the probability that the target text respectively belongs to each attribute label is obtained according to the correlation feature set, finally, the target label corresponding to the target text is determined according to the probability that the target text respectively belongs to each attribute label, and the target label comprises at least one attribute label. By adopting the method, on the basis of considering the information conveyed between the texts, the relevance between the labels and the texts can be further considered, so that the resolution capability of extracting the features is enhanced, and therefore, the acquired feature information can more accurately reflect the texts and the information of the labels, and the accuracy of determining the labels corresponding to the texts is improved.
Drawings
FIG. 1 is a schematic diagram of an architecture of a text label determination system according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an application flow of a text label determination method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of an embodiment of a method for determining text labels according to an embodiment of the present application;
FIG. 4 is a schematic diagram of one embodiment of generating a target text sequence according to an embodiment of the present application;
FIG. 5 is a schematic diagram of another embodiment of generating a target text sequence according to an embodiment of the present application;
FIG. 6 is a diagram of one embodiment of obtaining a set of feature vectors for a target text sequence according to an embodiment of the present application;
FIG. 7 is a schematic diagram of one embodiment of acquiring a set of attention weight vectors according to an embodiment of the present application;
FIG. 8 is a schematic diagram of a classification model according to an embodiment of the present application;
FIG. 9 is a schematic diagram of an embodiment of a text label determining apparatus according to an embodiment of the present application;
FIG. 10 is a diagram of one embodiment of a server according to an embodiment of the present application;
Fig. 11 is a schematic diagram of an embodiment of a terminal device according to an embodiment of the present application.
Detailed Description
The embodiment of the application provides a text label determining method and device, computer equipment and storage medium, wherein an acquired target text comprises at least two text units, and a label to be matched comprises at least one attribute label.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims and in the above drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented, for example, in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "includes" and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus.
Text representation plays an important role in model performance, and labeling of text can be performed through label learning, i.e., multi-label classification learning by characterizing samples. However, using only contextual information to generate a text representation, but ignoring the information conveyed by the tag itself, the resulting classification tag may deviate from the reality, and therefore, how to classify text tags more accurately is a matter of urgency. Based on the above, the embodiment of the application provides a method for determining text labels, which can improve the accuracy of determining labels corresponding to texts.
For ease of understanding, some terms or concepts related to embodiments of the present application are explained.
1. Multi-tag classification
A multi-label classification is a classification of one text sample corresponding to the results of multiple label classifications.
2. Two-way coding characterization model (bidirectional encoder representations from transformers BERT)
BERT is a bi-directional pre-training language representation method, mainly comprising pre-training and fine-training, and please core ideas get a general "language understanding" model by pre-training in a large text corpus and apply it to specific natural language processing (Nature Language processing, NLP) tasks.
Further, the application scenario of the embodiment of the present application is described below, and it can be understood that the method for determining a text label provided by the embodiment of the present application may be executed by a terminal device or may be executed by a server. Referring to fig. 1, fig. 1 is a schematic diagram of an architecture of a text label determining system in an embodiment of the present application, where the text label determining system shown in fig. 1 includes a terminal device and a server. Specifically, after determining the target text and the tag to be matched, the terminal device can determine the target tag (which may be one or more attribute tags) corresponding to the target text from a plurality of attribute tags included in the tag to be matched by using the method provided by the embodiment of the present application. Further, the terminal device can also store the target label corresponding to the target text on the blockchain. Or after the terminal equipment acquires the target text and the label to be matched, the target text and the label to be matched can be selected to be sent to the server, the server determines the target label corresponding to the target text from a plurality of attribute labels included in the label to be matched through the method provided by the embodiment of the application, and then the target label corresponding to the target text is sent to the terminal equipment. Further, the server can also store the target tag corresponding to the target text on the blockchain.
The server related by the application can be an independent physical server, a server cluster or a distributed system formed by a plurality of physical servers, and can also be a cloud server for providing cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (Content Delivery Network, CDNs), basic cloud computing services such as big data and artificial intelligent platforms and the like. The terminal device may be, but is not limited to, a smart phone, a tablet computer, a notebook computer, a desktop computer, a smart speaker, a smart watch, a vehicle-mounted terminal, a smart television, etc. And the terminal device and the server may communicate over a wireless network, a wired network, or a removable storage medium. Wherein the wireless network uses standard communication techniques and/or protocols. The wireless network is typically the internet, but may be any network including, but not limited to, bluetooth, a local area network (Local Area Network, LAN), a metropolitan area network (Metropolitan Area Network, MAN), a wide area network (Wide Area Network, WAN), a mobile, private network, or any combination of virtual private networks. In some embodiments, custom or dedicated data communication techniques may be used in place of or in addition to the data communication techniques described above. The removable storage medium may be a universal serial bus (Universal Serial Bus, USB) flash drive, a removable hard disk, or other removable storage medium, etc.
Although only five terminal devices and one server are shown in fig. 1, it should be understood that the example in fig. 1 is only for understanding the present solution, and the number of specific terminal devices and servers should be flexibly determined according to the actual situation.
The method provided by the embodiment of the application can be applied to information extraction of a Knowledge Graph (knowledgegraph), and the Knowledge Graph is described below. The knowledge graph is a semantic network for revealing the relationship between entities, and the knowledge graph can be logically divided into a mode layer and a data layer, wherein the data layer mainly consists of a series of facts, and the knowledge is stored in units of facts. The fact may be expressed in terms of triples of < entity 1, relationship, entity 2> or < entity, attribute value >.
Secondly, the construction and application of the large-scale knowledge base requires the support of various intelligent information processing technologies. Knowledge elements such as entities, relationships, attributes and the like can be extracted from some of the disclosed semi-structured and unstructured data through knowledge extraction technology. Through knowledge fusion, ambiguity between entities, relations, attributes and other index items and fact objects can be eliminated, and a high-quality knowledge base is formed. Knowledge reasoning is to further mine implicit knowledge based on the existing knowledge base, so as to enrich and expand the knowledge base. The comprehensive vector formed by the distributed knowledge representation has important significance for the construction, reasoning, fusion and application of the knowledge base. The knowledge extraction is mainly oriented to open link data, available knowledge units are extracted through an automatic technology, the knowledge units mainly comprise 3 knowledge elements of entities (extension of concepts), relations and attributes, a series of high-quality fact expressions are formed on the basis of the knowledge elements, and a foundation is laid for the construction of an upper mode layer. Knowledge extraction mainly comprises entity extraction, relation extraction and attribute extraction. Entity extraction, relation extraction and attribute extraction are described as follows:
1. Entity extraction
Entity extraction may also be referred to as Named Entity Recognition (NER), which refers to automatically recognizing named entities from an original corpus. Because the entity is the most basic element in the knowledge graph, the integrity, accuracy, recall rate and the like of extraction directly affect the quality of the knowledge base. Thus, entity extraction is the most fundamental and critical step in knowledge extraction.
2. Relation extraction
The object of relation extraction is to solve the problem of semantic links between entities, and early relation extraction mainly identifies entity relations by manually constructing semantic rules and templates. Subsequently, the relationship model between entities gradually replaces manually predefined grammars and rules.
3. Attribute extraction
Attribute extraction is primarily directed to entities, from which a complete sketch of an entity can be formed. Since the attributes of an entity can be regarded as a type of naming relationship between the entity and the attribute values, the extraction problem of the entity attributes can be converted into a relationship extraction problem.
Based on the above, the method provided by the embodiment of the application can determine through the attribute tag of the target text, namely, the attribute extraction in the description is completed, which is the basis for performing the entity extraction task. For ease of understanding, referring to fig. 2, fig. 2 is a schematic application flow chart of a text label determining method according to an embodiment of the present application, and as shown in fig. 2, specifically:
In step S1, a target text and a tag to be matched are input. For example, wife with the target text "Liu Xiaogong" is Zhu Xiaoer, their children are Liu Yiyi ", and the tags to be matched include" wife "," husband "," child "," couple "," sister "," brother "," grandpa "," milk "," grandma "and" grandma ".
In step S2, a target tag corresponding to the target text is determined from the tags to be matched. For example, based on the target text and the label input to be matched as exemplified in step S1, it may be determined that the target label corresponding to the target text includes "wife", "husband", and "child".
In step S3, entity information is acquired from the target text, and the entity information may be a person, a person name, an article name, or the like. If the actual application requirement is to establish a social relationship graph between names, the entity is the name, and the entity information may include a plurality of names. If the actual application requirement is to establish a relationship map between the articles, the entity is an article name, and the entity information may include a plurality of article names, where the specific entity information needs to be determined according to the actual application requirement. For example, based on the target text exemplified in step S1, entity information of < Liu Xiaogong, zhu Xiaoer >, < Zhu Xiaoer, liu Xiaogong >, < Liu Xiaogong, liu Yiyi >, and < Zhu Xiaoer, liu Yiyi > can be obtained from "Liu Xiaogong' S wife is Zhu Xiaoer, and their children are Liu Yiyi".
In step S4, a triplet is generated according to the target tag corresponding to the target text acquired in step S2 and the entity information acquired in step S3. For example, based on the target tag illustrated in step S2 and the entity information illustrated in step S3, triples of < Liu Xiaogong, wife, zhu Xiaoer >, < Zhu Xiaoer, husband, liu Xiaogong >, < Liu Xiaogong, child, liu Yiyi >, and < Zhu Xiaoer, child, liu Yiyi > may be obtained.
In step S5, a knowledge graph is generated from the triples obtained in step S4. It should be appreciated that after the knowledge-graph is generated, the knowledge-graph can be saved on the blockchain to facilitate querying of the saved knowledge-graph downloaded from the blockchain when later needs apply to social relationships or other relationships between multiple personal names.
In the embodiment of the application, text processing, semantic understanding and the like are needed to be carried out on the target text and the label to be matched based on the NLP in the artificial intelligence field, so that some basic concepts in the artificial intelligence field are introduced before the text label determining method provided by the embodiment of the application begins to be introduced. Artificial intelligence (ARTIFICIAL INTELLIGENCE, AI) is the theory, method, technique, and application system that simulates, extends, and extends human intelligence using a digital computer or a machine controlled by a digital computer, perceives the environment, obtains knowledge, and uses the knowledge to obtain optimal results. In other words, artificial intelligence is an integrated technology of computer science that attempts to understand the essence of intelligence and to produce a new intelligent machine that can react in a similar way to human intelligence. Artificial intelligence, i.e. research on design principles and implementation methods of various intelligent machines, enables the machines to have functions of sensing, reasoning and decision. The artificial intelligence technology is a comprehensive subject, and relates to the technology with wide fields, namely the technology with a hardware level and the technology with a software level. Artificial intelligence infrastructure technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing technologies, operation/interaction systems, mechatronics, and the like. The artificial intelligence software technology mainly comprises a computer vision technology, a voice processing technology, a natural language processing technology, machine learning/deep learning and other directions.
With research and progress of artificial intelligence technology, the artificial intelligence technology is developed in various directions, and NLP is an important direction in the field of computer science and artificial intelligence. It is studying various theories and methods that enable effective communication between a person and a computer in natural language. Natural language processing is a science that integrates linguistics, computer science, and mathematics. Thus, the research in this field will involve natural language, i.e. language that people use daily, so it has a close relationship with the research in linguistics. Natural language processing techniques typically include text processing, semantic understanding, machine translation, robotic questions and answers, knowledge graph techniques, and the like. Second, machine learning (MACHINE LEARNING, ML) is a multi-domain interdisciplinary involving multiple disciplines such as probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory, and the like. It is specially studied how a computer simulates or implements learning behavior of a human to acquire new knowledge or skills, and reorganizes existing knowledge structures to continuously improve own performance. Machine learning is the core of artificial intelligence, a fundamental approach to letting computers have intelligence, which is applied throughout various areas of artificial intelligence. Machine learning and deep learning typically include techniques such as artificial neural networks, confidence networks, reinforcement learning, transfer learning, induction learning, teaching learning, and the like.
In connection with the foregoing description, the solution provided by the embodiment of the present application relates to an artificial intelligence natural language processing technology and a machine learning technology, and the following describes a text label determining method in the present application, referring to fig. 3, fig. 3 is a schematic diagram of one embodiment of the text label determining method in the embodiment of the present application, and as shown in fig. 3, one embodiment of the text label determining method in the embodiment of the present application includes:
101. obtaining a target text and a label to be matched, wherein the target text comprises at least two text units, and the label to be matched comprises at least two attribute labels;
In this embodiment, a target text and a label to be matched are obtained, where the target text includes at least two text units, and the label to be matched includes at least two attribute labels. The text units may be Chinese, e.g., "me" and "you," or the text units may also be English words, e.g., "I", "you", "wife" and "refrigerator," etc.
Secondly, the attribute tags can be social relationships, positional relationships, color attributes and direct attribute descriptions. And the attribute labels can be single or multiple, if single, namely the embodiment of the application provides two classifications, and if multiple, namely the embodiment of the application provides multiple label marks. Illustratively, if the attribute tags are social relationships, the attribute tags may include, but are not limited to, "wife," "husband," "child," "couple," "sister," "brother," "grandmaster," "milk," "foreign company," "grandma," "driver," "secretary," "boss," "first party," and "second party," among others. If the attribute tag is a color attribute, the attribute tag may include, but is not limited to, "black", "white", "blue", "yellow", and "green", etc.
Specifically, taking an attribute tag that a text tag to be determined belongs to a social relationship as an example, because the attribute tag of the social relationship can be stored in a blockchain, if an apparatus executing the method of the embodiment of the present application is deployed at a terminal device, at this time, the terminal device stores the attribute tag of the social relationship (i.e., a tag to be matched), where the tag to be matched may be downloaded from the blockchain or sent from a server to the terminal device, and specifically, the method is not limited herein. If the device for executing the method of the embodiment of the application is deployed on the server, after the terminal equipment acquires the target text, the target text is directly sent to the server, and the server performs subsequent operation through the target text and the self-stored label to be matched. The specific examples are not limited herein.
Illustratively, if the objective is to determine an attribute tag belonging to a social relationship, and the targeted text is "Liu Xiaogong wife" Zhu Xiaoer and their children Liu Yiyi ", the tags to be matched may include" wife "," husband "," child "," couple "," sister "," brother "," grandpa "," milk "," grandma "and" grandma ". If the purpose is to determine the attribute tags belonging to the positional association relationship, and the target text is "computer on shelf and shelf on desk", the tags to be matched may include "upper", "lower", "middle", "inside" and "outside". It should be understood that the foregoing examples are only for understanding the present solution, and the specific target text and the tags to be matched need to be determined according to the specific application scenario and actual requirements, and therefore should not be construed as limiting the present application.
102. According to the target text and the label to be matched, a feature vector set of the target text and a feature vector set of the label to be matched are obtained;
In this embodiment, according to the target text and the tag to be matched acquired in step 101, a feature vector set of the target text and a feature vector set of the tag to be matched can be acquired. Specifically, a text sequence of the target text and a text sequence of the tag to be matched can be generated according to the target text and the tag to be matched, and then the text sequence of the target text and the text sequence of the tag to be matched are subjected to coding processing, so that a feature vector set of the target text and a feature vector set of the tag to be matched are obtained.
It can be appreciated that, since the semantic information of the attribute tag is continuously enriched in adjustment, if the attribute tag has no definition in the dictionary, the attribute tag needs to be relearned, so that the encoding process can be performed by one attribute tag with one encoding bit, that is, single-tag granularity encoding is used when the attribute tag is integrated. However, if the attribute tag is the semantic information of the dictionary itself, the attribute tag of the semantic information can be encoded by means of a plurality of encoding bits of one attribute tag, for example, the attribute tag is a "child", where "child" is one encoding bit and "female" is another encoding bit. Thereby enabling further enrichment of semantic information included in the attribute tags.
103. Acquiring a correlation feature set according to a feature vector set of a target text and a feature vector set of a label to be matched, wherein the correlation feature set comprises correlation features between text units and correlation features between the text units and attribute labels;
In this embodiment, a relevance feature set is obtained according to the feature vector set of the target text and the feature vector set of the tag to be matched obtained in step 102, where the relevance feature set includes relevance features between text units and attribute tags.
Specifically, after the text sequence of the target text and the text sequence of the tag to be matched are encoded, each text unit in the target text can output a corresponding feature vector, at this time, the feature vector corresponding to each text unit forms a feature vector matrix of the target text (i.e. a feature vector set of the target text), and similarly, each attribute tag of the tag to be matched can output a corresponding feature vector, at this time, the feature vector corresponding to each attribute tag forms a feature vector matrix of the tag to be matched (i.e. a feature vector set of the tag to be matched). Based on this, the feature vector matrix of the target text is multiplied by the feature vector matrix of the tag to be matched, so that a similarity matrix (i.e., a set of correlation features) can be obtained, where the similarity matrix can include correlation features between each text unit and between the text unit and the attribute tag.
104. Acquiring the probability that the target text belongs to each attribute tag according to the correlation feature set;
In this embodiment, according to the correlation feature set obtained in step 103, the probability that the target text belongs to each attribute tag is obtained. Specifically, if the tag to be matched is a single attribute tag, the probability obtained at this time is "1" or "0". Secondly, if the tags to be matched are a plurality of attribute tags and comprise an attribute tag A, an attribute tag B and an attribute tag C, the probability A that the target text belongs to the attribute tag A, the probability B that the target text belongs to the attribute tag B and the probability C that the target text belongs to the attribute tag C can be obtained. And the probability A, the probability B and the probability C are normalized, the probability A obtained after normalization is performed, and the sum of the probability B obtained after normalization and the probability C obtained after normalization is 1.
105. And determining a target label corresponding to the target text according to the probability that the target text belongs to each attribute label, wherein the target label comprises at least one attribute label.
In this embodiment, according to the probability that the target text belongs to each attribute tag, determining the target tag corresponding to the target text, where the target tag includes at least one attribute tag. The method for determining the text labels provided by the embodiment of the application can be applied to information extraction of the knowledge graph, and the target labels corresponding to the target texts are determined through the step 105, so that the entity information of the knowledge graph can be smoothly carried out. Illustratively, if the targeted text is "Liu Xiaogong wife" Zhu Xiaoer, their children Liu Yiyi "and the tags to be matched include" wife "," husband "," child "," couple "," sister "and" brother ", then it can be determined that the targeted text corresponds to the targeted tags" wife "," husband "," child "and" couple ". For example, if the target text is "computer on shelf", and the tags to be matched include "upper", "lower", "middle" and "inner" and "outer", then it can be determined that the target tags corresponding to the target text are "upper" and "lower".
It should be understood that the number of attribute tags included in the target tag should be less than or equal to the number of attribute tags included in the tag to be matched, for example, if the number of attribute tags included in the tag to be matched is 10, the number of attribute tags included in the target tag may be any one of 0 to 10, if the number of attribute tags included in the tag to be matched is 1, the number of attribute tags included in the target tag may be 0 or 1, and in the case that the number of attribute tags included in the target tag is 0, it is indicated that the target text cannot be labeled with any one tag.
Specifically, if the tag to be matched is a single attribute tag, that is, the obtained probability is "1" or "0", if the probability is "1", it can be determined that the target text belongs to the attribute tag, that is, if the obtained probability is "1", it can be directly determined that the attribute tag is the target tag, otherwise, it does not belong, that is, the tag of the target text cannot be determined at this time. Secondly, if the tag to be matched is a plurality of attribute tags, determining the target tag from the plurality of attribute tags included in the tag to be matched is required.
In the embodiment of the application, a method for determining a text label is provided, firstly, a target text and a label to be matched are obtained, the target text comprises at least two text units, the label to be matched comprises at least one attribute label, then, a feature vector set of the target text and a feature vector set of the label to be matched are obtained according to the target text and the label to be matched, a correlation feature set is obtained according to the feature vector set of the target text and the feature vector set of the label to be matched, the correlation feature set comprises correlation features among the text units and the attribute labels, further, the probability that the target text respectively belongs to each attribute label is obtained according to the correlation feature set, finally, the target label corresponding to the target text is determined according to the probability that the target text respectively belongs to each attribute label, and the target label comprises at least one attribute label. By adopting the method, on the basis of considering the information conveyed between the texts, the relevance between the labels and the texts can be further considered, so that the resolution capability of extracting the features is enhanced, and therefore, the acquired feature information can more accurately reflect the texts and the information of the labels, and the accuracy of determining the labels corresponding to the texts is improved.
Optionally, based on the embodiment corresponding to fig. 3, in an optional embodiment of the method for determining a text label according to the embodiment of the present application, the label to be matched includes at least two attribute labels;
the set of correlation features also includes correlation features between attribute tags.
In this embodiment, since the tag to be matched can include one or more attribute tags, in the case where the tag to be matched includes at least two attribute tags, the correlation feature set further includes correlation features between attribute tags.
Specifically, based on step 102 described in the embodiment of fig. 3, after the text sequence of the target text and the text sequence of the tag to be matched are encoded, each text unit in the target text can output a corresponding feature vector, and at this time, the feature vector corresponding to each text unit forms a feature vector matrix of the target text (i.e. a feature vector set of the target text), and similarly, each attribute tag of the tag to be matched can output a corresponding feature vector, and at this time, the feature vector corresponding to each attribute tag forms a feature vector matrix of the tag to be matched (i.e. a feature vector set of the tag to be matched). Based on this, the feature vector matrix of the target text is multiplied by the feature vector matrix of the tag to be matched, so that a similarity matrix (i.e., a correlation feature set) can be obtained, and the similarity matrix can include not only the correlation feature between each text unit and the correlation feature between the text unit and the attribute tag, but also the correlation feature between the attribute tags.
In the embodiment of the application, another text label determining method is provided, and by adopting the method, the information conveyed between texts and the information conveyed between labels can be further taken into consideration, so that potential interdependence features can be extracted, the subsequently acquired feature information can accurately reflect the texts and the information fed back by the labels, and the accuracy of determining the labels is further improved.
Optionally, based on the embodiment corresponding to fig. 3, in an optional embodiment of the method for determining a text label according to the embodiment of the present application, the obtaining, according to the target text and the label to be matched, a feature vector set of the target text and a feature vector set of the label to be matched specifically includes:
Generating a target text sequence according to the target text and the label to be matched, wherein the target text sequence comprises a text sequence of the target text and a text sequence of the label to be matched;
And carrying out coding processing on the target text sequence to obtain a feature vector set of the target text and a feature vector set of the label to be matched.
In this embodiment, a target text sequence can be generated according to a target text and a tag to be matched, where the target text sequence includes a text sequence of the target text and a text sequence of the tag to be matched. It will be appreciated that the present embodiment does not limit the order of the text sequence of the target text and the text sequence of the tag to be matched in the target text sequence.
In particular, by the BERT as the basic encoder for encoding, since the basic architecture of BERT is a multi-layer bi-directional self-attention transformer, it is necessary for classification tasks to place a special token [ CLS ] at the beginning of the target text and design the feature vector output by the token [ CLS ] to correspond to the final target text representation. In the scheme, the text sequence of the target text and the text sequence of the label to be matched are uniformly packed into the target text sequence, and the text sequence of the target text and the text sequence of the label to be matched are separated by a special token [ SEP ]. For ease of understanding, referring to fig. 4, fig. 4 is a schematic diagram of an embodiment of generating a target text sequence according to the present application, where, as shown in fig. 4, [ CLS ] is placed at the beginning of the text sequence of the target text, where the target text includes the text sequence of the target text, and where the beginning of the text sequence of the target text is separated from the text sequence of the tag to be matched by [ SEP ], and finally [ SEP ] is also placed, thereby obtaining the target text sequence.
Further, the target text sequence is subjected to coding processing to obtain a feature vector set of the target text and a feature vector set of the label to be matched. Specifically, the corresponding position of each text unit in the target text and each attribute tag in the tags to be matched is output as a corresponding feature vector, and the feature vector is obtained by performing mixed coding on each text unit in the target text and each attribute tag in the tags to be matched on the basis of the global, so that the feature vector of each text unit and the feature vector of each attribute tag can fully learn the correlation feature between the text unit and the text unit, the correlation feature between the text unit and the attribute tag and the correlation feature between the attribute tag and the attribute tag.
Based on the above, after mixed coding, each text unit of the target text can output a corresponding feature vector, and the feature vector corresponding to each text unit forms a feature vector matrix of the target text(I.e., a set of feature vectors for the target text). Secondly, each attribute tag of the tags to be matched can output a corresponding feature vector, and at the moment, the feature vector corresponding to each attribute tag forms a feature vector matrix/>, of the tags to be matched(I.e., the set of feature vectors of the tags to be matched). Then multiplying the feature vector matrix of the target text by the feature vector matrix of the label to be matched, thereby obtaining a similarity matrix (namely a correlation feature set), wherein the similarity matrix can comprise correlation features/>, among each text unitRelevance feature/>, between text units and property tagsCorrelation feature/>, between attribute tags
It should be appreciated that the foregoing examples are presented based on the BERT model as the base encoder for encoding, and in practice, a pre-training (GPT) model may be generated as the base encoder for encoding, the GPT may capture a longer range of information than the recurrent neural network, and the computation speed is faster than the recurrent neural network, and the parallelization is easy. Or may be through other large-scale language models such as deep-seated word-characterization (embeddings from language models, ELMo) models, which are not intended to be exhaustive or detailed herein.
According to the method for acquiring the feature vector set, the association relationship between the text sequence of the target text included in the target text sequence and the text sequence of the label to be matched can be accurately reflected due to the feature information, so that the accuracy of the feature reflected by the feature vector, namely the accuracy of the subsequent acquisition probability, is improved, and the accuracy of label determination is improved.
Optionally, based on the embodiment corresponding to fig. 3, in an optional embodiment of the method for determining a text label according to the embodiment of the present application, the generating a target text sequence according to the target text and the label to be matched specifically includes:
Word segmentation is carried out on the target text to obtain a text sequence of the target text;
Word segmentation is carried out on the tags to be matched to obtain text sequences of the tags to be matched;
And performing splicing processing on the text sequence of the target text and the text sequence of the label to be matched to obtain the target text sequence.
In this embodiment, word segmentation is performed on the target text to obtain a text sequence of the target text, word segmentation is performed on the tag to be matched to obtain a text sequence of the tag to be matched, and based on the text sequence of the target text and the text sequence of the tag to be matched, splicing is performed to obtain the target text sequence. It will be appreciated that the present embodiment does not limit the order of the text sequence of the target text and the text sequence of the tag to be matched in the target text sequence.
Specifically, word segmentation is the basis of natural language processing, and the word segmentation accuracy directly determines the quality of subsequent part-of-speech tagging, syntactic analysis, word vectors and text analysis. English sentences can often use spaces to separate words, and most cases do not need to consider word segmentation issues, except for special cases such as "how many" and "New York". But Chinese is different, and naturally lacks separators, and needs readers to split words and break sentences by themselves. Therefore, word segmentation is required to be performed first in the case of performing the text natural language processing.
At present, during Chinese natural language processing, ambiguity possibly occurring in word segmentation comprises combination ambiguity, intersection ambiguity and true ambiguity, so that different segmentation results have different meanings. For easy understanding, first, different segmentation results caused by different segmentation granularity will be introduced. For example, "the people's republic of China", the word segmentation result of coarse granularity is "the people's republic of China", the word segmentation result of fine granularity is "the people/republic of China", and the word segmentation needs to be carried out at this moment according to the actual application scene to select the coarse granularity or the fine granularity. In addition, in some cases, the Chinese character strings AB, a, and B may form words at the same time, and at this time, combined ambiguity is also easily generated, for example, "he/future/coming/web company bank", "he/future/want/apply/web company bank", where word segmentation processing is required through whole sentence.
Further, the current word segmentation algorithm is mainly divided into two types, one is a dictionary-based rule matching method, and the word segmentation algorithm based on the dictionary is character string matching. And matching the character strings to be matched with a dictionary large enough based on a certain algorithm strategy, and if the matching hits, word segmentation can be performed. According to different matching strategies, the method is divided into a forward maximum matching method, a reverse maximum matching method, two-way matching word segmentation, full segmentation path selection and the like, and is not particularly exhaustive. The other is a machine learning method based on statistics, and the word segmentation algorithm based on statistics is a sequence labeling problem. By labeling the words in the sentence according to their position in the word. Such algorithms are based on machine learning or deep learning, and mainly include, but are not limited to, hidden Markov models (hidden markov model, HMM), conditional random fields (conditional random fields, CRF), support vector machines (support vector machine, SVM), and deep learning.
Based on this, since the text unit may be a chinese character, in this embodiment, word segmentation is performed on the target text, and each word in each target text needs to be segmented as a text unit. For example, the target text is "Liu Xiaogong wife is Zhu Xiaoer", and the text sequence of the target text obtained after the word segmentation is [ Liu ], [ small ], [ red ], [ old ], [ grandma ], [ yes ], [ cinnabar ], [ small ] and [ two ]. Secondly, since semantic information of the attribute tag is continuously enriched in adjustment, words can be used as text units in the attribute tag for segmentation, and each word can be used as text units for segmentation information. For example, the tags to be matched include a "wife", "husband" and a "child", and if the words are divided, the text sequence of the target text obtained after the word division is [ wife ], [ husband ] and [ child ], and if the words are divided, the text sequence of the target text obtained after the word division is [ wife ], [ son ], [ husband ], [ son ] and [ woman ].
For ease of understanding, based on the example of the target text sequence shown in fig. 4, taking the wife with the target text of "Liu Xiaogong" as Zhu Xiaoer, their daughter as Liu Yiyi ", and the tags to be matched including" wife "," husband "," child "," sister "and" brother "as examples, please refer to fig. 5, fig. 5 is a schematic diagram of another embodiment of generating the target text sequence according to the embodiment of the present application, if the target text is subjected to word segmentation processing, the text sequence of the target text shown below is obtained: [ Liu ], [ Xiao ], [ Red ], [ Lao ], [ Ver ], [ Yes ], [ Cinna ], [ Xiao ], [ two ], [ He ], [ [ girl ], [ Er ], [ Ye ], [ one ], each text unit in the target text corresponds to one [ X ] in FIG. 4, so that the text sequence of the target text shown in (A) in FIG. 5 can be obtained. Similarly, if the word is used as the text unit to be segmented, each attribute tag in the tags to be matched corresponds to one [ Y ] in fig. 4, so that the text sequence of the tags to be matched shown in (B) in fig. 5 can be obtained. Since the sequence of the text of the target text and the sequence of the text of the tag to be matched in the sequence of the target text are not limited, the sequence of the target text shown in fig. 5 (C) or the sequence of the target text shown in fig. 5 (D) can be obtained by the concatenation process. The foregoing examples are provided for the understanding of the present application and are not to be construed as limiting the present application.
According to the method for generating the target text sequence through the splicing process, the context and the semantics can be combined with each text through word segmentation processing to conduct more accurate segmentation, so that each text sequence can reflect the semantics of the corresponding text more accurately, different text sequences are spliced, accuracy of acquiring follow-up characteristic information can be improved, and the splicing sequence of each text sequence is not limited, so that flexibility of the scheme can be improved.
Optionally, in an alternative embodiment of the method for determining a text label according to the embodiment of the present application based on the embodiment corresponding to fig. 3, the encoding process is performed on the target text sequence to obtain a feature vector set of the target text and a feature vector set of the label to be matched, which specifically includes:
Coding the text sequence of the target text and the text sequence of the label to be matched to obtain a feature vector corresponding to each text unit and a feature vector corresponding to each attribute label;
generating a feature vector set of the target text according to the feature vector corresponding to each text unit;
and generating a feature vector set of the label to be matched according to the feature vector corresponding to each attribute label.
In this embodiment, the text sequence of the target text and the text sequence of the tag to be matched are encoded to obtain the feature vector corresponding to each text unit and the feature vector corresponding to each attribute tag, and then the feature vector set of the target text is generated according to the feature vector corresponding to each text unit, and the feature vector set of the tag to be matched is generated according to the feature vector corresponding to each attribute tag, so that the feature vector set of the target text sequence can be obtained. Specifically, the feature vector corresponding to each text unit and the feature vector corresponding to each attribute tag are obtained by performing mixed coding on the text sequence of the target text and the text sequence of the tag to be matched based on the global, so that the feature vector of each text unit and the feature vector of each attribute tag can fully learn the correlation feature between the text unit and the text unit, the correlation feature between the text unit and the attribute tag and the correlation feature between the attribute tag and the attribute tag.
For ease of understanding, the description is based on the example of the target text sequence shown in fig. 5, referring to fig. 6, fig. 6 is a schematic diagram of an embodiment of acquiring a feature vector set of the target text sequence according to the embodiment of the present application, as shown in fig. 6,To/>The text sequences constituting the target text, M indicating the length of the text sequence of the target text, and/>To/>The text sequences constituting the tags to be matched, L indicating the length of the text sequences of the tags to be matched. Based on this, pair/>To the point of/>To/>Performing encoding processing, each position of the code will correspondingly output a feature vector, i.e. output the feature vector corresponding to each text unit, e.g./>Corresponding output/>,/>Corresponding outputAnd so on,/>Corresponding output/>. Second, each position of the code can also output a feature vector corresponding to each attribute tag, e.g./>Corresponding output/>,/>Corresponding output/>And so on,/>Corresponding output/>
Further, according to the feature vector corresponding to each text unit,/>To/>And forming a feature vector matrix, wherein the feature vector matrix is a feature vector set of the target text. Similarly, according to the feature vector/>, corresponding to each attribute tag,/>To/>And forming a feature vector matrix, wherein the feature vector matrix is a feature vector set of the tags to be matched.
In the embodiment of the application, the method for acquiring the feature vector set of the target text sequence is provided, and the text sequence of the target text and the text sequence of the tag to be matched are coded based on the global, so that the feature vector of each text unit and the feature vector of each attribute tag can fully learn the correlation features of the text unit and/or the attribute tag, and therefore, the acquired feature vector set of the target text sequence can consider more correlation information among a plurality of text units and/or attribute tags, and the accuracy and the reliability of the feature vector set are improved.
Optionally, based on the embodiment corresponding to fig. 3, in an optional embodiment of the method for determining a text label according to the embodiment of the present application, the obtaining, according to the relevance feature set, a probability that the target text belongs to each attribute label includes:
Acquiring an attention weight vector set according to the correlation feature set, wherein the attention weight vector set comprises at least two attention weight vectors, the attention weight vectors are in one-to-one correspondence with the text units, and the attention weight vectors represent weights of the text units in the target text, which are related to the attribute tags;
acquiring a text feature vector set according to the target text and the attention weight vector set;
and acquiring the probability that the target text respectively belongs to each attribute tag according to the text feature vector set and the tags to be matched.
In this embodiment, firstly, an attention weight vector set is obtained according to a correlation feature set, the attention weight vector set includes at least two attention weight vectors, the attention weight vectors are in one-to-one correspondence with text units, the attention weight vectors represent weights of the text units in a target text related to attribute tags, then, according to the target text and the attention weight vector set, a text feature vector set is obtained, and then, according to the text feature vector set and tags to be matched, probabilities that the target text respectively belongs to each attribute tag are obtained.
Specifically, in this embodiment, the method for measuring the correlation between the text unit of the target text and the attribute expression of the tag to be matched is to multiply the feature vector matrix Hx of the target text by the feature vector matrix Hy of the tag to be matched, that is, the similarity matrix (i.e., the correlation feature set) is obtained as described in the foregoing embodiment, where G is used to indicate the correlation feature set, and the dimension of the correlation feature set is expressed as m×l, where M indicates the length of the text sequence of the target text, and L indicates the length of the text sequence of the tag to be matched. Then according to the target text and the attention weight vector set, a text feature vector set is obtainedThe length of the weight attention vector set is M (i.e., the length of the text sequence of the target text) at this time. Then according to the target text and the attention weight vector set, a text feature vector set is obtained, and the attention vector set/> isspecifically utilizedMultiplying each text unit in the target text can obtain a text representation vector set/>(I.e., a set of text feature vectors).
Further, in the embodiment of the application, the text feature vector set is processed by the neural network full-connection layer of the standard, so that the probability that the target text respectively belongs to each attribute label can be obtained by predicting which relevant marks of the target text are included. Specifically, the probability that the target text belongs to each attribute label is obtained through a formula (1):
;(1)
wherein p is the probability that the target text belongs to each attribute tag respectively, And W is a preset matrix, and b is a preset offset vector. The dimension of the preset matrix W is LThe preset offset vector b is used for fitting the minor offset objectively existing in the relation, and the length of the minor offset is L.
For easy understanding, referring to fig. 7, fig. 7 is a schematic diagram of an embodiment of obtaining an attention weight vector set according to the embodiment of the present application, as shown in fig. 7, a text sequence of a target text and a text sequence of a tag to be matched are first encoded based on a global rule to obtain a feature vector set of the target text and a feature vector set of the tag to be matched, based on which, specifically, a correlation feature set A1 can be obtained by multiplying the feature vector set of the target text by the feature vector set of the tag to be matched, and since the length of the text sequence of the target text is M and the length of the text sequence of the tag to be matched is L, the dimension of the correlation feature set A1 is m×l. Further, after local information in the correlation feature set is strengthened through a convolution window, the convolved correlation feature set A1 is subjected to dimension reduction processing, so that an attention weight vector set A2 can be obtained, and at the moment, the length of the attention weight vector set A2 is L. Further, each text unit of the target text is multiplied by the attention weight vector set, namely a text feature vector set A3 can be obtained, and finally according to the text feature vector set A3 and the labels to be matched, the probability that the target text respectively belongs to each attribute label is output in the introduced mode.
And acquiring the probability that the target text respectively belongs to each attribute tag according to the text feature vector set and the tags to be matched.
Optionally, based on the embodiment corresponding to fig. 3, in an optional embodiment of the method for determining a text label according to the embodiment of the present application, the obtaining the attention weight vector set according to the relevance feature set specifically includes:
carrying out convolution processing on the correlation feature set to obtain an attention weight vector set;
According to the target text and the attention weight vector set, a text feature vector set is obtained, which specifically comprises:
And processing the target text and the attention weight vector set to obtain a text feature vector set.
In this embodiment, the correlation feature set is convolved to obtain the attention weight vector set, that is, the correlation feature set is convolved through a convolution window to strengthen the local information in the correlation feature set, and then the convolved correlation feature set is subjected to maximum pooling (max-pooling) to reduce the dimension, that is, the maximum value in the dimension is taken as the representative of the dimension, and the obtained vector is normalized to obtain the weight attention vector setThe length of the set of weight attention vectors is M (i.e., the length of the text sequence of the target text).
Further, the target text and the attention weight vector set are required to be processed, and the text feature vector set is acquired. I.e. using a set of attention vectorsMultiplying each text element in the target text can obtain an enhanced set of text representation vectors/>(I.e., a set of text feature vectors) that represents a set of vectors/>Can learn the concentration/>The associated information for each text unit gives a higher weight to the more relevant text unit. Illustratively, taking the wife with the target text "Liu Xiaogong" as Zhu Xiaoer, their daughter as Liu Yiyi "and the tags to be matched including" wife "," husband "," child "," sister "and" brother "as examples, the feature vectors of the text units of" wife "and" daughter "will be given a higher weight based on the set of attention vectors by multiplying the set of attention vectors by each text unit in the target text.
In the embodiment of the application, another text label determining method is provided, by adopting the method, local information in the correlation feature set can be enhanced through a convolution window, so that learned and utilized information in a convolution process can be improved, the accuracy and reliability of the attention weight vector set are improved, and secondly, the data resources occupied by the attention weight vector set are reduced due to dimension reduction processing after convolution processing, and the processing efficiency of the attention weight vector set is improved. And thirdly, as the text feature vector set can learn the related information of the attention set and each text unit, the text units which are more related are given higher weight, so that the text feature vector set can more accurately indicate the relation between the text units and the correlation with the label to be matched, the probability of subsequent acquisition can be more close to the real probability, and the accuracy of determining the text label in the scheme is improved.
Optionally, based on the embodiment corresponding to fig. 3, in an optional embodiment of the method for determining a text label according to the embodiment of the present application, the label to be matched includes at least two attribute labels;
according to the probability that the target text belongs to each attribute label, determining the target label corresponding to the target text specifically comprises the following steps:
determining at least one probability that the target text respectively belongs to each attribute tag is larger than a first classification threshold value as a target probability;
And determining the attribute label corresponding to the target probability as the target label corresponding to the target text.
In this embodiment, the tag to be matched includes at least two attribute tags. Based on the above, at least one probability that the target text respectively belongs to each attribute tag is larger than the first classification threshold is determined as the target probability, and the attribute tag corresponding to the target probability is determined as the target tag corresponding to the target text and comprising at least two attribute tags. It should be appreciated that, since the first classification threshold is greater than the first classification threshold, the target probability may be determined, that is, there may be a case where the target label corresponding to the target text includes a plurality of target labels, which is not limited herein. The first classification threshold may be 60%,50% or 65%, etc., and the specific first classification threshold needs to be flexibly determined according to multiple data and actual situations of experimental results, which is not limited herein.
Illustratively, again taking the wife with the target text "Liu Xiaogong" as Zhu Xiaoer, their daughter as Liu Yiyi ", and the tags to be matched include" wife "," husband "," child "," sister "and" brother ", and the first classification probability is 60% as an illustration, if the target text is 80% of the probability of belonging to" wife ",85% of the probability of belonging to" husband ", 75% of the probability of belonging to" child ", 15% of the probability of belonging to" sister ", 20% of the probability of belonging to" brother ", and 80%,85% and 75% are all larger than the first classification probability (60%), 80%,85% and 75% can be determined as the target probabilities. Further, the attribute label corresponding to 80% is "wife", the attribute label corresponding to 85% is "husband", and the attribute label corresponding to 75% is "child", so that the "wife", "husband", and "child" can be determined as the target label corresponding to the target text.
Optionally, based on the embodiment corresponding to fig. 3, in an optional embodiment of the method for determining a text label according to the embodiment of the present application, the label to be matched is a single attribute label;
according to the probability that the target text belongs to each attribute label, determining the target label corresponding to the target text specifically comprises the following steps:
And when the probability that the target text belongs to the attribute label is larger than the second classification threshold, determining the label to be matched as the target label corresponding to the target text.
In this embodiment, the tag to be matched is a single attribute tag. Based on the above, when the probability that the target text belongs to the attribute label is greater than the second classification threshold, the label to be matched is determined to be the target label corresponding to the target text. It should be understood that the label to be matched is a single attribute label, that is, the probability that the target text belongs to the attribute label may be "1" or "0", so the second classification threshold may be a value infinitely close to 0 but greater than 0, infinitely close to 1 but less than 1, for example 0.0001,0.0002, 0.9999, etc., and the specific second classification threshold needs to be flexibly determined according to multiple data and actual situations of experimental results, which is not limited herein. If the probability that the target text belongs to the attribute tag is smaller than the second classification threshold (i.e. the probability that the target text belongs to the attribute tag is "0"), the target tag corresponding to the target text is not determined at this time, and if the probability that the target text belongs to the attribute tag is larger than the second classification threshold (i.e. the probability that the target text belongs to the attribute tag is "1"), the target tag is necessarily single, and the tag to be matched is the target tag at this time.
Illustratively, again taking the wife with the target text of "Liu Xiaogong" as Zhu Xiaoer, their daughter as Liu Yiyi "and the tag to be matched including" wife "and the second classification probability of 0.0001 as an illustration, if the probability that the target text belongs to" wife "is" 1", the tag to be matched may be determined as the target tag corresponding to the target text. Next, taking the wife with the target text of "Liu Xiaogong" as Zhu Xiaoer, their daughter as Liu Yiyi "and the label to be matched as" brother ", and the second classification probability of 0.0001 as an example, if the probability that the target text belongs to" brother "is" 0", the target label corresponding to the target text will not be determined at this time.
In the embodiment of the application, another text label determining method is provided, and when the label to be matched is a plurality of attribute labels or a single attribute label, the labels of the target text can be determined in different modes, so that the feasibility and the flexibility of the scheme are improved.
Optionally, based on the embodiment corresponding to fig. 3, in an optional embodiment of the method for determining a text label according to the embodiment of the present application, the obtaining, according to the target text and the label to be matched, a feature vector set of the target text and a feature vector set of the label to be matched specifically includes:
Based on the target text and the label to be matched, acquiring a feature vector set of the target text and a feature vector set of the label to be matched through a first feature processing layer of the classification model;
according to the feature vector set of the target text and the feature vector set of the label to be matched, obtaining the correlation feature set specifically comprises:
Based on the feature vector set of the target text and the feature vector set of the label to be matched, acquiring a correlation feature set through a second feature processing layer of the classification model;
The method for acquiring the probability that the target text belongs to each attribute tag according to the correlation feature set specifically comprises the following steps:
Based on the correlation feature set, acquiring the probability that the target text belongs to each attribute tag through a convolution layer of the classification model;
according to the probability that the target text belongs to each attribute label, determining the target label corresponding to the target text specifically comprises the following steps:
and determining the target label corresponding to the target text through the full connection layer of the classification model based on the probability that the target text belongs to each attribute label.
In this embodiment, a feature vector set of a target text and a feature vector set of a label to be matched are obtained through a first feature processing layer of a classification model, then a correlation feature set is obtained through a second feature processing layer of the classification model based on the feature vector set of the target text and the feature vector set of the label to be matched, further the probability that the target text belongs to each attribute label is obtained through a convolution layer of the classification model based on the correlation feature set, and finally the target label corresponding to the target text is determined through a full connection layer of the classification model based on the probability that the target text belongs to each attribute label.
In order to facilitate understanding, referring to fig. 8, fig. 8 is a schematic diagram of an architecture of a classification model in an embodiment of the present application, as shown in fig. 8, in a first feature processing layer of the classification model, word segmentation is performed on a target text and a tag to be matched to obtain a text sequence of the target text, a text sequence of a target problem text and a text sequence of the tag to be matched are performed on the text sequence of the target problem text and the text sequence of the tag to be matched to obtain a target text sequence, then, coding is performed on the text sequence of the target text and the text sequence of the tag to be matched by a similar method described in the foregoing embodiment to obtain feature vectors corresponding to each text unit and feature vectors corresponding to each attribute tag, and then a feature vector set of the target text and a feature vector set of the tag to be matched are generated. Based on the feature vector set of the target text and the feature vector set of the label to be matched are output to the second feature processing layer by the first feature processing layer of the classification model, and the second feature processing layer of the classification model obtains a correlation feature set according to the feature vector set of the target text and the feature vector set of the label to be matched.
Further, the second feature processing layer of the classification model outputs a correlation feature set to the convolution layer, the convolution layer of the classification model carries out convolution processing on the correlation feature set to obtain an attention weight vector set, and processes the target text and the attention weight vector set to obtain a text feature vector set, so that the probability that the target text respectively belongs to each attribute tag can be obtained according to the text feature vector set and the tags to be matched. Finally, the convolution layer of the classification model outputs the probability that the target text respectively belongs to each attribute label to the full connection layer, the full connection layer can determine the target label corresponding to the target text according to the probability that the target text respectively belongs to each attribute label,
Since the embodiment of the application can be used as a basic encoder for encoding through BERT, how to acquire the feature vector set of the target text and the feature vector set of the label to be matched through BERT is described in detail below. After the target text sequence is obtained, word embedding processing (Word Embeddings) can be performed on the target text sequence to obtain a word vector set, namely word embedding processing is performed on the text sequence of the target text and the text sequence of the tag to be matched to obtain the word vector set of the target text and the word vector set of the tag to be matched, and the feature vector set of the target text and the feature vector set of the tag to be matched are obtained through K (K is an integer larger than 1) stack layers respectively. Word embedding refers to converting a Word into a Word vector (Word Vectors), and Word embedding may be performed in a one-hot (one-hot) coding manner in machine learning or a Word embedding technique based on a neural network.
Specifically, for each word vector in the word vector set of the target text, outputting an (i+1) th feature vector through an ith stack layer based on the ith feature vector until a kth feature vector is obtained, wherein i is an integer greater than or equal to 1 and less than K, and then obtaining the feature vector set of the target text according to the kth feature vector of each word vector in the word vector set of the target text. Similarly, a feature vector set of tags to be matched may be obtained in a similar manner. And will not be described in detail herein.
In the embodiment of the application, another text label determining method is provided, by adopting the mode, the target labels corresponding to the target texts can be output through each feature processing layer, the convolution layer and the full connection layer in the classification model, the semantic information contained in the target texts and the labels to be matched can be obtained to a greater extent through the feature processing layer, the convolution layer can more accurately determine the relevance between the voice information of each text unit in the target texts and the labels to be matched, so that the probability of outputting higher accuracy is improved, the target labels output through the full connection layer can be closer to real labels, and the accuracy of determining the text labels is further improved on the basis of improving the feasibility of the scheme.
Optionally, on the basis of the embodiment corresponding to fig. 3, in an optional embodiment of the method for determining a text label according to the embodiment of the present application, the method for determining a text label further includes:
Acquiring a target text sample set, a label sample to be matched and a real label set, wherein the target text sample set comprises at least two target text samples, the target text sample comprises at least two text units, and the label sample to be matched comprises at least one attribute label;
Based on the target text sample set and the label sample to be matched, acquiring a feature vector set of the target text sample set and a feature vector set of the label sample to be matched through a first feature processing layer of the classification model to be trained;
Acquiring a correlation feature sample set through a second feature processing layer of the classification model to be trained based on a feature vector set of the target text sample set and a feature vector set of the label sample to be matched, wherein the correlation feature sample set comprises correlation features among text units of each target text sample and attribute labels of each label sample to be matched;
Based on the correlation characteristic sample set, acquiring a probability set of each attribute label of a text unit of each target text sample through a convolution layer of the classification model to be trained;
Based on the probability set of each attribute label of each text unit of the target text sample, acquiring a prediction label set corresponding to the target text sample set through a full connection layer of the classification model to be trained, wherein the prediction label set comprises a plurality of prediction labels, and each prediction label comprises at least one attribute label;
based on the prediction tag set and the real tag set, training the classification model to be trained to obtain the classification model.
In this embodiment, a labeled real tag set is first obtained, and then a model of the classification model to be trained is updated based on the real tag set and the obtained prediction tag set. Specifically, the target text sample set and the label sample to be matched are required to be used as the input of the first feature processing layer of the classification model to be trained, so that the feature vector set of the target text sample set and the feature vector set of the label sample to be matched are output. And then, taking the feature vector set of the target text sample set and the feature vector set of the label sample to be matched as the input of a second feature processing layer of the classification model to be trained, outputting and acquiring a correlation feature sample set, taking the correlation feature sample set as the input of a convolution layer of the classification model to be trained, outputting the probability set that the text unit of each target text sample belongs to each attribute label respectively, and finally taking the obtained probability set as the input of a full connection layer of the classification model to be trained, so as to output a prediction label set corresponding to the target text sample set.
Optionally, based on the embodiment corresponding to fig. 3, in an optional embodiment of the method for determining a text label according to the embodiment of the present application, training a classification model to be trained based on a prediction label set and a real label set to obtain a classification model, which specifically includes:
Based on the prediction tag set and the real tag set, updating model parameters of the classification model to be trained according to the target loss function so as to obtain the classification model.
In this embodiment, based on the prediction tag set and the real tag set, model parameters of the classification model to be trained are updated according to the target loss function, so as to obtain the classification model. Specifically, at this time, the loss value of the target loss function may be determined according to the difference between the prediction tag set and the real tag set corresponding to the prediction tag set, whether the target loss function reaches the convergence condition is determined according to the loss value of the target loss function, and if the convergence condition is not reached, the model parameters of the classification model to be trained are updated by using the loss value of the target loss function. After each time the classification model to be trained obtains a prediction label corresponding to each target text sample in the target text sample set, determining a loss value of the target loss function until the target loss function reaches a convergence condition, and generating the classification model according to model parameters obtained after updating the model parameters for the last time.
Since the optimization objective is able to minimize the possibility of mistakes made to the target text when it is required to predict which of the possible attribute tags of the target text, the embodiment of the present application takes the difference loss between the predicted tag set of the target text and the real tag set of the target text as an example by using the cross entropy loss function, i.e. the target loss function in this embodiment is the following illustrated formula (2):
;(2)
Wherein, For a predictive tag set of target text,/>Is a true tag set of the target text.
Second, the convergence condition of the objective loss function may be that the value of the objective loss function is less than or equal to a first preset threshold, and as an example, the value of the first preset threshold may be 0.005, 0.01, 0.02 or other values approaching 0. The difference between the values of two adjacent times of the objective loss function may be less than or equal to a second preset threshold, and the value of the second threshold may be the same as or different from the value of the threshold, for example, the value of the second preset threshold may be 0.005, 0.01, 0.02, or other values approaching 0, or other convergence conditions may be used, which are not limited herein.
It should be understood that, in practical applications, the objective loss function may also be a mean square error loss function, a sorting loss (sorting loss) function, a focal loss (focal loss) function, and the like, which is not limited herein.
According to the embodiment of the application, the method for training the classification model to be trained is provided, by adopting the mode, the classification model to be trained can be trained based on the label sample to be matched and the real label set, the classification model is obtained, and the reliability of the obtained classification model is ensured. And secondly, stopping updating model parameters of the classification model to be trained when the target loss function is converged, namely finishing training the classification model to be trained, so as to obtain a text matching model which can be used for determining the text label, and realizing the method for determining the text label based on the model, thereby further improving the reliability and feasibility of the scheme.
Referring to fig. 9, fig. 9 is a schematic diagram illustrating an embodiment of a text label determining apparatus according to an embodiment of the present application, and as shown in the drawing, a text label determining apparatus 200 includes:
The obtaining module 201 is configured to obtain a target text and a label to be matched, where the target text includes at least two text units, and the label to be matched includes at least one attribute label;
The obtaining module 201 is further configured to obtain a feature vector set of the target text and a feature vector set of the tag to be matched according to the target text and the tag to be matched;
The obtaining module 201 is further configured to obtain a correlation feature set according to a feature vector set of the target text and a feature vector set of the tag to be matched, where the correlation feature set includes correlation features between text units and the attribute tag;
the obtaining module 201 is further configured to obtain probabilities that the target text belongs to each attribute tag according to the correlation feature set;
The determining module 202 is configured to determine, according to probabilities that the target text belongs to each attribute tag, a target tag corresponding to the target text, where the target tag includes at least one attribute tag.
Optionally, on the basis of the embodiment corresponding to fig. 9, in another embodiment of the text label determining apparatus 200 provided in the embodiment of the present application, the label to be matched includes at least two attribute labels;
the set of correlation features also includes correlation features between attribute tags.
Optionally, in another embodiment of the text label determining apparatus 200 provided in the embodiment of the present application based on the embodiment corresponding to fig. 9, the obtaining module 201 is specifically configured to generate a target text sequence according to a target text and a label to be matched, where the target text sequence includes a text sequence of the target text and a text sequence of the label to be matched;
And carrying out coding processing on the target text sequence to obtain a feature vector set of the target text and a feature vector set of the label to be matched.
Optionally, on the basis of the embodiment corresponding to fig. 9, in another embodiment of the text label determining apparatus 200 provided in the embodiment of the present application, the text label determining apparatus 200 further includes a processing module 203;
The processing module 203 is configured to perform word segmentation processing on the target text to obtain a text sequence of the target text;
Word segmentation is carried out on the tags to be matched to obtain text sequences of the tags to be matched;
And performing splicing processing on the text sequence of the target text and the text sequence of the label to be matched to obtain the target text sequence.
Optionally, in another embodiment of the text label determining apparatus 200 according to the embodiment of the present application, based on the embodiment corresponding to fig. 9, the processing module 203 is specifically configured to encode a text sequence of the target text and a text sequence of the label to be matched to obtain a feature vector corresponding to each text unit and a feature vector corresponding to each attribute label;
generating a feature vector set of the target text according to the feature vector corresponding to each text unit;
and generating a feature vector set of the label to be matched according to the feature vector corresponding to each attribute label.
Optionally, in another embodiment of the text label determining apparatus 200 provided in the embodiment of the present application based on the embodiment corresponding to fig. 9, the obtaining module 201 is specifically configured to obtain, according to the relevance feature set, an attention weight vector set, where the attention weight vector set includes at least two attention weight vectors, the attention weight vectors are in one-to-one correspondence with the text units, and the attention weight vectors represent weights of the text units in the target text related to the attribute labels;
acquiring a text feature vector set according to the target text and the attention weight vector set;
and acquiring the probability that the target text respectively belongs to each attribute tag according to the text feature vector set and the tags to be matched.
Optionally, in another embodiment of the text label determining apparatus 200 provided in the embodiment of the present application based on the embodiment corresponding to fig. 9, the obtaining module 201 is specifically configured to perform convolution processing on the correlation feature set to obtain the attention weight vector set;
The obtaining module 201 is specifically configured to process the target text and the attention weight vector set, and obtain a text feature vector set.
Optionally, on the basis of the embodiment corresponding to fig. 9, in another embodiment of the text label determining apparatus 200 provided in the embodiment of the present application, the label to be matched includes at least two attribute labels;
a determining module 202, configured to determine, as a target probability, at least one probability that the target text respectively belongs to each attribute tag is greater than the first classification threshold;
And determining the attribute label corresponding to the target probability as the target label corresponding to the target text.
Optionally, on the basis of the embodiment corresponding to fig. 9, in another embodiment of the text label determining apparatus 200 provided in the embodiment of the present application, the label to be matched is a single attribute label;
the determining module 202 is specifically configured to determine the tag to be matched as a target tag corresponding to the target text when the probability that the target text belongs to the attribute tag is greater than a second classification threshold;
And determining the attribute label corresponding to the target probability as the target label corresponding to the target text.
Optionally, in another embodiment of the text label determining apparatus 200 provided in the embodiment of the present application based on the embodiment corresponding to fig. 9, the obtaining module 201 is specifically configured to obtain, through a first feature processing layer of the classification model, a feature vector set of the target text and a feature vector set of the label to be matched based on the target text and the label to be matched;
The obtaining module 201 is specifically configured to obtain a correlation feature set through a second feature processing layer of the classification model based on a feature vector set of the target text and a feature vector set of the tag to be matched;
The obtaining module 201 is specifically configured to obtain, based on the correlation feature set, probabilities that the target text belongs to each attribute tag through a convolution layer of the classification model;
the determining module 201 is specifically configured to determine, based on probabilities that the target text belongs to each attribute tag, a target tag corresponding to the target text through a full connection layer of the classification model.
Optionally, on the basis of the embodiment corresponding to fig. 9, in another embodiment of the text label determining apparatus 200 provided in the embodiment of the present application, the text label determining apparatus 200 further includes a training module 204;
The obtaining module 201 is further configured to obtain a target text sample set, a label sample to be matched, and a real label set, where the target text sample set includes at least two target text samples, the target text sample includes at least two text units, and the label sample to be matched includes at least one attribute label;
The obtaining module 201 is further configured to obtain, based on the target text sample set and the tag sample to be matched, a feature vector set of the target text sample set and a feature vector set of the tag sample to be matched through a first feature processing layer of the classification model to be trained;
The obtaining module 201 is further configured to obtain, through a second feature processing layer of the classification model to be trained, a set of correlation feature samples based on the set of feature vectors of the set of target text samples and the set of feature vectors of the label samples to be matched, where the set of correlation feature samples includes a correlation feature between text units of each target text sample and an attribute label of each label sample to be matched;
the obtaining module 201 is further configured to obtain, based on the correlation feature sample set, a probability set that text units of each target text sample belong to each attribute tag through a convolution layer of the classification model to be trained;
The obtaining module 201 is further configured to obtain, based on a probability set that text units of each target text sample belong to each attribute tag, a prediction tag set corresponding to the target text sample set through a full connection layer of the classification model to be trained, where the prediction tag set includes a plurality of prediction tags, and each prediction tag includes at least one attribute tag;
the training module 204 is configured to train the classification model to be trained based on the prediction tag set and the real tag set, so as to obtain the classification model.
Optionally, in another embodiment of the text label determining apparatus 200 according to the embodiment of the present application, based on the embodiment corresponding to fig. 9, the training module 204 is specifically configured to update the model parameters of the classification model to be trained according to the target loss function based on the prediction label set and the real label set, so as to obtain the classification model.
The embodiment of the present application further provides another text label determining apparatus, where the text label determining apparatus may be disposed on a server or may be disposed on a terminal device, and in the present application, taking the text label determining apparatus disposed on the server as an example for explanation, referring to fig. 10, fig. 10 is a schematic diagram of an embodiment of a server in the embodiment of the present application, as shown in the drawing, the server 1000 may generate relatively large differences due to different configurations or performances, and may include one or more central processing units (central processing units, CPU) 1022 (e.g., one or more processors) and a memory 1032, and one or more storage media 1030 (e.g., one or more mass storage devices) storing application programs 1042 or data 1044. Wherein memory 1032 and storage medium 1030 may be transitory or persistent. The program stored on the storage medium 1030 may include one or more modules (not shown), each of which may include a series of instruction operations on a server. Further, central processor 1022 may be configured to communicate with storage medium 1030 to perform a series of instruction operations in storage medium 1030 on server 1000.
The Server 1000 may also include one or more power supplies 1026, one or more wired or wireless network interfaces 1050, one or more input/output interfaces 1058, and/or one or more operating systems 1041, such as a Windows Server TM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTM, or the like.
The steps performed by the server in the above embodiments may be based on the server structure shown in fig. 10.
The CPU 1022 included in the server is used to execute the embodiments shown in fig. 3 and the respective embodiments corresponding to fig. 3.
The application also provides a terminal device, which is used for executing the steps executed by the text label determining device in the embodiment shown in fig. 3 and the corresponding embodiments in fig. 3. As shown in fig. 11, for convenience of explanation, only the portions related to the embodiments of the present application are shown, and specific technical details are not disclosed, please refer to the method portions of the embodiments of the present application. The terminal device is taken as a mobile phone for example for explanation:
fig. 11 is a block diagram showing a part of the structure of a mobile phone related to a terminal provided by an embodiment of the present application. Referring to fig. 11, the mobile phone includes: radio Frequency (RF) circuitry 1110, memory 1120, input unit 1130, display unit 1140, sensors 1150, audio circuit 1160, wireless fidelity (WIRELESS FIDELITY, wiFi) module 1170, processor 1180, power supply 1190, and the like. Those skilled in the art will appreciate that the handset configuration shown in fig. 11 is not limiting of the handset and may include more or fewer components than shown, or may combine certain components, or may be arranged in a different arrangement of components.
The following describes the components of the mobile phone in detail with reference to fig. 11:
The RF circuit 1110 may be used for receiving and transmitting signals during a message or a call, and in particular, after receiving downlink information of a base station, the downlink information is processed by the processor 1180; in addition, the data of the design uplink is sent to the base station. Generally, RF circuitry 1110 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low noise amplifier (Low Noise Amplifier, LNA), a duplexer, and the like. In addition, RF circuitry 1110 may also communicate with networks and other devices via wireless communications. The wireless communication may use any communication standard or protocol including, but not limited to, global System for Mobile communications (Global System of Mobile communication, GSM), general Packet Radio Service (GPRS), code division multiple Access (Code Division Multiple Access, CDMA), wideband code division multiple Access (Wideband Code Division Multiple Access, WCDMA), long term evolution (Long Term Evolution, LTE), email, short message Service (Short MESSAGING SERVICE, SMS), and the like.
The memory 1120 may be used to store software programs and modules, and the processor 1180 executes the software programs and modules stored in the memory 1120 to perform various functional applications and data processing of the cellular phone. The memory 1120 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, phonebook, etc.) created according to the use of the handset, etc. In addition, memory 1120 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device.
The input unit 1130 may be used to receive input numeric or character information and to generate key signal inputs related to user settings and function control of the mobile phone. In particular, the input unit 1130 may include a touch panel 1131 and other input devices 1132. The touch panel 1131, also referred to as a touch screen, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on the touch panel 1131 or thereabout using any suitable object or accessory such as a finger, stylus, etc.), and drive the corresponding connection device according to a predetermined program. Alternatively, the touch panel 1131 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device and converts it into touch point coordinates, which are then sent to the processor 1180, and can receive commands from the processor 1180 and execute them. In addition, the touch panel 1131 may be implemented in various types such as resistive, capacitive, infrared, and surface acoustic wave. The input unit 1130 may include other input devices 1132 in addition to the touch panel 1131. In particular, other input devices 1132 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc.
The display unit 1140 may be used to display information input by a user or information provided to the user as well as various menus of the mobile phone. The display unit 1140 may include a display panel 1141, and optionally, the display panel 1141 may be configured in a form of a Liquid crystal display (Liquid CRYSTAL DISPLAY, LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch panel 1131 may overlay the display panel 1141, and when the touch panel 1131 detects a touch operation thereon or thereabout, the touch panel is transferred to the processor 1180 to determine the type of touch event, and then the processor 1180 provides a corresponding visual output on the display panel 1141 according to the type of touch event. Although in fig. 11, the touch panel 1131 and the display panel 1141 are two separate components to implement the input and output functions of the mobile phone, in some embodiments, the touch panel 1131 may be integrated with the display panel 1141 to implement the input and output functions of the mobile phone.
The handset may also include at least one sensor 1150, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor, wherein the ambient light sensor may adjust the brightness of the display panel 1141 according to the brightness of ambient light, and the proximity sensor may turn off the display panel 1141 and/or the backlight when the mobile phone moves to the ear. As one of the motion sensors, the accelerometer sensor can detect the acceleration in all directions (generally three axes), and can detect the gravity and direction when stationary, and can be used for applications of recognizing the gesture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer gesture calibration), vibration recognition related functions (such as pedometer and knocking), and the like; as for other sensors such as gyroscopes, barometers, hygrometers, thermometers, infrared sensors, etc. that may be further configured in the mobile phone, details are not described here.
Audio circuitry 1160, speaker 1161, and microphone 1162 may provide an audio interface between a user and a cell phone. The audio circuit 1160 may transmit the received electrical signal converted from audio data to the speaker 1161, and may be converted into a sound signal by the speaker 1161 to be output; on the other hand, the microphone 1162 converts the collected sound signals into electrical signals, which are received by the audio circuit 1160 and converted into audio data, which are processed by the audio data output processor 1180 for transmission to, for example, another cell phone via the RF circuit 1110, or which are output to the memory 1120 for further processing.
WiFi belongs to a short-distance wireless transmission technology, and a mobile phone can help a user to send and receive emails, browse webpages, access streaming media and the like through a WiFi module 1170, so that wireless broadband Internet access is provided for the user. Although fig. 11 shows a WiFi module 1170, it is understood that it does not belong to the necessary constitution of the handset.
The processor 1180 is a control center of the handset, connects various parts of the entire handset using various interfaces and lines, performs various functions of the handset and processes data by running or executing software programs and/or modules stored in the memory 1120, and invoking data stored in the memory 1120. In the alternative, processor 1180 may include one or more processing units; preferably, the processor 1180 may integrate an application processor and a modem processor, wherein the application processor primarily handles operating systems, user interfaces, applications, etc., and the modem processor primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 1180.
The handset further includes a power supply 1190 (e.g., a battery) for powering the various components, which may be logically connected to the processor 1180 via a power management system so as to provide for the management of charging, discharging, and power consumption by the power management system.
Although not shown, the mobile phone may further include a camera, a bluetooth module, etc., which will not be described herein.
In an embodiment of the present application, the processor 1180 included in the terminal is configured to perform the embodiment shown in fig. 3 and the respective embodiments corresponding to fig. 3.
In an embodiment of the present application, there is further provided a computer-readable storage medium having stored therein a computer program which, when run on a computer, causes the computer to perform the steps performed by the text label determining apparatus in the method described in the embodiment shown in fig. 3 and the respective described methods corresponding to fig. 3.
There is also provided in an embodiment of the application a computer program product comprising a program which, when run on a computer, causes the computer to perform the steps performed by the text label determining means in the method as described in the embodiment of fig. 3 above.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, which are not repeated herein.
In the several embodiments provided in the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied essentially or in part or all of the technical solution or in part in the form of a software product stored in a storage medium, including instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims (25)

1. A method for determining a text label, comprising:
obtaining a target text and a label to be matched, wherein the target text comprises at least two text units, and the label to be matched comprises at least two attribute labels;
Acquiring a feature vector set of the target text and a feature vector set of the tag to be matched according to the target text and the tag to be matched;
Obtaining a correlation feature set according to the feature vector set of the target text and the feature vector set of the label to be matched, wherein the method comprises the following steps: multiplying a feature vector matrix of a target text by a feature vector matrix of a tag to be matched to obtain a correlation feature set, wherein the correlation feature set comprises correlation features among text units, correlation features among the text units and the attribute tags and correlation features among the attribute tags, and the feature vector is obtained by performing mixed coding on each text unit in the target text and each attribute tag in the tag to be matched on the basis of the global, so that the feature vector of each text unit and the feature vector of each attribute tag learn the correlation features among the text units, the correlation features among the text units and the attribute tags and the correlation features among the attribute tags;
Acquiring the probability that the target text belongs to each attribute tag according to the correlation feature set;
And determining a target label corresponding to the target text according to the probability that the target text belongs to each attribute label, wherein the target label comprises at least one attribute label.
2. The method according to claim 1, wherein the obtaining the feature vector set of the target text and the feature vector set of the tag to be matched according to the target text and the tag to be matched includes:
generating a target text sequence according to the target text and the label to be matched, wherein the target text sequence comprises a text sequence of the target text and a text sequence of the label to be matched;
and carrying out coding processing on the target text sequence to obtain a feature vector set of the target text and a feature vector set of the label to be matched.
3. The method of claim 2, wherein the generating a target text sequence from the target text and the tag to be matched comprises:
Word segmentation is carried out on the target text, and a text sequence of the target text is obtained;
Word segmentation processing is carried out on the tags to be matched to obtain a text sequence of the tags to be matched;
And performing splicing processing on the text sequence of the target text and the text sequence of the label to be matched to obtain the target text sequence.
4. The method according to claim 2, wherein the encoding the target text sequence to obtain the feature vector set of the target text and the feature vector set of the tag to be matched includes:
Coding the text sequence of the target text and the text sequence of the label to be matched to obtain a feature vector corresponding to each text unit and a feature vector corresponding to each attribute label;
generating a feature vector set of the target text according to the feature vector corresponding to each text unit;
And generating the feature vector set of the label to be matched according to the feature vector corresponding to each attribute label.
5. The method according to claim 1, wherein the obtaining, according to the relevance feature set, a probability that the target text belongs to each attribute tag, respectively, includes:
Acquiring an attention weight vector set according to the correlation feature set, wherein the attention weight vector set comprises at least two attention weight vectors, the attention weight vectors are in one-to-one correspondence with the text units, and the attention weight vectors represent weights of the text units in the target text, which are related to the attribute tags;
Acquiring a text feature vector set according to the target text and the attention weight vector set;
And acquiring the probability that the target text respectively belongs to each attribute tag according to the text feature vector set and the tags to be matched.
6. The method of claim 5, wherein said obtaining a set of attention weight vectors from said set of correlation features comprises:
performing convolution processing on the correlation feature set to obtain the attention weight vector set;
the obtaining a text feature vector set according to the target text and the attention weight vector set includes:
and processing the target text and the attention weight vector set to acquire the text feature vector set.
7. The method according to any one of claims 1-6, wherein determining the target label corresponding to the target text according to the probability that the target text belongs to each attribute label, respectively, includes:
determining at least one probability that the target text respectively belongs to each attribute tag is larger than a first classification threshold value as a target probability;
And determining the attribute label corresponding to the target probability as the target label corresponding to the target text.
8. The method according to any one of claims 1-6, wherein the label to be matched is a single attribute label;
The determining the target label corresponding to the target text according to the probability that the target text belongs to each attribute label respectively comprises the following steps:
And when the probability that the target text belongs to the attribute label is larger than a second classification threshold, determining the label to be matched as the target label corresponding to the target text.
9. The method according to any one of claims 1-6, wherein the obtaining the feature vector set of the target text and the feature vector set of the tag to be matched according to the target text and the tag to be matched includes:
based on the target text and the label to be matched, acquiring a feature vector set of the target text and a feature vector set of the label to be matched through a first feature processing layer of a classification model;
The obtaining a correlation feature set according to the feature vector set of the target text and the feature vector set of the tag to be matched includes:
Acquiring the correlation feature set through a second feature processing layer of the classification model based on the feature vector set of the target text and the feature vector set of the label to be matched;
The obtaining, according to the relevance feature set, the probability that the target text belongs to each attribute tag, includes:
based on the correlation feature set, acquiring the probability that the target text belongs to each attribute tag through a convolution layer of a classification model;
The determining the target label corresponding to the target text according to the probability that the target text belongs to each attribute label respectively comprises the following steps:
and determining the target label corresponding to the target text through the full connection layer of the classification model based on the probability that the target text belongs to each attribute label.
10. The method according to claim 9, wherein the method further comprises:
Acquiring a target text sample set, a label sample to be matched and a real label set, wherein the target text sample set comprises at least two target text samples, the target text samples comprise at least two text units, and the label sample to be matched comprises at least one attribute label;
Acquiring a feature vector set of the target text sample set and a feature vector set of the label sample to be matched through a first feature processing layer of a classification model to be trained based on the target text sample set and the label sample to be matched;
Acquiring a correlation feature sample set through a second feature processing layer of the classification model to be trained based on the feature vector set of the target text sample set and the feature vector set of the label sample to be matched, wherein the correlation feature sample set comprises correlation features among text units of each target text sample and attribute labels of each label sample to be matched;
based on the correlation characteristic sample set, acquiring a probability set of each attribute label of a text unit of each target text sample through a convolution layer of the classification model to be trained;
Based on the probability set that the text unit of each target text sample belongs to each attribute label, acquiring a prediction label set corresponding to the target text sample set through a full connection layer of the classification model to be trained, wherein the prediction label set comprises a plurality of prediction labels, and each prediction label comprises at least one attribute label;
And training the classification model to be trained based on the prediction label set and the real label set to obtain the classification model.
11. The method of claim 10, wherein training the classification model to be trained based on the set of predictive labels and the set of real labels to obtain the classification model comprises:
And updating model parameters of the classification model to be trained according to a target loss function based on the prediction tag set and the real tag set to obtain the classification model.
12. A text label determining device, characterized in that the text label determining device comprises:
The device comprises an acquisition module, a matching module and a matching module, wherein the acquisition module is used for acquiring a target text and a label to be matched, the target text comprises at least two text units, and the label to be matched comprises at least two attribute labels;
the acquisition module is further used for acquiring a feature vector set of the target text and a feature vector set of the tag to be matched according to the target text and the tag to be matched;
The obtaining module is further configured to obtain a correlation feature set according to the feature vector set of the target text and the feature vector set of the tag to be matched, where the obtaining module includes: multiplying a feature vector matrix of a target text by a feature vector matrix of a tag to be matched to obtain a correlation feature set, wherein the correlation feature set comprises correlation features among text units, correlation features among the text units and the attribute tags and correlation features among the attribute tags, and the feature vector is obtained by performing mixed coding on each text unit in the target text and each attribute tag in the tag to be matched on the basis of the global, so that the feature vector of each text unit and the feature vector of each attribute tag learn the correlation features among the text units, the correlation features among the text units and the attribute tags and the correlation features among the attribute tags;
the obtaining module is further configured to obtain, according to the correlation feature set, probabilities that the target text belongs to each attribute tag respectively;
the determining module is used for determining a target label corresponding to the target text according to the probability that the target text belongs to each attribute label respectively, wherein the target label comprises at least one attribute label.
13. The apparatus of claim 12, wherein the obtaining module is specifically configured to:
generating a target text sequence according to the target text and the label to be matched, wherein the target text sequence comprises a text sequence of the target text and a text sequence of the label to be matched;
and carrying out coding processing on the target text sequence to obtain a feature vector set of the target text and a feature vector set of the label to be matched.
14. The apparatus of claim 13, further comprising a processing module;
The processing module is used for carrying out word segmentation processing on the target text to obtain a text sequence of the target text; word segmentation processing is carried out on the tags to be matched to obtain a text sequence of the tags to be matched; and performing splicing processing on the text sequence of the target text and the text sequence of the label to be matched to obtain the target text sequence.
15. The apparatus of claim 13, further comprising a processing module;
The processing module is used for:
Coding the text sequence of the target text and the text sequence of the label to be matched to obtain a feature vector corresponding to each text unit and a feature vector corresponding to each attribute label;
generating a feature vector set of the target text according to the feature vector corresponding to each text unit;
And generating the feature vector set of the label to be matched according to the feature vector corresponding to each attribute label.
16. The apparatus of claim 12, wherein the obtaining module is specifically configured to:
Acquiring an attention weight vector set according to the correlation feature set, wherein the attention weight vector set comprises at least two attention weight vectors, the attention weight vectors are in one-to-one correspondence with the text units, and the attention weight vectors represent weights of the text units in the target text, which are related to the attribute tags;
Acquiring a text feature vector set according to the target text and the attention weight vector set;
And acquiring the probability that the target text respectively belongs to each attribute tag according to the text feature vector set and the tags to be matched.
17. The apparatus according to claim 16, wherein the obtaining module is specifically configured to perform convolution processing on the correlation feature set to obtain the attention weight vector set;
the obtaining module is specifically configured to process the target text and the attention weight vector set, and obtain the text feature vector set.
18. The apparatus according to any one of claims 12-17, wherein the determining module is specifically configured to:
determining at least one probability that the target text respectively belongs to each attribute tag is larger than a first classification threshold value as a target probability;
And determining the attribute label corresponding to the target probability as the target label corresponding to the target text.
19. The apparatus according to any one of claims 12-17, wherein the label to be matched is a single attribute label;
The determining module is specifically configured to determine the label to be matched as a target label corresponding to the target text when the probability that the target text belongs to the attribute label is greater than a second classification threshold.
20. The apparatus according to any one of claims 12-17, wherein the obtaining module is specifically configured to obtain, based on the target text and the tag to be matched, a set of feature vectors of the target text and a set of feature vectors of the tag to be matched through a first feature processing layer of a classification model;
The obtaining module is specifically configured to obtain the correlation feature set through a second feature processing layer of the classification model based on the feature vector set of the target text and the feature vector set of the tag to be matched;
the obtaining module is specifically configured to obtain, based on the correlation feature set, probabilities that the target text belongs to each attribute tag through a convolution layer of a classification model;
The determining module is specifically configured to determine, through a full connection layer of the classification model, a target label corresponding to the target text based on a probability that the target text belongs to each attribute label.
21. The apparatus of claim 20, further comprising a training module;
The acquisition module is further configured to acquire a target text sample set, a tag sample to be matched and a real tag set, where the target text sample set includes at least two target text samples, the target text sample includes at least two text units, and the tag sample to be matched includes at least one attribute tag;
the obtaining module is further configured to obtain, based on the target text sample set and the to-be-matched tag sample, a feature vector set of the target text sample set and a feature vector set of the to-be-matched tag sample through a first feature processing layer of a to-be-trained classification model;
The obtaining module is further configured to obtain a set of correlation feature samples through a second feature processing layer of the classification model to be trained based on the set of feature vectors of the set of target text samples and the set of feature vectors of the label samples to be matched, where the set of correlation feature samples includes correlation features between text units of each target text sample and attribute labels of each label sample to be matched;
the obtaining module is further configured to obtain, based on the correlation feature sample set, a probability set that text units of each target text sample belong to each attribute tag through a convolution layer of the classification model to be trained;
The obtaining module is further configured to obtain, based on a probability set that the text unit of each target text sample belongs to each attribute tag, a prediction tag set corresponding to the target text sample set through a full-connection layer of the classification model to be trained, where the prediction tag set includes a plurality of prediction tags, and each prediction tag includes at least one attribute tag;
The training module is configured to train the classification model to be trained based on the prediction tag set and the real tag set, so as to obtain the classification model.
22. The apparatus according to claim 21, wherein the training module is configured to update model parameters of the classification model to be trained according to an objective loss function based on the prediction tag set and the real tag set, so as to obtain the classification model.
23. A computer device, comprising: memory, transceiver, processor, and bus system;
wherein the memory is used for storing programs;
The processor being adapted to execute a program in the memory to implement the method of any one of claims 1 to 11;
the bus system is used for connecting the memory and the processor so as to enable the memory and the processor to communicate.
24. A computer readable storage medium comprising instructions which, when run on a computer, cause the computer to perform the method of any one of claims 1 to 11.
25. A computer program product, characterized in that the computer program product comprises a program which, when run on a computer, causes the computer to perform the method according to any of claims 1 to 11.
CN202110651238.0A 2021-06-10 2021-06-10 Text label determining method and device, computer equipment and storage medium Active CN113821589B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110651238.0A CN113821589B (en) 2021-06-10 2021-06-10 Text label determining method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110651238.0A CN113821589B (en) 2021-06-10 2021-06-10 Text label determining method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113821589A CN113821589A (en) 2021-12-21
CN113821589B true CN113821589B (en) 2024-06-25

Family

ID=78923846

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110651238.0A Active CN113821589B (en) 2021-06-10 2021-06-10 Text label determining method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113821589B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114443847A (en) * 2022-01-27 2022-05-06 北京字节跳动网络技术有限公司 Text classification method, text processing method, text classification device, text processing device, computer equipment and storage medium
CN114491040B (en) * 2022-01-28 2022-12-02 北京百度网讯科技有限公司 Information mining method and device
CN114970537B (en) * 2022-06-27 2024-04-23 昆明理工大学 Cross-border ethnic cultural entity relation extraction method and device based on multi-layer labeling strategy
CN116955630B (en) * 2023-09-18 2024-01-26 北京中关村科金技术有限公司 Text classification method, apparatus, model, device, and computer-readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110008342A (en) * 2019-04-12 2019-07-12 智慧芽信息科技(苏州)有限公司 Document classification method, apparatus, equipment and storage medium
CN110362684A (en) * 2019-06-27 2019-10-22 腾讯科技(深圳)有限公司 A kind of file classification method, device and computer equipment

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110032645B (en) * 2019-04-17 2021-02-09 携程旅游信息技术(上海)有限公司 Text emotion recognition method, system, device and medium
CN110717039B (en) * 2019-09-17 2023-10-13 平安科技(深圳)有限公司 Text classification method and apparatus, electronic device, and computer-readable storage medium
CN112182229A (en) * 2020-11-05 2021-01-05 江西高创保安服务技术有限公司 Text classification model construction method, text classification method and device
CN112541055A (en) * 2020-12-17 2021-03-23 ***股份有限公司 Method and device for determining text label

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110008342A (en) * 2019-04-12 2019-07-12 智慧芽信息科技(苏州)有限公司 Document classification method, apparatus, equipment and storage medium
CN110362684A (en) * 2019-06-27 2019-10-22 腾讯科技(深圳)有限公司 A kind of file classification method, device and computer equipment

Also Published As

Publication number Publication date
CN113821589A (en) 2021-12-21

Similar Documents

Publication Publication Date Title
CN108304846B (en) Image recognition method, device and storage medium
KR102646667B1 (en) Methods for finding image regions, model training methods, and related devices
CN109145303B (en) Named entity recognition method, device, medium and equipment
CN111553162B (en) Intention recognition method and related device
CN110599557B (en) Image description generation method, model training method, device and storage medium
CN113821589B (en) Text label determining method and device, computer equipment and storage medium
KR102360659B1 (en) Machine translation method, apparatus, computer device and storage medium
CN110162770B (en) Word expansion method, device, equipment and medium
CN111428516B (en) Information processing method and device
CN111816159B (en) Language identification method and related device
CN111177371B (en) Classification method and related device
WO2020147369A1 (en) Natural language processing method, training method, and data processing device
CN111597804B (en) Method and related device for training entity recognition model
CN113723378B (en) Model training method and device, computer equipment and storage medium
CN112214605A (en) Text classification method and related device
CN113761122A (en) Event extraction method, related device, equipment and storage medium
CN112749252A (en) Text matching method based on artificial intelligence and related device
CN113392644A (en) Model training method, text information processing method, system, device and storage medium
CN113269279B (en) Multimedia content classification method and related device
CN113111917A (en) Zero sample image classification method and device based on dual self-encoders
CN114840563B (en) Method, device, equipment and storage medium for generating field description information
CN113821609A (en) Answer text acquisition method and device, computer equipment and storage medium
CN113569043A (en) Text category determination method and related device
CN117057345B (en) Role relation acquisition method and related products
CN114840499B (en) Method, related device, equipment and storage medium for generating table description information

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant