Text information processing method, device and system

After extracting and removing variable information in the text message, the remaining text is vectorized and matched, which solves the problem of low recall efficiency of text information in the prior art, and realizes efficient text information recall and noise removal.

CN112749250BActive Publication Date: 2025-02-18ALIBABA GROUP HOLDING LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN201911047758.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-10-30
Publication Date
2025-02-18
Estimated Expiration
2039-10-30

AI Technical Summary

Technical Problem

In the prior art, text information recall is relatively low, and it is impossible to effectively distinguish the content of the SMS template from the variable content, resulting in a greater impact on noise.

Method used

By extracting variable information in text information, removing variable information, vectorizing the remaining text, and matching it with the pre-stored vector library to obtain the label of text information.

Benefits of technology

It realizes efficient recall of text information, distinguishes template information from variable information, reduces noise impact, and improves matching ability and recall efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112749250B_ABST
    Figure CN112749250B_ABST
Patent Text Reader

Abstract

The present application discloses a method, device and system for processing text information. The method includes: extracting variable information from text information, wherein the variable information is an information element in the text information; removing the variable information from the text information to obtain the remaining text information; vectorizing the remaining text information to obtain the remaining text vector corresponding to the remaining text information; matching the remaining text vector with the pre-stored vector in the vector library to obtain the label of the text information, wherein the vector library includes the pre-stored vector corresponding to the marked text information, and the label is used to indicate the type of the text information. The present application solves the technical problem of low efficiency of text information recall in the prior art.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of text processing, and in particular, to a method, device and system for processing text information. Background Art

[0002] Artificial Intelligence (AI) is a branch of computer science, which has been widely recognized in the computer field and has been applied in robots, economic and political decision-making, control systems, simulation systems, etc. Among them, using AI technology to identify text information (for example, SMS content) can ensure the security of SMS services, reduce SMS complaints, and improve operational efficiency.

[0003] SMS full content recognition aims to identify the subject label, intent label and risk label of SMS through SMS content. Through SMS full content recognition, illegal and irregular SMS can be intercepted, high-risk SMS can be controlled, and the channel scheduling of SMS sending can be optimized according to the label, and the data analysis results of SMS content can be empowered to partners inside and outside the group. Rapid recall of similar SMS is part of the SMS full content recognition architecture. Among them, recall of similar SMS can be regarded as a text matching problem.

[0004] However, traditional text matching methods do not take into account that SMS content is usually generated by templates, and therefore do not distinguish between SMS template content and SMS variable content. Usually, variable content has little impact on SMS matching, while traditional methods introduce all SMS content into the matching process and cannot effectively remove noise.

[0005] Existing text matching methods include string matching methods and machine learning-based methods. Among them, string matching methods, such as calculating edit distance, have high time complexity and can only match based on literal meaning, which is not suitable for scenarios where SMS is quickly recalled. Machine learning-based text matching methods are divided into unsupervised methods and supervised learning methods. Among them, unsupervised learning methods cannot effectively use the annotated SMS correlation for data matching, and cannot adjust the matching model according to the correlation data of online reflux, and the effect is poor. Supervised learning-based text matching methods include representation-based text matching methods and interactive-based text matching methods. Among them, the representation-based text matching method converts the input vector to obtain the final vector representation, and recalls through the final vector, with high recall efficiency but poor matching ability; the interactive-based text matching method needs to calculate the similarity between the query word query and the query content doc, with good matching effect but low time efficiency. In addition, in the vector recall stage, the traditional text matching method directly calculates the Cartesian product of query and doc. For massive data scenarios, this method cannot be applied to scenarios with high recall time requirements.

[0006] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0007] The embodiments of the present application provide a method, device and system for processing text information, so as to at least solve the technical problem of low efficiency of text information recall in the prior art.

[0008] According to one aspect of an embodiment of the present application, a method for processing text information is provided, including: extracting variable information from the text information, wherein the variable information is an information element in the text information; removing the variable information from the text information to obtain remaining text information; vectorizing the remaining text information to obtain a remaining text vector corresponding to the remaining text information; and obtaining a label of the text information by matching the remaining text vector with a pre-stored vector in a vector library, wherein the vector library includes pre-stored vectors corresponding to the labeled text information, and the label is used to indicate the type of the text information.

[0009] According to another aspect of an embodiment of the present application, a method for recalling text messages is also provided, including: extracting variable information in a text message, wherein the variable information is an information element in the text message; removing the variable information in the text message to obtain the remaining text of the text message; vectorizing the remaining text to obtain a remaining text vector corresponding to the remaining text; obtaining a label of the text message by matching the vector with a pre-stored vector in a vector library, wherein the pre-stored vector includes a vector corresponding to a labeled text message, and the label is used to indicate the type of the text message; and recalling the text message according to the label corresponding to the text message.

[0010] According to another aspect of an embodiment of the present application, a text information processing device is also provided, including: an extraction module, used to extract variable information in the text information, wherein the variable information is an information element in the text information; a first processing module, used to remove the variable information in the text information to obtain the remaining text information; a second processing module, used to vectorize the remaining text information to obtain a remaining text vector corresponding to the remaining text information; a matching module, used to obtain a label of the text information by matching the remaining text vector with a pre-stored vector in a vector library, wherein the vector library includes pre-stored vectors corresponding to the labeled text information, and the label is used to indicate the type of the text information.

[0011] Furthermore, the extraction module includes one or more of the following: a first extraction submodule, used to extract information elements in text information through entity recognition; a replacement submodule, used to replace preset characters in text information with specified symbols; a second extraction submodule, used to extract information elements in text information using a preset regular expression.

[0012] Furthermore, the second processing module includes: a word segmentation module, which is used to segment the remaining text information to obtain a word segmentation result; a first processing sub-module, which is used to perform a first vectorization processing on the word segmentation result to obtain the original vector corresponding to the remaining text information, wherein the first vectorization processing is used to convert the word segmentation result into a one-dimensional vector.

[0013] Furthermore, the second processing module also includes: a second processing sub-module, which is used to perform a first vectorization processing on the word segmentation result to obtain the original vector corresponding to the remaining text information, and then perform a second vectorization processing on the original vector to obtain a remaining text vector corresponding to the remaining text, wherein the second vectorization processing is used to convert the one-dimensional vector represented by the original vector into a multi-dimensional vector carrying the semantic information of the remaining text.

[0014] Furthermore, the matching module includes: a selection submodule for selecting a target vector that best matches the remaining text vectors from the vector library; and a determination submodule for determining that the label of the short message corresponding to the target vector is a label of the text information.

[0015] According to another aspect of an embodiment of the present application, a storage medium is further provided, which includes a stored program, wherein when the program is running, the device where the storage medium is located is controlled to execute the above-mentioned text information processing method.

[0016] According to another aspect of an embodiment of the present application, a processor is further provided, and the processor is used to run a program, wherein the above-mentioned text information processing method is executed when the program is run.

[0017] According to another aspect of an embodiment of the present application, a text information processing system is also provided, including: a processor; and a memory, connected to the processor, for providing the processor with instructions for processing the following processing steps: extracting variable information in the text information, wherein the variable information is an information element in the text information; removing the variable information in the text information to obtain remaining text information; performing vectorization processing on the remaining text information to obtain remaining text vectors corresponding to the remaining text information; obtaining a label of the text information by matching the remaining text vectors with pre-stored vectors in a vector library, wherein the vector library includes pre-stored vectors corresponding to the labeled text information, and the label is used to indicate the type of the text information.

[0018] According to another aspect of an embodiment of the present application, a method for processing text information is also provided, including: obtaining voice information generated during a live broadcast, and performing voice recognition on the voice information to obtain text information corresponding to the voice information; extracting variable information in the text information, wherein the variable information is an information element in the text information; removing the variable information in the text information to obtain remaining text information; performing vectorization processing on the remaining text information to obtain a remaining text vector corresponding to the remaining text information; and obtaining a label for the text information by matching the remaining text vector with a pre-stored vector in a vector library, wherein the vector library includes pre-stored vectors corresponding to the labeled text information, and the label is used to indicate whether the text information is legal.

[0019] In an embodiment of the present application, a method of vectorizing text information is adopted, by extracting variable information from the text information and removing the variable information in the text information to obtain the remaining text information, and then vectorizing the remaining text information to obtain the remaining text vector corresponding to the remaining text information, and finally, by matching the remaining text vector with the pre-stored vector in the pre-stored vector, the label of the text information is obtained.

[0020] In the above process, the process of removing variable information from text information realizes the preprocessing of text information, thereby distinguishing the template information and variable information corresponding to the text information, and effectively removing the noise in the text information. In addition, the remaining text information after removing the variable information is vectorized to obtain the remaining text vector, and the remaining text vector is matched with the pre-stored vector in the vector library, without the need for interactive pairwise similarity calculation, which improves the matching ability and thus improves the recall efficiency of SMS.

