A method and system for realizing data retrieval based on distributed engine

By mapping data to the retrieval slices of the distributed engine and performing optimization, the speed and reliability issues of traditional data retrieval systems in massive data processing are solved, and efficient parallel processing and scalability are achieved.

CN118673048BActive Publication Date: 2024-10-25CHENGDU YOUKA DIGITAL INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411148811.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-21
Publication Date
2024-10-25
Estimated Expiration
2044-08-21

AI Technical Summary

Technical Problem

Traditional data retrieval systems have slow processing speeds and low efficiency when faced with massive data. They have the risk of single points of failure, are difficult to expand horizontally, and cannot meet the needs of the big data era.

Method used

Using a distributed engine-based method, the document data in the retrieval pool is mapped to several retrieval slices, and these slices are stored in each service node of the distributed engine. The retrieval efficiency is improved through testing and tuning, user requests are processed in parallel, and The engine is updated synchronously when data changes.

Benefits of technology

It achieves high reliability and scalability of the system, and the system can still run even if some nodes fail, improving the speed and efficiency of data retrieval.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118673048B_ABST
    Figure CN118673048B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for realizing data retrieval based on a distributed engine, and relates to the technical field of data retrieval. The method comprises: mapping document data in a retrieval pool to a plurality of retrieval slices; storing the retrieval slices in each service node in the distributed engine; testing the retrieval efficiency of the distributed engine, and optimizing the distributed engine according to the test results; using the optimized distributed engine to process the retrieval requests issued by the user in parallel, and returning the retrieval results; and synchronously updating the distributed engine when the retrieval pool data changes. Through the collaborative work of multiple computers, even if some nodes fail, the system as a whole can continue to run, thereby improving the reliability of the system, and utilizing the parallel processing capabilities of multiple computers to improve the data retrieval speed and efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data retrieval, and in particular to a method and system for implementing data retrieval based on a distributed engine. Background Art

[0002] Traditional data retrieval systems often have slow processing speeds and low efficiency when faced with massive amounts of data, making it difficult to meet the needs of the big data era. At the same time, centralized data retrieval systems have the risk of single point failures. Once a problem occurs in the central server, the entire system may be paralyzed. And as the amount of data increases, traditional systems are difficult to expand horizontally, that is, to add more servers to improve processing capabilities. Distributed structures have high reliability and scalability. Introducing distributed structures into data retrieval work can perfectly solve the problems of traditional data retrieval systems. Summary of the invention

[0003] The present invention provides a method for implementing data retrieval based on a distributed engine, comprising:

[0004] Step 1: Map the document data in the retrieval pool to several retrieval slices;

[0005] Step 2: Store the search slices in each service node in the distributed engine;

[0006] Step 3: Test the retrieval efficiency of the distributed engine and optimize the distributed engine based on the test results.

[0007] Step 4: Use the tuned distributed engine to process the search requests sent by users in parallel and return the search results;

[0008] Step 5: When the retrieval pool data changes, the distributed engine is updated synchronously.

[0009] The document data in the retrieval pool is mapped to several retrieval slices, which specifically includes the following sub-steps:

[0010] Extract feature vectors of document data in the retrieval pool;

[0011] Create several retrieval slices and set a center vector for each retrieval slice;

[0012] The retrieval slice represented by the central vector with the highest correlation with the feature vector of the document is selected, and a mapping relationship is established with the document.

[0013] The distributed engine retrieval efficiency is tested and the distributed engine is tuned according to the test results. The specific steps include the following:

[0014] Prepare a retrieval test set based on real business in the production environment;

[0015] Use the retrieval test set to perform retrieval efficiency tests on the distributed engine;

[0016] During the test, the distributed engine was optimized by adjusting the number of retrieval slices.

[0017] The optimized distributed engine is used to process the search requests sent by users in parallel, which includes the following sub-steps:

[0018] Split the subtasks according to the parameters in the retrieval request;

