Abnormal text recognition method and device, electronic device and storage medium

By extracting the features of the text to be identified and combining the confidence in the abnormal text library, the problem of normal text being misjudged as abnormal text in the prior art is solved, and the accuracy of abnormal text recognition is improved.

CN114724146BActive Publication Date: 2025-04-11BEIJING BAIDU NETCOM SCI & TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210519231.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-12
Publication Date
2025-04-11
Estimated Expiration
2042-05-12

AI Technical Summary

Technical Problem

When identifying abnormal texts, it is difficult to effectively distinguish complex language scenarios, resulting in the normal text being misjudged as abnormal texts, which reduces the accuracy of recognition.

Method used

By extracting the first text features of the text to be identified, the target exception text is determined from the preset exception text library based on these features, and combining the confidence of the target exception text, it is determined whether the to be identified is an exception text.

Benefits of technology

It improves the accuracy of abnormal text recognition, reduces the possibility that normal text is misjudged as abnormal text, and enhances the accurate screening of abnormal text.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114724146B_ABST
    Figure CN114724146B_ABST
Patent Text Reader

Abstract

The present disclosure provides an abnormal text recognition method and device, an electronic device and a storage medium, which relate to the field of artificial intelligence technology, and in particular to the field of information security and natural language processing technology. The implementation scheme is: extracting a first text feature of a text to be recognized; based on the first text feature, determining a target abnormal text from a preset abnormal text library, wherein the similarity between the second text feature of the target abnormal text and the first text feature is greater than or equal to a similarity threshold; obtaining the confidence of the target abnormal text, wherein the confidence is used to indicate the degree of abnormality of the target abnormal text; based on the similarity and the confidence, determining whether the text to be recognized is an abnormal text.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of artificial intelligence technology, in particular to the field of information security and natural language processing technology, and specifically to an abnormal text recognition method and device, an electronic device, a computer-readable storage medium, and a computer program product. Background Art

[0002] Users often post text content on the Internet, such as articles, comments, bullet screens, etc. The text posted by users may contain abnormal information involving malicious promotion, fraud, vulgarity, etc. In order to purify the network environment and maintain information security, it is necessary to review the text posted by users to identify and intercept abnormal text (i.e. text containing abnormal information).

[0003] The methods described in this section are not necessarily methods that have been previously conceived or employed. Unless otherwise indicated, it should not be assumed that any method described in this section is considered to be prior art simply because it is included in this section. Similarly, unless otherwise indicated, the issues mentioned in this section should not be considered to have been recognized in any prior art. Summary of the invention

[0004] The present disclosure provides an abnormal text recognition method and device, an electronic device, a computer-readable storage medium, and a computer program product.

[0005] According to one aspect of the present disclosure, a method for identifying abnormal text is provided, comprising: extracting a first text feature of a text to be identified; based on the first text feature, determining a target abnormal text from a preset abnormal text library, wherein a similarity between a second text feature of the target abnormal text and the first text feature is greater than or equal to a similarity threshold; obtaining a confidence of the target abnormal text, wherein the confidence is used to indicate a degree of abnormality of the target abnormal text; and determining whether the text to be identified is an abnormal text based on the similarity and the confidence.

[0006] According to one aspect of the present disclosure, an abnormal text recognition device is provided, comprising: an extraction module, configured to extract a first text feature of a text to be recognized; a first determination module, configured to determine a target abnormal text from a preset abnormal text library based on the first text feature, wherein the similarity between a second text feature of the target abnormal text and the first text feature is greater than or equal to a similarity threshold; an acquisition module, configured to acquire a confidence of the target abnormal text, wherein the confidence is used to indicate the degree of abnormality of the target abnormal text; and a second determination module, configured to determine whether the text to be recognized is an abnormal text based on the similarity and the confidence.

[0007] According to one aspect of the present disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor, the memory storing instructions executable by the at least one processor, the instructions being executed by the at least one processor so that the at least one processor can execute the method.

[0008] According to one aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to enable a computer to execute any of the above methods.

[0009] According to one aspect of the present disclosure, a computer program product is provided, including a computer program, which implements the above method when executed by a processor.

[0010] According to one or more embodiments of the present disclosure, the accuracy of abnormal text recognition can be improved.

[0011] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] The accompanying drawings exemplarily illustrate the embodiments and constitute a part of the specification, and together with the text description of the specification, are used to explain the exemplary implementation of the embodiments. The embodiments shown are for illustrative purposes only and do not limit the scope of the claims. In all drawings, the same reference numerals refer to similar but not necessarily identical elements.

[0013] Figure 1 A schematic diagram showing an exemplary system in which the various methods described herein may be implemented according to an embodiment of the present disclosure;

[0014] Figure 2 A flowchart of an abnormal text recognition method according to an embodiment of the present disclosure is shown;

[0015] Figure 3 A schematic diagram of a parallel search feature library according to an embodiment of the present disclosure is shown;

[0016] Figure 4 A structural block diagram of an abnormal text recognition device according to an embodiment of the present disclosure is shown; and