[0021] It can be seen that the solution provided in the present application achieves the purpose of recalling text information, thereby realizing the technical effect of improving the efficiency of recalling text information, and further solving the technical problem of low efficiency of recalling text information in the prior art. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0023] Figure 1 is a schematic diagram of an optional computing device for implementing a text information processing method according to an embodiment of the present application;

[0024] Figure 2 is a flow chart of a text information processing method according to an embodiment of the present application;

[0025] Figure 3is a schematic diagram of an optional text message according to an embodiment of the present application;

[0026] Figure 4 is a schematic diagram of constructing an optional vector library according to an embodiment of the present application;

[0027] Figure 5 is a schematic diagram of an optional MAP indicator and NDCG indicator according to an embodiment of the present application;

[0028] Figure 6 is a flow chart of a method for recalling text information according to an embodiment of the present application;

[0029] Figure 7 A text information processing device according to an embodiment of the present application;

[0030] Figure 8 is a structural block diagram of a computing device according to an embodiment of the present application; and

[0031] Fig. 9 It is a flowchart of a text information processing method according to an embodiment of the present application. DETAILED DESCRIPTION

[0032] In order to enable those skilled in the art to better understand the solution of the present application, the technical solution in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present application.

[0033] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0034] Example 1

[0035] According to an embodiment of the present application, an embodiment of a method for processing text information is also provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0036] The method embodiment provided in the first embodiment of the present application can be executed in a mobile terminal, a computing device or a similar computing device. Figure 1 FIG. 1 shows a hardware structure block diagram of a computing device (or mobile device) for implementing a text information processing method. Figure 1 As shown, the computing device 10 (or mobile device 10) may include one or more (102a, 102b, ..., 102n are used to illustrate) processors 102 (the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA), a memory 104 for storing data, and a transmission device 106 for communication functions. In addition, it may also include: a display, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 1 The structure shown is for illustration only and does not limit the structure of the electronic device. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations are shown.

[0037] It should be noted that the one or more processors 102 and / or other data processing circuits described above may generally be referred to herein as "data processing circuits". The data processing circuits may be embodied in whole or in part as software, hardware, firmware, or any other combination thereof. In addition, the data processing circuit may be a single independent processing module, or may be incorporated in whole or in part into any of the other components in the computing device 10 (or mobile device). As involved in the embodiments of the present application, the data processing circuit acts as a processor control (e.g., selection of a variable resistor terminal path connected to an interface).

[0038] The memory 104 can be used to store software programs and modules of application software, such as program instructions / data storage devices corresponding to the text information processing method in the embodiment of the present application. The processor 102 executes various functional applications and data processing by running the software programs and modules stored in the memory 104, that is, realizing the above-mentioned text information processing method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the computing device 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0039] The transmission device 106 is used to receive or send data via a network. The specific example of the above network may include a wireless network provided by a communication provider of the computing device 10. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.

[0040] The display may be, for example, a touch screen liquid crystal display (LCD) that may enable a user to interact with a user interface of computing device 10 (or mobile device).

[0041] It should be noted that, in some optional embodiments, the above Figure 1 The computer device (or mobile device) shown may include hardware elements (including circuits), software elements (including computer code stored on a computer-readable medium), or a combination of hardware elements and software elements. It should be noted that Figure 1 This is merely one example of a particular embodiment and is intended to illustrate the types of components that may be present in the above-described computer device (or mobile device).

[0042] Under the above operating environment, this application provides Figure 2 The text information processing method shown in the figure, wherein: Figure 2 : is a flowchart of a method for processing text information according to Embodiment 1 of the present application. Specifically, the method comprises the following steps:

[0043] Step S202, extracting variable information from the text information, wherein the variable information is an information element in the text information.

[0044] In step S202, the text information may be, but is not limited to, text messages, or information sent to consumers through an information exchange system in an e-commerce platform. In this application, text messages are used as an example for explanation. In addition, the above information elements include at least one of the following: a name element, an event element, and a value element. The name element may include a person's name, an address name, an institution name, a drug name, a product name, and a store name. The event element may include an unsubscribe phrase. The value element may include a verification code. For example, Figure 3 In the text message shown, the text message signature, name variable, upper level variable, and WeChat variant are name elements, the number variable and WeChat account number are value elements, and the unsubscribe variable is an event element.

[0045] In an optional embodiment, the information processing system can obtain text information and extract variable information from the text information. Optionally, the information processing system can obtain text information from a server that sends text information to users. For example, when each seller on an e-commerce platform sends text information to a buyer through a server, the server records and stores the text information sent by each seller to the buyer. In this scenario, the information processing system obtains the text information from the server. Optionally, the information processing system can also obtain text information through various e-commerce platforms. For example, the information processing system sends an information acquisition request to the e-commerce platform. After the seller on the e-commerce platform agrees to send the text information to the information processing system, the information processing system can obtain the text information sent by the seller to the buyer through the e-commerce platform.

[0046] Further, after acquiring the text information, the information processing system extracts variables from the text information. Optionally, the information processing system extracts variable information from the text information including one or more of the following:

[0047] (1) Extracting information elements from text information through entity recognition. Entity recognition is also called proper name recognition. Entity recognition can identify entities with specific meanings in text information, such as names of people, addresses, organizations, proper nouns, etc. For example, Figure 3 In the analysis, "Kuku" and "Miss XX" will be extracted.

[0048] (2) Using a specified symbol to replace a preset character in the text message, wherein the specified symbol may be, but is not limited to, a number or a punctuation mark. For example, Figure 3 In the example, you can use "

$Sig

AA

[0049] (3) Use a preset regular expression to extract information elements from text information. The regular expression consists of common characters and metacharacters. Common characters include uppercase letters, lowercase letters, and numbers. Metacharacters are characters with special meanings, for example, "\r" represents a carriage return character.

[0050] Step S204, removing the variable information in the text information to obtain the remaining text information.

[0051] It should be noted that, in the case where the text information is a short message, the short message is usually edited according to a preset rule or a historical template. However, for short messages with the same template, the similarity is high, and the difference lies only in the variable information. The variable information has little effect on the judgment of similar text information. Therefore, after obtaining the variable information, it is necessary to remove the variable information from the text information to obtain the remaining text information. For example, for Figure 3 The text information shown, after removing the variable information, the remaining text information obtained is "

$Sig

[0052] In an optional embodiment, after extracting the variable information from the text information, the information processing system compares the variable information with the text information, and deletes the content that is the same as the variable information from the text information to obtain the remaining text information.

[0053] In another optional embodiment, after extracting the variable information from the text information, the information processing system obtains the variable information and detects the information element corresponding to the variable information. Then, the information processing system compares the variable information with the text information and replaces the content in the text information that is the same as the variable information with the characters corresponding to the information element to obtain the remaining text information. Figure 3 In the command, replace the content enclosed by “[ ]” with $Sig.

[0054] Step S206, performing vectorization processing on the remaining text information to obtain the remaining text vectors corresponding to the remaining text information.

[0055] Optionally, in step S206, the remaining text information can be vectorized by combining word hashing and BERT (Bidirectional Encoder Representation from Transformers) model. Word hashing is a text vector method that has the characteristic of high efficiency in vectorizing text information; BERT is a text vector model that improves the generalization ability of word vectors and can fully describe the characteristics of character level, word level, sentence level and even inter-sentence relationship.

[0056] It should be noted that the above BERT model can also be replaced by DSSM (Deep Structured Semantic Models) and Siamese-LSTM (Twin LSTM, Long Short Term Memory) models. Among them, DSSM can be used to calculate the similarity between multiple texts, and the Siamese-LSTM model can also be used to calculate the similarity between two phrases or two sentences.

[0057] In addition, it should be noted that the combination of word hashing and the BERT model to vectorize the remaining text information improves the efficiency of vectorization of text information, thereby improving the recall efficiency of text information.

[0058] Step S208, obtaining a label of the text information by matching the remaining text vectors with pre-stored vectors in a vector library, wherein the vector library includes pre-stored vectors corresponding to the marked text information, and the label is used to indicate the type of the text information.

[0059] In step S208, the type of text information characterizes the content, intent, and risk of the text information. For example, for text messages, the label can indicate the content of the text message, the intent of the text message (for example, product promotion, coupon distribution, new product launch, new product display reminder, etc.), and the risk level of the text message (for example, whether the text message is a phishing text message or a spam text message).

[0060] Optionally, after obtaining the label of the text information by matching the remaining text vectors with the pre-stored vectors in the vector library, the information processing system also recalls the text information according to the label corresponding to the text information. For example, the information processing system recalls similar text messages from the labeled vector library through the current text message, and votes on the recall results according to the business logic, and selects the label with the most votes as the label of the current text message.

[0061] It should be noted that the above content realizes accurate analysis of the content of text messages, so that by removing templates from text messages and opening up all variables, the sending cost of text message users can be reduced and the freedom of users to send text messages can be improved.

[0062] Based on the scheme defined in the above steps S202 to S208, it can be known that the text information is vectorized, variable information is extracted from the text information, and the variable information in the text information is removed to obtain the remaining text information, and then the remaining text information is vectorized to obtain the remaining text vector corresponding to the remaining text information, and finally the label of the text information is obtained by matching the remaining text vector with the pre-stored vector in the pre-stored vectors.

