CN112131455A - List page retrieval degradation method and device, electronic equipment and storage medium - Google Patents

List page retrieval degradation method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN112131455A
CN112131455A CN202011039791.0A CN202011039791A CN112131455A CN 112131455 A CN112131455 A CN 112131455A CN 202011039791 A CN202011039791 A CN 202011039791A CN 112131455 A CN112131455 A CN 112131455A
Authority
CN
China
Prior art keywords
entity
primary key
search
database
retrieval
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.)
Granted
Application number
CN202011039791.0A
Other languages
Chinese (zh)
Other versions
CN112131455B (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.)
Seashell Housing Beijing Technology Co Ltd
Original Assignee
Beike 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 Beike Technology Co Ltd filed Critical Beike Technology Co Ltd
Priority to CN202011039791.0A priority Critical patent/CN112131455B/en
Publication of CN112131455A publication Critical patent/CN112131455A/en
Application granted granted Critical
Publication of CN112131455B publication Critical patent/CN112131455B/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/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/953Querying, e.g. by the use of web search engines
    • G06F16/9532Query formulation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/951Indexing; Web crawling techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q30/00Commerce
    • G06Q30/06Buying, selling or leasing transactions
    • G06Q30/0601Electronic shopping [e-shopping]
    • G06Q30/0623Item investigation
    • G06Q30/0625Directed, with specific intent or strategy
    • G06Q30/0627Directed, with specific intent or strategy using item specifications
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06QINFORMATION AND COMMUNICATION TECHNOLOGY [ICT] SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES; SYSTEMS OR METHODS SPECIALLY ADAPTED FOR ADMINISTRATIVE, COMMERCIAL, FINANCIAL, MANAGERIAL OR SUPERVISORY PURPOSES, NOT OTHERWISE PROVIDED FOR
    • G06Q50/00Information and communication technology [ICT] specially adapted for implementation of business processes of specific business sectors, e.g. utilities or tourism
    • G06Q50/10Services
    • G06Q50/16Real estate

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Marketing (AREA)
  • Tourism & Hospitality (AREA)
  • General Business, Economics & Management (AREA)
  • Economics (AREA)
  • Strategic Management (AREA)
  • Finance (AREA)
  • General Engineering & Computer Science (AREA)
  • Accounting & Taxation (AREA)
  • Data Mining & Analysis (AREA)
  • Mathematical Physics (AREA)
  • Development Economics (AREA)
  • Health & Medical Sciences (AREA)
  • General Health & Medical Sciences (AREA)
  • Human Resources & Organizations (AREA)
  • Primary Health Care (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application provides a method and a device for searching and degrading list pages, electronic equipment and a storage medium. The method comprises the following steps: when the screening condition input by a user accessing a list page is obtained, converting the screening condition into a retrieval condition meeting the grammar definition of a search engine; searching by using the searching condition; if the primary key of the entity is not searched, deleting one search term in the search condition, searching in the degraded database, if the primary key of the entity is not searched, deleting one search term in the search condition again, searching again in the degraded database until the primary key of the entity is searched; querying the demotion database for entity data using the retrieved primary key of the entity; and outputting the queried entity data. The method can improve the reliability of the degradation retrieval of the list page.

Description

List page retrieval degradation method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of information processing technologies, and in particular, to a method and an apparatus for searching and degrading a list page, an electronic device, and a storage medium.
Background
The list page is a function of displaying entities to users in batch according to specific retrieval and search conditions, generally an index is built by using search engines such as solr and elastic search, retrieval is carried out by adopting specific retrieval syntax, necessary data assembly is carried out by using a data source corresponding to the entities, and finally the data are displayed to the users.
Generally, the stability of a search system has higher requirements, and when the index is abnormal, a degradation scheme is very important.
A common destaging scheme is to cache search results according to retrieval conditions, but this scheme requires that destage storage be very large, otherwise the hit rate is very low.
Disclosure of Invention
In view of the above, the present application provides a method, an apparatus, an electronic device and a storage medium for degrading retrieval of a list page, which can improve reliability of degrading retrieval of the list page.
In order to solve the technical problem, the technical scheme of the application is realized as follows:
in one embodiment, a method for destaging a list page search is provided, the method comprising:
when the screening condition input by a user accessing a list page is obtained, converting the screening condition into a retrieval condition meeting the grammar definition of a search engine;
searching by using the searching condition;
if the primary key of the entity is not searched, deleting one search term in the search condition, searching in the degraded database, if the primary key of the entity is not searched, deleting one search term in the search condition again, searching again in the degraded database until the primary key of the entity is searched;
querying the demotion database for entity data using the retrieved primary key of the entity;
and outputting the queried entity data.
Wherein, when the retrieval condition is used for retrieval, the method further comprises the following steps:
and if the primary key of the entity is retrieved, using the primary key of the entity to inquire entity data in a source database, and binding and storing the primary key of the entity and the entity data corresponding to the primary key of the entity into the degraded database.
Wherein the method further comprises: setting effective time H when the primary key of the entity and the entity data corresponding to the primary key of the entity are bound and stored in the degradation database;
when the primary key of the entity is retrieved in the degraded database, the valid time corresponding to the primary key of the entity is updated to be H-H1, wherein H1 is the remaining valid time corresponding to the primary key of the entity when the primary key of the entity is retrieved.
Wherein after querying entity data using the primary key of the entity, before storing the primary key of the entity and the entity data binding corresponding to the primary key of the entity in the degraded database, the method further comprises:
determining whether the entity primary key is stored in the degradation database and is valid, if not, binding and storing the entity primary key and entity data corresponding to the entity primary key into the degradation database, and setting valid time H; if yes, the valid time corresponding to the primary key of the entity is updated to be H-H1, wherein H1 is the remaining valid time corresponding to the primary key of the entity when the primary key of the entity is retrieved.
When the search condition further includes a qualifier, if the entity is not searched after the primary key is found, the method further includes:
deleting the qualifier, and searching in the downgraded database; wherein the limiting word is a search word and/or a function limiting word;
and if the main key of the entity is not retrieved, executing the step of deleting one search term in the search condition.
In another embodiment, an embodiment of the present application is further provided to provide a device for destaging list page retrieval, including: the device comprises an acquisition unit, a conversion unit, a retrieval unit, a query unit and an output unit;
the acquisition unit is used for acquiring screening conditions;
the conversion unit is used for converting the screening conditions into retrieval conditions meeting the grammar definition of a search engine when the acquisition unit acquires the screening conditions input by a user accessing a list page;
the query unit is used for searching by using the searching condition converted by the conversion unit; if the primary key of the entity is not searched, deleting one search term in the search condition, searching in the degraded database, if the primary key of the entity is not searched, deleting one search term in the search condition again, searching again in the degraded database until the primary key of the entity is searched;
the query unit is used for querying entity data in the degraded database by using the primary key of the entity retrieved by the retrieval unit;
and the output unit is used for outputting the entity data inquired by the inquiry unit.
Wherein the apparatus further comprises: a storage unit;
the query unit is further configured to query entity data in the source database by using the primary key of the entity if the primary key of the entity is retrieved when the retrieval unit uses the retrieval condition for retrieval;
the storage unit is configured to store the primary key of the entity retrieved by the retrieval unit and the entity data corresponding to the primary key of the entity queried by the query unit in the degraded database in a bound manner.
Wherein the content of the first and second substances,
the storage unit is further configured to set an effective time H when the primary key of the entity and the entity data corresponding to the primary key of the entity are bound and stored in the degradation database; when the retrieval unit retrieves the primary key of the entity in the downgrade database, the valid time corresponding to the primary key of the entity is updated to be H-H1, wherein H1 is the remaining valid time corresponding to the primary key of the entity when the primary key of the entity is retrieved.
Wherein the content of the first and second substances,
the storage unit is further configured to determine, after the querying unit queries entity data in a source database using the primary key of the entity, whether the primary key of the entity is already stored in the degradation database and is valid, and if not, bind and store the primary key of the entity and the entity data corresponding to the primary key of the entity in the degradation database, and set valid time H; if yes, the valid time corresponding to the primary key of the entity is updated to be H-H1, wherein H1 is the remaining valid time corresponding to the primary key of the entity when the primary key of the entity is retrieved.
Wherein the content of the first and second substances,
the retrieval unit is further used for deleting the qualifier if the primary key of the entity is not retrieved when the retrieval condition also comprises the qualifier, and retrieving in the degraded database; wherein the limiting word is a search word and/or a function limiting word; and if the main key of the entity is not retrieved, executing the operation of deleting one search term in the search condition.
In another embodiment, an electronic device is provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the list page retrieval destaging method when executing the program.
In another embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method for destaging a list page retrieval.
According to the technical scheme, when the main key of the entity is not retrieved by using the retrieval condition, the degraded retrieval is performed, the main key of the entity is retrieved in the degraded database in a mode of reducing the retrieval words, and the corresponding entity data is inquired. According to the scheme, the reliability of the list page degradation retrieval is improved in a mode of reducing the number of the retrieval words and storing the entity data in the degradation database in an associated mode.
In the embodiment of the application, the initial degraded retrieval is carried out by deleting the qualifier in the retrieval condition, and the retrieval word is deleted for retrieval when the main key of the entity cannot be retrieved; and setting the effective time of the entity primary key and the entity data stored in the degradation database to further improve the reliability of the list degradation retrieval.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive labor.
FIG. 1 is a schematic diagram illustrating a destage flow of a list page search according to an embodiment of the present disclosure;
FIG. 2 is a schematic diagram illustrating a destaging process of a list page search according to a second embodiment of the present application;
FIG. 3 is a schematic diagram illustrating a destaging process of searching a list page in the third embodiment of the present application;
FIG. 4 is a schematic diagram illustrating a demotion process of searching a list page in the fourth embodiment of the present application
FIG. 5 is a schematic diagram of an apparatus for implementing the above technique in an embodiment of the present application;
fig. 6 is a schematic physical structure diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The terms "first," "second," "third," "fourth," and the like in the description and in the claims, as well as in the drawings, if any, are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are, for example, capable of operation in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements explicitly listed, but may include other steps or elements not explicitly listed or inherent to such process, method, article, or apparatus.
The technical solution of the present invention will be described in detail with specific examples. Several of the following embodiments may be combined with each other and some details of the same or similar concepts or processes may not be repeated in some embodiments.
The embodiment of the application provides a list page retrieval degradation method which is applied to a degradation retrieval device, wherein the degradation retrieval device can be a PC, a server and the like.
Example one
Referring to fig. 1, fig. 1 is a schematic diagram illustrating a destage flow of list page retrieval according to an embodiment of the present application. The method comprises the following specific steps:
step 101, when obtaining the screening condition input by the user accessing the list page, converting the screening condition into the retrieval condition meeting the grammar definition of the search engine.
And the filtering conditions input by the user comprise filtering categories.
Taking the second-hand house list screening condition, search engine elastic search as an example, an example of the screening condition conversion search condition is given.
Assume that there are four categories of screening price, area, room, labels.
The prices are in a preset range, such as 100 ten thousand, 100 ten thousand to 200 ten thousand, 200 ten thousand to 300 ten thousand, and 300 ten thousand or more, and the corresponding search conditions are [0, 100], [100, 200], [200, 300], [300 ], and can be represented by p1, p2, p3, and p 4.
The area is also a preset interval, such as within 60 levels, 60-90 levels, 90-120 levels and more than 120 levels, and the corresponding retrieval conditions are as follows: [0, 60], [60, 90], [90, 120], [120 ], may be provided as denoted by a1, a2, a3, a 4.
The living room has: one room, two rooms, three rooms, four rooms, five rooms, six rooms and more, and the corresponding search conditions: 1. 2, 3, 4, 5, [6, ] can be provided as denoted by l1, l2, l3, l4, l5, l 6.
The label has: the corresponding retrieval conditions of the subway, the five years and the fine decoration are as follows: t1, t2, t 3; i.e. using t1, t2, t 3;
if the screening condition of the user is as follows: and if the two rooms are 100-200 ten thousand, 90-120 flat and near subways, converting the screening condition into a retrieval condition meeting the grammar definition of a search engine, wherein the retrieval condition is as follows: l2p2a3t1, in particular implementations, a3l2p2t1 may also be arranged in conditional alphabetical order.
And 102, searching by using the searching condition.
And 103, if the primary key of the entity is not searched, deleting one search term in the search condition, searching in the degraded database, if the primary key of the entity is not searched, deleting one search term in the search condition again, and searching again in the degraded database until the primary key of the entity is searched.
The degradation database stores the primary key of the entity and the corresponding entity data. The primary key of the entity in the database and the corresponding entity data are entity data which are searched in the source database by the entity primary key searched in the non-degraded search.
When a plurality of search terms exist, such as a3, l2, p2 and t1, one search term a3 can be selected to be deleted according to the front-to-back ordering of the search terms; and randomly selecting one search term from the four search terms to delete.
In the embodiment of the present application, which search term in the current search condition is selected to be deleted is not limited in the embodiment of the present application.
If the last retrieval word left in the retrieval condition is known to still not retrieve the primary key of the entity, the retrieval fails.
And 104, querying entity data in the degraded database by using the retrieved primary key of the entity.
And step 105, outputting the inquired entity data.
For the output mode of the entity data, the embodiment of the present application is not limited thereto, and the corresponding entity data may be assembled, such as a book, a price of the book, a cover diagram, an author, a publishing company, and the like. And displaying the assembled information to a user.
In the embodiment of the application, when the primary key of the entity is not retrieved by using the retrieval condition, the degradation retrieval is carried out, the primary key of the entity is retrieved in the degradation database in a mode of reducing the retrieval words, and the corresponding entity data is inquired. According to the scheme, the reliability of the list page degradation retrieval is improved in a mode of reducing the number of the retrieval words and storing the entity data in the degradation database in an associated mode.
Example two
Referring to fig. 2, fig. 2 is a schematic view illustrating a destaging flow of list page retrieval in the second embodiment of the present application. The method comprises the following specific steps:
step 201, when obtaining the screening condition input by the user accessing the list page, converting the screening condition into the retrieval condition meeting the grammar definition of the search engine.
And the filtering conditions input by the user comprise filtering categories.
Taking the second-hand house list screening condition, search engine elastic search as an example, an example of the screening condition conversion search condition is given.
Assume that there are four categories of screening price, area, room, labels.
The prices are in a preset range, such as 100 ten thousand, 100 ten thousand to 200 ten thousand, 200 ten thousand to 300 ten thousand, and 300 ten thousand or more, and the corresponding search conditions are [0, 100], [100, 200], [200, 300], [300 ], and can be represented by p1, p2, p3, and p 4.
The area is also a preset interval, such as within 60 levels, 60-90 levels, 90-120 levels and more than 120 levels, and the corresponding retrieval conditions are as follows: [0, 60], [60, 90], [90, 120], [120 ], may be provided as denoted by a1, a2, a3, a 4.
The living room has: one room, two rooms, three rooms, four rooms, five rooms, six rooms and more, and the corresponding search conditions: 1. 2, 3, 4, 5, [6, ] can be provided as denoted by l1, l2, l3, l4, l5, l 6.
The label has: the corresponding retrieval conditions of the subway, the five years and the fine decoration are as follows: t1, t2, t 3; i.e. using t1, t2, t 3;
if the screening condition of the user is as follows: and if the two rooms are 100-200 ten thousand, 90-120 flat and near subways, converting the screening condition into a retrieval condition meeting the grammar definition of a search engine, wherein the retrieval condition is as follows: l2p2a3t1, in particular implementations, a3l2p2t1 may also be arranged in conditional alphabetical order.
And step 202, using the search condition to search.
Step 203, if the primary key of the entity is retrieved, using the primary key of the entity to query entity data in the source database, and binding and storing the primary key of the entity and the entity data corresponding to the primary key of the entity into the degraded database. Step 206 is performed.
The main key of the entity can be commodity code, house source number, book number, etc., namely the unique identification of the entity.
And storing the primary key of the entity and the entity data binding corresponding to the primary key of the entity into the degradation database so as to be used for performing degradation retrieval.
And 204, if the primary key of the entity is not searched, deleting one search term in the search condition, searching in the degraded database, if the primary key of the entity is not searched, deleting one search term in the search condition again, and searching again in the degraded database until the primary key of the entity is searched.
The degradation database stores the primary key of the entity and the corresponding entity data. The primary key of the entity in the database and the corresponding entity data are entity data which are searched in the source database by the entity primary key searched in the non-degraded search.
When a plurality of search terms exist, such as a3, l2, p2 and t1, one search term a3 can be selected to be deleted according to the front-to-back ordering of the search terms; and randomly selecting one search term from the four search terms to delete.
In the embodiment of the present application, which search term in the current search condition is selected to be deleted is not limited in the embodiment of the present application.
If the last retrieval word left in the retrieval condition is known to still not retrieve the primary key of the entity, the retrieval fails.
Step 205, using the retrieved primary key of the entity to query entity data in the degraded database.
And step 206, outputting the inquired entity data.
For the output mode of the entity data, the embodiment of the present application is not limited thereto, and the corresponding entity data may be assembled, such as a book, a price of the book, a cover diagram, an author, a publishing company, and the like. And displaying the assembled information to a user.
In the embodiment of the application, when the primary key of the entity is retrieved by using the retrieval condition and the entity data is inquired in the source database, the primary key is stored in the degradation database for performing degradation retrieval; and when the primary key of the entity is not retrieved, performing degradation retrieval, retrieving the primary key of the entity in a degradation database in a mode of reducing the retrieval words, and inquiring corresponding entity data. According to the scheme, the reliability of the list page degradation retrieval is improved in a mode of reducing the number of the retrieval words and storing the entity data in the degradation database in an associated mode.
EXAMPLE III
Referring to fig. 3, fig. 3 is a schematic view illustrating a destaging flow of list page retrieval in the third embodiment of the present application. The method comprises the following specific steps:
step 301, when obtaining the screening condition input by the user accessing the list page, converting the screening condition into the retrieval condition meeting the grammar definition of the search engine.
Step 302, using the search condition to search.
Step 303, if the primary key of the entity is not retrieved and the retrieval condition includes a qualifier, deleting the qualifier and then retrieving in the downgrade database.
The qualifier is: search terms, and/or function limiting terms.
When the user inputs the filtering condition, besides inputting the selected filtering type, a search word, a selection function limiting word and the like can be input.
After such a filter condition is converted into a search condition, the search condition includes a search term and a qualifier.
If the search condition comprises a qualifier, deleting the qualifier, and if the qualifier comprises a search word, deleting the search word and performing degraded search; if the qualifier includes the search term and the function qualifier, then the search term and the function qualifier are deleted, and then the degraded retrieval is carried out; and if the qualifier comprises the function qualifier, deleting the function qualifier and performing downgraded search.
If the screening conditions are as follows: 400-500 ten thousand in the middle guancun, two rooms, when converting to the search condition, the method comprises: the Zhongguancun and the search term;
the middle guancun is a search term, and the search term is as follows: i2 (two living rooms) and P4 (400-500 ten thousand).
If the screening conditions are as follows: 400-500 ten thousand in two rooms, and the price is from low to high, when changing into the search condition, include: the search terms and the price are from low to high;
the search terms are as follows: i2 (two living rooms) and P4 (400-500 ten thousand), and the function qualifiers are from low price to high price.
If the screening conditions are as follows: two rooms, 400-500 ten thousand, the second page, when converting to the search condition, includes: a search term and a second page;
the search terms are as follows: i2 (two rooms) and P4 (400-500 ten thousand), and the function qualifier is the second page.
And 304, if the primary key of the entity is not searched, deleting a search word in the search condition, searching in the degraded database, if the primary key of the entity is not searched, deleting a search word in the search condition again, and searching again in the degraded database until the primary key of the entity is searched.
The degradation database stores the primary key of the entity and the corresponding entity data. The primary key of the entity in the database and the corresponding entity data are entity data which are searched in the source database by the entity primary key searched in the non-degraded search.
When a plurality of search terms exist, such as a3, l2, p2 and t1, one search term a3 can be selected to be deleted according to the front-to-back ordering of the search terms; and randomly selecting one search term from the four search terms to delete.
In the embodiment of the present application, which search term in the current search condition is selected to be deleted is not limited in the embodiment of the present application.
If the last retrieval word left in the retrieval condition is known to still not retrieve the primary key of the entity, the retrieval fails.
Step 305, using the retrieved primary key of the entity to query entity data in the degraded database.
And step 306, outputting the queried entity data.
In the embodiment of the application, when the main key of the entity is not searched by using the search condition, the degraded search is carried out, the limited word in the search condition is deleted firstly to carry out the preliminary degraded search, and when the main key of the entity cannot be searched, the search word is deleted to carry out the search; and searching the entity primary key in the degraded database in a mode of reducing search terms and inquiring corresponding entity data. The scheme improves the reliability of the list page degradation retrieval by reducing the restriction words, the search words and the ways of storing entity data in the degradation database in an associated manner.
Example four
Referring to fig. 4, fig. 4 is a schematic view illustrating a destage flow of list page retrieval in the fourth embodiment of the present application. The method comprises the following specific steps:
step 401, when the screening condition input by the user accessing the list page is obtained, the screening condition is converted into the retrieval condition meeting the grammar definition of the search engine.
And the filtering conditions input by the user comprise filtering categories.
Taking the second-hand house list screening condition, search engine elastic search as an example, an example of the screening condition conversion search condition is given.
Assume that there are four categories of screening price, area, room, labels.
The prices are in a preset range, such as 100 ten thousand, 100 ten thousand to 200 ten thousand, 200 ten thousand to 300 ten thousand, and 300 ten thousand or more, and the corresponding search conditions are [0, 100], [100, 200], [200, 300], [300 ], and can be represented by p1, p2, p3, and p 4.
The area is also a preset interval, such as within 60 levels, 60-90 levels, 90-120 levels and more than 120 levels, and the corresponding retrieval conditions are as follows: [0, 60], [60, 90], [90, 120], [120 ], may be provided as denoted by a1, a2, a3, a 4.
The living room has: one room, two rooms, three rooms, four rooms, five rooms, six rooms and more, and the corresponding search conditions: 1. 2, 3, 4, 5, [6, ] can be provided as denoted by l1, l2, l3, l4, l5, l 6.
The label has: the corresponding retrieval conditions of the subway, the five years and the fine decoration are as follows: t1, t2, t 3; i.e. using t1, t2, t 3;
if the screening condition of the user is as follows: and if the two rooms are 100-200 ten thousand, 90-120 flat and near subways, converting the screening condition into a retrieval condition meeting the grammar definition of a search engine, wherein the retrieval condition is as follows: l2p2a3t1, in particular implementations, a3l2p2t1 may also be arranged in conditional alphabetical order.
Step 402, using the search condition to search.
Step 403, if the primary key of the entity is retrieved, using the primary key of the entity to query entity data in the source database, and determining whether the primary key of the entity exists in the degraded database, and if so, executing step 404; otherwise, step 405 is performed.
The main key of the entity can be commodity code, house source number, book number, etc., namely the unique identification of the entity.
Step 404, updating the valid time corresponding to the primary key of the entity to be H-H1. Step 408 is performed.
H is an effective time initially set for each primary key; when the primary key of the entity is not hit within the time H, deleting the stored primary key of the entity and entity data corresponding to the primary key of the entity; or set to invalid and cannot be used for downgrade retrieval.
A primary key miss for an entity refers to a miss in the source database, and not a demoted search hit in the demoted database.
H1 is the remaining valid time corresponding to the primary key of the entity when the primary key of the entity is retrieved.
Step 405, binding and storing the primary key of the entity and the entity data corresponding to the primary key of the entity into the degradation database, and setting the effective time H. Step 408 is performed.
And after the valid time is set for the main key, starting a timer for timing the remaining valid time, if the valid time is up and the main key is not hit, namely not retrieved, setting the main key of the entity to be invalid, or directly deleting the main key of the entity and the data of the bound and stored entity.
In specific implementation, in the embodiment of the present application, whether to invalidate or delete the implementation is not limited.
If the data is invalid, the valid time can be directly set when the corresponding entity primary key and the corresponding entity data need to be stored again.
And storing the primary key of the entity and the entity data binding corresponding to the primary key of the entity into the degradation database so as to be used for performing degradation retrieval.
And 406, if the primary key of the entity is not retrieved, deleting one search term in the search condition, and searching in the degraded database, and if the primary key of the entity is not retrieved, deleting one search term in the search condition again, and searching again in the degraded database until the primary key of the entity is retrieved.
The degradation database stores the primary key of the entity and the corresponding entity data. The primary key of the entity in the database and the corresponding entity data are entity data which are searched in the source database by the entity primary key searched in the non-degraded search.
When a plurality of search terms exist, such as a3, l2, p2 and t1, one search term a3 can be selected to be deleted according to the front-to-back ordering of the search terms; and randomly selecting one search term from the four search terms to delete.
In the embodiment of the present application, which search term in the current search condition is selected to be deleted is not limited in the embodiment of the present application.
If the last retrieval word left in the retrieval condition is known to still not retrieve the primary key of the entity, the retrieval fails.
Step 407, when the primary key of the entity is retrieved in the degraded database, updating the valid time corresponding to the primary key of the entity to be H-H1, and querying entity data in the degraded database by using the retrieved primary key of the entity.
If the entity primary key is searched through non-degraded search, searching in the source database; and if the entity data are searched through the downgrade search, searching the corresponding entity data in the downgrade database by the searched entity primary key.
H is an effective time initially set for each primary key; when the primary key of the entity is not hit within the time H, deleting the stored primary key of the entity and entity data corresponding to the primary key of the entity; or set to invalid and cannot be used for downgrade retrieval.
A primary key miss for an entity refers to a miss in the source database, and not a demoted search hit in the demoted database.
H1 is the remaining valid time corresponding to the primary key of the entity when the primary key of the entity is retrieved.
And step 408, outputting the inquired entity data.
For the output mode of the entity data, the embodiment of the present application is not limited thereto, and the corresponding entity data may be assembled, such as a book, a price of the book, a cover diagram, an author, a publishing company, and the like. And displaying the assembled information to a user.
In the embodiment of the application, when the primary key of the entity is not retrieved by using the retrieval condition, the degradation retrieval is carried out, the primary key of the entity is retrieved in the degradation database in a mode of reducing the retrieval words, and the corresponding entity data is inquired. According to the scheme, the reliability of the list page degradation retrieval is improved in a mode of reducing the number of the retrieval words and storing the entity data in the degradation database in an associated mode.
In the embodiment of the application, the effective time is set for the entity primary key and the entity data stored in the degradation database, so that the effective time is updated when the primary key of the corresponding entity is hit, and the reliability of list degradation retrieval is further improved without setting a short time for storing the entity primary key and the entity data.
Based on the same inventive concept, the embodiment of the application also provides a list page retrieval downgrade device. Referring to fig. 5, fig. 5 is a schematic structural diagram of an apparatus applied to the above technology in the embodiment of the present application. The device comprises: an acquisition unit 501, a conversion unit 502, a retrieval unit 503, an inquiry unit 504, and an output unit 505;
an obtaining unit 501, configured to obtain a screening condition;
a converting unit 502, configured to, when the obtaining unit 501 obtains the filtering condition input by the user accessing the list page, convert the filtering condition into a retrieval condition meeting the syntax definition of the search engine;
a retrieval unit 503, configured to perform retrieval using the retrieval condition converted by the conversion unit 502; if the primary key of the entity is not searched, deleting one search term in the search condition, searching in the degraded database, if the primary key of the entity is not searched, deleting one search term in the search condition again, searching again in the degraded database until the primary key of the entity is searched;
a query unit 504, configured to query the entity data in the degraded database using the primary key of the entity retrieved by the retrieval unit 503;
and an output unit 505, configured to output the entity data queried by the querying unit 504.
Preferably, the apparatus further comprises: a storage unit 506;
the querying unit 504 is further configured to query, when the retrieving unit 503 retrieves using the retrieval condition, entity data in the source database using the primary key of the entity if the primary key of the entity is retrieved;
a storing unit 506, configured to store the entity data binding corresponding to the primary key of the entity retrieved by the retrieving unit 503 and the primary key of the entity queried by the querying unit 504 in the degraded database.
Preferably, the first and second electrodes are formed of a metal,
the storage unit 506 is further configured to set an effective time H when the primary key of the entity and the entity data corresponding to the primary key of the entity are bound and stored in the degradation database; when the retrieval unit 503 retrieves the primary key of the entity in the downgrade database, the valid time corresponding to the primary key of the entity is updated to be H-H1, where H1 is the remaining valid time corresponding to the primary key of the entity when the primary key of the entity is retrieved.
Preferably, the first and second electrodes are formed of a metal,
a storage unit 506, further configured to determine, after the query unit 504 queries the entity data in the source database by using the primary key of the entity, whether the primary key of the entity is already stored in the degraded database and is valid, if not, bind and store the primary key of the entity and the entity data corresponding to the primary key of the entity into the degraded database, and set valid time H; if yes, the valid time corresponding to the primary key of the entity is updated to be H-H1, wherein H1 is the remaining valid time corresponding to the primary key of the entity when the primary key of the entity is retrieved.
Preferably, the first and second electrodes are formed of a metal,
a retrieving unit 503, further configured to, when the retrieval condition further includes a qualifier, delete the qualifier if the primary key of the entity is not retrieved, and retrieve in the degraded database; wherein the limiting word is a search word and/or a function limiting word; and if the main key of the entity is not retrieved, executing the operation of deleting one search term in the search condition.
The units of the above embodiments may be integrated into one body, or may be separately deployed; may be combined into one unit or further divided into a plurality of sub-units.
In another embodiment, an electronic device is also provided, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the list page retrieval destaging method when executing the program.
In another embodiment, a computer-readable storage medium is also provided having stored thereon computer instructions that, when executed by a processor, may implement the steps in the method for destaging list page searches.
Fig. 6 is a schematic physical structure diagram of an electronic device according to an embodiment of the present invention. As shown in fig. 6, the electronic device may include: a Processor (Processor)610, a communication Interface (Communications Interface)620, a Memory (Memory)630 and a communication bus 640, wherein the Processor 610, the communication Interface 620 and the Memory 630 communicate with each other via the communication bus 640. The processor 610 may call logic instructions in the memory 630 to perform the following method:
when the screening condition input by a user accessing a list page is obtained, converting the screening condition into a retrieval condition meeting the grammar definition of a search engine;
searching by using the searching condition;
if the primary key of the entity is not searched, deleting one search term in the search condition, searching in the degraded database, if the primary key of the entity is not searched, deleting one search term in the search condition again, searching again in the degraded database until the primary key of the entity is searched;
querying the demotion database for entity data using the retrieved primary key of the entity;
and outputting the queried entity data.
In addition, the logic instructions in the memory 630 may be implemented in software functional units and stored in a computer readable storage medium when the logic instructions are sold or used as independent products. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Through the above description of the embodiments, those skilled in the art will clearly understand that each embodiment can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware. With this understanding in mind, the above-described technical solutions may be embodied in the form of a software product, which can be stored in a computer-readable storage medium such as ROM/RAM, magnetic disk, optical disk, etc., and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) to execute the methods described in the embodiments or some parts of the embodiments.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method for destaging a list page search, the method comprising:
when the screening condition input by a user accessing a list page is obtained, converting the screening condition into a retrieval condition meeting the grammar definition of a search engine;
searching by using the searching condition;
if the primary key of the entity is not searched, deleting one search term in the search condition, searching in the degraded database, if the primary key of the entity is not searched, deleting one search term in the search condition again, searching again in the degraded database until the primary key of the entity is searched;
querying the demotion database for entity data using the retrieved primary key of the entity;
and outputting the queried entity data.
2. The method according to claim 1, wherein when the search is performed using the search condition, the method further comprises:
and if the primary key of the entity is retrieved, using the primary key of the entity to inquire entity data in a source database, and binding and storing the primary key of the entity and the entity data corresponding to the primary key of the entity into the degraded database.
3. The method of claim 2, further comprising: setting effective time H when the primary key of the entity and the entity data corresponding to the primary key of the entity are bound and stored in the degradation database;
when the primary key of the entity is retrieved in the degraded database, the valid time corresponding to the primary key of the entity is updated to be H-H1, wherein H1 is the remaining valid time corresponding to the primary key of the entity when the primary key of the entity is retrieved.
4. The method of claim 2, wherein after querying entity data using the primary key of the entity, before storing the primary key of the entity and the entity data binding corresponding to the primary key of the entity in the degraded database, the method further comprises:
determining whether the entity primary key is stored in the degradation database and is valid, if not, binding and storing the entity primary key and entity data corresponding to the entity primary key into the degradation database, and setting valid time H; if yes, the valid time corresponding to the primary key of the entity is updated to be H-H1, wherein H1 is the remaining valid time corresponding to the primary key of the entity when the primary key of the entity is retrieved.
5. The method according to any one of claims 1-4, wherein when the search condition further includes a qualifier, after the primary key of the entity is not retrieved, before deleting a search term in the search condition, the method further comprises:
deleting the qualifier, and searching in the downgraded database; wherein the limiting word is a search word and/or a function limiting word;
and if the main key of the entity is not retrieved, executing the step of deleting one search term in the search condition.
6. A list page retrieval destaging apparatus, the apparatus comprising: the device comprises an acquisition unit, a conversion unit, a retrieval unit, a query unit and an output unit;
the acquisition unit is used for acquiring screening conditions;
the conversion unit is used for converting the screening conditions into retrieval conditions meeting the grammar definition of a search engine when the acquisition unit acquires the screening conditions input by a user accessing a list page;
the retrieval unit is used for retrieving by using the retrieval conditions converted by the conversion unit; if the primary key of the entity is not searched, deleting one search term in the search condition, searching in the degraded database, if the primary key of the entity is not searched, deleting one search term in the search condition again, searching again in the degraded database until the primary key of the entity is searched;
the query unit is used for querying entity data in the degraded database by using the primary key of the entity retrieved by the retrieval unit;
and the output unit is used for outputting the entity data inquired by the inquiry unit.
7. The apparatus of claim 6, further comprising: a storage unit;
the query unit is further configured to query entity data in the source database by using the primary key of the entity if the primary key of the entity is retrieved when the retrieval unit uses the retrieval condition for retrieval;
the storage unit is configured to store the primary key of the entity retrieved by the retrieval unit and the entity data corresponding to the primary key of the entity queried by the query unit in the degraded database in a bound manner.
8. The method according to claim 6 or 7,
the retrieval unit is further used for deleting the qualifier if the primary key of the entity is not retrieved when the retrieval condition also comprises the qualifier, and retrieving in the degraded database; wherein the limiting word is a search word and/or a function limiting word; and if the main key of the entity is not retrieved, executing the operation of deleting one search term in the search condition.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1-5 when executing the program.
10. A computer-readable storage medium, on which a computer program is stored, which program, when being executed by a processor, is adapted to carry out the method of any one of claims 1 to 5.
CN202011039791.0A 2020-09-28 2020-09-28 List page retrieval degradation method and device, electronic equipment and storage medium Active CN112131455B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011039791.0A CN112131455B (en) 2020-09-28 2020-09-28 List page retrieval degradation method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011039791.0A CN112131455B (en) 2020-09-28 2020-09-28 List page retrieval degradation method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN112131455A true CN112131455A (en) 2020-12-25
CN112131455B CN112131455B (en) 2021-09-17