[0019] Use a load balancer to distribute the split subtasks to multiple service nodes;

[0020] Merge the search results of each service node and return them to the user.

[0021] When the retrieval pool data changes, the distributed engine is updated synchronously, which specifically includes the following sub-steps:

[0022] Listen to the data change events of the retrieval pool and start the distributed engine update transaction when the change event is triggered;

[0023] The distributed engine update transaction replaces or adds new data to the corresponding retrieval slice;

[0024] Test the retrieval efficiency of the distributed engine and replace the old version of the distributed engine after the test passes.

[0025] The present invention also provides a system for implementing data retrieval based on a distributed engine, including: a retrieval slice configuration module, a distributed engine configuration module, a distributed engine debugging module, a retrieval request processing module, and a distributed engine update module;

[0026] A retrieval slice configuration module is used to map document data in the retrieval pool to a number of retrieval slices;

[0027] Distributed engine configuration module, used to configure the number of service nodes in the distributed engine and the data they store;

[0028] Distributed engine debugging module, used to test the retrieval efficiency of the distributed engine and tune the distributed engine according to the test results;

[0029] The search request processing module is used to use the tuned distributed engine to process the search requests issued by users in parallel and return the search results;

[0030] The distributed engine update module is used to synchronously update the distributed engine when the retrieval pool data changes.

[0031] The document data mapping submodule is used to establish a mapping relationship between the document and the retrieval slice according to the correlation between the document feature vector and the retrieval slice center vector.

[0032] The distributed engine debugging module includes a distributed engine testing submodule and a distributed engine optimization submodule;

[0033] A distributed engine test submodule, used to perform retrieval efficiency test on the distributed engine using a retrieval test set;

[0034] The distributed engine optimization submodule is used to optimize the distributed engine by adjusting the number of retrieval slices during the test process.

[0035] The search request processing module includes a subtask splitting submodule, a subtask distribution submodule, and a search result merging submodule;

[0036] The subtask splitting submodule is used to split subtasks according to the parameters in the retrieval request;

[0037] The subtask distribution submodule is used to distribute the split subtasks to multiple service nodes using a load balancer;

[0038] The search result merging submodule is used to merge the search results of each service node and return them to the user.

[0039] The beneficial effects achieved by the present invention are as follows: through the collaborative work of multiple computers, even if some nodes fail, the entire system can continue to operate, thereby improving the reliability of the system and utilizing the parallel processing capabilities of multiple computers to improve data retrieval speed and efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0041] Figure 1 This is a flow chart of a method for implementing data retrieval based on a distributed engine provided in Embodiment 1 of the present invention. DETAILED DESCRIPTION

[0042] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0043] Embodiment 1

[0044] like Figure 1 As shown, the first embodiment of the present invention provides a method for implementing data retrieval based on a distributed engine, including:

[0045] Step S10: Mapping the document data in the search pool to a number of search slices;

[0046] This step is used to reorganize data according to the relevance of documents, thereby reducing the search space and speeding up the search. It includes the following sub-steps:

[0047] Step S11: extracting feature vectors of document data in the retrieval pool;

[0048] Use the word segmenter to split the document into a word sequence, remove irrelevant words such as modal particles and auxiliary words, and then convert the word sequence into a vector sequence through the pre-trained large language model. Finally, these word vectors are fused into a feature vector. The word vector fusion formula is expressed as:

[0049] ,in represents the feature vector of the i-th document, represents the kth word vector in the i-th document, k ranges from 1 to iw, iw represents the number of word vectors in the i-th document, express The number of times it appears in the i-th document, represents the total number of terms in the i-th document, represents the number of irrelevant words in the i-th document, represents the unique identification vector of the i-th document, It is an adjustable parameter.

[0050] Step S12: creating a number of retrieval slices, and setting a center vector for each retrieval slice;

