A method, system, device and storage medium for detecting illegal deformed text

By querying the associated words of the historical database and building text vectors, the problem of low accuracy in existing network models when detecting illegally deformed text is solved, precise detection of deformation expression is achieved, and the effect of illegally deformed text detection is improved.

CN114238614BActive Publication Date: 2024-12-20GUANGZHOU BAIGUOYUAN NETWORK TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202111364341.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-17
Publication Date
2024-12-20
Estimated Expiration
2041-11-17

AI Technical Summary

Technical Problem

Existing network models are poor in detecting illegally deformed texts, and it is difficult to deal with illegal expressions of grammatical and semantic deformations, resulting in low detection accuracy.

Method used

By obtaining the words in the text to be detected, querying the historical database to determine the associated words, building a text vector and entering a violation text detection model, to mine the real semantic information expressed in the deformed and improve detection accuracy.

Benefits of technology

Accurate detection of illegally deformed texts has been achieved, the detection effect of illegally deformed texts has been optimized, and the detection accuracy has been improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114238614B_ABST
    Figure CN114238614B_ABST
Patent Text Reader

Abstract

The embodiments of the present application disclose a method, system, device and storage medium for detecting deformed text in violation of regulations. The technical solution provided by the embodiments of the present application obtains the text to be detected, determines the first word contained in the text to be detected; queries the history database according to the first word, determines the second word associated with the first word, the history database is used to store historical input texts, and each of the historical input texts is connected in series according to the same words contained in itself; constructs a text vector based on the first word and the second word; inputs the text vector into the illegal text detection model, and outputs the text detection result of the text to be detected. The above-mentioned technical means are adopted to connect the historical texts in series, query the associated words of the text to be detected according to the historical text, and then realize the detection of deformed text in violation of regulations, so as to improve the detection accuracy of illegal text and optimize the detection effect of illegal text.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of text detection technology, and in particular, to a method, system, device and storage medium for detecting illegal deformed text. Background Art

[0002] At present, in many text application scenarios of social software, it is necessary to detect violations of text input by users in order to intercept illegal expressions and maintain a harmonious online social environment. Existing illegal text detection methods mainly rely on network models, which use a large amount of text and computing power to achieve huge model pre-training tasks, so that the pre-trained model has the ability to extract text features, thereby realizing text violation detection.

[0003] However, most traditional network models are built based on text corpora with complete structure and coherent semantics. In order to detect illegal text, most illegal text expressions have grammatical and semantic deformation characteristics. When detecting illegal text based on existing network models, it is difficult to detect deformed text expressions input by illegal users, resulting in poor detection results for illegal deformed text. Summary of the invention

[0004] The embodiments of the present application provide a method, system, device and storage medium for detecting illegal deformed text, which can improve the accuracy of illegal text detection and solve the problem of illegal deformed text detection errors in existing network models.

[0005] In a first aspect, an embodiment of the present application provides a method for detecting illegal deformed text, comprising:

[0006] Obtain the text to be detected and determine the first word contained in the text to be detected;

[0007] According to the first word, a history database is searched to determine a second word associated with the first word, wherein the history database is used to store history input texts, and each history input text is connected in series according to the same words contained in the text;

[0008] Build a text vector based on the first word and the second word;

[0009] The text vector is input into the illegal text detection model, and the text detection result of the text to be detected is output.

[0010] In a second aspect, an embodiment of the present application provides a system for detecting illegal deformed text, including:

[0011] A determination module is used to obtain the text to be detected and determine the first word contained in the text to be detected;

[0012] A query module, used for querying a history database according to a first word to determine a second word associated with the first word, wherein the history database is used for storing history input texts, and each history input text is connected in series according to the same words contained in the text;

[0013] A building module, for building a text vector based on the first word and the second word;

[0014] The detection module is used to input the text vector into the illegal text detection model and output the text detection result of the text to be detected.

[0015] In a third aspect, an embodiment of the present application provides an electronic device, including:

[0016] memory and one or more processors;

[0017] The memory is used to store one or more programs;

[0018] When the one or more programs are executed by the one or more processors, the one or more processors implement the illegal deformed text detection method as described in the first aspect.

