Text style recognition method and device, equipment and medium

By using LDA topic modeling and visualization clustering tools, combined with style mapping rules, the problem of low style recognition accuracy in traditional methods has been solved, achieving efficient and accurate identification of KOL posting styles and improving recognition efficiency and accuracy.

CN120821852APending Publication Date: 2025-10-21SHENZHEN DONSON CLOUD TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510708337.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-29
Publication Date
2025-10-21

AI Technical Summary

Technical Problem

In existing technologies, traditional posting style recognition methods rely on manually set rules, resulting in low accuracy and difficulty in simultaneously improving accuracy and recall. Furthermore, over 90% of the content is categorized as 'other,' making it impossible to accurately identify the posting style of KOLs.

Method used

By obtaining the text to be identified, determining its publishing platform, using the LDA topic model for topic identification and keyword extraction, combining visual clustering tools for topic clustering, receiving the optimal number of topics from client feedback, and performing style mapping, accurate identification of text style is achieved.

Benefits of technology

It improved the accuracy and efficiency of text style recognition, ensuring accurate identification of KOLs' posting styles, reduced content in the 'other' category, and enhanced the accuracy of recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120821852A_ABST
    Figure CN120821852A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of style recognition, and discloses a text style recognition method. The method comprises the steps of obtaining a to-be-recognized text, and determining a text publishing platform corresponding to the to-be-recognized text; performing topic recognition on the to-be-recognized text through an LDA topic model corresponding to the text publishing platform to obtain at least one text topic and topic keywords corresponding to the text topics; performing topic clustering on all the text topics and the topic keywords corresponding to the text topics through a visual clustering tool to obtain a text topic cluster; sending the text theme cluster to the client, and receiving an optimal theme quantity fed back by the client; and performing style mapping on the target theme in the optimal theme quantity to obtain a text style. According to the method, through the LDA topic model and the style mapping rule, the topic and the style in the text are recognized, the accuracy of style recognition is improved, and the efficiency of style recognition is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of style recognition technology, and in particular to a text style recognition method, device, equipment and medium. Background Art

[0002] In the marketing world, the selection of a Key Opinion Leader (KOL) is crucial to the success of a client's promotional campaign. The selection of a KOL often relies on their posting style to ensure it aligns with the client's brand image and promotional content.

[0003] Traditional methods for identifying posting styles rely primarily on rule-based recognition. This over-reliance on manually set rules results in low accuracy and makes it difficult to simultaneously improve both precision and recall. Furthermore, according to existing recognition rules, over 90% of content falls into the "Other" category, a critical issue for KOLs. Therefore, accurately identifying posting styles has become a critical requirement. Summary of the Invention

[0004] Based on this, it is necessary to provide a text style recognition method, device, equipment and medium to address the above technical problems, so as to solve the problem of low accuracy of text style recognition in the prior art.

[0005] A text style recognition method, comprising: Obtaining a text to be recognized and determining a text publishing platform corresponding to the text to be recognized; Performing topic identification on the text to be identified using an LDA topic model corresponding to the text publishing platform to obtain at least one text topic and topic keywords corresponding to each text topic; Performing topic clustering on all the text topics and the topic keywords corresponding to each text topic using a visual clustering tool to obtain text topic clusters; Sending the text topic cluster to a client, and receiving feedback from the client on the optimal number of topics in the text topic cluster; Style mapping is performed on target topics among the optimal number of topics to obtain a text style corresponding to the text to be recognized.

[0006] A text style recognition device, comprising: A text acquisition module, configured to acquire the text to be recognized and determine the text publishing platform corresponding to the text to be recognized; A topic identification module is used to perform topic identification on the text to be identified by using an LDA topic model corresponding to the text publishing platform to obtain at least one text topic and topic keywords corresponding to each text topic; A topic clustering module is used to perform topic clustering on all the text topics and the topic keywords corresponding to each text topic using a visual clustering tool to obtain text topic clusters; An optimal topic number module, configured to send the text topic cluster to a client and receive feedback from the client on the optimal topic number in the text topic cluster; The style mapping module is used to perform style mapping on the target topic among the optimal number of topics to obtain a text style corresponding to the text to be recognized.

[0007] A computer device includes a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor. When the processor executes the computer-readable instructions, the above-mentioned text style recognition method is implemented.