[0063] It is easy to notice that the process of removing variable information from text information realizes the preprocessing of text information, thereby distinguishing the template information and variable information corresponding to the text information, and effectively removing the noise in the text information. In addition, the remaining text information after removing the variable information is vectorized to obtain the remaining text vector, and the remaining text vector is matched with the pre-stored vector in the vector library, without the need for interactive pairwise similarity calculation, which improves the matching ability and thus improves the recall efficiency of SMS.

[0064] It can be seen that the solution provided in the present application achieves the purpose of recalling text information, thereby realizing the technical effect of improving the efficiency of recalling text information, and further solving the technical problem of low efficiency of recalling text information in the prior art.

[0065] In an optional embodiment, after removing the variable information from the text information to obtain the remaining text information, the information processing system performs vectorization processing on the remaining text information to obtain a remaining text vector corresponding to the remaining text information. Specifically, the information processing system performs word segmentation on the remaining text information to obtain a word segmentation result, and then performs a first vectorization processing on the word segmentation result to obtain an original vector corresponding to the remaining text information, wherein the first vectorization processing is used to convert the word segmentation result into a one-dimensional vector.

[0066] In the above process, segmenting the remaining text information means dividing the text sequence into at least one separate word. Optionally, the information processing system can first detect the language type corresponding to the remaining text information, and then use the word segmentation algorithm corresponding to the language type to segment the remaining text information to obtain the word segmentation result. Among them, when the remaining text information is in Chinese, an algorithm based on string matching (for example, a forward maximum matching algorithm, a reverse maximum matching algorithm, a long word priority algorithm, etc.), a word segmentation algorithm based on statistics and machine learning (for example, a hidden Markov algorithm and a conditional random field algorithm, etc.) can be used.

[0067] After obtaining the word segmentation result, the information processing system performs a first vectorization process on the word segmentation result, wherein the information processing system may perform the first vectorization process on the word segmentation result based on word hashing.

[0068] Furthermore, after performing a first vectorization process on the word segmentation result to obtain the original vector corresponding to the remaining text information, the information processing system performs a second vectorization process on the original vector to obtain a remaining text vector corresponding to the remaining text, wherein the second vectorization process is used to convert the one-dimensional vector represented by the original vector into a multi-dimensional vector carrying the semantic information of the remaining text.

[0069] It should be noted that the information processing system can perform a second vectorization process on the original vector based on the BERT model. The use of the BERT model as the intermediate layer of vector conversion improves the matching ability of the remaining text vector and the pre-stored vector.

[0070] Furthermore, after obtaining the remaining text vectors, the information processing system obtains the label of the text message by matching the vectors with the pre-stored vectors in the vector library. Specifically, the information processing system selects the target vector that best matches the remaining text vectors from the vector library, and determines that the label of the text message corresponding to the target vector is the label of the text message. Among them, the information processing system sorts the vectors in the vector library from high to low according to the degree of match with the remaining text vectors, obtains the vectors in the first N vector libraries in the sorting results, and then selects the target vector from the vectors in the N vector libraries by voting. Among them, N is an integer greater than 0. For example, the information processing system selects the first 10 vectors with the highest matching degree from the vector library, and then selects the vector with the largest number of votes from the first 10 vectors with the highest matching degree as the target vector by voting.

[0071] Optionally, the information processing system clusters the pre-stored vectors and the remaining text vectors in the vector library, and then determines the pre-stored vectors that belong to the same category as the remaining text vectors, and obtains the matching degree between the determined pre-stored vectors and the remaining text vectors. Finally, the determined pre-stored vectors are sorted from high to low according to the corresponding matching degree.

[0072] The information processing system may use a one-pass algorithm to cluster the pre-stored vectors and the remaining text vectors, and may also use a Kmeans algorithm to cluster the pre-stored vectors and the remaining text vectors. The Kmeans algorithm is a cluster analysis algorithm, which is suitable for spherical clustering, and the number of clusters does not need to be pre-determined in the algorithm; the one-pass algorithm has a simple algorithm principle and has the advantage of fast calculation speed.

[0073] In addition, the information processing system can use a product quantization algorithm to calculate the matching degree between the pre-stored vector and the remaining text vector, wherein product quantization is a vector search method, which can divide the remaining text vector into several segments according to the dimension, and then perform Kmeans clustering on each segment of the remaining text vector to finally obtain the matching degree.

[0074] It should be noted that before obtaining the label of the text information by matching the remaining text vectors with the pre-stored vectors in the vector library, the information processing system needs to train the vector library. The process of training the vector library can be carried out in an offline training manner. Specifically, first, the information processing system needs to obtain sample data, wherein the sample data includes a sample text information pair consisting of a plurality of correlated sample text information and a label of the sample text information. Then, the information processing system performs a first vectorization process on the sample text information to obtain the original sample vector corresponding to the sample text information, wherein the first vectorization process is used to convert the sample text information into a one-dimensional vector. Further, the information processing system trains a vector processing model based on the correlation between the original sample vector and the sample text information pair, wherein the vector processing model is used to perform a second vectorization process on the original sample vector to obtain a sample vector corresponding to the sample text information, and the second vectorization process is used to convert the one-dimensional vector represented by the original sample vector into a multi-dimensional vector carrying the semantic information of the sample text information. Finally, the sample vector is determined to be a pre-stored vector, and a vector library is constructed according to the sample vector and the label corresponding to the text information.

[0075] In an optional embodiment, after obtaining the label of the text information by matching the remaining text vectors with the pre-stored vectors in the vector library, the information processing system can also convert the text information into a text template according to the label of the text information, and then store the text template in the template database, wherein the text template includes fixed information and variable information, and generates new text information by filling in the variable information in the text template, and updates the text template in the template database in real time. Figure 3 The text template corresponding to the text message shown in the figure may be "

$Sig

[0076] Optionally, the information processing system can set different types of text templates and store the text templates in a template database, wherein the information processing system can store the text templates according to the labels of the text information, and different types of labels correspond to different text templates. For example, promotional products and new product display reminders correspond to different text templates.

[0077] In addition, the text template may also change. For example, the text template of the promotional product does not contain variable information corresponding to the WeChat account. With the widespread use of WeChat, it is necessary to add variable information and / or fixed information corresponding to the WeChat account to the text template of the promotional product. Thus, the information processing system can also update the text templates in the template database in real time. Optionally, the information processing system can update all text templates in the template database once every preset time period. The information processing system can also update only the text templates that need to be updated when an updated text template is detected.

[0078] Optional, Figure 4 The schematic diagram of constructing the vector library is shown. Figure 4 Take the text message as an example for explanation. Figure 4 It can be seen that the entire construction process includes three layers, namely the template restoration layer, the SMS representation layer, and the vector recall layer. First, the information processing system obtains sample data containing SMS pairs and SMS labels, and preprocesses the SMS in the template restoration layer, wherein the preprocessing includes SMS content extraction, entity recognition, specified symbol replacement, and regular expression information extraction. Then, the information processing system performs word segmentation on the preprocessed SMS to obtain the word segmentation result, and then performs word hashing operation (i.e., the first vectorization processing) on ​​the word segmentation result to obtain the SMS vectors Q, D1, D2, D3, and Dn (i.e., the original sample vector). Then, at the SMS representation layer, the information processing system trains the vector processing model (i.e., the BERT model) based on the SMS vectors Q, D1, D2, D3, and Dn and the correlation between SMS pairs. After completing the training of the vector processing model, the vector processing model performs the second vector processing on the SMS vectors Q, D1, D2, D3, and Dn to obtain the sample vector, such as Figure 4 In the vector recall layer, the information processing system constructs the sample vectors Q', D1', D2', D3', Dn' to obtain a vector library, where the vectors stored in the vector library are doc1, doc2, doc3, doc4, docn. And the full index online prediction part is constructed according to the fast indexing method, such as Figure 4 In the process, the vectors in the vector library are sorted from high to low according to the matching degree with the remaining text vectors, and the first k vectors in the vector library are obtained from the sorting result, such as Figure 4 The vectors doc1' and dock' in , select the target vector query from the vectors in the k vector library by voting.

[0079] From the above content, it can be seen that the solution provided by this application preprocesses text information at the template restoration layer, solves the noise problem, and adopts a representation-based text matching method without the need for interactive pairwise similarity calculations. In addition, the solution provided by this application also uses the BERT model as an intermediate layer for vector conversion, which greatly improves the matching ability of vectors. Finally, the time efficiency is optimized at the vector recall layer to meet the requirements for rapid recall of massive amounts of text information. In addition, Figure 5 The MAP index and NDCG index of the text information recall of the solution provided by the present application and other solutions are shown. Among them, the MAP (Mean Average Precision) index is an index used to measure the detection accuracy. The larger the corresponding value of the index, the higher the accuracy; the NDCG (Normalized Discounted Cumulative Gain) index is used to measure and evaluate the search result algorithm. The larger the corresponding value of this index, the better the model.