[0019] In a fourth aspect, an embodiment of the present application provides a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute the method for detecting illegal deformed text as described in the first aspect.

[0020] The embodiment of the present application obtains the text to be detected, determines the first word contained in the text to be detected; queries the history database based on the first word to determine the second word associated with the first word, the history database is used to store historical input texts, and each of the historical input texts is connected in series according to the same words contained in itself; constructs a text vector based on the first word and the second word; inputs the text vector into the illegal text detection model, and outputs the text detection result of the text to be detected. The above technical means are adopted, by connecting the historical texts in series, and querying the related words of the text to be detected based on the historical text. Through the query of the related words, the deformed expression of the text to be detected can be mined, and then the detection of illegal deformed text can be realized, so as to realize the accurate detection of illegal deformed text, improve the detection accuracy of illegal text, and optimize the detection effect of illegal text. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Figure 1 is a flow chart of a method for detecting illegal deformed text provided by an embodiment of the present application;

[0022] Figure 2 is a flowchart of the historical input text concatenation of the historical database in the embodiment of the present application;

[0023] Figure 3 is a flow chart of illegal text detection of a text to be detected in an embodiment of the present application;

[0024] Figure 4 is a flowchart of text vector construction in an embodiment of the present application;

[0025] Figure 5 It is a structural diagram of a system for detecting illegal deformed text provided by an embodiment of the present application;

[0026] Figure 6 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0027] In order to make the purpose, technical scheme and advantages of the present application clearer, the specific embodiments of the present application are further described in detail below in conjunction with the accompanying drawings. It is understood that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for the convenience of description, only the part related to the present application but not all the contents are shown in the accompanying drawings. Before discussing the exemplary embodiments in more detail, it should be mentioned that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow chart describes each operation (or step) as a sequential process, many of the operations therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of each operation can be rearranged. The process can be terminated when its operation is completed, but it can also have additional steps not included in the accompanying drawings. The process can correspond to a method, a function, a procedure, a subroutine, a subprogram, etc.

[0028] The present application provides a method for detecting illegal deformed texts, which aims to expand the detection range of the text to be detected, and to mine the deformed expressions of the text to be detected by querying the associated words of the text to be detected, so as to realize the accurate detection of illegal deformed texts. As for the traditional illegal text detection model, it generally uses a large amount of text and computing power to realize the huge model pre-training task, so that the pre-trained model has the ability to extract text features, and the text classification task in the model is applied to the text feature extraction method to classify the input text, so as to realize the text violation detection. Since the texts used by these network models are mostly from the existing text corpus on the Internet, these corpus themselves are texts with complete structure and semantic coherence, and the models based on these text pre-training can naturally give a better semantic understanding of this type of text. However, in many text application scenarios (such as live chat, forum comments, etc.), the texts input by users are mostly arbitrary text expressions of users, with a large number of grammatical errors and semantically similar deformed words. These corpus have the characteristics of inconsistent length, different text distribution, grammatical problems, and even semantic incoherence. At the same time, in these text application scenarios, there are still a large number of users who make deformed expressions in order to circumvent text violation detection. That is, in order not to be detected by the system for text violations, the violating users will greatly deform the content to be expressed while ensuring that other users can understand it, which will cause great interference to text violation detection. Since most traditional network models are based on structurally complete and semantically coherent text corpora for model construction, for the deformation of the above-mentioned user expressions, the traditional network model can no longer extract the semantic information of the entire sentence well. Based on this, a method for detecting deformed text in violation of the present application is provided in an embodiment to solve the problem of error in detecting deformed text in the existing network model.

[0029] Example:

[0030] Figure 1 A flowchart of a method for detecting deformed text in violation of the present application is provided. The method for detecting deformed text in violation of the present application can be performed by a device for detecting deformed text in violation of the present application. The device for detecting deformed text in violation of the present application can be implemented by software and / or hardware. The device for detecting deformed text in violation of the present application can be composed of two or more physical entities or one physical entity. Generally speaking, the device for detecting deformed text in violation of the present application can be a processing device such as a computer or a server host.

[0031] The following description is made by taking the illegal deformed text detection device as an example of the main body of the illegal deformed text detection method. Figure 1 , the illegal deformed text detection method specifically includes:

