CN115599886A - Method and equipment for generating search logic operator for Lucene and storage medium - Google Patents

Method and equipment for generating search logic operator for Lucene and storage medium Download PDF

Info

Publication number
CN115599886A
CN115599886A CN202211302049.3A CN202211302049A CN115599886A CN 115599886 A CN115599886 A CN 115599886A CN 202211302049 A CN202211302049 A CN 202211302049A CN 115599886 A CN115599886 A CN 115599886A
Authority
CN
China
Prior art keywords
logic
logical
node
retrieval
operator
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211302049.3A
Other languages
Chinese (zh)
Inventor
田丰
张承业
邝素颖
蓝飘
黄凯杰
蔡志坚
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
GRG Banking Equipment Co Ltd
GRG Banking IT Co Ltd
Original Assignee
GRG Banking Equipment Co Ltd
GRG Banking IT Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by GRG Banking Equipment Co Ltd, GRG Banking IT Co Ltd filed Critical GRG Banking Equipment Co Ltd
Priority to CN202211302049.3A priority Critical patent/CN115599886A/en
Publication of CN115599886A publication Critical patent/CN115599886A/en
Pending legal-status Critical Current

Links

Images

Abstract

The application discloses a method for generating a search logic operator for Lucene, which comprises the following steps: acquiring a plurality of keyword texts; responding to a logic editing operation, and determining the content and the arrangement condition of each logic node in the retrieval logic operator according to the semantic relation and the logic relation of the plurality of keyword texts, wherein the logic nodes in the retrieval logic operator comprise root nodes, branch nodes and leaf nodes; responding to input operation, and inputting the content of each logic node into a corresponding logic node in the retrieval logic operator; and responding to the generation operation, and generating the retrieval logic operator according to the arrangement condition of each logic node in the retrieval logic operator. A tree-shaped logic network can be generated according to semantic relations and logic relations existing among keyword texts input by a user, wherein each logic node contains corresponding content, and different logic nodes also have corresponding logic relations, so that the more complex logic retrieval requirements of the user can be met.

Description