[0017] Figure 5 A structural block diagram of an exemplary electronic device that can be used to implement the embodiments of the present disclosure is shown. DETAILED DESCRIPTION

[0018] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.

[0019] In the present disclosure, unless otherwise specified, the use of the terms "first", "second", etc. to describe various elements is not intended to limit the positional relationship, timing relationship, or importance relationship of these elements, and such terms are only used to distinguish one element from another element. In some examples, the first element and the second element may refer to the same instance of the element, and in some cases, based on the description of the context, they may also refer to different instances.

[0020] The terms used in the description of various examples in this disclosure are only for the purpose of describing specific examples and are not intended to be limiting. Unless the context clearly indicates otherwise, if the number of elements is not specifically limited, the element can be one or more. In addition, the term "and / or" used in this disclosure covers any one of the listed items and all possible combinations.

[0021] In this disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information are in compliance with relevant laws and regulations and do not violate public order and good morals.

[0022] In order to purify the network environment and maintain information security, it is necessary to review the texts posted by users to identify and intercept abnormal texts containing malicious promotion, fraud, vulgarity and other information.

[0023] In the related art, an abnormal text library can be pre-built, and whether the text posted by the user is an abnormal text can be determined by calculating the similarity between the text posted by the user and the abnormal text in the abnormal text library.

[0024] Since new texts are constantly generated on the Internet, it is very laborious to manually construct an abnormal text library, so the abnormal text library is usually constructed by machines. For example, the machine can recall abnormal texts based on a preset illegal word list, text filtering rules, or text classification model, and add the abnormal texts to the abnormal text library. However, due to the lack of flexibility of the machine and its difficulty in distinguishing complex language scenarios, it is very likely that normal texts will be recalled incorrectly, that is, normal texts will be misjudged as abnormal texts, resulting in normal texts being mixed in the abnormal text library. Normal texts mixed in the abnormal text library may cause normal texts posted by users to be misjudged as abnormal texts, reducing the accuracy of abnormal text recognition.

[0025] To this end, an embodiment of the present disclosure provides an abnormal text recognition method, which can reduce the influence of normal text in an abnormal text library on abnormal text recognition and improve the accuracy of abnormal text recognition.

[0026] The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0027] Figure 1 FIG. 1 is a schematic diagram of an exemplary system 100 in which various methods and apparatuses described herein may be implemented according to an embodiment of the present disclosure. Figure 1 , the system 100 includes one or more client devices 101, 102, 103, 104, 105, and 106, a server 120, and one or more communication networks 110 coupling the one or more client devices to the server 120. The client devices 101, 102, 103, 104, 105, and 106 may be configured to execute one or more applications.

[0028] In an embodiment of the present disclosure, the server 120 may run one or more services or software applications that enable the abnormal text recognition method to be performed.

[0029] In some embodiments, server 120 may also provide other services or software applications including non-virtualized environments and virtualized environments. In some embodiments, these services may be provided as web-based services or cloud services, such as provided to users of client devices 101, 102, 103, 104, 105, and / or 106 under a software as a service (SaaS) model.

[0030] exist Figure 1 In the configuration shown, the server 120 may include one or more components that implement the functions performed by the server 120. These components may include software components, hardware components, or a combination thereof that can be executed by one or more processors. Users operating client devices 101, 102, 103, 104, 105, and / or 106 may in turn utilize one or more client applications to interact with the server 120 to utilize the services provided by these components. It should be understood that a variety of different system configurations are possible, which may differ from the system 100. Therefore, Figure 1 is one example of a system for implementing the various methods described herein and is not intended to be limiting.

[0031] A user may use client devices 101, 102, 103, 104, 105 and / or 106 to publish text content, such as articles, comments, bullet comments, etc. The client device may provide an interface that enables a user of the client device to interact with the client device. The client device may also output information to the user via the interface. Figure 1Only six client devices are depicted, but one skilled in the art will appreciate that the present disclosure may support any number of client devices.

[0032] Client devices 101, 102, 103, 104, 105 and / or 106 may include various types of computer devices, such as portable handheld devices, general-purpose computers (such as personal computers and laptop computers), workstation computers, wearable devices, smart screen devices, self-service terminal devices, service robots, game systems, thin clients, various messaging devices, sensors or other sensing devices, etc. These computer devices may run various types and versions of software applications and operating systems, such as MICROSOFT Windows, APPLE iOS, UNIX-like operating systems, Linux or Linux-like operating systems; or include various mobile operating systems, such as MICROSOFT Windows Mobile OS, iOS, Windows Phone, Android. Portable handheld devices may include cellular phones, smart phones, tablet computers, personal digital assistants (PDAs), etc. Wearable devices may include head-mounted displays (such as smart glasses) and other devices. Game systems may include various handheld game devices, Internet-enabled game devices, etc. Client devices are capable of executing various different applications, such as various Internet-related applications, communication applications (such as email applications), short message service (SMS) applications, and may use various communication protocols.

