Regular expression generation method and data extraction method based on regular expression
A data extraction and expression technology, applied in the field of data processing, can solve the problems of affecting the efficiency of data processing, difficulty, and time-consuming, and achieve the effect of reducing the difficulty of writing and improving the efficiency of data extraction.
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0035] The embodiment of the present invention provides a method for generating a regular expression. The detection method can be applied in the field of data processing, such as data extraction, data matching and filtering, etc. Through this method, the difficulty of writing regular expressions can be reduced. At the same time, after obtaining the regular expression, extracting the same type of log files based on the regular expression can greatly improve the efficiency of data extraction. specifically, figure 1 The flow chart of the regular expression generation method provided by Embodiment 1 of the present invention, such as figure 1 As shown, the method for generating a regular expression provided in this embodiment includes the following steps S101 to S103.
[0036] Step S101: Determine the fields to be extracted and the fields not to be extracted in the original data string;
[0037] When implementing, the user can first provide a piece of raw data that needs to gener...
Embodiment 2
[0112] Based on the first embodiment above, the second embodiment of the present invention provides a data extraction method based on regular expressions, see image 3 , the regular expression-based data extraction method includes the following steps S301-S303:
[0113] S301, acquiring raw data for required data extraction;
[0114] S302, analyzing the original data to generate a corresponding regular expression;
[0115] S303, performing data extraction on the original data required for data extraction according to the generated regular expression;
[0116] Wherein, the corresponding regular expression in step S302 is generated by the regular expression generating method in the first embodiment.
[0117] In the specific implementation, an operation interface can be provided, and the user can input the sample of the required regular expression as the original data at the first designated position of the operation interface. After the background server receives t...
Embodiment 3
[0120] Corresponding to Embodiment 1 above, Embodiment 3 of the present invention provides a device for generating a regular expression. For related technical features and corresponding technical effects, refer to Embodiment 1 above, which will not be repeated here. Figure 4 The structural block diagram of the device for generating regular expressions provided by Embodiment 3 of the present invention, such as Figure 4 As shown, the generating device of the regular expression includes: a determination module 401, which is used to determine the field to be extracted and the non-extracted field in the original data character string; the first generation control module 402, for the non-extracted field, performs wildcarding Filter to obtain its regular expression, for the field to be extracted, traverse the character string to obtain its regular expression in one-to-one correspondence between characters and expressions; the second generation control module 403 is used to combi...
PUM
Abstract
Description
Claims
Application Information
- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com