[0008] One or more readable storage media storing computer-readable instructions, wherein when the computer-readable instructions are executed by one or more processors, the one or more processors execute the above-mentioned text style recognition method.

[0009] The above-mentioned text style recognition method, device, equipment and medium, the present invention realizes the determination of the platform where the text is located by obtaining the text to be recognized, and then realizes the determination of the text publishing platform. Through the LDA topic model corresponding to the text publishing platform, the identification of topics in the text and the identification of keywords are realized. Through the visual clustering tool, the clustering of text topics and topic keywords is realized, thereby realizing the visualization of text topic clusters, and then realizing the reception of the optimal number of topics fed back by the client. By performing style mapping on the target topic in the optimal number of topics, the text style is recognized, thereby improving the accuracy of text style recognition and improving the efficiency of style recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments of the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0011] Figure 1 is a flow chart of a text style recognition method according to an embodiment of the present invention; Figure 2 This is a flow chart of step S20 of the text style recognition method in one embodiment of the present invention; Figure 3 is a schematic structural diagram of a text style recognition device according to an embodiment of the present invention; Figure 4is a schematic diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0012] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0013] In the text style recognition method provided in this embodiment, a client communicates with a server. The client includes, but is not limited to, various personal computers, laptops, smartphones, tablet computers, and portable wearable devices. The server can be implemented as a standalone server or a server cluster consisting of multiple servers.

[0014] In one embodiment, if Figure 1 As shown, a text style recognition method is provided, comprising the following steps: S10: Acquire a text to be recognized, and determine a text publishing platform corresponding to the text to be recognized.

[0015] It is understood that the text to be recognized refers to text published on a platform and whose style needs to be recognized. The text publishing platform refers to the platform where the text is obtained, such as Weibo. The text to be recognized is obtained, and the text publishing platform corresponding to the text to be recognized is determined by the path of obtaining the text to be recognized. It is understood that one or more texts to be recognized can be obtained from the same platform or from different platforms. In another embodiment, a preset number of texts to be recognized are obtained from preset text publishing platforms.

[0016] S20. Performing topic identification on the text to be identified using an LDA topic model corresponding to the text publishing platform to obtain at least one text topic and topic keywords corresponding to each text topic.

[0017] The LDA topic model, also known as the Latent Dirichlet Allocation model, is used to identify topical information hidden within a large collection of documents. A text topic refers to the central idea or core content of the document being identified, such as sports. Topic keywords are keywords related to the text's theme, such as basketball and sports.

[0018] Specifically, the LDA topic model corresponding to the text publishing platform corresponding to the text to be identified is retrieved through the text publishing platform corresponding to the text publishing platform, that is, the text publishing platform and the topic platform corresponding to the LDA topic model are matched. When the match is successful, the LDA topic model corresponding to the topic platform is obtained, and the text to be identified is input into the LDA topic model. The text to be identified is subjected to topic identification through the LDA topic model, that is, one or more text topics in the text to be identified are identified through the topic identification ability learned by the LDA topic model during training. Then, keywords are extracted through the keyword identification ability learned by the LDA topic model during training, and the relevance of all keywords and each text topic is calculated, that is, the keywords and text topics are vectorized, and the similarity is calculated to obtain the relevance, thereby allocating all keywords to the text topic with the highest relevance, and the topic keywords corresponding to the text topic can be obtained.

[0019] S30 , performing topic clustering on all the text topics and the topic keywords corresponding to each text topic using a visual clustering tool to obtain text topic clusters.

[0020] S40: Send the text topic cluster to the client, and receive the optimal number of topics in the text topic cluster fed back by the client.

[0021] Generally speaking, a visual clustering tool refers to software or platforms that help users present cluster analysis results in an intuitive and easy-to-understand visual format. The optimal number of topics is defined as a set of topics with minimal overlap between text topics and keywords from other text topics. A text topic cluster is a visual cluster of topics and topic keywords.

[0022] Specifically, a visual clustering tool is obtained, and all text topics and all topic keywords are input into the visual clustering tool. The visual clustering tool is then used to perform topic clustering on all text topics and the topic keywords corresponding to each text topic. That is, all text topics in the text to be recognized are clustered using the clustering algorithm in the visual clustering tool to obtain target topic clusters. Then, the target topic clusters are updated using the topic keywords corresponding to each text topic. That is, the topic keywords corresponding to each text topic are clustered into the corresponding target topic clusters to update the target topic clusters. The updated target topic clusters are then presented in a visual form using visualization technology, thereby obtaining text topic clusters corresponding to the text to be recognized.

