Text detection method and device and computer readable medium
By using large language models and text analysis tools in text detection, the group impression scores are calculated, and the problem of insufficient accuracy in the prior art is solved, and the group impression impressions are more accurate in text. Identification and processing improves the user experience.
Patent Information
- Application Number
- CN202411265466.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-10
- Publication Date
- 2025-01-10
AI Technical Summary
The existing text detection schemes are insufficiently accurate in identifying group impressions in texts, and cannot fully consider the complex patterns when multiple identity attributes intersect, and rely on static dictionaries and rules, resulting in misjudgment and misjudgment.
By obtaining the role description content and dialogue content in the target text, using large language models and text analysis tools to extract explicit and implicit description vocabulary, calculate word frequency and weight information, combine weighted logarithmic probability ratio and Z score to generate group impression scores value, and then preset processing is performed.
It improves the accuracy of text detection, reduces misjudgment, and can more comprehensively identify the potential impressions of specific social groups in the text, avoid obvious group impressions in the text publishing platform, and improve user experience.
Smart Images

Figure CN119293244A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of information technology, and in particular to a text detection method, device and computer-readable medium. Background Art
[0002] In the current field of literary creation and text generation, the text content may contain group impressions based on gender, age or other demographic characteristics. These group impressions may be people's stereotypes of such social groups, which are usually subtle and complex and difficult to accurately identify and quantify. In the fields of academic publishing, news reporting, literary creation, etc., people are paying more and more attention to the fairness and diversity of text content. If the text content published by academic publishing, news reporting, literary creation and other text publishing platforms contains obvious stereotypes about some social groups, it may cause platform users to question the objectivity and fairness of the platform, which in turn affects the public's evaluation of the platform.
[0003] Therefore, in such text publishing platforms, text content can be detected before it is published to avoid publishing text content with obvious stereotypes. Current mainstream detection schemes usually face several key limitations. First, many traditional schemes rely on static dictionaries or rules, which may not accurately reflect the dynamics of language and the evolution of culture, resulting in insufficient accuracy of recognition results. Secondly, schemes based on simple keyword matching often fail to fully understand the context of the sentence, which may lead to misjudgments and missed judgments. For example, a statement that is considered neutral in a certain context may be mistakenly labeled as biased. In addition, many schemes tend to focus only on a single bias dimension, such as gender alone, without considering the complex patterns that may arise when multiple identity attributes intersect, which limits the comprehensiveness of the detection results.
[0004] It can be seen from this that the current detection scheme is difficult to accurately detect the text to be published on the text publishing platform, so as to avoid the published text carrying obvious impressions of a specific group. Summary of the invention
[0005] One object of the present application is to provide a text detection method, device and computer-readable medium to solve the problem of insufficient accuracy of existing text detection solutions.
[0006] To achieve the above object, an embodiment of the present application provides a text detection method, the method comprising:
[0007] Get the target text to be detected;
[0008] Detecting social groups corresponding to characters in the target text;
[0009] generating group description information about the social group, and extracting descriptive words about the social group from the target text according to the group description information;
[0010] Counting the word frequency information of the descriptive words, and calculating the group impression score of the social group in the target text according to the word frequency information of the descriptive words;
[0011] For target texts whose group impression scores do not meet the preset conditions, preset processing is performed.
[0012] Furthermore, detecting the social group corresponding to the character in the target text includes:
[0013] Obtaining description content and dialogue content about the character in the target text;
[0014] Extracting key information about the character based on the description and the conversation;
[0015] The social group corresponding to the role is determined according to the key information.
[0016] Furthermore, generating group description information about the social group, and extracting descriptive words about the social group from the target text according to the group description information, includes:
[0017] generating a group description vocabulary about the social group using a large language model;
[0018] Using a text analysis tool to extract key words from the target text, and extracting group description words about the social group from the target text;
[0019] The extracted group description words are determined as explicit description words about the social group.
[0020] Furthermore, the method further comprises:
[0021] Identifying the emotional expression and behavioral characteristics of the target text to obtain emotional expression information and behavioral characteristic information in the target text;
[0022] According to the emotion expression information and the behavior characteristic information, an implicit description vocabulary about the social group is generated.
[0023] Furthermore, according to the word frequency information of the descriptive vocabulary, the group impression score of the social group in the target text is calculated, including:
[0024] The group impression score of the social group in the target text is calculated according to the word frequency information of the description words in combination with the weight information of the description words.
[0025] Furthermore, before calculating the group impression score of the social group in the target text according to the word frequency information of the descriptive words in combination with the weight information of the descriptive words, the method further includes:
[0026] Calculating the Z score of the description words with respect to the social group according to the word frequency information of the description words;
[0027] The weight information of the description words is calculated according to the Z score.
[0028] Furthermore, before calculating the group impression score of the social group in the target text according to the word frequency information of the descriptive vocabulary, the method further includes:
[0029] Define the social group to be detected as the marked group, and define other social groups as unmarked groups;
[0030] According to the word frequency information of the descriptive words, a weighted log odds ratio of the descriptive words between the marked group and the unmarked group is calculated, and a Z score of the descriptive words with respect to the marked group is calculated at the same time;
[0031] The descriptive words are screened according to the weighted log odds ratio of the descriptive words between the marked group and the unmarked group and the Z score of the descriptive words with respect to the marked group, and descriptive words meeting the significance requirement are selected.
[0032] Furthermore, the method further comprises:
[0033] providing the review user with a feedback option regarding the descriptive vocabulary of the group descriptive information;
[0034] The weight information of the description words is adjusted according to the feedback information input by the review user based on the feedback option.
[0035] Some embodiments of the present application also provide a text detection device, wherein the device includes a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein when the computer program instructions are executed by the processor, the device is triggered to execute the aforementioned text detection method.
[0036] Some other embodiments of the present application further provide a computer-readable medium having computer program instructions stored thereon, wherein the computer program instructions can be executed by a processor to implement the text detection method.
[0037] Compared with the prior art, the text detection scheme provided in the embodiment of the present application can detect the social group corresponding to the role in the target text after obtaining the target text to be detected, generate group description information about the social group, and extract descriptive words about the social group from the target text according to the group description information, and then count the word frequency information of the descriptive words, and calculate the group impression score of the social group in the target text according to the word frequency information of the descriptive words. For the target text whose group impression score does not meet the preset conditions, the preset processing can be performed. Since the detection method adopted by this scheme is different from the traditional scheme that relies on static dictionaries or rules, it can be based on in-depth analysis of the content of the target text, so as to more accurately identify the potential group impression about a specific social group, thereby improving the accuracy of detection and greatly reducing the possibility of misjudgment, and then the preset processing can be performed on the target text that does not meet the preset conditions, so as to avoid the text published by the text publishing platform with obvious impressions of specific groups, and improve the user experience of specific users. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:
[0039] Figure 1 A flowchart of a text detection method provided in an embodiment of the present application;
[0040] The same or similar reference numerals in the drawings represent the same or similar components. DETAILED DESCRIPTION
[0041] The present application is described in further detail below in conjunction with the accompanying drawings.
[0042] In a typical configuration of the present application, the terminal and the equipment of the service network each include one or more processors (CPU), input / output interface, network interface and memory.
[0043] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0044] Computer readable media include permanent and non-permanent, removable and non-removable media, and can be implemented by any method or technology to store information. Information can be computer program instructions, data structures, program devices or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, read-only compact disk (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device.
[0045] The embodiment of the present application provides a text detection method. The detection method adopted by the method is different from the traditional scheme that relies on static dictionaries or rules. It can more accurately identify potential group impressions about specific social groups based on in-depth analysis of the content of the target text, thereby improving the accuracy of detection and greatly reducing the possibility of misjudgment. Preset processing can be performed on the target text that does not meet the preset conditions to avoid obvious group impressions in the text published by the text publishing platform, thereby improving the user experience of specific users.
[0046] In actual scenarios, the execution subject of the method can be a user device, a network device, or a device formed by integrating a user device and a network device through a network, or it can also be an application running on the above device. The user device includes but is not limited to various terminal devices such as computers, mobile phones, and tablet computers; the network device includes but is not limited to network hosts, single network servers, multiple network server sets, or cloud computing-based computer sets. Here, the cloud is composed of a large number of hosts or network servers based on cloud computing (Cloud Computing), where cloud computing is a type of distributed computing, a virtual computer composed of a group of loosely coupled computer sets.
[0047] Figure 1 The processing flow of a text detection method provided by an embodiment of the present application is shown, and the method is used to detect specific group impressions of social groups that may exist in the target text, and to perform corresponding processing on the target text that does not meet the requirements. The method includes at least the following steps:
[0048] Step S101, obtaining the target text to be detected.
[0049] The target text is the text content that needs to be detected by this solution. For example, in the application scenarios of text publishing platforms such as academic publishing, news reporting, and literary creation, the target text can be academic works, news, literary works, etc. In these scenarios, this solution can obtain the specific content of the target text when the user submits the above-mentioned target text to be published, and perform subsequent detection.
[0050] Step S102, detecting the social groups corresponding to the characters in the target text.
[0051] The social group refers to the group that the character in the target text belongs to in the society, which can be specifically represented by key information of at least one dimension related to the character, which may specifically include region, gender, age, education level, etc. In some embodiments of the present application, when detecting the social group corresponding to the character in the target text, the description content and dialogue content about the character in the target text can be obtained, and then the key information about the character is extracted based on the description content and dialogue content, and then the social group corresponding to the character is determined based on the key information. In actual scenarios, existing natural language processing (NLP) models can be used to identify the social group of the character in the target text. Such models have complex semantics and process natural language, and identify key information corresponding to the social group of the character, such as gender, age, etc., through the context-awareness ability obtained through pre-training.
[0052] For example, in this embodiment, a BERT (Bidirectional Enoceder Representations from Transformers) model can be used, which can perform deep learning analysis on the description content and dialogue content in the target text to extract key information about the role. For example, the BERT model can infer key information about the social and cultural background of the role by analyzing the name, social background description, dialogue content and behavior of the role in the target text, and determine the social group corresponding to the role. In actual scenarios, when determining the social group corresponding to the role, it can be represented in the form of multi-dimensional labels. For example, for the role role1, the corresponding social group can be middle-aged women in region A, and for the role role2, the corresponding social group can be young men in region B with a higher level of education.
[0053] Step S103: generating group description information about the social group, and extracting description words about the social group from the target text according to the group description information.
[0054] Among them, the group description information refers to various words or phrases that can be used to describe social groups, indicating the specific group impression of the social group corresponding to the role, for example, "vibrant", "tenacious", "talented", "enthusiastic", "hard-working", "optimistic", "smart", "unpretentious", "innovator", "active", "strong", etc. The above words or phrases can all be used as descriptive words corresponding to a certain social group.
[0055] In some embodiments of the present application, the LLM model (Large Language Model) can be used to generate group description words about the social group. For example, for the social group "young men in region C" corresponding to role 3, the LLM model can generate corresponding group description words based on a data set obtained from the Internet.
[0056] Then, a text analysis tool can be used to extract key words from the target text, and group description words about the social group can be extracted from the target text. These extracted group description words indicate or emphasize certain group impressions related to the social group. Therefore, the extracted group description words can be determined as explicit description words about the social group. For example, the text analysis tool used in this embodiment can be TextBlob, which is an open source Python library that can provide a simple API (Application Programming Interface) to perform text processing tasks. By using TextBlob, it is convenient to extract group description words about the social group from the target text according to the generated group description words as explicit description words about the social group, such as "active", "strong", etc. These explicit description words may reflect the explicit group impression of the social group "young men in region C" in the target text.
[0057] In addition to explicit descriptive words, this solution can extract implicit descriptive words about the social group from the target text. Among them, the implicit descriptive words can be used to reveal and understand the group impressions that are not explicitly expressed through emotions and behaviors in the target text. By quantifying the frequency of occurrence of these implicit descriptive words in the target text and their contextual environment, a more comprehensive indicator can be provided to evaluate the potential group impressions in the target text. This will be more helpful for the solution to more accurately and comprehensively detect specific group impressions of a certain type of social group that may exist in the target text, thereby improving the user experience of the text publishing platform.
[0058] Specifically, when extracting implicit descriptive words about the social group, the scheme of the embodiment of the present application can identify the emotional expression and behavioral characteristics of the target text, obtain the emotional expression information and behavioral characteristic information in the target text, and then generate implicit descriptive words about the social group based on the emotional expression information and behavioral characteristic information.
[0059] For example, in this embodiment, the BERT model or its version optimized for emotion recognition tasks (such as the TextBERT model) can be used to analyze the behavior and emotions of a specific character contained in the target text, thereby identifying the emotional expression information (such as anger, happiness, disappointment, etc.) and behavioral characteristic information (such as withdrawal, leadership, impulsiveness, etc.) in the target text. Then, the recognition results of behavior and emotion, that is, the aforementioned emotional expression information and behavioral characteristic information, can be combined to generate adjectives related to specific behaviors and emotions as implicit descriptive words about the social group corresponding to the character, such as "sensitive", "suspicious", "impulsive", etc.
[0060] Step S104, counting the word frequency information of the description words, and calculating the group impression score of the social group in the target text according to the word frequency information of the description words.
[0061] In this step, this solution will perform a frequency analysis on the descriptive words extracted from the target text to obtain the frequency information about the descriptive words, including the frequency information of explicit descriptive words and implicit descriptive words. For each role that appears in the target text, the social groups corresponding to these roles can be counted, and then for each social group, the number of times each descriptive word (including explicit descriptive words and implicit descriptive words) appears in the target text is counted as the frequency information of each descriptive word. In actual scenarios, the statistical results of the frequency information of the descriptive words can be in the following form:
[0062] Explicit descriptive words:
[0063] A1, word frequency: x1;
[0064] A2, word frequency: x2;
[0065] A3, word frequency: x3;
[0066] …
[0067] Implicit descriptive words:
[0068] B1, word frequency: y1;
[0069] B2, word frequency: y2;
[0070] B3, word frequency: y3;
[0071] …
[0072] Among them, A1, A2, A3 are the specific contents of the explicit description vocabulary, x1, x2, x3 are the specific word frequency values corresponding to A1, A2, A3, indicating the number of times A1, A2, A3 appear in the target text. B1, B2, B3 are the specific contents of the explicit description vocabulary, y1, y2, y3 are the specific word frequency values corresponding to B1, B2, B3, indicating the number of times A1, A2, A3 appear in the target text. After completing the word frequency statistics, the group impression score of the social group in the target text can be calculated based on the word frequency information of the description vocabulary.
[0073] In some embodiments of the present application, when calculating the group impression score of the social group in the target text based on the word frequency information of the descriptive words, the group impression score of the social group in the target text can be calculated based on the word frequency information of the descriptive words combined with the weight information of the descriptive words.
[0074] For each description word, a weight information based on statistical results can be pre-assigned. For example, in this embodiment, the Z score of the description word with respect to the social group can be calculated based on the word frequency information of the description word, and then the weight information of the description word can be calculated based on the Z score.
[0075] Among them, the Z-score is also called the standard score. It is a statistic used to measure the relative position between a data point and the average value of a data set. In this implementation, the data point is a certain descriptive word, and the data set is all the descriptive words counted in this solution. The higher the Z-score, the higher the significance of a certain descriptive word among all descriptive words, and the more it can reflect the group impression of a certain role in the social group. For example, the weight information can be calculated according to the size of the Z-score of the descriptive word, and the following formula can be used specifically:
[0076] W=Z-score / k
[0077] Wherein, W represents the weight information of the description words, Z-score represents the weight information of the description words, and k is a constant set according to the actual scenario requirements. For example, in this embodiment, k can be set to 2. For the aforementioned description words A1 and A2, if their Z scores are 2 and 3 respectively, their weight information W is 1 and 1.5.
[0078] After the weight information of the descriptive words is calculated, the frequency information of the descriptive words can be combined with the weight information to calculate the group impression score of the social group in the target text. In this embodiment, the group impression score of the social group in the target text can be calculated in the form of weighted sum, and the specific calculation formula can be in the following form:
[0079] S=∑(F n ×W n )
[0080] Among them, S represents the group impression score of the social group in the target text, and F n represents the frequency information of the nth descriptive word of a social group in the target text, W n Represents the weight information of n descriptive words of a social group in the target text. Taking the social group "young men in region C" corresponding to the aforementioned role role3 as an example, if its descriptive words include "strong" and "dependent", the corresponding word frequency information and Z score are:
[0081] "strong" (Z score = 2.5, word frequency information = 10),
[0082] "dependent" (Z score = 2, word frequency information = 5),
[0083] According to the above calculation formula, the group impression score of the social group in the target text can be calculated as S = (10 × 2.5 / 2) + (5 × 2 / 2) = 17.5. The group impression score reflects the group impression tendency of the social group in the target text. The higher the value, the more the target text tends to strengthen certain specific group impressions. Through the group impression score, the degree of specific group impressions of social groups contained in different target texts can be quantified, thereby providing a quantifiable numerical basis for further processing.
[0084] Here, those skilled in the art should understand that the above specific methods for calculating weight information and group impression scores are only examples, and other existing or future forms based on similar principles should also be included in the scope of protection of this application if they are applicable to this application, and are included here by reference. For example, different calculation formulas or constants can be used in combination with other specific data to calculate the weight information and group impression scores.
[0085] In order to ensure that the group impression of the social group in the target text can be calculated correctly and accurately, in the scheme of the embodiment of the present application, before calculating the group impression score of the social group in the target text based on the word frequency information of the descriptive vocabulary, the social group to be detected can be first defined as a marked group, and other social groups can be defined as unmarked groups. Among them, the marked group is the social group corresponding to the character in the target text identified in the aforementioned steps, and the unmarked group is a social group used for comparison, which can be a social group other than the social group corresponding to the character in the target text. For example, in this scheme, "young men in region C" can be defined as a marked group, and "men in region D" can be defined as an unmarked group.
[0086] Then, the weighted log odds ratio of the description words between the marked group and the unmarked group may be calculated according to the word frequency information of the description words, and the Z score of the description words with respect to the marked group may be calculated at the same time.
[0087] In actual scenarios, when calculating the weighted log odds ratio of descriptive words between the marked group and the unmarked group, the Fightin'Words method can be used. By referring to the prior distribution of descriptive words in the entire data set, the weighted log odds ratio of the descriptive words between the marked group and the unmarked group can be calculated, which is used as one of the bases for measuring the significance of the group impression of the descriptive words for the marked group. At the same time, this scheme uses the Z score of the descriptive words with respect to the marked group as another basis for measuring the significance of the group impression of the descriptive words for the marked group. Therefore, the descriptive words can be screened according to the weighted log odds ratio of the descriptive words between the marked group and the unmarked group and the Z score of the descriptive words with respect to the marked group, and the descriptive words that meet the significance requirements are selected. In actual scenarios, corresponding screening conditions can be set based on the weighted log odds ratio and the Z score, such as taking the higher than the threshold, the sorting result being in the top N, etc. as the screening conditions that meet the significance requirements, thereby selecting the descriptive words that meet the significance requirements as the descriptive words used for subsequent calculation of the group impression score, so as to further improve the accuracy of the calculation results.
[0088] Step S105, for the target text whose group impression score does not meet the preset condition, perform preset processing. The preset condition can be set based on a trigger threshold. In order to facilitate comparison processing, the group impression scores obtained by different calculations can be further normalized so that the group impression score of any target text can be mapped in a reasonable numerical range. The group impression score is mapped in the numerical range of [0,100] through a normalization function, and a trigger threshold X is set in the numerical range. For example, X can be set to 60, so that if the group impression score is higher than the trigger threshold, it is determined that the target text does not meet the preset condition, and the preset processing can be performed at this time. On the contrary, if the group impression score is lower than or equal to the trigger threshold, it is determined that the target text meets the preset condition. At this time, the preset processing is not performed on the target text, and the subsequent normal process can be executed according to the application scenario.
[0089] Taking the application scenarios of academic publishing, news reporting, literary creation and other text publishing platforms as an example, the target text can be academic works, news, literary works, etc. In these scenarios, when the user submits the above-mentioned target text to be published, the solution needs to perform text detection on the target text. If it is determined that the group impression score of the target text does not meet the preset conditions, the preset processing performed at this time may include stopping the normal publishing process, not publishing the target text, and notifying the uploader or author to make modifications. When it is determined that the group impression score of the target text meets the preset conditions, the normal publishing process can be continued, and the target text can be published on the text publishing platform. In this way, it can effectively avoid the text publishing platform from publishing some text content with obvious impressions of specific groups, avoid causing discomfort to users of some social groups, and improve the user experience of the text publishing platform as a whole.
[0090] In addition, in order to further improve the accuracy of the detection results, the text detection method provided in the embodiment of the present application may also include a feedback optimization step. The method may also provide the review user with feedback options on the descriptive words of the group description information after completing a detection, and then adjust the weight information of the descriptive words according to the feedback information input by the review user based on the feedback options.
[0091] In actual application scenarios, a concise interactive interface can be set up to allow review users to provide feedback on each descriptive word, including whether they agree with the impact of this descriptive word on the group impression score. When providing feedback, a binary choice method can be used to provide review users with feedback options of agree / disagree, and the review users choose between these two feedback options to generate corresponding feedback information. Specifically, this solution can provide an optional text box to allow review users to explain their choices, especially in the case of "disagree", the reasons for disagreeing with which descriptive words can be specifically explained. As a result, this solution can adjust the weight information of the descriptive words according to the feedback information input by the review user based on the feedback options.
[0092] When making adjustments, the proportion of "disagree" in the feedback information can be counted for each descriptive word. If the "disagree" proportion exceeds a certain threshold, such as 50%, the weight information of the descriptive word can be reduced to reduce the impact of the descriptive word on the group impression score, so that the calculation result is more in line with the standards required by the actual application scenario. When adjusting the weight information, the following formula can be used: W'=W×(1-p), where W' is the adjusted weight information, W is the original weight information before adjustment, and p is the "disagree" proportion.
[0093] Since the detection method adopted by this scheme is different from the traditional scheme that relies on static dictionaries or rules, it can be based on in-depth analysis of the content of the target text, so as to more accurately identify the potential group impression of a specific social group, thereby improving the accuracy of detection and greatly reducing the possibility of misjudgment. Then, the target text that does not meet the preset conditions can be processed by preset processing to avoid the text published by the text publishing platform with obvious impressions of specific groups, thereby improving the user experience of specific users. Specifically, this scheme uses a large language model to generate the latest description vocabulary of social groups, which can obtain more accurate explicit description vocabulary. At the same time, the large language model is used to generate the implicit description vocabulary of the role from the description of the role's behavior and emotions in the target text, so as to obtain a more comprehensive description vocabulary, thereby obtaining a more accurate calculation result. In addition, using a unique word frequency analysis method, using weighted logarithmic odds ratio and Z score, the description vocabulary is screened and the group impression score is calculated, which can further improve the accuracy of the detection results and reduce the probability of misjudgment. Therefore, when this scheme is applied to the text publishing platform, the text publishing platform can accurately detect the text to be published, so as to avoid the text published with obvious impressions of specific groups, and effectively improve the user experience.
[0094] Based on another aspect of the present application, an embodiment of the present application also provides a text detection device, which includes a memory for storing computer program instructions and a processor for executing computer program instructions, wherein when the computer program instructions are executed by the processor, the device is triggered to execute the aforementioned text detection method.
[0095] In particular, the methods and / or embodiments in the embodiments of the present application may be implemented as computer software programs. For example, the embodiments of the present disclosure include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes program code for executing the method shown in the flowchart. When the computer program is executed by the processing unit, the above functions defined in the method of the present application are executed.
[0096] It should be noted that the computer-readable medium described in the present application may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present application, a computer-readable medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device.
[0097] In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, device, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0098] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0099] The flow chart or block diagram in the accompanying drawings shows the possible architecture, function and operation of the equipment, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated system for hardware that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0100] As another aspect, the present application further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more computer program instructions, which may be executed by a processor to implement the methods and / or technical solutions of the above multiple embodiments of the present application.
[0101] It should be noted that the present application can be implemented in software and / or a combination of software and hardware, for example, can be implemented using an application specific integrated circuit (ASIC), a general purpose computer or any other similar hardware device. In certain embodiments, the software program of the present application can be executed by a processor to implement the above steps or functions. Similarly, the software program of the present application (including related data structures) can be stored in a computer-readable recording medium, for example, a RAM memory, a magnetic or optical drive or a floppy disk and similar devices. In addition, some steps or functions of the present application can be implemented using hardware, for example, as a circuit that cooperates with a processor to perform each step or function.
[0102] It is obvious to those skilled in the art that the present application is not limited to the details of the above exemplary embodiments, and that the present application can be implemented in other specific forms without departing from the spirit or basic features of the present application. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present application is limited by the attached claims rather than the above description, so it is intended to include all changes that fall within the meaning and scope of the equivalent elements of the claims in the present application. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the device claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.
Claims
1. A text detection method, characterized in that: The method comprises: Get the target text to be detected; Detecting social groups corresponding to characters in the target text; generating group description information about the social group, and extracting descriptive words about the social group from the target text according to the group description information; Counting the word frequency information of the descriptive words, and calculating the group impression score of the social group in the target text according to the word frequency information of the descriptive words; For target texts whose group impression scores do not meet the preset conditions, preset processing is performed.
2. The method according to claim 1, characterized in that Detecting the social group corresponding to the character in the target text, including: Obtaining description content and dialogue content about the character in the target text; Extracting key information about the character based on the description and the conversation; The social group corresponding to the role is determined according to the key information.
3. The method according to claim 1, characterized in that: Generating group description information about the social group, and extracting descriptive words about the social group from the target text according to the group description information, including: generating a group description vocabulary about the social group using a large language model; Using a text analysis tool to extract key words from the target text, and extracting group description words about the social group from the target text; The extracted group description words are determined as explicit description words about the social group.
4. The method according to claim 3, characterized in that: The method further comprises: Identifying the emotional expression and behavioral characteristics of the target text to obtain emotional expression information and behavioral characteristic information in the target text; According to the emotion expression information and the behavior characteristic information, an implicit description vocabulary about the social group is generated.
5. The method according to claim 1, characterized in that Calculating the group impression score of the social group in the target text according to the word frequency information of the descriptive vocabulary includes: The group impression score of the social group in the target text is calculated according to the word frequency information of the description words in combination with the weight information of the description words.
6. The method according to claim 5, characterized in that Before calculating the group impression score of the social group in the target text according to the word frequency information of the description words in combination with the weight information of the description words, the method further includes: Calculating the Z score of the description words with respect to the social group according to the word frequency information of the description words; The weight information of the description words is calculated according to the Z score.
7. The method according to claim 1, characterized in that Before calculating the group impression score of the social group in the target text according to the word frequency information of the descriptive vocabulary, the method further includes: Define the social group to be detected as the marked group, and define other social groups as unmarked groups; According to the word frequency information of the descriptive words, a weighted log odds ratio of the descriptive words between the marked group and the unmarked group is calculated, and a Z score of the descriptive words with respect to the marked group is calculated at the same time; The descriptive words are screened according to the weighted log odds ratio of the descriptive words between the marked group and the unmarked group and the Z score of the descriptive words with respect to the marked group, and descriptive words meeting the significance requirement are selected.
8. The method according to claim 1, characterized in that: The method further comprises: providing the review user with a feedback option regarding the descriptive vocabulary of the group descriptive information; The weight information of the description words is adjusted according to the feedback information input by the review user based on the feedback option.
9. A text detection device, wherein: The device comprises a memory for storing computer program instructions and a processor for executing the computer program instructions, wherein when the computer program instructions are executed by the processor, the device is triggered to execute the method according to any one of claims 1 to 8.
10. A computer readable medium having computer program instructions stored thereon, wherein the computer program instructions can be executed by a processor to implement the method according to any one of claims 1 to 8.