Method and device for regular query
An algorithm and feature data technology, applied in the computer field, can solve problems such as long processing time, long query time, complex regular query, etc., and achieve the effect of reducing the number and improving query efficiency
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0026] The embodiment of the present invention provides a method for regular query, such as figure 1 As shown, the processing flow of the method may include the following steps:
[0027] Step 101, acquiring target data and multiple regular expressions for regular query, and acquiring preset feature data corresponding to each regular expression.
[0028] Step 102, among the feature data corresponding to each regular expression, select the feature data included in the target data.
[0029] Step 103, according to the regular expression corresponding to the selected feature data, perform a regular query in the target data.
[0030] In the embodiment of the present invention, the target data and a plurality of regular expressions used for regular query are obtained, and the characteristic data corresponding to each regular expression set in advance are obtained, and among the characteristic data corresponding to each regular expression, the selected target data The included featu...
Embodiment 2
[0032] An embodiment of the present invention provides a regular query method, and the subject of execution of the method may be an electronic device with a certain data processing capability, such as a server, a terminal device, and the like.
[0033] The following will combine specific processing methods for figure 1 The flow shown is described in detail, and the content can be as follows:
[0034] Step 101, acquiring target data and multiple regular expressions for regular query, and acquiring preset feature data corresponding to each regular expression.
[0035] Among them, the target data is the data used as the basis of the query in the regular query. For example, if a character matching a certain regular expression is queried in a certain text, then the text is the target data. The feature data can be used to reflect whether the target data contains data conforming to the corresponding regular expression, and can be a character string, so the feature data can also be c...
Embodiment 3
[0061] In the following, the regular query method provided by the embodiment of the present invention will be described in detail in conjunction with the specific application process, such as image 3 As shown, the following steps may be included:
[0062] In step 301, original data (that is, the above-mentioned target data) and multiple regular expressions used for regular query are acquired. The acquired regular expressions include regular expression 1, regular expression 2, and regular expression 3.
[0063] Step 302, determine the characteristic strings corresponding to each regular expression, and generate a trie dictionary tree according to each characteristic string, construct a failure pointer in the trie dictionary tree, and perform AC multi-mode matching on the original data based on the trie dictionary tree, so that each characteristic string Select the feature string contained in the original data.
[0064] The corresponding process can be found in Figure 4 , t...
PUM
Login to View More Abstract
Description
Claims
Application Information
Login to View More 


