CN108536740B - Method, medium and equipment for determining search result - Google Patents

Method, medium and equipment for determining search result Download PDF

Info

Publication number
CN108536740B
CN108536740B CN201810188470.3A CN201810188470A CN108536740B CN 108536740 B CN108536740 B CN 108536740B CN 201810188470 A CN201810188470 A CN 201810188470A CN 108536740 B CN108536740 B CN 108536740B
Authority
CN
China
Prior art keywords
search
searched
reference queue
determining
queue
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
CN201810188470.3A
Other languages
Chinese (zh)
Other versions
CN108536740A (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.)
Shanghai Shangxiang Network Technology Co.,Ltd.
Original Assignee
Shanghai Lianshang Network 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 Shanghai Lianshang Network Technology Co Ltd filed Critical Shanghai Lianshang Network Technology Co Ltd
Priority to CN201810188470.3A priority Critical patent/CN108536740B/en
Publication of CN108536740A publication Critical patent/CN108536740A/en
Application granted granted Critical
Publication of CN108536740B publication Critical patent/CN108536740B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application discloses a method, medium and equipment for determining search results, wherein a recall content queue with the least number is taken as a reference queue, and a number to be searched is determined from the reference queue. Thereafter, the search range of each non-reference queue is determined. Then, determining the searching sequence of each non-reference queue, and searching the number consistent with the number to be searched in the searching range of each non-reference queue according to the searching sequence. And when the number consistent with the number to be searched is searched in each non-reference queue, determining the recall content corresponding to the number to be searched as a search result.

Description

