WO2023142809A1 - 文本分类、文本处理方法、装置、计算机设备及存储介质 - Google Patents
文本分类、文本处理方法、装置、计算机设备及存储介质 Download PDFInfo
- Publication number
- WO2023142809A1 WO2023142809A1 PCT/CN2022/141171 CN2022141171W WO2023142809A1 WO 2023142809 A1 WO2023142809 A1 WO 2023142809A1 CN 2022141171 W CN2022141171 W CN 2022141171W WO 2023142809 A1 WO2023142809 A1 WO 2023142809A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- text
- topic
- target
- label
- tag
- 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.)
- Ceased
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/35—Clustering; Classification
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/10—Text processing
- G06F40/12—Use of codes for handling textual entities
- G06F40/151—Transformation
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/30—Information retrieval; Database structures therefor; File system structures therefor of unstructured textual data
- G06F16/33—Querying
- G06F16/335—Filtering based on additional data, e.g. user or group profiles
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F40/00—Handling natural language data
- G06F40/30—Semantic analysis
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/044—Recurrent networks, e.g. Hopfield networks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/045—Combinations of networks
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
- G06N3/048—Activation functions
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
Definitions
- the present disclosure relates to the technical field of computers, in particular, to a text classification, text processing method, device, computer equipment and storage medium.
- users can search for favorite books in the reading software, but the content recalled by the existing search scheme is the book-tweeting topics that match the search keywords; however, the books recommended in the book-tweeting topics It may be irrelevant to the books you want to search for by the search keywords, or some recommended book topics are missed in the recalled content, resulting in users being unable to search for satisfactory books, which in turn reduces the user's reading experience for the reading software .
- Embodiments of the present disclosure at least provide a text classification, a text processing method, a device, a computer device and a storage medium, a computer program product, and a computer program.
- an embodiment of the present disclosure provides a text classification method applied to a server, including:
- the target text feature includes a plurality of sub-text features, and each sub-text feature corresponds to each first unit text in the topic text to be classified; the determining the target text feature and each A label correlation between the label description features, including:
- Correlation degree based on the correlation coefficient of each of the first unit texts, perform a weighted summation calculation on the sub-text features of each of the first unit texts, and determine the label correlation according to the calculation results.
- the determining the correlation coefficient of each of the first unit texts based on the target text features and the label description features includes:
- the first sub-correlation coefficient of the first unit text Based on the sub-text features of each of the first unit texts, determine the first sub-correlation coefficient of the first unit text; determine the second sub-correlation coefficient based on the target text features and the label description features; A ratio between a sub-correlation coefficient and said second sub-correlation coefficient determines said correlation coefficient.
- the determining the first sub-correlation coefficient of the first unit text based on the sub-text features of each first unit text includes:
- the label description features include a plurality of second unit texts; the determining the second sub-correlation coefficient based on the target text features and the label description features includes:
- the acquiring the topic text to be classified and tag description information of at least one topic tag to be predicted includes:
- the original text data is segmented to obtain the topic text to be classified and the tag description information.
- the extracting the target text features of the topic text to be classified includes:
- the topic text to be classified includes at least one of the following: topic title text, topic abstract text, and topic tag description text.
- the extracting the target text features of the topic text to be classified, and extracting the label description features of the label description information of each of the topic labels to be predicted includes: through the text classification model
- the feature extraction layer extracts the target text features of the topic text to be classified, and extracts the label description features of the label description information of each of the topic labels to be predicted; the determination of the target text features and each of the label description features
- the label correlation between, get at least one label correlation including:
- the method also includes:
- each training sample contains a topic label to be predicted and a topic text to be trained, and each of the training samples contains a matching label, and the matching label is used to indicate the topic label to be predicted and the topic text to be trained
- the matching between topic texts; the text classification model to be trained is trained through the plurality of training samples to obtain the text classification model.
- the text classification model to be trained is trained through the plurality of training samples to obtain the text classification model, including:
- the embodiment of the present disclosure also provides a text processing method applied to a terminal device, including:
- the operation page displays the operation page of the topic text; receiving the target data input by the user on the operation page, wherein the target data includes: the topic text to be published, or the topic tag of interest; obtaining the screening result determined by the server based on the target data , wherein, the screening result is the result after the server screens the data to be screened determined based on the target data based on the text classification method described in any one of the above first aspects; the operation page displays the The target data and/or the screening result of the target data.
- the target data includes the topic text to be published; the displaying the target data and/or the screening results of the target data on the operation page includes:
- the method also includes:
- the modified target hashtag is displayed on the page, wherein the modifying operation includes at least one of the following: adding, deleting, and modifying.
- the target data includes the topic tags of interest; the method further includes:
- the target data includes topic tags of interest;
- the operation page displaying topic text includes:
- the target data includes the topic tags of interest; the displaying the target data and/or the screening results of the target data on the operation page includes:
- the topic tags of interest are displayed in the title display area of the operation page; the key topic content of the published topic text matching each of the topic tags of interest is displayed in the text display area of the operation page.
- the method also includes:
- the embodiment of the present disclosure also provides a text classification device applied to a server, including:
- the first obtaining unit is used to obtain the label description information of the topic text to be classified and at least one topic label to be predicted;
- the extraction unit is used to extract the target text features of the topic text to be classified, and extract each of the topics to be predicted
- the label description feature of the label description information of the label is used to determine the label correlation between the target text feature and each of the label description features, and obtain at least one label correlation;
- the second determination unit It is used for determining a target topic tag matching the topic text to be classified among at least one topic tag to be predicted based on at least one tag correlation.
- an embodiment of the present disclosure further provides a text processing device, which is applied to a terminal device, including:
- the first display unit is used to display the operation page of the topic text; the receiving unit is used to receive the target data input by the user on the operation page, wherein the target data includes: topic text to be published, or interesting topic tags a second acquisition unit, configured to acquire a screening result determined by the server based on the target data, wherein the screening result is that the server based on the text classification method described in any one of the above first aspects is based on the target A result of screening the data to be screened determined by the data; a second display unit configured to display the target data and/or the screening result of the target data on the operation page.
- the embodiment of the present disclosure further provides a computer device, including: a processor, a memory, and a bus, the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processing
- the processor communicates with the memory through a bus, and when the machine-readable instructions are executed by the processor, the steps in any one of the possible implementation manners in the first aspect to the second aspect above are executed.
- the embodiments of the present disclosure further provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is run by a processor, any one of the above-mentioned first aspect to the second aspect is executed. steps in a possible implementation.
- an embodiment of the present disclosure further provides a computer program product, where the computer program product includes: a computer program, the computer program is stored in a readable storage medium, and at least one processor of an electronic device can read from the The readable storage medium reads the computer program, and at least one of the processors executes the computer program, so that the electronic device executes the steps in any one possible implementation manner of the first aspect to the second aspect above.
- an embodiment of the present disclosure further provides a computer program, the computer program is stored in a readable storage medium, at least one processor of an electronic device can read the above computer program from the readable storage medium, At least one of the processors executes the computer program, so that the electronic device executes the steps in any possible implementation manner of the first aspect to the second aspect above.
- the embodiment of the present disclosure provides a text classification, text processing method, device, computer equipment and storage medium.
- the topic text to be classified and the tag description information of at least one corresponding topic tag to be predicted can be obtained, and the target text features of the topic text to be classified are extracted, and the tag description of each topic tag to be predicted can be extracted
- the tag description feature of the information after that, the tag correlation between the target text feature and the tag description feature can be determined; finally, it can be determined in at least one topic tag to be predicted to match the topic text to be classified based on the tag correlation target hashtag for .
- the topic label of the book-tweeting topic can be determined more accurately, and the classification accuracy of the book-tweeting topic can be improved, so that it can be more accurate for Users push out satisfactory books, thereby improving the user's reading experience.
- FIG. 1 shows a flowchart of a text classification method provided by an embodiment of the present disclosure
- FIG. 2 shows a schematic diagram of segmentation processing of the original text data based on the data segmentation position provided by an embodiment of the present disclosure
- FIG. 3 shows a frame structure diagram of a text classification model corresponding to a text classification method provided by an embodiment of the present disclosure
- FIG. 4 shows a flowchart of a text processing method provided by an embodiment of the present disclosure
- Fig. 5 shows a schematic diagram of an operation page of a topic text provided by an embodiment of the present disclosure
- FIG. 6 shows a schematic diagram of a page of a hashtag to be selected provided by an embodiment of the present disclosure
- FIG. 7 shows a schematic diagram of a display page when displaying target data provided by an embodiment of the present disclosure
- Fig. 8 shows a schematic diagram of a text classification device provided by an embodiment of the present disclosure
- FIG. 9 shows a schematic diagram of a text processing device provided by an embodiment of the present disclosure.
- FIG. 10 shows a schematic diagram of a computer device provided by an embodiment of the present disclosure
- FIG. 11 shows a schematic diagram of another computer device provided by an embodiment of the present disclosure.
- users can search for favorite books in the reading software, but the content recalled by the existing search scheme is the book-tweeting topics that match the search keywords; however, the books recommended in the book-tweeting topics It may be irrelevant to the books you want to search for by the search keywords, or some recommended book topics are missed in the recalled content, resulting in users being unable to search for satisfactory books, which in turn reduces the user's reading experience for the reading software .
- the present disclosure provides a text classification, text processing method, device, computer equipment and storage medium.
- the topic text to be classified and the tag description information of at least one corresponding topic tag to be predicted can be obtained, and the target text features of the topic text to be classified are extracted, and the tag description of each topic tag to be predicted can be extracted
- the tag description feature of the information after that, the tag correlation between the target text feature and the tag description feature can be determined; finally, it can be determined in at least one topic tag to be predicted to match the topic text to be classified based on the tag correlation target hashtag for .
- the topic label of the book-tweeting topic can be determined more accurately, and the classification accuracy of the book-tweeting topic can be improved, so that it can be more accurate for Users push out satisfactory books, thereby improving the user's reading experience.
- the execution subject of the text classification and text processing method provided in the embodiment of the present disclosure generally has a certain computing power computer equipment, the computer equipment includes, for example: a terminal device or a server or other processing equipment.
- the text classification and text processing methods may be implemented by a processor invoking computer-readable instructions stored in a memory.
- FIG. 1 it is a flowchart of a text classification method provided by an embodiment of the present disclosure.
- the method is applied to a server, and the method includes steps S101 to S107, wherein:
- S101 Acquire topic text to be classified and tag description information of at least one topic tag to be predicted.
- the text classification method provided by the embodiments of the present disclosure can be applied to a server of books or article reading software.
- users when using the reading software, users can obtain books and articles they want to browse by posting, or communicate with other users by posting.
- the topic text to be classified may be the text edited by the current user through the reading software, and may also be the text edited by other users through the reading software.
- the above topic text to be classified may be the post content input by the user through reading software.
- tag description information corresponding to at least one topic tag to be predicted may be determined for the topic text to be classified.
- a plurality of hashtags may be preset; then, all the preset hashtags may be determined as the aforementioned at least one to-be-predicted hashtag.
- preliminary screening may be performed on preset topic tags to obtain at least one topic tag to be predicted.
- the specific screening principle may be as follows: among the preset topic tags, the topic tags containing the characteristic information of the topic text to be classified are selected as at least one topic tag to be predicted. At this time, the at least one topic tag to be predicted may contain feature information corresponding to the topic text to be classified.
- the feature information corresponding to the topic text to be classified can be "romance” and "novel".
- at least one topic tag to be predicted corresponding to the topic text to be classified may include "romance” and/or "novel”.
- each to-be-predicted topic tag may further include tag description information for annotating the to-be-predicted topic tag.
- tag description information for annotating the to-be-predicted topic tag.
- the topic tag to be predicted is "sports”
- the tag description information corresponding to the topic tag to be predicted may include texts such as sports, sports, boxing, athletics, basketball, and football.
- S103 Extract target text features of the topic text to be classified, and extract tag description features of tag description information of each topic tag to be predicted.
- the feature extraction layer of the text classification model can be used to perform feature extraction on the topic text to be classified to obtain the corresponding The target text features, and feature extraction for each tag description information, to obtain the corresponding tag description features.
- the data format of the extracted target text feature and tag description feature may be a vector, for example, a text representation vector and a tag representation vector.
- the label correlation can be determined based on the text representation vector and the label representation vector. The method of determining the label correlation through the data in the form of vector can simplify and facilitate the comparison between the target text feature and the label description feature. The process of comparing the correlation between them.
- the text classification model includes: an input layer, an embedding layer, and a feature extraction layer, wherein the input layer, the embedding layer, and the feature extraction layer are connected in series.
- the input layer acquires the topic text to be classified and the tag description information, it can convert the above-mentioned topic text to be classified and the text in the tag description information into one-hot encoding (one-hot encoding).
- the embedding layer can convert the one-hot encoding corresponding to the above-mentioned topic text to be classified and the one-hot encoding corresponding to the label description feature into a word vector.
- the feature extraction layer obtains the above word vectors, it can perform vector extraction on the word vectors to obtain the target text features of the topic text to be classified and the label description features of the label description information.
- S105 Determine a label correlation between the target text feature and each of the label description features to obtain at least one label correlation.
- the tag correlation between the target text feature and each tag description feature can be calculated through correlation calculation.
- the target text features and label description features can be fused through the fusion layer in the text classification model, so as to determine the label correlation between the target text features and the label description features according to the result of the fusion operation.
- the input of the fusion layer is connected with the output of the feature extraction layer of the text classification model.
- the above-mentioned tag correlation can be expressed as a correlation representation vector; wherein, the correlation representation vector is used to represent the tag correlation between the topic text to be classified and the corresponding topic tag to be predicted.
- the correlation representation vector can be normalized, so that a value within the range of 0 to 1 can be obtained after normalization.
- the value is used to represent the correlation probability between the topic text to be classified and the corresponding topic label to be predicted.
- the correlation representation vector can be input to the binary classification layer in the text classification model for mapping processing, so that the correlation representation vector is mapped to a value within the range of 0 to 1.
- the binary classification layer includes a fully connected layer and a Sigmod layer, and the fully connected layer and the Sigmod layer are connected in sequence.
- the correlation representation vector can be sequentially processed through the fully connected layer and the Sigmod layer, so as to obtain the normalized correlation probability.
- the input of the binary classification layer in the text classification model is concatenated with the output of the fusion layer.
- S107 Based on at least one of the tag correlations, determine a target topic tag matching the topic text to be classified among at least one topic tag to be predicted.
- each topic tag to be predicted can determine the corresponding correlation representation vectors.
- normalization processing may be performed on each correlation representation vector to obtain at least one correlation probability, where the correlation probability may be a probability value ranging from 0 to 1.
- each correlation probability is used to characterize the degree of correlation (or similarity) between the topic text to be classified and the corresponding topic label to be predicted.
- the at least one relevant probability can be screened, so as to determine the relevant probability that meets the probability requirement.
- the probability requirement can be understood as greater than or equal to a preset probability threshold.
- a relevant probability that is greater than or equal to a preset probability threshold may be determined as the relevant probability that meets the probability requirement.
- the topic label to be predicted corresponding to the relevant probability satisfying the probability requirement may be determined, and the determined corresponding topic label to be predicted is determined as the target topic label.
- the target topic label is determined in the topic label to be predicted, so that the corresponding topic label can be more accurately determined for the topic text to be classified, Therefore, the accuracy of topic classification of the topic text to be classified is improved.
- the topic text to be classified is a book-tweeting topic associated with book recommendation
- the topic label of the book-tweeting topic can be determined more accurately, and the classification accuracy of the book-tweeting topic can be improved, so that it can be more accurate for Users push out satisfactory books, thereby improving the user's reading experience.
- step S101 obtaining the tag description information of the topic text to be classified and at least one topic tag to be predicted, specifically includes the following process:
- the raw text data to be processed may be composed of multiple parts.
- the raw text data to be processed may include: topic text to be classified, and tag description information of at least one topic tag to be predicted.
- each part of the original text data may correspond to a different text type identifier.
- the original text data contains multiple text blocks, and each text block contains a corresponding data identification bit segment id, wherein the data identification bit is used to indicate the text type identification of the corresponding text block.
- the data identification bit segment id of each text block in the original text data can be identified respectively to obtain the text type identification indicated by the segment id.
- the identification value of the text type identification indicated by the data identification bit segment id of the text block to which the topic text belongs can be set to 0, and the data identification of the text block to which the tag description information belongs is indicated by the segment id
- the value of the text type identifier can be set to 1.
- the data segmentation position of the original text data may be determined based on the identification value of the text type identification, and the original text data may be segmented based on the data segmentation position.
- the original text data when the original text data is segmented, it can first be segmented according to the above text type identification to obtain the topic text to be classified and tag description information.
- the first delimiter [SEP] may be inserted into the original text data according to the identification value of the text type identification, and the original text data may be segmented based on the first delimiter.
- the first separator [SEP] when it is detected that the identification values of any two continuous text type identifiers are not the same, insert the first separator [SEP] between the two continuous text type identifiers, and then pass the first separator [SEP] Segment the raw text data.
- a second delimiter can also be inserted between different types of text blocks of the topic text to be classified in advance, and then the topic text to be classified can be further divided by the second delimiter.
- the above-mentioned original text data includes: Classified topic text and label description information (also can be recorded as description).
- the topic text to be classified includes at least one of the following: topic title text (also can be recorded as title), topic abstract text (also can be recorded as abstract), the topic title text can be the title of the topic text to be classified, topic abstract text It may be an introduction to the content of the topic text to be classified.
- the different types of text blocks of the topic text to be classified can be understood as: the text blocks belonging to the topic title text, and the text blocks belonging to the topic summary text.
- the original text data can be divided into different text blocks (each text block can also be recorded as a token), so that the BERT model (Bidirectional Encoder Representations from Transformer model, that is, the feature extraction layer) can be used to analyze the original text data. to process.
- the BERT model can perform feature extraction on the original text data, so as to obtain the target text features corresponding to the topic text to be classified and the tag description features corresponding to the tag description features.
- the above-mentioned target text feature can be recorded as topix vector (text representation vector), and the above-mentioned label description feature can be recorded as description vector (label representation vector), wherein, as shown in Figure 2, the target text feature and label description feature are respectively composed of consists of sub-vectors.
- the target text features of the topic text to be classified and the label description of the topic label to be predicted can be quickly processed Features are divided, so as to improve the efficiency of determining the label correlation of the topic text to be classified and the topic label to be predicted.
- step S103 extracting the target text features of the topic text to be classified, specifically includes the following process:
- the topic text to be classified may be divided to obtain a plurality of first unit texts.
- the length of the target vector corresponding to each first unit text may be determined by the text length contained in the first unit text, and the text lengths contained in a plurality of first unit texts of the topic text to be classified may be different .
- the length of the text included in the first unit of text can be divided into four types: character, phrase, sentence, and paragraph.
- the above-mentioned preset unit of text may be a preset text used to filter the first unit of text, wherein the number of the preset unit of text may be multiple.
- the target vector corresponding to each first unit text can be determined, and the mapping relationship between the target vectors and each preset unit text can be respectively determined.
- the sub-vector matching the preset unit text in the target vector can be determined based on the mapping relationship (that is, the sub-vector of the target text feature in FIG. 2 ) is the above key feature vector, and then the target text feature can be determined according to the determined key feature vector.
- the first unit text corresponding to the sub-vector determined in the target vector that matches the preset unit text may also be “science fiction”.
- the sub-vectors in the target vector and the preset unit text may not exactly match.
- the first unit text is "Technology”
- the sub-vector corresponding to the first unit text and the preset unit text At this time, the text feature corresponding to the first unit text "science and technology" can still be determined as the target text feature.
- the key feature vectors in the target vector can be extracted, and the irrelevant content can be filtered, thereby reducing the amount of computation and improving the efficiency of determining the features of the target text.
- the above step S105 determine the target
- the label correlation between the text features and each of the label description features specifically includes the following process:
- (1) based on the target text feature and the label description feature, determine the correlation coefficient of each of the first unit texts, wherein the correlation coefficient is used to characterize the first unit text and the corresponding topic label to be predicted The degree of correlation between labels;
- a fusion operation may be performed on the target text features and the tag description features, so as to obtain the tag correlation.
- the correlation coefficient of each first unit text in the topic text to be classified can be determined, wherein the correlation coefficient can be used to characterize the label correlation between each first unit text and the corresponding topic label to be predicted degree.
- the correlation coefficient of the ith first unit text can be determined, for example, the correlation coefficient of the first unit text can be recorded as: in, D is the weight extraction matrix learned during the training process of the text classification model.
- the weighted summation calculation can be performed on the sub-text features of each first unit text based on the correlation coefficient, so as to obtain the tag correlation.
- the sum of the products of all the first unit texts can be summed to obtain the label correlation, wherein the above-mentioned label correlation can be recorded as R, based on
- the process of weighted sum calculation of the correlation coefficient and the sub-text features of each first unit text can be written as:
- the accuracy of tag correlation can be improved by calculating the correlation coefficient between each first unit text in the target text feature and the tag description feature and performing weighted summation on the correlation coefficient to obtain the tag correlation.
- the above step: determining the correlation coefficient of each of the first unit texts based on the target text features and the label description features specifically includes the following process:
- the transposition result of the i-th subtext feature of the first unit text can be determined
- T is the transposition of the subtext feature Xi of the first unit text.
- the above-mentioned first sub-correlation coefficient can be determined based on the transposition result in
- D is the weight extraction matrix learned during the training process of the text classification model (ie, the preset weight matrix described below).
- the above-mentioned second sub-correlation coefficient can be determined.
- the second sub-correlation coefficient can be determined based on the target text features and label description features
- j i+k
- i represents the quantity of the first unit of text
- k represents the quantity k of the second unit of text in the tag description information.
- the value of each first unit text can be determined based on the ratio of the first sub-correlation coefficient and the second sub-correlation coefficient. correlation coefficient.
- the accuracy of the tag correlation can be improved by determining the above-mentioned correlation coefficient through the first sub-correlation coefficient and the second sub-correlation coefficient.
- the above step: determining the first sub-correlation coefficient of the first unit text based on the sub-text features of each first unit text specifically includes the following process:
- the first weight w i of the first unit text can be determined, wherein the first weight w i can be used to characterize the fusion of the sub-text features of the first unit text in the target text features Weights.
- the first sub-correlation coefficient can be determined based on the first weight.
- the preset weight matrix D can be obtained, and then the calculation formula can be used Determine the first weight w i of each first unit of text.
- the first sub-correlation coefficient corresponding to the first unit of text can be determined based on the first weight
- the first sub-correlation coefficient of each first unit text is determined by determining the first weight of each first unit text in the target text feature, thereby improving the accuracy of the correlation coefficient.
- the above step: determining the second sub-correlation coefficient based on the target text features and the tag description features specifically includes The following process:
- the second weight may be determined based on the sub-text features in the target text features and the preset weight matrix D. Specifically, the formula Determine the second weight. Afterwards, the third weight can also be determined based on the label description features and the preset weight matrix. Specifically, the formula can be used Determine the third weight.
- the second sub-correlation coefficient can be determined based on the second weight and the third weight
- the second sub-correlation coefficient can be expressed as the determination of the second weight based on each first unit text and determined based on the third weight of each second unit text Perform the summation operation to get
- step S103 extracting the target text features of the topic text to be classified, and extracting each of the topic tags to be predicted
- the tag description features of the tag description information include: extracting the target text features of the topic text to be classified through the feature extraction layer in the text classification model, and extracting the tag description features of the tag description information of each topic tag to be predicted.
- FIG. 3 is a frame structure diagram of a text classification model in the text classification method provided by the embodiment of the present disclosure.
- the text classification model includes: a feature extraction network, a fusion layer and a classification layer (that is, a binary classification layer); wherein, the feature extraction network includes: an input layer, an embedding layer and a feature extraction layer.
- the feature extraction network includes: an input layer, an embedding layer, and a feature extraction layer.
- the extraction process of the feature extraction network to extract the target text features is as follows:
- Input layer After obtaining the topic text to be classified, input the topic text to be classified to the input layer for processing. After that, the input layer can convert the topic text to be classified into one-hot encoding. After converting the topic text to be classified into one-hot encoding, each unit text in the topic text to be classified can be converted into a fixed-dimensional vector composed of 0 and 1.
- the one-hot code After obtaining the one-hot code of the topic text to be classified above, the one-hot code can be converted into a word vector corresponding to the topic text to be classified, and the one-hot code of the label description information The -hot encoding is converted into a word vector corresponding to the tag description information.
- the one-hot encoding can be converted into a corresponding word vector through the word2vec model.
- the word vector After obtaining the word vector corresponding to the above-mentioned topic text to be classified and the word vector corresponding to the label description information, the word vector can be feature extracted, so as to obtain the A text representation vector of the expressed content of the text, and a tag representation vector corresponding to the tag description information.
- the feature extraction layer when the feature extraction layer performs feature extraction, it can extract according to the semantics of word vectors, so that the obtained text representation vectors are fluent and can accurately express the content of the topic text to be classified.
- the feature extraction layer can extract text representation vectors through CNN models (Convolutional Neural Networks, Convolutional Neural Networks), or RNN models (Recurrent Neural Networks, Recurrent Neural Networks).
- step S105: determining the label correlation between the target text features and each of the label description features, to obtain at least A label correlation includes: determining the label correlation between the target text feature and each of the label description features through a correlation determination layer in the text classification model to obtain at least one label correlation.
- the target text feature and the label description feature can be fused through the fusion layer (ie, the correlation determination layer), so as to obtain the label correlation between the target text feature and the label description feature sex.
- the fusion layer ie, the correlation determination layer
- the above-mentioned target text features can be divided into sub-text features of each first unit text, and then the correlation between the sub-text features and label description features of each first unit text is calculated separately, so that according to all first unit texts The correlation between the sub-text features and the label description features of the target text features and the label description features are determined.
- the fusion layer can first pass the formula to calculate the first weight w i . Then, based on the first weight w i , the correlation R between the first unit text and the target text features can be calculated, where,
- the above step S107: based on at least one of the tag correlations, determine among at least one of the to-be-predicted topic tags that are related to the The target topic label matching the topic text to be classified comprises: determining that the topic text to be classified matches the topic text to be classified in at least one topic label to be predicted based on at least one of the label correlations through a classification layer in the text classification model target hashtag for .
- the above classification layer may be composed of a fully connected layer and a normalization layer, wherein the fully connected layer may include a matrix W.
- the classification layer can use the fully connected layer and the normalization layer to map the vector of the label correlation into a correlation probability, wherein the correlation probability is used to represent the to-be-predicted The degree of correlation between the topic label and the topic text to be classified.
- the expression form of logit may be a probability value in the form of a percentage, for example, 60%
- R is the label correlation between the above-mentioned label description feature and the target text feature.
- the topic label of the book-tweeting topic can be determined more accurately, and the classification accuracy of the book-tweeting topic can be improved, so that it can be more accurate for Users push out satisfactory books, thereby improving the user's reading experience.
- the method also includes a process of training the text classification model to be trained:
- each training sample contains topic labels to be predicted and topic text to be trained, and each of the training samples contains matching labels, and the matching labels are used to indicate the topics to be predicted The matching between the label and the topic text to be trained;
- the text classification model to be trained is trained by using the plurality of training samples to obtain the text classification model.
- a plurality of training samples containing topic labels to be predicted and topic texts to be trained can be determined, wherein each training sample contains a topic text to be trained and at least one topic label to be predicted, and each to-be The predicted topic label corresponds to a matching label, and the matching label is used to represent the matching between the topic label to be predicted and the topic text to be classified.
- the text classification model to be trained is trained by using the plurality of training samples to obtain the text classification model, which specifically includes the following process:
- the target loss function loss of the text classification model it is first necessary to determine the target loss function loss of the text classification model to be trained. Specifically, the calculation process of the target loss function loss is as follows:
- N tags is the number of the first tags of the topic tags to be predicted contained in the plurality of training samples.
- y true is a sign function, i.e. the matching label mentioned above.
- the above-mentioned second label quantity may be determined according to a sign function.
- y pred is the predicted value of the relevant probability output by the text classification model to be trained for the topic label to be predicted (ie, the prediction result of the text classification model to be trained for multiple training samples).
- ⁇ is a hyperparameter, generally the average of the number of first labels contained in each training sample.
- the target loss function value of the text classification model to be trained can be determined based on the first label quantity, the second label quantity, matching labels and the prediction results of the text classification model to be trained for multiple training samples, and according to The target loss function value adjusts the model parameters of the text classification model to be trained, thereby improving the prediction accuracy of the text classification model.
- FIG. 4 it is a flowchart of a text processing method provided by an embodiment of the present disclosure.
- the method is applied to a terminal device, and reading software is pre-installed in the terminal device.
- the method includes steps S401 to S407, in:
- S401 Display an operation page of topic text.
- the operation page of the above-mentioned topic text is shown in Figure 5, wherein, the posting page shown in Figure 5 is the user's posting operation in the above-mentioned reading software, and the user can enter the target text on the operation page data.
- S403 Receive target data input by the user on the operation page, wherein the target data includes: topic text to be published, or interesting topic tags.
- the target data is the topic text to be published.
- the user can input the topic text to be published on the interface shown in Figure 5; after that, the terminal device can send the topic text to be published to the server, and the server can determine according to the text classification method described in the above-mentioned embodiments A hashtag matching the topic text to be published, and display the hashtag in the second display position as shown in FIG. 5 .
- S405 Obtain the screening result determined by the server based on the target data, wherein the screening result is after the server screens the data to be screened determined based on the target data based on the text classification method described in any of the above embodiments the result of.
- the screening results returned by the server are also different.
- the server can determine the hashtag matching the topic text to be published according to the text classification method described in the above embodiment. If the target data is a topic tag of interest, then the server can determine the published topic text matching the topic tag of interest according to the text classification method described in the above embodiment.
- S407 Displaying the target data and/or the filtering results of the target data on the operation page.
- the filtering result of the target data may be published topic text matching the tag of interest.
- the recommended topics displayed on the operation page may be the target data and books or articles related to the interest tag, wherein the recommended topics may be used to recommend books or articles Published topic text for .
- the hashtags of the book push topics can be more accurately determined, and the classification accuracy of the book push topics can be improved, so that satisfactory books can be pushed to users more accurately, thereby improving the user's reading experience.
- the above-mentioned target data includes the topic text to be published; the above-mentioned display of the target data and/or the screening results of the target data on the operation page specifically includes the following process:
- the above-mentioned first display position is used to display the topic text to be published input by the user, wherein the first sub-display position in the first display position is used to display the topic to be published
- the text title of the text, the second sub-display position in the first display position is used to display the text content of the topic text to be published.
- the second display area includes at least one target hashtag matching the topic text to be published.
- the method further includes:
- the modified target hashtag is displayed on the page, wherein the modifying operation includes at least one of the following: adding, deleting, and modifying.
- the user can also modify the target hashtag through the tag modification identifier, wherein, after detecting the user's trigger operation on the "+click to add" button (that is, the tag modification identifier) After that, it can be determined that the modification operation matching the "+click to add" button is an addition operation, and in response to the addition operation, a corresponding new topic tag is added at the second display position.
- each target hashtag may also contain a " ⁇ " tag modification logo, wherein, after detecting the trigger operation of the user's " ⁇ ” tag modification logo, it can be determined and the " ⁇ " " tag modification identifies the matching modification operation as a deletion operation, and deletes the corresponding target hashtag in response to the deletion operation.
- the user can also directly modify the tag content in the target hashtag by triggering the target hashtag of the second placement.
- the topic tag corresponding to the modification content is determined as the target topic tag.
- the target hashtag can be modified through the modification operation, so that the user can add the target hashtag more flexibly and conveniently, and the user experience is improved.
- the method further includes the following process:
- the candidate hashtag page as shown in FIG. 6 can be displayed on the display interface, wherein the user can select the hashtag Candidate hashtags in the page to identify hashtags of interest.
- the user when the user selects a tag of interest, it can also be detected whether the number of tags of interest selected by the user exceeds the preset number, and when the number of tags exceeds the preset number, a prompt message is displayed, and the prompt information is used to indicate the interest tag.
- the number of hashtags has reached the preset number.
- the above interest tags may correspond to different category dimensions, wherein, as shown in FIG. 6 , the category dimensions corresponding to the interest tags include: topic type, gender preference, and push book type.
- the above-mentioned preset quantity may be set for tags of interest of all category dimensions, or may be set for tags of interest of at least part of category dimensions.
- a prompt message is displayed on the display interface: "Up to 3 book push types can be selected”.
- the number of interest tags selected by the user can be limited by the preset number, thereby reducing the reduction in screening efficiency caused by too many interest tags and improving user experience.
- the above-mentioned operation page for displaying the topic text specifically includes the following process:
- the target topic category is divided into "topic type", "gender preference” and "tweet book type”.
- the category display area of each target topic category may be determined on the operation page. For example, determine the category display area of "topic type", the category display area of "gender preference”, and the category display area of "tweet book type”.
- the corresponding target topic category and the preset topic tags belonging to the target topic category can be displayed in the category display area.
- the preset hashtags belonging to the “topic type” may include “by plot”, “by role”, and “by category”.
- the preset hashtags belonging to the “gender preference” may include “male orientation” and “female orientation”.
- the corresponding preset topic tags can be determined according to the target topic category, and displayed in the category display area corresponding to each target topic category, thereby improving the efficiency of determining the target topic label and making the interface layout more convenient. Beautiful and improve the user's browsing experience.
- displaying the target data and/or the screening results of the target data on the operation page specifically includes the following process:
- the display page when displaying the above target data is shown in Figure 7, wherein the display page includes a title display area and a text display area, wherein the title display area is used to display interest topic tags , the text display area is used to display the key topic content of the published topic text that matches the topic tag of interest.
- the key topic content may include the text title of the published topic text and the browsing identifier, wherein the browsing identifier is used to characterize the number of times the published topic text has been browsed, the number of times recommended books have been adopted (the number of times adopted may be It is in the form of "saving the book shortage of 15.3w people" as shown in Figure 7) and other data.
- the topic tags of interest and the key topic content of the published topic text can be displayed through the label display area and the text display area respectively, so that the page layout is more reasonable, and, by displaying the key topic content of the published topic text
- the method realizes the refinement of the published topic text, further improves the rationality of the page layout, and enables the display interface to display more substantive content at the same time, which is convenient for users to watch.
- the method also includes:
- (1) in response to the selection operation for the interested hashtag, determine the target hashtag selected by the user, and obtain the published topic text matching the target hashtag;
- the user may determine the published topic text corresponding to the target hashtag to be viewed through the selection operation on the above-mentioned interested hashtag. Specifically, after the target hashtag selected by the user is detected, the published topic text displayed on the topic screening page can be screened, so as to determine the published topic text that matches the target topic text, and display it in the text display area Display the key topic content of the published topic text matching the target topic text.
- the key topic content of the published topic text displayed on the topic screening page can be screened through the topic label of interest, so as to better meet the user's use needs and improve the user's use experience.
- topic tags so as to improve the accuracy of topic classification of topic texts to be classified.
- the topic text to be classified is a book-tweeting topic associated with book recommendation
- the topic label of the book-tweeting topic can be determined more accurately, and the classification accuracy of the book-tweeting topic can be improved, so that it can be more accurate for Users push out satisfactory books, thereby improving the user's reading experience.
- the writing order of each step does not mean a strict execution order and constitutes any limitation on the implementation process.
- the specific execution order of each step should be based on its function and possible
- the inner logic is OK.
- the embodiment of the present disclosure also provides a text classification device corresponding to the text classification method. Since the problem-solving principle of the device in the embodiment of the present disclosure is similar to the above-mentioned text classification method of the embodiment of the disclosure, the implementation of the device Reference can be made to the implementation of the method, and repeated descriptions will not be repeated.
- FIG. 8 it is a schematic diagram of a text classification device provided by an embodiment of the present disclosure.
- the device includes: a first acquisition unit 81, an extraction unit 82, a first determination unit 83, and a second determination unit 84; wherein,
- the first obtaining unit 81 is used to obtain the tag description information of the topic text to be classified and at least one topic tag to be predicted;
- the extraction unit 82 is configured to: extract the target text features of the topic text to be classified, and extract the label description features of the label description information of each of the topic labels to be predicted;
- the first determining unit 83 is configured to: determine the tag correlation between the target text feature and each of the tag description features, to obtain at least one tag correlation;
- the second determining unit 84 is configured to: based on at least one of the tag correlations, determine a target topic tag matching the topic text to be classified among at least one topic tag to be predicted.
- the target topic label is determined in the topic label to be predicted, so that the corresponding topic label can be more accurately determined for the topic text to be classified, so that Improve the accuracy of topic classification of topic texts to be classified.
- the topic text to be classified is a book-tweeting topic associated with book recommendation
- the topic label of the book-tweeting topic can be determined more accurately, and the classification accuracy of the book-tweeting topic can be improved, so that it can be more accurate for Users push out satisfactory books, thereby improving the user's reading experience.
- the target text features include a plurality of sub-text features, each sub-text feature corresponds to each first unit text in the topic text to be classified, and the first determining unit 83 is further configured to:
- Correlation degree based on the correlation coefficient of each of the first unit texts, perform a weighted summation calculation on the sub-text features of each of the first unit texts, and determine the label correlation according to the calculation results.
- the first determination unit 83 is further configured to:
- the first sub-correlation coefficient of the first unit text Based on the sub-text features of each of the first unit texts, determine the first sub-correlation coefficient of the first unit text; determine the second sub-correlation coefficient based on the target text features and the label description features; A ratio between a sub-correlation coefficient and said second sub-correlation coefficient determines said correlation coefficient.
- the first determination unit 83 is further configured to:
- the label description features include a plurality of second unit texts; the first determining unit 83 is further configured to:
- the first acquiring unit 81 is also configured to:
- the original text data is segmented to obtain the topic text to be classified and the tag description information.
- the extracting unit 82 is also used to:
- the topic text to be classified includes at least one of the following: topic title text, topic abstract text, and topic label description text.
- the device is also used for:
- the extracting the target text features of the topic text to be classified, and extracting the label description features of the label description information of each topic label to be predicted includes: extracting the topic to be classified through the feature extraction layer in the text classification model The target text features of the text, and extract the label description features of the label description information of each of the topic tags to be predicted; the determination of the label correlation between the target text features and each of the label description features obtains at least A tag correlation, comprising: determining the tag correlation between the target text features and each of the tag description features through a correlation determination layer in the text classification model, to obtain at least one tag correlation;
- the tag correlation, determining a target topic tag matching the topic text to be classified in at least one of the topic tags to be predicted includes: based on at least one of the tag correlations through a classification layer in a text classification model, A target topic tag matching the topic text to be classified is determined among at least one topic tag to be predicted.
- the device is also used for:
- each training sample contains a topic label to be predicted and a topic text to be trained, and each of the training samples contains a matching label, and the matching label is used to indicate the topic label to be predicted and the topic text to be trained
- the matching between topic texts; the text classification model to be trained is trained through the plurality of training samples to obtain the text classification model.
- the device is also used for:
- the device includes: a first display unit 91, a receiving unit 92, a second acquisition unit 93, and a second display unit 94; wherein,
- the first display unit 91 is configured to: display the operation page of the topic text
- the receiving unit 92 is configured to: receive target data input by the user on the operation page, wherein the target data includes: topic text to be published, or interesting topic tags;
- the second acquisition unit 93 is configured to: acquire the screening result determined by the server based on the target data, wherein the screening result is the target data determined by the server based on the text classification method described in the above embodiment. The result after screening the data for screening;
- the second display unit 94 is configured to: display the target data and/or the screening results of the target data on the operation page.
- the hashtags of the book push topics can be more accurately determined, and the classification accuracy of the book push topics can be improved, so that satisfactory books can be pushed to users more accurately, thereby improving the user's reading experience.
- the target data includes the topic text to be published, and the second display unit 94 is also used for:
- the second display unit 94 is also used for:
- the modified target hashtag is displayed on the page, wherein the modifying operation includes at least one of the following: adding, deleting, and modifying.
- the target data includes the topic tag of interest
- the device is also used for:
- the target data includes topic tags of interest
- the first display unit 91 is also used for:
- the target data includes the topic tag of interest; the second display unit 94 is further configured to:
- the topic tags of interest are displayed in the title display area of the operation page; the key topic content of the published topic text matching each of the topic tags of interest is displayed in the text display area of the operation page.
- the second display unit 94 is also used for:
- the embodiment of the present disclosure also provides another computer device 1000, as shown in Figure 10, which is a schematic structural diagram of the computer device 1000 provided by the embodiment of the present disclosure, including:
- Processor 101 memory 102, and bus 103; memory 102 is used for storing and executing instructions, including memory 1021 and external memory 1022; memory 1021 here is also called internal memory, and is used for temporarily storing computing data in the processor 101, and The data exchanged by the external memory 1022 such as hard disk, the processor 101 exchanges data with the external memory 1022 through the memory 1021, and when the computer device 1000 is running, the processor 101 communicates with the memory 102 through the bus 103, so that The processor 101 executes the following instructions:
- a target topic tag matching the topic text to be classified is determined among at least one topic tag to be predicted.
- the embodiment of the present disclosure also provides a computer device 1100, as shown in FIG. 11, which is a schematic structural diagram of the computer device 1100 provided by the embodiment of the present disclosure, including:
- Processor 111 memory 112, and bus 113; memory 112 is used for storing execution order, comprises memory 1121 and external memory 1122; memory 1121 here is also called internal memory, is used for temporarily storing the operation data in processor 111, and The data exchanged by the external memory 1122 such as a hard disk, the processor 111 exchanges data with the external memory 1122 through the memory 1121, and when the computer device 1100 is running, the processor 111 communicates with the memory 112 through the bus 113, so that The processor 111 executes the following instructions:
- target data input by the user on the operation page, wherein the target data includes: topic text to be published, or topic tags of interest;
- the screening result is a result of the server filtering the data to be screened determined based on the target data based on the text classification method described in the above embodiment;
- the target data and/or the screening results of the target data are displayed on the operation page.
- Embodiments of the present disclosure also provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is run by a processor, the text classification and text processing methods described in the above-mentioned method embodiments are executed. step.
- the storage medium may be a volatile or non-volatile computer-readable storage medium.
- Embodiments of the present disclosure also provide a computer program product, which carries a program code, and the instructions included in the program code can be used to execute the steps of the text classification and text processing methods described in the above method embodiments, specifically Refer to the foregoing method embodiments, and details are not repeated here.
- the above-mentioned computer program product may be specifically implemented by means of hardware, software or a combination thereof.
- the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK) etc. wait.
- a software development kit Software Development Kit, SDK
- An embodiment of the present disclosure also provides a computer program, the computer program is stored in a readable storage medium, at least one processor of an electronic device can read the computer program from the readable storage medium, at least one of the The processor executes the computer program, so that the electronic device executes the steps of the text classification and text processing methods described in the above method embodiments. For details, refer to the above method embodiments, and details will not be repeated here.
- the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
- each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
- the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium executable by a processor.
- the technical solution of the present disclosure is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present disclosure.
- the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disc and other media that can store program codes. .
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computational Linguistics (AREA)
- Artificial Intelligence (AREA)
- General Health & Medical Sciences (AREA)
- Health & Medical Sciences (AREA)
- Data Mining & Analysis (AREA)
- Audiology, Speech & Language Pathology (AREA)
- Life Sciences & Earth Sciences (AREA)
- Biophysics (AREA)
- Biomedical Technology (AREA)
- Evolutionary Computation (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Databases & Information Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
Claims (24)
- 一种文本分类方法,其中,应用于服务器,包括:获取待分类话题文本和至少一个待预测话题标签的标签描述信息;提取所述待分类话题文本的目标文本特征,并提取每个所述待预测话题标签的标签描述信息的标签描述特征;确定所述目标文本特征和每个所述标签描述特征之间的标签相关性,得到至少一个标签相关性;基于至少一个所述标签相关性,在至少一个所述待预测话题标签中确定与所述待分类话题文本相匹配的目标话题标签。
- 根据权利要求1所述的方法,其中,所述目标文本特征中包含多个子文本特征,每个子文本特征对应所述待分类话题文本中每个第一单位文本;所述确定所述目标文本特征和每个所述标签描述特征之间的标签相关性,包括:基于所述目标文本特征和所述标签描述特征,确定每个所述第一单位文本的相关系数,其中,所述相关系数用于表征所述第一单位文本与对应待预测话题标签之间的标签相关程度;基于每个所述第一单位文本的相关系数,对各个所述第一单位文本的子文本特征进行加权求和计算,并根据计算结果确定所述标签相关性。
- 根据权利要求2所述的方法,其中,所述基于所述目标文本特征和所述标签描述特征,确定每个所述第一单位文本的相关系数,包括:基于每个所述第一单位文本的子文本特征,确定所述第一单位文本的第一子相关系数;基于所述目标文本特征和所述标签描述特征确定第二子相关系数;基于所述第一子相关系数和所述第二子相关系数之间的比值确定所述相关系数。
- 根据权利要求3所述的方法,其中,所述基于每个所述第一单位文本的子文本特征,确定所述第一单位文本的第一子相关系数,包括:基于每个所述第一单位文本的子文本特征和预设权重矩阵,确定所述第一单位文本的第一权重;基于所述第一权重确定所述第一子相关系数。
- 根据权利要求3所述的方法,其中,所述标签描述特征中包含多个第二单位文本;所述基于所述目标文本特征和所述标签描述特征确定第二子相关系数,包括:基于所述目标文本特征和预设权重矩阵确定各个第一单位文本的第二权重;基于所述标签描述特征和所述预设权重矩阵确定各个第二单位文本的第三权重;基于所述第二权重和所述第三权重确定所述第二子相关系数。
- 根据权利要求1至5中任一项所述的方法,其中,所述获取待分类话题文本和至少一个待预测话题标签的标签描述信息,包括:获取待处理的原始文本数据,并确定所述原始文本数据中所包含的文本类型标识;基于所述文本类型标识确定所述原始文本数据的数据分割位置,并基于所述数据分割位置对所述原始文本数据进行分割处理,得到所述待分类话题文本和所述标签描述信息。
- 根据权利要求1至6中任一项所述的方法,其中,所述提取所述待分类话题文本的目标文本特征,包括:确定所述待分类话题文本中每个第一单位文本的目标向量,其中,所述目标向量中的元素用于指示所述第一单位文本和每个预设单位文本之间的映射关系;在所述待分类话题文本中全部第一单位文本的目标向量中提取所述待分类话题文本的关键特征向量,并将所述关键特征向量确定为所述目标文本特征。
- 根据权利要求1至7中任一项所述的方法,其中,所述待分类话题文本包括以下至少之一:话题标题文本、话题摘要文本、话题标签描述文本。
- 根据权利要求1至6中任一项所述的方法,其中,所述提取所述待分类话题文本的目标文本特征,并提取每个所述待预测话题标签的标签描述信息的标签描述特征,包括:通过文本分类模型中的特征提取层提取所述待分类话题文本的目标文本特征,并提取每个所述待预测话题标签的标签描述信息的标签描述特征;所述确定所述目标文本特征和每个所述标签描述特征之间的标签相关性,得到至少一个标签相关性,包括:通过文本分类模型中的相关性确定层确定所述目标文本特征和每个所述标签描述特征之间的标签相关性,得到至少一个标签相关性;所述基于至少一个所述标签相关性,在至少一个所述待预测话题标签中确定与所述待分类话题文本相匹配的目标话题标签,包括:通过文本分类模型中的分类层基于至少一个所述标签相关性,在至少一个所述待预测话题标签中确定与所述待分类话题文本相匹配的目标话题标签。
- 根据权利要求9所述的方法,其中,所述方法还包括:确定多个训练样本;其中,每个训练样本中包含待预测话题标签和待训练话题文本,每个所述训练样本包含匹配标签,所述匹配标签用于指示所述待预测话题标签和待训练话题文本之间的匹配性;通过所述多个训练样本对待训练的文本分类模型进行训练,得到所述文本分类模型。
- 根据权利要求10所述的方法,其中,所述通过所述多个训练样本对待训练的文本分类模型进行训练,得到所述文本分类模型,包括:确定所述多个训练样本中所包含待预测话题标签的第一标签数量,并确定所述待预测话题标签中与所述待训练话题文本相匹配的目标分类标签的第二标签数量;基于所述第一标签数量、所述第二标签数量、所述匹配标签和所述待训练的文本分类模型对所述多个训练样本的预测结果,确定所述待训练的文本分类模型的目标损失函数值;根据所述目标损失函数值,调整所述待训练的文本分类模型的模型参数,得到所述文本分类模型。
- 一种文本处理方法,其中,应用于终端设备,包括:展示话题文本的操作页面;接收用户在所述操作页面输入的目标数据,其中,所述目标数据包括:待发布话题文本,或者,感兴趣话题标签;获取服务器基于所述目标数据确定的筛选结果,其中,所述筛选结果为所述服务器 基于上述权利要求1至11中任一项所述的文本分类方法对基于所述目标数据确定的待筛选数据进行筛选之后的结果;在所述操作页面展示所述目标数据和/或所述目标数据的筛选结果。
- 根据权利要求12所述的方法,其中,所述目标数据包含所述待发布话题文本;所述在所述操作页面展示所述目标数据和/或所述目标数据的筛选结果,包括:在所述操作页面的第一展示位置展示所述待发布话题文本;在所述操作页面的第二展示位置展示所述待发布话题文本的发布类型和/或与所述待发布话题文本相匹配的至少一个目标话题标签。
- 根据权利要求13所述的方法,其中,所述方法还包括:检测用户针对所述操作页面中所展示的所述目标话题标签的标签修改标识的触发操作,对所述目标话题标签执行与用户所触发的标签修改标识相匹配的修改操作,并在所述操作页面中展示修改之后的目标话题标签,其中,所述修改操作包括以下至少之一:新增、删除、修改。
- 根据权利要求12所述的方法,其中,所述目标数据包含所述感兴趣话题标签;所述方法还包括:在接收用户在所述操作页面输入的感兴趣话题标签之后,检测所述感兴趣话题标签的标签数量是否超过预设数量;在所述标签数量超过所述预设数量的情况下,展示提示信息;所述提示信息用于指示所述感兴趣话题标签的数量已达到所述预设数量。
- 根据权利要求12所述的方法,其中,所述目标数据包括感兴趣话题标签;所述展示话题文本的操作页面,包括:响应于用户的话题筛选请求,获取所属于至少一个目标话题类别的预设话题标签;在所述操作页面中确定每个所述目标话题类别的类别展示区域,并在所述类别展示区域中展示对应目标话题类别和所属于所述目标话题类别的预设话题标签。
- 根据权利要求12所述的方法,其中,所述目标数据包括所述感兴趣话题标签;所述在所述操作页面展示所述目标数据和/或所述目标数据的筛选结果,包括:在所述操作页面的标题展示区域中展示所述感兴趣话题标签;在所述操作页面的文本展示区域中展示与每个所述感兴趣话题标签相匹配的已发布话题文本的关键话题内容。
- 根据权利要求17所述的方法,其中,所述方法还包括:响应于针对所述感兴趣话题标签的选择操作,确定用户所选择的目标话题标签,并获取与所述目标话题标签相匹配的已发布话题文本;在话题筛选页面的文本展示区域中展示与所述目标话题标签相匹配的已发布话题文本的关键话题内容。
- 一种文本分类装置,其中,应用于服务器,包括:第一获取单元,用于获取待分类话题文本和至少一个待预测话题标签的标签描述信息;提取单元,用于提取所述待分类话题文本的目标文本特征,并提取每个所述待预测话题标签的标签描述信息的标签描述特征;第一确定单元,用于确定所述目标文本特征和每个所述标签描述特征之间的标签相关性,得到至少一个标签相关性;第二确定单元,用于基于至少一个所述标签相关性,在至少一个所述待预测话题标签中确定与所述待分类话题文本相匹配的目标话题标签。
- 一种文本处理装置,其中,应用于终端设备,包括:第一展示单元,用于展示话题文本的操作页面;接收单元,用于接收用户在所述操作页面输入的目标数据,其中,所述目标数据包括:待发布话题文本,或者,感兴趣话题标签;第二获取单元,用于获取服务器基于所述目标数据确定的筛选结果,其中,所述筛选结果为所述服务器基于上述权利要求1至11中任一项所述的文本分类方法对基于所述目标数据确定的待筛选数据进行筛选之后的结果;第二展示单元,用于在所述操作页面展示所述目标数据和/或所述目标数据的筛选结果。
- 一种计算机设备,其中,包括:处理器、存储器和总线,所述存储器存储有所述处理器可执行的机器可读指令,当计算机设备运行时,所述处理器与所述存储器之间通过总线通信,所述机器可读指令被所述处理器执行时执行如权利要求1至11中任一项所述的文本分类方法的步骤或执行如权利要求12至18中任一项所述的文本处理方法的步骤。
- 一种计算机可读存储介质,其中,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器运行时执行如权利要求1至11中任一项所述的文本分类方法的步骤或执行如权利要求12至18中任一项所述的文本处理方法的步骤。
- 一种计算机程序产品,其中,所述计算机程序产品包括计算机程序指令,所述计算机程序指令使得计算机执行如权利要求1至11中任一项所述的文本分类方法的步骤或执行如权利要求12至18中任一项所述的文本处理方法的步骤。
- 一种计算机程序,其中,所述计算机程序使得计算机执行如权利要求1至11中任一项所述的文本分类方法的步骤或执行如权利要求12至18中任一项所述的文本处理方法的步骤。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US18/702,655 US20240419891A1 (en) | 2022-01-27 | 2022-12-22 | Text classification method and apparatus, text processing method and apparatus, computer device and storage medium |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210102790.9A CN114443847A (zh) | 2022-01-27 | 2022-01-27 | 文本分类、文本处理方法、装置、计算机设备及存储介质 |
| CN202210102790.9 | 2022-01-27 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2023142809A1 true WO2023142809A1 (zh) | 2023-08-03 |
Family
ID=81369779
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2022/141171 Ceased WO2023142809A1 (zh) | 2022-01-27 | 2022-12-22 | 文本分类、文本处理方法、装置、计算机设备及存储介质 |
Country Status (3)
| Country | Link |
|---|---|
| US (1) | US20240419891A1 (zh) |
| CN (1) | CN114443847A (zh) |
| WO (1) | WO2023142809A1 (zh) |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118626653A (zh) * | 2024-08-09 | 2024-09-10 | 西安康奈网络科技有限公司 | 一种基于特征识别的网络新闻归类管理系统 |
| CN121071146A (zh) * | 2025-11-05 | 2025-12-05 | 数字浙江技术运营有限公司 | 基于实体增强和多粒度融合的文档打标方法及系统 |
Families Citing this family (8)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN114443847A (zh) * | 2022-01-27 | 2022-05-06 | 北京字节跳动网络技术有限公司 | 文本分类、文本处理方法、装置、计算机设备及存储介质 |
| CN115631496B (zh) * | 2022-11-07 | 2025-07-04 | 腾讯科技(深圳)有限公司 | 标签预测方法、文本预测模型的训练方法、装置及设备 |
| CN116108173A (zh) * | 2022-12-23 | 2023-05-12 | 微梦创科网络科技(中国)有限公司 | 一种文本召回方法、装置、存储介质及设备 |
| CN116304745B (zh) * | 2023-03-27 | 2024-04-12 | 济南大学 | 基于深层次语义信息的文本话题匹配方法及系统 |
| CN116821671B (zh) * | 2023-04-12 | 2026-03-03 | 浙江大华技术股份有限公司 | 一种文本识别模型训练方法、文本识别方法及相关装置 |
| CN117009679A (zh) * | 2023-06-25 | 2023-11-07 | 雪球(北京)技术开发有限公司 | 信息发布方法、装置、存储介质和电子设备 |
| CN116992031B (zh) * | 2023-08-29 | 2024-01-09 | 腾讯科技(深圳)有限公司 | 数据处理方法、装置、电子设备、存储介质及程序产品 |
| CN121704744A (zh) * | 2024-09-20 | 2026-03-20 | 华为技术有限公司 | 话题标签确定方法、终端设备、云服务器及可读存储介质 |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN109918653A (zh) * | 2019-02-21 | 2019-06-21 | 腾讯科技(深圳)有限公司 | 确定文本数据的关联话题及模型的训练方法、装置和设备 |
| US20200045122A1 (en) * | 2018-08-06 | 2020-02-06 | Baidu Online Network Technology (Beijing) Co., Ltd. | Method and apparatus for pushing information |
| CN113064964A (zh) * | 2021-03-22 | 2021-07-02 | 广东博智林机器人有限公司 | 文本分类方法、模型训练方法、装置、设备以及存储介质 |
| CN113778295A (zh) * | 2021-09-28 | 2021-12-10 | 北京字跳网络技术有限公司 | 一种书籍推荐方法、装置、计算机设备及存储介质 |
| CN114443847A (zh) * | 2022-01-27 | 2022-05-06 | 北京字节跳动网络技术有限公司 | 文本分类、文本处理方法、装置、计算机设备及存储介质 |
Family Cites Families (26)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US7634467B2 (en) * | 2006-10-31 | 2009-12-15 | Microsoft Corporation | Implicit, specialized search of business objects using unstructured text |
| US11023675B1 (en) * | 2009-11-03 | 2021-06-01 | Alphasense OY | User interface for use with a search engine for searching financial related documents |
| US20140379719A1 (en) * | 2013-06-24 | 2014-12-25 | Tencent Technology (Shenzhen) Company Limited | System and method for tagging and searching documents |
| US9348901B2 (en) * | 2014-01-27 | 2016-05-24 | Metricstream, Inc. | System and method for rule based classification of a text fragment |
| CN104199857B (zh) * | 2014-08-14 | 2017-06-27 | 西安交通大学 | 一种基于多标签分类的税务文档层次分类方法 |
| US9715495B1 (en) * | 2016-12-15 | 2017-07-25 | Quid, Inc. | Topic-influenced document relationship graphs |
| US10832166B2 (en) * | 2016-12-20 | 2020-11-10 | Conduent Business Services, Llc | Method and system for text classification based on learning of transferable feature representations from a source domain |
| US11074303B2 (en) * | 2018-05-21 | 2021-07-27 | Hcl Technologies Limited | System and method for automatically summarizing documents pertaining to a predefined domain |
| RU2686000C1 (ru) * | 2018-06-20 | 2019-04-23 | Общество с ограниченной ответственностью "Аби Продакшн" | Извлечение информационных объектов с использованием комбинации классификаторов, анализирующих локальные и нелокальные признаки |
| US11048734B1 (en) * | 2018-08-20 | 2021-06-29 | Pinterest, Inc. | Auto-completion based on content similarities |
| CN110046231B (zh) * | 2018-12-21 | 2023-08-04 | 创新先进技术有限公司 | 一种客服信息处理方法、服务器和系统 |
| US10937416B2 (en) * | 2019-02-01 | 2021-03-02 | International Business Machines Corporation | Cross-domain multi-task learning for text classification |
| US11210470B2 (en) * | 2019-03-28 | 2021-12-28 | Adobe Inc. | Automatic text segmentation based on relevant context |
| CN112579730A (zh) * | 2019-09-11 | 2021-03-30 | 慧科讯业有限公司 | 高扩展性、多标签的文本分类方法和装置 |
| US11386463B2 (en) * | 2019-12-17 | 2022-07-12 | At&T Intellectual Property I, L.P. | Method and apparatus for labeling data |
| US11475364B2 (en) * | 2020-03-10 | 2022-10-18 | Oracle International Corporation | Systems and methods for analyzing a list of items using machine learning models |
| US11816162B2 (en) * | 2020-07-31 | 2023-11-14 | Adobe Inc. | Methods and systems for search query language identification |
| CN114579730B (zh) * | 2020-11-30 | 2026-04-28 | 伊姆西Ip控股有限责任公司 | 信息处理方法、电子设备和计算机程序产品 |
| CN113177121A (zh) * | 2021-05-20 | 2021-07-27 | 中国建设银行股份有限公司 | 文本主题分类方法、装置、电子设备以及存储介质 |
| CN113821589B (zh) * | 2021-06-10 | 2024-06-25 | 腾讯科技(深圳)有限公司 | 一种文本标签的确定方法及装置、计算机设备和存储介质 |
| CN113626589B (zh) * | 2021-06-18 | 2023-04-18 | 电子科技大学 | 一种基于混合注意力机制的多标签文本分类方法 |
| CN113627447B (zh) * | 2021-10-13 | 2022-02-08 | 腾讯科技(深圳)有限公司 | 标签识别方法、装置、计算机设备、存储介质及程序产品 |
| CN114942991B (zh) * | 2022-03-10 | 2023-04-21 | 华院计算技术(上海)股份有限公司 | 一种基于隐喻识别的情感分类模型构建方法 |
| WO2024248731A1 (en) * | 2023-05-26 | 2024-12-05 | Agency For Science Technology And Research | Method and apparatus for multi-label text classification |
| CN116860970A (zh) * | 2023-07-05 | 2023-10-10 | 平安科技(深圳)有限公司 | 基于TextCNN模型的文本分类方法、装置、设备及介质 |
| KR20250138485A (ko) * | 2024-03-13 | 2025-09-22 | 두나무 주식회사 | 인공지능 모델의 학습 방법, 텍스트 데이터의 지정된 토픽과의 관련도를 나타내는 스코어를 산출하는 방법 및 이를 수행하는 전자 장치 |
-
2022
- 2022-01-27 CN CN202210102790.9A patent/CN114443847A/zh active Pending
- 2022-12-22 WO PCT/CN2022/141171 patent/WO2023142809A1/zh not_active Ceased
- 2022-12-22 US US18/702,655 patent/US20240419891A1/en active Pending
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US20200045122A1 (en) * | 2018-08-06 | 2020-02-06 | Baidu Online Network Technology (Beijing) Co., Ltd. | Method and apparatus for pushing information |
| CN109918653A (zh) * | 2019-02-21 | 2019-06-21 | 腾讯科技(深圳)有限公司 | 确定文本数据的关联话题及模型的训练方法、装置和设备 |
| CN113064964A (zh) * | 2021-03-22 | 2021-07-02 | 广东博智林机器人有限公司 | 文本分类方法、模型训练方法、装置、设备以及存储介质 |
| CN113778295A (zh) * | 2021-09-28 | 2021-12-10 | 北京字跳网络技术有限公司 | 一种书籍推荐方法、装置、计算机设备及存储介质 |
| CN114443847A (zh) * | 2022-01-27 | 2022-05-06 | 北京字节跳动网络技术有限公司 | 文本分类、文本处理方法、装置、计算机设备及存储介质 |
Cited By (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN118626653A (zh) * | 2024-08-09 | 2024-09-10 | 西安康奈网络科技有限公司 | 一种基于特征识别的网络新闻归类管理系统 |
| CN121071146A (zh) * | 2025-11-05 | 2025-12-05 | 数字浙江技术运营有限公司 | 基于实体增强和多粒度融合的文档打标方法及系统 |
Also Published As
| Publication number | Publication date |
|---|---|
| CN114443847A (zh) | 2022-05-06 |
| US20240419891A1 (en) | 2024-12-19 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| WO2023142809A1 (zh) | 文本分类、文本处理方法、装置、计算机设备及存储介质 | |
| CN111008321B (zh) | 基于逻辑回归推荐方法、装置、计算设备、可读存储介质 | |
| CN106649818B (zh) | 应用搜索意图的识别方法、装置、应用搜索方法和服务器 | |
| CN111324771B (zh) | 视频标签的确定方法、装置、电子设备及存储介质 | |
| WO2023108980A1 (zh) | 基于文本对抗样例的信息推送方法及装置 | |
| WO2022116537A1 (zh) | 一种资讯推荐方法、装置、电子设备和存储介质 | |
| CN110059271B (zh) | 运用标签知识网络的搜索方法及装置 | |
| CN101499062B (zh) | 用于收集实体别名的方法和设备 | |
| CN110413787B (zh) | 文本聚类方法、装置、终端和存储介质 | |
| CN109740152B (zh) | 文本类目的确定方法、装置、存储介质和计算机设备 | |
| CN107832338B (zh) | 一种识别核心产品词的方法和系统 | |
| WO2020108608A1 (zh) | 搜索结果处理方法、装置、终端、电子设备及存储介质 | |
| EP2510464B1 (en) | Lazy evaluation of semantic indexing | |
| CN112989208B (zh) | 一种信息推荐方法、装置、电子设备及存储介质 | |
| CN111259173B (zh) | 一种搜索信息推荐方法及装置 | |
| WO2023273686A1 (zh) | 一种信息搜索方法、装置、计算机设备及存储介质 | |
| CN112199526A (zh) | 一种多媒体内容发布的方法、装置、电子设备及存储介质 | |
| CN111506831A (zh) | 一种协同过滤的推荐模块、方法、电子设备及存储介质 | |
| CN107193892B (zh) | 一种文档主题确定方法及装置 | |
| CN112527963B (zh) | 基于词典的多标签情感分类方法及装置、设备、存储介质 | |
| CN112948575B (zh) | 文本数据处理方法、装置和计算机可读存储介质 | |
| CN103778206A (zh) | 一种网络服务资源的提供方法 | |
| CN114328600A (zh) | 确定标准数据元的方法、装置、设备及存储介质 | |
| CN114491046A (zh) | 基于语言模型的信息交互方法及其装置、电子设备 | |
| CN111611491A (zh) | 搜索词推荐方法、装置、设备及可读存储介质 |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22923595 Country of ref document: EP Kind code of ref document: A1 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 18702655 Country of ref document: US |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 11.11.2024) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 22923595 Country of ref document: EP Kind code of ref document: A1 |