[0032] S110, obtaining a text to be detected, and determining a first word included in the text to be detected.

[0033] When performing illegal deformed text detection, the embodiment of the present application monitors the user's text input in real time. When the user input text is monitored, the current user input text is defined as the text to be detected. Based on the text to be detected, the illegal deformed text detection method of the embodiment of the present application is used to perform illegal text detection.

[0034] Among them, for the acquired text to be detected, first determine the words contained in the text to be detected, and define this part of words as the first word. It can be understood that for a sentence, each word in its grammatical structure must contain corresponding dependency relationships, such as subject-predicate relationship, verb-object relationship. By detecting the dependency relationship of the text to be detected, the grammatical structure of the text to be detected can be determined, and then the words contained in the text to be detected can be determined.

[0035] Based on this, the embodiment of the present application first parses the grammatical structure of the acquired text to be detected based on word dependencies, splits the text to be detected into several first words, and sorts the first words according to the grammatical structure of the text to be detected.

[0036] Specifically, syntactic analysis is used to parse the grammatical structure of the text to be tested. Syntactic analysis is one of the key technologies in natural language processing, and its basic task is to determine the syntactic structure of a sentence or the dependency relationship between words in a sentence. Syntactic analysis mainly includes two aspects: one is to determine the grammatical system of the language, that is, to give a formal definition of the grammatical structure of legal sentences in the language; the other is the application of syntactic analysis technology, that is, according to the given grammatical system, the syntactic structure of the sentence is automatically derived, and the syntactic units contained in the sentence and the relationship between these syntactic units are analyzed.

[0037] Syntactic analysis needs to follow a certain grammatical system, in which there is a direct dependency relationship between words, forming a dependency pair. One of the dependency pairs is a core word, also called a dominant word, and the other is a modifier, also called a subordinate word, which points to the dominant word. For example, in the sentence "I sent her a bouquet of flowers", "I" and "send" form a subject-predicate dependency relationship, and "send" and "flowers" form a verb-object dependency relationship.

[0038] Syntactic analysis explains the syntactic structure by analyzing the dependency relationship between components in a language unit, and advocates that the core verb in a sentence is the central component that controls other components. However, it itself is not controlled by any other component, and all controlled components are subordinate to the controller in a certain relationship. Moreover, only one component in a sentence is independent, and the other components of the sentence are subordinate to a certain component, and no component can depend on two or more components. If component A is directly subordinate to component B, and component C is located between A and B in the sentence, then component C is either subordinate to A, or subordinate to B, or subordinate to a component between A and B. The other components on the left and right sides of the central component have no relationship with each other.

[0039] Based on the above principle, for the text to be detected input into the illegal deformed text detection device, the dependency relationship between words in the text can be analyzed by syntax, and then its grammatical structure can be determined. According to its grammatical structure, the text to be detected is split into multiple first words sorted according to the grammatical structure.

[0040] S120, querying a history database according to the first word to determine a second word associated with the first word, wherein the history database is used to store history input texts, and each history input text is connected in series according to the same words contained in the text.

[0041] Further, based on each first word contained in the determined text to be detected, the embodiment of the present application determines the second word associated with each first word by querying a history database, wherein the history database is used to store historical input texts, and each historical input text is connected in series according to the same words contained in itself.

[0042] It should be noted that in order to enable the illegal deformed text detection device to accurately understand the deformed expressions that may exist in the text to be detected, the embodiment of the present application determines the words contained in the text to be detected, defines this part of words as the first words, and then queries the historical database to determine the associated words of each first word in the text to be detected, that is, the second words. By querying this second associated word, the illegal text detection range of the text to be detected can be expanded, and the second associated word can be used to represent the real semantic information of the potential deformed expression of the text to be detected.

[0043] For example, for a sentence with illegal expressions, its normal grammatical expression is "ABXX", in which the word "AB" is an illegal word. In order to avoid being detected by the system for text violations, the violating user will greatly deform the content to be expressed while ensuring that other users can understand it. For example, by swapping the order of "AB", the sentence is changed to "BAXX". After the system obtains the text "BAXX" to be detected, it cannot detect violations by directly detecting the word "BA". Therefore, the word "XX" in the text "BAXX" to be detected can be used to find the historical input text "ABXX" that also contains "XX" in the historical database, and then determine the second word "AB" associated with "XX". In this way, the real semantic information of the user's deformed expression can be found through the associated words of the text to be detected, and the illegal text detection can be combined with this real semantic information to achieve accurate illegal deformed text detection effect.

