Unlock instant, AI-driven research and patent intelligence for your innovation.

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

Active Publication Date: 2019-08-20
TENCENT TECH (SHENZHEN) CO LTD
View PDF6 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0005] Regular queries are generally more complex and take a long time to execute. When there are many regular queries to be executed, executing all regular queries one by one will lead to long processing time and low query efficiency.

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method and device for regular query
  • Method and device for regular query
  • Method and device for regular query

Examples

Experimental program
Comparison scheme
Effect test

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...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

PUM

No PUM Login to View More

Abstract

The invention discloses a method and device for regular query, and belongs to the technical field of computers. The method comprises: obtaining target data used for regular query and a plurality of regular expressions, and obtaining the characteristic data corresponding to each pre-set regular expression; in the characteristic data corresponding to each regular expression, selecting the characteristic data included in the target data; and according to the regular expression corresponding to the selected characteristic data, in the target data, performing regular query. Using the method can improve query efficiency.

Description

technical field [0001] The invention relates to the field of computer technology, in particular to a regular query method and device. Background technique [0002] With the rapid development of computer technology and network technology, conditional query technology has been widely used. Regular query is a conditional query based on regular expressions. It is a commonly used conditional query processing method. Regular expressions are a specification The description information of the query condition, for example, the regular expression " / a*b / " means to search for a string starting with a and ending with b. [0003] When performing regular queries, technicians can select or write regular expressions according to the query requirements, and then perform regular queries on the target data (also called parent strings or target strings), and query data that conforms to regular expressions in the target data , output as result data. In practical applications, when there are mul...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to View More

Application Information

Patent Timeline
no application Login to View More
Patent Type & Authority Patents(China)
IPC IPC(8): G06F16/901G06F16/9032
Inventor 闫帅帅陈曦
Owner TENCENT TECH (SHENZHEN) CO LTD