[0080] It should be noted that, for the aforementioned method embodiments, for the sake of simplicity, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described order of actions, because according to the present application, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0081] Through the description of the above implementation methods, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), and includes a number of instructions for a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present application.

[0082] Example 2

[0083] According to an embodiment of the present application, a method for recalling text information is also provided, wherein: Figure 6 A flowchart showing a method for recalling text information is shown, Figure 6 As shown, the method comprises the following steps:

[0084] Step S602, extracting variable information in the text message, wherein the variable information is information elements in the text message.

[0085] In step S602, the information element includes at least one of the following: a name element, an event element, and a value element, wherein the name element may include a person's name, an address name, an institution name, a drug name, a product name, and a store name, the event element may include an unsubscribe phrase, and the value element may include a verification code, for example, Figure 3 In the text message shown, the text message signature, name variable, upper level variable, and WeChat variant are name elements, the number variable and WeChat account number are value elements, and the unsubscribe variable is an event element.

[0086] In an optional embodiment, the information processing system can obtain text messages and extract variable information from the text messages. Optionally, the information processing system can obtain text messages from a server that sends text messages to users. For example, when each seller on the e-commerce platform sends text messages to buyers through the server, the server records and stores the text messages sent by each seller to the buyer. In this scenario, the information processing system obtains text messages from the server. Optionally, the information processing system can also obtain text messages through various e-commerce platforms. For example, the information processing system sends an information acquisition request to the e-commerce platform. After the seller on the e-commerce platform agrees to send the text messages to the information processing system, the information processing system can obtain the text messages sent by the seller to the buyer through the e-commerce platform.

[0087] Further, after acquiring the SMS, the information processing system extracts variables from the SMS. Optionally, the information processing system extracts variable information from the SMS including one or more of the following: extracting information elements from the SMS through entity recognition; replacing preset characters in the SMS with specified symbols; extracting information elements from the SMS using preset regular expressions.

[0088] Step S604, remove the variable information in the text message to obtain the remaining text of the text message.

[0089] It should be noted that SMS messages are usually edited according to preset rules or historical templates. However, for SMS messages with the same template, the similarity is high, and the difference lies only in the variable information. However, the variable information has little effect on the judgment of similar SMS messages. Therefore, after obtaining the variable information, it is necessary to remove the variable information from the SMS message to obtain the remaining text. For example, for Figure 3 In the SMS shown in the figure, after removing the variable information, the remaining text obtained is "

$Sig

[0090] In an optional embodiment, after extracting the variable information from the text message, the information processing system compares the variable information with the text message, deletes the content that is the same as the variable information from the text message, and obtains the remaining text.

[0091] In another optional embodiment, after extracting the variable information in the text message, the information processing system obtains the variable information and detects the information element corresponding to the variable information. Then, the information processing system compares the variable information with the text message and replaces the content in the text message that is the same as the variable information with the characters corresponding to the information element to obtain the remaining text. Figure 3 In the command, replace the content enclosed by “[ ]” with $Sig.

[0092] Step S606, vectorize the remaining characters to obtain the remaining character vectors corresponding to the remaining characters.

[0093] Optionally, in step S606, the remaining text may be vectorized by combining word hashing and BERT (Bidirectional Encoder Representation from Transformers) model. Word hashing is a text vector method that has the characteristic of high efficiency in vectorizing text messages; BERT is a text vector model that improves the generalization ability of word vectors and can fully describe the characteristics of character level, word level, sentence level and even inter-sentence relationship.

[0094] It should be noted that the above BERT model can also be replaced by DSSM (Deep Structured Semantic Models) and Siamese-LSTM (Twin LSTM, Long Short Term Memory) models. Among them, DSSM can be used to calculate the similarity between multiple texts, and the Siamese-LSTM model can also be used to calculate the similarity between two phrases or two sentences.

[0095] In addition, it should be noted that the combination of word hashing and the BERT model to vectorize the remaining text improves the vectorization efficiency of text messages, thereby improving the recall efficiency of text messages.

[0096] Step S608, obtaining a label of the SMS by matching the vector with a pre-stored vector in a vector library, wherein the pre-stored vector includes a vector corresponding to the labeled SMS, and the label is used to indicate the type of the SMS.

[0097] In step S608, the type of the SMS characterizes the content, intent, and risk of the SMS. For example, the label can indicate the content of the SMS, or the intent of the SMS (for example, product promotion, coupon distribution, new product launch, new product display reminder, etc.), and can also indicate the risk level of the SMS (for example, whether the SMS is a phishing SMS or a spam SMS).

[0098] Step S610, recalling the text messages according to the tags corresponding to the text messages.

[0099] Optionally, after obtaining the label of the SMS by matching the remaining text vectors with the pre-stored vectors in the vector library, the information processing system also recalls the SMS according to the label corresponding to the SMS. For example, the information processing system recalls similar SMS from the labeled vector library based on the current SMS, and votes on the recall results according to the business logic, and selects the label with the most votes as the label of the current SMS.

[0100] Based on the scheme defined by the above steps S602 to S610, it can be known that the text message is vectorized, variable information is extracted from the text message, and the variable information in the text message is removed to obtain the remaining text, and then the remaining text is vectorized to obtain the remaining text vector corresponding to the remaining text, and finally the label of the text message is obtained by matching the remaining text vector with the pre-stored vector in the pre-stored vector.

[0101] It is easy to notice that the process of removing variable information from SMS realizes the preprocessing of SMS, thereby distinguishing the template information and variable information corresponding to the SMS, and effectively removing the noise in the SMS. In addition, the remaining text after removing the variable information is vectorized to obtain the remaining text vector, and the remaining text vector is matched with the pre-stored vector in the vector library, without the need for interactive pairwise similarity calculation, which improves the matching ability and thus improves the recall efficiency of SMS.

[0102] It can be seen that the solution provided in the present application achieves the purpose of recalling text messages, thereby realizing the technical effect of improving the efficiency of recalling text messages, and further solving the technical problem of low efficiency of text message recall in the prior art.

[0103] In an optional embodiment, after removing the variable information from the text message to obtain the remaining text, the information processing system performs vectorization processing on the remaining text to obtain the remaining text vector corresponding to the remaining text. Specifically, the information processing system performs word segmentation on the remaining text to obtain the word segmentation result, and then performs a first vectorization processing on the word segmentation result to obtain the original vector corresponding to the remaining text, wherein the first vectorization processing is used to convert the word segmentation result into a one-dimensional vector.

[0104] Furthermore, after performing a first vectorization process on the word segmentation result to obtain the original vector corresponding to the remaining text, the information processing system performs a second vectorization process on the original vector to obtain a remaining text vector corresponding to the remaining text, wherein the second vectorization process is used to convert the one-dimensional vector represented by the original vector into a multi-dimensional vector carrying semantic information of the remaining text.

[0105] Furthermore, after obtaining the remaining text vectors, the information processing system obtains the label of the text message by matching the vectors with the pre-stored vectors in the vector library. Specifically, the information processing system selects the target vector that best matches the remaining text vectors from the vector library, and determines that the label of the text message corresponding to the target vector is the label of the text message. The information processing system sorts the vectors in the vector library from high to low according to the degree of match with the remaining text vectors, obtains the vectors in the first N vector libraries in the sorting results, and then selects the target vector from the vectors in the N vector libraries by voting. N is an integer greater than 0.

[0106] Optionally, the information processing system clusters the pre-stored vectors and the remaining text vectors in the vector library, and then determines the pre-stored vectors that belong to the same category as the remaining text vectors, and obtains the matching degree between the determined pre-stored vectors and the remaining text vectors. Finally, the determined pre-stored vectors are sorted from high to low according to the corresponding matching degree.

[0107] It should be noted that before obtaining the label of the SMS by matching the remaining text vector with the pre-stored vector in the vector library, the information processing system needs to train the vector library. The process of training the vector library can be performed in an offline training manner. Specifically, first, the information processing system needs to obtain sample data, wherein the sample data includes a sample SMS pair consisting of a plurality of correlated sample SMS and a label of the sample SMS. Then, the information processing system performs a first vectorization process on the sample SMS to obtain the original sample vector corresponding to the sample SMS, wherein the first vectorization process is used to convert the sample SMS into a one-dimensional vector. Further, the information processing system trains a vector processing model based on the correlation between the original sample vector and the sample SMS pair, wherein the vector processing model is used to perform a second vectorization process on the original sample vector to obtain a sample vector corresponding to the sample SMS, and the second vectorization process is used to convert the one-dimensional vector represented by the original sample vector into a multi-dimensional vector carrying the semantic information of the sample SMS. Finally, the sample vector is determined to be a pre-stored vector, and a vector library is constructed according to the sample vector and the label corresponding to the SMS.

[0108] Example 3

[0109] According to an embodiment of the present application, a text information processing device for implementing the above text information processing method is also provided. Figure 7As shown, the device 70 includes: an extraction module 701 , a first processing module 703 , a second processing module 705 and a matching module 707 .