[0051] To ensure retrieval efficiency, after a retrieval slice is read from the disk once, it will be stored in the memory without loss or update and directly retrieved by the processor. Therefore, when creating a retrieval slice, we must first ensure that the size of a single retrieval slice is smaller than the computer's memory; in addition, the average retrieval time of the processor in a single retrieval slice must be less than 200ms, and the time consumption can be reduced by reducing the size of a single retrieval slice; the above conditions can be used to preliminarily determine the size of a single retrieval slice, and the number of retrieval slices can be estimated by dividing the total amount of data in the retrieval pool by the size of a single retrieval slice.

[0052] The calculation formula for the center vector of a single retrieval slice is:

[0053] ,in is the center vector of the jth retrieval slice, m is the total number of retrieval slices, is the feature vector of the i-th document The pth component of , i takes values ​​from 1 to n, n is the total number of documents in the retrieval pool, p takes values ​​from 1 to w, w is the feature vector of the i-th document The number of components.

[0054] Step S13: Select the retrieval slice represented by the central vector with the highest correlation with the feature vector of the document, and establish a mapping relationship with the document;

[0055] This step is to make the documents in the same retrieval slice more relevant than those in other retrieval slices; the function for calculating the relevance between the document feature vector and the center vector is expressed as:

[0056] ,in Returns the document feature vector With the center vector The correlation degree, Represents the document feature vector The pth component of Represents the center vector The pth component of , p takes values ​​from 1 to w, w is a vector The number of components in the , They are , The mean of .

[0057] Use the above formula to calculate The correlation with each central vector is used to select the retrieval slice represented by the central vector with the highest correlation to establish a mapping relationship with the i-th document. After the mapping relationship is established, when the computer reads the retrieval slice, it will read all the document data mapped by the retrieval slice into the memory.

[0058] Step S20: storing the search slices in each service node in the distributed engine;

[0059] Each service node in the distributed engine has all the search slices, so each service node can process search requests individually or in parallel. In actual use, even if a node fails, it will not affect the normal operation of the search business. When the demand increases, the search efficiency of the distributed engine can be improved by adding service nodes.

[0060] Step S30: testing the retrieval efficiency of the distributed engine and optimizing the distributed engine according to the test results, specifically including the following sub-steps:

[0061] Step S31: prepare a retrieval test set based on real business in the production environment;

[0062] The retrieval test set includes the retrieval interface and retrieval parameters. Different document data can be retrieved according to different retrieval parameters.

[0063] Step S32: using the retrieval test set to perform a retrieval efficiency test on the distributed engine;

[0064] By calling the retrieval interface to send a retrieval request to the distributed engine, the service node of the distributed engine finds the corresponding document data from the retrieval slice according to the retrieval parameters and returns it, and records the response time of each request to reflect the retrieval efficiency.

[0065] Step S33: Optimizing the distributed engine by adjusting the number of retrieval slices during the test;

[0066] If the search slice in the distributed engine is too large, it will take too long for the service node to retrieve a single search slice; if the search slice is too small, the service node will increase the number of searches, which will also increase the search time. Therefore, during the test, it is necessary to continuously adjust the number of search slices and observe the average response time of the test samples in the test results until the response time curve reaches a minimum point and stop the test. It should be noted that each time the number of search slices is adjusted, the center vector of the search slice will be recalculated and the document data mapping operation will be re-performed.

[0067] Step S40: using the tuned distributed engine to process the search requests issued by the user in parallel and return the search results;

[0068] In order to further improve the retrieval efficiency, the retrieval request can also be split into multiple subtasks, which are executed in parallel by different service nodes. Specifically:

[0069] Step S41: splitting subtasks according to the parameters in the search request;

[0070] Before forwarding the request, set up a tool class to complete the subtask splitting. Define specific splitting strategies for the splittable parameters according to the needs. For example, if there are range descriptions such as parameters "startDate" and "endDate" in the retrieval request, this large range can be split into multiple small ranges to form multiple small-range query subtasks.

[0071] Step S42: Use a load balancer to distribute the split subtasks to multiple service nodes;

