A data operation method and device based on full-text search engine

By preset the preset operation rules of the search engine client on the full text, the developer needs to learn the problem of DSL statement grammar, realize efficient data operations and save labor costs.

CN113111641BActive Publication Date: 2025-01-28SHANGHAI QUJIE INFORMATION TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110426285.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-04-20
Publication Date
2025-01-28
Estimated Expiration
2041-04-20

AI Technical Summary

Technical Problem

When using Elasticsearch full-text search engine, developers need to learn DSL statement syntax, resulting in high learning costs and low operational efficiency.

Method used

By adding, deletion, deletion and modification of the preset operation rules of different data on the client of the full -text search engine, the client obtains target data, analyzes parameters, calls the corresponding operating rules for data operation, and sends the result to the server.

Benefits of technology

No developer needs to understand the DSL statement grammar of Elasticsearch, directly call the preset operation rules, avoid learning costs, improve data operation efficiency and save labor costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113111641B_ABST
    Figure CN113111641B_ABST
Patent Text Reader

Abstract

The purpose of the present application is to provide a data operation method and device based on a full-text search engine. The present application uses the preset operation rules of the client of the full-text search engine to add, delete, modify and query different data; the client obtains the target data to be processed, and performs parameter analysis on the target data to obtain the target operation parameters corresponding to the target data; calls the target operation rules corresponding to the target operation parameters from the preset operation rules, and performs data operations on the target data according to the target operation rules to obtain the data operation results corresponding to the target data, and sends the data operation results corresponding to the target data to the server corresponding to the full-text search engine, which not only avoids the investment of manpower in learning the DSL statement syntax of the full-text search engine, but also improves the efficiency of data operations and saves manpower costs.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a data operation method and device based on a full-text search engine. Background Art

[0002] In the prior art, Elasticsearch (ES) is an open source, distributed, RESTful interface full-text search engine built on Lucene. Elasticsearch is also a distributed document database, in which each field is indexed data and can be searched. It can be expanded to hundreds of servers to store and process large amounts of text data at the PB level. Elasticsearch can store, search and analyze large amounts of data in a very short time, and is usually used as a core engine in complex search scenarios. However, when using Elasticsearch in the programming language JAVA, it is necessary to master DSL statements to perform corresponding processing operations on the data. For developers who do not understand DSL, they need to invest a lot of learning time. Summary of the invention

[0003] One purpose of the present application is to provide a data operation method and device based on a full-text search engine, which can avoid investing manpower in learning the DSL statement syntax of the full-text search engine Elasticsearch, and can also improve the efficiency of data operation and save manpower costs.

[0004] According to one aspect of the present application, a data operation method based on a full-text search engine is provided, which is applied to a client, wherein the method comprises:

[0005] Preset operation rules for adding, deleting, modifying and checking different data;

[0006] Obtain target data to be processed;

[0007] Performing parameter analysis on the target data to obtain target operation parameters corresponding to the target data;

[0008] Calling a target operation rule corresponding to the target operation parameter from the preset operation rule;

[0009] Performing data operation on the target data according to the target operation rule to obtain a data operation result corresponding to the target data;

[0010] The data operation result corresponding to the target data is sent to the server corresponding to the full-text search engine.

[0011] Furthermore, in the above method, the method further comprises:

[0012] A connection is established with the server corresponding to the full-text search engine.

[0013] Furthermore, in the above method, the preset operation rules for adding, deleting, modifying and checking different data include:

[0014] Determine the necessary parameters for adding, deleting, modifying and checking different data;

[0015] Corresponding preset operation rules are preset according to different necessary parameters, wherein different necessary parameters correspond to different preset operation rules.

[0016] According to another aspect of the present application, a data operation method based on a full-text search engine is also provided, which is applied to a server, wherein the method comprises:

[0017] Establishing a connection with a client of a full-text search engine; wherein the client is pre-set with preset operation rules for adding, deleting, modifying and checking different data; after obtaining the target data to be processed, the client performs parameter analysis on the target data to obtain the target operation parameters corresponding to the target data, calls the target operation rules corresponding to the target operation parameters from the preset operation rules, performs data operations on the target data according to the target operation rules, obtains the data operation results corresponding to the target data and sends them to the server corresponding to the full-text search engine;

[0018] Receive a data operation result of the target data sent by the client.

[0019] According to another aspect of the present application, a non-volatile storage medium is provided, on which computer-readable instructions are stored. When the computer-readable instructions can be executed by a processor, the processor implements the data operation method based on the full-text search engine as described above.

[0020] According to another aspect of the present application, a client for data operation based on a full-text search engine is also provided, wherein the client comprises:

[0021] one or more processors;

[0022] A computer readable medium for storing one or more computer readable instructions,

[0023] When the one or more computer-readable instructions are executed by the one or more processors, the one or more processors implement the data operation method based on the full-text search engine of the client as described above.

[0024] According to another aspect of the present application, a server for data operation based on a full-text search engine is also provided, wherein the server comprises:

[0025] one or more processors;

[0026] A computer readable medium for storing one or more computer readable instructions,

[0027] When the one or more computer-readable instructions are executed by the one or more processors, the one or more processors implement the data operation method based on the full-text search engine on the server side as described above.

[0028] Compared with the prior art, the present application utilizes the client of the full-text search engine to preset preset operation rules for adding, deleting, modifying and querying different data; in actual application scenarios, the target data to be processed is obtained, and the target data is parsed to obtain target operation parameters corresponding to the target data; the target operation rules corresponding to the target operation parameters are called from the preset operation rules, and data operations are performed on the target data according to the target operation rules to obtain data operation results corresponding to the target data; finally, the client sends the data operation results corresponding to the target data to the server corresponding to the full-text search engine, so that in actual application scenarios, developers do not need to understand the DSL statement syntax of the full-text search engine Elasticsearch, and can directly call the preset preset operation rules for adding, deleting, modifying and querying different data, which not only avoids the investment of manpower in learning the DSL statement syntax of the full-text search engine Elasticsearch, but also improves the efficiency of data operations and saves manpower costs. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Other features, objects and advantages of the present application will become more apparent by reading the detailed description of non-limiting embodiments made with reference to the following drawings:

[0030] Figure 1 A schematic diagram showing an interactive process of a data operation method based on a full-text search engine according to one aspect of the present application;

[0031] Figure 2 A schematic diagram of an actual data operation flow of a data operation method based on a full-text search engine according to one aspect of the present application is shown.

[0032] The same or similar reference numerals in the drawings represent the same or similar components. DETAILED DESCRIPTION

[0033] The present application is described in further detail below in conjunction with the accompanying drawings.

[0034] In a typical configuration of the present application, the terminal, the device of the service network and the trusted party all include one or more processors (CPU), input / output interfaces, network interfaces and memories.

[0035] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0036] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include non-transitory media such as modulated data signals and carrier waves.

[0037] According to an embodiment of one aspect of the present application, a data operation method based on a full-text search engine is provided. The specific interaction process is as follows: Figure 1 As shown, the method involves a client and a server of a full-text search engine, wherein the client of the full-text search engine can preferably be a Rest High Level Client, wherein the method includes steps S11, S12, S13, S14, S15 and S16 executed by the client and steps S21 and S22 executed by the server, specifically including the following steps:

[0038] Step S11, the client presets preset operation rules for adding, deleting, modifying and checking different data. Here, the preset operation rules include but are not limited to the crud method in the client Rest High Level Client in the full-text search engine, wherein the crud method in the client Rest High Level Client in the full-text search engine is custom encapsulated so that the underlying principle simulates various requests required by the full-text search engine Elasticsearch, such as put, delete, get and the like.

[0039] In actual application scenarios, when data needs to be operated, in step S12, the client obtains target data to be processed.

[0040] Step S13: the client performs parameter parsing on the target data to obtain target operation parameters corresponding to the target data.

[0041] Step S14: the client calls a target operation rule corresponding to the target operation parameter from the preset operation rules.

[0042] Step S15, the client performs a data operation on the target data according to the target operation rule to obtain a data operation result corresponding to the target data;

[0043] Step S16: the client sends the data operation result corresponding to the target data to the server corresponding to the full-text search engine.

[0044] Step S21, the server establishes a connection with the client of the full-text search engine; wherein, the client is pre-installed with preset operation rules for adding, deleting, modifying and checking different data. After obtaining the target data to be processed, the client performs parameter analysis on the target data to obtain the target operation parameters corresponding to the target data, calls the target operation rules corresponding to the target operation parameters from the preset operation rules, and performs data operations on the target data according to the target operation rules, obtains the data operation results corresponding to the target data and sends them to the server corresponding to the full-text search engine.

[0045] Step S22: the server receives the data operation result of the target data sent by the client.

[0046] like Figure 2As shown, in an actual application scenario, when it is necessary to process the target data, a preset custom CRUD method, that is, a preset operation rule, is called; then, the target data to be processed is parsed with custom parameters to obtain the parameters required by the full-text search engine client Rest High Level Client, that is, the target operation parameters corresponding to the target data; then, according to the called custom CRUD method, the target operation parameters corresponding to the target data are matched to obtain the target operation rules corresponding to the target operation parameters; finally, the target operation rules matched by the full-text search engine client Rest High Level Client are executed to perform data operations on the target data to obtain the data operation results corresponding to the target data, so as to realize the use of the preset preset operation rules to perform corresponding data operations on the target data to be processed, avoid artificial learning of SDL statement language, etc., thereby improving data operation efficiency and saving investment in labor costs; finally, the client sends the data operation results corresponding to the target data to the server of the full-text search engine Elasticsearch, so as to realize the placement of the client's data on the server of the full-text search engine.

[0047] Following the above embodiment of the present application, the method further includes:

[0048] The client corresponding to the full-text search engine establishes a connection with the server corresponding to the full-text search engine. For example, before the client corresponding to the full-text search engine and the server perform operations on different data, the client component Rest High Level Client is used to connect the client of the full-text search engine to the server, so that a connection is established between the client and the server, so that the client can subsequently perform data operations on different data to be placed on the server and to be processed.

[0049] Following the above embodiment of the present application, the step S11 presets the preset operation rules for adding, deleting, modifying and checking different data, specifically including:

[0050] Determine the necessary parameters for adding, deleting, modifying and checking different data;

[0051] Corresponding preset operation rules are preset according to different necessary parameters, wherein different necessary parameters correspond to different preset operation rules.

[0052] For example, in the process of presetting preset operation rules, the necessary parameters for adding, deleting, modifying and checking different data must be determined first. For example, the Put operation can directly pass the index index, type type and other objects that need to be stored, and store and update the index index, type type and other objects, and preset the corresponding preset operation rules according to different necessary parameters, and transform the data retrieval module function so that when calling the custom retrieval method, that is, calling the preset operation rule, after passing the necessary target operation parameters such as the index index, type type, index setter SearchBuilder and specified return object corresponding to the target data to be processed, the target operation rule corresponding to the target operation parameter will be automatically called from the preset operation rule, so that the target data to be processed can be operated on through the target operation rule, and the corresponding data operation result after the data operation will be sent to the server corresponding to the full-text search engine Lasticsearch.

[0053] According to another aspect of the present application, a non-volatile storage medium is provided, on which computer-readable instructions are stored. When the computer-readable instructions can be executed by a processor, the processor implements the data operation method based on the full-text search engine as described above.

[0054] According to another aspect of the present application, a client for data operation based on a full-text search engine is also provided, wherein the client comprises:

[0055] one or more processors;

[0056] A computer readable medium for storing one or more computer readable instructions,

[0057] When the one or more computer-readable instructions are executed by the one or more processors, the one or more processors implement the data operation method based on the full-text search engine of the client as described above.

[0058] Here, for the detailed contents of each embodiment of the client for data operation based on the full-text search engine, please refer to the corresponding part of the embodiment of the method for data operation based on the full-text search engine mentioned above, which will not be described again here.

[0059] According to another aspect of the present application, a server for data operation based on a full-text search engine is also provided, wherein the server comprises:

[0060] one or more processors;

[0061] A computer readable medium for storing one or more computer readable instructions,

[0062] When the one or more computer-readable instructions are executed by the one or more processors, the one or more processors implement the data operation method based on the full-text search engine on the server as described above.

[0063] Here, the details of each embodiment of the server-side data operation based on the full-text search engine can be specifically referred to the corresponding part of the embodiment of the data operation method based on the full-text search engine of the server-side, and will not be repeated here.

[0064] In summary, the present application utilizes the client of the full-text search engine to preset preset operation rules for adding, deleting, modifying and querying different data; in actual application scenarios, the target data to be processed is obtained, and the target data is parsed to obtain target operation parameters corresponding to the target data; the target operation rules corresponding to the target operation parameters are called from the preset operation rules, and data operations are performed on the target data according to the target operation rules to obtain data operation results corresponding to the target data; finally, the client sends the data operation results corresponding to the target data to the server corresponding to the full-text search engine, so that in actual application scenarios, developers do not need to understand the DSL statement syntax of the full-text search engine Elasticsearch, and can directly call the preset preset operation rules for adding, deleting, modifying and querying different data, which not only avoids the investment of manpower in learning the DSL statement syntax of the full-text search engine Elasticsearch, but also improves the efficiency of data operations and saves labor costs.

