Method, system, terminal and storage medium for constructing mass data rapid retrieval service

By transferring the read permission of the relational database to the search server and using data warehouse tools to update the index in real time, the problem of low query efficiency of massive data in traditional databases is solved, real-time second-level query of massive data is realized, and the user experience and System stability.

CN113821573BActive Publication Date: 2024-09-20JINAN INSPUR DATA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110998491.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-27
Publication Date
2024-09-20
Estimated Expiration
2041-08-27

AI Technical Summary

Technical Problem

Traditional relational databases have low query efficiency when processing massive amounts of data, resulting in system performance degradation and potential crashes. Existing solutions such as sharding databases and tables, establishing indexes, optimizing SQL statements, etc. cannot effectively improve the performance of hundreds of millions to billions of data. Query speed affects enterprise business development.

Method used

Transfer the read permission of the relational database to the search server, obtain hot search terms and cache target data through monitoring query business, use data warehouse tools to create temporary tables and merge full indexes, and update the index in real time, separate read and write traffic to facilitate expansion, use Log files update data synchronously.

Benefits of technology

It realizes real-time second-level query of massive data, improves user experience, significantly improves business operation efficiency, reduces operation and maintenance costs, enhances system stability, and creates more value.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113821573B
    Figure CN113821573B
Patent Text Reader

Abstract

The present invention provides a method, system, terminal and storage medium for constructing a massive data rapid retrieval service, including: transferring the read permission of a relational database to a search server; monitoring the query service of the search server, obtaining hot search terms, and caching the target data of the hot search terms; using a data warehouse tool to create a temporary table to merge the associated tables of the full index, updating the full index content based on the temporary table, and importing the updated full index into the search server; obtaining the updated data of the relational database by monitoring the log file of the relational database, and synchronously updating the updated data to the index of the search server. The present invention realizes real-time second-level query of massive data, brings a good experience to users, significantly improves customer value, improves overall business operation efficiency, reduces enterprise operation and maintenance costs, improves system stability, and thus creates more value.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of mass data retrieval, and in particular to a method, system, terminal and storage medium for constructing a mass data rapid retrieval service. Background Art

[0002] With the rapid development of mobile Internet, online business of enterprises has flourished, and the amount of data has increased exponentially. Traditional relational databases such as MySQL can no longer meet the growing business needs. It takes longer and longer to query from the database. In addition, the performance of the database system and the ability to organize and manage data are greatly weakened, and even cause the system to crash. At present, some commonly used methods for solving massive data queries are as follows: (1) sharding; (2) creating indexes and optimizing indexes; (3) optimizing query SQL statements; (4) increasing virtual memory. These commonly used methods for solving massive data queries can only reduce the time spent on massive data queries to a certain extent. When the data scale is hundreds of millions, even billions, or tens of billions, the operating efficiency is still very slow, resulting in a poor user experience and seriously affecting the business development of enterprises. Summary of the invention

[0003] In view of the problem that the existing retrieval methods have low operating efficiency when retrieving massive data, the present invention provides a method, system, terminal and storage medium for constructing a massive data fast retrieval service to solve the above technical problem.

[0004] In a first aspect, the present invention provides a method for constructing a mass data rapid retrieval service, comprising:

[0005] Transfer the read permissions of the relational database to the search server;

[0006] Monitor the query business of the search server, obtain hot search terms, and cache the target data of hot search terms;

[0007] Using a data warehouse tool to create a temporary table to merge the associated tables of the full index, updating the full index content based on the temporary table, and importing the updated full index into the search server;

[0008] The updated data of the relational database is obtained by monitoring the log file of the relational database, and the updated data is synchronously updated to the index of the search server.

[0009] Furthermore, the read permission of the relational database is transferred to the search server, including:

[0010] Grant insert, update, and delete permissions to relational database tables;

[0011] Authorize the search database to read the relational database.

[0012] Further, the query service of the search server is monitored, hot search terms are obtained, and target data of the hot search terms are cached, including:

[0013] specifying a first period, a second period, a first refresh cycle, and a second refresh cycle;

[0014] Periodically collect, according to the first refresh cycle, search terms with hotspot rankings within a specified digit range within the first period as a first search term group, and cache target data of the first search term group;

[0015] The search terms with hot spot ranking within a specified digit range are regularly collected within the second period according to the second refresh cycle as the second search term group, and the target data of the second search term group is cached.

[0016] Furthermore, a temporary table is created by using a data warehouse tool to merge the associated tables of the full index, the full index content is updated based on the temporary table, and the updated full index is imported into the search server, including:

[0017] Use data migration tools to synchronize data from relational databases to data warehouse tools;

[0018] The data warehouse tool is used to merge the data of the interrelated tables to generate a temporary table, and the temporary table is saved to the distributed storage system, so that the index processing task reads the data of the temporary table from the distributed storage system and writes the read data to the search server.

[0019] Furthermore, a temporary table is created by using a data warehouse tool to merge the associated tables of the full index, the full index content is updated based on the temporary table, and the updated full index is imported into the search server, including:

[0020] The system time is collected regularly. If the current system time is within the set update period, the full index is updated.

[0021] Further, acquiring update data of the relational database by monitoring a log file of the relational database, and synchronously updating the update data to the index of the search server includes:

[0022] By enabling the monitoring log mechanism of the relational server, data changes in the relational database are written to the log file;

[0023] Monitor the log files of the relational database, read the binary events of the log files, obtain the updated data by parsing the binary events, and convert the updated data into business objects and write them into the message queue;

[0024] The index update program is set to subscribe to the message queue and the update data is written into the search server index.

[0025] In a second aspect, the present invention provides a system for constructing a massive data rapid retrieval service, comprising:

[0026] A read-write separation unit, used to transfer the read permission of the relational database to the search server;

[0027] A hotspot cache unit, used to monitor the query business of the search server, obtain hotspot search terms, and cache target data of the hotspot search terms;

[0028] A first updating unit, configured to use a data warehouse tool to create a temporary table to merge the associated tables of the full index, update the full index content based on the temporary table, and import the updated full index into the search server;

[0029] The second updating unit is used to obtain update data of the relational database by monitoring the log file of the relational database, and synchronously update the update data to the index of the search server.

[0030] Furthermore, the read-write separation unit is used to:

[0031] Grant insert, update, and delete permissions to relational database tables;

[0032] Authorize the search database to read the relational database.

[0033] Furthermore, the hotspot cache unit is used to:

[0034] specifying a first period, a second period, a first refresh cycle, and a second refresh cycle;

[0035] Periodically collect, according to the first refresh cycle, search terms with hotspot rankings within a specified digit range within the first period as a first search term group, and cache target data of the first search term group;

[0036] The search terms with hot spot ranking within a specified digit range are regularly collected within the second period according to the second refresh cycle as the second search term group, and the target data of the second search term group is cached.

[0037] Furthermore, the first updating unit is used for:

[0038] Use data migration tools to synchronize data from relational databases to data warehouse tools;

[0039] The data warehouse tool is used to merge the data of the interrelated tables to generate a temporary table, and the temporary table is saved to the distributed storage system, so that the index processing task reads the data of the temporary table from the distributed storage system and writes the read data to the search server.

[0040] Furthermore, the first updating unit is used for:

[0041] The system time is collected regularly. If the current system time is within the set update period, the full index is updated.

[0042] Furthermore, the second updating unit is used for:

[0043] By enabling the monitoring log mechanism of the relational server, data changes in the relational database are written to the log file;

[0044] Monitor the log files of the relational database, read the binary events of the log files, obtain the updated data by parsing the binary events, and convert the updated data into business objects and write them into the message queue;

[0045] The index update program is set to subscribe to the message queue and the update data is written into the search server index.

[0046] In a third aspect, a terminal is provided, including:

[0047] processor, memory, wherein:

[0048] The memory is used to store computer programs.

[0049] The processor is used to call and run the computer program from the memory, so that the terminal executes the above-mentioned terminal method.

[0050] According to a fourth aspect, a computer storage medium is provided, wherein the computer-readable storage medium stores instructions, and when the instructions are executed on a computer, the computer executes the methods described in the above aspects.

[0051] The beneficial effects of the present invention are:

[0052] The method, system, terminal and storage medium for constructing a massive data rapid retrieval service provided by the present invention separate the read and write traffic by separating the channels of read and write operations, facilitate the separate expansion of read and write traffic, improve the reading speed of hot data by caching hot data, and improve the index retrieval efficiency of the search server by updating the full index and updating the index in real time. The present invention realizes real-time second-level query of massive data, brings a good experience to users, significantly improves customer value, improves overall business operation efficiency, reduces enterprise operation and maintenance costs, improves system stability, and thus creates more value.

[0053] In addition, the invention has a reliable design principle, a simple structure and a very broad application prospect. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] 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, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0055] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention.

[0056] Figure 2 is a schematic block diagram of a system according to an embodiment of the present invention.

[0057] Figure 3 A schematic diagram of the structure of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0058] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only 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 ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0059] The key terms appearing in the present invention are explained below.

[0060] Hive is a data warehouse tool based on Hadoop, which is used for data extraction, transformation and loading. It is a mechanism for storing, querying and analyzing large-scale data stored in Hadoop. The hive data warehouse tool can map structured data files into a database table, and provides SQL query functions, which can convert SQL statements into MapReduce tasks for execution. The advantage of Hive is that it has a low learning cost and can achieve fast MapReduce statistics through similar SQL statements, making MapReduce simpler without having to develop special MapReduce applications. Hive is very suitable for statistical analysis of data warehouses.

[0061] MapReduce is a programming model for parallel computing of large-scale data sets (greater than 1TB). The concepts "Map" and "Reduce" are their main ideas, which are borrowed from functional programming languages, and features borrowed from vector programming languages. It greatly facilitates programmers to run their programs on distributed systems without knowing distributed parallel programming. The current software implementation specifies a Map function to map a set of key-value pairs into a new set of key-value pairs, and specifies a concurrent Reduce function to ensure that each of the mapped key-value pairs shares the same key group.

[0062] Structured Query Language (SQL) is a special-purpose programming language. It is a database query and programming language used to access data and query, update, and manage relational database systems. Structured Query Language is a high-level non-procedural programming language that allows users to work on high-level data structures. It does not require users to specify the storage method for data, nor does it require users to understand the specific data storage method. Therefore, different database systems with completely different underlying structures can use the same structured query language as an interface for data input and management. Structured query language statements can be nested, which makes it extremely flexible and powerful.

[0063] MySQL Database Service is a fully managed database service that can be used to deploy cloud-native applications using the world's most popular open source database. It is 100% developed, managed and supported by MySQL.

[0064] Sqoop is a tool used to transfer data between Hadoop and relational databases. It can import data from a relational database (such as MySQL, Oracle, Postgres, etc.) into the HDFS of the Hadoop distributed system, and can also import data from HDFS into a relational database.

[0065] An index is a structure that sorts the values ​​of one or more columns in a database table (for example, the name column of the employee table). For example, a query like this: select * from table1 where id = 10000. If there is no index, the entire table must be traversed until the row with ID equal to 10000 is found; after an index is created (it must be an index built on the ID column), it can be searched in the index. Since the index is optimized by a certain algorithm, the number of searches is much less. It can be seen that the index is used for positioning. From the perspective of data search implementation, the index is also another type of file / record, which contains various records that can indicate related data records. Among them, each index has a corresponding search code, and any subset of the character segment can form a search code. In this way, the index is equivalent to a collection of all data directory items, which can provide various effective support required for positioning for all data directory items with a given search code value. The full index is an index composed of all data in the system.

[0066] HBase is a distributed, column-oriented open source database. The technology is derived from the Google paper "Bigtable: A Distributed Storage System for Structured Data" written by Fay Chang. Just as Bigtable takes advantage of the distributed data storage provided by the Google File System, HBase provides similar capabilities on top of Hadoop. HBase is a subproject of the Apache Hadoop project. HBase is different from general relational databases. It is a database suitable for unstructured data storage. Another difference is that HBase is based on columns rather than rows.

[0067] In order to overcome the problem that the existing technology does not meet the customer's demand for the retrieval speed of massive data, the present invention proposes a method for constructing a massive data fast retrieval service based on Elasticsearch (ES, search server). Elasticsearch is a distributed, REST-style search and data analysis engine based on the open source Apache Lucene. It has the following four characteristics: (1) Horizontally scalable, naturally supports distributed storage, and can easily expand new servers to the ES cluster; (2) It has various complex query capabilities and uses efficient inverted indexes to provide full-text retrieval, synonym processing, relevance ranking, complex data analysis, and rich massive data query functions; (3) Using the sharding mechanism, the same index is divided into multiple shards to improve processing efficiency; (4) High availability, by using the replica mechanism, as well as automatic detection and recovery of faults, to ensure high availability of ES services.

[0068] The real-time high-performance query solution for massive data proposed in the present invention realizes real-time query of massive data in seconds through the read-write separation architecture, heat cache, full index update module, and real-time index update module, which brings a good experience to users and significantly improves customer value. The method of the present invention improves the overall business operation efficiency, reduces the enterprise operation and maintenance costs, improves the system stability, and thus creates more value.

[0069] Figure 1 is a schematic flow chart of a method according to an embodiment of the present invention. Figure 1 The execution entity can build a system for a rapid retrieval service of massive data.

[0070] like Figure 1 As shown, the method includes:

[0071] Step 110, transferring the read permission of the relational database to the search server;

[0072] Step 120, monitoring the query service of the search server, obtaining hot search terms, and caching target data of the hot search terms;

[0073] Step 130: Use a data warehouse tool to create a temporary table to merge the associated tables of the full index, update the full index content based on the temporary table, and import the updated full index into the search server;

[0074] Step 140: Acquire update data of the relational database by monitoring the log file of the relational database, and synchronously update the update data to the index of the search server.

[0075] To facilitate understanding of the present invention, the following is a further description of the method for constructing a massive data rapid retrieval service provided by the present invention based on the principle of the method for constructing a massive data rapid retrieval service of the present invention and the process of constructing a massive data rapid retrieval service in the embodiment.

[0076] Specifically, the method for constructing a massive data rapid retrieval service includes:

[0077] S1. Transfer the read permission of the relational database to the search server.

[0078] Grants insert, update, and delete permissions to relational database tables; grants the search database read permissions to the relational database.

[0079] Read-write separation. Most system services are more read than write. For example, the number of views of a product on an e-commerce platform is definitely much larger than the number of orders, and the number of requests for watching short videos is definitely larger than the number of requests for posting short videos. In order to cope with the growth of data, the present invention distinguishes between read traffic and write traffic. MySQL only supports INSERT / UPDATE / DELETE data operations, and queries are directed to ES services, which is convenient for separate expansion of read and write traffic.

[0080] S2. Monitor the query service of the search server, obtain hot search terms, and cache target data of the hot search terms.

[0081] Specify a first period, a second period, a first refresh cycle, and a second refresh cycle; regularly collect search terms within the first period and whose hot spots are ranked within a specified range of digits according to the first refresh cycle as a first search phrase group, and cache target data of the first search phrase group; regularly collect search terms within the second period and whose hot spots are ranked within a specified range of digits according to the second refresh cycle as a second search phrase group, and cache target data of the second search phrase group.

[0082] It is not easy to quickly retrieve content from massive data. According to the 80 / 20 rule, 80% of queries come from 20% of search terms. Therefore, you can create a cache based on the popularity of search terms to avoid reading disk files. Build 1-hour and 24-hour popularity caches respectively. Count the frequency of search terms in the last hour, take the top 100 popularity terms, and refresh the cache regularly at a frequency of 5 minutes. Use the same method to refresh the popularity cache of the last 24 hours at a frequency of 1 hour.

[0083] S3. Use a data warehouse tool to create a temporary table to merge the associated tables of the full index, update the full index content based on the temporary table, and import the updated full index into the search server.

[0084] Collect system time regularly. If the current system time is within the set update period, update the full index. Use data migration tools to synchronize data in relational databases to data warehouse tools. Use data warehouse tools to merge interrelated table data to generate temporary tables, and save temporary tables to distributed storage systems so that index processing tasks can read data from temporary tables in distributed storage systems and write the read data to search servers.

[0085] A query contains different information about an entity in various aspects. For example, a product contains classification, brand, inventory, attribute information, etc., which are generally stored in several tables in MySQL. These tables need to be merged according to foreign keys first, and then this information is written into the ES index. However, for tens of millions of data, performing table merging in MySQL will cause great pressure on the database and affect system performance. The present invention solves this problem by building a data storage middle layer through Hive. Hive (data warehouse tool) can convert SQL statements (structured query language) into MapReduce tasks (mapping specification tasks) for execution. MapReduce is a parallel computing programming model specifically for large-scale data sets. The sqoop tool is used to synchronize the data in MySQL to hive. Hive merges the interrelated table data to generate a temporary table and saves it in hbase, triggering the execution of the index processing task. The index processing task reads data from hbase in parallel for processing and then writes it into ES. Due to the huge amount of data, this update module is executed every day when the system business is idle (such as three o'clock in the morning).

[0086] S4. Acquire update data of the relational database by monitoring the log file of the relational database, and synchronously update the update data to the index of the search server.

[0087] By enabling the monitoring log mechanism of the relational server, the data changes of the relational database are written into the log file; the log file of the relational database is monitored, the binary events of the log file are read, the updated data is obtained by parsing the binary events, and the updated data is converted into business objects and written into the message queue; by setting the index update program to subscribe to the message queue, the updated data is written into the search server index.

[0088] Business information may be modified at any time, and the ES index needs to be updated in real time. The present invention achieves this goal through the function of MySQL binlog log. Start the MySQL binlog mechanism, write the data changes to the log file, the monitoring processing program listens to the MySQL binlog log, reads the MySQL binary log events, parses the events to obtain the modified data and converts it into a business object, and writes it to the message queue MQ. The index update program writes the data update to the ES index by subscribing to MQ.

[0089] like Figure 2 As shown, the system 200 includes:

[0090] The read-write separation unit 210 is used to transfer the read permission of the relational database to the search server;

[0091] The hotspot cache unit 220 is used to monitor the query service of the search server, obtain hotspot search terms, and cache the target data of the hotspot search terms;

[0092] The first updating unit 230 is used to create a temporary table using a data warehouse tool to merge the associated tables of the full index, update the full index content based on the temporary table, and import the updated full index into the search server;

[0093] The second updating unit 240 is configured to obtain update data of the relational database by monitoring the log file of the relational database, and synchronously update the update data to the index of the search server.

[0094] Optionally, as an embodiment of the present invention, the read-write separation unit is used to:

[0095] Grant insert, update, and delete permissions to relational database tables;

[0096] Authorize the search database to read the relational database.

[0097] Optionally, as an embodiment of the present invention, the hotspot cache unit is used to:

[0098] specifying a first period, a second period, a first refresh cycle, and a second refresh cycle;

[0099] Periodically collect, according to the first refresh cycle, search terms with hotspot rankings within a specified digit range within the first period as a first search term group, and cache target data of the first search term group;

[0100] The search terms with hot spot ranking within a specified digit range are regularly collected within the second period according to the second refresh cycle as the second search term group, and the target data of the second search term group is cached.

[0101] Optionally, as an embodiment of the present invention, the first updating unit is used to:

[0102] Use data migration tools to synchronize data from relational databases to data warehouse tools;

[0103] The data warehouse tool is used to merge the data of the interrelated tables to generate a temporary table, and the temporary table is saved to the distributed storage system, so that the index processing task reads the data of the temporary table from the distributed storage system and writes the read data to the search server.

[0104] Optionally, as an embodiment of the present invention, the first updating unit is used to:

[0105] The system time is collected regularly. If the current system time is within the set update period, the full index is updated.

[0106] Optionally, as an embodiment of the present invention, the second updating unit is used for:

[0107] By enabling the monitoring log mechanism of the relational server, data changes in the relational database are written to the log file;

[0108] Monitor the log files of the relational database, read the binary events of the log files, obtain the updated data by parsing the binary events, and convert the updated data into business objects and write them into the message queue;

[0109] The index update program is set to subscribe to the message queue and the update data is written into the search server index.

[0110] Figure 3 The present invention provides a schematic diagram of the structure of a terminal 300 according to an embodiment of the present invention. The terminal 300 can be used to execute the method for constructing a mass data rapid retrieval service according to an embodiment of the present invention.

[0111] The terminal 300 may include: a processor 310, a memory 320 and a communication unit 330. These components communicate via one or more buses. Those skilled in the art will appreciate that the server structure shown in the figure does not limit the present invention, and it may be a bus structure or a star structure, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.

[0112] The memory 320 can be used to store the execution instructions of the processor 310, and the memory 320 can be implemented by any type of volatile or non-volatile storage terminal or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic disk or optical disk. When the execution instructions in the memory 320 are executed by the processor 310, the terminal 300 can perform some or all of the steps in the following method embodiments.

[0113] The processor 310 is the control center of the storage terminal, and uses various interfaces and lines to connect various parts of the entire electronic terminal. It runs or executes software programs and / or modules stored in the memory 320, and calls data stored in the memory to perform various functions of the electronic terminal and / or process data. The processor can be composed of an integrated circuit (IC), for example, it can be composed of a single packaged IC, or it can be composed of a plurality of packaged ICs with the same or different functions. For example, the processor 310 can include only a central processing unit (CPU). In the embodiment of the present invention, the CPU can be a single computing core or multiple computing cores.

[0114] The communication unit 330 is used to establish a communication channel so that the storage terminal can communicate with other terminals, receive user data sent by other terminals or send user data to other terminals.

[0115] The present invention also provides a computer storage medium, wherein the computer storage medium may store a program, and when the program is executed, the program may include some or all of the steps in each embodiment provided by the present invention. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM).

[0116] Therefore, the present invention separates the read and write traffic by separating the channels of read operations and write operations, which facilitates the separate expansion of read and write traffic, improves the reading speed of hot data by caching hot data, and improves the index retrieval efficiency of the search server by updating the full index and updating the index in real time. The present invention realizes real-time second-level query of massive data, brings a good experience to users, significantly improves customer value, improves overall business operation efficiency, reduces enterprise operation and maintenance costs, improves system stability, and thus creates more value. The technical effects that can be achieved by this embodiment can be found in the description above, and will not be repeated here.

[0117] Those skilled in the art can clearly understand that the technology in the embodiments of the present invention can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present invention, in essence or in other words, the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, and other media that can store program codes, including several instructions for enabling a computer terminal (which can be a personal computer, a server, or a second terminal, a network terminal, etc.) to perform all or part of the steps of the methods described in each embodiment of the present invention.

[0118] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the terminal embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiment.

[0119] In the several embodiments provided by the present invention, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the system embodiments described above are only schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.

[0120] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0121] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0122] Although the present invention has been described in detail by referring to the accompanying drawings and in combination with the preferred embodiments, the present invention is not limited thereto. Without departing from the spirit and essence of the present invention, a person of ordinary skill in the art may make various equivalent modifications or substitutions to the embodiments of the present invention, and these modifications or substitutions shall be within the scope of the present invention. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed by the present invention, and all of these shall be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.

Claims

1. A method for constructing a massive data rapid retrieval service, characterized in that: include: Transfer the read permissions of the relational database to the search server; Monitor the query business of the search server, obtain hot search terms, and cache the target data of hot search terms; Using a data warehouse tool to create a temporary table to merge the associated tables of the full index, updating the full index content based on the temporary table, and importing the updated full index into the search server; Acquire update data of the relational database by monitoring the log file of the relational database, and synchronously update the update data to the index of the search server; Transfer the read permissions of the relational database to the search server, including: Grant insert, update, and delete permissions to relational database tables; Authorize the search database to read the relational database; Monitor the query business of the search server, obtain hot search terms, and cache the target data of hot search terms, including: specifying a first period, a second period, a first refresh cycle, and a second refresh cycle; Periodically collect, according to the first refresh cycle, search terms with hotspot rankings within a specified digit range within the first period as a first search term group, and cache target data of the first search term group; Periodically collect the search terms with hotspot ranking within the specified digit range within the second period according to the second refresh cycle as the second search term group, and cache the target data of the second search term group; Using a data warehouse tool to create a temporary table to merge the associated tables of the full index, updating the full index content based on the temporary table, and importing the updated full index into the search server, including: Use data migration tools to synchronize data from relational databases to data warehouse tools; Using data warehouse tools to merge interrelated table data to generate a temporary table, and save the temporary table to a distributed storage system, so that the index processing task reads the data of the temporary table from the distributed storage system and writes the read data to the search server; Using a data warehouse tool to create a temporary table to merge the associated tables of the full index, updating the full index content based on the temporary table, and importing the updated full index into the search server, including: Collect system time regularly. If the current system time is within the set update period, update the full index. Acquiring updated data of the relational database by monitoring a log file of the relational database, and synchronously updating the updated data to an index of a search server, including: By enabling the monitoring log mechanism of the relational server, data changes in the relational database are written to the log file; Monitor the log files of the relational database, read the binary events of the log files, obtain the updated data by parsing the binary events, and convert the updated data into business objects and write them into the message queue; The index update program is set to subscribe to the message queue and the update data is written into the search server index.

2. A system for constructing a massive data rapid retrieval service, characterized in that: include: A read-write separation unit, used to transfer the read permission of the relational database to the search server; A hotspot cache unit, used to monitor the query business of the search server, obtain hotspot search terms, and cache target data of the hotspot search terms; specifying a first period, a second period, a first refresh cycle, and a second refresh cycle; Periodically collect, according to the first refresh cycle, search terms with hotspot rankings within a specified digit range within the first period as a first search term group, and cache target data of the first search term group; Periodically collect the search terms with hotspot ranking within the specified digit range within the second period according to the second refresh cycle as the second search term group, and cache the target data of the second search term group; A first updating unit, configured to use a data warehouse tool to create a temporary table to merge the associated tables of the full index, update the full index content based on the temporary table, and import the updated full index into the search server; Use data migration tools to synchronize data from relational databases to data warehouse tools; Using data warehouse tools to merge interrelated table data to generate a temporary table, and save the temporary table to a distributed storage system, so that the index processing task reads the data of the temporary table from the distributed storage system and writes the read data to the search server; A second updating unit, configured to obtain update data of the relational database by monitoring a log file of the relational database, and synchronously update the update data to an index of the search server; The read-write separation unit is used for: Grant insert, update, and delete permissions to relational database tables; Authorize the search database to read the relational database.

3. A terminal, characterized in that: include: processor; A memory for storing execution instructions of the processor; Wherein, the processor is configured to execute the method of claim 1.

4. A computer-readable storage medium storing a computer program, characterized in that: When the program is executed by a processor, the method according to claim 1 is implemented.