[0023] S50: Perform style mapping on the target topic among the optimal number of topics to obtain a text style corresponding to the text to be recognized.

[0024] Understandably, text style refers to the unique personality and characteristics presented in the creative process through various factors such as language, structure, expression, rhetoric, etc. The target theme refers to the theme among the optimal number of themes.

[0025] Specifically, a text publishing platform corresponding to the optimal number of topics is obtained, and the corresponding style mapping rules are matched through the text publishing platform. Then, style mapping is performed on the target topics in the optimal number of topics through the style mapping rules. That is, according to the mapping of topics to styles in the style mapping rules, the similarity between the topics in the style mapping rules and the target topics is calculated, the topics with the highest similarity are screened out, and the style corresponding to the topic is determined as the text style corresponding to the text to be identified.

[0026] In an embodiment of the present invention, by obtaining the text to be identified, the platform where the text is located is determined, and then the text publishing platform is determined. By using the LDA topic model corresponding to the text publishing platform, the identification of topics in the text and the identification of keywords are achieved. By using a visual clustering tool, clustering of text topics and topic keywords is achieved, thereby visualizing text topic clusters and receiving the optimal number of topics fed back by the client. By performing style mapping on the target topic in the optimal number of topics, the text style is identified, thereby improving the accuracy of text style identification and improving the efficiency of style identification.

[0027] In one embodiment, before step S20, that is, before performing topic identification on the text to be identified using the LDA topic model corresponding to the text publishing platform to obtain at least one text topic and topic keywords corresponding to each text topic, the following steps are included: S201, performing word segmentation processing on the text to be recognized to obtain at least one word to be processed.

[0028] S202: Deleting all the words to be processed through a preset word list to obtain a target text.

[0029] It can be understood that the word to be processed is the result of segmenting the text to be recognized, which can be a single word or a phrase. The target text refers to the text after removing stop words and symbols.

[0030] Specifically, the text to be recognized is segmented using a Chinese word segmentation algorithm, and the text to be recognized is segmented according to the connection of contextual features. That is, all possible segmentation results are listed, and the best segmentation path is selected from them. All segmentation results are organized into a directed acyclic graph with no loops and directions. That is, the segmentation results can be used as nodes, and the edges between words are weighted. The path with the smallest weight sum is the final result. For example, the word frequency can be used as the weight, and a path with the largest total word frequency can be considered as the best path, thereby obtaining at least one word to be processed corresponding to the text to be recognized. Furthermore, a preset word list is obtained, and all words to be processed are deleted using the preset word list. That is, the stop words and symbols that appear in the preset word list in all words to be processed are deleted, and the content outside the preset word list is retained, thereby obtaining the target text.

[0031] In this embodiment, by performing word segmentation processing on the text to be recognized, the words to be processed are segmented, thereby deleting irrelevant words and obtaining the target text, thereby improving the accuracy of subsequent model recognition of topics.

[0032] In one embodiment, in step S20, topic identification is performed on the text to be identified using an LDA topic model corresponding to the text publishing platform to obtain at least one text topic and topic keywords corresponding to each text topic, including: S203 , performing topic identification on the text to be identified by using the topic module in the LDA topic model to obtain a text topic.

[0033] S204 , performing keyword recognition on the text to be recognized by using the keyword module in the LDA topic model to obtain text keywords and topic association probabilities corresponding to the text keywords.

[0034] S205 , performing allocation processing on all the text keywords according to the topic association probability to obtain topic keywords corresponding to each of the text topics.

[0035] Understandably, a text topic refers to the central idea or core content of the text to be identified, such as sports. A text keyword refers to the keywords in the text to be identified, such as basketball, football, and sports. The topic association probability refers to the degree of association between text keywords and the text topic.