Method and equipment for generating search logic operator for Lucene and storage medium
Technical Field
The application relates to the technical field of computers, in particular to a generation method, a retrieval method, retrieval equipment, computer equipment and a computer-readable storage medium for a retrieval logic operator of Lucene.
Background
Lucene is a search engine toolkit of open source code, and provides a complete query engine and an index engine.
In the Lucene using process, a user often needs to retrieve corresponding required document contents according to a specific meaning, but in the process, related technologies can only achieve the technical effect of traditional keyword retrieval matching or simple unitary AND-NOR logic operation, and are very easy to find when facing more complex requirements.
Disclosure of Invention
The application provides a generation method of a retrieval logic operator for Lucene, a retrieval method, retrieval equipment, computer equipment and a computer-readable storage medium.
The generation method for the search logic operator for the Lucene comprises the following steps:
acquiring a plurality of keyword texts;
responding to a logic editing operation, and determining the content and the arrangement condition of each logic node in the retrieval logic operator according to the semantic relation and the logic relation of the plurality of keyword texts, wherein the logic nodes in the retrieval logic operator comprise root nodes, branch nodes and leaf nodes;
responding to input operation, and inputting the content of each logic node into a corresponding logic node in the retrieval logic operator;
and responding to the generation operation, and generating the retrieval logic operator according to the arrangement condition of each logic node in the retrieval logic operator.
Therefore, a tree-shaped logic network consisting of root nodes, branch nodes and leaf nodes can be generated according to the semantic relation and the logic relation among the keyword texts input by the user, wherein each logic node comprises corresponding content, and different logic nodes have corresponding logic relation, so that the more complex logic retrieval requirements of the user can be met.
In some embodiments, the determining, in response to a logical editing operation, contents and arrangement of each logical node in the search logical operator according to the semantic relationship and the logical relationship of the plurality of keyword texts includes:
responding to content corresponding operation, and determining the content of each logic node in the retrieval logic operator according to the semantic relation and the logic relation between the keyword texts;
and responding to the logical relationship arrangement operation, and determining the arrangement condition of each logical node in the retrieval logical operator according to the logical relationship between the keyword texts.
Therefore, the logical relation which the search logical operator should include can be deduced according to the logical relation among the keyword texts, and the content of each node of the search logical operator can be deduced according to the semantic relation among the keyword texts, the semantic characteristics of the search logical operator and the logical requirements of partial keywords.
In some embodiments, the determining the content of each logical node in the search logical operator according to the semantic relationship and the logical relationship between the keyword texts in response to the content corresponding operation includes:
determining a logic algorithm determined by each father node according to the logic relationship among the keyword texts;
and determining the keyword texts contained in each leaf node and the semantic attributes and the logic attributes of the keyword texts according to the semantic relation of the keyword texts.
Therefore, the logic operation rules determined by all father nodes in the tree-shaped retrieval logic operator can be determined as the contents of the corresponding father nodes, and the keyword texts and the semantic attributes and the logic attributes required by the keyword texts are determined as the contents of each leaf node.
In some embodiments, the determining, in response to the logical relationship assignment operation and according to the logical relationship between the keyword texts, the assignment of each logical node in the search logical operator includes:
determining father nodes of all logic nodes according to the logic relation among the keyword texts, wherein the father nodes are served by root nodes or branch nodes;
and determining the arrangement sequence of all logic nodes with the same father node according to the logic relation among the keyword texts and a preset logic operation direction.
Therefore, according to the requirements of all logical relations and logical operation sequences, the arrangement conditions of all logical nodes in the retrieval logical operator can be determined.
In some embodiments, the determining the content of each logical node in the search logical operator according to the semantic relationship and the logical relationship between the keyword texts in response to the content corresponding operation further includes:
and determining a sequence algorithm determined by each father node according to the semantic relationship among the keyword texts, wherein the sequence algorithm is used for re-screening the logic operation result of each father node according to the semantic relationship among the keyword texts.
Therefore, the operation results of all the logic nodes under the same father node can be re-filtered according to the order requirements, so that the obtained calculation results are ensured to meet the user requirements.
The application also provides a retrieval method, and the retrieval logic operator generated based on the method comprises the following steps:
acquiring a text to be retrieved;
determining a text index to be retrieved according to the text to be retrieved and a preset word segmentation rule;
acquiring the retrieval logic operator;
and determining a retrieval result according to the retrieval logic operator and the text index to be retrieved.
In this way, the generated logical operator can be used to search the content of the text to be searched through the Lucene model.
In some embodiments, each entry in the text index to be retrieved includes a participle, and the entry further includes semantic attributes of the participle.
Therefore, the text to be retrieved can be divided into a plurality of participles, and the participles have the semantic attributes of the participles, so that the logic operator can conveniently perform logic operation retrieval in the Lucene, and the accuracy of the logic operation is improved.
The application discloses a generation device of retrieval logic operator includes:
the keyword acquisition module is used for acquiring a plurality of keyword texts;
the logic editing module is used for responding to logic editing operation and determining the content and the arrangement condition of each logic node in the retrieval logic operator according to the semantic relation and the logic relation of the plurality of keyword texts;
the content input module is used for responding to input operation and inputting the content of each logic node into the corresponding logic node in the retrieval logic operator;
and the logical operator generating module is used for responding to the generating operation and generating the retrieval logical operator according to the arrangement condition of each logical node in the retrieval logical operator.
A retrieval apparatus of the present application includes:
the text acquisition module is used for acquiring a text to be retrieved;
the word segmentation module is used for determining a text index to be retrieved according to the text to be retrieved and a preset word segmentation rule;
the operator acquisition module is used for acquiring a retrieval logic operator;
and the retrieval processing module is used for determining a retrieval result according to the retrieval logic operator and the text index to be retrieved.
The computer device of the present application comprises a processor and a memory, wherein the memory stores a computer program, and the computer program realizes the method when being executed by the processor.
The computer-readable storage medium of the present application stores a computer program that, when executed by one or more processors, implements the method described above.
Additional aspects and advantages of embodiments of the present application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of embodiments of the present application.
Drawings
The above and/or additional aspects and advantages of the present application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings of which:
fig. 1 is a flowchart of a method for generating a search logical operator for Lucene provided in the present application;
FIG. 2 is a flow chart of a retrieval method provided herein;
FIG. 3 is a schematic block diagram of a search logic operator generation apparatus and a search apparatus provided in the present application;
FIG. 4 is a schematic diagram of a logical structure for retrieving logical operators in some embodiments of the present application.
Detailed Description
Embodiments of the present invention will be described in detail below with reference to the accompanying drawings. The following examples are merely used to more clearly illustrate the technical solutions of the present application, and therefore are only examples, and the protection scope of the present application is not limited thereby.
Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs; the terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application; the terms "including" and "having," and any variations thereof, in the description and claims of this application and the description of the above figures are intended to cover non-exclusive inclusions.
In the description of the embodiments of the present application, the technical terms "first", "second", and the like are used only for distinguishing different objects, and are not to be construed as indicating or implying relative importance or implicitly indicating the number, specific order, or primary-secondary relationship of the technical features indicated. In the description of the embodiments of the present application, "a plurality" means two or more unless specifically defined otherwise.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by one skilled in the art that the embodiments described herein may be combined with other embodiments.
In the description of the embodiments of the present application, the term "and/or" is only one kind of association relationship describing an associated object, and means that three relationships may exist, for example, a and/or B, and may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter associated objects are in an "or" relationship.
In the description of the embodiments of the present application, the term "plurality" refers to two or more (including two), and similarly, "plural sets" refers to two or more (including two), and "plural pieces" refers to two or more (including two).
In the description of the embodiments of the present application, unless otherwise explicitly stated or limited, the terms "mounted," "connected," "fixed," and the like are used in a broad sense, and for example, may be fixedly connected, detachably connected, or integrated; mechanical connection or electrical connection is also possible; either directly or indirectly through intervening media, either internally or in any other relationship. Specific meanings of the above terms in the embodiments of the present application can be understood by those of ordinary skill in the art according to specific situations.
As shown in fig. 1, the present application provides a method for generating a search logical operator for Lucene, including:
01: acquiring a plurality of keyword texts;
02: responding to the logic editing operation, and determining the content and the arrangement condition of each logic node in the retrieval logic operator according to the semantic relation and the logic relation of the plurality of keyword texts;
03: responding to the input operation, and inputting the content of each logic node into a corresponding logic node in the retrieval logic operator;
04: and responding to the generation operation, and generating the retrieval logic operator according to the arrangement condition of each logic node in the retrieval logic operator.
As shown in fig. 3, the present application further provides a device 10 for generating search logical operators. The method for generating a search logical operator for Lucene according to the present application can be implemented by the apparatus 10 for generating a search logical operator according to the present application. Specifically, the generating apparatus 10 for retrieving logical operators includes a keyword obtaining module 11, a logical editing module 12, a content input module 13, and a logical operator generating module 14. The system comprises a keyword acquisition module 11, a logic editing module 12, a content input module 13 and a logic operator generation module 14, wherein the keyword acquisition module 11 is used for acquiring a plurality of keyword texts, the logic editing module 12 is used for determining the content and the arrangement condition of each logic node in a search logic operator according to the semantic relation and the logic relation of the plurality of keyword texts in response to a logic editing operation, the content input module is used for inputting the content of each logic node into the corresponding logic node in the search logic operator in response to an input operation, and the logic operator generation module 14 is used for generating the search logic operator according to the arrangement condition of each logic node in the search logic operator in response to a generation operation.
The present application further provides a computer device comprising a memory and a processor. The method for generating the search logic operator for Lucene can be realized by the computer device. Specifically, the memory stores a computer program, and the processor is configured to obtain a plurality of keyword texts, determine the content and arrangement of each logical node in the search logical operator according to the semantic relationship and the logical relationship of the plurality of keyword texts in response to a logical editing operation, input the content of each logical node into a corresponding logical node in the search logical operator in response to an input operation, and generate a search logical operator according to the arrangement of each logical node in the search logical operator in response to a generation operation.
The retrieval logic operator is used for retrieving the content of a target document through Lucene, the operator is a tree logic network and specifically comprises three logic nodes including a root, a branch and a leaf, the arrangement and the logic relationship among the logic nodes are determined by the semantic relationship and the logic relationship among keyword texts, the content of each logic node is different according to different functions of each logic node, and a specific structure is shown in fig. 4. Specifically, in order to generate a search logical operator, a user needs to input all keyword texts for searching, determine the positions, logical relationships, and contained contents of all logical operators in the search logical operator according to the keyword texts and the logical relationships to be followed between the texts, input the contained contents into each logical node, and generate a tree-like logical network according to the determined logical node arrangement through a generation operation, that is, generate the search logical operator.
In summary, the logical relationship that the search logical operator should include can be inferred according to the logical relationship among the keyword texts, and the content of each node of the search logical operator can be inferred according to the semantic relationship among the keyword texts, the semantic features of the search logical operator and the logical requirements of part of the keywords.
In certain embodiments, step 02 comprises:
021: responding to the content corresponding operation, and determining the content of each logic node in the retrieval logic operator according to the semantic relation and the logic relation between the keyword texts;
022: and responding to the logical relationship arrangement operation, and determining the arrangement condition of each logical node in the retrieval logical operator according to the logical relationship between the keyword texts.
In some embodiments, the logic editing module 12 is further configured to determine, in response to the logical relationship arrangement operation, an arrangement condition of each logical node in the search logical operator according to the logical relationship between the keyword texts, and determine, in response to the content correspondence operation, a content of each logical node in the search logical operator according to the semantic relationship and the logical relationship between the keyword texts.
In some embodiments, the processor is configured to determine, in response to the logical relationship arrangement operation, an arrangement of each logical node in the search logical operator according to a logical relationship between the keyword texts, and determine, in response to the content correspondence operation, a content of each logical node in the search logical operator according to a semantic relationship and a logical relationship between the keyword texts.
Specifically, when each logical node in the logical operator is edited, two aspects of the content and the arrangement of the logical node are specifically involved. For the content of the logic node, the key word texts corresponding to the logic node or the logic relationship existing among some key word texts are mainly included; for the arrangement situation of the logic nodes, the logic structure of the whole logic operator is mainly embodied. But whether content or arrangement, is determined by the keyword text itself and the logic requirements it contains.
Therefore, the logical relation which the search logical operator should include can be deduced according to the logical relation among the keyword texts, and the content of each node of the search logical operator can be deduced according to the semantic relation among the keyword texts, the semantic characteristics of the search logical operator and the logical requirements of partial keywords.
In certain embodiments, step 021 comprises:
0211: determining a logic algorithm determined by each father node according to the logic relationship among the keyword texts;
0212: and determining the keyword texts contained in each leaf node and the semantic attributes and the logic attributes of the keyword texts according to the semantic relation of the keyword texts.
In some embodiments, the logic editing module 12 is further configured to determine a logic algorithm determined by each parent node according to the logic relationship between the keyword texts, and determine the keyword texts included in each leaf node and semantic attributes and logic attributes of the keyword texts according to the semantic relationship of the keyword texts.
In some embodiments, the processor is further configured to determine a logical algorithm determined by each parent node according to the logical relationship between the keyword texts, and to determine the keyword texts included in each leaf node and semantic attributes and logical attributes of the keyword texts according to the semantic relationship of the keyword texts.
Specifically, the parent node is a logical node in the tree-like logical structure that represents a tree-like branch structure, specifically, in the search logical operator, the root node and the branch node act as the parent node, and the root node is the only logical node in the entire tree-like logical structure that acts only as the parent node. The parent node corresponds to a child node, the child node may be a parent node or not, specifically, in the search logical operator, the leaf node is necessarily a child node, and the branch node may be a child node of another branch node or a root node, or may be a parent node of another branch node or a leaf node. In addition, each logical node having the same parent node is referred to as a sibling node. The parent node and the child nodes form a plurality of logic levels in the tree-shaped logic structure, the parent node is positioned at the previous logic level of the child nodes, and the root node is positioned at the highest logic level. Specifically, in the search logical operator of the present application, each parent node specifically determines a logical operation rule to be followed among all child nodes thereof, and specifically includes a logical operation manner among multiple objects such as and, or, nand, nor, xnor, xor, and the like. For each leaf node in the search logical operator, each leaf node needs to correspond to a keyword text, and the leaf node needs to include semantic attributes and logical attributes carried by the corresponding keyword text. For example, in one embodiment, a leaf node includes the keyword text "GDP" (i.e., the keyword text itself), and the target location of the keyword text is (i.e., the semantic property of the keyword text), and the expected search result is that the target document does not include the keyword text (i.e., the logical property of the keyword text), then these information are the content included in the leaf node. In particular implementations, the content contained by a leaf node is generally described by a predetermined computer representation, such as a json script. Further, the semantic attributes and the logical attributes are described by a preset expression system, such as Spring-based Spring expression system.
Therefore, the method can determine the logic operation rules determined by all father nodes in the tree-shaped retrieval logic operator as the contents of the corresponding father nodes, and determine the keyword texts and the semantic attributes and the logic attributes required by the keyword texts as the contents of each leaf node.
In certain embodiments, step 022 comprises:
0221: determining father nodes of all the logic nodes according to the logic relation among the keyword texts;
0222: and determining the arrangement sequence of each logic node with the same father node according to the logic relation among the keyword texts and the preset logic operation direction.
In some embodiments, the logic editing module 12 is further configured to determine a parent node of each logic node according to the logic relationship between the keyword texts, and determine an arrangement order of each logic node having the same parent node according to the logic relationship between the keyword texts and a preset logic operation direction.
In some embodiments, the processor is further configured to determine a parent node of each logical node according to the logical relationship between the keyword texts, and determine an arrangement order of each logical node having the same parent node according to the logical relationship between the keyword texts and a preset logical operation direction.
Specifically, according to the logical relationship among the keyword texts, the logical relationship among the corresponding logical nodes can be deduced, so that which logical nodes are sibling nodes can be determined, and further, the parent nodes of all logical nodes can be determined. In addition, according to the sequence requirement of the keyword and the preset logic operation direction, the arrangement sequence of the brother nodes can be determined. In a specific example, the root node is at the top level and is the highest logic level, the whole tree-shaped logic network is distributed downwards according to the branch mode of the father node and the son nodes, the same logic level is calculated from the left to the right direction during specific calculation, and different logic levels are calculated from the bottom to the top, and finally the logic operation result is obtained. Then, according to such a calculation sequence, the arrangement sequence of all the logical nodes can be determined by combining the semantic sequence of the keywords.
Therefore, according to the requirements of all logical relations and logical operation sequences, the arrangement condition of all logical nodes in the search logical operator can be determined.
In certain embodiments, step 021 further comprises:
0213: and determining the order operation rule determined by each father node according to the semantic relation among the keyword texts.
In some embodiments, the logic editing module 12 is further configured to determine a sequential algorithm determined by each parent node according to the semantic relationship between the keyword texts.
In some embodiments, the processor is further configured to determine a ranking algorithm determined by each parent node based on semantic relationships between the keyword texts.
Specifically, in the actual search requirement, in addition to the requirement of the overall semantic order among the keyword texts, the requirement also exists for the semantic order of the local part of the keyword texts. In order to meet the local requirement, a sequential calculation rule can be set at the corresponding parent node for re-screening the logic result calculated at the parent node. For example, in a specific embodiment, the keyword texts included in the child nodes of a parent node include "a", "b", and "g", and the sequence of occurrence is b → a → b → g → b → a → g, the sequence of keyword occurrence is expected to be b → a → g for the search requirement, and the sequence of 3 consecutive texts in the complete sequence is 5 in total, and only one of the sequences meets the requirement, so a predetermined algorithm is adopted at the parent node to select a unique sequence meeting the requirement, and the predetermined algorithm includes but is not limited to a dynamic programming algorithm, and the like.
Therefore, the operation results of all the logic nodes under the same father node can be re-filtered according to the order requirements, so that the obtained calculation results are ensured to meet the user requirements.
As shown in fig. 2, the present application further provides a retrieval method, where the retrieval logical operator generated based on the above method includes the following steps:
001: acquiring a text to be retrieved;
002: determining a text index to be retrieved according to the text to be retrieved and a preset word segmentation rule;
003: acquiring a retrieval logic operator;
004: and determining a retrieval result according to the retrieval logic operator and the text index to be retrieved.
As shown in fig. 3, the present application also provides a retrieval apparatus 20. The search method of the present application can be realized by the search device 20 of the present application. Specifically, the retrieval apparatus 20 includes a text acquisition module 21, a word segmentation module 22, an operator acquisition module 23, and a retrieval processing module 24. The text retrieval method comprises a text acquisition module 21 for acquiring a text to be retrieved, a word segmentation module 22 for determining a text index to be retrieved according to the text to be retrieved and a preset word segmentation rule, an operator acquisition module 23 for acquiring a retrieval logic operator, and a retrieval processing module 24 for determining a retrieval result according to the retrieval logic operator and the text index to be retrieved.
The present application also provides a computer device comprising a memory and a processor. The retrieval method of the application can be realized by the computer equipment of the application. Specifically, the memory stores computer programs, and the processor is configured to obtain a text to be retrieved, determine a text index to be retrieved according to the text to be retrieved and a preset word segmentation rule, obtain a retrieval logic operator, and determine a retrieval result according to the retrieval logic operator and the text index to be retrieved.
Specifically, after a specific search logical operator is generated by using the search logical operator generation method, specific search can be performed by using the logical operator. Firstly, acquiring a specific text to be retrieved, decomposing the text into single appearing words by using a preset word segmentation rule, and mapping the word segmentation rule applied when the words are decomposed into word segmentation attributes of corresponding words, wherein the word segmentation attributes correspond to the semantic attributes of the keyword text. The preset word segmentation rule may adopt a default word segmentation rule of a Lucene engine, and may also adopt other word segmentation rules, such as Forward Maximum Matching (FMM), reverse Maximum Matching (RMM), bidirectional Maximum Matching (BMM), hidden Markov Model (HMM), and the like. After the word segmentation process is finished, each word and semantic attribute of the word are decomposed by using a Lucene engine to form a document index, and the document index is stored in an index library to form a document index library (namely a text index to be retrieved), wherein the index library can perform retrieval analysis through a Lucene retrieval interface. And then acquiring the retrieval logic operator generated by the retrieval logic operator generation method, inputting the logic operator into a retrieval interface of Lucene, performing logic search on the text index to be retrieved, finally determining a retrieval result, and outputting the retrieval result to a user to realize the whole retrieval process.
In summary, the content of the text to be retrieved can be retrieved through the Lucene model by using the generated retrieval logic operator.
In some embodiments, each entry in the text index to be retrieved includes a participle, and the entry further includes semantic attributes of the participle.
Specifically, in order to avoid deviation of the operation of the search logical operator, the entries in the text index to be searched correspond to the participles one by one, and the semantic attributes of the participles also correspond to the entries along with the participles. In the operation process of the logic operator, all operations can be embodied in each index entry, deviation is avoided, and the operation accuracy is guaranteed.
Therefore, the text to be retrieved can be divided into a plurality of participles, and the participles have the semantic attributes of the participles, so that the logic operator can conveniently perform logic operation retrieval in the Lucene, and the accuracy of the logic operation is improved.
The present application also provides a computer-readable storage medium storing a computer program which, when executed by one or more processors, performs the above-described method.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high density embedded nonvolatile Memory (hdram), resistive Random Access Memory (ReRAM), magnetic Random Access Memory (MRAM), ferroelectric Random Access Memory (FRAM), phase Change Memory (PCM), graphene Memory, and the like. Volatile Memory can include Random Access Memory (RAM), external cache Memory, and the like. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), for example. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing based data processing logic devices, etc., without limitation.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; such modifications and substitutions do not depart from the spirit and scope of the present disclosure, and the present disclosure should be construed as being covered by the claims and the specification. In particular, the technical features mentioned in the embodiments can be combined in any way as long as there is no structural conflict. The present application is not intended to be limited to the particular embodiments disclosed herein, but rather to cover all embodiments falling within the scope of the appended claims.