[0044] Prior to this, a history database is pre-built to collect the user's historical input texts and concatenate the stored historical input texts. Figure 2 , the historical database historical input text concatenation process includes:

[0045] S1101, obtaining a user's historical input text, parsing the grammatical structure of the historical input text based on word dependency, and splitting the historical input text into a plurality of words;

[0046] S1102: Concatenate the historical input texts according to the same words between the historical input texts, and store the concatenated historical input texts in a historical database.

[0047] Specifically, referring to the above-mentioned syntactic analysis method based on dependency, the historical input texts of users are collected during the service operation of the application platform, and the grammatical structure of the historical input texts is analyzed one by one, and the historical input texts are split into several words. Furthermore, for any two historical input texts, if there is an identical word between the two, the word is used as a series node to connect the two historical input texts together. By analogy, each historical input text can be connected in series into a word map and stored in a historical database.

[0048] Furthermore, when searching the history database according to the first word, all words in the history database are cycled to determine whether the first word exists in the history database. If not, there is no associated word for the first word. If so, the position of the first word is located. Then, according to the grammatical structure sequence of the historical input text associated with the position, the word associated with the context of the first word is determined as the second word (except the word in the context of the text to be detected itself).

[0049] For example, refer to Figure 3 After parsing the text to be detected to obtain the four first words "1-2-3-4", the historical database is queried one by one according to each first word to determine the second word. For example, the historical database is queried according to the first word "1" to determine the position of the first word "1" in the historical database. Then, the first word "1-1" associated with the context of the first word "1" is determined as its associated word, that is, the second word. It is understandable that if the first word contains multiple associated words in the historical data, all associated second words will be extracted for subsequent illegal text detection.

[0050] S130: Construct a text vector based on the first word and the second word.

[0051] The second word found is combined with the original first word of the text to be detected, and the text to be detected is represented by word vectorization. Based on the text vector obtained by quantization of the text to be detected, the text detection result can be determined by the illegal text detection model.

[0052] Specifically, refer to Figure 4 , the text vector construction process includes:

[0053] S1301, converting each first word into a first word vector, and merging each first word vector into a first subtext vector;

[0054] S1302, converting each first word into a second word vector in combination with a second word, and merging each second word vector into a second subtext vector, wherein the mutually related second words and the corresponding first words are merged into one second word vector;

[0055] S1303: Construct a text vector based on the first sub-text vector and the second sub-text vector.

[0056] For example, refer to Figure 3 When constructing a text vector, for each first word, a first word vector represented by a 512-bit floating point number is obtained through vectorization processing, and each first word vector is further fused into a vector, and the vector is defined as a first sub-text vector. Optionally, when performing vector fusion, a weighted fusion method is adopted, and corresponding weights are set for each first word vector (such as setting a larger weight for the first word vector with associated words), and a first sub-text vector represented by a 512-bit floating point number is obtained based on the corresponding weight calculation. The above-mentioned first sub-text vector construction process can be vectorized based on the language representation model (BERT). There are many ways to vectorize text features, which will not be elaborated here.

[0057] On the other hand, for each second word, firstly, vector fusion is performed with the associated first word, that is, after the first word and the associated second word are vectorized, the two vectors represented by 512-bit floating point numbers are fused into a vector represented by 512-bit floating point numbers. For the first word without an associated second word, vectorization is directly performed into a vector represented by a 512-bit floating point number, so as to obtain the vectorized second word vector (including the vector fused with the associated words and the vector processed by the first word without the associated words). The second word vectors represented by each 512-bit floating point number are further fused to obtain a second sub-text vector represented by a 512-bit floating point number.