[0036] Specifically, after obtaining the text to be recognized, the text to be recognized is input into the LDA topic model, and the topic recognition ability learned by the LDA topic model during training, that is, the text to be recognized is converted into a bag-of-words model using the same dictionary and conversion method as during training, that is, the text to be recognized is segmented, a vocabulary is constructed based on the segmentation results, and the words in the vocabulary are converted into vectors to obtain a bag-of-words model. Then, the topic distribution of the text to be recognized is calculated using the LDA topic model, that is, the probability that the text to be recognized belongs to each topic is calculated using the topic recognition ability learned by the LDA topic model during training. Then, based on the calculated topic distribution, that is, the probability that the text to be recognized belongs to each topic, the probability of each topic is compared with the threshold, and the topics corresponding to the probabilities greater than the threshold are screened out, or a preset number of topics with larger probabilities are selected to obtain one or more text topics. Furthermore, the keyword module in the LDA topic model is used to perform keyword recognition on the text to be recognized, that is, the keyword module is used to calculate the relevance between the keywords in the bag-of-words model and the text topic, that is, the similarity between each keyword and the text topic is calculated, that is, all text topics are vectorized, and then the similarity between the vectors of the keywords in the bag-of-words model and the vectors of the text topic is calculated, so as to obtain the topic association probability corresponding to each text keyword. Among them, the higher the weight of the keyword under the topic, the stronger the correlation between the keyword and the topic. Then, all text keywords are allocated and processed according to the topic association probability, that is, the topic association probability is compared with a preset threshold value. When the topic association probability is greater than the preset threshold value, the text keyword is determined as the topic keyword corresponding to the text topic, or, all topic association probabilities are compared, and a preset number of topic keywords corresponding to the text topic are screened out according to size.

[0037] In this embodiment, the LDA topic model is used to identify text topics and topic keywords, thereby improving the accuracy of identifying text topics and topic keywords.

[0038] In one embodiment, in step S30, all the text topics and the topic keywords corresponding to each text topic are clustered using a visual clustering tool to obtain text topic clusters, including: S301 , clustering all the text topics in the text to be identified using a clustering algorithm in the visual clustering tool to obtain a target topic cluster.

[0039] S302 : updating the target topic cluster using topic keywords corresponding to each of the text topics to obtain a text topic cluster corresponding to the text to be recognized.

[0040] Understandably, the target topic cluster refers to a topic collection formed by clustering related topics together around certain specific topics through methods such as cluster analysis.

[0041] Specifically, a visual clustering tool is obtained and, using its clustering algorithm, all text topics in the document to be recognized are clustered. Specifically, all text topics are divided into K groups. K objects are randomly selected as initial cluster centers. The distance between each text topic and each seed cluster center is then calculated, and each text topic is assigned to the cluster center closest to it. The cluster centers and the objects assigned to them represent a cluster. With each assigned sample, the cluster center is recalculated based on the existing objects in the cluster. This process is repeated until a termination condition is met. The termination condition can be that no (or a minimum number of) objects are reassigned to different clusters, no (or a minimum number of) cluster centers change, and the sum of squared errors reaches a local minimum, thereby obtaining target topic clusters. Furthermore, the target topic clusters are updated using the topic keywords corresponding to each text topic. Specifically, the topic keywords corresponding to each text topic are assigned to the corresponding target topic cluster to update the target topic cluster. The updated target topic clusters are then visualized using visualization techniques, thereby obtaining at least one text topic cluster corresponding to the document to be recognized.

[0042] In this embodiment, all text topics are clustered by using a clustering algorithm in a visual clustering tool, thereby determining a target topic cluster, updating the target topic cluster, and visualizing the text topic cluster.

[0043] In one embodiment, step S40, i.e., performing style mapping on the target topic among the optimal number of topics to obtain a text style corresponding to the text to be recognized, includes: S401: Acquire a style mapping rule corresponding to the text publishing platform.

[0044] S402 : performing style matching on target topics in the optimal number of topics using the style mapping rule to obtain a theme style corresponding to each target topic.

[0045] S403: Determine a text style corresponding to the text to be recognized based on all the theme styles.

[0046] It can be understood that style mapping rules refer to the rules for mapping topics to styles. Topic style refers to the style corresponding to the target topic. Different text publishing platforms correspond to different style mapping rules.

[0047] Specifically, all preset mapping rules are matched through the text publishing platform to obtain the style mapping rules corresponding to the text publishing platform. Then, the target topics in the optimal number of topics are style-matched through the style mapping rules, that is, each target topic in the optimal number of topics is mapped to a corresponding theme style according to the style mapping rules, so as to obtain a theme style corresponding to each target topic. Among them, multiple target topics can correspond to the same style. For example, 100 topics are mapped into 30 styles. In one embodiment, the target topic and the mapping topics in the style mapping rules are matched for similarity, and the topic with the highest similarity is determined as the mapping topic corresponding to the target topic, and the style corresponding to the mapping topic is determined as the theme style corresponding to each target topic. Further, the text style corresponding to the text to be identified is determined through all the theme styles of the text to be identified, that is, all the theme styles are determined as the text style corresponding to the text to be identified, or the style with the most mapping topics is determined as the text style corresponding to the text to be identified.