[0110] Among them, the extraction module 701 is used to extract variable information from the text information, wherein the variable information is the information element in the text information; the first processing module 703 is used to remove the variable information in the text information to obtain the remaining text information; the second processing module 705 is used to vectorize the remaining text information to obtain the remaining text vector corresponding to the remaining text information; the matching module 707 is used to obtain the label of the text information by matching the remaining text vector with the pre-stored vector in the vector library, wherein the vector library includes the pre-stored vector corresponding to the marked text information, and the label is used to indicate the type of text information.

[0111] It should be noted that the above extraction module 701, the first processing module 703, the second processing module 705 and the matching module 707 correspond to steps S202 to S208 in Example 1, and the four modules and the corresponding steps implement the same examples and application scenarios, but are not limited to the contents disclosed in the above Example 1. It should be noted that the above modules, as part of the apparatus, can be run in the computing device 10 provided in Example 1.

[0112] Optionally, the extraction module includes one or more of the following: a first extraction submodule, used to extract information elements in text information through entity recognition; a replacement submodule, used to replace preset characters in text information with specified symbols; a second extraction submodule, used to extract information elements in text information using a preset regular expression. Figure 4 In the method, the first extraction submodule is a module for entity recognition of SMS, the replacement submodule is a module for replacing the content in SMS using specified symbols, and the second extraction submodule is a module for content extraction of SMS using regular expressions.

[0113] In an optional embodiment, the first processing module includes: a word segmentation module and a first processing submodule. The word segmentation module is used to segment the remaining text information to obtain a word segmentation result; the first processing submodule is used to perform a first vectorization process on the word segmentation result to obtain an original vector corresponding to the remaining text information, wherein the first vectorization process is used to convert the word segmentation result into a one-dimensional vector. For example, Figure 4 In the word segmentation module, the word segmentation algorithm based on string matching, statistics and machine learning can be used to perform word segmentation on the remaining text obtained by the extraction module. The first processing submodule can perform word hashing operation (i.e., first vectorization processing) on ​​the word segmentation result to obtain the original vector, such as Figure 4The SMS vectors Q, D1, D2, D3, Dn in.

[0114] In an optional embodiment, the first processing module further includes: a second processing submodule. The second processing submodule is used to perform a first vectorization process on the word segmentation result to obtain the original vector corresponding to the remaining text information, and then perform a second vectorization process on the original vector to obtain the remaining text vector corresponding to the remaining text, wherein the second vectorization process is used to convert the one-dimensional vector represented by the original vector into a multi-dimensional vector carrying the semantic information of the remaining text. For example, Figure 4 In the second vectorization process, the original vector is processed based on the BERT model, where Figure 4 Where Trm is a node in the BERT model. After the BERT model processes the original vector, the remaining text vector corresponding to the remaining text can be obtained, such as Figure 4 Q', D1', D2', D3', Dn'.

[0115] In an optional embodiment, the matching module includes: a selection submodule and a determination submodule. The first acquisition module is used to select a target vector that best matches the remaining text vectors from the vector library; the determination submodule is used to determine that the label of the short message corresponding to the target vector is the label of the text message. Optionally, the matching module can be located at Figure 4 In the vector recall layer.

[0116] In an optional embodiment, the selection submodule includes: a first sorting module and a first acquisition module. The first sorting module is used to sort the vectors in the vector library from high to low according to the matching degree with the remaining text vectors, and obtain the vectors in the first N vector libraries in the sorting result, wherein N is an integer greater than 0; the first acquisition module is used to select the target vector from the vectors in the N vector libraries by voting.

[0117] In an optional embodiment, the first sorting module includes: a clustering module, a first determination module, and a second sorting module. The clustering module is used to cluster the pre-stored vectors and the remaining text vectors in the vector library; the first determination module is used to determine the pre-stored vectors belonging to the same category as the remaining text vectors, and obtain the matching degree between the determined pre-stored vectors and the remaining text vectors; the second sorting module is used to sort the determined pre-stored vectors from high to low according to the corresponding matching degree.

[0118] In an optional embodiment, the text information processing device also includes: a second acquisition module, a first processing module, a training module and a second determination module. The second acquisition module is used to acquire sample data, wherein the sample data includes a sample text information pair consisting of a plurality of correlated sample text information and a label of the sample text information; the first processing module is used to perform a first vectorization process on the sample text information to obtain an original sample vector corresponding to the sample text information, wherein the first vectorization process is used to convert the sample text information into a one-dimensional vector; the training module is used to train a vector processing model based on the correlation between the original sample vector and the sample text information pair, wherein the vector processing model is used to perform a second vectorization process on the original sample vector to obtain a sample vector corresponding to the sample text information, and the second vectorization process is used to convert the one-dimensional vector represented by the original sample vector into a multi-dimensional vector carrying the semantic information of the sample text information; the second determination module is used to determine that the sample vector is a pre-stored vector, and to construct a vector library according to the sample vector and the label corresponding to the text information.

[0119] In an optional embodiment, the text information processing device further includes: a recall module, wherein the recall module is used to recall the text information according to the label corresponding to the text information after obtaining the label of the text information by matching the remaining text vectors with the pre-stored vectors in the vector library.

[0120] In an optional embodiment, the text information processing device further includes: a conversion module and a storage module. The conversion module is used to convert the text information into a text template according to the label of the text information after matching the remaining text vector with the pre-stored vector in the vector library to obtain the label of the text information, wherein the text template includes fixed information and variable information, and new text information is generated by filling the variable information in the text template; the storage module is used to store the text template in a template database, wherein the text template in the template database is updated in real time.

[0121] Example 4

[0122] According to an embodiment of the present application, a text information processing system for implementing the above-mentioned text information processing method is also provided, and the system includes: a processor and a memory.

[0123] Among them, the memory is connected to the processor and is used to provide the processor with instructions for processing the following processing steps: extracting variable information in the text information, wherein the variable information is an information element in the text information; removing the variable information in the text information to obtain the remaining text information; vectorizing the remaining text information to obtain the remaining text vector corresponding to the remaining text information; and obtaining a label of the text information by matching the remaining text vector with a pre-stored vector in a vector library, wherein the vector library includes pre-stored vectors corresponding to the labeled text information, and the label is used to indicate the type of the text information.

[0124] From the above, it can be seen that the text information is vectorized, and the variable information is extracted from the text information and the variable information in the text information is removed to obtain the remaining text information. The remaining text information is then vectorized to obtain the remaining text vector corresponding to the remaining text information. Finally, the remaining text vector is matched with the pre-stored vector in the pre-stored vector to obtain the label of the text information.

[0125] It is easy to notice that the process of removing variable information from text information realizes the preprocessing of text information, thereby distinguishing the template information and variable information corresponding to the text information, and effectively removing the noise in the text information. In addition, the remaining text information after removing the variable information is vectorized to obtain the remaining text vector, and the remaining text vector is matched with the pre-stored vector in the vector library, without the need for interactive pairwise similarity calculation, which improves the matching ability and thus improves the recall efficiency of SMS.

[0126] It can be seen that the solution provided in the present application achieves the purpose of recalling text information, thereby realizing the technical effect of improving the efficiency of recalling text information, and further solving the technical problem of low efficiency of recalling text information in the prior art.

[0127] It should be noted that the processor in this embodiment can execute the text information processing method in Example 1, and the relevant content has been described in Example 1 and will not be repeated here.

[0128] Example 5

[0129] The embodiment of the present application may provide a computing device, which may be any computing device in a computing device group. Optionally, in this embodiment, the computing device may also be replaced by a terminal device such as a mobile terminal.

[0130] Optionally, in this embodiment, the computing device may be located in at least one network device among a plurality of network devices of a computer network.

[0131] In this embodiment, the above-mentioned computing device can execute the program code of the following steps in the text information processing method: extracting variable information in the text information, wherein the variable information is the information element in the text information; removing the variable information in the text information to obtain the remaining text information; performing vectorization processing on the remaining text information to obtain the remaining text vector corresponding to the remaining text information; obtaining the label of the text information by matching the remaining text vector with the pre-stored vector in the vector library, wherein the vector library includes the pre-stored vector corresponding to the labeled text information, and the label is used to indicate the type of the text information.

[0132] Optionally, Figure 8 is a structural block diagram of a computing device according to an embodiment of the present application. Figure 8 As shown, the computing device 10 may include: one or more (only one is shown in the figure) processors 802 , a memory 804 , and a peripheral interface 806 .

[0133] Among them, the memory can be used to store software programs and modules, such as the program instructions / modules corresponding to the text information processing method and device in the embodiment of the present application. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory, that is, realizing the above-mentioned text information processing method. The memory may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory may further include a memory remotely arranged relative to the processor, and these remote memories may be connected to the computing device 10 via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0134] The processor can call the information and application stored in the memory through the transmission device to perform the following steps: extract variable information in the text information, wherein the variable information is the information element in the text information; remove the variable information in the text information to obtain the remaining text information; vectorize the remaining text information to obtain the remaining text vector corresponding to the remaining text information; obtain the label of the text information by matching the remaining text vector with the pre-stored vector in the vector library, wherein the vector library includes the pre-stored vector corresponding to the marked text information, and the label is used to indicate the type of the text information.

