Thread-safe index dynamic updating method and system

A dynamic update and index technology, applied in the index field, can solve problems such as the inability to guarantee real-time update of the index and update thread safety

Pending Publication Date: 2022-03-04
IND BANK CO +1
View PDF1 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] In the prior art (page 77 of the periodical "Industrial Control Computer" Issue 33 in 2020 discloses "an efficient index establishment method based on lucene"), it emphasizes the rapid establishment of indexes and the optimization of index structure, although it can quickly Create an index, but it cannot guarantee the real-time update of the index and the problem of update thread safety

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
  • Thread-safe index dynamic updating method and system
  • Thread-safe index dynamic updating method and system
  • Thread-safe index dynamic updating method and system

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0049] The invention monitors the change of the index file in the directory to be indexed through the dynamic monitoring technology, compares it with the current index version and time, and judges whether the index needs to be updated.

[0050] When the index needs to be updated, this method can automatically rebuild the index and ensure that the index user can still use the index normally during the process of rebuilding the index. The thread-safe index updating method proposed by the present invention can ensure the usability and thread safety of the index in the scenario of high concurrent query when the index is dynamically changed.

[0051] According to a thread-safe index dynamic update method provided by the present invention, such as Figures 1 to 2 shown, including:

[0052] Step S1: read the index file information in the directory to be indexed;

[0053] Step S2: Initialize the index hash queue and index state set according to the index file information, and establis...

Embodiment 2

[0098] Embodiment 2 is a preferred example of embodiment 1

[0099] image 3 As an example of a dynamic index system, the thread-safe index dynamic update system provides two query methods: user access query and external system call query. After receiving user or system behavior, the system distributes the request to the index management use case through the index query use case. The index management use case maintains a dynamically changing index queue for accepting user requests and dynamically updating index information. The index update use case monitors the index update status through the index file management use case. If the index is updated, a new index will be dynamically established and the index management use case will be notified to update. The index management use case updates the index file in a thread-safe manner after receiving the notification. The system timing steps are as follows:

[0100] S1: Index file management use case reads and parses index files;...

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 provides a thread-safe dynamic index updating method and system. The thread-safe dynamic index updating method comprises the following steps: S1, reading index file information in a to-be-indexed directory; s2, initializing an index hash queue and an index state set according to the index file information, and establishing a dynamic monitoring instance; s3, the dynamic monitoring instance monitors the index change condition according to the index state set within the preset interval time, when the index is changed, the step S4 is triggered, and otherwise, dynamic monitoring continues to be carried out; and S4, checking the index hash queue, when the number of idle redundant indexes in the index hash queue is smaller than a threshold value, newly establishing an index and adding the index into the index hash queue, otherwise, directly changing the idle redundant indexes in the index hash queue.

Description

technical field [0001] The present invention relates to the technical field of indexing, in particular to a thread-safe index dynamic update method and system. Background technique [0002] As the main underlying tool of the search engine, Lucene is widely used in scenarios such as index building, query and sorting. But on the one hand, lucene cannot dynamically perceive the changes of index files, making it difficult to change index information in a timely manner. On the other hand, Lucene is not thread-safe during index rebuilding or updating, and index conflicts may occur in high-concurrency scenarios. [0003] Patent document CN106294575A (application number: 201610604450.0) discloses a method for querying forest map spot vector data based on Lucene. The method comprises the following steps: determining the grid size, converting the format of the vector data of forest map spots, and dividing the converted data into grids; establishing a full-text index for the grid-div...

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 Applications(China)
IPC IPC(8): G06F16/22G06F16/23G06F16/2457
CPCG06F16/2228G06F16/23G06F16/24578
Inventor 罗俊王锋周飞罗煜辉鲍玲
Owner IND BANK CO
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products