[0033] The network 110 may be any type of network known to those skilled in the art that may support data communications using any of a variety of available protocols, including but not limited to TCP / IP, SNA, IPX, etc. By way of example only, the one or more networks 110 may be a local area network (LAN), an Ethernet-based network, a token ring, a wide area network (WAN), the Internet, a virtual network, a virtual private network (VPN), an intranet, an extranet, a public switched telephone network (PSTN), an infrared network, a wireless network (e.g., Bluetooth, Wi-Fi), and / or any combination of these and / or other networks.

[0034] Server 120 may include one or more general purpose computers, dedicated server computers (e.g., PC (personal computer) servers, UNIX servers, mid-range servers), blade servers, mainframe computers, server clusters, or any other suitable arrangement and / or combination. Server 120 may include one or more virtual machines running virtual operating systems, or other computing architectures involving virtualization (e.g., one or more flexible pools of logical storage devices that may be virtualized to maintain a server's virtual storage device). In various embodiments, server 120 may run one or more services or software applications that provide the functionality described below.

[0035] The computing units in the server 120 may run one or more operating systems including any of the above operating systems and any commercially available server operating systems. The server 120 may also run any of a variety of additional server applications and / or middle-tier applications, including HTTP servers, FTP servers, CGI servers, JAVA servers, database servers, etc.

[0036] In some implementations, server 120 may include one or more applications to analyze and consolidate data feeds and / or event updates received from users of client devices 101, 102, 103, 104, 105, and 106. Server 120 may also include one or more applications to display data feeds and / or real-time events via one or more display devices of client devices 101, 102, 103, 104, 105, and 106.

[0037] In some embodiments, the server 120 may be a server of a distributed system, or a server combined with a blockchain. The server 120 may also be a cloud server, or an intelligent cloud computing server or intelligent cloud host with artificial intelligence technology. A cloud server is a host product in a cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and virtual private servers (VPS) services.

[0038] The system 100 may also include one or more databases 130. In some embodiments, these databases may be used to store data and other information. For example, one or more of the databases 130 may be used to store information such as text, images, music files. The databases 130 may reside in various locations. For example, the database used by the server 120 may be local to the server 120, or may be remote from the server 120 and may communicate with the server 120 via a network-based or dedicated connection. The databases 130 may be of different types. In some embodiments, the databases used by the server 120 may be, for example, relational databases. One or more of these databases may store, update, and retrieve data to and from the databases in response to commands.

[0039] In some embodiments, one or more of the databases 130 may also be used by applications to store application data. The databases used by the applications may be different types of databases, such as a key-value store, an object store, or a conventional store backed by a file system.

[0040] Figure 1 The system 100 may be configured and operated in various ways to enable the application of various methods and apparatuses described in the present disclosure.

[0041] According to some embodiments, the client devices 101-106 may include applications with text publishing functions, such as social applications (which can publish dynamic information), shopping applications (which can publish product reviews), video applications (which can publish barrages), etc. Correspondingly, the server 120 may be a server corresponding to the application. When a user submits a text publishing request through an application, the server 120 may, for example, determine whether the user's text to be published is an abnormal text by executing the abnormal text recognition method of an embodiment of the present disclosure. If it is determined to be an abnormal text, the user's text publishing request is rejected; if it is determined to be a normal text, the user's text publishing request is allowed, and the user's text is published to the Internet. Furthermore, if the user has an objection to the abnormal text recognition result of the server 120, a complaint request can be submitted through the application. Accordingly, the server 120 can process the complaint request.

[0042] Figure 2 FIG. 2 is a flow chart of an abnormal text recognition method 200 according to an embodiment of the present disclosure. The method 200 is usually performed on a server (e.g. Figure 1 In some embodiments, the method 200 may also be performed on a client device (e.g., Figure 1 The execution of each step of method 200 may be performed at the client devices 101, 102, 103, 104, 105 and 106 shown in FIG. Figure 1The server 120 shown in FIG. 1 may also be Figure 1 Client devices 101, 102, 103, 104, 105 and 106 are shown in FIG.

[0043] like Figure 2 As shown, method 200 includes steps S210 - S240 .

[0044] In step S210, a first text feature of the text to be recognized is extracted.

[0045] In step S220, based on the first text feature, a target abnormal text is determined from a preset abnormal text library, and the similarity between the second text feature of the target abnormal text and the first text feature is greater than or equal to a similarity threshold.

[0046] In step S230, the confidence of the target abnormal text is obtained, and the confidence is used to indicate the degree of abnormality of the target abnormal text.

[0047] In step S240, based on the similarity and confidence, it is determined whether the text to be recognized is an abnormal text.

[0048] According to an embodiment of the present disclosure, each abnormal text in the abnormal text library is annotated with a confidence, and the confidence is used to indicate the degree of abnormality of the corresponding abnormal text. When reviewing the text to be recognized, not only the similarity between the text to be recognized and the target abnormal text is considered, but also the confidence of the target abnormal text itself is considered. Combining the similarity and confidence to judge whether the text to be recognized is an abnormal text can improve the accuracy of abnormal text recognition and avoid misjudging normal text to be recognized as abnormal.

[0049] The following describes in detail the various steps of the embodiments of the present disclosure.

[0050] In step S210, a first text feature of the text to be recognized is extracted.

[0051] According to some embodiments, a text publishing request of a user may be obtained, and the text to be published in the text publishing request may be used as the text to be recognized.

[0052] According to other embodiments, the user's text to be published can be preprocessed, for example, by deleting punctuation marks, stop words, image links, HTML (HyperText Mark-up Language) tags, performing synonym replacement, etc., and the preprocessed text is used as the text to be recognized.

[0053] It should be noted that in the embodiment of the present disclosure, the first and second text features are used to distinguish the text to be recognized from the abnormal text in the abnormal text library. The first text feature is a vector representation of the text to be recognized, and the second text feature is a vector representation of the abnormal text in the abnormal text library.

[0054] According to some embodiments, the first text feature may be a first literal feature, such as a simhash (a locality sensitive hashing algorithm) feature, a TF (Term Frequency) feature, a TF-IDF (Term Frequency-Inverse Document Frequency) feature, and the like.

[0055] According to some other embodiments, the first text feature may also be a first semantic feature, such as a semantic feature extracted by a text representation model (such as word2vec, BERT (Bidirectional Encoder Representations from Transformer), etc.).

[0056] According to some other embodiments, the first text feature may also be a first illegal information code, such as MD5 (Message-Digest algorithm 5) code of illegal information in the text to be identified, etc. The illegal information includes, for example, contact information and website addresses of malicious promotion.

[0057] As described above, the first text feature may be different types of features such as a first literal feature, a first semantic feature, a first violation information code, etc.

[0058] According to some embodiments, only one first text feature of the text to be recognized may be extracted.

[0059] According to other embodiments, multiple first text features of the text to be recognized can be extracted, and the types of the multiple first text features are different, so that the target abnormal text can be retrieved from the abnormal text library based on multiple text features, thereby improving the efficiency and accuracy of abnormal text recognition.

[0060] In step S220, based on the first text feature, a target abnormal text is determined from a preset abnormal text library, and the similarity between the second text feature of the target abnormal text and the first text feature is greater than or equal to a similarity threshold.

[0061] The abnormal text library includes a plurality of abnormal texts. According to some embodiments, when a plurality of first text features of the text to be recognized are extracted in step S210, step S220 may include the following steps S222 and S224.

[0062] In step S222, for each first text feature among the multiple first text features: obtain a second text feature library corresponding to the first text feature, the second text feature library includes multiple second text features corresponding to the multiple abnormal texts respectively, and the types of the multiple second text features are the same as the type of the first text feature; and calculate the similarity between the first text feature and the multiple second text features respectively.

[0063] In step S224, in response to the similarity between any first text feature among the plurality of first text features and the target second text feature being greater than or equal to a similarity threshold, the abnormal text corresponding to the target second text feature is taken as the target abnormal text.

[0064] According to the above embodiment, target abnormal text can be retrieved from the abnormal text library based on multiple text features, thereby improving the efficiency and accuracy of abnormal text recognition.

[0065] According to some embodiments, the plurality of first text features may include a first literal feature, a first semantic feature and a first violation information code, wherein the first violation information code is a code of violation information (eg, violation contact information, website, etc.) in the text to be identified.

[0066] Accordingly, the second text feature library may include a second literal feature library, a second semantic feature library, and a second violation information encoding library. The second literal feature library, the second semantic feature library, and the second violation information encoding library are respectively formed by extracting the second literal feature, the second semantic feature, and the second violation information encoding of each abnormal text in the abnormal text library.

[0067] Based on the first literal feature, the first semantic feature and the first violation information code, the second literal feature library, the second semantic feature library and the second violation information code library are searched in parallel. That is, the process of calculating the similarity between the first literal feature and the second literal feature in the second literal feature library, calculating the similarity between the first semantic feature and the second semantic feature in the second semantic feature library, and calculating the similarity between the first violation information code and the second violation information code in the second violation information code library can be performed in parallel.

[0068] It should be understood that the calculation method of the similarity corresponding to different text features may be different. For example, for literal features, the similarity between the first literal feature and the second literal feature can be determined based on the Hamming distance between the two. The smaller the Hamming distance, the greater the similarity. For semantic features, the similarity between the two can be determined based on the Euclidean distance or cosine distance between the first semantic feature and the second semantic feature. The smaller the Euclidean distance and the cosine distance, the greater the similarity. For violation information coding, the similarity between the first violation information coding and the second violation information coding can be determined based on the degree of string matching between the two. The more the string matches, the greater the similarity.

[0069] Similar to the above-mentioned similarity calculation method, it should be understood that the similarity thresholds corresponding to different text features may also be different. According to some embodiments, the similarity may be normalized to a range of 0 to 1, and accordingly, the similarity threshold may be any value between 0 and 1. In particular, for violation information coding, since different codes correspond to different violation information, in order to achieve accurate identification of violation information, the similarity threshold may be set to 1, that is, only when the first violation information coding is the same as the second violation information coding, the abnormal text corresponding to the second violation information coding is used as the target abnormal text.

[0070] Figure 3 FIG. 1 shows a schematic diagram of a parallel search feature library according to an embodiment of the present disclosure. Figure 3 In the example, the abnormal text library 310 is constructed based on multiple abnormal texts recalled by machines or manually. Regular expressions are used to extract illegal information in the abnormal text library, and the illegal information library 311 is constructed based on the extracted illegal information. The illegal information may include contact information (such as phone numbers, social network accounts, etc.), websites, etc. for malicious promotion.

[0071] Extract the simhash feature (i.e., the second literal feature) of each abnormal text in the abnormal text library 310 to generate a literal feature library 312. Input each abnormal text in the abnormal text library 310 into the lightweight BERT model (i.e., Figure 3 TinyBert in ), obtain the semantic features of each abnormal text (ie, the second semantic features), and generate a semantic feature library 313.

[0072] Generate the MD5 code (i.e., the second violation information code) of each contact information in the violation information library 311 to obtain the contact information code library 314. Generate the MD5 code (i.e., the second violation information code) of each website in the violation information library 311 to obtain the website code library 315.

[0073] When the user initiates a text publishing request, the text to be published in the text publishing request is obtained, and the text to be recognized 320 is obtained by preprocessing the text to be published.

[0074] The simhash feature of the text to be identified 320 is extracted as the literal feature 322 (i.e., the first literal feature). The text to be identified 320 is input into the TinyBert model to obtain the semantic feature 323 (i.e., the first semantic feature). Regular expressions are used to extract the illegal information such as contact information and website in the text to be identified 320, and the MD5 codes of the contact information and website are calculated to obtain the contact information code 324 and the website code 325 (i.e., the first illegal information code).

[0075] Subsequently, by calculating the Hamming distance between the literal feature 322 and the literal features in the literal feature library 312, calculating the Euclidean distance or cosine distance between the semantic feature 323 and the semantic features in the semantic feature library 313, judging whether the contact information code 324 is the same as the contact information code in the contact information code library 314, and judging whether the URL code 325 is the same as the URL code in the URL code library 315, the target abnormal text similar to the text to be identified 320 is determined.

[0076] After the target abnormal text is determined, the confidence of the target abnormal text may be obtained, and the confidence is used to indicate the degree of abnormality of the target abnormal text.

[0077] It should be noted that, in the embodiments of the present disclosure, each abnormal text in the abnormal text library has a confidence attribute. The confidence is used to indicate the degree of abnormality of the corresponding abnormal text. The higher the confidence, the higher the degree of abnormality of the corresponding abnormal text, and the more likely it is a true abnormal text (rather than a normal text that is mistakenly recalled). The confidence can be, for example, a value in the range of 0 to 1.

[0078] According to some embodiments, when an abnormal text is added to an abnormal text library, its confidence can be set to an initial value. The initial value can be a fixed constant or calculated according to a certain algorithm. The confidence of the abnormal text can change based on the user's behavior. For example, if a user initiates a complaint request for an abnormal text, the abnormal text may actually be a normal text, and the confidence of the abnormal text can be reduced accordingly. If a user does not initiate a complaint request for an abnormal text within a period of time, the abnormal text may be a real abnormal text, and the confidence of the abnormal text can be increased accordingly.

[0079] Judging whether the text to be recognized is an abnormal text only based on the similarity between the text to be recognized and the target abnormal text may lead to an erroneous judgment result. For example, if the text to be recognized is an abnormal text only based on the similarity, then because the text to be recognized is similar to the target abnormal text, the text to be recognized is judged as an abnormal text. However, in the case where the target abnormal text is actually a normal text that is mistakenly recalled, the text to be recognized that is similar to the target abnormal text is also likely to be a normal text. Therefore, in this case, the normal text to be recognized will be misjudged as an abnormal text, reducing the accuracy of abnormal text recognition.

[0080] As can be seen from the above, the confidence of the target abnormal text affects the recognition result of the text to be recognized. Therefore, in the embodiment of the present disclosure, whether the text to be recognized is an abnormal text is determined based on the similarity between the text to be recognized and the target abnormal text and the confidence of the target abnormal text itself, thereby improving the accuracy of abnormal text recognition.

[0081] Specifically, according to some embodiments, the probability that the text to be recognized is abnormal text may be determined based on the similarity and the confidence, and then whether the text to be recognized is abnormal text may be determined based on the probability.

[0082] According to some embodiments, the similarity may be normalized to a value in the range of 0 to 1, and then the product of the similarity and the confidence is used as the probability that the text to be recognized is an abnormal text.

[0083] According to some embodiments, in response to the probability being greater than or equal to a probability threshold, it can be determined that the text to be recognized is an abnormal text. The higher the confidence of the target abnormal text, the more likely it is to be a true abnormal text, and accordingly, the text to be recognized that is similar to the target abnormal text is more likely to be an abnormal text (i.e., the higher the probability). When the probability reaches the probability threshold, the text to be recognized can be directly determined to be an abnormal text.

[0084] According to some embodiments, in response to the probability being less than a probability threshold, an audit task for the text to be recognized is generated; and an audit result of the audit task is received, and the audit result is used to indicate whether the text to be recognized is an abnormal text. The lower the confidence of the target abnormal text, the more likely it is to be a normal text, and accordingly, the text to be recognized that is similar to the target abnormal text is more likely to be a normal text (i.e., the lower the probability). To avoid misjudgment, when the probability is lower than the probability threshold, an audit task is generated, and the text to be recognized is manually reviewed to see if it is an abnormal text, and the manual audit result is obtained. This ensures the accuracy of abnormal text recognition and avoids misjudging normal text to be recognized as abnormal text.

[0085] According to some embodiments, in response to determining that the text to be recognized is an abnormal text, the text to be recognized is added to an abnormal text library, and the confidence of the text to be recognized is initialized, thereby enabling dynamic expansion of the abnormal text library.

[0086] There are many ways to initialize the confidence of the text to be recognized. For example, the confidence of the text to be recognized can be initialized to a fixed constant, or initialized to the product of the similarity between the text to be recognized and the target abnormal text and the confidence of the target abnormal text (i.e., the probability that the text to be recognized is an abnormal text).

[0087] Generally, if the text to be recognized is determined to be abnormal text, the text publishing request corresponding to the text to be recognized is rejected. If the user objects to the rejection and believes that the text to be recognized is normal text, an appeal request can be initiated for the text to be recognized.

[0088] According to some embodiments, in response to a user's appeal request for the text to be recognized, the confidence of the text to be recognized is reduced. If the user initiates an appeal request for the text to be recognized, the text to be recognized may actually be normal text, and therefore its confidence needs to be reduced.

[0089] According to some embodiments, in response to the confidence of the text to be recognized being less than a confidence threshold, the text to be recognized is removed from the abnormal text library.

[0090] It should be understood that the same text content (e.g., the text to be recognized) may be published by different users and therefore may be appealed multiple times by different users. Each appeal will result in the confidence of the text to be recognized being reduced. When the confidence of the text to be recognized is less than the confidence threshold, the text to be recognized is considered to be a misjudgment and is removed from the abnormal text library.

[0091] According to some embodiments, similar texts of the text to be recognized are further determined from the abnormal text library; and similar texts are removed from the abnormal text library. Thus, when the confidence of the text to be recognized is less than a confidence threshold, the text to be recognized and its similar texts are removed from the abnormal text library together, thereby ensuring the accuracy of subsequent abnormal text recognition.

[0092] According to some embodiments, in response to not receiving a user's complaint request for the text to be recognized within a preset time period, the confidence of the text to be recognized is increased. If no user complaint is received within a preset time period (e.g., 6 hours, 24 hours, 3 days, etc.), the text to be recognized may be a real abnormal text, so its confidence is increased.

[0093] According to an embodiment of the present disclosure, an abnormal text recognition device is also provided. Figure 4 FIG. 4 shows a structural block diagram of an abnormal text recognition device 400 according to an embodiment of the present disclosure. Figure 4 As shown, the device 400 includes:

[0094] An extraction module 410 is configured to extract a first text feature of a text to be recognized;

[0095] A first determination module 420 is configured to determine a target abnormal text from a preset abnormal text library based on the first text feature, wherein the similarity between the second text feature of the target abnormal text and the first text feature is greater than or equal to a similarity threshold;

[0096] The acquisition module 430 is configured to acquire the confidence of the target abnormal text, wherein the confidence is used to indicate the degree of abnormality of the target abnormal text;

[0097] The second determination module 440 is configured to determine whether the text to be recognized is an abnormal text based on the similarity and the confidence.

[0098] According to an embodiment of the present disclosure, according to an embodiment of the present disclosure, each abnormal text in the abnormal text library is annotated with a confidence, and the confidence is used to indicate the degree of abnormality of the corresponding abnormal text. When reviewing the text to be recognized, not only the similarity between the text to be recognized and the target abnormal text is considered, but also the confidence of the target abnormal text itself is considered. Combining the similarity and confidence to judge whether the text to be recognized is an abnormal text can improve the accuracy of abnormal text recognition and avoid misjudging normal text to be recognized as abnormal.

[0099] According to some embodiments, the second determination module 240 includes: a first determination unit, configured to determine the probability that the text to be recognized is abnormal text based on the similarity and the confidence; and a second determination unit, configured to determine whether the text to be recognized is abnormal text based on the probability.

[0100] According to some embodiments, the second determination unit is further configured to: in response to the probability being greater than or equal to a probability threshold, determine that the to-be-recognized text is abnormal text.

[0101] According to some embodiments, the second determination unit is further configured to: generate a review task for the text to be recognized in response to the probability being less than a probability threshold; and receive a review result of the review task, wherein the review result is used to indicate whether the text to be recognized is an abnormal text.

[0102] According to some embodiments, the apparatus 400 further includes: an adding module configured to, in response to determining that the text to be recognized is an abnormal text, add the text to be recognized to the abnormal text library and initialize the confidence of the text to be recognized.

[0103] According to some embodiments, the apparatus 400 further includes: an updating module configured to reduce the confidence of the text to be recognized in response to a user's appeal request for the text to be recognized.

[0104] According to some embodiments, the apparatus 400 further includes: a first removing module configured to remove the text to be recognized from the abnormal text library in response to the confidence of the text to be recognized being less than a confidence threshold.

[0105] According to some embodiments, the apparatus 400 further includes: a fourth determination module configured to determine similar texts of the text to be recognized from the abnormal text library; and a second removal module configured to remove the similar texts from the abnormal text library.

[0106] It should be understood that Figure 4 The various modules or units of the apparatus 400 shown in FIG. 4 can be used in conjunction with the reference Figure 2The steps in the method 200 described above correspond to each other. Therefore, the operations, features and advantages described above for the method 200 are also applicable to the device 400 and the modules and units included therein. For the sake of brevity, some operations, features and advantages are not repeated here.

[0107] Although specific functions are discussed above with reference to specific modules, it should be noted that the functions of the various modules discussed herein can be divided into multiple modules, and / or at least some functions of multiple modules can be combined into a single module. For example, the extraction module 410 and the first determination module 420 described above can be combined into a single module in some embodiments.

[0108] It should also be understood that various techniques may be described herein in the general context of software hardware elements or program modules. Figure 4 The various modules described can be implemented in hardware or in hardware in combination with software and / or firmware. For example, these modules can be implemented as computer program codes / instructions, which are configured to be executed in one or more processors and stored in a computer-readable storage medium. Alternatively, these modules can be implemented as hardware logic / circuits. For example, in some embodiments, one or more of modules 410-430 can be implemented together in a system on chip (System on Chip, SoC). SoC may include an integrated circuit chip (which includes a processor (e.g., a central processing unit (CPU), a microcontroller, a microprocessor, a digital signal processor (DSP), etc.), a memory, one or more communication interfaces, and / or one or more components in other circuits), and may optionally execute the received program code and / or include embedded firmware to perform functions.

[0109] According to an embodiment of the present disclosure, an electronic device is also provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor, the memory storing instructions executable by the at least one processor, the instructions being executed by the at least one processor so that the at least one processor can execute the abnormal text recognition method.

[0110] According to an embodiment of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is also provided, where the computer instructions are used to enable a computer to execute the above-mentioned abnormal text recognition method.

[0111] According to an embodiment of the present disclosure, a computer program product is also provided, including a computer program, which implements the above-mentioned abnormal text recognition method when executed by a processor.

[0112] refer to Figure 5 , a block diagram of an electronic device 800 that can be used as a server or client of the present disclosure will now be described, which is an example of a hardware device that can be applied to various aspects of the present disclosure. The electronic device is intended to represent various forms of digital electronic computer devices, such as laptop computers, desktop computers, workbenches, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital assistants, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.

[0113] like Figure 5 As shown, the electronic device 500 includes a computing unit 501, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 502 or a computer program loaded from a storage unit 508 into a random access memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the device 500 can also be stored. The computing unit 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An input / output (I / O) interface 505 is also connected to the bus 504.

[0114] Multiple components in the electronic device 500 are connected to the I / O interface 505, including: an input unit 506, an output unit 507, a storage unit 508 and a communication unit 509. The input unit 506 can be any type of device that can input information to the device 500. The input unit 506 can receive input digital or character information and generate key signal input related to user settings and / or function control of the electronic device, and can include but is not limited to a mouse, a keyboard, a touch screen, a trackpad, a trackball, a joystick, a microphone and / or a remote control. The output unit 507 can be any type of device that can present information, and can include but is not limited to a display, a speaker, a video / audio output terminal, a vibrator and / or a printer. The storage unit 508 can include but is not limited to a disk and an optical disk. The communication unit 509 allows the device 500 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks, and can include but is not limited to a modem, a network card, an infrared communication device, a wireless communication transceiver and / or a chipset, such as Bluetooth TM devices, 802.11 devices, Wi-Fi devices, WiMAX devices, cellular communication devices, and / or the like.

[0115] The computing unit 501 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 501 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 501 performs the various methods and processes described above, such as method 200. For example, in some embodiments, the method 200 may be implemented as a computer software program, which is tangibly contained in a machine-readable medium, such as a storage unit 508. In some embodiments, part or all of the computer program may be loaded and / or installed on the device 500 via the ROM 502 and / or the communication unit 509. When the computer program is loaded into the RAM 503 and executed by the computing unit 501, one or more steps of the method 200 described above may be performed. Alternatively, in other embodiments, the computing unit 501 may be configured to perform the method 200 in any other appropriate manner (e.g., by means of firmware).

[0116] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0117] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0118] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, 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 foregoing.

[0119] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).