[0135] Optionally, the processor may also execute program code for the following steps: extracting variable information from text information, including one or more of the following: extracting information elements from text information through entity recognition; replacing preset characters in text information with specified symbols; extracting information elements from text information using preset regular expressions.

[0136] Optionally, the processor may also execute the following program code steps: segmenting the remaining text information to obtain a segmentation result; performing a first vectorization process on the segmentation result to obtain an original vector corresponding to the remaining text information, wherein the first vectorization process is used to convert the segmentation result into a one-dimensional vector.

[0137] Optionally, the processor may also execute the program code of the following steps: after performing a first vectorization process on the word segmentation result to obtain the original vector corresponding to the remaining text information, performing a second vectorization process on the original vector to obtain a remaining text vector corresponding to the remaining text, wherein the second vectorization process is used to convert the one-dimensional vector represented by the original vector into a multi-dimensional vector carrying the semantic information of the remaining text.

[0138] Optionally, the processor may also execute program codes of the following steps: selecting a target vector that best matches the remaining text vectors from a vector library; and determining that the label of the text message corresponding to the target vector is a label of the text message.

[0139] Optionally, the processor may also execute the following program code: sort the vectors in the vector library from high to low according to the degree of match with the remaining text vectors, and obtain the vectors in the first N vector libraries in the sorting results, where N is an integer greater than 0; and select the target vector from the vectors in the N vector libraries by voting.

[0140] Optionally, the processor may also execute the program code of the following steps: clustering the pre-stored vectors and the remaining text vectors in the vector library; determining the pre-stored vectors that belong to the same category as the remaining text vectors, and obtaining the matching degree between the determined pre-stored vectors and the remaining text vectors; and sorting the determined pre-stored vectors from high to low according to the corresponding matching degree.

[0141] Optionally, the processor may also execute program code for the following steps: obtaining sample data, wherein the sample data includes a sample text information pair consisting of a plurality of correlated sample text information and a label of the sample text information; performing a first vectorization process on the sample text information to obtain an original sample vector corresponding to the sample text information, wherein the first vectorization process is used to convert the sample text information into a one-dimensional vector; training a vector processing model based on the correlation between the original sample vector and the sample text information pair, wherein the vector processing model is used to perform a second vectorization process on the original sample vector to obtain a sample vector corresponding to the sample text information, and the second vectorization process is used to convert the one-dimensional vector represented by the original sample vector into a multi-dimensional vector carrying semantic information of the sample text information; determining that the sample vector is a pre-stored vector, and constructing a vector library based on the sample vector and the label corresponding to the text information.

[0142] Optionally, the processor may also execute program code of the following steps: after obtaining a label of the text information by matching the remaining text vectors with pre-stored vectors in the vector library, recall the text information according to the label corresponding to the text information.

[0143] Optionally, the processor may also execute the program code of the following steps: after obtaining the label of the text information by matching the remaining text vectors with the pre-stored vectors in the vector library, converting the text information into a text template according to the label of the text information, wherein the text template includes fixed information and variable information, and generating new text information by filling in the variable information in the text template; storing the text template in a template database, wherein the text template in the template database is updated in real time.

[0144] It can be understood by those skilled in the art that Figure 8 The structure shown is for illustration only, and the computing device may also be a smart phone (such as an Android phone, an iOS phone, etc.), a tablet computer, a handheld computer, a mobile Internet device (Mobile Internet Devices, MID), a PAD, and other terminal devices. Figure 8 The structure of the electronic device is not limited. For example, the computing device 10 may also include Figure 8 More or fewer components (such as network interfaces, display devices, etc.) shown in, or having Figure 8 Different configurations are shown.

[0145] A person of ordinary skill in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing the hardware related to the terminal device through a program, and the program can be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.

[0146] Example 6

[0147] The embodiment of the present application further provides a storage medium. Optionally, in this embodiment, the storage medium can be used to store the program code executed by the text information processing method provided in the first embodiment.

[0148] Optionally, in this embodiment, the above storage medium may be located in any one of the computing devices in the computing device group in the computer network, or in any one of the mobile terminals in the mobile terminal group.

[0149] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: extracting variable information in the text information, wherein the variable information is an information element in the text information; removing the variable information in the text information to obtain the remaining text information; vectorizing the remaining text information to obtain a remaining text vector corresponding to the remaining text information; and obtaining a label for the text information by matching the remaining text vector with a pre-stored vector in a vector library, wherein the vector library includes pre-stored vectors corresponding to the labeled text information, and the label is used to indicate the type of the text information.

[0150] Optionally, in this embodiment, the storage medium is configured to store program code for performing the following steps: extracting variable information in text information, including one or more of the following: extracting information elements in text information through entity recognition; replacing preset characters in text information with specified symbols; extracting information elements in text information using preset regular expressions.

[0151] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: segmenting the remaining text information to obtain a segmentation result; performing a first vectorization process on the segmentation result to obtain an original vector corresponding to the remaining text information, wherein the first vectorization process is used to convert the segmentation result into a one-dimensional vector.

[0152] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: after performing a first vectorization process on the word segmentation result to obtain the original vector corresponding to the remaining text information, performing a second vectorization process on the original vector to obtain a remaining text vector corresponding to the remaining text, wherein the second vectorization process is used to convert the one-dimensional vector represented by the original vector into a multi-dimensional vector carrying the semantic information of the remaining text.

[0153] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: selecting a target vector that best matches the remaining text vectors from a vector library; and determining that the label of the text message corresponding to the target vector is a label of the text message.

[0154] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: sorting the vectors in the vector library from high to low according to the degree of match with the remaining text vectors, and obtaining the vectors in the first N vector libraries in the sorting results, where N is an integer greater than 0; and selecting the target vector from the vectors in the N vector libraries by voting.

[0155] Optionally, in this embodiment, the storage medium is configured to store program codes for executing the following steps: clustering the pre-stored vectors and the remaining text vectors in the vector library; determining the pre-stored vectors that belong to the same class as the remaining text vectors, and obtaining the matching degree between the determined pre-stored vectors and the remaining text vectors; and sorting the determined pre-stored vectors from high to low according to the corresponding matching degree.

[0156] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: obtaining sample data, wherein the sample data includes a sample text information pair consisting of a plurality of correlated sample text information and a label of the sample text information; performing a first vectorization process on the sample text information to obtain an original sample vector corresponding to the sample text information, wherein the first vectorization process is used to convert the sample text information into a one-dimensional vector; training a vector processing model based on the correlation between the original sample vector and the sample text information pair, wherein the vector processing model is used to perform a second vectorization process on the original sample vector to obtain a sample vector corresponding to the sample text information, and the second vectorization process is used to convert the one-dimensional vector represented by the original sample vector into a multi-dimensional vector carrying semantic information of the sample text information; determining that the sample vector is a pre-stored vector, and constructing a vector library based on the sample vector and the label corresponding to the text information.

[0157] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: after obtaining a label of the text information by matching the remaining text vectors with pre-stored vectors in the vector library, recalling the text information according to the label corresponding to the text information.

[0158] Optionally, in this embodiment, the storage medium is configured to store program code for executing the following steps: after obtaining a label of the text information by matching the remaining text vectors with pre-stored vectors in a vector library, converting the text information into a text template according to the label of the text information, wherein the text template includes fixed information and variable information, and generating new text information by filling in the variable information in the text template; storing the text template in a template database, wherein the text template in the template database is updated in real time.

[0159] Example 7

[0160] According to an embodiment of the present application, a method for processing text information is also provided. In this embodiment, the method for processing text information can be applied in a live broadcast scenario, wherein: Fig. 9 A flowchart showing a method for processing text information is shown. Fig. 9 As shown, the method comprises the following steps:

[0161] Step S902, obtaining voice information generated during the live broadcast process, and performing voice recognition on the voice information to obtain text information corresponding to the voice information.

[0162] In step S902, when the live broadcast host is broadcasting live via video, the terminal device with an image acquisition function collects the voice information of the live broadcast host during the live broadcast through the information processing system, and performs voice recognition on the collected voice information, and converts the voice information of the live broadcast host into text information. The information processing system can use existing speech-to-text technology to convert the voice information into text information. For example, the information processing system can use voiceprint feature extraction to identify the voice information. The voiceprint feature extraction algorithm includes but is not limited to a Mel-frequency cepstral coefficient algorithm, a linear prediction cepstral coefficient algorithm, and the like.

[0163] Step S904: extract variable information from the text information, wherein the variable information is an information element in the text information.

[0164] In step S904, the information elements include at least one of the following: a name element, an event element, and a value element, wherein the name element may include a person's name, an address name, an institution name, a medicine name, a product name, and a store name; the event element may include an unsubscribe phrase; and the value element may include a verification code.