[0048] In this embodiment, the style matching of the target theme is achieved through the style mapping rules, thereby achieving the determination of the theme style, and further achieving the determination of the text style, thereby improving the accuracy of text style recognition.

[0049] In one embodiment, the method further includes: S60: Acquire at least one published text corresponding to the target platform, and determine the number of topics corresponding to the target platform.

[0050] S70, modeling all the published texts through an initial model to extract sample topics and sample keyword.

[0051] S80, iterating the initial model, the sample topic, and the sample keyword through a variational inference algorithm to obtain an iterative result.

[0052] S90: When the iteration result of the initial model reaches a preset convergence condition, the converged initial model is determined as the LDA topic model.

[0053] It can be understood that the published text refers to the published articles obtained from the preset platform, which is used as sample data. The target platform refers to the platform set in advance, such as Toutiao. The number of topics refers to the number of topics on each target platform. Sample topics refer to the topics extracted from the published text. Sample keyword refers to the keywords related to each topic extracted from the published text. The iterative result refers to the result of re-prediction after adjusting the model parameters. The preset convergence condition refers to the condition that the change in the log-likelihood function is less than the set threshold, and it can also be the condition that the number of iterations reaches the maximum value. The initial model refers to the initial setting parameters of the LDA model.

[0054] Specifically, the target platforms are obtained, and the published texts are obtained from each target platform, wherein the number of texts obtained from each target platform can be set in advance. Then, the number of topics for each target platform is set, that is, the number of topics for the target platform is set, for example, 50, 100, and so on. Then, all published texts are segmented using a preset word segmentation algorithm to obtain at least one word segmentation result, and all word segmentation results are filtered using a preset word list to obtain target vocabulary. An initial model is obtained, and all published texts are modeled using the initial model to extract sample topics and sample subject words, and a vocabulary is constructed for the target vocabulary in all published texts. Each published text is converted into a bag-of-words vector, the dimension of the vector is equal to the size of the vocabulary, and each element in the vector represents the number of times or frequency (such as TF-IDF value) that the corresponding target vocabulary appears in the published text. Furthermore, a variational inference algorithm is used to iterate the initial model, sample topics, and sample topic terms. Specifically, the initial model's hyperparameters a and b are randomly initialized. a is the Dirichlet prior parameter of the text topic distribution (a Dirichlet prior parameter usually refers to the parameter vector of the Dirichlet distribution, which represents the prior information about each parameter in the multinomial distribution (i.e., the probability of each category occurring)), and b is the Dirichlet prior parameter of the topic word distribution. Next, the text topic distribution c and topic word distribution d are initialized. These distributions can be initialized to a uniform distribution or other prior distributions. Next, with parameters a, b, and topic word distribution d fixed, the probability of each word belonging to each topic (i.e., the variational distribution q) is calculated based on the current text topic distribution c and the observed bag-of-words vectors. With parameters a, b, and the variational distribution q fixed, the text topic distribution c and topic word distribution d are updated to maximize the lower bound of the log-likelihood function (ELBO) of the data, resulting in the iterative result. When the iteration result does not reach the preset convergence condition, the parameters of the initial model are adjusted according to the iteration result, and the initial model with the adjusted parameters is iteratively trained to obtain an iteration result corresponding to the initial model with the adjusted parameters. Furthermore, when the iteration result does not reach the preset convergence condition, the parameters of the initial model are adjusted again according to the iteration result, so that the iteration result of the initial model with the adjusted parameters reaches the preset convergence condition. In this way, the accuracy of the initial model becomes higher and higher, and the predicted results continue to approach the correct results. Until the iteration result of the initial model reaches the preset convergence condition, the converged initial model is determined as the LDA topic model.

[0055] In this embodiment, the initial model is iteratively trained by a large number of published texts, and iteratively processed by a variational inference algorithm, thereby obtaining the LDA topic model, thereby ensuring that the LDA topic model has a high accuracy rate.