[0120] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.

[0121] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.

[0122] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in this disclosure can be performed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.

[0123] Although the embodiments or examples of the present disclosure have been described with reference to the accompanying drawings, it should be understood that the above-mentioned methods, systems and devices are merely exemplary embodiments or examples, and the scope of the present invention is not limited by these embodiments or examples, but only by the claims after authorization and their equivalent scope. Various elements in the embodiments or examples can be omitted or replaced by their equivalent elements. In addition, each step can be performed in an order different from that described in the present disclosure. Further, the various elements in the embodiments or examples can be combined in various ways. It is important that with the evolution of technology, many elements described herein can be replaced by equivalent elements that appear after the present disclosure.

Claims

1. A method for identifying abnormal text, comprising: Extracting a first text feature of the text to be recognized; Based on the first text feature, determine a target abnormal text from a preset abnormal text library, wherein a similarity between a second text feature of the target abnormal text and the first text feature is greater than or equal to a similarity threshold; Acquire the confidence of the target abnormal text, wherein the confidence is used to indicate the degree of abnormality of the target abnormal text; Normalizing the similarity and the confidence to values ​​within the range of 0 to 1 respectively; The product of the normalized similarity and the normalized confidence is determined as the probability that the text to be recognized is an abnormal text, wherein the lower the confidence of the target abnormal text, the higher the possibility that the target abnormal text is a normal text, and the higher the possibility that the text to be recognized that is similar to the target abnormal text is a normal text and the lower the probability that it is an abnormal text; In response to the probability being less than a probability threshold, generating a manual review task for the text to be recognized; and A manual review result of the review task is received, wherein the review result is used to indicate whether the text to be identified is an abnormal text.