Claims (11)

1. A method for generating search logic operators for Lucene, the method comprising:
acquiring a plurality of keyword texts;
responding to a logic editing operation, and determining the content and the arrangement condition of each logic node in the retrieval logic operator according to the semantic relation and the logic relation of the plurality of keyword texts, wherein the logic nodes in the retrieval logic operator comprise root nodes, branch nodes and leaf nodes;
responding to input operation, and inputting the content of each logic node into a corresponding logic node in the retrieval logic operator;
and responding to the generation operation, and generating the retrieval logic operator according to the arrangement condition of each logic node in the retrieval logic operator.
2. The method for generating search logical operators for Lucene as claimed in claim 1, wherein said determining the content and arrangement of each logical node in said search logical operator according to the semantic relationship and logical relationship of said plurality of keyword texts in response to the logical sorting operation comprises:
responding to content corresponding operation, and determining the content of each logic node in the retrieval logic operator according to the semantic relation and the logic relation between the keyword texts;
and responding to the logical relationship arrangement operation, and determining the arrangement condition of each logical node in the retrieval logical operator according to the logical relationship between the keyword texts.
3. The method as claimed in claim 2, wherein the determining the content of each logical node in the search logical operator according to the semantic relationship and the logical relationship between the keyword texts in response to the content mapping operation comprises:
determining a logic algorithm determined by each father node according to the logic relationship among the keyword texts;
and determining the keyword texts contained in each leaf node and the semantic attributes and the logic attributes of the keyword texts according to the semantic relation of the keyword texts.
4. The method for generating Lucene search logical operators according to claim 2, wherein the determining, in response to the logical relationship assignment operation, the assignment of each logical node in the search logical operator according to the logical relationship between the keyword texts comprises:
determining father nodes of all the logic nodes according to the logic relation among the keyword texts, wherein the father nodes are served by root nodes or branch nodes;
and determining the arrangement sequence of all logic nodes with the same father node according to the logic relation among the keyword texts and a preset logic operation direction.
5. The method as claimed in claim 3, wherein the determining the content of each logical node in the search logical operator according to the semantic relationship and the logical relationship between the keyword texts in response to the content mapping operation further comprises:
and determining a sequence algorithm determined by each father node according to the semantic relationship among the keyword texts, wherein the sequence algorithm is used for re-screening the logic operation result of each father node according to the semantic relationship among the keyword texts.
6. A search method based on search logical operators generated with the method for generating search logical operators for Lucene according to any of claims 1 to 5, characterized in that said method comprises:
acquiring a text to be retrieved;
determining a text index to be retrieved according to the text to be retrieved and a preset word segmentation rule;
acquiring the retrieval logic operator;
and determining a retrieval result according to the retrieval logic operator and the text index to be retrieved.
7. The retrieval method according to claim 6, wherein each entry in the text index to be retrieved comprises a participle, and the entry further comprises semantic attributes of the participle.
8. An apparatus for generating a search logical operator, the apparatus comprising:
the keyword acquisition module is used for acquiring a plurality of keyword texts;
the logic editing module is used for responding to logic editing operation and determining the content and the arrangement condition of each logic node in the retrieval logic operator according to the semantic relation and the logic relation of the plurality of keyword texts;
the content input module is used for responding to input operation and inputting the content of each logic node into a corresponding logic node in the retrieval logic operator;
and the logical operator generating module is used for responding to the generating operation and generating the retrieval logical operator according to the arrangement condition of each logical node in the retrieval logical operator.
9. A retrieval apparatus, characterized in that the apparatus comprises:
the text acquisition module is used for acquiring a text to be retrieved;
the word segmentation module is used for determining a text index to be retrieved according to the text to be retrieved and a preset word segmentation rule;
the operator acquisition module is used for acquiring a retrieval logic operator;
and the retrieval processing module is used for determining a retrieval result according to the retrieval logic operator and the text index to be retrieved.
10. A computer device, wherein the computer device comprises a memory and a processor; the memory stores a computer program which, when executed by the processor, causes the processor to perform the method of any of claims 1-7.
11. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by one or more processors, implements the method according to any one of claims 1-7.
CN202211302049.3A 2022-10-24 2022-10-24 Method and equipment for generating search logic operator for Lucene and storage medium Pending CN115599886A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211302049.3A CN115599886A (en) 2022-10-24 2022-10-24 Method and equipment for generating search logic operator for Lucene and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211302049.3A CN115599886A (en) 2022-10-24 2022-10-24 Method and equipment for generating search logic operator for Lucene and storage medium