[0056] It should be understood that the order of execution of the steps in the above embodiments does not necessarily mean the order of execution. The order of execution of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.

[0057] In one embodiment, a text style recognition device is provided, which corresponds to the text style recognition method in the above embodiment. Figure 3 As shown, the text style recognition device includes a text acquisition module 10, a topic identification module 20, a topic clustering module 30, an optimal topic number module 40 and a style mapping module 50. The functional modules are described in detail as follows: The text acquisition module 10 is used to acquire the text to be recognized and determine the text publishing platform corresponding to the text to be recognized; The topic identification module 20 is used to perform topic identification on the text to be identified by using the LDA topic model corresponding to the text publishing platform to obtain at least one text topic and topic keywords corresponding to each text topic; The topic clustering module 30 is used to perform topic clustering on all the text topics and the topic keywords corresponding to each text topic using a visual clustering tool to obtain text topic clusters; An optimal topic number module 40 is configured to send the text topic cluster to a client and receive feedback from the client on the optimal topic number in the text topic cluster; The style mapping module 50 is configured to perform style mapping on a target topic among the optimal number of topics to obtain a text style corresponding to the text to be recognized.

[0058] Optionally, the topic identification module 20 includes: A text topic unit, configured to perform topic identification on the text to be identified by using a topic module in the LDA topic model to obtain a text topic; A keyword recognition unit, configured to perform keyword recognition on the text to be recognized using a keyword module in the LDA topic model to obtain text keywords and topic association probabilities corresponding to each of the text keywords; The keyword allocation unit is used to allocate all the text keywords according to the topic association probability to obtain topic keywords corresponding to each text topic.

[0059] Optionally, the topic clustering module 30 includes: A clustering processing unit, configured to perform clustering processing on all the text topics in the text to be identified by using the clustering algorithm in the visual clustering tool to obtain a target topic cluster; The updating processing unit is used to update the target topic cluster by using the topic keywords corresponding to each of the text topics to obtain a text topic cluster corresponding to the text to be recognized.

[0060] Optionally, the style mapping module 50 includes: A style mapping unit, configured to obtain a style mapping rule corresponding to the text publishing platform; a topic style unit, configured to perform style matching on target topics in the optimal number of topics using the style mapping rule to obtain a topic style corresponding to each target topic; The text style unit is used to determine the text style corresponding to the text to be recognized based on all the theme styles.

[0061] Optionally, the topic identification module 20 further includes: A word segmentation processing unit, configured to perform word segmentation processing on the text to be recognized to obtain at least one word to be processed; The deletion processing unit is used to delete all the words to be processed through a preset word list to obtain a target text.

[0062] Optionally, the device further includes: A text acquisition unit, configured to acquire at least one published text corresponding to each target platform and determine the number of topics corresponding to each target platform; A model extraction unit, configured to model all the published texts using an initial model to extract sample topics and sample keyword phrases; A model iteration unit, configured to iterate the initial model, the sample topics, and the sample keyword using a variational inference algorithm to obtain an iteration result; The model convergence unit is used to determine the initial model after convergence as the LDA topic model when the iterative result of the initial model reaches a preset convergence condition.

[0063] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 4As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a readable storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer-readable instructions. The internal memory provides an environment for the operation of the operating system and computer-readable instructions in the readable storage medium. The network interface of the computer device is used to communicate with an external server via a network connection. When the computer-readable instructions are executed by the processor, a text style recognition method is implemented. The readable storage medium provided in this embodiment includes a non-volatile readable storage medium and a volatile readable storage medium.

[0064] In one embodiment, a computer device is provided, including a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor. When the processor executes the computer-readable instructions, the above-mentioned text style recognition method is implemented.

[0065] In one embodiment, one or more computer-readable storage media storing computer-readable instructions are provided. The computer-readable storage media provided in this embodiment include non-volatile readable storage media and volatile readable storage media. The computer-readable instructions stored on the readable storage media are executed by one or more processors to implement the above-described text style recognition method.

[0066] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing related hardware through computer-readable instructions. The computer-readable instructions can be stored in a non-volatile readable storage medium or a volatile readable storage medium. When the computer-readable instructions are executed, they can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDR SDRAM), enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

[0067] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.

[0068] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present invention, and should all be included in the scope of protection of the present invention.

Claims

