CN113821589A - Text label determination method and device, computer equipment and storage medium - Google Patents

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

Info

Publication number
CN113821589A
CN113821589A CN202110651238.0A CN202110651238A CN113821589A CN 113821589 A CN113821589 A CN 113821589A CN 202110651238 A CN202110651238 A CN 202110651238A CN 113821589 A CN113821589 A CN 113821589A
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.)
Pending
Application number
CN202110651238.0A
Other languages
Chinese (zh)
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/CN113821589A/en
Publication of CN113821589A publication Critical patent/CN113821589A/en
Pending legal-status Critical Current

Links

Images

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 a storage medium, wherein the text label determining method comprises the following steps: the method comprises the steps of obtaining a target text and a label to be matched, obtaining a characteristic vector set of the target text and a characteristic vector set of the label to be matched according to the target text and the label to be matched, obtaining a correlation characteristic set according to the characteristic vector set of the target text and the characteristic vector set of the label to be matched, obtaining the probability that the target text belongs to each attribute label respectively according to the correlation characteristic set, and determining the target label corresponding to the target text according to the probability that the target text belongs to each attribute label respectively. By the method, the acquired feature information can reflect the text and the label information more accurately, so that the accuracy of determining the label corresponding to the text is improved.

Description

Text label determination 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 an apparatus for determining text labels, a computer device, and a storage medium.
Background
Textual representations play an important role in model performance. For early models, it was crucial to extract the necessary hand-made features, which could be extracted by Deep Neural Networks (DNNs). Each word in the text can be represented by a specific vector, obtained by word embedding techniques. And Bidirectional Encoding Representation (BERT) models can draw a global dependency relationship between input and output by means of an attention mechanism, and the Bidirectional Encoding Representation (BERT) models are an important turning point for determining task development of text labels.
At present, the multi-label automatic labeling of the text can be realized through multi-label learning, that is, multi-label classification learning is performed after a sample is characterized, wherein the sample can be a text, an image or audio. The contextual word vectors are generated, the dependency among all words is extracted, and context information is provided for the classification task, however, only the context information is used for generating text representation, but the information conveyed by the labels is ignored, and the obtained classification labels may deviate from the real situation, so how to classify the text labels more accurately becomes an urgent problem to be solved.
Disclosure of Invention
The embodiment of the application provides a method and a device for determining text labels, computer equipment and a storage medium, wherein an acquired target text comprises at least two text units, a label to be matched comprises at least one attribute label, and correlation characteristics between the text units and the attribute labels are acquired, so that correlation between the labels and the text can be further considered on the basis of considering information transmitted between the texts, the resolution capability of extracted features is enhanced, the acquired feature information can reflect the text and the information of the labels more accurately, and the accuracy of determining the labels corresponding to the text is improved.
In view of the above, a first aspect of the present application provides a method for determining a text label, including:
the method comprises the steps of obtaining a target text and a to-be-matched label, wherein the target text comprises at least two text units, and the to-be-matched label comprises at least one attribute label;
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;
acquiring a correlation characteristic set according to the characteristic vector set of the target text and the characteristic vector set of the tags to be matched, wherein the correlation characteristic set comprises correlation characteristics among text units and correlation characteristics among the text units and the attribute tags;
obtaining the probability that the target text belongs to each attribute label respectively according to the correlation characteristic set;
and determining target labels corresponding to the target texts according to the probability that the target texts respectively belong to each attribute label, wherein the target labels comprise at least one attribute label.
A second aspect of the present application provides an apparatus for determining a text label, including:
the system 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 label, the target text comprises at least two text units, and the to-be-matched label comprises at least one attribute label;
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 acquisition module is further used for acquiring a correlation feature set according to the feature vector set of the target text and the feature vector set of the tags to be matched, wherein the correlation feature set comprises correlation features between text units and correlation features between the text units and the attribute tags;
the acquisition module is also used for acquiring the probability that the target text belongs to each attribute label respectively according to the correlation characteristic set;
and the determining module is used for determining the 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.
In one possible embodiment, the tags to be matched comprise at least two attribute tags;
the set of relevance features also includes relevance features between the attribute tags.
In a possible implementation manner, the obtaining module is specifically configured to generate a target text sequence 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;
and coding the target text sequence to obtain a characteristic vector set of the target text and a characteristic vector set of the tag to be matched.
In one possible embodiment, the text label determining device further comprises a processing module;
the processing module is used for performing word segmentation processing on the target text to obtain a text sequence of the target text;
performing word segmentation processing on the tags to be matched to obtain a text sequence of the tags to be matched;
and splicing the text sequence of the target text and the text sequence of the tag to be matched to obtain the target text sequence.
In a possible implementation manner, the processing module is specifically configured to perform encoding processing on a text sequence of a target text and a text sequence of a 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 labels to be matched according to the feature vector corresponding to each attribute label.
In one possible embodiment, the obtaining module is specifically configured to obtain an attention weight vector set according to a correlation feature 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 text units, and the attention weight vectors indicate weights of the text units in a target text related to attribute tags;
acquiring a text characteristic vector set according to a target text and an attention weight vector set;
and acquiring the probability that the target text belongs to each attribute label respectively according to the text feature vector set and the labels to be matched.
In a 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;
and 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 the target text belongs to each attribute tag is greater than a first classification threshold;
and determining the attribute label corresponding to the target probability as a target label corresponding to the target text.
In one possible embodiment, the tags to be matched are single attribute tags;
and 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 a possible implementation manner, the obtaining module is specifically configured to obtain, based on a target text and a to-be-matched tag, a feature vector set of the target text and a feature vector set of the to-be-matched tag through a first feature processing layer of a classification model;
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 tag to be matched;
the acquisition module is specifically used for acquiring the probability that the target text belongs to each attribute label through the convolution layer of the classification model based on the correlation characteristic set;
and the determining module is specifically used for 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 respectively.
In one possible embodiment, 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 to-be-matched label sample and a real label set, the target text sample set comprises at least two target text samples, the target text samples comprise at least two text units, and the to-be-matched label sample 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 a feature vector set of the target text sample set and a feature vector set of the to-be-matched label sample, where the correlation feature sample set includes correlation features between text units of each target text sample and correlation features between the text units of each target text sample and attribute labels of each to-be-matched label sample;
the acquisition module is also used for acquiring a probability set that a text unit of each target text sample belongs to each attribute label respectively through the convolution layer of the classification model to be trained based on the correlation characteristic sample set;
the obtaining module is further configured to obtain a prediction label set corresponding to each target text sample set through a full connection layer of the classification model to be trained based on a probability set that a text unit of each target text sample belongs to each attribute label, where the prediction label set includes a plurality of prediction labels, and each prediction label includes at least one attribute label;
and 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 a possible embodiment, the training module is specifically configured to update, based on the predicted label set and the real label set, a model parameter of the classification model to be trained according to the target loss function, so as to obtain the classification model.
A third aspect of the present application provides a computer-readable storage medium having stored therein instructions, which when run on a computer, cause the computer to perform the method of the above-described aspects.
According to the technical scheme, the embodiment of the application has the following advantages:
in the embodiment of the application, a method for determining a text label is provided, which includes obtaining 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, obtaining 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, 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, where the correlation feature set includes correlation features between the text units and the attribute labels, obtaining probabilities that the target text belongs to each attribute label respectively according to the correlation feature set, and determining a target label corresponding to the target text according to the probabilities that the target text belongs to each attribute label respectively, the target tag includes at least one attribute tag. By adopting the method, on the basis of considering the information transmitted between the texts, the correlation between the labels and the texts is further considered, so that the resolution capability of extracting the features is enhanced, 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 in an embodiment of the present application;
fig. 2 is a schematic application flow diagram of a text label determination method in an embodiment of the present application;
FIG. 3 is a schematic diagram of an embodiment of a method for determining a text label in an embodiment of the present application;
FIG. 4 is a diagram illustrating an 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 illustrating an embodiment of obtaining a feature vector set of a target text sequence according to an embodiment of the present application;
FIG. 7 is a diagram of an embodiment of obtaining a set of attention weight vectors according to an embodiment of the present application;
FIG. 8 is an architectural diagram of a classification model in an embodiment of the present application;
fig. 9 is a schematic diagram of an embodiment of a text label determination apparatus in an embodiment of the present application;
FIG. 10 is a schematic diagram of an embodiment of a server in an embodiment of the present application;
fig. 11 is a schematic diagram of an embodiment of a terminal device in the embodiment of the present application.
Detailed Description
The embodiment of the application provides a method and a device for determining text labels, computer equipment and a storage medium, wherein an acquired target text comprises at least two text units, a label to be matched comprises at least one attribute label, and correlation characteristics between the text units and the attribute labels are acquired, so that correlation between the labels and the text can be further considered on the basis of considering information transmitted between the texts, and the acquired feature information can more accurately reflect information of the text and the labels, so that the accuracy of determining the labels corresponding to the text is improved.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims of the present application and in the drawings described above, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the application described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "corresponding" 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, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
The text representation plays an important role in the model performance, and label labeling of the text can be learned through labeling, namely multi-label classification learning is performed after sample characterization. However, only the context information is used to generate the text representation, but the information conveyed by the label itself is ignored, and the obtained classification label may deviate from the true situation, so how to classify the text label more accurately becomes a problem to be solved urgently. Based on this, the embodiment of the application provides a method for determining a text label, which can improve the accuracy of determining a label corresponding to a text.
To facilitate understanding, some terms or concepts related to the embodiments of the present application are explained.
One, multi-label classification
The classification of multi-label classification into one text sample corresponds to the results of multiple label classifications.
Two-way code representation model (BERT)
BERT is a bi-directional pre-training Language representation method, mainly comprising two parts, pre-training and fine-tuning, and please refer to the core concept to obtain a general Language understanding model through pre-training in a large text corpus and apply the model to a specific Natural Language Processing (NLP) task.
Further, an application scenario of the embodiment of the present application is described below, and it can be understood that the method for determining the text label provided by the embodiment of the present application may be executed by a terminal device or a server. Referring to fig. 1, fig. 1 is a schematic diagram of an architecture of a text label determination system in an embodiment of the present application, and as shown in fig. 1, the text label determination system includes a terminal device and a server. Specifically, after determining the target text and the tags to be matched, the terminal device can determine the target tags (which may be one or more attribute tags) corresponding to the target text from the plurality of attribute tags included in the tags to be matched by using the method provided in the embodiment of the present application. Further, the terminal device can also store the target label corresponding to the target text on the block chain. Or after the terminal device obtains the target text and the tags to be matched, the terminal device may select to send the target text and the tags to be matched to the server, and the server determines the target tags corresponding to the target text from the multiple attribute tags included in the tags to be matched by the method provided by the embodiment of the application, and then sends the target tags corresponding to the target text to the terminal device. Further, the server can also store the target label corresponding to the target text on the blockchain.
The server related to 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 providing basic cloud computing services such as cloud service, a cloud database, cloud computing, a cloud function, cloud storage, Network service, cloud communication, middleware service, domain name service, safety service, Content Delivery Network (CDN), big data and an artificial intelligence platform. The terminal device may be, but is not limited to, a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart watch, a vehicle-mounted terminal, a smart television, and the like. And the terminal device and the server can communicate with each other through a wireless network, a wired network or a removable storage medium. Wherein the wireless network described above uses standard communication techniques and/or protocols. The wireless Network is typically the internet, but can be any Network including, but not limited to, bluetooth, Local Area Network (LAN), Metropolitan Area Network (MAN), Wide Area Network (WAN), mobile, private, 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 (USB) flash drive, a removable hard drive or other removable storage medium, and the like.
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 used for understanding the present solution, and the number of the specific terminal devices and the number of the servers should be flexibly determined according to actual situations.
The method provided by the embodiment of the application can be applied to the information extraction of the Knowledge Graph (Knowledge Graph), and the Knowledge Graph is introduced below. The knowledge graph is a semantic network for revealing the relationship between entities, and can be divided into a mode layer and a data layer on a logical structure, wherein the data layer mainly comprises a series of facts, and the knowledge is stored by taking the facts as units. Facts may be expressed in triples of < entity 1, relationship, entity 2> or < entity, attribute value >.
Secondly, the construction and application of the large-scale knowledge base need the support of various intelligent information processing technologies. Knowledge elements such as entities, relationships, attributes and the like can be extracted from some published semi-structured and unstructured data through knowledge extraction technology. Through knowledge fusion, ambiguity between the referent items such as entities, relations and attributes and the fact objects can be eliminated, and a high-quality knowledge base is formed. Knowledge reasoning is to further mine implicit knowledge on the basis of the existing knowledge base, so that the knowledge base is enriched and expanded. 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, and available knowledge units are extracted through an automatic technology, wherein the knowledge units mainly comprise 3 knowledge elements of entities (concept extensions), relations and attributes, and on the basis of the knowledge elements, a series of high-quality fact expressions are formed, so that a foundation is laid for the construction of an upper mode layer. The knowledge extraction mainly comprises entity extraction, relationship extraction and attribute extraction. The following introduces the entity extraction, relationship extraction and attribute extraction, respectively:
first, entity extraction
Entity extraction may also be referred to as Named Entity Recognition (NER), which refers to the automatic recognition of named entities from the original corpus. Since the entity is the most basic element in the knowledge-graph, the completeness, accuracy, recall rate and the like of the extraction directly influence the quality of the knowledge base. Therefore, entity extraction is the most basic and critical step in knowledge extraction.
Second, relation extraction
The goal of relationship extraction is to solve the problem of semantic links between entities, and early relationship extraction mainly identifies entity relationships by manually constructing semantic rules and templates. Subsequently, the relationship model between the entities gradually replaces the manually predefined grammar and rules.
Third, attribute extraction
The attribute extraction is mainly for the entity, and a complete sketch of the entity can be formed through the attribute. Since the attribute of the entity can be regarded as a name relationship between the entity and the attribute value, the extraction problem of the entity attribute can be converted into a relationship extraction problem.
Based on this, the method provided by the embodiment of the present application can determine through the attribute tag of the target text, that is, complete the attribute extraction in the foregoing introduction, which is the basis for performing the entity extraction task. For convenience of understanding, please refer to fig. 2, and fig. 2 is a schematic application flow diagram of a text label determination method in an embodiment of the present application, and as shown in fig. 2, specifically:
in step S1, the target text and the label to be matched are input. For example, the target text is "old woman of liu xiaohong is zhuyi, their children are liu one by one", and the tags to be matched include "wife", "husband", "daughter", "couple", "sister", "brother", "grandmother", "milker", "husband", and "grandmother".
In step S2, a target label corresponding to the target text is determined from the labels to be matched. For example, based on the target text and the input of the tag to be matched illustrated in step S1, it may be determined that the target tag corresponding to the target text includes "wife", "husband", and "child".
In step S3, entity information, such as a person, a person name, and an item name, is acquired from the target text. If the actual application requirement is to establish a social relationship graph between the names, the entities are the names, and one entity information may include a plurality of names. If the actual application requirement is to establish a relationship graph between the articles, the entity is an article name, and one entity information may include a plurality of article names, and the specific entity information needs to be determined according to the actual application requirement. For example, based on the target text illustrated in step S1, the entity information of < liu xiahong, zhu xiao >, < zhu xiao, liu xiao >, < liu xiao, liu, and < zhu xiao, liu from "the wife of liu xiao hong is zhu xiao, and their children are liu.
In step S4, a triple is generated according to the target label 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, triplets of < liu xiao hong, wife, zhu xiao >, < ju xiao, husband, liu xiao hong >, < liu xiao hong, child, liu, and < ju xiao, child, liu.
In step S5, a knowledge graph is generated from the triples acquired 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 a subsequent need applies to social or other relationships between multiple names.
In the embodiment of the application, text processing, semantic understanding and the like are required to be performed on the target text and the to-be-matched label based on the NLP in the artificial intelligence field, so before introduction of the method for determining the text label provided by the embodiment of the application, some basic concepts in the artificial intelligence field are introduced. Artificial Intelligence (AI) is a theory, method, technique and application system that uses a digital computer or a machine controlled by a digital computer to simulate, extend and expand human Intelligence, perceive the environment, acquire knowledge and use the knowledge to obtain the best results. In other words, artificial intelligence is a comprehensive technique of computer science that attempts to understand the essence of intelligence and produce a new intelligent machine that can react in a manner similar to human intelligence. Artificial intelligence is the research of the design principle and the realization method of various intelligent machines, so that the machines have the functions of perception, reasoning and decision making. The artificial intelligence technology is a comprehensive subject and relates to the field of extensive technology, namely the technology of a hardware level and the technology of a software level. The artificial intelligence infrastructure generally includes 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 the like.
With the research and progress of artificial intelligence technology, the artificial intelligence technology is researched in various directions, and NLP is an important direction in the fields of computer science and artificial intelligence. It studies various theories and methods that enable efficient communication between humans and computers using natural language. Natural language processing is a science integrating linguistics, computer science and mathematics. Therefore, the research in this field will involve natural language, i.e. the language that people use everyday, so it is closely related to the research of linguistics. Natural language processing techniques typically include text processing, semantic understanding, machine translation, robotic question and answer, knowledge mapping, and the like. Secondly, Machine Learning (ML) is a multi-domain cross subject, and relates to multiple subjects such as probability theory, statistics, approximation theory, convex analysis, algorithm complexity theory and the like. The special research on how a computer simulates or realizes the learning behavior of human beings so as to acquire new knowledge or skills and reorganize the existing knowledge structure to continuously improve the performance of the computer. Machine learning is the core of artificial intelligence, is the fundamental approach for computers to have intelligence, and is applied to all fields of artificial intelligence. Machine learning and deep learning generally include techniques such as artificial neural networks, belief networks, reinforcement learning, transfer learning, inductive learning, and formal education learning.
With reference to the above description, a scheme provided in an embodiment of the present application relates to a natural language processing technology and a machine learning technology of artificial intelligence, and a method for determining a text label in the present application is described below, please refer to fig. 3, fig. 3 is a schematic diagram illustrating an embodiment of a method for determining a text label in an embodiment of the present application, and as shown in fig. 3, an embodiment of a method for determining a text label in an embodiment of the present application includes:
101. acquiring a target text and a to-be-matched label, wherein the target text comprises at least two text units, and the to-be-matched label comprises at least two attribute labels;
in this embodiment, a target text and a to-be-matched tag are obtained, where the target text includes at least two text units, and the to-be-matched tag includes at least two attribute tags. The text units can be Chinese characters, such as "I" and "you", or the text units can also be English words, such as "I", "you", "wife", and "refresher".
Second, the attribute tags can be social relationships, location relationships, color attributes, and direct attribute descriptions. And the attribute labels can be single or multiple, if single, the embodiment of the application provides two categories, and if multiple, the embodiment of the application provides multiple label marks. Illustratively, if the property labels are social relationships, the property labels may include, but are not limited to, "wife", "husband", "daughter", "wife", "sister", "brother", "grandmother", "milk", "husband", "grandmother", "driver", "secretary", "boss", "first party", and "second party", etc. If the attribute tags are color attributes, the attribute tags may include, but are not limited to, "black," "white," "blue," "yellow," and "green," etc.
Specifically, taking the attribute tag of the social relationship to which the text tag to be determined belongs as an example, since the attribute tag of the social relationship can be stored in the block chain, based on this, if the apparatus for executing the method of the embodiment of the present application is deployed in a terminal device, the terminal device stores the attribute tag of the social relationship (i.e. the tag to be matched), where the tag to be matched may be downloaded from the block chain or sent from a server to the terminal device, which is not limited herein. If the device for executing the method of the embodiment of the application is deployed in a server, the target text is directly sent to the server after the terminal device acquires the target text, and the server performs subsequent operations through the target text and the to-be-matched label stored in the server. The details are not limited herein.
Illustratively, if the objective is to determine attribute tags belonging to social relationships and the target text is "liu xiao hong wife is zhu, and their children are liu one to one", the tags to be matched may include "wife", "husband", "daughter", "wife", "sister", "brother", "grandmother", and "grandmother". If the objective is to determine the attribute tags belonging to the position 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 used for understanding the present solution, and the specific target text and the to-be-matched tag 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. 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;
in this embodiment, according to the target text and the to-be-matched tag obtained in step 101, a feature vector set of the target text and a feature vector set of the to-be-matched tag can be obtained. 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 encoded, 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 understood that, since semantic information of the attribute tags is continuously enriched during adjustment, if there is no definition of the attribute tags in the dictionary, the attribute tags need to be learned again, and therefore, the encoding process can be performed in a manner of one encoding bit for each attribute tag, that is, single-label granularity encoding is used during attribute tag integration. However, if the attribute tag is the semantic information of the dictionary itself, the attribute tag of the semantic information of the dictionary itself may be encoded by means of a plurality of encoding bits of one attribute tag, for example, if the attribute tag is "child", then "child" is one encoding bit, and "woman" is another encoding bit. Thereby enabling to further enrich the semantic information comprised by the attribute tags.
103. Acquiring a correlation characteristic set according to the characteristic vector set of the target text and the characteristic vector set of the tags to be matched, wherein the correlation characteristic set comprises correlation characteristics among text units and correlation characteristics among the text units and the attribute tags;
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 to-be-matched tag obtained in step 102, where the relevance feature set includes relevance features between text units and relevance features between a text unit and an attribute tag.
Specifically, after the text sequence of the target text and the text sequence of the tags 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 it can be known that, similarly, each attribute tag of the tags 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 tags to be matched (i.e., a feature vector set of the tags 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 at this time, the similarity matrix can include correlation features between each text unit and correlation features between the text units and the attribute tags.
104. Obtaining the probability that the target text belongs to each attribute label respectively according to the correlation characteristic set;
in this embodiment, the probability that the target text belongs to each attribute tag is obtained according to the correlation feature set obtained in step 103. 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 include 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 after the probability A, the probability B and the probability C are normalized, the sum of the probability A obtained after normalization, the probability B obtained after normalization and the probability C obtained after normalization is 1.
105. And determining target labels corresponding to the target texts according to the probability that the target texts respectively belong to each attribute label, wherein the target labels comprise at least one attribute label.
In this embodiment, a target label corresponding to a target text is determined according to the probability that the target text belongs to each attribute label, where the target label includes at least one attribute label. The method for determining the text label can be applied to information extraction of the knowledge graph, and the target label corresponding to the target text is determined through the step 105, so that entity information of the knowledge graph can be smoothly performed. Illustratively, if the wife of the target text "liu xiao hong is zhu-bie, their children are liu-one", and the tags to be matched include "wife", "husband", "child", "wife", "sister", and "brother", then the target tags corresponding to the target text can be determined to be "wife", "husband", "child", and "wife". For example, if the target text is "computer on shelf", and the labels to be matched include "upper", "lower", "middle", and "inside" and "outside", then it can be determined that the target labels 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 if the number of attribute tags included in the target tag is 0, it indicates that the target text cannot be labeled with any one of the tags.
Specifically, if the to-be-matched tag is a single attribute tag, that is, the obtained probability is "1" or "0", and the probability is "1", it can be determined that the target text belongs to the attribute tag, that is, under the condition of a single attribute tag, when the obtained probability is "1", the attribute tag can be directly determined as the target tag, otherwise, the target text does not belong, that is, the tag of the target text cannot be determined this time. Secondly, if the to-be-matched tag is a plurality of attribute tags, a target tag needs to be determined from the plurality of attribute tags included in the to-be-matched tag.
In the embodiment of the application, a method for determining a text label is provided, which includes obtaining 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, obtaining 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, 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, where the correlation feature set includes correlation features between the text units and the attribute labels, obtaining probabilities that the target text belongs to each attribute label respectively according to the correlation feature set, and determining a target label corresponding to the target text according to the probabilities that the target text belongs to each attribute label respectively, the target tag includes at least one attribute tag. By adopting the method, on the basis of considering the information transmitted between the texts, the correlation between the labels and the texts is further considered, so that the resolution capability of extracting the features is enhanced, 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, on the basis of the embodiment corresponding to fig. 3, in an optional embodiment of the method for determining a text label provided in the embodiment of the present application, the label to be matched includes at least two attribute labels;
the set of relevance features also includes relevance features between the attribute tags.
In this embodiment, since the to-be-matched tag can include one or more attribute tags, in the case that the to-be-matched tag includes at least two attribute tags, the correlation feature set further includes correlation features between the attribute tags.
Specifically, based on the step 102 introduced 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, 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, it can be known that 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 to-be-matched label, so that a similarity matrix (i.e. a correlation feature set) can be obtained, and the similarity matrix may include not only the correlation features between each text unit and the correlation features between the text units and the attribute labels, but also the correlation features between the attribute labels.
In the embodiment of the application, another text label determination method is provided, and by adopting the above manner, the information transmitted between the texts and the correlation between the labels can be considered, and further the information transmitted between the labels can be extracted, 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 label determination accuracy is further improved.
Optionally, on the basis of the embodiment corresponding to fig. 3, in an optional embodiment of the text label determining method provided in the embodiment of the present application, the obtaining, according to the target text and the to-be-matched label, the feature vector set of the target text and the feature vector set of the to-be-matched label specifically includes:
generating a target text sequence according to the target text and the tags to be matched, wherein the target text sequence comprises a text sequence of the target text and a text sequence of the tags to be matched;
and coding the target text sequence to obtain a characteristic vector set of the target text and a characteristic vector set of the tag 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 can be understood that the present embodiment does not limit the text sequence of the target text and the order of the text sequence of the tag to be matched in the target text sequence.
In particular, with BERT as the base encoder for encoding, since BERT's basic architecture is a multi-layered bi-directional self-attention transformer, then for the classification task it is necessary to put a special token [ CLS ] at the beginning of the target text and to design the feature vectors 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 easy understanding, please refer to fig. 4, fig. 4 is a schematic diagram of an embodiment of generating a target text sequence according to an embodiment of the present application, as shown in fig. 4, a [ CLS ] is placed at the beginning of the text sequence of the target text including the target text, and 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, so that the target text sequence is obtained.
And further, coding the target text sequence to obtain a feature vector set of the target text and a feature vector set of the tag to be matched. Specifically, each text unit in the target text and each attribute label in the labels to be matched are output as corresponding feature vectors, and the feature vectors are obtained by performing mixed coding on each text unit in the target text and each attribute label in the labels to be matched on the basis of the global situation, so that the feature vectors of the text units and the feature vectors of the attribute labels can fully learn the correlation features between the text units and the text units, the correlation features between the text units and the attribute labels, and the correlation features between the attribute labels.
Based on the above, after mixed encoding, 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 H of the target textX(i.e., the set of feature vectors for the target text). Secondly, each attribute label of the labels to be matched can output a corresponding feature vector, and the feature vector corresponding to each attribute label forms a feature vector matrix H of the labels to be matchedY(i.e., the set of feature vectors of the tags to be matched). Then, 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 (namely a correlation feature set) can be obtained, and at the moment, the similarity matrix can comprise correlation features H among each text unitX·HXCorrelation feature H between text units and attribute tagsX·HYAnd correlation characteristics H between attribute labelsY·HY
It should be understood that the foregoing example is introduced based on a BERT model as a basic encoder for encoding, and in practical applications, a generative pre-training (GPT) model can be used as the basic encoder for encoding, and the GPT can capture a longer range of information than a recurrent neural network, and can be calculated faster than the recurrent neural network, and is easy to parallelize. Or other large-scale language models such as an embeddings from language models (ELMo) model, which are not described in detail and are not exhaustive herein.
In the embodiment of the application, a method for acquiring a feature vector set is provided, and by adopting the above manner, the incidence relation between the text sequence of the target text included in the target text sequence and the text sequence of the tag to be matched can be more accurately reflected by the feature information, so that the accuracy of the feature vector reflecting the feature is improved, that is, the accuracy of the subsequent acquisition probability is improved, and the accuracy of tag determination is improved.
Optionally, on the basis of the embodiment corresponding to fig. 3, in an optional embodiment of the text tag determination method provided in the embodiment of the present application, the generating a target text sequence according to the target text and the tag to be matched specifically includes:
performing word segmentation processing on the target text to obtain a text sequence of the target text;
performing word segmentation processing on the tags to be matched to obtain a text sequence of the tags to be matched;
and splicing the text sequence of the target text and the text sequence of the tag to be matched to obtain the target text sequence.
In this embodiment, word segmentation is performed on a target text to obtain a text sequence of the target text, word segmentation is performed on a tag to be matched to obtain a text sequence of the tag to be matched, and based on this, splicing is performed on the text sequence of the target text and the text sequence of the tag to be matched to obtain a target text sequence. It can be understood that the present embodiment does not limit the text sequence of the target text and the order of 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 generally use spaces to separate words, and the word segmentation problem is not considered in most cases except for special cases such as 'how many' and 'New York'. However, Chinese is different, and naturally lacks separators, requiring the reader to self-divide words and break sentences. Therefore, when the Chinese natural language processing is performed, word segmentation processing is required to be performed first.
At present, when the chinese natural language is processed, the possible ambiguities of the segmentation include combinatorial ambiguity, intersection ambiguity and true ambiguity, so different segmentation results have different meanings. For easy understanding, firstly, we will first introduce the combinatorial ambiguity and the different segmentation results caused by different word segmentation granularity. For example, "the people's republic of china", the coarse-grained word segmentation result is "the people's republic of china", the fine-grained word segmentation result is "china/people/republic of china", and at this time, whether coarse-grained or fine-grained is selected according to the actual application scenario when performing word segmentation. In addition, sometimes, in the chinese character string AB, a and B may be formed into words simultaneously, which also easily causes combinatorial ambiguity, such as "his/her bank", "his/her/future/his/her bank", and in this case, word segmentation processing by whole sentence is required.
Secondly, intersection type ambiguity is introduced, different segmentation results share the same characters, and different segmentation results are caused by the difference of front and back combinations. For example, "business virgo" can be classified as "business virgo/girl" and "business virgo/girl" where the word segmentation process is performed by the whole sentence, even in combination with the context. True ambiguity is that there is no problem in the syntax or semantics of the ambiguity itself, and even if the ambiguity is manually split, the ambiguity will occur. For example, "leave no person in rainy day, can be classified into" rainy day/leave no person in visitor day/leave no person in rainy day ". At the moment, the whole sentence cannot be accurately segmented, and the segmentation can be carried out only through the context. If the client does not want to be kept, the client is divided into the previous client. Otherwise, the method is divided into the next one. It is to be understood that the foregoing examples are for word segmentation only, and no limitation to the present solution is to be understood as a result of the word segmentation exemplified.
Further, the current word segmentation algorithms are mainly classified into two categories, one is a rule matching method based on a dictionary, and the word segmentation algorithm based on the dictionary is character string matching. And matching the character strings to be matched with a sufficiently large dictionary based on a certain algorithm strategy, and if the matching is hit, segmenting the words. According to different matching strategies, the method is divided into a forward maximum matching method, a reverse maximum matching method, bidirectional matching segmentation, full segmentation path selection and the like, and the specific details are not exhaustive here. The other is a machine learning method based on statistics, and a word segmentation algorithm based on statistics is a sequence labeling problem. By labeling the words in the sentence according to their positions in the words. Such algorithms are based on machine learning or deep learning, and mainly include, but are not limited to, Hidden Markov Models (HMMs), Conditional Random Fields (CRFs), Support Vector Machines (SVMs), deep learning, and the like.
Based on this, since the text unit may be a chinese character, in this embodiment, the word segmentation processing is performed on the target text, and each character in each target text needs to be segmented as a text unit. For example, if the target text is "the grandma of liu xiao red is vermilion," the text sequences of the target text obtained after the word segmentation processing are [ liu ], [ small ], [ red ], [ of ], [ old ], [ mother ], [ yes ], [ vermilion ], [ small ] and [ two ]. Secondly, since semantic information of the attribute tags is continuously enriched during adjustment, the attribute tags can be divided by taking words as text units, and each word can also be divided by taking each word as a text unit. For example, the tags to be matched include "wife", "husband", "child", and if the tags are divided into words, the text sequences of the target text obtained by the word segmentation are [ wife ], [ husband ], and [ child ], and if the tags are divided into words, the text sequences of the target text obtained by the word segmentation are [ wife ], [ child ], [ husband ], [ child ], and [ female ].
For convenience of understanding, based on the target text sequence example shown in fig. 4, taking the target text as "the wife of liu xiahong is zhubi, their daughter is liu yi", and the to-be-matched labels include "wife", "husband", "child", "sister", and "brother" as an example for explanation, please refer to fig. 5, fig. 5 is another embodiment illustration of generating the target text sequence in the embodiment of the present application, and if the target text is subjected to the word segmentation process, the following text sequences of the target text are obtained: [ Liu ], [ Xiao ], [ Red ], [ old ], [ being ], [ Ju ], [ Xiao ], [ di ], [ other ], [ these ], [ of ], [ female ], [ child ], [ being ], [ Liu ], [ one ], each text element in the target text corresponds to one [ X ] in FIG. 4, and thus 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 for segmentation, 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 fig. 5 (B) can be obtained. Since the text sequence of the target text and the order of the text sequence of the tag to be matched in the target text sequence are not limited, the target text sequence shown in (C) in fig. 5 or the target text sequence shown in (D) in fig. 5 can be obtained by the concatenation processing. The foregoing examples are intended to be illustrative of the present solution and are not to be construed as limiting thereof.
In the embodiment of the application, a method for generating a target text sequence through splicing processing is provided, by adopting the above manner, more accurate segmentation can be performed on each text by combining context and semantics through word segmentation processing, so that each text sequence can more accurately reflect the semantics of the corresponding text, different text sequences are spliced, the accuracy of acquiring subsequent characteristic information can be improved, and the flexibility of the scheme can be improved because the splicing sequence of each text sequence is not limited.
Optionally, on the basis of the embodiment corresponding to fig. 3, in an optional embodiment of the text tag determination method provided in the embodiment of the present application, the encoding processing is performed on the target text sequence to obtain a feature vector set of the target text and a feature vector set of a tag to be matched, and the method specifically includes:
coding the text sequence of the target text and the text sequence of the tags 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 labels to be matched according to the feature vector corresponding to each attribute label.
In this embodiment, a text sequence of a target text and a text sequence of a tag to be matched are encoded to obtain a feature vector corresponding to each text unit and a feature vector corresponding to each attribute tag, a feature vector set of the target text is generated according to the feature vector corresponding to each text unit, and a feature vector set of the tag to be matched is generated according to the feature vector corresponding to each attribute tag, so that a 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 encoding on the text sequence of the target text and the text sequence of the tag to be matched based on the global situation, so that the feature vectors of the text units and the feature vectors of the attribute tags can fully learn the correlation features between the text units and the text units, the correlation features between the text units and the attribute tags, and the correlation features between the attribute tags and the attribute tags.
For convenience of understanding, the description is made based on the target text sequence example shown in fig. 5, please refer to fig. 6, and fig. 6 is a schematic diagram of an embodiment of obtaining a feature vector set of a target text sequence according to an embodiment of the present application, as shown in fig. 6, [ X ]1]To [ X ]M]A text sequence constituting the target text, M indicating the length of the text sequence of the target text, and [ Y1]To [ Y ]L]And forming a text sequence of the tag to be matched, wherein L indicates the length of the text sequence of the tag to be matched. Based on this, to [ X1]To [ X ]M]And [ Y1]To [ Y ]L]Encoding is performed, and each position of the encoding is output with a feature vector, that is, the feature vector corresponding to each text unit, for example, [ X ]1]Corresponding output [ T1(1)],[X2]Corresponding output [ T2(1)]By analogy, [ X ]M]Corresponding output [ TM(1)]. Second, each position of the code can also output a feature vector corresponding to each attribute tag, e.g., [ Y ]1]Corresponding output [ T1(2)],[Y2]Corresponding output [ T2(2)]By analogy, [ Y ]L]Corresponding output [ TL(2)]。
Further, according to the feature vector [ T ] corresponding to each text unit1(1)],[T2(1)]To [ T ]M(1)]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 [ T ] corresponding to each attribute label1(2)],[T2(2)]To [ T ]L(2)]And forming a feature vector matrix, wherein the feature vector matrix is a feature vector set of the label to be matched.
In the embodiment of the application, a method for acquiring a feature vector set of a target text sequence is provided, and in the manner, because the text sequence of the target text and the text sequence of the tags to be matched are coded based on the global situation, the feature vectors of the text units and the feature vectors of the attribute tags can fully learn the correlation features of the text units and/or the attribute tags, so that the acquired feature vector set of the target text sequence can take more correlation information among a plurality of text units and/or attribute tags into account, and the accuracy and reliability of the feature vector set are improved.
Optionally, on the basis of the embodiment corresponding to fig. 3, in an optional embodiment of the text label determining method provided in the embodiment of the present application, the obtaining, according to the correlation feature set, probabilities that the target text belongs to each attribute label respectively specifically 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 correspond to the text units one by one, and the attention weight vectors represent the weight of the text units in the target text related to the attribute tags;
acquiring a text characteristic vector set according to a target text and an attention weight vector set;
and acquiring the probability that the target text belongs to each attribute label respectively according to the text feature vector set and the labels to be matched.
In this embodiment, an attention weight vector set is first obtained according to a correlation feature set, where the attention weight vector set includes at least two attention weight vectors, the attention weight vectors correspond to text units one to one, and the attention weight vectors represent weights of the text units in a target text related to attribute tags, and then a text feature vector set is obtained according to the target text and the attention weight vector set, and then probabilities that the target text belongs to each attribute tag respectively are obtained according to the text feature vector set and tags to be matched.
Specifically, in the scheme, the method for measuring the correlation between the text unit of the target text and the attribute expression of the label to be matched is to aim at the target textThe feature vector matrix Hx of the target text is multiplied by the feature vector matrix Hy of the tag to be matched, that is, the similarity matrix (i.e., the relevant feature set) obtained as described in the foregoing embodiment is obtained, where G indicates the relevant feature set, and the dimension of the relevant feature set is represented as M × L, 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, acquiring a text feature vector set according to the target text and the attention weight vector set
Figure BDA0003111257130000151
The length of the set of weight attention vectors at this time is M (i.e., the length of the text sequence of the target text). And then acquiring a text characteristic vector set according to the target text and the attention weight vector set, and specifically utilizing the attention vector set
Figure BDA0003111257130000152
Multiplying each text unit in the target text can obtain a text expression vector set
Figure BDA0003111257130000153
(i.e., a set of text feature vectors).
Further, in the embodiment of the application, a standard neural network full-link layer is selected to process the text feature vector set, so that which labels related to the target text are marked can be predicted, that is, the probability that the target text belongs to each attribute label can be obtained. Specifically, the probability that the target text belongs to each attribute label is obtained through a formula (1):
Figure BDA0003111257130000154
wherein p is the probability that the target text belongs to each attribute label respectively,
Figure BDA0003111257130000155
and W is a preset matrix and b is a preset offset vector. The dimension of the predetermined matrix W is
Figure BDA0003111257130000156
The preset offset vector b is used for objectively existing tiny offset when the relation is fitted, and the length of the preset offset vector b is L.
For convenience of understanding, based on an example of a feature vector set of a target text sequence shown in fig. 6 for description, please refer to fig. 7, where fig. 7 is an illustration of an embodiment of obtaining an attention weight vector set in 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 context to obtain a feature vector set of the target text and a feature vector set of the tag to be matched, and based on this, a correlation feature set a1 can be obtained by specifically multiplying the feature vector set of the target text by the feature vector set of the tag to be matched. Furthermore, after the local information in the correlation feature set is enhanced through the convolution window, the dimension reduction processing is performed on the correlation feature set a1 after the convolution, so that the attention weight vector set a2 can be obtained, and at this time, 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, that is, the text feature vector set A3 can be obtained, and finally, according to the text feature vector set A3 and the tags to be matched, the probability that the target text belongs to each attribute tag respectively is output in an introduction mode.
According to the text feature vector set and the labels to be matched, the probability that the target text belongs to each attribute label is obtained
Optionally, on the basis of the embodiment corresponding to fig. 3, in an optional embodiment of the text label determining method provided in the embodiment of the present application, the obtaining of the attention weight vector set according to the correlation feature set specifically includes:
performing convolution processing on the correlation characteristic set to obtain an attention weight vector set;
acquiring a text feature vector set according to a target text and an attention weight vector set, wherein the method specifically comprises the following steps:
and processing the target text and the attention weight vector set to obtain a text characteristic vector set.
In this embodiment, the convolution processing is performed on the correlation feature set to obtain the attention weight vector set, that is, the convolution processing is performed on the correlation feature set through a convolution window to strengthen local information in the correlation feature set, then maximum pooling (max-pooling) dimensionality reduction is performed on the convolved correlation feature set, that is, the maximum value in the dimensionality is taken as a representative of the dimensionality, and the weight attention vector set can be obtained by normalizing the obtained vector
Figure BDA0003111257130000157
The set of weight attention vectors has a length M (i.e. the length of the text sequence of the target text).
Further, the target text and the attention weight vector set need to be processed to obtain a text feature vector set. I.e. using a set of attention vectors
Figure BDA0003111257130000158
Multiplying each text unit in the target text can obtain an enhanced text representation vector set
Figure BDA0003111257130000159
(i.e., a set of text feature vectors) that represent a set of vectors
Figure BDA00031112571300001510
Can learn attention set
Figure BDA00031112571300001511
The more relevant text units are given higher weight with respect to the relevant information for each text unit. Illustratively, the wife who targets the text "liu xiao hong is zhu, their daughter is liu one, and the tags to be matched include" wife "," husband "," child "," sister ", and" brother"by way of example, each text unit in the target text is multiplied by a set of attention vectors, which would give higher weight to the feature vectors of the text units of" wife "and" daughter "based on the set of attention vectors.
In the embodiment of the present application, another method for determining a text label is provided, and in the above manner, local information in a correlation feature set can be strengthened through a convolution window, so that learned and utilized information in a convolution process can be obtained, and thus accuracy and reliability of an attention weight vector set are improved. And thirdly, as the text feature vector set can learn the relevant information of the attention set and each text unit, the more relevant text units are endowed with higher weights, so that the text feature vector set can more accurately indicate the relationship between the text units and the relevance between the text feature vector set and the labels to be matched, and the subsequently acquired probability can be closer to the true probability, thereby improving the accuracy of the determination of the text labels in 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 provided in the embodiment of the present application, the label to be matched includes at least two attribute labels;
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 method specifically comprises the following steps:
determining at least one probability that the target text respectively belongs to each attribute label is greater than a first classification threshold value as a target probability;
and determining the attribute label corresponding to the target probability as a target label corresponding to the target text.
In this embodiment, the to-be-matched tag 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 greater than the first classification threshold is determined as a target probability, and the attribute tag corresponding to the target probability is determined as a target tag corresponding to the target text and including at least two attribute tags. It should be understood that, since being greater than the first classification threshold may be determined as the target probability, that is, there may be a case where the target label corresponding to the target text includes a plurality of labels, which is not limited herein. The first classification threshold may be 60%, 50%, or 65%, and the specific first classification threshold needs to be flexibly determined according to actual conditions of multiple data and experimental results, and is not limited herein.
Illustratively, again with the target text "the wife of liu xiao hong is zhu-bi, their daughter is liu-yi", and the labels to be matched include "wife", "husband", "child", "sister" and "brother", and the first classification probability is 60%, illustratively, if the target text has a probability of 80% of "wife", a probability of 85% of "husband", a probability of 75% of "child", a probability of 15% of "sister", a probability of 20% of "brother", and since 80%, 85% and 75% are all greater than the first classification probability (60%), 80%, 85% and 75% can be determined as the target probabilities. Further, 80% of the corresponding attribute tags are "wife", 85% of the corresponding attribute tags are "husband", and 75% of the corresponding attribute tags are "child", so that the "wife", "husband", and "child" can be determined as the target tags corresponding to the target text.
Optionally, on the basis of the embodiment corresponding to fig. 3, in an optional embodiment of the method for determining a text label provided in the embodiment of the present application, the label to be matched is a single attribute label;
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 method specifically comprises the following steps:
and when the probability that the target text belongs to the attribute label is greater than the second classification threshold value, 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 this, when the probability that the target text belongs to the attribute tag is greater than the second classification threshold, the tag to be matched is determined as the target tag 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", and thus the second classification threshold may be a numerical value infinitely close to 0, but greater than 0, and infinitely close to 1, but less than 1, for example, 0.0001, 0.0002, and 0.9999, and the specific second classification threshold needs to be flexibly determined according to the actual situation of multiple data and experimental results, and is not limited herein. If the probability that the target text belongs to the attribute tags is smaller than a second classification threshold (namely the probability that the target text belongs to the attribute tags is '0'), the target tags corresponding to the target text are not determined, if the probability that the target text belongs to the attribute tags is larger than the second classification threshold (namely the probability that the target text belongs to the attribute tags is '1'), the target tags are determined to be single, and the tags to be matched are the target tags.
Illustratively, again taking the target text as "liu xiao hong wife is zhu xiao, their daughter is liu yi", and the tag to be matched includes "wife", and the second classification probability is 0.0001 as an example, if the probability that the target text belongs to "wife" is obtained as "1", the tag to be matched may be determined as the target tag corresponding to the target text. Secondly, taking the target text as "liu xiao hong wife is zhu-bi, their daughter is liu-one", and the to-be-matched label includes "brother", and the second classification probability is 0.0001 as an example, if the probability that the target text belongs to "brother" is obtained as "0", then the target label corresponding to the target text will not be determined at this time.
In the embodiment of the application, another text label determination method is provided, and by adopting the above manner, when the labels to be matched are multiple attribute labels or a single attribute label, the labels of the target text can be determined in different manners, so that the feasibility and the flexibility of the scheme are improved.
Optionally, on the basis of the embodiment corresponding to fig. 3, in an optional embodiment of the text label determining method provided in the embodiment of the present application, the obtaining, according to the target text and the to-be-matched label, the feature vector set of the target text and the feature vector set of the to-be-matched label specifically includes:
based on 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 through a first feature processing layer of a classification model;
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, specifically comprising:
based on the feature vector set of the target text and the feature vector set of the label to be matched, obtaining a correlation feature set through a second feature processing layer of the classification model;
obtaining the probability that the target text belongs to each attribute tag respectively according to the correlation feature set specifically includes:
based on the correlation characteristic set, obtaining the probability that the target text belongs to each attribute label through the convolution layer of the classification model;
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 method specifically comprises the following steps:
and determining the target label corresponding to the target text through a 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 tag to be matched are obtained through a first feature processing layer of a classification model based on the target text and the tag to be matched, 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 tag to be matched, further, probabilities that the target text belongs to each attribute tag are obtained through a convolution layer of the classification model based on the correlation feature set, and finally, a target tag corresponding to the target text is determined through a full-connection layer of the classification model based on the probabilities that the target text belongs to each attribute tag respectively.
For ease of understanding, the specific architecture of the classification model is described below, please refer to fig. 8, fig. 8 is a schematic architecture diagram of the classification model in the embodiment of the present application, as shown in fig. 8, in a first characteristic processing layer of the classification model, word segmentation processing is firstly respectively carried out on a target text and a label 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 text to be matched, splicing the text sequence of the target problem text and the text sequence of the labels to be matched to obtain a target text sequence, then, the text sequence of the target text and the text sequence of the tags to be matched are encoded by the similar method introduced in the foregoing embodiment, so as to obtain the feature vector corresponding to each text unit and the feature vector corresponding to each attribute tag, and then a feature vector set of the target text and a feature vector set of the tags to be matched are generated. Based on the method, the first feature processing layer of the classification model outputs the feature vector set of the target text and the feature vector set of the label to be matched to the second feature processing layer, and the second feature processing layer of the classification model obtains the 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, a second feature processing layer of the classification model outputs a correlation feature set to a convolutional layer, the convolutional layer of the classification model performs convolutional 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 belongs to each attribute tag respectively 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 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 belongs to each attribute label,
since the embodiments of the present application can use BERT as a basic encoder for encoding, how to obtain a feature vector set of a target text and a feature vector set of a tag to be matched by BERT is described in detail below. After the target text sequence is obtained, Word embedding (Word embedding) can be performed on the target text sequence to obtain a Word vector set, that is, the text sequence of the target text and the text sequence of the tags to be matched are subjected to Word embedding to obtain the Word vector set of the target text and the Word vector set of the tags to be matched, and then the feature vector set of the target text and the feature vector set of the tags to be matched are obtained through K (K is an integer greater than 1) stack layers respectively. The Word embedding process is to convert a Word (Word) into a Word vector (Word Vectors) representation, and the Word embedding process may be a one-hot (one-hot) encoding method in machine learning or a Word embedding technology based on a neural network.
Specifically, for each word vector in the word vector set of the target text, based on the ith feature vector, outputting an (i +1) th feature vector through the ith stack layer until a kth feature vector is obtained, where 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 the tag to be matched can be obtained in a similar manner. And will not be described in detail herein.
In the embodiment of the application, another text label determination method is provided, and in the above manner, the target labels corresponding to the target texts can be output through the feature processing layers, the convolution layers and the full connection layers in the classification model, the semantic information included in the target texts and the labels to be matched can be acquired to a greater extent through the feature processing layers, and the convolution layers can more accurately determine the correlation between the voice information of each text unit in the target texts and the labels to be matched, so that a probability with higher accuracy is output, and therefore, the target labels output through the full connection layers can be closer to the real labels, and the text label determination accuracy 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 provided in the embodiment of the present application, the method for determining a text label further includes:
acquiring a target text sample set, a to-be-matched label sample and a real label set, wherein the target text sample set comprises at least two target text samples, each target text sample comprises at least two text units, and each to-be-matched label sample comprises at least one attribute label;
based on a target text sample set and a to-be-matched label sample, acquiring a characteristic vector set of the target text sample set and a characteristic vector set of the to-be-matched label sample through a first characteristic processing layer of a to-be-trained classification model;
based on a feature vector set of a target text sample set and a feature vector set of a to-be-matched label sample, obtaining a correlation feature sample set through a second feature processing layer of a to-be-trained classification model, wherein the correlation feature sample set comprises correlation features between text units of each target text sample and correlation features between the text units of each target text sample and attribute labels of each to-be-matched label sample;
based on the correlation characteristic sample set, acquiring a probability set that a text unit of each target text sample belongs to each attribute label through a convolution layer of a 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 a 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.
In this embodiment, the labeled real label set is first obtained, and then the model of the classification model to be trained is updated based on the real label set and the obtained prediction label set. Specifically, the target text sample set and the to-be-matched label sample need to be used as inputs of a first feature processing layer of the to-be-trained classification model, so that the feature vector set of the target text sample set and the feature vector set of the to-be-matched label sample are output. And then taking the feature vector set of the target text sample set and the feature vector set of the to-be-matched label sample as the input of a second feature processing layer of the to-be-trained classification model, so as to output and obtain a correlation feature sample set, taking the correlation feature sample set as the input of a convolutional layer of the to-be-trained classification model, so as to output a probability set that a 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 to-be-trained classification model, so that a prediction label set corresponding to the target text sample set can be output.
Optionally, on the basis of the embodiment corresponding to fig. 3, in an optional embodiment of the method for determining a text label provided in the embodiment of the present application, based on the predicted label set and the real label set, the classification model to be trained is trained to obtain a classification model, which specifically includes:
and updating 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 to obtain the classification model.
In this embodiment, based on the prediction tag set and the real tag set, the 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 predicted tag set and the real tag set corresponding to the predicted 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 target loss function does not reach the convergence condition, the model parameter of the classification model to be trained is updated by using the loss value of the target loss function. And after the classification model to be trained obtains the prediction label corresponding to each target text sample in the target text sample set, determining the loss value of the target loss function until the target loss function reaches the convergence condition, and generating the classification model according to the model parameters obtained after the model parameters are updated for the last time.
Since the optimization target can minimize the possibility of making an error on the target text when it is required to predict which of the possible attribute tags of the target text is, in the embodiment of the present application, a cross entropy loss function is used to measure the difference loss between the predicted tag set and the real tag set of the target text, that is, the target loss function in the embodiment is the following formula (2):
loss=∑-[yilnpi+(1-yi)ln(1-pi)]; (2)
wherein p isiSet of predicted tags for target text, yiIs the set of real tags of the target text.
Secondly, the convergence condition of the target loss function may be that the value of the target loss function is less than or equal to a first preset threshold, for example, the value of the first preset threshold may be 0.005, 0.01, 0.02 or other values approaching 0. For example, the value of the second preset threshold may be 0.005, 0.01, 0.02 or other values close to 0, and other convergence conditions may also be adopted, which is 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 ranking loss (ranking loss) function, a focal loss (focal loss) function, and the like, and is not limited herein.
In the embodiment of the application, the method for training the classification model to be trained is provided, and by adopting the mode, the method for training the model can be used for training the classification model to be trained based on the label sample to be matched and the real label set to obtain the classification model, and the reliability of the obtained classification model is ensured. Secondly, when the target loss function reaches convergence, the model parameters of the classification model to be trained are stopped from being updated, that is, the training of the classification model to be trained is completed, so that a text matching model which can be used for text label determination is obtained, the method for determining the text label introduced in the embodiment can be realized based on the model, and the reliability and the feasibility of the scheme are further improved.
Referring to fig. 9, fig. 9 is a schematic diagram of an embodiment of a device for determining a text label in an embodiment of the present application, and as shown in the drawing, the device 200 for determining a text label includes:
the acquiring module 201 is configured to acquire a target text and a to-be-matched tag, where the target text includes at least two text units, and the to-be-matched tag includes at least one attribute tag;
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 relevant feature set according to a feature vector set of a target text and a feature vector set of a tag to be matched, where the relevant feature set includes relevant features between text units and relevant features between a text unit and an attribute tag;
the obtaining module 201 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 202 is configured to determine, according to the probability 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 apparatus 200 for determining text labels provided in the embodiment of the present application, the labels to be matched include at least two attribute labels;
the set of relevance features also includes relevance features between the attribute tags.
Optionally, on the basis of the embodiment corresponding to fig. 9, in another embodiment of the device 200 for determining a text label provided in the embodiment of the present application, 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 coding the target text sequence to obtain a characteristic vector set of the target text and a characteristic vector set of the tag to be matched.
Optionally, on the basis of the embodiment corresponding to fig. 9, in another embodiment of the apparatus 200 for determining a text label provided in the embodiment of the present application, the apparatus 200 for determining a text label 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;
performing word segmentation processing on the tags to be matched to obtain a text sequence of the tags to be matched;
and splicing the text sequence of the target text and the text sequence of the tag to be matched to obtain the target text sequence.
Optionally, on the basis of the embodiment corresponding to fig. 9, in another embodiment of the device 200 for determining text labels provided in the embodiment of the present application, the processing module 203 is specifically configured to perform encoding processing on a text sequence of a target text and a text sequence of a label to be matched, so as 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 labels to be matched according to the feature vector corresponding to each attribute label.
Optionally, on the basis of the embodiment corresponding to fig. 9, in another embodiment of the device 200 for determining text labels provided in the embodiment of the present application, the obtaining module 201 is specifically configured to obtain an attention weight vector set according to the correlation feature 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 text units, and the attention weight vectors indicate weights of the text units in the target text related to the attribute labels;
acquiring a text characteristic vector set according to a target text and an attention weight vector set;
and acquiring the probability that the target text belongs to each attribute label respectively according to the text feature vector set and the labels to be matched.
Optionally, on the basis of the embodiment corresponding to fig. 9, in another embodiment of the apparatus 200 for determining a text label provided in the embodiment of the present application, the obtaining module 201 is specifically configured to perform convolution processing on the correlation feature set to obtain an 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 apparatus 200 for determining text labels provided in the embodiment of the present application, the labels to be matched include at least two attribute labels;
a determining module 202, configured to determine, as a target probability, at least one probability that a target text belongs to each attribute tag is greater than a first classification threshold;
and determining the attribute label corresponding to the target probability as a target label corresponding to the target text.
Optionally, on the basis of the embodiment corresponding to fig. 9, in another embodiment of the apparatus 200 for determining a text label 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, when the probability that the target text belongs to the attribute tag is greater than the second classification threshold, the tag to be matched as the target tag corresponding to the target text;
and determining the attribute label corresponding to the target probability as a target label corresponding to the target text.
Optionally, on the basis of the embodiment corresponding to fig. 9, in another embodiment of the device 200 for determining a text label provided in the embodiment of the present application, the obtaining module 201 is specifically configured to obtain, based on 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 through a first feature processing layer of the classification model;
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;
an obtaining module 201, specifically configured to obtain, based on the correlation feature set, probabilities that the target text belongs to each attribute tag through the convolution layer of the classification model;
the determining module 201 is specifically configured to determine, based on the probability 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 apparatus 200 for determining a text label provided in the embodiment of the present application, the apparatus 200 for determining a text label further includes a training module 204;
the obtaining module 201 is further configured to obtain a target text sample set, a to-be-matched label sample and a real label set, where the target text sample set includes at least two target text samples, the target text samples include at least two text units, and the to-be-matched label sample includes at least one attribute label;
the obtaining module 201 is further configured to obtain, based on the target text sample set and the to-be-matched label sample, a feature vector set of the target text sample set and a feature vector set of the to-be-matched label sample through a first feature processing layer of the to-be-trained classification model;
the obtaining module 201 is further configured to obtain a relevant 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 to-be-matched label sample, where the relevant feature sample set includes a relevant feature between text units of each target text sample and a relevant feature between a text unit of each target text sample and an attribute label of each to-be-matched label sample;
the obtaining module 201 is further configured to obtain, based on the correlation feature sample set, a probability set that a text unit of each target text sample belongs to each attribute label through a convolution layer of the classification model to be trained;
the obtaining module 201 is further configured to obtain, based on that the text unit of each target text sample respectively belongs to the probability set of each attribute label, a prediction label set corresponding to the target text sample set through a full-link layer of the classification model to be trained, where the prediction label set includes a plurality of prediction labels, and each prediction label includes at least one attribute label;
the training module 204 is configured to train the classification model to be trained based on the prediction label set and the real label set to obtain a classification model.
Optionally, on the basis of the embodiment corresponding to fig. 9, in another embodiment of the apparatus 200 for determining text labels provided in the embodiment of the present application, the training module 204 is specifically configured to update model parameters of a classification model to be trained according to an objective loss function based on the predicted label set and the real label set, so as to obtain the classification model.
An embodiment of the present application further provides another apparatus for determining a text label, where the apparatus for determining a text label may be disposed in a server or a terminal device, and in the present application, the apparatus for determining a text label is disposed in a server as an example for explanation, please refer to fig. 10, where fig. 10 is a schematic diagram of an embodiment of a server in the embodiment of the present application, as shown in the figure, the server 1000 may generate a relatively large difference due to different configurations or performances, and may include one or more Central Processing Units (CPUs) 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 an application 1042 or data 1044. Memory 1032 and storage medium 1030 may be, among other things, transient or persistent storage. 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 for the server. Still further, a central processor 1022 may be disposed in communication with the storage medium 1030, and configured to execute a series of instruction operations in the storage medium 1030 on the 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 ServerTM,Mac OS XTM,UnixTM,LinuxTM,FreeBSDTMAnd so on.
The steps performed by the server in the above embodiment may be based on the server structure shown in fig. 10.
The server includes a CPU 1022 for executing the embodiment shown in fig. 3 and the corresponding embodiments in 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 parts related to the embodiments of the present application are shown, and details of the technology are not disclosed, please refer to the method part of the embodiments of the present application. Taking a terminal device as a mobile phone as an example for explanation:
fig. 11 is a block diagram illustrating a partial structure of a mobile phone related to a terminal provided in an embodiment of the present application. Referring to fig. 11, the cellular phone includes: radio Frequency (RF) circuitry 1110, memory 1120, input unit 1130, display unit 1140, sensors 1150, audio circuitry 1160, wireless fidelity (WiFi) module 1170, processor 1180, and power supply 1190. Those skilled in the art will appreciate that the handset configuration shown in fig. 11 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile phone in detail with reference to fig. 11:
RF circuit 1110 may be used for receiving and transmitting signals during a message transmission or call, and in particular, for receiving downlink messages from a base station and then processing the received downlink messages to processor 1180; in addition, the data for designing uplink is transmitted to the base station. In general, RF circuit 1110 includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the 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 communication (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), and the like.
The memory 1120 may be used to store software programs and modules, and the processor 1180 may execute various functional applications and data processing of the mobile phone by operating the software programs and modules stored in the memory 1120. 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 by 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, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the 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 generate key signal inputs related to user settings and function control of the cellular phone. Specifically, the input unit 1130 may include a touch panel 1131 and other input devices 1132. Touch panel 1131, also referred to as a touch screen, can collect touch operations of a user on or near the touch panel 1131 (for example, operations of the user on or near touch panel 1131 by using any suitable object or accessory such as a finger or a stylus pen), and drive corresponding connection devices according to a preset program. Alternatively, the touch panel 1131 may include two parts, namely, a touch detection device and a touch controller. The touch detection device detects the touch direction 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, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 1180, and can receive and execute commands sent by the processor 1180. In addition, the touch panel 1131 can be implemented by using 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, a mouse, a joystick, and the like.
The display unit 1140 may be used to display information input by the user or information provided to the user and various menus of the cellular phone. The Display unit 1140 may include a Display panel 1141, and optionally, the Display panel 1141 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch panel 1131 can cover the display panel 1141, and when the touch panel 1131 detects a touch operation on or near the touch panel, the touch panel is transmitted to the processor 1180 to determine the type of the touch event, and then the processor 1180 provides a corresponding visual output on the display panel 1141 according to the type of the touch event. Although in fig. 11, the touch panel 1131 and the display panel 1141 are two independent components to implement the input and output functions of the mobile phone, in some embodiments, the touch panel 1131 and the display panel 1141 may be integrated 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 magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
Audio circuitry 1160, speakers 1161, and microphone 1162 may provide an audio interface between a user and a cell phone. The audio circuit 1160 may transmit the electrical signal converted from the received audio data to the speaker 1161, and convert the electrical signal into a sound signal for output by the speaker 1161; 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 then processed by the audio data output processor 1180, and then transmitted to, for example, another cellular phone via the RF circuit 1110, or output to the memory 1120 for further processing.
WiFi belongs to short-distance wireless transmission technology, and the cell phone can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 1170, and provides wireless broadband internet access for the user. Although fig. 11 shows the WiFi module 1170, it is understood that it does not belong to the essential component of the handset.
The processor 1180 is a control center of the mobile phone, and is connected to various parts of the whole mobile phone through various interfaces and lines, and executes various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 1120 and calling data stored in the memory 1120, thereby performing overall monitoring of the mobile phone. Optionally, processor 1180 may include one or more processing units; preferably, the processor 1180 may integrate an application processor, which mainly handles operating systems, user interfaces, application programs, etc., and a modem processor, which mainly handles wireless communications. It will be appreciated that the modem processor described above may not be integrated within processor 1180.
The phone also includes a power supply 1190 (e.g., a battery) for powering the various components, and preferably, the power supply may be logically connected to the processor 1180 via a power management system, so that the power management system may manage charging, discharging, and power consumption management functions.
Although not shown, the mobile phone may further include a camera, a bluetooth module, and the like, which are not described herein.
In the embodiment of the present application, the terminal includes a processor 1180 configured to execute the embodiment shown in fig. 3 and the corresponding embodiments in fig. 3.
An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored, and when the computer program runs on a computer, the computer is caused to execute the steps executed by the text label determination apparatus in the method described in the foregoing embodiment shown in fig. 3 and the methods described in fig. 3.
An embodiment of the present application further provides a computer program product including a program, which, when run on a computer, causes the computer to perform the steps performed by the text label determination apparatus in the method described in the foregoing embodiment shown in fig. 3.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other manners. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed 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 can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The integrated unit, if implemented in the form of a software functional unit and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application may be substantially implemented or contributed to by the prior art, or all or part of the technical solution may be embodied in a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a read-only memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions in the embodiments of the present application.

