Text content detection method, device, equipment and storage medium
By obtaining the position distance characteristics of the text content and the candidate position distance characteristics of the candidate text content, the detection method is determined, which solves the problem of low detection efficiency of multiple repeated characters in the existing technology and improves the efficiency of text content detection.
Patent Information
- Application Number
- CN202011216570.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-11-04
- Publication Date
- 2024-09-24
- Estimated Expiration
- 2040-11-04
AI Technical Summary
Existing text content detection methods have low detection efficiency when encountering multiple repeated characters, resulting in an increase in invalid detection and reduced efficiency.
By obtaining the current detection object position distance characteristics of the text content to be detected and the candidate position distance characteristics of the candidate text content, the detection method of the text content to be detected is determined and invalid detection is reduced.
It improves the efficiency of text content detection, reduces invalid detection, and improves the efficiency of the detection process.
Smart Images

Figure CN112395853B
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, computer equipment and storage medium for determining a text content detection mode. Background Art
[0002] In the current text content detection process, the characters in the text content to be detected are usually detected one by one to finally obtain the detection result. However, when there are many repeated characters in the text content, it takes more time to detect by detecting one character at a time, and invalid detection of repeated characters occurs, resulting in low text content detection efficiency. Summary of the invention
[0003] Based on this, it is necessary to provide a method, device, computer equipment and storage medium for determining a text content detection method to address the above technical problems. Before the text content to be detected is detected, the corresponding detection method for the text content to be detected is determined by the position distance characteristics of the current detection object in the text content to be detected, which can reduce invalid detection of text content and thus improve the detection efficiency of text content.
[0004] A method for determining a text content detection mode, the method comprising:
[0005] Get the text content to be detected;
[0006] Determine the current detection object from the text content to be detected;
[0007] Perform feature processing on the text content to be detected according to the current detection object to obtain a current position distance feature set corresponding to the text content to be detected;
[0008] Obtain candidate text content, perform feature processing on the candidate text content according to the current detection object, and obtain a candidate position distance feature set corresponding to the candidate text content;
[0009] The detection method of the text content to be detected is determined according to the current position distance feature set and the candidate position distance feature set.
[0010] In one of the embodiments, feature processing is performed on the text content to be detected according to the current detection object to obtain a current position distance feature set corresponding to the text content to be detected, including: obtaining the first position of the current detection object in the text content to be detected; traversing the text content to be detected according to a specified order to obtain the previous current detection object in the text content to be detected; obtaining the second position of the previous current detection object in the text content to be detected; calculating the current position distance feature of the current detection object in the text content to be detected according to the first position and the second position; obtaining the next current detection object, determining the next current detection object as the current detection object, returning to the step of traversing the text content to be detected according to the specified order until the current position distance feature corresponding to each current object to be detected is obtained; and generating a current position distance feature set corresponding to the text content to be detected according to the current position distance feature corresponding to each current object to be detected.
[0011] In one embodiment, feature processing is performed on the candidate text content according to the current detection object to obtain a candidate position distance feature set corresponding to the candidate text content, including: obtaining the third position of the current detection object in the candidate text content; traversing the candidate text content according to a specified order to obtain the previous current detection object in the candidate text content; obtaining the fourth position of the previous current detection object in the candidate text content; calculating the current candidate position distance feature of the current detection object in the candidate text content according to the third position and the fourth position; obtaining the next current detection object, determining the next current detection object as the current detection object, returning to the step of traversing the candidate text content according to the specified order until the current candidate position distance feature corresponding to each current object to be detected is obtained; and generating a candidate position distance feature set corresponding to the candidate text content according to the current position distance feature corresponding to each current object to be detected.
[0012] In one of the embodiments, a detection method for the text content to be detected is determined based on a current position distance feature set and a candidate position distance feature set, including: when the current position distance feature set matches the candidate position distance feature set, the detection method for the text content to be detected is to detect each detection object in the text content to be detected one by one; when the current position distance feature set does not match the candidate position distance feature set, the detection method for the text content to be detected is to not detect the text content to be detected.
[0013] In one of the embodiments, the text content to be detected is at least one of Chinese text content to be detected, English text content to be detected, and a character string to be detected.
[0014] In one of the embodiments, before performing feature processing on the candidate text content according to the current detection object, it also includes: detecting whether there is a detection object identical to the current detection object in the candidate text content; when there is no detection object identical to the current detection object in the candidate text content, returning to the step of determining the current detection object from the text content to be detected and redetermining the current detection object until it is detected that there is a detection object identical to the current detection object in the candidate text content; when there is a detection object identical to the current detection object in the candidate text content, entering the step of performing feature processing on the candidate text content according to the current detection object.
[0015] A device for determining a text content detection method, the device comprising:
[0016] A text content acquisition module is used to acquire the text content to be detected;
[0017] A detection object determination module is used to determine the current detection object from the text content to be detected;
[0018] A text content processing module, used to perform feature processing on the text content to be detected according to the current detection object, and obtain a current position distance feature set corresponding to the text content to be detected;
[0019] The candidate text content processing module is used to obtain the candidate text content, perform feature processing on the candidate text content according to the current detection object, and obtain a candidate position distance feature set corresponding to the candidate text content;
[0020] The detection method determination module is used to determine the detection method of the text content to be detected based on the current position distance feature set and the candidate position distance feature set.
[0021] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented:
[0022] Get the text content to be detected;
[0023] Determine the current detection object from the text content to be detected;
[0024] Perform feature processing on the text content to be detected according to the current detection object to obtain a current position distance feature set corresponding to the text content to be detected;
[0025] Obtain candidate text content, perform feature processing on the candidate text content according to the current detection object, and obtain a candidate position distance feature set corresponding to the candidate text content;
[0026] The detection method of the text content to be detected is determined according to the current position distance feature set and the candidate position distance feature set.
[0027] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0028] Get the text content to be detected;
[0029] Determine the current detection object from the text content to be detected;
[0030] Perform feature processing on the text content to be detected according to the current detection object to obtain a current position distance feature set corresponding to the text content to be detected;
[0031] Obtain candidate text content, perform feature processing on the candidate text content according to the current detection object, and obtain a candidate position distance feature set corresponding to the candidate text content;
[0032] The detection method of the text content to be detected is determined according to the current position distance feature set and the candidate position distance feature set.
[0033] The above-mentioned text content detection method determination method, device, computer equipment and storage medium obtain the text content to be detected; determine the current detection object from the text content to be detected; perform feature processing on the text content to be detected according to the current detection object to obtain the current position distance feature set corresponding to the text content to be detected; obtain the candidate text content, perform feature processing on the candidate text content according to the current detection object to obtain the candidate position distance feature set corresponding to the candidate text content; determine the detection method of the text content to be detected according to the current position distance feature set and the candidate position distance feature set. Therefore, before the text content to be detected is detected one by one, the corresponding detection method of the text content to be detected can be determined according to the position distance feature of the current detection object of the text content to be detected and the candidate position distance feature of the candidate text content, and then the text content to be detected is detected according to the detection method, which can reduce invalid detection of text content, thereby improving the detection efficiency of text content. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 A diagram of an application environment of a method for determining a text content detection mode in an embodiment;
[0035] Figure 2 A schematic diagram of a flow chart of a method for determining a text content detection mode in one embodiment;
[0036] Figure 3 A schematic diagram of a process of obtaining a current position distance feature set in one embodiment;
[0037] Figure 4 It is a flowchart of the step of obtaining a candidate position distance feature set in one embodiment;
[0038] Figure 5 A schematic diagram of a flow chart of steps for determining a detection method for text content to be detected in one embodiment;
[0039] Figure 6 A schematic diagram of a flow chart of a candidate text content feature processing step in one embodiment;
[0040] Figure 7 It is a structural block diagram of a device for determining a text content detection method in one embodiment;
[0041] Figure 8 is an internal structure diagram of a computer device in one embodiment;
[0042] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0044] The text content detection method provided in this application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 through a network. The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.
[0045] Specifically, the terminal 102 obtains the text content to be detected and sends the text content to be detected to the server 104. After receiving the text content to be detected, the server 104 determines the current detection object from the text content to be detected, performs feature processing on the text content to be detected according to the current detection object, obtains a current position distance feature set corresponding to the text content to be detected, obtains candidate text content, performs feature processing on the candidate text content according to the current detection object, obtains a candidate position distance feature set corresponding to the candidate text content, and determines the detection method of the text content to be detected according to the current position distance feature set and the candidate position distance feature set.
[0046] In another embodiment, the terminal 102 obtains text content to be detected, determines a current detection object from the text content to be detected, performs feature processing on the text content to be detected according to the current detection object, obtains a current position distance feature set corresponding to the text content to be detected, obtains candidate text content, performs feature processing on the candidate text content according to the current detection object, obtains a candidate position distance feature set corresponding to the candidate text content, and determines a detection method for the text content to be detected based on the current position distance feature set and the candidate position distance feature set.
[0047] In one embodiment, Figure 2 As shown, a method for determining a text content detection method is provided, and the method is applied to Figure 1 The terminal or server in the example is used to illustrate, including the following steps:
[0048] Step 202: Obtain the text content to be detected.
[0049] The text content to be detected here is the text content currently being detected. The so-called text content is a sentence or a combination of multiple sentences with complete and systematic meanings. The text content can be a sentence, a paragraph or a chapter, or it can also be a string. The text content can be English text content, Chinese text content, a string or a combination thereof, etc. Specifically, the acquisition of text content can be obtained by crawling from a large number of web pages through existing crawling technology, or it can also be obtained according to business needs, product needs or other application scenarios.
[0050] In one embodiment, the text content to be detected is at least one of Chinese text content to be detected, English text content to be detected, and a character string to be detected.
[0051] The Chinese text content to be detected refers to Chinese text content, which is composed of Chinese characters, and the English text content to be detected refers to English text content, which is composed of uppercase and lowercase letters. The character string to be detected refers to a character string, which is a set of characters, including letters, numbers, operation symbols, punctuation marks and other symbols, as well as some functional symbols. The character string can be English text content, or it can be text content composed of English and numbers, such as articles, news, comments, etc.
[0052] Step 204, determining the current detection object from the text content to be detected.
[0053] Among them, the current detection object here is the detection object currently being used for detection in the text content to be detected, and the current detection object can be determined from the text content to be detected according to business needs, product needs or actual application scenarios. Among them, if the text content to be detected is the Chinese text content to be detected, the current detection object can be the target Chinese characters, if the text content to be detected is the English text content to be detected, then the current detection object can be the target English word, similarly, if the text content to be detected is the string to be detected, then the current detection object can be the target English letter or target number, etc. Among them, the text content to be detected can be obtained by the detection object, and the detection object can be Chinese characters, English words, English letters or numbers, etc.
[0054] For example, if the text content to be detected is Chinese text content to be detected, the detection object can be each Chinese character. If the text content to be detected is English text content to be detected, the detection object can be each English word. If the text content to be detected is a string to be detected, the detection object can be each English letter or number, etc. That is, the detection object can be understood as the constituent elements of the text content to be detected.
[0055] Specifically, after obtaining the text content to be detected, the current detection object can be determined from the text content to be detected, wherein the method for determining the current detection object can be customized. The customization can be to randomly determine a detection object from the text content to be detected as the current detection object, or to determine the current detection object from the text content to be detected based on business needs, actual application scenarios or product needs. The customization can also be to determine the detection objects in the text content to be detected as the current detection object in turn.
[0056] Step 206 , performing feature processing on the text content to be detected according to the current detection object, and obtaining a current position distance feature set corresponding to the text content to be detected.
[0057] The current position distance feature set here is a set of current position distance features corresponding to the current detection object in the text content to be detected. The current position distance feature corresponding to the current detection object is the position distance feature between all the current detection objects in the text content to be detected, and the specific position of each current detection object in the text content to be detected can be determined according to the current position distance feature.
[0058] Among them, the feature processing of the text content to be detected according to the current detection object can be specifically, obtaining the current position corresponding to each current detection object in the text content to be detected, and calculating the corresponding current position distance feature according to the current position corresponding to each current detection object, so as to obtain the current position distance feature set corresponding to the text content to be detected. Specifically, it can be, obtaining the first position of the current detection object in the text content to be detected, traversing each detection object in the text content to be detected according to a specified order, obtaining the previous current detection object corresponding to the current detection object corresponding to the first position in the text content to be detected, obtaining the second position of the previous current detection object in the text content to be detected, and finally calculating the current position distance feature of the current detection object according to the first position and the second position, further, obtaining the next current detection object from the text content to be detected, determining the next current detection object as the current detection object, returning to the step of traversing the text content to be detected according to the specified order until the current position distance feature corresponding to each current detection object is obtained, and finally the current position distance feature set corresponding to the text content to be detected can be generated according to the current position distance feature corresponding to each current detection object.
[0059] Among them, generating a current position distance feature set corresponding to the text content to be detected based on the current position distance features corresponding to each current object to be detected can specifically be to arrange each current position distance feature according to the order of each current object to be detected in the text content to be detected, and then generate a current position distance feature set.
[0060] Step 208, obtaining candidate text content, performing feature processing on the candidate text content according to the current detection object, and obtaining a candidate position distance feature set corresponding to the candidate text content.
[0061] The candidate text content is a standard text content used to detect the text content to be detected, and the candidate text content can be determined according to business requirements, actual application scenarios or product requirements. The candidate text content can also be crawled from a large number of web pages according to existing crawling technology.
[0062] After obtaining the candidate text content, feature processing can be performed on the candidate text content according to the current detection object to obtain a candidate position distance feature set corresponding to the candidate text content. Feature processing can be performed on the candidate text content according to the current detection object, which can be to obtain the current candidate position corresponding to each current detection object in the candidate text content, and calculate the corresponding current position distance feature according to the current candidate position corresponding to each current detection object, thereby obtaining a candidate position distance feature set corresponding to the candidate text content.
[0063] Specifically, it can be, obtaining the third position of the current detection object in the candidate text content, traversing each detection object in the candidate text content according to the specified order, obtaining the previous current detection object corresponding to the third position in the candidate text content, obtaining the fourth position of the previous current detection object in the candidate text content, and finally calculating the current candidate position distance feature of the current detection object according to the third position and the fourth position, further obtaining the next current detection object from the candidate text content, determining the next current detection object as the current detection object, returning to the step to traverse the candidate text content according to the specified order until the current candidate position distance feature corresponding to each current object to be detected is obtained. Finally, a candidate position distance feature set corresponding to the candidate text content can be generated according to the current candidate position distance feature corresponding to each current object to be detected.
[0064] Among them, generating a candidate position distance feature set corresponding to the candidate text content according to the current position distance features corresponding to each current object to be detected can specifically be to arrange each current candidate position distance feature according to the order of each current object to be detected in the candidate text content, and then generate a candidate position distance feature set.
[0065] Step 210: Determine a detection method for the text content to be detected based on the current position distance feature set and the candidate position distance feature set.
[0066] Specifically, after obtaining the current position distance feature set and the candidate position distance feature set, the detection mode of the text content to be detected can be determined according to the two. Specifically, it can be that the detection mode of the text content to be detected is determined according to whether the current position distance feature set and the candidate position distance feature set match. If the current position distance feature set matches the candidate position distance feature set, it can be determined that the detection mode of the text content to be detected is to detect each detection object in the text to be detected one by one. On the contrary, if the current position distance feature set does not match the candidate position distance feature set, it can be determined that the detection mode of the text content to be detected is not to detect the text content to be detected. Therefore, before the text content to be detected detects the detection object one by one, the corresponding detection mode of the text content to be detected is determined according to the position distance feature of the current detection object of the text content to be detected, which can reduce the invalid detection of the text content, thereby improving the detection efficiency of the text content.
[0067] Among them, according to whether the current position distance feature set and the candidate position distance feature set match, specifically, it can be that the current position distance features in the current position distance feature set are compared to see whether the same position distance features exist in the candidate position distance feature set, and the positions of the current position distance features in the current position distance feature set are the same as those in the candidate position distance feature set, then it can be determined that the current position distance feature set matches the candidate position distance feature set; conversely, if the current position distance features in the current position distance feature set do not have the same position distance features in the candidate position distance feature set, or the positions of the current position distance features in the current position distance feature set are different from those in the candidate position distance feature set, then it can be determined that the current position distance feature set does not match the candidate position distance feature set.
[0068] In the above-mentioned method for determining the text content detection method, the text content to be detected is obtained; the current detection object is determined from the text content to be detected; the text content to be detected is subjected to feature processing according to the current detection object to obtain a current position distance feature set corresponding to the text content to be detected; the candidate text content is obtained, and the candidate text content is subjected to feature processing according to the current detection object to obtain a candidate position distance feature set corresponding to the candidate text content; the detection method of the text content to be detected is determined according to the current position distance feature set and the candidate position distance feature set. Therefore, before the text content to be detected is detected one by one, the corresponding detection method of the text content to be detected can be determined according to the position distance feature of the current detection object of the text content to be detected and the candidate position distance feature of the candidate text content, and then the text content to be detected is detected according to the detection method, which can reduce invalid detection of text content, thereby improving the detection efficiency of text content.
[0069] In one embodiment, Figure 3 As shown, feature processing is performed on the text content to be detected according to the current detection object to obtain a current position distance feature set corresponding to the text content to be detected, including:
[0070] Step 302, obtaining the first position of the current detection object in the text content to be detected.
[0071] Step 304, traverse the text content to be detected according to the specified order, and obtain the previous current detection object in the text content to be detected.
[0072] Step 306, obtaining the second position of the previous current detection object in the text content to be detected.
[0073] Step 308: Calculate the distance feature of the current position of the current detection object in the text content to be detected based on the first position and the second position.
[0074] Among them, the current detection object here is the detection object currently being used for detection in the text content to be detected, and the current detection object can be determined from the text content to be detected according to business needs, product needs or actual application scenarios. Among them, if the text content to be detected is the Chinese text content to be detected, the current detection object can be the target Chinese characters, if the text content to be detected is the English text content to be detected, then the current detection object can be the target English word, similarly, if the text content to be detected is the string to be detected, then the current detection object can be the target English letter or target number, etc. Among them, the text content to be detected can be obtained by the detection object, and the detection object can be Chinese characters, English words, English letters or numbers, etc.
[0075] Specifically, the first position of the current detection object in the text content to be detected is obtained, where the first position refers to the position of the current detection object in the text content to be detected, and then each detection object in the text content to be detected is traversed in a specified order, wherein the specified order is determined according to business needs, product needs or actual application scenarios. For example, the specified order can be to take the first detection object in the text content to be detected as the starting point and traverse the text content to be detected backward.
[0076] Further, by traversing each detection object of the text content to be detected, the last current detection object in the text content to be detected is obtained, wherein the last current detection object here is relative to the current detection object, and the last current detection object can be the same as the current detection object, but the last current detection object is located before the current detection object in the text content to be detected. At the same time, the second position of the last current detection object in the text content to be detected is obtained, and the second position here is used to describe the position of the last current detection object in the text content to be detected. Finally, the current position distance feature of the current detection object in the text content to be detected can be calculated based on the first position and the second position, and specifically, the absolute value of the position difference between the first position and the second position can be determined as the current position distance feature of the current detection object in the text content to be detected.
[0077] Step 310, obtain the next current detection object, determine the next current detection object as the current detection object, return to the step of traversing the text content to be detected according to the specified order, until the current position distance features corresponding to each current detection object are obtained.
[0078] Step 312: Generate a current position distance feature set corresponding to the text content to be detected based on the current position distance features corresponding to each current object to be detected.
[0079] Specifically, after obtaining the current position distance feature corresponding to the current detection object, the next current detection object is obtained, wherein the next current detection object may be relative to the current detection object, and the next current detection object may be the same as the current detection object, but the next current detection object is located after the current detection object in the text content to be detected. Further, the next current detection object is determined as the current detection object, and the return step traverses the text content to be detected according to the specified order until the current position distance features corresponding to each current object to be detected are obtained.
[0080] For example, the text content to be detected is: abcdabcaba, and the current detection object is the second a. Since the current detection object is located at the fifth position in the text content to be detected, the first position of the current detection object can be obtained as: 5. At the same time, the previous current detection object of the current detection object is obtained as the first a. Since the previous current detection object is located at the first position in the text content to be detected, the second position of the previous current detection object can be obtained as: 1. Finally, the current position distance feature of the current detection object in the text content to be detected is calculated based on the first position and the second position as: 4. Further, the next current detection object is obtained as the third a, and the next current detection object is determined as the current detection object, and its corresponding first position is obtained as: 8. The previous current detection object corresponding to the current detection object is obtained as the second a, and its second position is: 5. The current position distance feature of the current detection object can be determined as: 3. By analogy, it can be known that the current position distance feature set corresponding to the text content to be detected is: [4,3,2].
[0081] In one embodiment, Figure 4 As shown, feature processing is performed on the candidate text content according to the current detection object to obtain a candidate position distance feature set corresponding to the candidate text content, including:
[0082] Step 402, obtaining the third position of the current detection object in the candidate text content.
[0083] Step 404, traverse the candidate text content according to the specified order, and obtain the previous current detection object in the candidate text content.
[0084] Step 406, obtaining the fourth position of the previous currently detected object in the candidate text content.
[0085] Step 408, calculating the distance feature of the current candidate position of the current detection object in the candidate text content according to the third position and the fourth position.
[0086] Specifically, the third position of the current detection object in the candidate text content is obtained, where the third position refers to the position of the current detection object in the candidate text content, and then each detection object in the candidate text content is traversed in a specified order, wherein the specified order is determined according to business needs, product needs or actual application scenarios. For example, the specified order can be to start from the first detection object of the candidate text content and traverse the candidate text content backward.
[0087] Further, by traversing each detection object of the candidate text content, obtain the last current detection object in the candidate text content, wherein the last current detection object here is relative to the current detection object, and the last current detection object can be the same as the current detection object, but the last current detection object is located before the current detection object in the candidate text content. At the same time, obtain the fourth position of the last current detection object in the candidate text content, and the fourth position here is used to describe the position of the last current detection object in the candidate text content. Finally, the current position distance feature of the current detection object in the candidate text content can be calculated according to the third position and the fourth position, and specifically can be that the absolute value of the position difference between the third position and the fourth position can be determined as the current position distance feature of the current detection object in the candidate text content.
[0088] Step 410, obtain the next current detection object, determine the next current detection object as the current detection object, return to the step of traversing the candidate text content according to the specified order, until the current candidate position distance features corresponding to each current object to be detected are obtained.
[0089] Step 412: Generate a candidate position distance feature set corresponding to the candidate text content according to the current position distance features corresponding to each current object to be detected.
[0090] Specifically, after obtaining the current position distance feature corresponding to the current detection object, the next current detection object is obtained, wherein the next current detection object may be relative to the current detection object, and the next current detection object may be the same as the current detection object, but the next current detection object is located after the current detection object in the candidate text content. Further, the next current detection object is determined as the current detection object, and the step of returning to traverse the candidate text content according to the specified order until the current position distance features corresponding to each current object to be detected are obtained.
[0091] For example, the candidate text content is: abcdabca, the current detection object is the second a, where, since the current detection object is located at the fifth position in the candidate text content, the third position of the current detection object can be obtained as: 5, and at the same time, the previous current detection object of the current detection object is obtained as the first a, and since the previous current detection object is located at the first position in the candidate text content, the fourth position of the previous current detection object can be obtained as: 1. Finally, according to the third position and the fourth position, the current position distance feature of the current detection object in the candidate text content is calculated as: 4. Further, the next current detection object is obtained as the third a, and the next current detection object is determined as the current detection object, and its corresponding third position is obtained as: 8, and the previous current detection object corresponding to the current detection object is obtained as the second a, and its fourth position is: 5, and the current position distance feature of the current detection object can be determined as: 3, and so on, it can be known that the current position distance feature set corresponding to the candidate text content is: [4,3].
[0092] In one embodiment, Figure 5 As shown, the detection method of the text content to be detected is determined according to the current position distance feature set and the candidate position distance feature set, including:
[0093] Step 502: When the current position distance feature set matches the candidate position distance feature set, a detection method for the text content to be detected is determined to detect each detection object in the text content to be detected one by one.
[0094] Step 504: When the current position distance feature set does not match the candidate position distance feature set, determining that the detection method for the text content to be detected is not to detect the text content to be detected.
[0095] Specifically, after obtaining the current position distance feature set and the candidate position distance feature set, the detection mode of the text content to be detected can be determined according to the two. Specifically, it can be that the detection mode of the text content to be detected is determined according to whether the current position distance feature set and the candidate position distance feature set match. If the current position distance feature set matches the candidate position distance feature set, it can be determined that the detection mode of the text content to be detected is to detect each detection object in the text to be detected one by one. On the contrary, if the current position distance feature set does not match the candidate position distance feature set, it can be determined that the detection mode of the text content to be detected is not to detect the text content to be detected. Therefore, before the text content to be detected detects the detection object one by one, the corresponding detection mode of the text content to be detected is determined according to the position distance feature of the current detection object of the text content to be detected, which can reduce the invalid detection of the text content, thereby improving the detection efficiency of the text content.
[0096] Among them, according to whether the current position distance feature set and the candidate position distance feature set match, specifically, it can be that the current position distance features in the current position distance feature set are compared to see whether the same position distance features exist in the candidate position distance feature set, and the positions of the current position distance features in the current position distance feature set are the same as those in the candidate position distance feature set, then it can be determined that the current position distance feature set matches the candidate position distance feature set; conversely, if the current position distance features in the current position distance feature set do not have the same position distance features in the candidate position distance feature set, or the positions of the current position distance features in the current position distance feature set are different from those in the candidate position distance feature set, then it can be determined that the current position distance feature set does not match the candidate position distance feature set.
[0097] For example, the current position distance feature set is: [4, 2], and the candidate position distance feature set is; [4, 2, 3, 6]. Since the current position distance features 4 and 2 in the current position distance feature set have the same position distance features in the candidate position distance feature set, and the positions of 4 and 2 in the current position distance feature set are the same as 4 and 2 in the candidate position distance feature set, it can be determined that the current position distance feature set matches the candidate position distance feature set.
[0098] For another example, the current position distance feature set is: [4,2], and the candidate position distance feature set is; [4,3,2,6]. Since the current position distance features 4 and 2 in the current position distance feature set have the same position distance features in the candidate position distance feature set, but the positions of 4 and 2 in the current position distance feature set are different from 4 and 2 in the candidate position distance feature set, and the position distance feature corresponding to the third position in the candidate position distance feature is not 2 but 3, it can be determined that the current position distance feature set does not match the candidate position distance feature set.
[0099] In one embodiment, Figure 6 As shown, before performing feature processing on the candidate text content according to the current detection object, it also includes:
[0100] Step 602: Detect whether there is a detection object identical to the current detection object in the candidate text content.
[0101] Step 604, when there is no detection object identical to the current detection object in the candidate text content, return to the step of determining the current detection object from the text content to be detected and redetermine the current detection object until a detection object identical to the current detection object is detected in the candidate text content.
[0102] Step 606, when there is a detection object identical to the current detection object in the candidate text content, enter the step of performing feature processing on the candidate text content according to the current detection object.
[0103] Wherein, before feature processing is performed on the candidate text content according to the current detection object, it is necessary to detect whether there is a detection object identical to the current detection object in the candidate text content. If there is no detection object identical to the current detection object in the candidate text content, feature processing cannot be performed on the candidate text content according to the current detection object. When there is a detection object identical to the current detection object in the candidate text content, feature processing can be performed on the candidate text content according to the current detection object. Specifically, detecting whether there is a detection object identical to the current detection object in the candidate text content can be performed by traversing each detection object in the candidate text content one by one. If the detection object identical to the current detection object is traversed, it can be determined that there is a detection object identical to the current detection object in the candidate text content. Conversely, if the detection object identical to the current detection object is not traversed, it can be determined that there is no detection object identical to the current detection object in the candidate text content.
[0104] Furthermore, when there is no detection object identical to the current detection object in the candidate text content, the step of determining the current detection object from the text content to be detected is returned to redetermine the current detection object, and the current detection object is determined again until the detection object identical to the current detection object is detected in the candidate text content, and then the step of performing feature processing on the candidate text content according to the current detection object can be entered. Among them, when there is a detection object identical to the current detection object in the candidate text content, the step of performing feature processing on the candidate text content according to the current detection object can be directly entered.
[0105] In a specific embodiment, a method for determining a text content detection mode is provided, which specifically includes the following steps:
[0106] 1. Obtain the text content to be detected, wherein the text content to be detected is at least one of the Chinese text content to be detected, the English text content to be detected, and the character string to be detected.
[0107] 2. Determine the current detection object from the text content to be detected.
[0108] 3. Detect whether there is a detection object that is the same as the current detection object in the candidate text content.
[0109] 4. When there is no detection object identical to the current detection object in the candidate text content, return to step 2 until a detection object identical to the current detection object is detected in the candidate text content.
[0110] 5. When there is a detection object that is the same as the current detection object in the candidate text content, go to step 6.
[0111] 6. Perform feature processing on the text content to be detected according to the current detection object to obtain the current position distance feature set corresponding to the text content to be detected.
[0112] 6-1. Obtain the first position of the current detection object in the text content to be detected.
[0113] 6-2. Traverse the text content to be detected according to the specified order and obtain the previous current detection object in the text content to be detected.
[0114] 6-3. Obtain the second position of the previous currently detected object in the text content to be detected.
[0115] 6-4. Calculate the current position distance feature of the current detection object in the text content to be detected based on the first position and the second position.
[0116] 6-5. Get the next current detection object, determine the next current detection object as the current detection object, return to the step to traverse the text content to be detected according to the specified order, until the current position distance features corresponding to each current detection object are obtained.
[0117] 6-6. Generate a current position distance feature set corresponding to the text content to be detected based on the current position distance features corresponding to each current object to be detected.
[0118] 7. Obtain the candidate text content, perform feature processing on the candidate text content according to the current detection object, and obtain a candidate position distance feature set corresponding to the candidate text content.
[0119] 7-1. Obtain the third position of the current detection object in the candidate text content.
[0120] 7-2. Traverse the candidate text content in the specified order and obtain the previous current detection object in the candidate text content.
[0121] 7-3. Get the fourth position of the previous currently detected object in the candidate text content.
[0122] 7-4. Calculate the current candidate position distance feature of the current detection object in the candidate text content based on the third position and the fourth position.
[0123] 7-5. Get the next current detection object, determine the next current detection object as the current detection object, return to the step to traverse the candidate text content according to the specified order, until the current candidate position distance features corresponding to each current object to be detected are obtained.
[0124] 7-6. Generate a candidate position distance feature set corresponding to the candidate text content based on the current position distance features corresponding to each current object to be detected.
[0125] 8. Determine the detection method of the text content to be detected based on the current position distance feature set and the candidate position distance feature set.
[0126] 8-1. When the current position distance feature set matches the candidate position distance feature set, the detection method of the text content to be detected is determined to detect each detection object in the text content to be detected one by one.
[0127] 8-2. When the current position distance feature set does not match the candidate position distance feature set, the detection method of the to-be-detected text content is determined as not to detect the to-be-detected text content.
[0128] It should be understood that, although the various steps in the above-mentioned flow chart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the above-mentioned flow chart may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0129] In one embodiment, Figure 7 As shown, a text content detection method determination device 700 is provided, comprising: a text content acquisition module 702, a detection object determination module 704, a text content processing module 706, a candidate text content processing module 708 and a detection method determination module 710, wherein:
[0130] The text content acquisition module 702 is used to acquire the text content to be detected.
[0131] The detection object determination module 704 is used to determine the current detection object from the text content to be detected.
[0132] The text content processing module 706 is used to perform feature processing on the text content to be detected according to the current detection object, and obtain a current position distance feature set corresponding to the text content to be detected.
[0133] The candidate text content processing module 708 is used to obtain the candidate text content, perform feature processing on the candidate text content according to the current detection object, and obtain a candidate position distance feature set corresponding to the candidate text content.
[0134] The detection mode determination module 710 is used to determine the detection mode of the text content to be detected according to the current position distance feature set and the candidate position distance feature set.
[0135] In one embodiment, the text content processing module 706 is also used to obtain the first position of the current detection object in the text content to be detected, traverse the text content to be detected according to a specified order, obtain the previous current detection object in the text content to be detected, obtain the second position of the previous current detection object in the text content to be detected, calculate the current position distance feature of the current detection object in the text content to be detected according to the first position and the second position, obtain the next current detection object, determine the next current detection object as the current detection object, return to the step of traversing the text content to be detected according to the specified order until the current position distance feature corresponding to each current object to be detected is obtained, and generate a current position distance feature set corresponding to the text content to be detected according to the current position distance feature corresponding to each current object to be detected.
[0136] In one embodiment, the candidate text content processing module 708 is also used to obtain the third position of the current detection object in the candidate text content, traverse the candidate text content according to a specified order, obtain the previous current detection object in the candidate text content, obtain the fourth position of the previous current detection object in the candidate text content, calculate the current candidate position distance feature of the current detection object in the candidate text content according to the third position and the fourth position, obtain the next current detection object, determine the next current detection object as the current detection object, return to the step of traversing the candidate text content according to the specified order until the current candidate position distance feature corresponding to each current object to be detected is obtained, and generate a candidate position distance feature set corresponding to the candidate text content according to the current position distance feature corresponding to each current object to be detected.
[0137] In one embodiment, the detection method determination module 710 is also used to determine that the detection method of the text content to be detected is to detect each detection object in the text content to be detected one by one when the current position distance feature set matches the candidate position distance feature set, and when the current position distance feature set does not match the candidate position distance feature set, determine that the detection method of the text content to be detected is not to detect the text content to be detected.
[0138] In one embodiment, the text content detection method determination device 700 is also used to detect whether there is a detection object that is the same as the current detection object in the candidate text content. When there is no detection object that is the same as the current detection object in the candidate text content, it returns to the detection object determination module 704 to determine the current detection object from the text content to be detected and redetermine the current detection object until it is detected that there is a detection object that is the same as the current detection object in the candidate text content. When there is a detection object that is the same as the current detection object in the candidate text content, it enters the step of entering the candidate text content processing module 708 to perform feature processing on the candidate text content according to the current detection object.
[0139] For the specific limitations of the device for determining the text content detection method, please refer to the limitations of the method for determining the text content detection method in the above text, which will not be repeated here. The various modules in the above-mentioned device for determining the text content detection method can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0140] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 8 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store candidate text content. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for determining a text content detection mode is implemented.
[0141] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig. 9As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for determining a text content detection mode is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0142] Those skilled in the art will understand that Figure 8 or Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0143] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented: obtaining text content to be detected; determining a current detection object from the text content to be detected; performing feature processing on the text content to be detected according to the current detection object to obtain a current position distance feature set corresponding to the text content to be detected; obtaining candidate text content, performing feature processing on the candidate text content according to the current detection object to obtain a candidate position distance feature set corresponding to the candidate text content; and determining a detection method for the text content to be detected according to the current position distance feature set and the candidate position distance feature set.
[0144] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining the first position of the current detection object in the text content to be detected; traversing the text content to be detected according to a specified order to obtain the previous current detection object in the text content to be detected; obtaining the second position of the previous current detection object in the text content to be detected; calculating the current position distance feature of the current detection object in the text content to be detected according to the first position and the second position; obtaining the next current detection object, determining the next current detection object as the current detection object, returning to the step of traversing the text content to be detected according to the specified order until the current position distance feature corresponding to each current object to be detected is obtained; generating a current position distance feature set corresponding to the text content to be detected according to the current position distance feature corresponding to each current object to be detected.
[0145] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining the third position of the current detection object in the candidate text content; traversing the candidate text content according to a specified order to obtain the previous current detection object in the candidate text content; obtaining the fourth position of the previous current detection object in the candidate text content; calculating the current candidate position distance feature of the current detection object in the candidate text content according to the third position and the fourth position; obtaining the next current detection object, determining the next current detection object as the current detection object, returning to the step of traversing the candidate text content according to the specified order until the current candidate position distance feature corresponding to each current object to be detected is obtained; generating a candidate position distance feature set corresponding to the candidate text content according to the current position distance feature corresponding to each current object to be detected.
[0146] In one embodiment, when the processor executes the computer program, the following steps are also implemented: when the current position distance feature set matches the candidate position distance feature set, the detection method of the text content to be detected is determined as performing detection on each detection object in the text content to be detected one by one; when the current position distance feature set does not match the candidate position distance feature set, the detection method of the text content to be detected is determined as not performing detection on the text content to be detected.
[0147] In one embodiment, when the processor executes the computer program, the following steps are also implemented: detecting whether there is a detection object identical to the current detection object in the candidate text content; when there is no detection object identical to the current detection object in the candidate text content, returning to the step of determining the current detection object from the text content to be detected and redetermining the current detection object until it is detected that there is a detection object identical to the current detection object in the candidate text content; when there is a detection object identical to the current detection object in the candidate text content, entering the step of performing feature processing on the candidate text content according to the current detection object.
[0148] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: obtaining text content to be detected; determining a current detection object from the text content to be detected; performing feature processing on the text content to be detected according to the current detection object to obtain a current position distance feature set corresponding to the text content to be detected; obtaining candidate text content, performing feature processing on the candidate text content according to the current detection object to obtain a candidate position distance feature set corresponding to the candidate text content; and determining a detection method for the text content to be detected based on the current position distance feature set and the candidate position distance feature set.
[0149] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining the first position of the current detection object in the text content to be detected; traversing the text content to be detected according to a specified order to obtain the previous current detection object in the text content to be detected; obtaining the second position of the previous current detection object in the text content to be detected; calculating the current position distance feature of the current detection object in the text content to be detected according to the first position and the second position; obtaining the next current detection object, determining the next current detection object as the current detection object, returning to the step of traversing the text content to be detected according to the specified order until the current position distance feature corresponding to each current object to be detected is obtained; generating a current position distance feature set corresponding to the text content to be detected according to the current position distance feature corresponding to each current object to be detected.
[0150] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining the third position of the current detection object in the candidate text content; traversing the candidate text content according to a specified order to obtain the previous current detection object in the candidate text content; obtaining the fourth position of the previous current detection object in the candidate text content; calculating the current candidate position distance feature of the current detection object in the candidate text content according to the third position and the fourth position; obtaining the next current detection object, determining the next current detection object as the current detection object, returning to the step of traversing the candidate text content according to the specified order until the current candidate position distance feature corresponding to each current object to be detected is obtained; generating a candidate position distance feature set corresponding to the candidate text content according to the current position distance feature corresponding to each current object to be detected.
[0151] In one embodiment, when the processor executes the computer program, the following steps are also implemented: when the current position distance feature set matches the candidate position distance feature set, the detection method of the text content to be detected is determined as performing detection on each detection object in the text content to be detected one by one; when the current position distance feature set does not match the candidate position distance feature set, the detection method of the text content to be detected is determined as not performing detection on the text content to be detected.
[0152] In one embodiment, when the processor executes the computer program, the following steps are also implemented: detecting whether there is a detection object identical to the current detection object in the candidate text content; when there is no detection object identical to the current detection object in the candidate text content, returning to the step of determining the current detection object from the text content to be detected and redetermining the current detection object until it is detected that there is a detection object identical to the current detection object in the candidate text content; when there is a detection object identical to the current detection object in the candidate text content, entering the step of performing feature processing on the candidate text content according to the current detection object.
[0153] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0154] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0155] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for determining a text content detection mode, characterized in that: The method comprises: Obtaining text content to be detected, wherein the text content to be detected is at least one of Chinese text content to be detected, English text content to be detected, and character string to be detected; the Chinese text content to be detected refers to Chinese text content, and the text content is composed of Chinese characters; the English text content to be detected refers to English text content, and the text content is composed of uppercase and lowercase letters; the character string to be detected refers to a character string composed of a string of characters, and the characters include letters, numbers, operation symbols, punctuation marks, other symbols and functional symbols; Determine the current detection object from the text content to be detected; wherein, if the text content to be detected is the Chinese text content to be detected, the current detection object is the target Chinese character, if the text content to be detected is the English text content to be detected, the current detection object is the target English word, if the text content to be detected is the character string to be detected, the current detection object is the target English letter, number, operation symbol, punctuation mark, other symbol or functional symbol; Performing feature processing on the text content to be detected according to the current detection object to obtain a current position distance feature set corresponding to the text content to be detected; Acquire candidate text content, perform feature processing on the candidate text content according to the current detection object, and obtain a candidate position distance feature set corresponding to the candidate text content; wherein the candidate text content is a standard text content used to detect the text content to be detected; Determining a detection method for the text content to be detected according to the current position distance feature set and the candidate position distance feature set; The method of determining the detection method of the text content to be detected according to the current position distance feature set and the candidate position distance feature set includes: When the current position distance feature set matches the candidate position distance feature set, determining that the detection method of the to-be-detected text content is to detect each detection object in the to-be-detected text content one by one; When the current position distance feature set does not match the candidate position distance feature set, determining that the detection method of the to-be-detected text content is not to detect the to-be-detected text content; Wherein, if each of the current position distance features in the current position distance feature set has the same position distance feature in the candidate position distance feature set, and the position of each of the current position distance features in the current position distance feature set is the same as the position in the candidate position distance feature set, then it indicates that the current position distance feature set matches the candidate position distance feature set; The step of performing feature processing on the text content to be detected according to the current detection object to obtain a current position distance feature set corresponding to the text content to be detected includes: Obtaining the first position of the current detection object in the text content to be detected; Traverse the text content to be detected according to a specified order, and obtain the previous current detection object in the text content to be detected; Obtaining a second position of the previous currently detected object in the text content to be detected; Calculate the current position distance feature of the current detection object in the text content to be detected according to the first position and the second position; Obtaining a next current detection object, determining the next current detection object as the current detection object, and returning to the step of traversing the text content to be detected according to the specified order until the current position distance features corresponding to each current detection object are obtained; A current position distance feature set corresponding to the text content to be detected is generated according to the current position distance features corresponding to each current object to be detected.
2. The method according to claim 1, characterized in that: The step of performing feature processing on the candidate text content according to the current detection object to obtain a candidate position distance feature set corresponding to the candidate text content includes: Obtaining a third position of the current detection object in the candidate text content; Traverse the candidate text content according to a specified order to obtain the previous current detection object in the candidate text content; Obtaining the fourth position of the previous currently detected object in the candidate text content; Calculate the distance feature of the current candidate position of the current detection object in the candidate text content according to the third position and the fourth position; Obtaining a next current detection object, determining the next current detection object as the current detection object, and returning to the step of traversing the candidate text content according to the specified order until the current candidate position distance features corresponding to each current object to be detected are obtained; A candidate position distance feature set corresponding to the candidate text content is generated according to the current position distance features corresponding to each current object to be detected.
3. The method according to claim 1, characterized in that Before performing feature processing on the candidate text content according to the current detection object, the method further includes: Detecting whether there is a detection object identical to the current detection object in the candidate text content; When there is no detection object identical to the current detection object in the candidate text content, returning to the step of determining the current detection object from the text content to be detected to redetermine the current detection object until a detection object identical to the current detection object is detected in the candidate text content; When there is a detection object identical to the current detection object in the candidate text content, the step of performing feature processing on the candidate text content according to the current detection object is entered.
4. A device for determining a text content detection method, characterized in that: The device comprises: A text content acquisition module, used to acquire text content to be detected, wherein the text content to be detected is at least one of Chinese text content to be detected, English text content to be detected, and character string to be detected; the Chinese text content to be detected refers to Chinese text content, and the text content is composed of Chinese characters; the English text content to be detected refers to English text content, and the text content is composed of uppercase and lowercase letters; the character string to be detected refers to a character string composed of a string of characters, and the characters include letters, numbers, operation symbols, punctuation marks, other symbols and functional symbols; A detection object determination module, used to determine the current detection object from the text content to be detected; wherein, if the text content to be detected is the Chinese text content to be detected, the current detection object is the target Chinese character, if the text content to be detected is the English text content to be detected, the current detection object is the target English word, if the text content to be detected is the character string to be detected, the current detection object is the target English letter, number, operation symbol, punctuation mark, other symbol or functional symbol; A text content processing module, used for performing feature processing on the text content to be detected according to the current detection object, to obtain a current position distance feature set corresponding to the text content to be detected; A candidate text content processing module is used to obtain candidate text content, perform feature processing on the candidate text content according to the current detection object, and obtain a candidate position distance feature set corresponding to the candidate text content; wherein the candidate text content is a standard text content used to detect the text content to be detected; A detection mode determination module, used to determine the detection mode of the text content to be detected according to the current position distance feature set and the candidate position distance feature set; The detection mode determination module is further used to determine that the detection mode of the text content to be detected is to detect each detection object in the text content to be detected one by one when the current position distance feature set matches the candidate position distance feature set; When the current position distance feature set does not match the candidate position distance feature set, determining that the detection method of the to-be-detected text content is not to detect the to-be-detected text content; Wherein, if each of the current position distance features in the current position distance feature set has the same position distance feature in the candidate position distance feature set, and the position of each of the current position distance features in the current position distance feature set is the same as the position in the candidate position distance feature set, then it indicates that the current position distance feature set matches the candidate position distance feature set; The text content processing module is further used to obtain the first position of the current detection object in the text content to be detected; Traverse the text content to be detected according to a specified order, and obtain the previous current detection object in the text content to be detected; Obtaining a second position of the previous currently detected object in the text content to be detected; Calculate the current position distance feature of the current detection object in the text content to be detected according to the first position and the second position; Obtaining a next current detection object, determining the next current detection object as the current detection object, and returning to the step of traversing the text content to be detected according to the specified order until the current position distance features corresponding to each current detection object are obtained; A current position distance feature set corresponding to the text content to be detected is generated according to the current position distance features corresponding to each current object to be detected.
5. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 3 are implemented.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 3 are implemented.