1. A text style recognition method, characterized in that: include: Obtaining a text to be recognized and determining a text publishing platform corresponding to the text to be recognized; Performing topic identification on the text to be identified using an LDA topic model corresponding to the text publishing platform to obtain at least one text topic and topic keywords corresponding to each text topic; Performing topic clustering on all the text topics and the topic keywords corresponding to each text topic using a visual clustering tool to obtain text topic clusters; Sending the text topic cluster to a client, and receiving feedback from the client on the optimal number of topics in the text topic cluster; Style mapping is performed on target topics among the optimal number of topics to obtain a text style corresponding to the text to be recognized.

2. The text style recognition method according to claim 1, wherein: The subject identification of the text to be identified is performed using an LDA subject model corresponding to the text publishing platform to obtain at least one text subject and subject keywords corresponding to each text subject, including: Performing topic identification on the text to be identified by using the topic module in the LDA topic model to obtain the text topic; Perform keyword recognition on the text to be recognized by using the keyword module in the LDA topic model to obtain text keywords and topic association probabilities corresponding to each of the text keywords; All the text keywords are assigned according to the topic association probability to obtain topic keywords corresponding to each of the text topics.

3. The text style recognition method according to claim 1, wherein: The method of performing topic clustering on all the text topics and the topic keywords corresponding to each text topic using a visual clustering tool to obtain text topic clusters includes: Performing clustering processing on all the text topics in the text to be identified by using the clustering algorithm in the visual clustering tool to obtain a target topic cluster; The target topic cluster is updated by using topic keywords corresponding to each of the text topics to obtain a text topic cluster corresponding to the text to be recognized.

4. The text style recognition method according to claim 1, wherein: The performing style mapping on the target topic among the optimal number of topics to obtain a text style corresponding to the text to be recognized includes: Obtaining a style mapping rule corresponding to the text publishing platform; Performing style matching on target topics in the optimal number of topics using the style mapping rule to obtain a theme style corresponding to each target topic; According to all the theme styles, a text style corresponding to the text to be recognized is determined.

5. The text style recognition method according to claim 1, wherein: Before performing topic identification on the text to be identified using the LDA topic model corresponding to the text publishing platform, the method further includes: Performing word segmentation processing on the text to be recognized to obtain at least one word to be processed; All the words to be processed are deleted through a preset word list to obtain the target text.

6. The text style recognition method according to claim 1, wherein: The method further comprises: Obtain at least one published text corresponding to each target platform, and determine the number of topics corresponding to each target platform; Modeling all the published texts through an initial model to extract sample topics and sample keyword terms; Iterate the initial model, the sample topic, and the sample keyword using a variational inference algorithm to obtain an iterative result; When the iteration result of the initial model reaches a preset convergence condition, the converged initial model is determined as the LDA topic model.

7. A text style recognition device, characterized in that: include: A text acquisition module, configured to acquire the text to be recognized and determine the text publishing platform corresponding to the text to be recognized; A topic identification module is used to perform topic identification on the text to be identified by using an LDA topic model corresponding to the text publishing platform to obtain at least one text topic and topic keywords corresponding to each text topic; A topic clustering module is used to perform topic clustering on all the text topics and the topic keywords corresponding to each text topic using a visual clustering tool to obtain text topic clusters; An optimal topic number module, configured to send the text topic cluster to a client and receive feedback from the client on the optimal topic number in the text topic cluster; The style mapping module is used to perform style mapping on the target topic among the optimal number of topics to obtain a text style corresponding to the text to be recognized.

8. The text style recognition device according to claim 7, wherein: The topic identification module includes: A text topic unit, configured to perform topic identification on the text to be identified by using a topic module in the LDA topic model to obtain a text topic; A keyword recognition unit, configured to perform keyword recognition on the text to be recognized using a keyword module in the LDA topic model to obtain text keywords and topic association probabilities corresponding to each of the text keywords; The keyword allocation unit is configured to allocate all the text keywords according to the topic association probability to obtain topic keywords corresponding to each of the text topics.

9. A computer device comprising a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, wherein: When the processor executes the computer-readable instructions, the text style recognition method according to any one of claims 1 to 6 is implemented.

10. One or more computer-readable storage media storing computer-readable instructions, characterized in that: When the computer-readable instructions are executed by one or more processors, the one or more processors are caused to perform the text style recognition method according to any one of claims 1 to 6.