[0072] Add a load balancer to the gateway to distribute subtasks to multiple service nodes and implement parallel processing of retrieval requests.

[0073] Step S43: merge the search results of each service node and return them to the user;

[0074] Merge the search results of subtasks of each service node. This step is also implemented by setting up a tool class. For example, the subtasks are divided into subtasks based on the large range of "startDate" and "endDate". After execution, the subtasks are search results of small ranges. Then they are sorted and spliced ​​according to the start and end time of the small range, and then the merged search results are returned to the user.

[0075] Step S50: When the retrieval pool data changes, the distributed engine is synchronously updated, which specifically includes the following sub-steps:

[0076] Step S51: monitor the data change event of the retrieval pool, and start the distributed engine update transaction when the change event is triggered;

[0077] First, create a mirror for executing distributed engine update transactions. This mirror maps the distributed engine of the production environment. This step is to ensure that the update transaction does not affect the normal retrieval business of the production environment. Then set up a data change monitoring mechanism in the retrieval pool. Once there is a data change, the distributed engine update transaction is triggered.

[0078] Step S52: the distributed engine updates the transaction to replace or add the new data to the corresponding retrieval slice;

[0079] Extract the document feature vector of the new data. If the document ID of the new data exists in the original retrieval pool, the document will be logically deleted in the retrieval pool and the retrieval slice, and the deletion batch will be marked so that the transaction can be rolled back in case of an accident. The new data will then be stored in the retrieval pool and a retrieval slice will be assigned to it based on the new document feature vector. If the document ID of the new data does not exist in the original retrieval pool, it will be directly stored in the retrieval pool and a retrieval slice will be assigned to it based on its document feature vector.

[0080] Step S53: testing the retrieval efficiency of the distributed engine, and replacing the old version of the distributed engine after the test passes;

[0081] During the test, the distributed engine is debugged in the same way as S30. After debugging is completed, the distributed engine in the image is replaced in the production environment.

[0082] Embodiment 2

[0083] Embodiment 1 of the present invention provides a system for implementing data retrieval based on a distributed engine, including: a retrieval slice configuration module, a distributed engine configuration module, a distributed engine debugging module, a retrieval request processing module, and a distributed engine update module;

[0084] (1) A retrieval slice configuration module, which is used to map the document data in the retrieval pool to a number of retrieval slices, including a document feature extraction submodule, a retrieval slice creation submodule, and a document data mapping submodule;

[0085] 1. Document feature extraction submodule, used to extract feature vectors of document data in the retrieval pool;

[0086] Use the word segmenter to split the document into a word sequence, remove irrelevant words such as modal particles and auxiliary words, and then convert the word sequence into a vector sequence through the pre-trained large language model. Finally, these word vectors are fused into a feature vector. The word vector fusion formula is expressed as:

[0087] ,in represents the feature vector of the i-th document, represents the kth word vector in the i-th document, k ranges from 1 to iw, iw represents the number of word vectors in the i-th document, express The number of times it appears in the i-th document, represents the total number of terms in the i-th document, represents the number of irrelevant words in the i-th document, represents the unique identification vector of the i-th document, It is an adjustable parameter.

[0088] 2. A retrieval slice creation submodule, which is used to create several retrieval slices and set a center vector for each retrieval slice;

[0089] To ensure retrieval efficiency, after a retrieval slice is read from the disk once, it will be stored in the memory without loss or update and directly retrieved by the processor. Therefore, when creating a retrieval slice, we must first ensure that the size of a single retrieval slice is smaller than the computer's memory; in addition, the average retrieval time of the processor in a single retrieval slice must be less than 200ms, and the time consumption can be reduced by reducing the size of a single retrieval slice; the above conditions can be used to preliminarily determine the size of a single retrieval slice, and the number of retrieval slices can be estimated by dividing the total amount of data in the retrieval pool by the size of a single retrieval slice.

[0090] The calculation formula for the center vector of a single retrieval slice is:

[0091] ,in is the center vector of the jth retrieval slice, m is the total number of retrieval slices, is the feature vector of the i-th document The pth component of , i takes values ​​from 1 to n, n is the total number of documents in the retrieval pool, p takes values ​​from 1 to w, w is the feature vector of the i-th document The number of components.

[0092] 3. Document data mapping submodule, used to establish a mapping relationship between documents and retrieval slices according to the correlation between the document feature vector and the central vector of the retrieval slice;

[0093] The function for calculating the correlation between the document feature vector and the central vector is expressed as:

[0094] ,in Returns the document feature vector With the center vector The correlation degree, Represents the document feature vector The pth component of Represents the center vector The pth component of , p takes values ​​from 1 to w, w is a vector The number of components in the , They are , The mean of .

[0095] Use the above formula to calculate The correlation with each central vector is used to select the retrieval slice represented by the central vector with the highest correlation to establish a mapping relationship with the i-th document. After the mapping relationship is established, when the computer reads the retrieval slice, it will read all the document data mapped by the retrieval slice into the memory.

[0096] (2) Distributed engine configuration module, used to configure the number of service nodes in the distributed engine and the data they store;

[0097] Each service node in the distributed engine has all the search slices, so each service node can process search requests individually or in parallel. In actual use, even if a node fails, it will not affect the normal operation of the search business. When the demand increases, the search efficiency of the distributed engine can be improved by adding service nodes.

[0098] (3) Distributed engine debugging module, which is used to test the retrieval efficiency of the distributed engine and optimize the distributed engine according to the test results, including the distributed engine testing submodule and the distributed engine optimization submodule;

[0099] 1. Distributed engine test submodule, used to perform retrieval efficiency test on the distributed engine using the retrieval test set;

[0100] Prepare a retrieval test set based on the real business of the production environment. The retrieval test set contains the retrieval interface and retrieval parameters. Different document data can be retrieved according to different retrieval parameters.

[0101] By calling the retrieval interface to send a retrieval request to the distributed engine, the service node of the distributed engine finds the corresponding document data from the retrieval slice according to the retrieval parameters and returns it, and records the response time of each request to reflect the retrieval efficiency.

[0102] 2. Distributed engine optimization submodule, used to optimize the distributed engine by adjusting the number of retrieval slices during the test process;

[0103] If the search slice in the distributed engine is too large, it will take too long for the service node to retrieve a single search slice; if the search slice is too small, the service node will increase the number of searches, which will also increase the search time. Therefore, during the test, it is necessary to continuously adjust the number of search slices and observe the average response time of the test samples in the test results until the response time curve reaches a minimum point and stop the test. It should be noted that each time the number of search slices is adjusted, the center vector of the search slice will be recalculated and the document data mapping operation will be re-performed.

[0104] (4) A search request processing module, which is used to use the tuned distributed engine to process the search requests issued by users in parallel and return the search results. It includes a subtask splitting submodule, a subtask distribution submodule, and a search result merging submodule;

[0105] 1. Subtask splitting submodule, used to split subtasks according to the parameters in the retrieval request;

[0106] Before forwarding the request, set up a tool class to complete the subtask splitting. Define specific splitting strategies for the splittable parameters according to the needs. For example, if there are range descriptions such as parameters "startDate" and "endDate" in the retrieval request, this large range can be split into multiple small ranges to form multiple small-range query subtasks.

[0107] 2. Subtask distribution submodule, used to distribute the split subtasks to multiple service nodes using a load balancer;

[0108] Add a load balancer to the gateway to distribute subtasks to multiple service nodes and implement parallel processing of retrieval requests.

[0109] 3. Search result merging submodule, used to merge the search results of each service node and return them to the user;

[0110] Merge the search results of subtasks of each service node. This step is also implemented by setting up a tool class. For example, the subtasks are divided into subtasks based on the large range of "startDate" and "endDate". After execution, the subtasks are search results of small ranges. Then they are sorted and spliced ​​according to the start and end time of the small range, and then the merged search results are returned to the user.

[0111] (5) Distributed engine update module, used to synchronously update the distributed engine when the retrieval pool data changes, including:

[0112] I. Listen to the data change events of the retrieval pool and start the distributed engine update transaction when the change event is triggered;

[0113] First, create a mirror for executing distributed engine update transactions. This mirror maps the distributed engine of the production environment. This step is to ensure that the update transaction does not affect the normal retrieval business of the production environment. Then set up a data change monitoring mechanism in the retrieval pool. Once there is a data change, the distributed engine update transaction is triggered.

[0114] II. The distributed engine update transaction replaces or adds new data to the corresponding retrieval slice;

[0115] Extract the document feature vector of the new data. If the document ID of the new data exists in the original retrieval pool, the document will be logically deleted in the retrieval pool and the retrieval slice, and the deletion batch will be marked so that the transaction can be rolled back in case of an accident. The new data will then be stored in the retrieval pool and a retrieval slice will be assigned to it based on the new document feature vector. If the document ID of the new data does not exist in the original retrieval pool, it will be directly stored in the retrieval pool and a retrieval slice will be assigned to it based on its document feature vector.

[0116] III. Test the retrieval efficiency of the distributed engine and replace the old version of the distributed engine after the test passes;

[0117] Call the distributed engine debugging module to debug the updated distributed engine, and replace it with the production environment after debugging is completed.

[0118] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solution of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for implementing data retrieval based on a distributed engine, characterized in that: The method comprises: Step 1: Map the document data in the search pool to several search slices, which includes the following sub-steps: Extract the feature vector of the document data in the retrieval pool; use the tokenizer to segment the document into a word sequence, convert the word sequence into a vector sequence through the pre-trained large language model, and finally fuse these word vectors into a feature vector. The word vector fusion formula is expressed as: where f i represents the feature vector of the i-th document, T ik represents the kth word vector in the i-th document, k ranges from 1 to iw, iw represents the number of word vectors in the i-th document, T ikcount Indicates T ik The number of times it appears in the i-th document, T itotal represents the total number of terms in the i-th document, T iother represents the number of irrelevant words in the i-th document, D i represents the unique identification vector of the i-th document, and τ is an adjustable parameter; Create several retrieval slices and set a center vector for each retrieval slice; the calculation formula for the center vector of a single retrieval slice is: Among them C j is the center vector of the jth retrieval slice, m is the total number of retrieval slices, and f ip is the feature vector f of the i-th document i The pth component of , i takes values ​​from 1 to n, n is the total number of documents in the retrieval pool, p takes values ​​from 1 to w, w is the feature vector f of the i-th document i The number of middle components; The retrieval slice represented by the central vector with the highest correlation with the feature vector of the document is selected, and a mapping relationship is established with the document; the function for calculating the correlation between the feature vector of the document and the central vector is expressed as: Where G(f i ,C j ) Returns the document feature vector fi and the center vector C j The correlation degree, f ip Represents the document feature vector f i The pth component of jp Represents the center vector C j The pth component of , p ranges from 1 to w, w is the vector f i The number of components in the f i , C j The mean of Step 2: Store the search slices in each service node in the distributed engine; Step 3: Test the retrieval efficiency of the distributed engine and optimize the distributed engine based on the test results. Step 4: Use the tuned distributed engine to process the search requests sent by users in parallel and return the search results; Step 5: When the retrieval pool data changes, the distributed engine is updated synchronously.

2. A method for implementing data retrieval based on a distributed engine according to claim 1, characterized in that: Test the retrieval efficiency of the distributed engine and tune the distributed engine based on the test results. The specific steps include the following: Prepare a retrieval test set based on real business in the production environment; Use the retrieval test set to perform retrieval efficiency tests on the distributed engine; During the test, the distributed engine was optimized by adjusting the number of retrieval slices.