[0165] Furthermore, after acquiring the text information, the terminal device may extract variables from the text information. Optionally, the information processing system extracts variable information from the text information by one or more of the following: extracting information elements from the text information by entity recognition; replacing preset characters in the text information with specified symbols; or extracting information elements from the text information using preset regular expressions.

[0166] Step S906, removing the variable information in the text information to obtain the remaining text information.

[0167] In an optional embodiment, after extracting the variable information from the text information, the information processing system compares the variable information with the text information, and deletes the content that is the same as the variable information from the text information to obtain the remaining text information.

[0168] In another optional embodiment, after extracting the variable information from the text information, the information processing system obtains the variable information and detects the information element corresponding to the variable information. Then, the information processing system compares the variable information with the text information and replaces the content in the text information that is the same as the variable information with the characters corresponding to the information element to obtain the remaining text information.

[0169] Step S908, performing vectorization processing on the remaining text information to obtain the remaining text vectors corresponding to the remaining text information.

[0170] Optionally, in step S908, a combination of word hashing and BERT (Bidirectional Encoder Representation from Transformers) model may be used to vectorize the remaining text information.

[0171] Step S910, obtaining a label of the text information by matching the remaining text vectors with pre-stored vectors in a vector library, wherein the vector library includes pre-stored vectors corresponding to the marked text information, and the label is used to indicate whether the text information is legal.

[0172] Optionally, in step S910, the information processing system may classify the text information according to the tag, and then determine whether the text information is legal according to the category of the text information, wherein the type of the text information characterizes the content, intent, and risk of the text information. Further, when the text information is determined to be illegal, the information processing system may generate a prompt message and display the illegal text information to the live broadcast host to remind the live broadcast host that the text information is illegal and needs to be avoided from being used again.

[0173] Based on the scheme defined by the above steps S902 to S910, it can be learned that, by adopting a method of vectorizing text information, after obtaining the voice information generated during the live broadcast and performing voice recognition on the voice information to obtain the text information corresponding to the voice information, the variable information is extracted from the text information and the variable information in the text information is removed to obtain the remaining text information, and then the remaining text information is vectorized to obtain the remaining text vector corresponding to the remaining text information, and finally the label of the text information is obtained by matching the remaining text vector with the pre-stored vector in the pre-stored vector.

[0174] It is easy to notice that the process of removing variable information from text information realizes the preprocessing of text information, thereby distinguishing the template information and variable information corresponding to the text information, and effectively removing the noise in the text information. In addition, the remaining text information after removing the variable information is vectorized to obtain the remaining text vector, and the remaining text vector is matched with the pre-stored vector in the vector library, without the need for interactive pairwise similarity calculation, which improves the matching ability and thus improves the recall efficiency of text information.

[0175] In an optional embodiment, after removing the variable information from the text information to obtain the remaining text, the information processing system performs vectorization processing on the remaining text to obtain the remaining text vector corresponding to the remaining text. Specifically, the information processing system performs word segmentation on the remaining text to obtain the word segmentation result, and then performs a first vectorization processing on the word segmentation result to obtain the original vector corresponding to the remaining text, wherein the first vectorization processing is used to convert the word segmentation result into a one-dimensional vector.

[0176] Furthermore, after performing a first vectorization process on the word segmentation result to obtain the original vector corresponding to the remaining text, the information processing system performs a second vectorization process on the original vector to obtain a remaining text vector corresponding to the remaining text, wherein the second vectorization process is used to convert the one-dimensional vector represented by the original vector into a multi-dimensional vector carrying semantic information of the remaining text.

[0177] Furthermore, after obtaining the remaining text vectors, the information processing system obtains the label of the text information by matching the vectors with the pre-stored vectors in the vector library. Specifically, the information processing system selects the target vector that best matches the remaining text vectors from the vector library, and determines that the label of the text information corresponding to the target vector is the label of the text information. The information processing system sorts the vectors in the vector library from high to low according to the degree of match with the remaining text vectors, obtains the vectors in the first N vector libraries in the sorting result, and then selects the target vector from the vectors in the N vector libraries by voting. N is an integer greater than 0.

[0178] Optionally, the information processing system clusters the pre-stored vectors and the remaining text vectors in the vector library, and then determines the pre-stored vectors that belong to the same category as the remaining text vectors, and obtains the matching degree between the determined pre-stored vectors and the remaining text vectors. Finally, the determined pre-stored vectors are sorted from high to low according to the corresponding matching degree.

[0179] It should be noted that before obtaining the label of the text information by matching the remaining text vectors with the pre-stored vectors in the vector library, the information processing system needs to train the vector library. The process of training the vector library can be carried out in an offline training manner. Specifically, first, the information processing system needs to obtain sample data, wherein the sample data includes a sample text information pair consisting of a plurality of correlated sample text information and a label of the sample text information. Then, the information processing system performs a first vectorization process on the sample text information to obtain the original sample vector corresponding to the sample text information, wherein the first vectorization process is used to convert the sample text information into a one-dimensional vector. Further, the information processing system trains a vector processing model based on the correlation between the original sample vector and the sample text information pair, wherein the vector processing model is used to perform a second vectorization process on the original sample vector to obtain a sample vector corresponding to the sample text information, and the second vectorization process is used to convert the one-dimensional vector represented by the original sample vector into a multi-dimensional vector carrying the semantic information of the sample text information. Finally, the sample vector is determined to be a pre-stored vector, and a vector library is constructed according to the sample vector and the label corresponding to the text information.

[0180] Furthermore, after obtaining the label of the text information by matching the remaining text vectors with the pre-stored vectors in the vector library, the information processing system can also convert the text information into a text template according to the label of the text information, and then store the text template in a template database, wherein the text template includes fixed information and variable information, and new text information is generated by filling in the variable information in the text template, and the text template in the template database is updated in real time.

[0181] It should be noted that by storing the text template and updating the text template in real time, the text template is directly used to determine whether the text information is legal, thereby improving the efficiency of detecting whether the text information is legal.

[0182] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.

[0183] In the above embodiments of the present application, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the relevant description of other embodiments.