Claims (15)

1. A method for determining a text label, comprising:
acquiring a target text and a to-be-matched label, wherein the target text comprises at least two text units, and the to-be-matched label comprises at least one attribute label;
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;
acquiring a correlation characteristic set according to the characteristic vector set of the target text and the characteristic vector set of the tags to be matched, wherein the correlation characteristic set comprises correlation characteristics among text units and correlation characteristics among the text units and the attribute tags;
acquiring the probability that the target text belongs to each attribute label respectively according to the correlation characteristic set;
and 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.
2. The method of claim 1, wherein the tags to be matched comprise at least two attribute tags;
the set of relevance features also includes relevance features between the attribute tags.
3. The method according to claim 1 or 2, wherein the obtaining 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 comprises:
generating a target text sequence according to the target text and the tag to be matched, wherein the target text sequence comprises a text sequence of the target text and a text sequence of the tag to be matched;
and coding the target text sequence to obtain a characteristic vector set of the target text and a characteristic vector set of the tag to be matched.
4. The method according to claim 3, wherein the generating a target text sequence according to the target text and the tag to be matched comprises:
performing word segmentation processing on the target text to obtain a text sequence of the target text;
performing word segmentation processing on the tag to be matched to obtain a text sequence of the tag to be matched;
and splicing the text sequence of the target text and the text sequence of the tag to be matched to obtain the target text sequence.
5. The method according to claim 3, wherein the encoding a target text sequence to obtain a feature vector set of the target text and a feature vector set of the tag to be matched comprises:
coding the text sequence of the target text and the text sequence of the tags 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.
6. The method according to claim 1, wherein the obtaining the probability that the target text belongs to each attribute tag respectively according to the relevance feature set comprises:
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 correspond to the text units one by one, and the attention weight vectors represent weights of the text units in the target text related to the attribute tags;
acquiring a text characteristic vector set according to the target text and the attention weight vector set;
and acquiring the probability that the target text belongs to each attribute label respectively according to the text feature vector set and the labels to be matched.
7. The method of claim 6, wherein obtaining a set of attention weight vectors from the set of relevance features comprises:
performing convolution processing on the correlation characteristic 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 obtain the text feature vector set.
8. The method according to any one of claims 1-7, wherein the tags to be matched comprise at least two attribute tags;
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:
determining at least one probability that the target text respectively belongs to each attribute label is greater 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.
9. The method according to any one of claims 1-7, wherein the label to be matched is a single attribute label;
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 greater than a second classification threshold value, determining the label to be matched as a target label corresponding to the target text.
10. The method according to any one of claims 1 to 7, wherein the obtaining, according to the target text and the tag to be matched, a feature vector set of the target text and a feature vector set of the tag to be matched comprises:
based on the target text and the label to be matched, acquiring a characteristic vector set of the target text and a characteristic vector set of the label to be matched through a first characteristic processing layer of a classification model;
the obtaining a relevant feature set according to the feature vector set of the target text and the feature vector set of the tag to be matched includes:
based on the feature vector set of the target text and the feature vector set of the tag to be matched, acquiring the correlation feature set through a second feature processing layer of a classification model;
the obtaining of the probability that the target text belongs to each attribute tag respectively according to the correlation feature set includes:
based on the correlation characteristic set, obtaining the probability that the target text belongs to each attribute label through the convolution layer of the classification model;
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 a full connection layer of the classification model based on the probability that the target text belongs to each attribute label respectively.
11. The method of claim 10, further comprising:
acquiring a target text sample set, a to-be-matched label sample and a real label set, wherein the target text sample set comprises at least two target text samples, each target text sample comprises at least two text units, and each to-be-matched label sample comprises at least one attribute label;
based on the target text sample set and the to-be-matched label sample, acquiring a characteristic vector set of the target text sample set and a characteristic vector set of the to-be-matched label sample through a first characteristic processing layer of a to-be-trained classification model;
based on the feature vector set of the target text sample set and the feature vector set of the to-be-matched label sample, obtaining a correlation feature sample set through a second feature processing layer of the to-be-trained classification model, wherein the correlation feature sample set comprises correlation features between text units of each target text sample and correlation features between the text units of each target text sample and attribute labels of each to-be-matched label sample;
based on the correlation characteristic sample set, acquiring a probability set that a text unit of each target text sample belongs to each attribute label through a convolutional 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-link 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.
12. The method of claim 11, wherein the training the classification model to be trained based on the predictive label set and the real label set to obtain the classification model comprises:
and updating the model parameters of the classification model to be trained according to a target loss function based on the prediction label set and the real label set so as to obtain the classification model.
13. A device for determining a text label, comprising:
the system 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 label, the target text comprises at least two text units, and the to-be-matched label comprises at least one attribute label;
the obtaining module 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 is further configured to obtain a relevant feature set according to the feature vector set of the target text and the feature vector set of the to-be-matched tag, where the relevant feature set includes relevant features between text units and relevant features between the text units and 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;
and the determining module is used for determining the 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.
14. A computer device, comprising: a memory, a transceiver, a processor, and a bus system;
wherein the memory is used for storing programs;
the processor is configured to execute a program in the memory to implement the method of any one of claims 1 to 12;
the bus system is used for connecting the memory and the processor so as to enable the memory and the processor to communicate.
15. A computer-readable storage medium comprising instructions that, when executed on a computer, cause the computer to perform the method of any of claims 1 to 12.
CN202110651238.0A 2021-06-10 2021-06-10 Text label determination method and device, computer equipment and storage medium Pending CN113821589A (en)