[0058] Optionally, when constructing the second sub-text vector, each second word vector is weighted and fused into a second sub-text vector according to a set weight parameter, wherein the set weight parameter is set accordingly according to whether there is an associated second word with the first word. Specifically, a graph attention network model (GraphAttention Network, GAT) can be used to construct the second sub-text vector. The graph attention network is a variant of a convolutional neural network, which passes the contextual features of an attribute to the attribute itself (i.e., the first word is fused with the associated second word). Given a dependency graph of N nodes, each node corresponds to a locally related word embedding vector, and each GAT layer recalculates the representation vector of each node by integrating the hidden state vectors of the surrounding neighboring nodes. Based on this principle, each first word can be converted into a second word vector in combination with the second word. For example, for the four first words of the text to be detected, among which the first word 1 and the first word 2 have associated second words, and the first word 3 and the first word 4 do not have associated second words, the weight parameter of the second word vector obtained by vectorizing and fusing the first word 1 and the second word 2 with the corresponding second word is set to 0.3, and the weight parameter of the second word vector obtained by vectorizing the first word 3 and the first word 4 is set to 0.2. In this way, the features of the associated words can be highlighted, so as to more accurately detect the illegal deformed text and improve the accuracy of illegal text detection.

[0059] Afterwards, based on the first sub-text vector and the second sub-text vector obtained by the above vectorization processing, the first sub-text vector and the second sub-text vector are weighted and fused into a text vector. For example, the weight of the first sub-text vector is set to 40%, and the weight of the second sub-text vector is set to 60%. By weighted fusion of the first sub-text vector and the second sub-text vector, a text vector represented by a 512-bit floating point number can be obtained. Similarly, by setting a larger weight for the second sub-text vector, the features of the associated words can be highlighted, so as to more accurately detect the illegal deformed text and improve the accuracy of illegal text detection.

[0060] In another possible implementation, the first sub-text vector and the second sub-text vector are superimposed to obtain the text vector, that is, the first sub-text vector and the second sub-text vector are directly added to obtain a text vector represented by a 1204-bit floating point number.

[0061] It should be noted that in actual application scenarios, when constructing a text vector based on the first word and the second word, the two parts of the words can also be directly vectorized, and then the two associated vectors can be merged into one vector, and then all the vectors can be further merged. That is, text detection is performed only based on the above-mentioned second sub-text vector as the final text vector. The embodiment of the present application does not impose fixed restrictions on the technical means for constructing a text line based on the vectorization processing of the first word and the second word, and will not be elaborated here.

[0062] S140, input the text vector into the illegal text detection model, and output the text detection result of the text to be detected.

[0063] Finally, by inputting the text vector into the illegal text detection model, the illegal text detection model can determine whether there are illegal text expressions in the text vector based on the comparison of the text vector with the pre-stored classification vector. The classification vector is pre-constructed based on each historical input text vector, and corresponding classification information is added to each classification vector, such as "illegal" or "not illegal". Based on the labeled classification information, when it is determined that the text vector and the classification vector reach the set similarity threshold, the specific classification information of the text vector is determined to obtain its text detection result. According to the actual illegal text detection needs, more detailed classification labels can be added to the illegal text expressions for different types of violations to achieve more detailed text violation detection.

[0064] Exemplarily, when a user publishes text using an application platform, the text input by the detection user is obtained as the text to be detected, the text vector of the text to be detected is determined based on the above-mentioned illegal deformed text detection method, the text vector is compared with the classification vector, and the classification information of the text vector is output as the text detection result of the text to be detected. The classification vector is pre-constructed based on the historical input text marked with classification information. For example, by comparing the text vector with the classification vector marked with "malicious insults" type classification information, it is determined that the two meet the set similarity threshold, and the classification information of the "malicious insults" type is output as the text detection result. Based on the text detection result, it can be determined that the text input by the current user contains malicious insults to others, thereby achieving accurate text detection.

[0065] In the above, by obtaining the text to be detected, the first word contained in the text to be detected is determined; according to the first word, a historical database is queried to determine the second word associated with the first word, the historical database is used to store historical input texts, and each of the historical input texts is connected in series according to the same words contained in itself; a text vector is constructed based on the first word and the second word; the text vector is input into the illegal text detection model, and the text detection result of the text to be detected is output. The above technical means are adopted, by connecting historical texts in series, and querying the associated words of the text to be detected according to the historical text. Through the query of the associated words, the deformed expression of the text to be detected can be mined, and then the detection of illegal deformed text can be realized, so as to realize the accurate detection of illegal deformed text, improve the detection accuracy of illegal text, and optimize the detection effect of illegal text.