3. The method for implementing data retrieval based on a distributed engine according to claim 1, characterized in that: Use the tuned distributed engine to process the search requests sent by users in parallel, which includes the following sub-steps: Split the subtasks according to the parameters in the retrieval request; Use a load balancer to distribute the split subtasks to multiple service nodes; Merge the search results of each service node and return them to the user.

4. The method for implementing data retrieval based on a distributed engine according to claim 1, characterized in that: When the retrieval pool data changes, the distributed engine is updated synchronously, which includes the following sub-steps: Listen to the data change events of the retrieval pool and start the distributed engine update transaction when the change event is triggered; The distributed engine update transaction replaces or adds new data to the corresponding retrieval slice; Test the retrieval efficiency of the distributed engine and replace the old version of the distributed engine after the test passes.

5. A system for implementing data retrieval based on a distributed engine, characterized in that: The system includes: a retrieval slice configuration module, a distributed engine configuration module, a distributed engine debugging module, a retrieval request processing module, and a distributed engine update module; The retrieval slice configuration module is used to map the document data in the retrieval pool to several retrieval slices, including: Extract the feature vector of the document data in the retrieval pool; use the tokenizer to segment the document into a word sequence, convert the word sequence into a vector sequence through the pre-trained large language model, and finally fuse these word vectors into a feature vector. The word vector fusion formula is expressed as: where f i represents the feature vector of the i-th document, T ik represents the kth word vector in the i-th document, k ranges from 1 to iw, iw represents the number of word vectors in the i-th document, T ikcount Indicates T ik The number of times it appears in the i-th document, T itotal represents the total number of terms in the i-th document, T iother represents the number of irrelevant words in the i-th document, D i represents the unique identification vector of the i-th document, and τ is an adjustable parameter; Create several retrieval slices and set a center vector for each retrieval slice; the calculation formula for the center vector of a single retrieval slice is: Among them C j is the center vector of the jth retrieval slice, m is the total number of retrieval slices, and f ip is the feature vector f of the i-th document i The pth component of , i takes values ​​from 1 to n, n is the total number of documents in the retrieval pool, p takes values ​​from 1 to w, w is the feature vector f of the i-th document i The number of middle components; The retrieval slice represented by the central vector with the highest correlation with the feature vector of the document is selected, and a mapping relationship is established with the document; the function for calculating the correlation between the feature vector of the document and the central vector is expressed as: Where G(f i ,C j ) Returns the document feature vector fi and the center vector C j The correlation degree, f ip Represents the document feature vector f i The pth component of jp Represents the center vector C j The pth component of , p ranges from 1 to w, w is the vector f i The number of components in the f i , C j The mean of Distributed engine configuration module, used to configure the number of service nodes in the distributed engine and the data they store; Distributed engine debugging module, used to test the retrieval efficiency of the distributed engine and tune the distributed engine according to the test results; The search request processing module is used to use the tuned distributed engine to process the search requests issued by users in parallel and return the search results; The distributed engine update module is used to synchronously update the distributed engine when the retrieval pool data changes.

6. A system for implementing data retrieval based on a distributed engine according to claim 5, characterized in that: The distributed engine debugging module includes a distributed engine testing submodule and a distributed engine optimization submodule; A distributed engine test submodule, used to perform retrieval efficiency test on the distributed engine using a retrieval test set; The distributed engine optimization submodule is used to optimize the distributed engine by adjusting the number of retrieval slices during the test process.

7. A system for implementing data retrieval based on a distributed engine according to claim 5, characterized in that: The search request processing module includes a subtask splitting submodule, a subtask distribution submodule, and a search result merging submodule; The subtask splitting submodule is used to split subtasks according to the parameters in the retrieval request; The subtask distribution submodule is used to distribute the split subtasks to multiple service nodes using a load balancer; The search result merging submodule is used to merge the search results of each service node and return them to the user.