2. The method according to claim 1, further comprising: In response to the probability being greater than or equal to a probability threshold, the to-be-recognized text is determined to be abnormal text.

3. The method according to claim 1 or 2, further comprising: In response to determining that the text to be recognized is an abnormal text, the text to be recognized is added to the abnormal text library, and the confidence of the text to be recognized is initialized.

4. The method according to claim 3, further comprising: In response to a user's appeal request for the text to be recognized, the confidence level of the text to be recognized is reduced.

5. The method according to claim 4, further comprising: In response to the confidence of the text to be recognized being less than a confidence threshold, the text to be recognized is removed from the abnormal text library.

6. The method according to claim 5, further comprising: Determining similar texts of the text to be recognized from the abnormal text library; as well as The similar text is removed from the abnormal text library.

7. The method according to claim 3, further comprising: In response to not receiving a complaint request from the user regarding the text to be recognized within a preset time period, the confidence level of the text to be recognized is increased.

8. The method according to claim 1, wherein: The abnormal text library includes a plurality of abnormal texts, and extracting the first text feature of the text to be recognized includes: extracting a plurality of first text features of the text to be recognized, wherein the types of the plurality of first text features are different, And wherein, based on the first text feature, determining the target abnormal text from a preset abnormal text library includes: For each first text feature in the plurality of first text features: Acquire a second text feature library corresponding to the first text feature, wherein the second text feature library includes a plurality of second text features corresponding to the plurality of abnormal texts, respectively, and the types of the plurality of second text features are the same as the type of the first text feature; and respectively calculating similarities between the first text feature and the plurality of second text features; as well as In response to the similarity between any first text feature among the plurality of first text features and a target second text feature being greater than or equal to the similarity threshold, the abnormal text corresponding to the target second text feature is used as the target abnormal text.