Priority Applications (1)

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

Applications Claiming Priority (1)

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

Publications (1)

Publication Number Publication Date
CN113821589A true CN113821589A (en) 2021-12-21

Family

ID=78923846

Family Applications (1)

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

Country Status (1)

Country Link
CN (1) CN113821589A (en)

Cited By (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
CN114491040A (en) * 2022-01-28 2022-05-13 北京百度网讯科技有限公司 Information mining method and device
CN114970537A (en) * 2022-06-27 2022-08-30 昆明理工大学 Cross-border ethnic culture entity relationship extraction method and device based on multilayer labeling strategy
CN116955630A (en) * 2023-09-18 2023-10-27 北京中关村科金技术有限公司 Text classification method, apparatus, model, device, and computer-readable storage medium

Citations (5)

* 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
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
WO2021051560A1 (en) * 2019-09-17 2021-03-25 平安科技(深圳)有限公司 Text classification method and apparatus, electronic device, and computer non-volatile readable storage medium

Patent Citations (5)

* 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
WO2021051560A1 (en) * 2019-09-17 2021-03-25 平安科技(深圳)有限公司 Text classification method and apparatus, electronic device, and computer non-volatile 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

Cited By (7)

* 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
CN114491040A (en) * 2022-01-28 2022-05-13 北京百度网讯科技有限公司 Information mining method and device
CN114491040B (en) * 2022-01-28 2022-12-02 北京百度网讯科技有限公司 Information mining method and device
CN114970537A (en) * 2022-06-27 2022-08-30 昆明理工大学 Cross-border ethnic culture entity relationship extraction method and device based on multilayer labeling strategy
CN114970537B (en) * 2022-06-27 2024-04-23 昆明理工大学 Cross-border ethnic cultural entity relation extraction method and device based on multi-layer labeling strategy
CN116955630A (en) * 2023-09-18 2023-10-27 北京中关村科金技术有限公司 Text classification method, apparatus, model, device, and computer-readable storage medium
CN116955630B (en) * 2023-09-18 2024-01-26 北京中关村科金技术有限公司 Text classification method, apparatus, model, device, and computer-readable storage medium

Similar Documents

Publication Publication Date Title
CN110490213B (en) Image recognition method, device and storage medium
CN110599557B (en) Image description generation method, model training method, device and storage medium
CN111553162B (en) Intention recognition method and related device
JP7096444B2 (en) Image area positioning method, model training method and related equipment
CN109145303B (en) Named entity recognition method, device, medium and equipment
CN111428516B (en) Information processing method and device
CN108280458B (en) Group relation type identification method and device
CN113821589A (en) Text label determination method and device, computer equipment and storage medium
CN111816159B (en) Language identification method and related device
CN111985240B (en) Named entity recognition model training method, named entity recognition method and named entity recognition device
WO2020147369A1 (en) Natural language processing method, training method, and data processing device
CN111177371B (en) Classification method and related device
CN111597804B (en) Method and related device for training entity recognition model
CN113254684B (en) Content aging determination method, related device, equipment and storage medium
CN113723378B (en) Model training method and device, computer equipment and storage medium
CN113761122A (en) Event extraction method, related device, equipment and storage medium
CN114328906A (en) Multistage category determination method, model training method and related device
CN113392644A (en) Model training method, text information processing method, system, device and storage medium
CN111738000B (en) Phrase recommendation method and related device
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
CN114840499A (en) Table description information generation method, related device, equipment and storage medium
US20240038223A1 (en) Speech recognition method and apparatus
CN117057345B (en) Role relation acquisition method and related products

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