Supercharge Your Innovation With Domain-Expert AI Agents!

Prefix tree processing method and device, terminal and storage medium

A processing method and prefix technology, applied in the database field, can solve the problem of inability to adjust the dictionary tree, and achieve the effect of improving the generation speed

Pending Publication Date: 2022-06-28
AGRICULTURAL BANK OF CHINA
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, for keywords consisting of eight characters, when using a dictionary tree for keyword storage, the dictionary tree cannot be dynamically adjusted

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
  • Prefix tree processing method and device, terminal and storage medium
  • Prefix tree processing method and device, terminal and storage medium
  • Prefix tree processing method and device, terminal and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0020] figure 1 This is a flowchart of a method for processing a prefix tree provided in Embodiment 1 of the present invention. This embodiment is applicable to the situation of dynamically updating a prefix tree involved in database retrieval, and the method can be executed by a terminal that performs database query. The terminal may be a mobile terminal, a tablet computer, a notebook computer, a personal computer or a server. The method specifically includes the following steps:

[0021] Step 110, traverse the bytes of the keyword in sequence.

[0022] A keyword consists of multiple bytes, and storing the keyword is equivalent to storing the bytes that make up the keyword. For a key that needs to be written to the prefix tree, get each byte of the key in turn.

[0023] Step 120: Obtain the high-order four-bit data and the low-order four-bit data of the target byte, where the target byte is the byte currently traversed.

[0024] The byte of the keyword traversed by a sing...

Embodiment 2

[0063] figure 2 This is a schematic structural diagram of an apparatus for processing a prefix tree provided in Embodiment 2 of the present invention. This embodiment is applicable to the situation of dynamically updating prefix trees involved in database retrieval, and the apparatus can be implemented by a terminal that performs database query. The terminal may be a mobile terminal, a tablet computer, a notebook computer, a personal computer or a server. The apparatus specifically includes: a keyword traversal module 210 , a byte acquisition module 220 and a prefix tree traversal module 230 .

[0064] The keyword traversal module 210 is used to traverse the bytes of the keyword in sequence;

[0065] The byte acquisition module 220 is used to acquire the high four-bit data and the low four-bit data of the target byte, and the target byte is the byte currently traversed;

[0066] The prefix tree traversal module 230 is used to traverse the prefix tree according to the high f...

Embodiment 3

[0092] image 3 A schematic structural diagram of a terminal for processing a prefix tree provided in Embodiment 3 of the present invention, such as image 3 As shown, the processing terminal of the prefix tree includes a processor 30, a memory 31, an input device 32 and an output device 33; the number of processors 30 in the processing terminal of the prefix tree can be one or more, image 3 Take a processor 30 as an example in the above; the processor 30, the memory 31, the input device 32 and the output device 33 in the processing terminal of the prefix tree can be connected by a bus or in other ways, image 3 Take the connection through the bus as an example.

[0093] As a computer-readable storage medium, the memory 31 can be used to store software programs, computer-executable programs, and modules, such as program instructions / modules corresponding to the prefix tree processing method in the embodiment of the present invention (for example, a prefix tree processing app...

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 prefix tree processing method and device, a terminal and a storage medium, and relates to a prefix tree technology related to database retrieval, the method comprises the following steps: traversing bytes of keywords in sequence; obtaining high four-bit data and low four-bit data of a target byte, wherein the target byte is a currently traversed byte; and traversing in the prefix tree according to the high four-bit data and the low four-bit data, and if node missing occurs in the traversing process, inserting a corresponding node according to the high four-bit data or the low four-bit data until all bytes of the keyword are traversed. And splitting a target byte of the keyword into high four-bit data and low four-bit data. In the traversing process, if node missing occurs, namely, nodes representing high four-bit data or nodes representing low four-bit data are lacked, corresponding nodes are inserted according to the lacked high four-bit data or low four-bit data. The prefix tree is dynamically updated in the traversing process, and the generation speed of the prefix tree is increased.

Description

technical field [0001] The embodiments of the present invention relate to database technology, in particular to the prefix tree technology involved in database retrieval, and to a method, device, terminal and storage medium for processing a prefix tree. Background technique [0002] In the database of a business system with a large transaction volume, the huge amount of data will make it difficult to search for information. For character data, a dictionary tree (tire tree) is usually used to store keywords. However, for a keyword composed of eight characters, when a dictionary tree is used for keyword storage, the dictionary tree cannot be adjusted dynamically. How to insert the prefix tree quickly and dynamically has become an urgent problem to be solved. SUMMARY OF THE INVENTION [0003] The present invention provides a method, device, terminal and storage medium for processing a prefix tree, so as to realize dynamic updating of the prefix tree and improve the generati...

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
IPC IPC(8): G06F16/901G06F16/903
CPCG06F16/9027G06F16/9014G06F16/90344
Inventor 邹阳
Owner AGRICULTURAL BANK OF CHINA
Features
  • R&D
  • Intellectual Property
  • Life Sciences
  • Materials
  • Tech Scout
Why Patsnap Eureka
  • Unparalleled Data Quality
  • Higher Quality Content
  • 60% Fewer Hallucinations
Social media
Patsnap Eureka Blog
Learn More