9. The method according to claim 8, wherein: The plurality of first text features include a first literal feature, a first semantic feature and a first violation information code, wherein the first violation information code is a code of violation information in the text to be identified.

10. An abnormal text recognition device, comprising: An extraction module, configured to extract a first text feature of a text to be recognized; A first determination module is configured to determine a target abnormal text from a preset abnormal text library based on the first text feature, wherein a similarity between a second text feature of the target abnormal text and the first text feature is greater than or equal to a similarity threshold; an acquisition module, configured to acquire the confidence of the target abnormal text, wherein the confidence is used to indicate the degree of abnormality of the target abnormal text; and The second determination module includes: a first determining unit, configured to normalize the similarity and the confidence to values ​​within a range of 0 to 1, respectively, and determine the product of the normalized similarity and the normalized confidence as the probability that the text to be recognized is an abnormal text, wherein the lower the confidence of the target abnormal text, the higher the possibility that the target abnormal text is a normal text, and the higher the possibility that the text to be recognized that is similar to the target abnormal text is a normal text and the lower the probability that it is an abnormal text; and The second determination unit is configured to generate a manual review task for the text to be recognized in response to the probability being less than a probability threshold; and receive a manual review result of the review task, wherein the review result is used to indicate whether the text to be recognized is an abnormal text.

11. The device according to claim 10, wherein: The second determining unit is further configured to: In response to the probability being greater than or equal to a probability threshold, the to-be-recognized text is determined to be abnormal text.

12. The device according to claim 10 or 11, further comprising: The adding module is configured to, in response to determining that the text to be recognized is an abnormal text, add the text to be recognized to the abnormal text library and initialize the confidence of the text to be recognized.

13. The apparatus according to claim 12, further comprising: The updating module is configured to reduce the confidence of the text to be recognized in response to a user's appeal request for the text to be recognized.

14. An electronic device comprising: at least one processor; as well as a memory communicatively coupled to the at least one processor; in The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method according to any one of claims 1 to 9.

15. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to make a computer execute the method according to any one of claims 1-9.

16. A computer program product comprising a computer program, wherein: When the computer program is executed by a processor, the method according to any one of claims 1 to 9 is implemented.

Citation Information

Patent Citations

  • Method for identifying sensitive information and device

    CN106874253A