Publications (1)

Publication Number Publication Date
CN115599886A true CN115599886A (en) 2023-01-13

Family

ID=84849043

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211302049.3A Pending CN115599886A (en) 2022-10-24 2022-10-24 Method and equipment for generating search logic operator for Lucene and storage medium

Country Status (1)

Country Link
CN (1) CN115599886A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107491554A (en) * 2017-09-01 2017-12-19 北京神州泰岳软件股份有限公司 Construction method, construction device and the file classification method of text classifier
KR101977107B1 (en) * 2018-11-26 2019-05-10 (주)시큐레이어 Method and device for displaying queries in hierarchical structure by analyzing queries inputted into lucene database
CN111104488A (en) * 2019-12-30 2020-05-05 广州广电运通信息科技有限公司 Method, device and storage medium for integrating retrieval and similarity analysis
CN111709239A (en) * 2020-06-04 2020-09-25 中国地质大学(北京) Geoscience data discovery method based on expert logic structure tree
CN113434625A (en) * 2021-08-27 2021-09-24 中汽研(天津)汽车信息咨询有限公司 Patent retrieval type coding method, device and storage medium
US11232140B2 (en) * 2017-08-22 2022-01-25 Beijing Baidu Netcom Science And Technology Co., Ltd. Method and apparatus for processing information
US20220083552A1 (en) * 2020-09-17 2022-03-17 Regents Of The University Of California Query processing in a polystore
CN114595319A (en) * 2022-03-10 2022-06-07 中国建设银行股份有限公司 Method for sorting search results of search content

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11232140B2 (en) * 2017-08-22 2022-01-25 Beijing Baidu Netcom Science And Technology Co., Ltd. Method and apparatus for processing information
CN107491554A (en) * 2017-09-01 2017-12-19 北京神州泰岳软件股份有限公司 Construction method, construction device and the file classification method of text classifier
KR101977107B1 (en) * 2018-11-26 2019-05-10 (주)시큐레이어 Method and device for displaying queries in hierarchical structure by analyzing queries inputted into lucene database
CN111104488A (en) * 2019-12-30 2020-05-05 广州广电运通信息科技有限公司 Method, device and storage medium for integrating retrieval and similarity analysis
CN111709239A (en) * 2020-06-04 2020-09-25 中国地质大学(北京) Geoscience data discovery method based on expert logic structure tree
US20220083552A1 (en) * 2020-09-17 2022-03-17 Regents Of The University Of California Query processing in a polystore
CN113434625A (en) * 2021-08-27 2021-09-24 中汽研(天津)汽车信息咨询有限公司 Patent retrieval type coding method, device and storage medium
CN114595319A (en) * 2022-03-10 2022-06-07 中国建设银行股份有限公司 Method for sorting search results of search content