Method, medium and equipment for determining search result
Technical Field
The present application relates to the field of computer technologies, and in particular, to a method, medium, and apparatus for determining a search result.
Background
At present, common open source items for searching are Solr, elastic search, and the like. Often businesses will use the open source items directly to conduct search services. Such open-source search items mainly adopt a full-text search engine (Lucene) -based search mode, and determine search results according to input keywords.
Specifically, when a search is performed based on a full-text search engine, first, at least one keyword may be determined according to a search request. And secondly, determining the content containing any keyword from the contents to be selected and recalling the content. Then, according to the difference of the contained keywords, a plurality of queues (for convenience of description, referred to as recall content queues for short) composed of the recall content are determined, wherein, as one recall content may contain a plurality of different keywords, the same recall content may appear in a plurality of recall content queues. And then, selecting two shortest recall content queues according to the length sequence of the recall content queues for carrying out and calculation, creating a new recall content queue according to the recall content contained in the two recall content queues, and finally determining a plurality of recall content containing all keywords as a search result by repeating the process of creating the new recall content queue.
FIG. 1 is a diagram illustrating recall content queues determined according to recall content, wherein each recall content includes keywords (e.g., a, b, c) that are not identical, and different recalled content can be assigned a unique number corresponding to the search at the time of recall. The recalled content queue is determined according to the keyword, for example, each recalled content in the recalled content queue 1 includes the keyword a, and so on. In addition, the length of the recalled content queues 1-3 is inconsistent.
FIG. 2 is a schematic diagram of creating a new recalled content queue and determining search results based on the recalled content queues of FIG. 1. The recall content queue 1 and the recall content queue 2 are two shortest recall content queues, whether the recall contents in the two recall content queues are consistent or not is compared one by one, the consistent recall contents are used as recall contents in a new recall content queue (such as a queue 4), then the process is repeated for the recall content queue 4 and the recall content queue 3, the recall content queue 5 is determined to be a search result, and each recall content in the recall content queue 5 comprises keywords a-c.
Therefore, in the search method adopted in the prior art, the process of determining the search result is complex, and when the recall content queue is long (that is, the number of recall contents contained in the recall content queue is large), a large amount of comparison work needs to be performed, so that the efficiency is low. Therefore, the application provides a new method for determining the search result to solve the problem of low efficiency of the existing search method.
Disclosure of Invention
Some embodiments of the present application provide methods, media, and devices to determine search results.
Some embodiments of the present application employ the following technical solutions: a method of determining search results, comprising: determining a plurality of recalled content queues, wherein each recalled content queue consists of at least one number of recalled content, and the number corresponding to the recalled content is unique in the plurality of recalled content queues; taking the recall content queue with the least number as a reference queue, taking other recall content queues as non-reference queues, and taking the number with the minimum value in the reference queue as a number to be searched; determining the searching initial position of each non-reference queue, and determining the searching end position of each non-reference queue according to the searching initial position of each non-reference queue, the number to be searched and a preset offset rule; determining a search sequence for each non-reference queue; according to the determined search sequence, searching a number consistent with the number to be searched in the search range corresponding to the search starting position and the search ending position of each non-reference queue in sequence; and when the number consistent with the number to be searched is searched in each non-reference queue, taking the recalled content corresponding to the number to be searched as a search result.
A computer readable medium having computer readable instructions stored thereon which are executable by a processor to implement the foregoing method.
A network device for determining search results, wherein the network device comprises: one or more processors; and a memory storing computer readable instructions that, when executed, cause the processor to perform operations of the method as previously described.
The embodiment of the application adopts at least one technical scheme which can achieve the following beneficial effects: when a search result is determined from each recalled content queue, the recalled content queue with the least number of the recalled content is taken as a reference queue, and a number to be searched is determined according to the reference queue. Thereafter, for each non-reference queue, a search range for the non-reference queue is determined. And then, according to the sequence of the non-reference queues from short to long, sequentially aiming at the non-reference queues, searching a number consistent with the number to be searched in the searching range of each non-reference queue. And when the number consistent with the number to be searched is searched in each non-reference queue, determining the recall content corresponding to the number to be searched as a search result. By the method, when the number to be searched is searched each time, the number to be searched is searched in the searching range corresponding to each non-reference queue, so that the number of the numbers to be searched is reduced, and the efficiency is improved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this application, illustrate embodiment(s) of the application and together with the description serve to explain the application and not to limit the application. In the drawings:
FIG. 1 is a schematic illustration of recall content queues determined from recall content;
FIG. 2 is a schematic illustration of the creation of a new recalled content queue and the determination of search results based on the recalled content queues of FIG. 1;
FIG. 3 is a schematic flow chart of determining search results according to some embodiments of the present application;
FIG. 4 is a schematic diagram of a determine recall content queue provided herein;
FIG. 5 is a schematic diagram of determining a number to be searched according to the present application;
FIG. 6 is a schematic diagram of determining a search start position and a search end position provided herein;
FIG. 7 is a schematic illustration of a search sequence provided herein;
FIG. 8 is a schematic illustration of determining recall content as search results provided herein;
FIG. 9 is a schematic flow chart illustrating some numbers to be searched for after being re-determined according to the present application;
FIG. 10 is a queue intent for a stop search presentation provided herein;
FIG. 11 is a diagram of a queue for re-scoping a search as provided herein;
fig. 12 to fig. 13 are schematic diagrams of queues for re-determining numbers to be searched provided by the present application;
fig. 14 is a schematic diagram of a network device for determining a search result according to an embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be described in detail and completely with reference to the following specific embodiments of the present application and the accompanying drawings. It should be apparent that the described embodiments are only some 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 technical solutions provided by the embodiments of the present application are described in detail below with reference to the accompanying drawings.
FIG. 3 is a schematic flow chart diagram for determining search results from recall content queues according to some embodiments of the present application that may include the steps of:
s100: determining a plurality of recalled content queues, wherein each recalled content queue is composed of at least one number of recalled content, and the number corresponding to the recalled content is unique in the plurality of recalled content queues.
In some embodiments of the present application, the process of determining search results of embodiments of the present application may be performed by a network device of a service provider that provides search services. The network device may be a single server or a system (e.g., a distributed server) composed of multiple servers, which is not limited in this application.
The method provided by the application is used for solving the problem that the method for determining the search result from each recalled content queue in the existing search process is low in efficiency, so that the process for determining the search result provided by the application can be a partial process from receiving the search request to determining the search result. Specifically, the process for determining the search result provided by the present application determines the flow after each recalled content for the current sequence search step. Therefore, the network device can determine the recall content queues according to the recall contents so as to continue the operation of the subsequent step.
Each recalled content queue is created according to the keywords contained in the recalled content, that is, each recalled content containing the same keyword is used as one recalled content queue according to the keywords contained in the recalled content. Specifically, each recalled content queue may be composed of at least one number of recalled content, since each recalled content is returned in the form of a number during the document recall process. The numbers in each recall content queue are arranged in the order of the numbers, specifically, the numbers are arranged in the order from small to large. And each number also has a position value corresponding to the recalled content queue according to the position of each number in the recalled content queue. As shown in fig. 4.
FIG. 4 provides an illustration of a determine recall content queue according to the present application. The recall content queues 1 to 3 are queues composed of numbers of recall contents including keywords a to c, respectively. Wherein each recall content queue is composed of rectangles with different numbers marked in the middle. Each rectangle represents a number, and the numbers indicated in the middle of the rectangle are the numerical values of the number. And the number marked at the lower right corner of each rectangle is the numerical value of the number position of the number in the recall content queue. It can be seen that the numbers in the recalled content queues are arranged in descending order, and the same number may appear in different recalled content queues because the same recalled content may contain a plurality of different keywords. Also, since such a number appearing in the plurality of recalled content queues is not exactly the same at the number position in different recalled content queues, the numerical value of the number position in different recalled content queues is also not exactly the same.
It should be noted that the number of each recalled content is assigned by the network device executing the preamble search step in the current search service, and the number corresponding to each recalled content is unique in the determined plurality of recalled content queues. The present search service specifically refers to a service for determining a search result, which is determined to be executed according to a received search request. That is, the same recalled content may be given a different number in different search services, but the number is only used within the search service given the number.
In the present application, each recalled content is given a natural number not equal to zero, that is, a positive integer having a value range of [1, ∞ ]. And the position value of the recall content queue is a natural number and is sequentially increased from the initial position of the recall content queue. The values of the starting positions of the recalled content queues are consistent, that is, the value of the minimum numbered position of each recalled content queue is the same, and may be specifically set according to needs, for example, set to 0 in fig. 4, so it can be seen that the position values of the recalled content queues all start from 0 and increase sequentially, for example, 1, 2, 3 … …, and so on.
Further, the form of information on the recall content is not limited in the present application, and the recall content may be, for example, an article, a blog, a novel, a commodity, or the like. Of course, since the recalled content includes the keyword, there is a character including the keyword in the recalled content.
S102: and taking the recalled content queue with the minimum number of numbers as a reference queue, taking other recalled content queues as non-reference queues, and taking the number with the minimum value in the reference queue as a number to be searched.
In some embodiments of the present application, after determining each recalled content queue, the network device may use the recalled content queue with the smallest number as a reference queue. Since the specified search result must include all keywords, the recalled content corresponding to the number in the reference queue is not included, and the keyword corresponding to the reference queue is not included, and therefore the search result cannot be obtained. The network device may then determine search results based on the numbers in the reference queue.
Specifically, the network device may sort the recalled content queues in order of the number of numbers included in each recalled content queue from small to large, and determine that the recalled content queue including the smallest number is the reference queue, and the other recalled content queues are the non-reference queues.
Further, since the numbers in the recalled content queues are arranged in descending order, the network device may use the number with the smallest value in the reference queue as the number to be searched when determining the number to be searched for the first time, so as to determine the search result based on the numbers in the reference queue for convenience. And when the number to be searched is determined again in the follow-up process, the number to be searched is determined according to the number to be searched determined in the previous time. For convenience of description, the following description is continued by taking the example of determining the number to be searched for the first time.
For example, in fig. 5, the recall content queue 1 can be used as a reference queue, the recall content queues 2-3 can be non-reference queues, and the number 5 can be a number to be searched.
S104: and determining the searching initial position of each non-reference queue, and determining the searching end position of each non-reference queue according to the searching initial position of each non-reference queue, the number to be searched and a preset offset rule.
In some embodiments of the present application, after determining the number to be searched, the network device may determine, for each non-reference queue, a search starting position of the non-reference queue first, and then determine, according to the determined search starting position of the non-reference queue, the number to be searched, and a preset offset rule, a search ending position of the non-reference queue, so that a subsequent step searches in a search range determined by each non-reference queue from the search starting position to the search ending position, and reduces the number of searches.
Specifically, since step S104 is performed for each non-reference queue, for convenience of description, a single non-reference queue is taken as an example.
When the number to be searched determined in step S102 is the number to be searched determined from the reference queue for the first time, it is determined that the number position with the smallest value in the non-reference queue is the search starting position of the non-reference queue, for example, in non-reference queues 2 and 3 shown in fig. 5, the network device may use the position with the number position of 0 in the non-reference queue as the search starting position of the non-reference queue.
In addition, since there may be a case where the smallest number in the non-reference queue is greater than the number to be searched, and in this case, it may be determined that the recalled content corresponding to the number to be searched does not include all the keywords, the search may be directly stopped, and the number to be searched may be re-determined, as shown in step S110.
Further, when the network device determines the search starting position of each non-reference queue and the number of the search starting position of each non-reference queue is not greater than the number to be searched, the network device may continue to determine the search ending position of each non-reference queue.
In particular, a non-reference queue is still used as an exampleExplaining, the network device may be configured to obtain the search starting position number of the non-reference queue, the number to be searched, a preset offset rule, and a formula Locstar(itemsearch-itemstar) +1 determines the search end position of the non-reference queue.
Wherein, Locstar(itemsearch-itemstar) +1 is a predetermined offset rule, LocstarItem for the search starting position of the non-reference queuestarFor the number of search starting positions in the non-reference queue, itemsearchAnd numbering the numbers to be searched. For example, assuming that the number to be searched is 10, the number of the starting position of the non-reference queue is 2, and the starting position of the non-reference queue is 0, it may be determined that the search ending position of the non-reference queue is 9.
Continuing with the example shown in FIG. 5, the search start position and the search end position of the remaining two non-reference queues may be determined separately, as shown in FIG. 6.
S106: the search order for each non-reference queue is determined.
S108: and searching the number consistent with the number to be searched in the searching range corresponding to the searching starting position and the searching ending position of each non-reference queue in sequence according to the determined searching sequence.
In some embodiments of the present application, when the network device determines the search starting position and the search ending position of each non-reference queue, the search range of each non-reference queue may be determined, and a number consistent with the number to be searched is searched in the search range of each non-reference queue.
However, since the number to be searched may fail to hit in a certain non-reference queue, in order to reduce the number of search numbers required in such a case, in some embodiments of the present application, the search order for each non-reference queue is determined in an order in which the number of numbers included in each non-reference queue is from small to large, and further, the search is sequentially performed for each non-reference queue in the determined search order. Of course, the present application does not limit what manner is specifically adopted to determine the search order, and the search order may be determined according to the size of the median value of the numbers of the non-reference queues.
Specifically, for each non-reference queue, the number item of the starting position of the search in the non-reference queuestarIn the case of (2), since the numbers in the non-reference queue are all sequentially increased, the number item to be searched is associated with the number item to be searchedsearchThe maximum number position where consistent numbering may exist is the formula Locstar(itemsearch-itemstar) +1 determined search end position. Therefore, in the non-reference queue, a number that coincides with the number to be searched may exist only within a search range between the search start position and the search end position of the non-reference queue. Then, for each non-reference queue, the network device may search for a number that coincides with the number to be searched within a search range of the non-reference queue.
As shown in fig. 7, the arrows in fig. 7 indicate that numbers matching the numbers to be searched are searched for in the search ranges of the non-reference queue 1 and the non-reference queue 2 in order of the respective non-reference queues from short to long. Wherein, the dark color area of each non-reference queue is a search range.
S110: and when the number consistent with the number to be searched is searched in each non-reference queue, taking the recalled content corresponding to the number to be searched as a search result.
In some embodiments of the present application, if the network device searches a number that is consistent with the number to be searched in each non-reference queue in sequence according to the sequence from short to long of each non-reference queue, it may be determined that the recalled content corresponding to the number to be searched is a search result, and the search process is ended.
As shown in fig. 8, where it can be seen that the number 5 exists in each non-reference queue, the recalled content corresponding to the number 5 can be determined as the search result, and the search process can be ended.
Determining a number to be searched by determining a reference queue based on the flow for determining a search result shown in fig. 3, determining a matching range of each non-reference queue based on the fact that the numbers of the recalled content queues are arranged from small to large, wherein the matching range is a range in which the number to be searched may appear in each non-reference queue, then sequentially performing search results in each non-reference queue according to the determined search sequence, and taking recalled content corresponding to the number to be searched as a search result when a number consistent with the number to be searched is searched in each non-reference queue. By the method, the searching range in each recalled content queue is limited every time, all numbers of each recalled content queue do not need to be searched, the searching intensity is reduced, and the efficiency is improved.
In addition, referring back to step S108 in fig. 3, since a case may occur where no number matching the number to be searched is searched in any one of the non-reference queues when searching for each non-reference queue in the search order, the network device may further perform steps S200 to S204, as shown in fig. 9.
S200: stopping searching the number to be searched in the next reference queue of the non-reference queue, and re-determining the number to be searched;
s202: re-determining the search range of each non-reference queue;
s204: and according to the determined search sequence, sequentially searching numbers consistent with the re-determined numbers to be searched in the re-determined search range of each non-reference queue until a search result or the number with the largest value in the reference queue is determined to be used as the number to be searched for and is searched.
In some embodiments of the present application, when a certain non-reference queue is searched, and a number that is consistent with the number to be searched is not searched within the search range of the non-reference queue, the network device may determine that all keywords are not included in the recall content corresponding to the number to be searched, and thus may stop the search for the number to be searched and re-determine the number to be searched.
As shown in fig. 10, assuming that the network device fails to search for a number that matches number 5 (i.e., a number to be searched) in non-reference queue 2, the network device may stop searching for number 5 in non-reference queue 3 and determine the number to be searched from the reference queue again. The dark color area in the non-reference queues 1 and 2 is a search area, and no number 5 exists in the search area of the non-reference queue 2.
Specifically, in some embodiments of the present application, after the network device stops searching for the number to be searched.
First, the network device may select a next number of the number to be searched from the reference queue, and determine the number to be searched again. That is to say, when the network device needs to re-determine the number to be searched, the network device may sequentially select the next number as the re-determined number to be searched according to the arrangement order of the numbers of the reference queue.
And secondly, re-determining the search range of each non-reference queue according to the re-determined number to be searched.
Specifically, the network device may determine whether the search starting position of each non-reference queue needs to be changed, because, in the sequential search process, the following 3 cases may occur in the non-reference queue:
1) a search was performed but missed.
2) A search is performed and hits are made.
3) No search was performed.
Therefore, the network device may adopt the following different operations corresponding to different situations:
and for each non-reference queue, when the number to be searched is not hit in the search of the non-reference queue, re-determining the number position next to the search starting position of the non-reference queue as the search starting position of the non-reference queue. And when the number to be searched is hit in the searching of the non-reference queue, re-determining the next number position of the number to be searched in the non-reference queue as the searching starting position of the non-reference queue. And when the number to be searched is not searched in the non-reference queue, keeping the search starting position unchanged.
And the network device may repeat the same process of step S104 again, and for each non-reference queue, if the non-reference queue re-determines the search starting position, re-determine the search ending position of the non-reference queue according to the re-determined number to be searched, the re-determined search starting position, and the preset offset rule. Or if the searching initial position of the non-reference queue remains unchanged, re-determining the searching end position of each non-reference queue according to the number to be searched for, the searching initial position which remains unchanged and the preset offset rule.
And for each non-reference queue, if the searching initial position of the non-reference queue is determined again, re-determining the searching range of the non-reference queue according to the re-determined searching initial position and the re-determined searching end position of the non-reference queue, and if the searching initial position of the non-reference queue is kept unchanged, re-determining the searching range of the non-reference queue according to the unchanged searching initial position and the re-determined searching end position of the non-reference queue.
Based on the example shown in fig. 10, the network device may determine the search start position of the non-reference queue 1 to be 7 again, and determine the search start position of the non-reference queue 2 to be still 3 again, and the search start position of the non-reference queue 3 is unchanged and still 0, as shown in fig. 11.
Then, the network device may repeat the operation of step S108, sequentially perform searches within the search range re-determined by searching each non-reference queue in the search order, and determine to perform steps S200 to S204 or perform step S110 according to different situations.
Finally, if the network device repeatedly executes steps S200 to S204 all the time, and when the number with the largest value in the reference queue is also used as the number to be searched again for searching, it is determined that there is no recall content including all the keywords, and it is determined that the search result is empty, and the search process is ended.
In addition, in some embodiments of the present application, when the number to be searched is determined again from the reference queue, the network device may also determine an intermediate number from each non-reference queue according to the number to be searched, determine a search start position and a search end position of the reference queue according to the intermediate number, and then determine the number to be searched again within a search range between the search start position and the search end position of the reference queue.
Specifically, when determining the intermediate number, the network device may first hit the non-reference queue of the number to be searched for each search, and determine the number of the next number position of the search number in the non-reference queue, as the intermediate number of the non-reference queue. Then, as shown in fig. 12, the number having the smallest numerical value is selected as the middle number from the numbers of the respective next-numbered positions. If it is found that each non-reference queue is a search hit queue, the numbers of the next number position can be determined to be 7 and 13, respectively, and then 7 can be determined to be a middle number.
Further, according to the intermediate number, the search start position and the search end position of the reference queue are determined. Specifically, the position of the number to be searched in the reference queue is used as the search starting position of the reference queue, and a formula Loc is adopted according to the determined middle number, the number to be searched and the search starting position of the reference queuesearch(itemmedi-itemsearch) +1 determining a search end position of the reference queue;
wherein itemmediIs a middle number, itemsearchNumber to be searched, LocsearchIs the search starting position of the reference queue.
Further, the number to be searched is newly determined within the search range between the search start position and the search end position of the reference queue. Specifically, the network device may determine, from the numbers having the numerical values not less than the intermediate number, the number having the smallest numerical value as the newly determined number to be searched in the search range corresponding to the search start position and the search end position of the reference queue.
As shown in fig. 13, it can be seen that the search start position and the search end position of the reference queue are determined to be 0 and 3, respectively, and the corresponding numbers are 5 and 14, in this interval, more than 7(7 is a middle number) and the smallest number (i.e., 9) is determined to be the newly determined number to be searched.
By the method for re-determining the number to be searched, the number to be searched can be reduced and the efficiency of determining the search result can be improved because the search is carried out in a certain area and the numerical value included in the search condition is not less than the middle number.
In addition, in some embodiments of the present application, after the network device determines that the recalled content corresponding to a certain number to be searched is used as the search result, if another number that has not been searched still exists in the reference queue (that is, the number with the largest value in the reference queue is not searched as the number to be searched), the network device may also re-determine the number to be searched, and repeat the steps after step S104 until each number in the reference queue is searched.
Furthermore, the methods for re-determining the numbers to be searched provided by the application comprise the steps of sequentially re-determining the numbers to be searched according to the arrangement sequence of the reference queue, and re-determining the numbers to be searched according to the intermediate numbers in a certain range of the reference queue. In the former case, each number of the reference queue is searched as a number to be searched, while the latter case is not necessarily so that the network device can determine the maximum number in the reference queue when determining whether there are other numbers in the reference queue that have not been searched, and whether to search as the number to be searched again, if so, the search is stopped, otherwise, the search is continued.
In addition, the +1 in each formula provided in the present application is because when a certain numerical value is searched in a numerical value range by executing in a computer language, the maximum value of the numerical value range is not set as a search target, and therefore errors in search results are avoided by the + 1. For example, assuming that the determined matching range is position values 0 to 4 in the non-reference queue 2, the network device only determines whether the numbers with the value positions 0, 1, 2, and 3 of the non-reference queue 2 are consistent with the number to be searched, but does not determine whether the number with the value position 4 of the non-reference queue 2 is consistent with the number to be searched.
It should be noted that all execution subjects of the steps of the method provided in the embodiments of the present specification may be the same apparatus, or different apparatuses may also be used as execution subjects of the method. For example, the execution subject of steps S100 and S102 may be device 1, and the execution subject of step S102 may be device 2; alternatively, the execution subject of step S100 may be device 1, and the execution subjects of step S102 and step S104 may be device 2; and so on. The foregoing description has been directed to specific embodiments of this disclosure. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
Based on the same idea, the embodiment of the application also provides corresponding equipment, a nonvolatile computer storage medium and a device.
Fig. 14 is a schematic structural diagram of a network device corresponding to fig. 3 for determining a search result according to an embodiment of the present application, where the network device includes:
one or more processors; and
a memory storing computer readable instructions that, when executed, cause the processor to perform the process of detecting a network connection shown in fig. 3.
The embodiments in the present application are described in a progressive manner, and the same and similar parts among the embodiments can be referred to each other, and each embodiment focuses on the differences from the other embodiments. In particular, for the device and media embodiments, the description is relatively simple as it is substantially similar to the method embodiments, and reference may be made to some descriptions of the method embodiments for relevant points.
The device and the medium provided by the embodiment of the application correspond to the method one to one, so the device and the medium also have the similar beneficial technical effects as the corresponding method, and the beneficial technical effects of the method are explained in detail above, so the beneficial technical effects of the device and the medium are not repeated herein.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In a typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include forms of volatile memory in a computer readable medium, Random Access Memory (RAM) and/or non-volatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of a computer-readable medium.
Computer-readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), Read Only Memory (ROM), Electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), Digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device. As defined herein, a computer readable medium does not include a transitory computer readable medium such as a modulated data signal and a carrier wave.
It should also be noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included in the scope of the claims of the present application.

Claims (16)

1. A method of determining search results, comprising:
determining a plurality of recalled content queues, wherein each recalled content queue consists of at least one number of recalled content, and the number corresponding to the recalled content is unique in the plurality of recalled content queues;
taking the recall content queue with the least number as a reference queue, taking other recall content queues as non-reference queues, and taking the number with the minimum value in the reference queue as a number to be searched;
determining the searching initial position of each non-reference queue, and determining the searching end position of each non-reference queue according to the searching initial position of each non-reference queue, the number to be searched and a preset offset rule;
determining a search sequence for each non-reference queue;
according to the determined search sequence, searching a number consistent with the number to be searched in the search range corresponding to the search starting position and the search ending position of each non-reference queue in sequence;
and when the number consistent with the number to be searched is searched in each non-reference queue, taking the recalled content corresponding to the number to be searched as a search result.
2. The method of claim 1, wherein the numbers in each recalled content queue are arranged in ascending order of numeric value of the numbers from small to large.
3. The method of claim 1, wherein determining the search starting position of the non-reference queue comprises:
when the number to be searched is determined from the reference queue for the first time, determining the number position with the minimum value in the non-reference queue as the searching starting position of the non-reference queue;
when the number to be searched is redetermined from the reference queue, if the number to be searched before redetermination cannot be hit in the search of the non-reference queue, the next number position of the search starting position of the non-reference queue is redetermined as the search starting position of the non-reference queue, if the number to be searched before redetermination is hit in the search of the non-reference queue, the next number position of the number to be searched before redetermination in the non-reference queue is redetermined as the search starting position of the non-reference queue, and if the number to be searched is not searched in the non-reference queue, the search starting position of the non-reference queue is kept unchanged.
4. The method of claim 2, wherein determining the search ending position of the non-reference queue according to the search starting position of the non-reference queue, the number to be searched, and a preset offset rule specifically comprises:
according to the formula Locstar(itemsearch-itemstar) +1 determines the search ending location of the non-reference queue, where Locstar(itemsearch-itemstar) +1 is a predetermined offset rule, LocstarItem for the search starting position of the non-reference queuestarFor the number of search starting positions in the non-reference queue, itemsearchAnd numbering the numbers to be searched.
5. The method of claim 1, wherein determining the search order for each non-reference queue comprises:
and determining the searching sequence of each non-reference queue according to the sequence of the number of the numbers contained in each non-reference queue from small to large.
6. The method of claim 3, wherein when a number to be searched is determined from the reference queue for the first time;
for each non-reference queue, before determining a search end position of the non-reference queue, the method further includes:
and determining the number of the search starting position of each non-reference queue, wherein the number is not greater than the number to be searched.
7. The method according to claim 6, wherein when the number of the search start position of any non-reference queue is greater than the number to be searched, the number next to the number to be searched in the reference queue is re-determined as the number to be searched.
8. The method of claim 1, wherein the method further comprises: when a non-reference queue is searched according to the determined search sequence and a number consistent with the number to be searched is not searched, stopping searching the number to be searched in the next non-reference queue of the non-reference queue and re-determining the number to be searched;
for each non-reference queue, if the number to be searched before re-determination is searched in the non-reference queue, re-determining the search starting position of the non-reference queue, and if the number to be searched before re-determination is not searched in the non-reference queue, keeping the search starting position unchanged;
for each non-reference queue, when the search starting position is determined again, determining the search ending position of the non-reference queue again according to the number to be searched for which is determined again, the search starting position which is determined again and the preset offset rule, and when the search starting position is kept unchanged, determining the search ending position of the non-reference queue again according to the number to be searched for which is determined again, the search starting position which is kept unchanged and the preset offset rule;
for each non-reference queue, when the search starting position is determined again, re-determining the search range according to the search ending position of the non-reference queue and the search starting position of the non-reference queue, and when the search starting position is kept unchanged, re-determining the search range according to the search ending position of the non-reference queue and the search starting position which is kept unchanged;
and according to the determined search sequence, sequentially searching numbers consistent with the re-determined numbers to be searched in the re-determined search range of each non-reference queue until a search result or the number with the largest value in the reference queue is determined to be used as the number to be searched for and is searched.
9. The method according to claim 7 or 8, wherein the re-determining the number to be searched specifically comprises:
re-determining the number next to the number to be searched in the reference queue as the number to be searched; alternatively, the first and second electrodes may be,
and determining an intermediate number from each non-reference queue according to the number to be searched, determining a search starting position and a search ending position of the reference queue according to the intermediate number, and then re-determining the number to be searched in a search range between the search starting position and the search ending position of the reference queue.
10. The method of claim 8, wherein re-determining the search starting position of the non-reference queue comprises:
when the number to be searched before re-determination is not hit in the searching of the non-reference queue, re-determining the number position next to the searching starting position of the non-reference queue as the searching starting position of the non-reference queue;
and when the number to be searched before the number to be searched is redetermined in the searching hit of the non-reference queue, redetermining the next number position of the number to be searched in the non-reference queue as the searching starting position of the non-reference queue.
11. The method of claim 9, wherein determining a middle number from each non-reference queue according to the number to be searched specifically comprises:
determining the number of the position of the next number of the search number in the non-reference queue aiming at the non-reference queue of the number to be searched hit by each search;
from the numbers of the respective next-numbered positions thus identified, the number having the smallest numerical value is selected as the intermediate number.
12. The method of claim 9, wherein determining the search start position and the search end position of the reference queue according to the intermediate number comprises:
taking the position of the number to be searched in the reference queue as the searching starting position of the reference queue;
adopting a formula Loc according to the determined middle number, the number to be searched and the search starting positionsearch(itemmedi-itemsearch) +1 determining a search end position of the reference queue;
wherein itemmediIs said intermediate number, itemsearchIs the number to be searched, LocsearchIs the search starting position of the reference queue.
13. The method of claim 9, wherein the re-determining the number to be searched within the search range between the search start position and the search end position of the reference queue comprises:
and determining the number with the smallest value which is not smaller than the middle number in the searching range corresponding to the searching starting position and the searching ending position of the reference queue as the newly determined number to be searched.
14. The method of claim 1, wherein after taking the recalled content corresponding to the number to be searched as a search result, the method further comprises:
determining the number with the largest value in the reference queue, wherein the number is not searched as a number to be searched;
re-determining the number to be searched;
re-determining the search range of each non-reference queue;
and according to the determined search sequence, sequentially searching numbers consistent with the numbers to be re-determined in the search range corresponding to the search starting position and the search ending position of each non-reference queue until the number with the largest value in the reference queue is re-used as the number to be searched for to perform searching.
15. A computer readable medium having computer readable instructions stored thereon which are executable by a processor to implement the method of any one of claims 1 to 14.
16. A network device for determining search results, wherein the network device comprises:
one or more processors; and
a memory storing computer readable instructions that, when executed, cause the processor to perform the operations of the method of any of claims 1 to 14.
CN201810188470.3A 2018-03-07 2018-03-07 Method, medium and equipment for determining search result Active CN108536740B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810188470.3A CN108536740B (en) 2018-03-07 2018-03-07 Method, medium and equipment for determining search result

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810188470.3A CN108536740B (en) 2018-03-07 2018-03-07 Method, medium and equipment for determining search result

Publications (2)

Publication Number Publication Date
CN108536740A CN108536740A (en) 2018-09-14
CN108536740B true CN108536740B (en) 2020-06-26

Family

ID=63486632

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810188470.3A Active CN108536740B (en) 2018-03-07 2018-03-07 Method, medium and equipment for determining search result

Country Status (1)

Country Link
CN (1) CN108536740B (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102591890A (en) * 2011-01-17 2012-07-18 腾讯科技(深圳)有限公司 Method for displaying search information and search information display device
CN103034663A (en) * 2011-09-29 2013-04-10 阿里巴巴集团控股有限公司 Information searching method and equipment
CN104572994A (en) * 2015-01-06 2015-04-29 华为技术有限公司 Method and device for searching data
CN104636366A (en) * 2013-11-11 2015-05-20 腾讯科技(深圳)有限公司 Method and device for aquiring search result queue
CN104715065A (en) * 2015-03-31 2015-06-17 北京奇虎科技有限公司 Long query word searching method and device
CN106021440A (en) * 2016-05-16 2016-10-12 中国建设银行股份有限公司 Search method and device
JP2016194865A (en) * 2015-04-01 2016-11-17 富士通株式会社 Search result prediction program, search result prediction method, and search result prediction apparatus

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9424294B2 (en) * 2013-12-02 2016-08-23 Qbase, LLC Method for facet searching and search suggestions

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102591890A (en) * 2011-01-17 2012-07-18 腾讯科技(深圳)有限公司 Method for displaying search information and search information display device
CN103034663A (en) * 2011-09-29 2013-04-10 阿里巴巴集团控股有限公司 Information searching method and equipment
CN104636366A (en) * 2013-11-11 2015-05-20 腾讯科技(深圳)有限公司 Method and device for aquiring search result queue
CN104572994A (en) * 2015-01-06 2015-04-29 华为技术有限公司 Method and device for searching data
CN104715065A (en) * 2015-03-31 2015-06-17 北京奇虎科技有限公司 Long query word searching method and device
JP2016194865A (en) * 2015-04-01 2016-11-17 富士通株式会社 Search result prediction program, search result prediction method, and search result prediction apparatus
CN106021440A (en) * 2016-05-16 2016-10-12 中国建设银行股份有限公司 Search method and device

Also Published As

Publication number Publication date
CN108536740A (en) 2018-09-14

Similar Documents

Publication Publication Date Title
CN107066519B (en) Task detection method and device
CN106897342B (en) Data verification method and equipment
WO2017128952A1 (en) Stack protection method and device
EP3640813A1 (en) Random walk method, apparatus and device, and cluster-based random walk method, apparatus and device
CN112328732A (en) Sensitive word detection method and device and sensitive word tree construction method and device
CN107451204B (en) Data query method, device and equipment
CN107203418B (en) Method and device for selecting resources according to system configuration
CN110895544B (en) Interface data processing method, device, system and storage medium
CN108536740B (en) Method, medium and equipment for determining search result
CN107301097B (en) Method and device for storing calling java object and reference address information of java object
CN111597407A (en) Keyword matching method, device, equipment and storage medium based on TCAM
CN110083602B (en) Method and device for data storage and data processing based on hive table
US10262056B2 (en) Method and system for performing search queries using and building a block-level index
CN111324373B (en) Method and device for sub-coding warehouse on multiple engineering files and computing equipment
CN107562533B (en) Data loading processing method and device
US9348583B2 (en) Automatic untangling cyclic dependencies in software systems
CN110019295B (en) Database retrieval method, device, system and storage medium
CN111125157A (en) Query data processing method and device, storage medium and processor
CN114691610A (en) Directory processing method and device, storage medium and processor
CN110750271B (en) Service aggregation, method and device for executing aggregated service and electronic equipment
CN110968754A (en) Detection method and device for crawler page turning strategy
CN113590805A (en) Method and device for searching textile commodity names based on knowledge graph
CN110019544B (en) Data query method and system
CN112100247B (en) Method and system for querying data by using ElasticSearch
CN111695056A (en) Page processing method, page return processing method, device and equipment

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
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20211215

Address after: 200240 building 41, 398 Heqing Road, Minhang District, Shanghai

Patentee after: Shanghai Shangxiang Network Technology Co.,Ltd.

Address before: 200120 2, building 979, Yun Han Road, mud town, Pudong New Area, Shanghai

Patentee before: SHANGHAI LIANSHANG NETWORK TECHNOLOGY Co.,Ltd.

TR01 Transfer of patent right