Family

ID=73843171

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011039791.0A Active CN112131455B (en) 2020-09-28 2020-09-28 List page retrieval degradation method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN112131455B (en)

Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1185786A (en) * 1997-09-05 1999-03-30 Hitachi Ltd Document retrieval method, document retrieval service and document retrieval supporting service
TW200422878A (en) * 2002-08-05 2004-11-01 Yahoo Inc Method and apparatus for search ranking using human input and automated ranking
JP2006127123A (en) * 2004-10-28 2006-05-18 Mitsubishi Electric Corp Application server, database server, web retrieval system, retrieval result acquisition method, retrieval result response method, retrieval result acquisition program and retrieval result response program
US8041730B1 (en) * 2006-10-24 2011-10-18 Google Inc. Using geographic data to identify correlated geographic synonyms
CN102542039A (en) * 2010-12-27 2012-07-04 微软公司 Discovery of remotely executed applications
CN103034663A (en) * 2011-09-29 2013-04-10 阿里巴巴集团控股有限公司 Information searching method and equipment
CN103336849A (en) * 2013-07-24 2013-10-02 昆明理工大学 Method and device for increasing retrieval speed in database retrieval system
CN103678362A (en) * 2012-09-13 2014-03-26 深圳市世纪光速信息技术有限公司 Search method and search system
CN106372226A (en) * 2016-09-07 2017-02-01 知识产权出版社有限责任公司 Information retrieval device and method
CN109766394A (en) * 2018-12-19 2019-05-17 上海前隆信息科技有限公司 Metrology platform data query method and device, readable storage medium storing program for executing and terminal
CN109828980A (en) * 2019-02-19 2019-05-31 北京字节跳动网络技术有限公司 Data cache method, device, terminal and storage medium
CN111680210A (en) * 2020-05-26 2020-09-18 北京三快在线科技有限公司 Information searching method, device, searching gateway and storage medium