Similar Documents

Publication Publication Date Title
US11442932B2 (en) Mapping natural language to queries using a query grammar
US11126647B2 (en) System and method for hierarchically organizing documents based on document portions
US9424294B2 (en) Method for facet searching and search suggestions
US11853334B2 (en) Systems and methods for generating and using aggregated search indices and non-aggregated value storage
US9208435B2 (en) Dynamic creation of topical keyword taxonomies
JP7252914B2 (en) Method, apparatus, apparatus and medium for providing search suggestions
JP5338238B2 (en) Automatic ontology generation using word similarity
US20130060769A1 (en) System and method for identifying social media interactions
EP1154358A2 (en) Automatic text classification system
US20210141842A1 (en) Visual Mapping of Aggregate Causal Frameworks for Constructs, Relationships, and Meta-Analyses
CN109471889B (en) Report accelerating method, system, computer equipment and storage medium
CN102982095B (en) A kind of body automatic creation system based on thesaurus and method thereof
US20210350082A1 (en) Creating and Interacting with Data Records having Semantic Vectors and Natural Language Expressions Produced by a Machine-Trained Model
WO2015051481A1 (en) Determining collection membership in a data graph
CN114328983A (en) Document fragmenting method, data retrieval device and electronic equipment
CN116127960B (en) Information extraction method, information extraction device, storage medium and computer equipment
KR101602342B1 (en) Method and system for providing information conforming to the intention of natural language query
CN115599886A (en) Method and equipment for generating search logic operator for Lucene and storage medium
CN115129890A (en) Feedback data map generation method and generation device, question answering device and refrigerator
CN110781364A (en) Artificial intelligence enabled search for storage systems
KR101754580B1 (en) Method and apprapatus for supporting full text search in embedded environment and computer program stored on computer-readable medium
CN116401305A (en) Information processing method, device and system
US11971939B1 (en) Clustered metasearch
CN112860940B (en) Music resource retrieval method based on sequential concept space on description logic knowledge base
CN117252183B (en) Semantic-based multi-source table automatic matching method, device and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination