Data retrieval method and device
By introducing a multi-level index matching data retrieval method in the data middle platform software, the problem of low data retrieval efficiency in the prior art is solved, and a fast and simple data retrieval effect is achieved.
Patent Information
- Application Number
- CN202211450616.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-18
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2042-11-18
AI Technical Summary
The existing data middle platform software is inefficient in data retrieval and cannot quickly find relevant data content based on business keywords, resulting in users needing to retrieve and process structured and unstructured data in a decentralized manner.
Provide a data retrieval method, by receiving a search request from a user terminal device, determine the search type and search terms, and use preset structured basic information index, dimension dictionary index and full-text index to perform multi-level matching to generate search results.
It improves data retrieval efficiency, allows the input of search terms in an input box, and directly obtains the search results of structured and unstructured data, simplifies the user experience, and is especially suitable for the structured and unstructured large amounts of data stored in the middle platform of data.
Smart Images

Figure BDA0003950492440000111 
Figure HDA0003950492450000011 
Figure HDA0003950492450000021
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a data retrieval method and device. Background Art
[0002] At present, mainstream data middle-office software can create data lake warehouses to collect and store various structured and unstructured data for various internal business systems and external data, and provide data services such as data analysis based on the stored data.
[0003] However, various types of data and service applications are managed separately, and some have separate search functions. For example, to search for unstructured documents, users need to search in various functions or in the database; the search function only targets basic information such as the title and description of the searched content, and cannot quickly find all relevant data content based on business keywords, resulting in low data retrieval efficiency. Summary of the invention
[0004] The embodiments of the present application provide a data retrieval method and device for solving the problem of low data retrieval efficiency.
[0005] The present application embodiment adopts the following technical solutions:
[0006] On the one hand, an embodiment of the present application provides a data retrieval method, the method comprising: receiving a retrieval request from a user terminal device, and determining a current retrieval type and a retrieval term to be retrieved according to the retrieval request; if the retrieval type is a structured data retrieval, matching the retrieval term according to a preset structured basic information index to obtain a first matching result; the preset structured basic information index is related to a title name and a content description; judging whether there is an unmatched first unmatched retrieval term according to the first matching result; if so, matching the first unmatched retrieval term according to a preset dimensional dictionary index; the dimensional dictionary index and the structure The method is related to the dimension of the structured data; if the corresponding matching dimension is matched, the target basic information of the structured data where the matching dimension is located is determined; according to the target basic information and the first matching result, a second matching result is obtained; according to the second matching result, it is determined whether there is an unmatched second unmatched search term; if so, the second unmatched search term is matched according to the preset structured full-text index to obtain a full-text matching value; the preset structured full-text index is related to the content of the structured data; the target dimension of the structured data where the full-text matching value is located is determined; according to the target dimension and the second matching result, a search result of the search term is generated.
[0007] In one example, after determining the current search type and the search term to be searched according to the search request, the method also includes: if the search type is unstructured data retrieval, matching the search term according to a preset unstructured basic information index to obtain a third matching result; judging whether there is an unmatched third unmatched search term according to the third matching result; if so, matching the third unmatched search term according to a preset unstructured full-text index to obtain a full-text matching value; determining the target basic information of the structured data where the full-text matching value is located; and generating a search result for the search term according to the target basic information of the structured data where the full-text matching value is located and the third matching result.
[0008] In one example, obtaining a second matching result based on the target basic information and the first matching result specifically includes: if the first matching result is not empty, then in the first matching result, matching the target basic information through the basic information index to obtain a second matching result; if the first matching result is empty, then generating a second matching result based on the structured data where the matching dimension is located.
[0009] In one example, generating the search result of the search term based on the target dimension and the second matching result specifically includes: if the second matching result is non-empty, then in the second matching result, matching the target dimension through the dimension dictionary index to generate the search result of the search term; if the second matching result is empty, then generating the search result of the search term based on the structured data where the full-text matching value is located.
[0010] In one example, the search result of the search term is generated based on the target dimension and the second matching result. After the search result of the search term is generated, the method further includes: if there are multiple search results, determining the number of searches for each search result; sorting each search result in descending order of the number of searches; and displaying each search result to the user terminal device according to the sorting result.
[0011] In one example, displaying each search result to the user terminal device based on the sorting result specifically includes: determining whether the search term includes a dimensional condition in a preset form; the dimensional condition is related to the matching dimension; if so, filtering the search content in each search result based on the dimensional condition; and displaying each filtered search result to the user terminal device based on the sorting result.
[0012] In one example, before receiving a retrieval request from a user terminal device, the method also includes: constructing a database having a structured data storage area and an unstructured storage area; uploading sample structured data to the structured data storage area, and uploading sample unstructured data to the unstructured data storage area; constructing a structured basic information index, a dimensional dictionary index, and a structured full-text index based on the sample structured data; and constructing an unstructured basic information index and an unstructured full-text index based on the sample unstructured data.
[0013] In one example, uploading the sample structured data to the structured data storage area specifically includes: obtaining the sample structured data in a data table style; converting the sample structured data into a fixed-style kanban style and a user-draggable self-service analysis style according to the business scenario of the data table; uploading the sample structured data to the structured storage area according to the data table style, the kanban style and the self-service analysis style.
[0014] In one example, constructing an unstructured basic information index and an unstructured full-text index based on the sample unstructured data specifically includes: extracting basic information of the sample unstructured data, and constructing an unstructured basic information index based on the basic information; performing content parsing on files of a preset document type in the sample unstructured data; and constructing an unstructured full-text index based on the parsed file content.
[0015] On the other hand, an embodiment of the present application provides a data retrieval device, comprising: at least one processor; and a memory connected to the at least one processor in communication; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can: receive a retrieval request from a user terminal device, and determine a current retrieval type and a retrieval term to be retrieved according to the retrieval request; if the retrieval type is a structured data retrieval, match the retrieval term according to a preset structured basic information index to obtain a first matching result; the preset structured basic information index is related to a title name and a content description; and according to the first matching result, determine whether there is an unmatched first unmatched retrieval term; If so, the first unmatched search term is matched according to the preset dimensional dictionary index; the dimensional dictionary index is related to the dimension of the structured data; if the corresponding matching dimension is matched, the target basic information of the structured data where the matching dimension is located is determined; a second matching result is obtained based on the target basic information and the first matching result; based on the second matching result, it is determined whether there is an unmatched second unmatched search term; if so, the second unmatched search term is matched according to the preset structured full-text index to obtain a full-text matching value; the preset structured full-text index is related to the content of the structured data; the target dimension of the structured data where the full-text matching value is located is determined; based on the target dimension and the second matching result, the search result of the search term is generated.
[0016] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects:
[0017] When a search term is entered in an input box, the search can be performed based on the three indexes of basic information index, dimension dictionary index, and full-text index, and the search results of structured data and unstructured data search types can be directly obtained, which improves the search efficiency, is simple and effective, and brings a good experience to users. In particular, for the large amount of structured and unstructured data stored and managed by the data center, as well as data services such as analysis dashboards based on the stored data, a unified search method can be used to quickly find the required content BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solution of the present application, some embodiments of the present application will be described in detail below in conjunction with the accompanying drawings, in which:
[0019] Figure 1 A schematic diagram of a data retrieval system provided in an embodiment of the present application;
[0020] Figure 2 A flowchart of a data retrieval method provided in an embodiment of the present application;
[0021] Figure 3 A schematic diagram of a home page for data retrieval provided in an embodiment of the present application;
[0022] Figure 4 A schematic diagram of a data search result provided in an embodiment of the present application;
[0023] Figure 5 A structural schematic diagram of a data retrieval device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0024] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without creative work are within the scope of protection of the present application.
[0025] Some embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0026] Figure 1 A schematic diagram of the framework of a data retrieval system provided in an embodiment of the present application.
[0027] exist Figure 1 It includes business systems, data storage, data services, and ES index libraries.
[0028] The business system, including business system 1 and business system 2, obtains internal data through the business system and external data through the external system, and uploads the internal data and the external data to the data storage. That is, the internal data and the external data are equivalent to the sample data of the data storage.
[0029] Data storage includes structured data and unstructured data, that is, data storage refers to a database. The database has a structured data storage area and an unstructured storage area.
[0030] Data services include dashboards, analysis, and data tables for structured data, and documents for unstructured data. In other words, data services refer to the data storage format of structured and unstructured data.
[0031] Among them, the dashboard is a fixed style, for example, a fixed bar chart, and the analysis refers to an analysis chart that the user can drag and adjust, for example, the display format of the bar chart can be adjusted, or the bar chart can be adjusted to a pie chart.
[0032] That is to say, the search content is constructed through the business system, data storage and data service, that is, the search content is maintained through the search content management function to form an index.
[0033] The ES index library includes basic information index, dimension dictionary index, and full-text index. That is, through the ES index library, big data retrieval is performed on the search content. The search content creates a basic information index, dimension dictionary index, and full-text index in ES.
[0034] In some embodiments of the present application, a database having a structured data storage area and an unstructured storage area, i.e., data storage, is first constructed. Sample structured data is uploaded to the structured data storage area, and sample unstructured data is uploaded to the unstructured data storage area. Based on the sample structured data, a structured basic information index, a dimension dictionary index, and a structured full-text index are constructed. Based on the sample unstructured data, an unstructured basic information index and an unstructured full-text index are constructed.
[0035] Among them, when uploading sample structured data to the structured data storage area, first obtain the sample structured data in the data table style; according to the business scenario of the data table, convert the sample structured data into a fixed-style kanban style and a self-service analysis style that can be dragged and adjusted by the user; according to the data table style, the kanban style and the self-service analysis style, upload the sample structured data to the structured storage area.
[0036] For example, when building a dimension dictionary index, the dimensions of structured data refer to general business information such as enterprise, personnel, time, or proprietary enumerated business information, such as product type.
[0037] For dashboards and analysis, dimensions have already been configured as query conditions during definition and can be directly obtained.
[0038] For data tables, dimension columns need to be marked. For each dimension, the time dimension is marked as annual, monthly, quarterly, date, and other types. Other dimensions correspond to specific dimension parameter values. For example, product ID, name, and abbreviation are used to create dimension dictionary indexes. In the retrieval content management, enumeration items are listed one by one and directly formed, and the corresponding data table dimensions are read from the database.
[0039] On the other hand, when constructing an unstructured basic information index and an unstructured full-text index based on the sample unstructured data, the basic information of the sample unstructured data is extracted, and the unstructured basic information index is constructed based on the basic information. In the sample unstructured data, the content of the files of the preset document type is parsed; for example, txt, word, excel, and wps document types. The unstructured full-text index is constructed based on the parsed file content.
[0040] pass Figure 1 In this system, when a search term is entered into an input box, the system searches based on three indexes: basic information index, dimension dictionary index, and full-text index, and directly obtains search results of all types in the entire domain, including data, analysis, dashboards, documents, etc.
[0041] Next, through Figure 2 Continue to describe in detail how to retrieve data and apply it to Figure 1 in the system.
[0042] Figure 2 A flow chart of a data retrieval method provided in an embodiment of the present application. The method can be applied to different business fields, such as Internet financial business field, e-commerce business field, instant messaging business field, game business field, official business field, etc. Certain input parameters or intermediate results in the process allow manual intervention and adjustment to help improve accuracy.
[0043] The analysis method involved in the embodiments of the present application may be implemented by a terminal device or a server, and the present application does not impose any special restrictions on this. For the convenience of understanding and description, the following embodiments are described in detail by taking a terminal device as an example.
[0044] It should be noted that the server may be a single device or a system consisting of multiple devices, that is, a distributed server, and this application does not make any specific limitation on this.
[0045] Based on this, Figure 2 The process in may include the following steps:
[0046] S201: Receive a search request from a user terminal device, and determine a current search type and a search term to be searched according to the search request.
[0047] If the search type is structured data search, then S202-S210 is executed, if the search type is unstructured data search, then S211-215 is executed. If the search type is all types, then S202-210 is executed, and S211-215 is executed.
[0048] It should be noted that structured data retrieval types include data tables, dashboards, and self-service analysis, and unstructured data retrieval types include documents.
[0049] In addition, the search term can be single or multiple. The user enters the search term to be searched in the search box according to the preset search conditions. For example, the search terms are split by spaces, and the multiple search terms are in an "and" relationship.
[0050] S202: If the search type is structured data search, the search term is matched according to a preset structured basic information index to obtain a first matching result; the preset structured basic information index is related to the title name and content description.
[0051] If there are multiple search terms, basic information index matching is performed on each search term in turn. For example, if the title name is the mid-term test score table of class A, the corresponding content description is a test score table used to represent the mid-term scores of each student in class A.
[0052] S203: According to the first matching result, determine whether there is an unmatched first unmatched search term.
[0053] If there is no unmatched first unmatched search term, it means that the matching is completed, and S204-S210 are no longer executed, and the first matching result is directly used as the search result of the search term.
[0054] If the search term is single, when there is an unmatched first search term, it means that in S202, no corresponding structured data is matched.
[0055] If there are multiple search terms, when there is an unmatched first search term, it means that in S202, a part of the search terms does not match another part of related structured data.
[0056] For example, there are three search terms, two of which are matched to data tables A and B, while the remaining search term fails to match data tables A and B.
[0057] For another example, there are 4 search terms, and the matching results are that the two search terms ab are matched to the C data table, and the remaining two search terms cd are matched to the D data table. Then the two search terms ab can be taken as the first unmatched search terms and S204-S210 can be executed.
[0058] After the execution is completed, if both the two matching words ab are matched to the D data table, the search result is the D data table. If the search word a is matched to the D data table, the search word b is still not matched to the D data table, or the two matching words ab are still not matched to the D data table, then the two search words cd are continued as the first unmatched search words, and S204-S210 are executed.
[0059] After the execution is completed, if both the c and d matching words are matched to the C data table, the search result is the C data table. If the c search word is matched to the C data table, and the d search word is still not matched to the C data table, the C data table is used as the search result. If both the c and d matching words are not matched to the C data table, the C data table and the D data table are used as the search results.
[0060] S204: If yes, matching the first unmatched search term according to a preset dimensional dictionary index; the dimensional dictionary index is related to the dimension of the structured data.
[0061] For example, when the search type is a data table, the dimension refers to the field in the data table.
[0062] S205: If a corresponding matching dimension is matched, determine the target basic information of the structured data where the matching dimension is located.
[0063] For example, if the search type is data table, the title name of the data table where the matching dimension is located is determined.
[0064] S206: Obtain a second matching result according to the target basic information and the first matching result.
[0065] If the first matching result is not empty, the target basic information is matched in the first matching result by the basic information index to obtain the second matching result. For example, if the first matching result is data tables A and B, and the target basic information matches data table A, then the second matching result is data table A.
[0066] It should be noted that if the first matching result is non-empty, it means that the preset structured basic information index matches the structured data of one or more search terms.
[0067] If the first matching result is empty, a second matching result is generated according to the structured data where the matching dimension is located. For example, if the structured data where the matching dimension is located is the C data table, the C data table is directly used as the second matching result.
[0068] It should be noted that the first matching result being empty means that the preset structured basic information index does not match any structured data of the search term.
[0069] S207: According to the second matching result, determine whether there is any unmatched second unmatched search term.
[0070] If there is no unmatched second unmatched search term, it means that the match has been completed, and S208-S210 are no longer executed, and the second matching result is directly used as the search result of the search term. It can be understood that at this time, the second matching result is not empty.
[0071] S208: If yes, matching the second unmatched search term according to a preset structured full-text index to obtain a full-text matching value; the preset structured full-text index is related to the content of the structured data.
[0072] For example, if the search type is data table, the full-text matching value refers to the field value of the data table where the full-text matching value is located.
[0073] S209: Determine the target dimension of the structured data where the full-text matching value is located.
[0074] S210: Generate a search result for the search term according to the target dimension and the second matching result.
[0075] If the second matching result is not empty, the target dimension is matched in the second matching result through the dimension dictionary index to generate the search result of the search term. For example, if the first matching result is data tables A and B, and the target dimension matches data table A, the search result is data table A.
[0076] If the second matching result is empty, the search result of the search term is generated according to the structured data where the full-text matching value is located. At this time, if the first matching result is empty, the structured data where the full-text matching value is located is used as the search result of the search term. If the first matching result is not empty, the basic information of the structured data where the full-text matching value is located is matched in the first matching result to generate the search result of the search term.
[0077] It should be noted that, in step S204, if the corresponding matching dimension is not matched, the first unmatched search term is matched directly according to the preset structured full-text index. If the full-text matching value is still not matched, the first matching result is directly used as the search result of the search term.
[0078] S211: If the search type is unstructured data search, the search term is matched according to a preset unstructured basic information index to obtain a third matching result.
[0079] S212: According to the third matching result, determine whether there is an unmatched third unmatched search term.
[0080] S213: If yes, matching the third unmatched search term according to a preset unstructured full-text index to obtain a full-text matching value.
[0081] S214: Determine the target basic information of the structured data where the full-text matching value is located.
[0082] S215: Generate a search result of the search term according to the target basic information of the structured data where the full-text matching value is located and the third matching result.
[0083] Wherein, if the third matching result is not empty, then in the third matching result, the target basic information of the structured data where the full-text matching value is located is matched through the basic information index to obtain the search result of the search term. If the third matching result is empty, the structured data where the full-text matching value is located is used as the search result of the search term.
[0084] In some embodiments of the present application, if there are multiple search results, the search times of each search result are determined, and then each search result is sorted in descending order of the search times, and each search result is displayed to the user terminal device according to the sorting result.
[0085] Further, it is determined whether the search term includes a dimension condition in a pre-set form. The dimension condition is related to the matching dimension; for example, "Enterprise type: state-owned, state-controlled", "Monthly>=202201", etc.
[0086] If yes, the search content in each search result is filtered according to the dimension conditions; and each filtered search result is displayed to the user terminal device according to the sorting result. Thus, when viewing the search results, the structured data can be filtered by parameters without the need for secondary search.
[0087] For example, the dimension condition rules are shown in Table 1.
[0088] Table 1:
[0089] Conditional Keywords Business Rules : The dimension parameter name is before the colon, and the dimension parameter value is after it. , Used with a colon to identify multiple parameter values, which are in an "or" relationship with each other. % Used with a colon to indicate fuzzy matching >>=<<= Range conditions need to be time dimensions
[0090] When typing in the search box, help is provided according to preset rules, for example, as shown in Table 2.
[0091] Table 2:
[0092]
[0093] It should be noted that although the embodiments of the present application are based on Figure 2 Steps S201 to S215 are described in sequence, but this does not mean that steps S201 to S215 must be performed in a strict order. Figure 2 The order shown in the figure introduces and explains step S201 to step S215 in sequence to facilitate those skilled in the art to understand the technical solution of the embodiment of the present application. In other words, in the embodiment of the present application, the order between step S201 to step S215 can be appropriately adjusted according to actual needs.
[0094] pass Figure 2 The method can directly obtain the retrieval results of structured data and unstructured data retrieval types based on the three indexes of basic information index, dimension dictionary index and full-text index when the search word is entered in an input box, thereby improving the retrieval efficiency, being simple and effective, and bringing a good experience to users. In particular, the one-box retrieval method is used to provide users with big data intelligent retrieval services covering structured and unstructured global data such as data tables, analysis, dashboards, documents, etc. in the data center.
[0095] More intuitively, Figure 3 A schematic diagram of a home page for data retrieval provided in an embodiment of the present application. Figure 4 A schematic diagram of a data retrieval result provided in an embodiment of the present application.
[0096] exist Figure 4 In the search box, the search term is the business indicator, and below the search box are the corresponding search results of all types.
[0097] Based on the same idea, some embodiments of the present application also provide devices and non-volatile computer storage media corresponding to the above methods.
[0098] Figure 5 A schematic diagram of the structure of a data retrieval device provided in an embodiment of the present application includes:
[0099] at least one processor; and,
[0100] a memory communicatively connected to the at least one processor; wherein,
[0101] The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to:
[0102] Receiving a search request from a user terminal device, and determining a current search type and a search term to be searched according to the search request;
[0103] If the search type is structured data search, the search term is matched according to a preset structured basic information index to obtain a first matching result; the preset structured basic information index is related to the title name and the content description;
[0104] According to the first matching result, determining whether there is an unmatched first unmatched search term;
[0105] If yes, matching the first unmatched search term according to a preset dimensional dictionary index; the dimensional dictionary index is related to the dimension of the structured data;
[0106] If a corresponding matching dimension is matched, the target basic information of the structured data where the matching dimension is located is determined;
[0107] Obtaining a second matching result according to the target basic information and the first matching result;
[0108] According to the second matching result, determining whether there is an unmatched second unmatched search term;
[0109] If yes, matching the second unmatched search term according to a preset structured full-text index to obtain a full-text matching value; the preset structured full-text index is related to the content of the structured data;
[0110] Determine the target dimension of the structured data where the full-text matching value is located;
[0111] Generate a search result for the search term based on the target dimension and the second matching result.
[0112] Some embodiments of the present application provide a data retrieval non-volatile computer storage medium storing computer executable instructions, wherein the computer executable instructions are configured to:
[0113] Receiving a search request from a user terminal device, and determining a current search type and a search term to be searched according to the search request;
[0114] If the search type is structured data search, the search term is matched according to a preset structured basic information index to obtain a first matching result; the preset structured basic information index is related to the title name and the content description;
[0115] According to the first matching result, determining whether there is an unmatched first unmatched search term;
[0116] If yes, matching the first unmatched search term according to a preset dimensional dictionary index; the dimensional dictionary index is related to the dimension of the structured data;
[0117] If a corresponding matching dimension is matched, the target basic information of the structured data where the matching dimension is located is determined;
[0118] Obtaining a second matching result according to the target basic information and the first matching result;
[0119] According to the second matching result, determining whether there is an unmatched second unmatched search term;
[0120] If yes, matching the second unmatched search term according to a preset structured full-text index to obtain a full-text matching value; the preset structured full-text index is related to the content of the structured data;
[0121] Determine the target dimension of the structured data where the full-text matching value is located;
[0122] Generate a search result for the search term based on the target dimension and the second matching result.
[0123] Each embodiment in this application is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the device and medium embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiments.
[0124] The devices and media provided in the embodiments of the present application correspond one-to-one to the methods. Therefore, the devices and media also have similar beneficial technical effects as the corresponding methods. Since the beneficial technical effects of the methods have been described in detail above, the beneficial technical effects of the devices and media will not be repeated here.
[0125] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0126] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0127] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0128] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0129] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0130] 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.
[0131] 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 magnetic 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 temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
[0132] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.
[0133] The above is only an embodiment of the present application and is not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the technical principle of the present application should all fall within the protection scope of the present application.
Claims
1. A data retrieval method, characterized in that: The method comprises: Receiving a search request from a user terminal device, and determining a current search type and a search term to be searched according to the search request; If the search type is structured data search, the search term is matched according to a preset structured basic information index to obtain a first matching result; the preset structured basic information index is related to the title name and the content description; According to the first matching result, determining whether there is an unmatched first unmatched search term; If yes, matching the first unmatched search term according to a preset dimensional dictionary index; the dimensional dictionary index is related to the dimension of the structured data; If a corresponding matching dimension is matched, the target basic information of the structured data where the matching dimension is located is determined; Obtaining a second matching result according to the target basic information and the first matching result; According to the second matching result, determining whether there is an unmatched second unmatched search term; If yes, matching the second unmatched search term according to a preset structured full-text index to obtain a full-text matching value; the preset structured full-text index is related to the content of the structured data; Determine the target dimension of the structured data where the full-text matching value is located; Generating a search result of the search term according to the target dimension and the second matching result; After determining the current search type and the search terms to be searched according to the search request, the method further includes: If the search type is unstructured data search, matching the search term according to a preset unstructured basic information index to obtain a third matching result; According to the third matching result, determining whether there is an unmatched third unmatched search term; If yes, matching the third unmatched search term according to the preset unstructured full-text index to obtain a full-text matching value; Determine the target basic information of the structured data where the full-text matching value is located; A search result of the search term is generated according to the target basic information of the structured data where the full-text matching value is located and the third matching result.
2. The method according to claim 1, characterized in that The obtaining a second matching result according to the target basic information and the first matching result specifically includes: If the first matching result is not empty, then in the first matching result, the target basic information is matched by the basic information index to obtain a second matching result; If the first matching result is empty, a second matching result is generated according to the structured data where the matching dimension is located.
3. The method according to claim 1, characterized in that Generating the search result of the search term according to the target dimension and the second matching result specifically includes: If the second matching result is not empty, then in the second matching result, the target dimension is matched by the dimension dictionary index to generate a search result of the search term; If the second matching result is empty, a search result of the search term is generated according to the structured data where the full-text matching value is located.
4. The method according to claim 1, characterized in that After generating the search result of the search term based on the target dimension and the second matching result, the method further includes: If there are multiple search results, determine the number of searches for each search result; Sorting each of the search results in descending order of search times; According to the ranking result, each search result is displayed to the user terminal device.
5. The method according to claim 4, characterized in that The displaying each search result to the user terminal device according to the ranking result specifically includes: Determining whether the search term includes a dimension condition in a preset form; the dimension condition is related to the matching dimension; If yes, filtering the search content in each search result according to the dimension condition; According to the ranking result, each filtered search result is displayed to the user terminal device.
6. The method according to claim 1, characterized in that Before receiving the search request of the user terminal device, the method further includes: Build databases with structured and unstructured data storage areas; Uploading sample structured data to the structured data storage area, and uploading sample unstructured data to the unstructured data storage area; According to the sample structured data, a structured basic information index, a dimension dictionary index and a structured full-text index are constructed; Based on the sample unstructured data, an unstructured basic information index and an unstructured full-text index are constructed.
7. The method according to claim 6, characterized in that The uploading of the sample structured data to the structured data storage area specifically includes: Get sample structured data in a table format; According to the business scenario of the data table, the sample structured data is converted into a fixed-style kanban style and a user-friendly analysis style that can be dragged and adjusted by the user; The sample structured data is uploaded to the structured storage area according to the data table style, the dashboard style and the self-service analysis style.
8. The method according to claim 6, characterized in that The step of constructing an unstructured basic information index and an unstructured full-text index according to the sample unstructured data specifically includes: Extracting basic information of the sample unstructured data, and constructing an unstructured basic information index based on the basic information; In the sample unstructured data, content parsing is performed on files of a preset document type; Build an unstructured full-text index based on the parsed file content.
9. A data retrieval device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to: Receiving a search request from a user terminal device, and determining a current search type and a search term to be searched according to the search request; If the search type is structured data search, the search term is matched according to a preset structured basic information index to obtain a first matching result; the preset structured basic information index is related to the title name and the content description; According to the first matching result, determining whether there is an unmatched first unmatched search term; If yes, matching the first unmatched search term according to a preset dimensional dictionary index; the dimensional dictionary index is related to the dimension of the structured data; If a corresponding matching dimension is matched, the target basic information of the structured data where the matching dimension is located is determined; Obtaining a second matching result according to the target basic information and the first matching result; According to the second matching result, determining whether there is an unmatched second unmatched search term; If yes, matching the second unmatched search term according to a preset structured full-text index to obtain a full-text matching value; the preset structured full-text index is related to the content of the structured data; Determine the target dimension of the structured data where the full-text matching value is located; Generating a search result of the search term according to the target dimension and the second matching result; After determining the current search type and the search term to be searched according to the search request, the method further includes: If the search type is unstructured data search, matching the search term according to a preset unstructured basic information index to obtain a third matching result; According to the third matching result, determining whether there is an unmatched third unmatched search term; If yes, matching the third unmatched search term according to the preset unstructured full-text index to obtain a full-text matching value; Determine the target basic information of the structured data where the full-text matching value is located; A search result of the search term is generated according to the target basic information of the structured data where the full-text matching value is located and the third matching result.
Citation Information
Patent Citations
Full-text retrieval method and system
CN108255972A
Full-text retrieval matching engine based on ICD9 / 10 word segmentation lexicon
CN111899829A