[0066] Based on the above embodiments, Figure 5 A schematic diagram of the structure of a system for detecting illegal deformed text provided by this application. Figure 5 The illegal deformed text detection system provided in this embodiment specifically includes: a determination module 21, a query module 22, a construction module 23 and a detection module 24.

[0067] The determination module 21 is used to obtain the text to be detected and determine the first word contained in the text to be detected;

[0068] The query module 22 is used to query the history database according to the first word to determine the second word associated with the first word, the history database is used to store historical input texts, and each historical input text is connected in series according to the same words contained in itself;

[0069] The construction module 23 is used to construct a text vector based on the first word and the second word;

[0070] The detection module 24 is used to input the text vector into the illegal text detection model and output the text detection result of the text to be detected.

[0071] Furthermore, the determination module 21 is specifically used to parse the grammatical structure of the text to be detected based on the word dependency relationship, split the text to be detected into a plurality of first words, and the first words are sorted according to the grammatical structure of the text to be detected. Prior to this, by obtaining the user's historical input text, the grammatical structure of the historical input text is parsed based on the word dependency relationship, and the historical input text is split into a plurality of words; according to the same words between each historical input text, each historical input text is connected in series, and each historical input text that has been connected in series is stored in a historical database.

[0072] The construction module 23 is specifically used to convert each first word into a first word vector, and merge each first word vector into a first sub-text vector; convert each first word into a second word vector in combination with a second word, and merge each second word vector into a second sub-text vector, wherein the mutually related second words and the corresponding first words are merged into a second word vector; and construct a text vector based on the first sub-text vector and the second sub-text vector.

[0073] Specifically, the construction module 23 weights and fuses each second word vector into a second sub-text vector according to a set weight parameter, wherein the set weight parameter is set correspondingly according to whether there is an associated second word with the first word. The text vector is obtained by weightedly fusing the first sub-text vector and the second sub-text vector into a text vector; or, the first sub-text vector and the second sub-text vector are superimposed to obtain a text vector.

[0074] The detection module 24 is specifically used to compare the text vector with the classification vector, and output the classification information of the text vector as the text detection result of the text to be detected. The classification vector is pre-constructed according to the historical input text marked with the classification information.

[0075] In the above, by obtaining the text to be detected, the first word contained in the text to be detected is determined; according to the first word, a historical database is queried to determine the second word associated with the first word, the historical database is used to store historical input texts, and each of the historical input texts is connected in series according to the same words contained in itself; a text vector is constructed based on the first word and the second word; the text vector is input into the illegal text detection model, and the text detection result of the text to be detected is output. The above technical means are adopted, by connecting historical texts in series, and querying the associated words of the text to be detected according to the historical text. Through the query of the associated words, the deformed expression of the text to be detected can be mined, and then the detection of illegal deformed text can be realized, so as to realize the accurate detection of illegal deformed text, improve the detection accuracy of illegal text, and optimize the detection effect of illegal text.

[0076] The illegal deformed text detection system provided in the embodiment of the present application can be used to execute the illegal deformed text detection method provided in the above embodiment, and has corresponding functions and beneficial effects.

[0077] Based on the above practical example, the present application embodiment also provides an electronic device, referring to Figure 6, the electronic device includes: a processor 31, a memory 32, a communication module 33, an input device 34 and an output device 35. The memory 32 is a computer-readable storage medium, which can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the illegal deformed text detection method described in any embodiment of the present application (for example, the determination module, query module, construction module and detection module in the illegal deformed text detection system). The communication module 33 is used for data transmission. The processor executes various functional applications and data processing of the device by running the software programs, instructions and modules stored in the memory, that is, realizing the above-mentioned illegal deformed text detection method. The input device 34 can be used to receive input digital or character information, and generate key signal input related to the user settings and function control of the device. The output device 35 may include a display device such as a display screen. The above-mentioned electronic device can be used to execute the illegal deformed text detection method provided in the above-mentioned embodiment, and has corresponding functions and beneficial effects.