[0184] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0185] 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 distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0186] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0187] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, in essence, or the part that contributes to the prior art or all or 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 a number of instructions to enable a computer device (which can be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk and other media that can store program codes.

[0188] The above is only a preferred implementation of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A method for processing text information, characterized in that: include: Extracting variable information from the text information, wherein the variable information is an information element from the text information; Removing variable information from the text information to obtain remaining text information; Performing vectorization processing on the remaining text information to obtain a remaining text vector corresponding to the remaining text information; Obtaining a label of the text information by matching the remaining text vector with a pre-stored vector in a vector library, wherein the vector library includes pre-stored vectors corresponding to the marked text information, and the label is used to indicate the type of the text information; The step of obtaining the label of the text information by matching the remaining text vectors with the pre-stored vectors in the vector library comprises: clustering the pre-stored vectors in the vector library and the remaining text vectors to obtain the pre-stored vectors belonging to the same class as the remaining text vectors; and obtaining the label of the text information by matching the pre-stored vectors of the same class with the remaining text vectors; The method of obtaining the label of the text information by matching the pre-stored vectors of the same category with the remaining text vectors includes: obtaining the matching degree between the pre-stored vectors of the same category and the remaining text vectors; sorting the pre-stored vectors in the vector library according to the matching degree with the remaining text vectors to obtain a sorting result; determining a target vector in the vector library that best matches the remaining text vector based on the sorting result; and determining the label of the text information based on the target vector.

2. The method according to claim 1, characterized in that Extract variable information from text information, including one or more of the following: Extracting information elements from the text information through entity recognition; Using a specified symbol to replace a preset character in the text message; The information elements in the text information are extracted using a preset regular expression.

3. The method according to claim 1, characterized in that The remaining text information is vectorized to obtain a remaining text vector corresponding to the remaining text information, including: Segment the remaining text information to obtain a segmentation result; A first vectorization process is performed on the word segmentation result to obtain an original vector corresponding to the remaining text information, wherein the first vectorization process is used to convert the word segmentation result into a one-dimensional vector.

4. The method according to claim 3, characterized in that After performing a first vectorization process on the word segmentation result to obtain an original vector corresponding to the remaining text information, the method further includes: The original vector is subjected to a second vectorization process to obtain a remaining character vector corresponding to the remaining character, wherein the second vectorization process is used to convert the one-dimensional vector represented by the original vector into a multi-dimensional vector carrying semantic information of the remaining character.

5. The method according to claim 1, characterized in that The step of determining a label of the text information based on the target vector includes: The label of the short message corresponding to the target vector is determined as the label of the text message.

6. The method according to claim 5, characterized in that The pre-stored vectors in the vector library are sorted according to the matching degree with the remaining text vectors to obtain the sorting result, including: Sorting the vectors in the vector library from high to low according to the matching degree with the remaining text vectors; The step of determining the target vector in the vector library that best matches the remaining character vector based on the sorting result includes: obtaining vectors in the first N vector libraries in the sorting result, wherein N is an integer greater than 0; The target vector is selected from the vectors in the N vector libraries by voting.

7. The method according to claim 1, characterized in that The method further comprises: Acquire sample data, wherein the sample data includes a sample text information pair consisting of a plurality of relevant sample text information and a label of the sample text information; Performing a first vectorization process on the sample text information to obtain an original sample vector corresponding to the sample text information, wherein the first vectorization process is used to convert the sample text information into a one-dimensional vector; Based on the correlation between the original sample vector and the sample text information pair, a vector processing model is trained, wherein the vector processing model is used to perform a second vectorization process on the original sample vector to obtain a sample vector corresponding to the sample text information, and the second vectorization process is used to convert a one-dimensional vector represented by the original sample vector into a multi-dimensional vector carrying semantic information of the sample text information; The sample vector is determined to be a pre-stored vector, and the vector library is constructed according to the sample vector and a label corresponding to the text information.

8. The method according to claim 1, characterized in that After obtaining the label of the text information by matching the remaining text vectors with pre-stored vectors in the vector library, the method further includes: The text information is recalled according to the label corresponding to the text information.

9. The method according to claim 1, characterized in that: After obtaining the label of the text information by matching the remaining text vectors with pre-stored vectors in the vector library, the method further includes: Converting the text information into a text template according to the label of the text information, wherein the text template includes fixed information and variable information, and generating new text information by filling the variable information in the text template; The text template is stored in a template database, wherein the text template in the template database is updated in real time.

10. A method for recalling text information, characterized in that: include: Extracting variable information in the text message, wherein the variable information is information elements in the text message; Removing variable information from the text message to obtain remaining text of the text message; Vectorizing the remaining characters to obtain remaining character vectors corresponding to the remaining characters; The label of the short message is obtained by matching the remaining text vector with the pre-stored vector in the vector library, wherein the pre-stored vector includes the vector corresponding to the marked short message, and the label is used to indicate the type of the short message; Recalling the text message according to the label corresponding to the text message; The method of obtaining the label of the short message by matching the remaining character vectors with pre-stored vectors in a vector library comprises: clustering the pre-stored vectors in the vector library and the remaining character vectors to obtain the pre-stored vectors belonging to the same class as the remaining character vectors; obtaining the label of the short message by matching the pre-stored vectors of the same class with the remaining character vectors; The method of obtaining the label of the text message by matching the pre-stored vectors of the same category with the remaining text vectors includes: obtaining the matching degree between the pre-stored vectors of the same category and the remaining text vectors; sorting the pre-stored vectors in the vector library according to the matching degree with the remaining text vectors to obtain a sorting result; determining a target vector in the vector library that best matches the remaining text vector based on the sorting result; and determining the label of the text message based on the target vector.

11. The method according to claim 10, characterized in that The information element includes at least one of the following: a name element, an event element, and a value element.

12. The method according to claim 10, characterized in that Vectorizing the remaining characters to obtain remaining character vectors corresponding to the remaining characters includes: Segment the remaining text to obtain a segmentation result; Performing a first vectorization process on the word segmentation result to obtain an original vector corresponding to the remaining text, wherein the first vectorization process is used to convert the word segmentation into a one-dimensional vector; A second vectorization process is performed on the original vector to obtain a remaining character vector corresponding to the remaining character, wherein the second vectorization process is used to convert the one-dimensional vector represented by the original vector into a vector carrying semantic information of the remaining character.

13. A text information processing device, characterized in that: include: An extraction module, used to extract variable information from text information, wherein the variable information is an information element in the text information; A first processing module, used to remove variable information from the text information to obtain remaining text information; A second processing module is used to perform vectorization processing on the remaining text information to obtain a remaining text vector corresponding to the remaining text information; A matching module, configured to obtain a label of the text information by matching the remaining text vector with a pre-stored vector in a vector library, wherein the vector library includes pre-stored vectors corresponding to the marked text information, and the label is used to indicate the type of the text information; The matching module is further used to obtain the label of the text information by matching the remaining text vectors with pre-stored vectors in the vector library through the following steps: clustering the pre-stored vectors in the vector library and the remaining text vectors to obtain the pre-stored vectors belonging to the same class as the remaining text vectors; obtaining the label of the text information by matching the pre-stored vectors of the same class with the remaining text vectors; The matching module is further used to obtain the label of the text information by matching the pre-stored vectors of the same category with the remaining text vectors through the following steps: obtaining the matching degree between the pre-stored vectors of the same category and the remaining text vectors; sorting the pre-stored vectors in the vector library according to the matching degree with the remaining text vectors to obtain a sorting result; based on the sorting result, determining the target vector in the vector library that best matches the remaining text vectors; and determining the label of the text information based on the target vector.

14. The device according to claim 13, characterized in that The extraction module includes one or more of the following: A first extraction submodule, configured to extract information elements from the text information through entity recognition; A replacement submodule, used to replace the preset characters in the text message with the specified symbols; The second extraction submodule is used to extract information elements from the text information using a preset regular expression.

15. The device according to claim 13, characterized in that The second processing module comprises: A word segmentation module, used to segment the remaining text information to obtain a word segmentation result; The first processing submodule is used to perform a first vectorization process on the word segmentation result to obtain an original vector corresponding to the remaining text information, wherein the first vectorization process is used to convert the word segmentation result into a one-dimensional vector.

16. The device according to claim 15, characterized in that The second processing module also includes: The second processing sub-module is used to perform a first vectorization processing on the word segmentation result to obtain the original vector corresponding to the remaining text information, and then perform a second vectorization processing on the original vector to obtain a remaining text vector corresponding to the remaining text, wherein the second vectorization processing is used to convert the one-dimensional vector represented by the original vector into a multi-dimensional vector carrying the semantic information of the remaining text.

17. The device according to claim 13, characterized in that The matching module comprises: A selection submodule, used for selecting a target vector that best matches the remaining text vector from the vector library; The determination submodule is used to determine that the label of the short message corresponding to the target vector is the label of the text message.

18. A storage medium, characterized in that: The storage medium includes a stored program, wherein when the program is executed, the device where the storage medium is located is controlled to execute the text information processing method according to any one of claims 1 to 9.

19. A processor, characterized in that: The processor is used to run a program, wherein the program, when running, executes the text information processing method described in any one of claims 1 to 9.

20. A text information processing system, comprising: processor; as well as A memory, connected to the processor, configured to provide the processor with instructions for processing the following processing steps: Extracting variable information from the text information, wherein the variable information is an information element from the text information; Removing variable information from the text information to obtain remaining text information; Performing vectorization processing on the remaining text information to obtain a remaining text vector corresponding to the remaining text information; Obtaining a label of the text information by matching the remaining text vector with a pre-stored vector in a vector library, wherein the vector library includes pre-stored vectors corresponding to the marked text information, and the label is used to indicate the type of the text information; The step of obtaining the label of the text information by matching the remaining text vectors with pre-stored vectors in a vector library comprises: clustering the pre-stored vectors in the vector library and the remaining text vectors to obtain the pre-stored vectors belonging to the same class as the remaining text vectors; and obtaining the label of the text information by matching the pre-stored vectors of the same class with the remaining text vectors; Among them, the label of the text information is obtained by matching the pre-stored vectors of the same category with the remaining text vectors, including: obtaining the matching degree between the pre-stored vectors of the same category and the remaining text vectors; sorting the pre-stored vectors in the vector library according to the matching degree with the remaining text vectors to obtain a sorting result; based on the sorting result, determining the target vector in the vector library that best matches the remaining text vector; based on the target vector, determining the label of the text information.

21. A method for processing text information, characterized in that: include: Acquire voice information generated during the live broadcast process, and perform voice recognition on the voice information to obtain text information corresponding to the voice information; Extracting variable information from the text information, wherein the variable information is an information element from the text information; Removing variable information from the text information to obtain remaining text information; Performing vectorization processing on the remaining text information to obtain a remaining text vector corresponding to the remaining text information; The label of the text information is obtained by matching the remaining text vector with a pre-stored vector in a vector library, wherein the vector library includes pre-stored vectors corresponding to the marked text information, and the label is used to indicate whether the text information is legal; The step of obtaining the label of the text information by matching the remaining text vectors with pre-stored vectors in a vector library comprises: clustering the pre-stored vectors in the vector library and the remaining text vectors to obtain the pre-stored vectors belonging to the same class as the remaining text vectors; and obtaining the label of the text information by matching the pre-stored vectors of the same class with the remaining text vectors; The label of the text information is obtained by matching the pre-stored vectors of the same category with the remaining text vectors, including: obtaining the matching degree between the pre-stored vectors of the same category and the remaining text vectors; sorting the pre-stored vectors in the vector library according to the matching degree with the remaining text vectors to obtain a sorting result; determining a target vector in the vector library that best matches the remaining text vector based on the sorting result; and determining the label of the text information based on the target vector.

Citation Information

Patent Citations

  • Text classification method

    CN108829818A