CN106528590B - Query method and device - Google Patents

Query method and device Download PDF

Info

Publication number
CN106528590B
CN106528590B CN201610829093.8A CN201610829093A CN106528590B CN 106528590 B CN106528590 B CN 106528590B CN 201610829093 A CN201610829093 A CN 201610829093A CN 106528590 B CN106528590 B CN 106528590B
Authority
CN
China
Prior art keywords
search
searchable
content
contents
preprocessing
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201610829093.8A
Other languages
Chinese (zh)
Other versions
CN106528590A (en
Inventor
陈晓敏
李春华
李燕芬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hisense Visual Technology Co Ltd
Original Assignee
Hisense Visual Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hisense Visual Technology Co Ltd filed Critical Hisense Visual Technology Co Ltd
Priority to CN201610829093.8A priority Critical patent/CN106528590B/en
Publication of CN106528590A publication Critical patent/CN106528590A/en
Application granted granted Critical
Publication of CN106528590B publication Critical patent/CN106528590B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2453Query optimisation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computational Linguistics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a query method, which is based on a preset search table, acquires search results corresponding to all current searchable contents of the service table from each service table according to a preset task period, and stores the searchable contents corresponding to the search results into the search table, so that when a query request of a user is received, the query results are displayed to the user according to all items corresponding to the query contents carried in the query request in the search table. The method and the device not only enable the user not to jump among different pages in the inquiry process, but also reduce the retrieval time of the inquiry request, thereby being capable of quickly responding to the inquiry request of the user and improving the use experience of the user.

Description

Query method and device
Technical Field
The invention relates to the field of databases, in particular to a pre-query method. The invention also relates to an inquiry device.
Background
With the continuous development and progress of electronic government affairs, enterprise informatization and social informatization, massive electronic files and documents are generated. The management of these electronic files and electronic documents is becoming a major task for enterprises to implement information strategies. The enterprise management system (hereinafter referred to as management system) refers to a software that can embody most functions of enterprise management (including decision, planning, organization, leadership, monitoring, analysis, and the like), and can provide real-time, relevant, accurate, and complete data, thereby providing decision basis for managers.
A database is a warehouse that organizes, stores, and manages data according to a data structure, and as information technology and markets develop, data management is no longer just storing and managing data, but is converted into various data management ways required by users. Databases are of many types, ranging from the simplest tables that store various types of data to large database systems that are capable of mass data storage.
In the information-oriented society, various information resources are managed and utilized sufficiently and effectively, which is a precondition for scientific research and decision management. Therefore, in the process of using the management system, technicians often need to query data in the management system. At present, query for a management system generally requires a technician to first determine the type of search content, and the management system can give a search result according to the search content input by the technician.
As shown in fig. 1, a schematic diagram is shown for an inquiry interface of a certain management system in the prior art, taking the management system as a television software lifecycle management system as an example, a general search mode when a technician uses the management system is to input model information first, after the input is completed and a search is clicked, the interface of fig. 1 will give related information of a version searched by the technician, and if the technician needs to perform a more detailed search, the technician needs to input branch information and click the search, and the interface is shown in fig. 2, which contains the branch related information that the technician wants.
The inventor finds that the prior art at least has the following technical problems in the process of implementing the invention:
(1) The management system background needs to set a corresponding retrieval inlet for each current query type, and meanwhile, under the condition that a technician does not determine the query type corresponding to the query content, the technician needs to go to each retrieval inlet to retrieve a corresponding data table, so that the technician spends a large amount of time for retrieving and extracting results;
(2) The background of the management system needs to separately index corresponding fields of each data table (e.g., model field, branch field, etc.) according to the searched content, which results in an excessively long query response time of the device.
Therefore, how to improve the convenience of the technical staff for querying in the database on the premise of reducing the retrieval/query response time becomes a technical problem to be solved urgently by the technical staff in the field.
Disclosure of Invention
The invention provides a query method and query equipment, which are used for improving the convenience of technical personnel in querying a database on the premise of reducing retrieval/query time.
In order to achieve the above object, the present invention provides a query method, which is applied to a database system including a service table, and sets a search table in advance, wherein the method further includes:
acquiring search results corresponding to all current searchable contents of the business table in each business table according to a preset task period, wherein the searchable contents are contents of all search types which can be input by a search box of the database system;
storing the search result corresponding to the searchable content in the search table;
when a query request of a user is received, displaying a query result to the user according to all the entries in the search table corresponding to the query content carried in the query request.
Preferably, the search table includes a main table and a standby table, and the search result corresponding to all the current searchable contents of the service table is obtained in each service table according to a preset task period, specifically:
when the task period is reached, emptying the standby table and acquiring the searchable content from the service table;
writing the searchable contents into the standby table one by one, and setting a preprocessing identifier for each searchable content, wherein the initial state of the preprocessing identifier is unprocessed;
and acquiring a search result corresponding to each searchable content in each service table according to the preprocessing identifier.
Preferably, the obtaining of the search result corresponding to each searchable content in each service table according to the preprocessing identifier specifically includes:
storing the searchable content corresponding to the preprocessing identification with the unprocessed state in the standby list into a memory search list;
and storing the search results corresponding to all the searchable contents in the memory search list acquired from the service list into the standby list, and setting the preprocessing identification of the searchable contents corresponding to the acquired search results as processed until all the searchable contents in the memory search list are traversed.
Preferably, the storing the searchable content corresponding to the search result into the search table specifically includes:
judging whether the search content with unprocessed preprocessing identification exists in the standby list;
if the preprocessing identifier exists in the standby table and is unprocessed searchable content, and the execution times of obtaining the search result corresponding to each searchable content in each service table according to the preprocessing identifier are not more than the preset preprocessing cycle times, obtaining the search result corresponding to each searchable content in each service table according to the preprocessing identifier again;
and if the standby table does not have the searchable content with the preprocessed identifier as unprocessed, or the execution times of obtaining the search result corresponding to each searchable content in each service table according to the preprocessed identifier is greater than the preset preprocessing cycle times, copying the table entry corresponding to the searchable content with the preprocessed identifier as processed in the standby table into the main table.
Preferably, the table entry includes search content, a search type and a search result, and the query result is displayed to the user according to all table entries in the search table corresponding to the query content carried in the query request, specifically:
inquiring all searchable contents matched with the inquired contents in the main table, and acquiring the table entries of the searchable contents matched with the inquired contents;
and grouping the table entries according to the search types, and displaying the grouped search results to the user.
Correspondingly, the invention also provides a query device, which is applied to a database system containing the service table, wherein the device is preset with a search table, and the device also comprises:
the acquisition module is used for acquiring search results corresponding to all current searchable contents of the business table in each business table according to a preset task period, wherein the searchable contents are contents of all search types which can be input by a search box of the database system;
the storage module is used for storing the search result corresponding to the searchable content into the search table;
and the display module is used for displaying a query result to the user according to all the items in the search table corresponding to the query content carried in the query request when receiving the query request of the user.
Preferably, the search table includes a main table and a standby table, and the obtaining module specifically includes:
the first acquisition module is used for emptying the standby table and acquiring the searchable content from the service table when the task period is reached;
the processing module writes the searchable contents into the standby table one by one, and sets a preprocessing identifier for each searchable content, wherein the initial state of the preprocessing identifier is unprocessed;
and the second acquisition module is used for acquiring search results corresponding to the searchable contents in each service table according to the preprocessing identifier.
Preferably, the second obtaining module is specifically configured to:
storing the searchable content corresponding to the preprocessing identifier with the unprocessed state in the standby table into a memory search list;
and storing the search results corresponding to all the searchable contents in the memory search list acquired from the service list into the standby list, and setting the preprocessing identification of the searchable contents corresponding to the acquired search results as processed until all the searchable contents in the memory search list are traversed.
Preferably, the storage module is specifically configured to:
judging whether the search content with unprocessed preprocessing identification exists in the standby list;
if the preprocessing identifier exists in the standby table and is unprocessed searchable content, and the execution times of obtaining the search result corresponding to each searchable content in each service table according to the preprocessing identifier are not more than the preset preprocessing cycle times, obtaining the search result corresponding to each searchable content in each service table according to the preprocessing identifier again;
and if the standby table does not have the searchable content with the preprocessed identifier as unprocessed, or the execution times of acquiring the search result corresponding to each searchable content in each service table according to the preprocessed identifier is greater than the preset preprocessing cycle times, copying the table entry corresponding to the searchable content with the preprocessed identifier as processed in the standby table into the main table.
Preferably, the entry includes search content, a search type, and a search result, and the presentation module is specifically configured to:
inquiring all searchable contents matched with the inquired contents in the main table, and acquiring the table entries of the searchable contents matched with the inquired contents;
and grouping the table items according to the search types, and displaying the grouped search results to the user.
By applying the technical scheme provided by the embodiment of the invention, based on the preset search table, the search results corresponding to all the current searchable contents of the service table are obtained in each service table according to the preset task period, and the searchable contents corresponding to the search results are stored in the search table, so that when the query request of the user is received, the query results are displayed to the user according to all the entries corresponding to the queried contents carried in the query request in the search table. The method and the device not only enable the user not to jump among different pages in the inquiry process, but also reduce the retrieval time of the inquiry request, thereby being capable of quickly responding to the inquiry request of the user and improving the use experience of the user.
Drawings
FIG. 1 is a schematic diagram illustrating a query interface of a management system in the prior art;
FIG. 2 is another illustration of a query interface of a management system in the prior art;
fig. 3 is a schematic flow chart of a query method proposed in the present application;
FIG. 3a is a schematic diagram of a search result presented to a user in an embodiment of the present application;
fig. 4 is a schematic flowchart of a search table acquisition process according to an embodiment of the present application;
fig. 5 is a schematic flowchart of a method for obtaining search results in a search backup table according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an inquiry apparatus provided in this embodiment.
Detailed Description
As described in the background art, on one hand, the management system background needs to set a corresponding search entry for each current query type, and meanwhile, a technician needs to search each search entry for a corresponding data table under the condition that the query type corresponding to the query content is not determined, and on the other hand, the management system background needs to respectively establish indexes for corresponding fields of each data table according to the content of a search, which results in that the query response time of the device is too long, and much time is spent on the searcher.
Therefore, the present application provides a query method to improve the convenience of technical staff in querying a database on the premise of reducing the retrieval/query time.
In the embodiment of the application, in order to aim at different retrieval entries corresponding to a plurality of data tables stored in a database, search results corresponding to contents which can be searched by all the data tables are all searched out, and the searchable contents corresponding to the search results are stored in the search tables, so that when a query request of a user is received, the query results are displayed to the user according to all entries corresponding to the query contents carried in the query request in the search tables.
Based on the above technical ideas, an inquiry method proposed in the embodiment of the present application is a flowchart of the inquiry method proposed in the embodiment of the present application, as shown in fig. 3, and the method is applied to a database system including a service table, and the method specifically includes the steps of:
step 301, obtaining the search results corresponding to all the current searchable contents of the service table from each service table according to the preset task period.
The searchable content is content of all search types that a search box of the database system may enter.
In the technical scheme of the application, the data can be stored, deleted and updated at any time in the database storing the mass data, so that the search results in the real-time changed data need to be updated, and therefore in the technical scheme of the application, all the searchable contents in all the service tables are searched at intervals of a preset task period to obtain the search results corresponding to all the searchable contents.
In a specific application scenario, operations such as updating, storing, deleting and the like of data are performed at any time in a database storing mass data, the duration of a task period can be set according to an actual situation, search results corresponding to searchable contents in the data are acquired every task period, but for another database in which data updating is not frequent, the search results do not need to be frequently acquired, the acquisition of the search results in the database in a trigger condition formula can be set under the condition that the number of data changes or the duration of data changes in the database reaches a certain preset threshold, and the conditions for acquiring the search results and the setting of the task period do not affect the protection range of the application in the specific application scenario.
In a preferred embodiment of the present application, a search result of searchable content is obtained in a search table, and each time a search task is started, the search table is cleared, all types of content that can be input in a search box are extracted from the task table, and placed in a search content field of the search table, and a preprocessing flag is set for the searchable content, where the preprocessing flag of the search content is in an unprocessed state. Storing the searchable content with the unprocessed preprocessing identifier in the search table into a memory search list, acquiring search results from different service tables according to relevant indexes of each piece of searchable content and a result to be searched according to the index and the result, storing the search results corresponding to all the searchable content in the memory search list acquired from the service table into a standby table, setting the preprocessing identifier of the searched content with the acquired search result as processed, and setting the preprocessing identifier of the searched content without the acquired search result as unprocessed.
After corresponding search results of all search contents are obtained, whether the search table has the searchable content with the unprocessed preprocessing identifier is judged, if the searchable content with the unprocessed preprocessing identifier exists in the search table, traversal search is conducted on each piece of data with the unprocessed preprocessing identifier in the search list, traversal search in the search list is repeated until the searchable content with the unprocessed preprocessing identifier in the search list is empty, in an actual application scene, the search contents with the search results which cannot be obtained exist, the number of preprocessing cycles of traversal search can be set, and the value of the number of preprocessing cycles can be taken according to actual conditions.
And when the searchable content with the preprocessing identifier in the unprocessed state does not exist in the search table, or the execution times of the preprocessing identifier for acquiring the search result corresponding to the searchable content in each service table is greater than the preset preprocessing cycle times, storing the table entry corresponding to the searchable content with the preprocessing identifier processed in the search table into the search table.
Step 302, storing the searchable content corresponding to the search result in a search table.
In an actual application scenario, some accidents or system errors and the like can cause the time consumption of a search process to be long, and at the moment, if a user searches, the user cannot accurately acquire the search result, and the experience of the user can be influenced.
Specifically, the step of obtaining the search result of the searchable content in the above steps is mainly performed in the search backup table, and after the search result of the searchable content in the database is obtained, all the search results corresponding to the search content that is preprocessed and identified in the search backup table as processed are copied and stored in the search backup table, so that original search result data in the main search table is covered.
In terms of functional structure, the search standby table is used for acquiring search results corresponding to all searchable contents in the storage system, and the search main table is used for inquiring and acquiring data by an external user, so that the safety in the process of acquiring the search results can be effectively improved by distinguishing.
Step 303, when receiving a query request from a user, displaying a query result to the user according to all entries in the search table corresponding to the query content carried in the query request.
The search result stored in the search table has a plurality of entries, which respectively comprise search content, search types, search results and the like, according to the query content in the query request input by the user, all the searchable content matched with the query content is queried in the search main table, the entries of the searchable content matched with the query content are obtained, different entry case number search types are grouped, and the grouped search results are displayed to the user.
In a specific application scenario, different entries may be set as different tags to display search results, the tags are divided, and a user selects different tags to display different entries, taking fig. 3a as an example, which is a schematic diagram of search results displayed to the user, where the entries of the search results are a model, a tag, and a branch, and when a user selects a tag of a model in fig. 3a, the user is displayed.
Or, all the entries are shown, but the identifiers of the entries are added to the search result, and the user can distinguish the entries according to the identifiers, taking table 1 as an example, the search result shown to the user is shown, where SearchKey is the search content, searchType is the type of the search, and SearchValue is the result of the search.
TABLE 1
SearchKey SearchType SearchValue
M5507 model *****
B5507 branch ***
T5508 tag **********
M5508 model *****
B5508 branch ***
By applying the query method provided by the embodiment of the invention, based on the preset search table, the search results corresponding to all the current searchable contents of the service table are obtained in each service table according to the preset task period, and the searchable contents corresponding to the search results are stored in the search table, so that when the query request of the user is received, the query results are displayed to the user according to all the entries in the search table corresponding to the query contents carried in the query request. The method and the device not only enable the user not to jump among different pages in the inquiry process, but also reduce the retrieval time of the inquiry request, thereby being capable of quickly responding to the inquiry request of the user and improving the use experience of the user.
In order to further explain the technical idea of the present invention, the technical solution of the present invention is now described with reference to specific application scenarios.
In an inquiry method provided in an embodiment of the present application, the method mainly includes two steps:
step A, obtaining a search result of a search table;
and step B, displaying the search result.
For the step a, obtaining the search result of the search table is mainly performed by using a set timing task, obtaining the search result of the searchable content is completed in the search standby table, and then the search result is copied to the search main table, as shown in fig. 4, a schematic flow diagram for obtaining the search table provided in the specific embodiment of the present application is provided, the method is preset with a search main table SearchTable and a search standby table SearchTabBK, and is applied to a database system including different service tables, in the specific embodiment of the present application, the service tables are respectively a branch service table, a model service table, and a tag service table, in an implementation process of the method, the timing task for obtaining the search result corresponding to the search content needs to be executed, and the specific step of the timing task is:
step 401, clearing all contents in the search standby list;
specifically, every time the timer task starts, all the data in the SearchTabBK table is deleted.
Step 402, copying the content of the retrievable field into a search reserve table;
specifically, all types of contents that can be input in the search box are extracted from different service tables in the data system, and the extracted contents are put into the SearchKey search contents of SearchTabBK.
Step 403, storing the search result in a search standby table;
and searching all searchable contents, and storing the searched search results into SearchValue in a search standby table, wherein the SearchType is used for identifying according to the gap of the business table.
Step 404, deleting the content in the main table;
specifically, the search result table SearchValue stored in the main table SearchTable is deleted and emptied.
Step 405, copying the stored search results in the search standby table to a search main table;
and copying the SearchValue in the search backup table into the search main table, wherein the SearchValue has a corresponding search key SearchKey and a search type SearcType.
In a specific application scenario of the application, the timing task is applied to obtain a periodic search result, the obtained search result is stored in the search standby table, and the content in the search standby table is updated to the search main table, so that the task of updating the search result at a timing is completed.
For further explanation of the above timing task, the following describes a step 403 of searching for a search task in a standby table in the timing task, and as shown in fig. 5, is a flowchart of a method for obtaining a search result in a standby table in the embodiment of the present application, and specifically includes:
s501, judging whether the executed traversal search times are larger than preset cycle times or not;
specifically, step S502 is executed when the traversal search frequency is smaller than the preset loop frequency, and step S508 is executed if the traversal search frequency is equal to or greater than the preset loop frequency.
And S502, storing the searchable content with the preprocessing identifier of flag = false into a search list Searchlist.
S503, judging whether the searchable content in the search list Searchlist is empty or not;
specifically, if the searchable content in the search listing Searchlist is not empty, step 504 is executed, and if the searchable content in the search listing Searchlist is empty, step 508 is executed.
S504, traversing each piece of data of the search list Searchlist;
s505, obtaining a search result corresponding to the search content from the service table, and storing the search result in searchvolume.
S506, changing the preprocessing identifier flag of the search content of the obtained search result into true;
s507, judging whether the search of the search list Searchlist is finished or not;
specifically, if the search is completed, step S501 is executed, and if not, step S504 is executed.
In step S508, the search result is copied from the search backup table SearchTabBK to SearchTab.
By applying the method for obtaining the search result provided in the embodiment of the present application, the completeness of the search result obtained in step a can be ensured, and the security of data can be ensured by distinguishing the main and standby tables through searching.
In the above step B, in an actual application scenario, there are a plurality of search result display methods, taking fig. 3a as an example, which is a search result schematic diagram displayed to a user, the table entries of the search results are respectively a model, a tag, and a branch, and when the user selects a model tag in fig. 3a, the user is displayed.
Taking table 2 as an example, when the user search content is "5507" and "5508", the search content is a search result presented to the user, where SearchKey is the search content, searchType is the type of search, and SearchValue is the result of search.
TABLE 2
SearchKey SearchType SearchValue
M5507 model *****
B5507 branch ***
T5508 tag **********
M5508 model *****
B5508 branch ***
Therefore, according to the comprehensiveness and diversity of the obtained search results, various combinations can be provided for the search result display of the user, and the user can obtain the search results intuitively and conveniently.
By applying the query method provided in the specific embodiment of the present invention, based on the preset search table, the search results corresponding to all the searchable contents of the service table are obtained in each service table according to the preset task period, and the searchable contents corresponding to the search results are stored in the search table, so that when the query request of the user is received, the query results are displayed to the user according to all the entries in the search table corresponding to the query contents carried in the query request. The method and the device not only enable the user not to jump among different pages in the inquiry process, but also reduce the retrieval time of the inquiry request, thereby being capable of quickly responding to the inquiry request of the user and improving the use experience of the user.
Based on the same technical idea as above, the present application further provides an inquiry apparatus, as shown in fig. 6, which is a schematic structural diagram of an inquiry apparatus provided in an embodiment of the present application, the inquiry apparatus is applied to a database system including a service table, a search table is preset in the inquiry apparatus, and the inquiry apparatus further includes:
the acquisition module 61 is configured to acquire search results corresponding to all currently searchable contents of the service tables from the service tables according to a preset task period, where the searchable contents are contents of all search types that can be input in a search box of the database system;
the storage module 62 stores the search result corresponding to the searchable content in the search table;
and the display module 63, when receiving a query request from a user, displays a query result to the user according to all the entries in the search table corresponding to the query content carried in the query request.
In a specific application scenario, the search table includes a main table and a standby table, and the obtaining module 61 specifically includes the following sub-modules:
the first acquisition module is used for emptying the standby table and acquiring the searchable content from the service table when the task period is reached;
the processing module writes the searchable contents into the standby table one by one, and sets a preprocessing identifier for each searchable content, wherein the initial state of the preprocessing identifier is unprocessed;
and the second acquisition module is used for acquiring search results corresponding to the searchable contents in each service table according to the preprocessing identifier.
In a specific application scenario, the second obtaining module is specifically configured to:
storing the searchable content corresponding to the preprocessing identification with the unprocessed state in the standby list into a memory search list;
and storing the search results corresponding to all the searchable contents in the memory search list acquired from the service list into the standby list, and setting the preprocessing identification of the searchable contents corresponding to the acquired search results as processed until all the searchable contents in the memory search list are traversed.
In a specific application scenario, the storage module 62 is specifically configured to:
judging whether the search content with unprocessed preprocessing identification exists in the standby list;
if the preprocessing identifier exists in the standby table and is unprocessed searchable content, and the execution times of obtaining the search result corresponding to each searchable content in each service table according to the preprocessing identifier are not more than the preset preprocessing cycle times, obtaining the search result corresponding to each searchable content in each service table according to the preprocessing identifier again;
and if the standby table does not have the searchable content with the preprocessed identifier as unprocessed, or the execution times of obtaining the search result corresponding to each searchable content in each service table according to the preprocessed identifier is greater than the preset preprocessing cycle times, copying the table entry corresponding to the searchable content with the preprocessed identifier as processed in the standby table into the main table.
In a specific application scenario, the entry includes search content, a search type, and a search result, and the presentation module 63 is specifically configured to:
inquiring all searchable contents matched with the inquired contents in the main table, and acquiring the table entries of the searchable contents matched with the inquired contents;
and grouping the table entries according to the search types, and displaying the grouped search results to the user.
By applying the technical scheme provided by the invention, based on the preset search table, the search results corresponding to all the current searchable contents of the service table are obtained in each service table according to the preset task period, and the searchable contents corresponding to the search results are stored in the search table, so that when the query request of the user is received, the query results are displayed to the user according to all the entries in the search table corresponding to the queried contents carried in the query request. The method and the device not only enable the user not to jump among different pages in the inquiry process, but also reduce the retrieval time of the inquiry request, thereby being capable of quickly responding to the inquiry request of the user and improving the use experience of the user.
Through the above description of the embodiments, those skilled in the art will clearly understand that the present invention may be implemented by hardware, or by software plus a necessary general hardware platform. Based on such understanding, the technical solution of the present invention can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (which can be a CD-ROM, a usb disk, a removable hard disk, etc.), and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the method according to the implementation scenarios of the present invention.
Those skilled in the art will appreciate that the figures are merely schematic representations of one preferred implementation scenario and that the blocks or flow diagrams in the figures are not necessarily required to practice the present invention.
Those skilled in the art will appreciate that the modules in the devices in the implementation scenario may be distributed in the devices in the implementation scenario according to the description of the implementation scenario, or may be located in one or more devices different from the present implementation scenario with corresponding changes. The modules of the implementation scenario may be combined into one module, or may be further split into a plurality of sub-modules.
The above-mentioned invention numbers are merely for description and do not represent the merits of the implementation scenarios.
The above disclosure is only a few specific implementation scenarios of the present invention, however, the present invention is not limited thereto, and any variations that can be made by those skilled in the art are intended to fall within the scope of the present invention.

Claims (6)

1. A query method is applied to a database system containing a business table, and is characterized in that a search table is preset, and the method further comprises the following steps:
acquiring search results corresponding to all current searchable contents of the business table in each business table according to a preset task period, wherein the searchable contents are contents of all search types which can be input by a search box of the database system;
storing the search result corresponding to the searchable content in the search table;
when a query request of a user is received, displaying a query result to the user according to all items in the search table corresponding to query content carried in the query request;
the method comprises the steps that a search table comprises a main table and a standby table, search results corresponding to all current searchable contents of the service table are obtained in each service table according to a preset task period, and the method specifically comprises the following steps:
when the task period is reached, emptying the standby table and acquiring the searchable content from the service table;
writing the searchable contents into the standby table one by one, and setting a preprocessing identifier for each searchable content, wherein the initial state of the preprocessing identifier is unprocessed;
obtaining a search result corresponding to each searchable content in each service table according to the preprocessing identifier;
obtaining a search result corresponding to each searchable content in each service table according to the preprocessing identifier, specifically:
storing the searchable content corresponding to the preprocessing identification with the unprocessed state in the standby list into a memory search list;
and storing the search results corresponding to all the searchable contents in the memory search list acquired from the service list into the standby list, and setting the preprocessing identification of the searchable contents corresponding to the acquired search results as processed until all the searchable contents in the memory search list are traversed.
2. The method according to claim 1, wherein storing the search result in the search table corresponding to the searchable content specifically comprises:
judging whether the search content with unprocessed preprocessing identification exists in the standby list;
if the preprocessing identifier exists in the standby table and is unprocessed searchable content, and the execution times of obtaining the search result corresponding to each searchable content in each service table according to the preprocessing identifier are not more than the preset preprocessing cycle times, obtaining the search result corresponding to each searchable content in each service table according to the preprocessing identifier again;
and if the standby table does not have the searchable content with the preprocessed identifier as unprocessed, or the execution times of acquiring the search result corresponding to each searchable content in each service table according to the preprocessed identifier is greater than the preset preprocessing cycle times, copying the table entry corresponding to the searchable content with the preprocessed identifier as processed in the standby table into the main table.
3. The method according to claim 2, wherein the entry includes search content, a search type, and a search result, and the query result is presented to the user according to all entries in the search table corresponding to the query content carried in the query request, specifically:
inquiring all searchable contents matched with the inquired contents in the main table, and acquiring the table entries of the searchable contents matched with the inquired contents;
and grouping the table entries according to the search types, and displaying the grouped search results to the user.
4. An inquiry apparatus, applied to a database system containing a service table, wherein a search table is preset in the apparatus, the apparatus further comprising:
the acquisition module is used for acquiring search results corresponding to all current searchable contents of the business table in each business table according to a preset task period, wherein the searchable contents are contents of all search types which can be input by a search box of the database system;
the storage module is used for storing the search result corresponding to the searchable content into the search table;
the display module is used for displaying a query result to a user according to all the items in the search table corresponding to the query content carried in the query request when receiving the query request of the user;
the search table comprises a main table and a standby table, and the acquisition module comprises the following submodules:
the first acquisition module is used for emptying the standby table and acquiring the searchable content from the service table when the task period is reached;
the processing module writes the searchable contents into the standby table one by one, and sets a pretreatment identifier for each searchable content, wherein the initial state of the pretreatment identifier is unprocessed;
the second acquisition module is used for acquiring search results corresponding to the searchable contents in each service table according to the preprocessing identification;
the second obtaining module is specifically configured to:
storing the searchable content corresponding to the preprocessing identification with the unprocessed state in the standby list into a memory search list;
and storing the search results corresponding to all the searchable contents in the memory search list acquired from the service list into the standby list, and setting the preprocessing identification of the searchable contents corresponding to the acquired search results as processed until all the searchable contents in the memory search list are traversed.
5. The device of claim 4, wherein the storage module is specifically configured to:
judging whether the search content with unprocessed preprocessing identification exists in the standby list;
if the preprocessing identifier exists in the standby table and is unprocessed searchable content, and the execution times of obtaining the search result corresponding to each searchable content in each service table according to the preprocessing identifier are not more than the preset preprocessing cycle times, obtaining the search result corresponding to each searchable content in each service table according to the preprocessing identifier again;
and if the standby table does not have the searchable content with the preprocessed identifier as unprocessed, or the execution times of acquiring the search result corresponding to each searchable content in each service table according to the preprocessed identifier is greater than the preset preprocessing cycle times, copying the table entry corresponding to the searchable content with the preprocessed identifier as processed in the standby table into the main table.
6. The device of claim 5, wherein the table entry includes search content, a search type, and a search result, the presentation module being specifically configured to:
inquiring all searchable contents matched with the inquired contents in the main table, and acquiring the table entries of the searchable contents matched with the inquired contents;
and grouping the table entries according to the search types, and displaying the grouped search results to the user.
CN201610829093.8A 2016-09-18 2016-09-18 Query method and device Active CN106528590B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610829093.8A CN106528590B (en) 2016-09-18 2016-09-18 Query method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610829093.8A CN106528590B (en) 2016-09-18 2016-09-18 Query method and device

Publications (2)

Publication Number Publication Date
CN106528590A CN106528590A (en) 2017-03-22
CN106528590B true CN106528590B (en) 2023-04-07

Family

ID=58343822

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610829093.8A Active CN106528590B (en) 2016-09-18 2016-09-18 Query method and device

Country Status (1)

Country Link
CN (1) CN106528590B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108734537B (en) * 2017-04-24 2021-04-30 北京京东尚科信息技术有限公司 Method and device for counting violation orders
CN108039958B (en) * 2017-11-17 2021-02-19 深圳前海微众银行股份有限公司 Data error checking method and device and computer readable storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004246405A (en) * 2003-02-10 2004-09-02 Kyodo Printing Co Ltd Apparatus and method for preparing data base inquiry statement, and program for same
CN104361038A (en) * 2008-03-13 2015-02-18 商业合伙人有限公司 Improved search engine

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2004246405A (en) * 2003-02-10 2004-09-02 Kyodo Printing Co Ltd Apparatus and method for preparing data base inquiry statement, and program for same
CN104361038A (en) * 2008-03-13 2015-02-18 商业合伙人有限公司 Improved search engine

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
Deep Web爬虫爬行策略研究;郑冬冬等;《计算机工程与设计》;20060930(第17期);全文 *

Also Published As

Publication number Publication date
CN106528590A (en) 2017-03-22

Similar Documents

Publication Publication Date Title
CN101127034B (en) Data organization, inquiry, presentation, documentation, recovery, deletion, refining method, device and system
US9251157B2 (en) Enterprise node rank engine
US6915297B2 (en) Automatic knowledge management system
US10417265B2 (en) High performance parallel indexing for forensics and electronic discovery
US9002873B1 (en) Pipeline query interface
US10565201B2 (en) Query processing management in a database management system
CN106095738B (en) Recommending form fragments
CN110109910A (en) Data processing method and system, electronic equipment and computer readable storage medium
US11327985B2 (en) System and method for subset searching and associated search operators
US20170147652A1 (en) Search servers, end devices, and search methods for use in a distributed network
CN110543477A (en) label construction system and method
CN106528590B (en) Query method and device
CN111737608A (en) Enterprise information retrieval result ordering method and device
CN111078828A (en) Enterprise historical information extraction method and system
WO2017057858A1 (en) Knowledge managing system having search function for each of multiple fields by weighted value
CN107291951B (en) Data processing method, device, storage medium and processor
CN116303628B (en) Alarm data query method, system and equipment based on elastic search
CN107004036B (en) Method and system for searching logs containing a large number of entries
CN111159230A (en) Data resource map construction method and device, storage medium and terminal
JP2013080465A (en) Associative memory technology in intelligence analysis and course-of-action development
CN108038221B (en) Information capturing method and device
US20130339372A1 (en) System and method for contexual ranking of information facets
CN115577078B (en) Engineering cost audit information retrieval method, system, equipment and storage medium
US20230100289A1 (en) Searchable data processing operation documentation associated with data processing of raw data
US20200026706A1 (en) System and method for generating a tagged column-oriented data structure

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 266555 Qingdao economic and Technological Development Zone, Shandong, Hong Kong Road, No. 218

Applicant after: Hisense Video Technology Co.,Ltd.

Address before: 266555 Qingdao economic and Technological Development Zone, Shandong, Hong Kong Road, No. 218

Applicant before: QINGDAO HISENSE ELECTRONICS Co.,Ltd.

GR01 Patent grant
GR01 Patent grant