[0078] On the basis of the above-mentioned embodiments, the embodiments of the present application further provide a storage medium containing computer executable instructions, wherein the computer executable instructions are used to execute a method for detecting illegal deformed text when executed by a computer processor, and the storage medium may be any of various types of memory devices or storage devices. Of course, the storage medium containing computer executable instructions provided in the embodiments of the present application, whose computer executable instructions are not limited to the illegal deformed text detection method described above, can also execute the related operations in the illegal deformed text detection method provided in any embodiment of the present application.

[0079] The above are only preferred embodiments of the present application and the technical principles used. The present application is not limited to the specific embodiments described herein, and various obvious changes, readjustments and substitutions that can be made by those skilled in the art will not deviate from the scope of protection of the present application. Therefore, although the present application is described in more detail through the above embodiments, the present application is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present application, and the scope of the present application is determined by the scope of the claims.

Claims

1. A method for detecting illegal deformed text, It is characterized in that include: Obtain a text to be detected, and determine a first word contained in the text to be detected; According to the first word, a history database is searched to determine a second word associated with the first word, wherein the history database is used to store history input texts, and each history input text is connected in series according to the same words contained in the text; Convert each of the first words into a first word vector, and merge each of the first word vectors into a first sub-text vector; Convert each of the first words into a second word vector in combination with the second word, and fuse each of the second word vectors into a second sub-text vector, wherein the second words and the corresponding first words that are related to each other are fused into one second word vector; construct a text vector based on the first sub-text vector and the second sub-text vector; The text vector is input into an illegal text detection model, and a text detection result of the text to be detected is output.

2. The method for detecting illegal deformed text according to claim 1, It is characterized in that The step of determining the first word contained in the text to be detected comprises: The grammatical structure of the text to be detected is parsed based on word dependency, the text to be detected is split into a plurality of first words, and the first words are sorted according to the grammatical structure of the text to be detected.

3. The method for detecting illegal deformed text according to claim 1, It is characterized in that The step of constructing the text vector based on the first sub-text vector and the second sub-text vector includes: The first sub-text vector and the second sub-text vector are weightedly fused to obtain the text vector; or the first sub-text vector and the second sub-text vector are superimposed to obtain the text vector.

4. The method for detecting illegal deformed text according to claim 1, It is characterized in that Merging each of the second word vectors into a second sub-text vector includes: The second word vectors are weighted and fused into a second sub-text vector according to a set weight parameter, wherein the set weight parameter is set correspondingly according to whether the first word is associated with the second word.

5. The method for detecting illegal deformed text according to claim 1, It is characterized in that Inputting the text vector into the illegal text detection model and outputting the text detection result of the text to be detected includes: The text vector is compared with a classification vector, and classification information of the text vector is output as a character detection result of the text to be detected. The classification vector is pre-constructed based on historical input text marked with classification information.

6. The method for detecting illegal deformed text according to claim 1, It is characterized in that Before searching the history database according to the first word, the method further includes: Acquire a user's historical input text, parse the grammatical structure of the historical input text based on word dependency, and split the historical input text into a plurality of words; According to the same words between the various historical input texts, the various historical input texts are connected in series, and the various historical input texts that have been connected in series are stored in the historical database.

7. A system for detecting illegal deformed text, It is characterized in that include: A determination module, used for acquiring a text to be detected and determining a first word contained in the text to be detected; A query module, used for querying a history database according to the first word to determine a second word associated with the first word, wherein the history database is used for storing history input texts, and each history input text is connected in series according to the same words contained in the text; A construction module, configured to convert each of the first words into a first word vector, and merge each of the first word vectors into a first sub-text vector; Convert each of the first words into a second word vector in combination with the second word, and fuse each of the second word vectors into a second sub-text vector, wherein the second words and the corresponding first words that are related to each other are fused into one second word vector; construct a text vector based on the first sub-text vector and the second sub-text vector; The detection module is used to input the text vector into the illegal text detection model and output the text detection result of the text to be detected.

8. An electronic device, It is characterized in that include: memory and one or more processors; The memory is used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the illegal deformed text detection method as described in any one of claims 1-6.

9. A storage medium containing computer executable instructions, It is characterized in that The computer executable instructions are used to execute the illegal deformed text detection method as described in any one of claims 1-6 when executed by a computer processor.