[0065] It should be noted that the present application can be implemented in software and / or a combination of software and hardware, for example, can be implemented using an application specific integrated circuit (ASIC), a general purpose computer or any other similar hardware device. In one embodiment, the software program of the present application can be executed by a processor to implement the steps or functions described above. Similarly, the software program of the present application (including relevant data structures) can be stored in a computer-readable recording medium, for example, a RAM memory, a magnetic or optical drive or a floppy disk and similar devices. In addition, some steps or functions of the present application can be implemented using hardware, for example, as a circuit that cooperates with a processor to perform each step or function.

[0066] In addition, a part of the present application may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present application through the operation of the computer. The program instruction for calling the method of the present application may be stored in a fixed or removable recording medium, and / or transmitted through a data stream in a broadcast or other signal-bearing medium, and / or stored in a working memory of a computer device that runs according to the program instruction. Here, according to an embodiment of the present application, a device is included, the device including a memory for storing computer program instructions and a processor for executing program instructions, wherein, when the computer program instruction is executed by the processor, the device is triggered to run the method and / or technical solution based on the aforementioned multiple embodiments according to the present application.

[0067] It is obvious to those skilled in the art that the present application is not limited to the details of the above exemplary embodiments, and that the present application can be implemented in other specific forms without departing from the spirit or basic features of the present application. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the present application is limited by the attached claims rather than the above description, so it is intended to include all changes that fall within the meaning and scope of the equivalent elements of the claims in the present application. Any figure mark in the claims should not be regarded as limiting the claims involved. In addition, it is obvious that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the device claim can also be implemented by one unit or device through software or hardware. The words first, second, etc. are used to indicate names, and do not indicate any particular order.

Claims

1. A data operation method based on a full-text search engine, applied to a client, wherein: The method comprises: Preset operation rules for adding, deleting, modifying and checking different data, wherein the preset operation rules include: a crud method in a client Rest High Level Client in a full-text search engine, wherein the crud method in a client Rest High Level Client in a full-text search engine is custom encapsulated so that the underlying principle simulates the requests required by various full-text search engines Elasticsearch; Obtain target data to be processed; Performing parameter parsing on the target data to obtain target operation parameters corresponding to the target data, wherein the target operation parameters are parameters required by a client Rest High Level Client in a full-text search engine; According to the called custom CRUD method, calling the target operation rule corresponding to the target operation parameter from the preset operation rule; Execute the target operation rule matched by the client Rest High Level Client in the full-text search engine to perform data operation on the target data to obtain the data operation result corresponding to the target data; The data operation result corresponding to the target data is sent to the server corresponding to the full-text search engine.

2. The method according to claim 1, wherein: The method further comprises: A connection is established with the server corresponding to the full-text search engine.

3. The method according to claim 1, wherein: The preset operation rules for adding, deleting, modifying and checking different data include: Determine the necessary parameters for adding, deleting, modifying and checking different data; Corresponding preset operation rules are preset according to different necessary parameters, wherein different necessary parameters correspond to different preset operation rules.

4. A data operation method based on a full-text search engine, applied to a server, wherein: The method comprises: Establish a connection with a client of a full-text search engine; wherein the client is pre-set with preset operation rules for adding, deleting, modifying and checking different data, and the preset operation rules include: a crud method in a client Rest High Level Client in the full-text search engine, wherein the crud method in the client Rest High Level Client in the full-text search engine is custom encapsulated so that the underlying principle simulates the requests required by various full-text search engines Elasticsearch, and after obtaining the target data to be processed, the client performs parameter parsing on the target data to obtain target operation parameters corresponding to the target data, wherein the target operation parameters are parameters required by the client Rest High Level Client in the full-text search engine; the client calls the target operation rules corresponding to the target operation parameters from the preset operation rules according to the called custom crud method, and executes the target operation rules matched by the client Rest High Level Client in the full-text search engine to perform data operations on the target data, obtain the data operation results corresponding to the target data and send them to the corresponding server of the full-text search engine; Receive a data operation result of the target data sent by the client.

5. A non-volatile storage medium having computer-readable instructions stored thereon, wherein when the computer-readable instructions are executable by a processor, the processor is enabled to implement the method according to any one of claims 1 to 3.

6. A client for data operation based on a full-text search engine, wherein: The client includes: one or more processors; A computer readable medium for storing one or more computer readable instructions, When the one or more computer-readable instructions are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 3.

7. A data operation server based on a full-text search engine, wherein: The server includes: one or more processors; A computer readable medium for storing one or more computer readable instructions, When the one or more computer-readable instructions are executed by the one or more processors, the one or more processors implement the method as claimed in claim 4.

Citation Information

Patent Citations

  • Search system and method and storage medium

    CN111897836A