Patent Citations (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1185786A (en) * 1997-09-05 1999-03-30 Hitachi Ltd Document retrieval method, document retrieval service and document retrieval supporting service
TW200422878A (en) * 2002-08-05 2004-11-01 Yahoo Inc Method and apparatus for search ranking using human input and automated ranking
JP2006127123A (en) * 2004-10-28 2006-05-18 Mitsubishi Electric Corp Application server, database server, web retrieval system, retrieval result acquisition method, retrieval result response method, retrieval result acquisition program and retrieval result response program
US8041730B1 (en) * 2006-10-24 2011-10-18 Google Inc. Using geographic data to identify correlated geographic synonyms
CN102542039A (en) * 2010-12-27 2012-07-04 微软公司 Discovery of remotely executed applications
CN103034663A (en) * 2011-09-29 2013-04-10 阿里巴巴集团控股有限公司 Information searching method and equipment
CN103678362A (en) * 2012-09-13 2014-03-26 深圳市世纪光速信息技术有限公司 Search method and search system
CN103336849A (en) * 2013-07-24 2013-10-02 昆明理工大学 Method and device for increasing retrieval speed in database retrieval system
CN106372226A (en) * 2016-09-07 2017-02-01 知识产权出版社有限责任公司 Information retrieval device and method
CN109766394A (en) * 2018-12-19 2019-05-17 上海前隆信息科技有限公司 Metrology platform data query method and device, readable storage medium storing program for executing and terminal
CN109828980A (en) * 2019-02-19 2019-05-31 北京字节跳动网络技术有限公司 Data cache method, device, terminal and storage medium
CN111680210A (en) * 2020-05-26 2020-09-18 北京三快在线科技有限公司 Information searching method, device, searching gateway and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
RYUNOSUKE OZAWA: "Long Term Management of Web Cache for Web Archive", 《2012 15TH INTERNATIONAL CONFERENCE ON NETWORK-BASED INFORMATION SYSTEMS》 *
朱红泽: "基于微博topic摘要的话题跟踪算法", 《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》 *
王莹莹: "借助公开搜索服务实现的学术文献检索策略", 《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》 *

Also Published As

Publication number Publication date
CN112131455B (en) 2021-09-17

Similar Documents

Publication Publication Date Title
CN101957857A (en) Automatic information push method and server
CN103853802B (en) Device and method for indexing digital content
CN112131218B (en) Hash table look-up method, device and equipment for gene comparison and storage medium
CN105187242B (en) A kind of user's anomaly detection method excavated based on variable-length pattern
CN102725759A (en) Semantic table of contents for search results
JP2008546098A (en) Data-dependent filtering system and method for patient demographic record query
US9904705B2 (en) Data table performance optimization
CN104715069A (en) Processing method and processing device for searching recommendation words
CN107851108A (en) Use the matching document of bit vector search index
CN106202254A (en) A kind of querying method and data query system
CN110245357B (en) Main entity identification method and device
CN107992569A (en) Data access method, device, electronic equipment and computer-readable recording medium
CN112131455B (en) List page retrieval degradation method and device, electronic equipment and storage medium
CN103500222A (en) Method and device for searching for chat object through communication software
CN106599082B (en) Retrieval method, related device and electronic equipment
CN106844406B (en) Search method and search device
CN103646034A (en) Web search engine system and search method based content credibility
KR102415155B1 (en) Apparatus and method for retrieving data
JP3832821B2 (en) Data retrieval method, system, and program product
CN108228802B (en) Recommendation method and device for input association
CN110442593B (en) Cross-application sharing method based on user search information
CN108595450A (en) One kind burying point data base construction method, bury point data base and buries a querying method
CN112905759A (en) Intellectual property retrieval system and method
CN101576897A (en) File content retrieval system and file content retrieval method
CN111782674A (en) Task query method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20210323

Address after: 100085 Floor 101 102-1, No. 35 Building, No. 2 Hospital, Xierqi West Road, Haidian District, Beijing

Applicant after: Seashell Housing (Beijing) Technology Co.,Ltd.

Address before: Unit 05, room 112, 1 / F, block C, comprehensive service area, Nangang Industrial Zone, Tianjin Economic and Technological Development Zone, 300280

Applicant before: BEIKE TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
GR01 Patent grant
GR01 Patent grant