CN108536740A - A kind of method, medium and the equipment of determining search result - Google Patents

A kind of method, medium and the equipment of determining search result Download PDF

Info

Publication number
CN108536740A
CN108536740A CN201810188470.3A CN201810188470A CN108536740A CN 108536740 A CN108536740 A CN 108536740A CN 201810188470 A CN201810188470 A CN 201810188470A CN 108536740 A CN108536740 A CN 108536740A
Authority
CN
China
Prior art keywords
search
queue
searched
referenced
initial position
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
CN201810188470.3A
Other languages
Chinese (zh)
Other versions
CN108536740B (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

Abstract

This application discloses a kind of for determining method, medium and the equipment of search result, first by number minimum number recall content queue on the basis of queue, and therefrom determine number to be searched.Later, the search range of each non-referenced queue is determined.Then, it is determined that the search order of each non-referenced queue, and according to the search order successively search number consistent with the number to be searched in the search range of each non-referenced queue.When having searched the number consistent with the number to be searched in each non-referenced queue, determine that the corresponding content of recalling of the number to be searched is search result.

Description

A kind of method, medium and the equipment of determining search result
Technical field
This application involves field of computer technology more particularly to a kind of method, medium and the equipment of determining search result.
Background technology
Currently, the open source projects for being commonly used in search have, Solr, ElasticSearch etc..Usual enterprise can be direct Carry out searching service using above-mentioned open source projects.And this kind of search project increased income, it is main using based on full-text search engine (Lucene) way of search determines search result according to the keyword of input.
Specifically, when being scanned for based on full-text search engine, first, at least one pass can be determined according to searching request Keyword.Secondly it from each content to be selected, determines the content comprising any keyword and recalls.Later according to comprising keyword not Together, several queues (for convenience of description, referred to as recalling content queue) formed by recalling content are determined, wherein due to one A content of recalling may include multiple and different keywords, thus it is same recall content and possibly be present at multiple recall content queue In.Then, it according to the length sequence for respectively recalling content queue, selects shortest two to recall content queue and carries out and calculate, root The content creating of recalling that content queue all includes is recalled according to the two and newly recalls content queue, is newly recalled by repeating above-mentioned establishment The process of content queue, final determine recalls content comprising the several of all keywords, as search result.
The schematic diagram for respectively recalling content queue of content determination is recalled according to Fig. 1, wherein each recall in content include Not exactly the same keyword (e.g., a, b, c), also, the different contents recalled can assign corresponding this when recalling and search for Unique number.Recalling content queue is determined according to keyword, for example, the content of respectively recalling recalled in content queue 1 is wrapped A containing keyword, etc..Also, the length for recalling content queue 1~3 is also inconsistent.
Fig. 2 be based on it is shown in FIG. 1 respectively recall content queue and create newly recall content queue and determine search result Schematic diagram.It recalls content queue 1 and recalls content queue 2 and recall content queue for shortest two, compare the two one by one and call together It returns in content queue and recalls whether content is consistent, using consistent content of recalling as newly recalling in content queue (e.g., queue 4) Content is recalled, is then repeated the above process again to recalling content queue 4 with content queue 3 is recalled, determines that recalling content queue 5 is Search result, it includes keyword a~c to recall each of content queue 5 and recall content.
As it can be seen that the searching method that the prior art uses, determines that the process of search result is complex, when recalling content queue When longer (that is, recall include in content queue to recall content quantity more), need largely compare work, efficiency compared with It is low.Therefore the application provides a kind of method of new determination search result, to solve the problems, such as that existing searching method efficiency is low.
Invention content
Some embodiments of the present application provide method, medium and the equipment for determining search result.
Some embodiments of the present application use following technical proposals:A kind of method of determining search result, which is characterized in that Including:It determines and multiple recalls content queue, wherein it is each to recall content queue and be made of at least one number for recalling content, Recall the corresponding number of content it is the multiple recall it is unique in content queue;Content team will be recalled comprising number minimum number Row are used as reference queue, other recall content queue as non-referenced queue, and by the volume of numerical value minimum in the reference queue Number, as number to be searched;For each non-referenced queue, the search initial position of the non-referenced queue is determined, and according to this The search initial position of non-referenced queue, the number to be searched and default bias rule, determine searching for the non-referenced queue Hitch beam position;Determine the search order to each non-referenced queue;According to the search order determined, successively in each non-referenced team In the search initial position and the corresponding search range of search end position of row, the search volume consistent with the number to be searched Number;When having searched the number consistent with the number to be searched in each non-referenced queue, by the number to be searched Corresponding content of recalling is as search result.
A kind of computer-readable medium, is stored thereon with computer-readable instruction, and the computer-readable instruction can be located Device is managed to execute to realize method above-mentioned.
It is a kind of for determining the network equipment of search result, wherein the network equipment includes:One or more processing Device;And it is stored with the memory of computer-readable instruction, the computer-readable instruction makes the processor when executed Execute the operation such as preceding method.
Above-mentioned at least one technical solution that the embodiment of the present application uses can reach following advantageous effect:From respectively recalling In content queue determine search result when, first by comprising the number minimum number for recalling content recall content queue on the basis of team Row, and number to be searched is determined according to the reference queue.Later, for each non-referenced queue, the non-referenced queue is determined Search range.Then, according to each non-referenced queue from long sequence is short to, it is directed to each non-referenced queue successively, each non-referenced The search number consistent with the number to be searched in the search range of queue.It is waited for this when having been searched in each non-referenced queue When consistent number is numbered in search, determine that the corresponding content of recalling of the number to be searched is search result.By the above method, often It is secondary when being scanned for number to be searched, all it is to be carried out in the corresponding search range of each non-referenced queue, reducing needs The quantity of the number to be searched for, improves efficiency.
Description of the drawings
Attached drawing described herein is used for providing further understanding of the present application, constitutes part of this application, this Shen Illustrative embodiments and their description please do not constitute the improper restriction to the application for explaining the application.In the accompanying drawings:
The schematic diagram for respectively recalling content queue of content determination is recalled according to Fig. 1;
Fig. 2 be based on it is shown in FIG. 1 respectively recall content queue and create newly recall content queue and determine search result Schematic diagram;
Fig. 3 is the flow diagram for the determination search result that the application some embodiments provide;
Fig. 4 is the schematic diagram that content queue is recalled in determination provided by the present application;
Fig. 5 is the schematic diagram of determination provided by the present application number to be searched;
Fig. 6 is the determining schematic diagram searched for initial position and search for end position provided by the present application;
Fig. 7 is the schematic diagram of search order provided by the present application;
Fig. 8 is the schematic diagram that determination provided by the present application recalls that content is search result;
Fig. 9 is the flow diagram more provided by the present application redefined after number to be searched;
Figure 10 is that the queue provided by the present application that show that stops search is intended to;
Figure 11 is the queue schematic diagram provided by the present application for redefining search range;
Figure 12 to Figure 13 is the queue schematic diagram provided by the present application for redefining number to be searched;
Figure 14 is a kind of schematic diagram for determining the network equipment of search result provided by the embodiments of the present application.
Specific implementation mode
To keep the purpose, technical scheme and advantage of the application clearer, below in conjunction with the application specific embodiment and Technical scheme is clearly and completely described in corresponding attached drawing.Obviously, described embodiment is only the application one Section Example, instead of all the embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not doing Go out the every other embodiment obtained under the premise of creative work, shall fall in the protection scope of this application.
Below in conjunction with attached drawing, the technical solution that each embodiment of the application provides is described in detail.
It is shown in Fig. 3 to be used for from the stream for respectively recalling determining search result in content queue according to some embodiments of the application Journey schematic diagram may include following steps:
S100:It determines and multiple recalls content queue, wherein each recall content queue by least one volume for recalling content Number composition, recall the corresponding number of content it is the multiple recall it is unique in content queue.
In the application some embodiments, can the application be executed by the network equipment of the service supplier of offer search service The process of the determination search result of embodiment.Wherein, which can be an individual server or can also be System (e.g., the distributed server) the application being made of multiple servers does not limit this.
Due to method provided by the present application, search knot is determined from respectively recalling content queue in existing search process for solving The less efficient problem of the method for fruit, therefore the process of determining search result provided by the present application can be to ask from receiving search Seek the part flow determined in search result.Specifically, the process of determining search result provided by the present application, is searched to work as preamble Rope step determines the flow respectively recalled after content.Therefore, the network equipment can first according to respectively recall content determination respectively recall in Hold queue, to continue the operation of subsequent step.
Wherein, it is according to recalling what the keyword for including created, that is, according to recalling in content respectively to recall content queue Content of respectively recalling comprising same keyword is recalled content queue by the keyword that content includes as one.Specifically, due to Content is respectively recalled during document is recalled, is to be returned in the form of number, therefore respectively recalling content queue can be by least one Recall the number composition of content.Also, each recall in content queue respectively number put in order, specifically according to number number Value from small to large tactic.And the position according to each number in recalling content queue, each number also have correspondence to recall The position numerical value of content queue.As shown in Figure 4.
Fig. 4 provides for the application determines the schematic diagram for recalling content queue.It is respectively comprising pass to recall content queue 1~3 The queue of the number composition for recalling content of keyword a~c.Wherein, the square that content queue is indicated different digital by centre is respectively recalled Shape forms.Each rectangle indicates that a number, the number indicated among rectangle are the numerical value of number.And each rectangle lower right corner mark Number be numerical value of the number in the numbered positions in recalling content queue.As it can be seen that respectively recalling the number in content queue All it is tactic according to from small to large, also, since the same content of recalling may include multiple and different keyword, Therefore the same number possibly is present at different recall in content queue.Also, since this appear in multiple recalls content Number in queue, the numbered positions in difference recalls content queue are not exactly the same, therefore the number is in difference is recalled The numerical value for holding the numbered positions in queue is also not exactly the same.
It should be noted that the number for respectively recalling content is in this searching service, by execution preamble search step What the network equipment assigned, and it is each recall the corresponding number of content it is determining it is multiple recall it is unique in content queue.Wherein, This searching service specifically refers to, according to searching request is received, determine the business of the determination search result executed.That is, In different searching services, the same content of recalling may be endowed different numbers, but the number is applied only to assign It gives in the searching service of the number and using.
In addition, in this application, it is the natural number being not zero that the number of content is respectively recalled in imparting, i.e., value range be [1, ∞] positive integer.Also, recall content queue position numerical value be natural number, and from recall content queue initial position according to Sequence successively increases.And the numerical value for respectively recalling content queue initial position is consistent, that is, respectively recall the volume of content queue minimum The numerical value of number position is identical, can specifically be arranged as required to, for example, be set as 0 in Fig. 4, therefore visible respectively recalls content team The position numerical value of row is successively increased since 0, e.g., 1,2,3 ... etc. and so on.
Further, but the information for recalling what specific form of content is not limited in this application, for example, this is recalled Content can be an article, blog, novel, a commodity etc..Certainly, include keyword due to recalling in content, This, which is recalled, has the character comprising keyword in content.
S102:Content queue is recalled as reference queue using comprising number minimum number, other recall content queue work For non-referenced queue, and by the number of numerical value minimum in the reference queue, as number to be searched.
In the application some embodiments, which can will include to compile after determining respectively to recall content queue Number minimum number recalls content queue as reference queue.Since determining search result must include all keywords, because This number not in reference queue is corresponding to recall content, does not include the corresponding keyword of reference queue, so can't be Search result.Then, which can determine search result based on each number in the reference queue.
Specifically, the network equipment can be according to the sequence of number quantity that content queue includes from less to more be respectively recalled, to each It recalls content queue to be ranked up, determines the queue on the basis of recalling content queue for including number minimum number, and other are recalled Content queue is non-referenced queue.
Further, due to the number respectively recalled in content queue be all it is tactic according to from small to large, then Search result is determined based on each number in the reference queue for convenience, therefore when determining number to be searched for the first time, network Equipment can be by the number of numerical value minimum in reference queue, as number to be searched.And when subsequently redefining number to be searched, According to the preceding number to be searched once determined, it is determined.For convenience of description, the application is to determine number to be searched for the first time Example continues follow-up explanation.
For example, can will recall content queue 1 in Fig. 5 is used as reference queue, it is non-referenced queue to recall content queue 2~3, And number 5 is number to be searched.
S104:For each non-referenced queue, the search initial position of the non-referenced queue is determined, and non-referenced according to this The search initial position of queue, the number to be searched and default bias rule, determine that the search of the non-referenced queue terminates Position.
In some embodiments of the present application, the network equipment can be directed to each non-after determining number to be searched Reference queue first determines the search initial position of the non-referenced queue, later in searching according to the non-referenced queue determined Rope initial position, number and the default bias rule to be searched, determine the search end position of the non-referenced queue, with after an action of the bowels Continuous step is scanned in each non-referenced queue by searching in the search range that initial position is determined to search end position, is reduced Number of searches.
Specifically, this step S104 is to be executed for each non-referenced queue, therefore for the convenience of description, with a non-base It is illustrated for quasi- queue.
When the number to be searched that step S102 is determined, for the number to be searched determined from reference queue for the first time, it is determined that The numbered positions of numerical value minimum are the search initial position of the non-referenced queue in the non-referenced queue, for example, shown in Fig. 5 In non-referenced queue 2 and 3, the network equipment can be using the position that numbered positions in the non-referenced queue are 0 as the non-referenced queue Search initial position.
In addition, since the case where there may be number minimum in non-referenced queue is both greater than the number to be searched occurs, And can determine that the number to be searched is corresponding in this case and recall content not comprising all keywords, therefore can be direct It stops search, and redefines number to be searched, specifically as shown in step S110.
Further, when the network equipment determines the search initial position of each non-referenced queue, and each non-referenced queue Search initial position number, when no more than the number to be searched, the network equipment can continue to determine each non-referenced queue Search for end position.
Specifically, still being illustrated by taking a non-referenced queue as an example, which can be according to the non-referenced queue Search for number, number and the default bias rule to be searched of initial position, formula Locstar(itemsearch-itemstar)+1 Determine the search end position of the non-referenced queue.
Wherein, Locstar(itemsearch-itemstar)+1, Loc regular for preset offsetstarFor the non-referenced queue Search for initial position, itemstarFor in the number of the search initial position of the non-referenced queue, itemsearchIt is described to be searched Number.For example, it is assumed that number to be searched is 10, the number of the initial position of the non-referenced queue is 2, which rises Beginning position is 0, then can determine that the search end position of the non-referenced queue is 9.
Continue to continue to use example shown in fig. 5, can determine respectively remaining two non-referenced queues search initial position and End position is searched for, as shown in Figure 6.
S106:Determine the search order to each non-referenced queue.
S108:According to the search order determined, successively in the search initial position of each non-referenced queue and search knot In the corresponding search range of beam position, the search number consistent with the number to be searched.
In some embodiments of the present application, when the network equipment is determined the search initial position of each non-referenced queue and searched When hitch beam position, the search range of each non-referenced queue can be determined, and searched in the search range of each non-referenced queue The consistent number with the number to be searched.
But since the number to be searched is likely to appear in some non-referenced queue the case where failing hit, so In order to reduce the quantity for needing search to number in this case, in the application some embodiments, according to each non-referenced queue Include the sequence of number quantity from less to more, determines the search order to each non-referenced queue, and then according to the search determined Sequentially, it is scanned for successively for each non-referenced queue.Certainly, the application does not limit specifically determines that search is suitable using which kind of mode Sequence can also be to determine search order etc. according to the size of the number median of each non-referenced queue.
Specifically, for each non-referenced queue, the number in the non-referenced queue search initial position is itemstar's In the case of, since the number in non-referenced queue all successively increases, with the number item to be searchedsearchConsistent It is formula Loc to number maximum numbered positions that may be presentstar(itemsearch-itemstar)+1 search stop bits determined It sets.Therefore in the non-referenced queue, consistent number is only possible to be present in searching for the non-referenced queue with the number to be searched In search range between rope initial position and search end position.Then, for each non-referenced queue, the network equipment can be The search number consistent with the number to be searched in the search range of the non-referenced queue.
As shown in fig. 7, the arrow in Fig. 7 is indicated according to each non-referenced queue from long sequence is short to, successively non-referenced In the search range of queue 1 and non-referenced queue 2, the search number consistent with number to be searched.Wherein, each non-referenced queue Darker regions are search range.
S110:It, will be described when having searched the number consistent with the number to be searched in each non-referenced queue It is to be searched to number corresponding content of recalling as search result.
In the application some embodiments, if the network equipment according to each non-referenced queue from long sequence is short to, exist successively In each non-referenced queue, the number consistent with the number to be searched has all been searched, then can determine that the number to be searched is corresponding It is search result to recall content, and terminates search process.
As shown in figure 8, wherein visible number 5 exists in each non-referenced queue accordingly, it can be determined that number 5 is corresponding calls together It is search result to return content, and can terminate search process.
Based on the flow of determining search result shown in Fig. 3, by determining reference queue, to determine number to be searched, and All it is to determine the matching range of each non-referenced queue according to tactic from small to large based on the number for recalling content queue, The matching range is the range to be searched numbered and be likely to occur in each non-referenced queue, then suitable according to the search determined Sequence scans for successively in each non-referenced queue as a result, and ought have been searched and number to be searched in each non-referenced queue When consistent number, using the corresponding content of recalling of number to be searched as search result.By method provided by the present application, every time The range searched in respectively recalling content queue is all limited, without being searched to all numbers for respectively recalling content queue Rope reduces searching intensity, improves efficiency.
In addition, going back in the step S108 of Fig. 3, due to working as according to search order, each non-referenced queue is scanned for When, it there is also the case where not searching the number consistent with the number to be searched in some non-referenced queue and occur, Therefore the network equipment can also carry out step S200~step S204, e.g., shown in Fig. 9.
S200:It stops in next reference queue of the non-referenced queue and searches for the number to be searched, and again really Fixed number to be searched;
S202:Redefine the search range of each non-referenced queue;
S204:According to the search order determined, successively in the search range that each non-referenced queue redefines, search The number consistent with the number to be searched redefined, until determining numerical value in search result or the reference queue Until maximum number carried out search as number to be searched.
In some embodiments of the present application, when searching some non-referenced queue, fail in the non-referenced queue Search range in, when the case where searching number consistent with the number to be searched occurs, the network equipment can determine that this is waited for Corresponding recall in content of search number does not include all keywords, therefore can stop the search to the number to be searched, and Redefine number to be searched.
As shown in Figure 10, it is assumed that the network equipment fails to search with number 5 (that is, volume to be searched in non-referenced queue 2 Number) consistent number, then the network equipment, which can stop in non-referenced queue 3, continues search for the number 5, and again from reference queue Middle determination number to be searched.Wherein, darker regions are region of search, the field of search of non-referenced queue 2 in non-referenced queue 1 and 2 Without number 5 in domain.
Specifically, in the application some embodiments, after the network equipment stops the search to the number to be searched.
First, which can select next number of the number to be searched, is redefined as from reference queue Number to be searched.That is, the network equipment when needing to redefine number to be searched, can respectively be numbered according to reference queue Put in order, next number is selected successively, as the number to be searched redefined.
Secondly, according to the number to be searched redefined, the search range of each non-referenced queue is redefined.
Specifically, the network equipment can first determine whether the search initial position of each non-referenced queue needs to change, due to, During searching in order, situation during non-referenced queue is likely to occur following 3:
1) it is searched for, but miss.
2) it is searched for, and is hit.
3) it does not scan for.
Therefore, following different operation can be used in corresponding different situation, the network equipment:
It, will when the search of the non-referenced queue fails to hit the number to be searched for each non-referenced queue Next numbered positions of the search initial position of the non-referenced queue, are redefined as the search start bit of the non-referenced queue It sets.Described in the search hit in the non-referenced queue when number to be searched, then it is non-at this to redefine the number to be searched Next numbered positions in reference queue, for the search initial position of the non-referenced queue.When not in the non-referenced queue When carrying out search to the number to be searched, then keep search initial position constant.
And the network equipment can repeat the identical processes of step S104 again, for each non-referenced queue, if the non-base Quasi- queue has redefined search initial position, then according to the number to be searched redefined, the search start bit redefined It sets and default bias is regular, redefine the search end position of the non-referenced queue.If alternatively, the non-referenced queue is searched Rope initial position remains unchanged, then according to described in redefine it is to be searched number, keep unchanged search initial position and institute Default bias rule is stated, the search end position of each non-referenced queue is redefined.
For each non-referenced queue, if the non-referenced queue has redefined search initial position, according to redefining Search initial position and redefine the search end position of the non-referenced queue, redefine the search of the non-referenced queue Range, if the search initial position of the non-referenced queue remains unchanged, according to the search initial position remained unchanged and again The search end position for determining the non-referenced queue, redefines the search range of the non-referenced queue.
Based on example shown in Fig. 10, the search initial position that the network equipment can redefine the non-referenced queue 1 is 7, And it is still 3 that the search initial position for redefining the non-referenced queue 2, which is, the search initial position of non-referenced queue 3 is constant, still It is 0, as shown in figure 11.
Then, the network equipment repeats the operation of step S108, and each non-referenced queue is being searched for successively according to search order It is scanned in the search range redefined, and is determined according to different situations and execute step S200 to S204, or execute step Rapid S110.
Finally, if the network equipment repeats always step S200 to S204, and when the maximum volume of numerical value in reference queue When number being also re-used as number to be searched and carrying out search, determines and the content of recalling comprising all keywords is not present, and determine Search result is sky, terminates search routine.
In addition, in the application some embodiments, when redefining number to be searched from reference queue, the network equipment Also can, first according to number to be searched, intermediate number is determined from each non-referenced queue, secondly, is numbered according to centre, is determined and be somebody's turn to do The search initial position of reference queue and search end position, then, in the search initial position of the reference queue and It searches in the search range between end position, redefines number to be searched.
Specifically, the network equipment among determination when number, can first be directed to the non-of each search hit number to be searched Reference queue determines the number for next numbered positions that the search is numbered in the non-referenced queue, for the non-referenced queue Intermediate number.Again from the number for each next numbered positions determined, the number of numerical value minimum is selected, is compiled as centre Number, as shown in figure 12.Wherein, it is seen that each non-referenced queue is all the queue of search hit, then can determine next numbered positions Number be respectively 7 and 13, then can determine 7 as intermediate number.
Further, it is numbered according to the centre, determines search initial position and the search end position of the reference queue When.Specifically, by position of the number in reference queue to be searched, as the search initial position of the reference queue, according to The search initial position of the intermediate number, number to be searched and reference queue determined, using formula Locsearch (itemmedi-itemsearch)+1 search end position for determining the reference queue;
Wherein, itemmediIt is numbered for centre, itemsearchFor number to be searched, LocsearchOn the basis of queue search rise Beginning position.
Further, in the search range between the search initial position of reference queue and search end position, Redefine number to be searched.Specifically, the network equipment can search for initial position and search end position pair in reference queue It in the search range answered, is numbered from numerical value not less than each of intermediate number, determines the number of numerical value minimum, as redefining Number to be searched.
As shown in figure 13, wherein the visible search initial position for determining reference queue and search end position are respectively 0 and 3, corresponding number is 5 and 14, then in this section, determine be more than 7 (7 for intermediate number) and minimum number (that is, 9) it is the number to be searched redefined.
By the above-mentioned method for redefining number to be searched, due to being to be scanned in certain area, and search for Condition in numbered not less than intermediate comprising numerical value, therefore the quantity for the number to be searched determined can be reduced, improve and determine The efficiency of search result.
In addition, in the application some embodiments, in the network equipment determines some number to be searched is corresponding to recall Hold and be used as after search result, if there are still do not carried out other numbers of search (that is, numerical value in reference queue in reference queue Maximum number did not carried out search as number to be searched), then the network equipment can also redefine number to be searched, and repeat The step of after step S104, until respectively numbered in reference queue all carried out search until.
Further, a variety of methods for redefining number to be searched in being provided due to the application, including according to benchmark Putting in order for queue redefines number to be searched successively, and according to centre number in a certain range of reference queue, Redefine number to be searched.The former, each number of reference queue all can be used as number to be searched scan for, and the latter is then not Centainly, thus network equipment in determining reference queue whether there are still do not carried out search other numbers when, it can be determined that Maximum number in the reference queue, if be re-used as number to be searched and carried out search, if so, stopping search, if not Then continue search for.
In addition, it is necessary to which explanation ,+1 in each formula provided by the present application, are due to being held using computer language Row will not be using the maximum value of the numberical range as object search when searching for some numerical value in a numberical range, therefore leads to Crossing+1 avoids search result from malfunctioning.For example, it is assumed that in non-referenced queue 2, determining matching range is position numerical value 0~4, then The network equipment can only judge the value bit of non-referenced queue 2 be set to 0,1,2,3 number it is whether consistent with number to be searched, without Can judge the value bit of non-referenced queue 2 be set to 4 number it is whether consistent with number to be searched.
It should be noted that the executive agent of each step of this specification embodiment institute providing method may each be same and set It is standby, alternatively, this method is also by distinct device as executive agent.For example, the executive agent of step S100 and step S102 can be with Executive agent for equipment 1, step S102 can be equipment 2;Alternatively, the executive agent of step S100 can be equipment 1, step The executive agent of S102 and step S104 can be equipment 2;Etc..It is above-mentioned that this specification specific embodiment is described. Other embodiments are within the scope of the appended claims.In some cases, the action recorded in detail in the claims or step It suddenly can be according to being executed different from the sequence in embodiment and desired result still may be implemented.In addition, in the accompanying drawings The process of description, which not necessarily requires the particular order shown or consecutive order, could realize desired result.In certain embodiment party In formula, multitasking and parallel processing is also possible or it may be advantageous.
Based on same thinking, the embodiment of the present application also provides corresponding equipment and nonvolatile computer storage medias And device.
Figure 14 is a kind of knot for determining the network equipment of search result provided by the embodiments of the present application corresponding to Fig. 3 Structure schematic diagram, including:
One or more processors;And
It is stored with the memory of computer-readable instruction, the computer-readable instruction makes the processor when executed Execute the process of detection network connection shown in Fig. 3.
Each embodiment in the application is described in a progressive manner, identical similar part between each embodiment Just to refer each other, and each embodiment focuses on the differences from other embodiments.Especially for equipment and Jie For matter embodiment, since it is substantially similar to the method embodiment, so description is fairly simple, related place is referring to method reality Apply the part explanation of example.
Equipment provided by the embodiments of the present application and medium are one-to-one with method, and therefore, equipment and medium also have Advantageous effects as corresponding method class, due to having been carried out specifically to the advantageous effects of method above It is bright, therefore, the advantageous effects of equipment which is not described herein again and medium.
It should be understood by those skilled in the art that, the embodiment of the present invention can be provided as method, system or computer program Product.Therefore, complete hardware embodiment, complete software embodiment or reality combining software and hardware aspects can be used in the present invention Apply the form of example.Moreover, the present invention can be used in one or more wherein include computer usable program code computer The computer program production implemented in usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) The form of product.
The present invention be with reference to according to the method for the embodiment of the present invention, the flow of equipment (system) and computer program product Figure and/or block diagram describe.It should be understood that can be realized by computer program instructions every first-class in flowchart and/or the block diagram The combination of flow and/or box in journey and/or box and flowchart and/or the block diagram.These computer programs can be provided Instruct the processor of all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce A raw machine so that the instruction executed by computer or the processor of other programmable data processing devices is generated for real The device for the function of being specified in present one flow of flow chart or one box of multiple flows and/or block diagram or multiple boxes.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works so that instruction generation stored in the computer readable memory includes referring to Enable the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one box of block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device so that count Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, in computer or The instruction executed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one The step of function of being specified in a box or multiple boxes.
In a typical configuration, computing device includes one or more processors (CPU), input/output interface, net Network interface and memory.
Memory may include computer-readable medium in volatile memory, random access memory (RAM) and/or The forms such as Nonvolatile memory, such as read-only memory (ROM) or flash memory (flash RAM).Memory is computer-readable medium Example.
Computer-readable medium includes permanent and non-permanent, removable and non-removable media can be by any method Or technology realizes information storage.Information can be computer-readable instruction, data structure, the module of program or other data. The example of the storage medium of computer includes, but are not limited to phase transition internal memory (PRAM), static RAM (SRAM), moves State random access memory (DRAM), other kinds of random access memory (RAM), read-only memory (ROM), electric erasable Programmable read only memory (EEPROM), fast flash memory bank or other memory techniques, read-only disc read only memory (CD-ROM) (CD-ROM), Digital versatile disc (DVD) or other optical storages, magnetic tape cassette, tape magnetic disk storage or other magnetic storage apparatus Or any other non-transmission medium, it can be used for storage and can be accessed by a computing device information.As defined in this article, it calculates Machine readable medium does not include temporary computer readable media (transitory media), such as data-signal and carrier wave of modulation.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability Including so that process, method, commodity or equipment including a series of elements include not only those elements, but also wrap Include other elements that are not explicitly listed, or further include for this process, method, commodity or equipment intrinsic want Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that wanted including described There is also other identical elements in the process of element, method, commodity or equipment.
Above is only an example of the present application, it is not intended to limit this application.For those skilled in the art For, the application can have various modifications and variations.It is all within spirit herein and principle made by any modification, equivalent Replace, improve etc., it should be included within the scope of claims hereof.

Claims (16)

1. a kind of method of determining search result, which is characterized in that including:
It determines and multiple recalls content queue, wherein it is each to recall content queue and be made of at least one number for recalling content, it calls together Return the corresponding number of content it is the multiple recall it is unique in content queue;
Content queue is recalled as reference queue using comprising number minimum number, other recall content queue as non-referenced team Row, and by the number of numerical value minimum in the reference queue, as number to be searched;
For each non-referenced queue, the search initial position of the non-referenced queue, and searching according to the non-referenced queue are determined Rope initial position, the number to be searched and default bias rule, determine the search end position of the non-referenced queue;
Determine the search order to each non-referenced queue;
According to the search order determined, corresponded to successively in the search initial position of each non-referenced queue and search end position Search range in, search and the consistent number of the number to be searched;
When having searched the number consistent with the number to be searched in each non-referenced queue, by the number to be searched Corresponding content of recalling is as search result.
2. the method as described in claim 1, which is characterized in that the number in content queue is respectively recalled, according to the numerical value of number Sequence ascending order arrangement from small to large.
3. the method as described in claim 1, which is characterized in that determine the search initial position of the non-referenced queue, it is specific to wrap It includes:
From the reference queue, when determining number to be searched, the number of numerical value minimum in the non-referenced queue is determined when for the first time Position is the search initial position of the non-referenced queue;
From the reference queue, when redefining number to be searched, if the search in the non-referenced queue fails to hit institute Number to be searched is stated, then by next numbered positions of the search initial position of the non-referenced queue, is redefined as the non-base The search initial position of quasi- queue redefines described wait for if the number to be searched described in the search hit of the non-referenced queue Next numbered positions of the search number in the non-referenced queue, for the search initial position of the non-referenced queue, if not existing Search was carried out in the non-referenced queue, then keeps the search initial position of the non-referenced queue constant.
4. method as claimed in claim 2, which is characterized in that according to the search initial position of the non-referenced queue, described wait for Search number and default bias rule, determine the search end position of the non-referenced queue, specifically include:
According to formula Locstar(itemsearch-itemstar)+1 determine the non-referenced queue search end position, wherein Locstar(itemsearch-itemstar)+1, Loc regular for preset offsetstarFor the search initial position of the non-referenced queue, itemstarFor in the number of the search initial position of the non-referenced queue, itemsearchFor the number to be searched.
5. the method as described in claim 1, which is characterized in that determine to the search order of each non-referenced queue, specifically include:
Include the sequence of number quantity from less to more according to each non-referenced queue, determines the search order to each non-referenced queue.
6. method as claimed in claim 3, which is characterized in that from the reference queue, determine number to be searched when for the first time When;
For each non-referenced queue, before the search end position for determining the non-referenced queue, the method further includes:
The number for determining the search initial position of each non-referenced queue, no more than the number to be searched.
7. method as claimed in claim 6, which is characterized in that when any non-referenced queue search initial position number, When more than the number to be searched, by next number of number to be searched described in the reference queue, it is redefined as and waits for Search number.
8. the method as described in claim 1, which is characterized in that the method further includes:When according to the search order determined When being scanned for non-referenced queue, when not searching the number consistent with the number to be searched, stop at described non-referenced The number to be searched is searched in next non-referenced queue of queue, and redefines number to be searched;
For each non-referenced queue, if carrying out search to the number to be searched in the non-referenced queue, again really The search initial position of the fixed non-referenced queue, if not carrying out search to the number to be searched in the non-referenced queue, Then keep search initial position constant;
For each non-referenced queue volume to be searched is redefined according to described when it is to redefine to search for initial position Number, the search initial position redefined and the default bias rule, redefine the search of the non-referenced queue End position redefines number to be searched, unchanged search is kept to rise when searching for initial position and remaining unchanged according to described Beginning position and the default bias rule, redefine the search end position of the non-referenced queue;
For each non-referenced queue, when it is to redefine to search for initial position, according to redefining the non-referenced queue Search end position and redefine the search initial position of the non-referenced queue, search range is redefined, when searching for When beginning position remains unchanged, according to the end position for redefining the non-referenced queue and unchanged search initial position is kept, Redefine search range;
According to the search order determined, successively in the search range that each non-referenced queue redefines, search with it is described heavy The newly consistent number of determining number to be searched, until determining the maximum volume of numerical value in search result or the reference queue Until number conduct number to be searched carried out search.
9. method as claimed in claim 7 or 8, which is characterized in that redefine number to be searched, specifically include:
By next number of number to be searched described in the reference queue, it is redefined as number to be searched;Alternatively,
According to the number to be searched, intermediate number is determined from each non-referenced queue, further according to the intermediate number, determines institute State search initial position and the search end position of reference queue, later in the search initial position of the reference queue and It searches in the search range between end position, redefines number to be searched.
10. method as claimed in claim 8, which is characterized in that redefine the search initial position of the non-referenced queue, have Body includes:
When the search of the non-referenced queue fails to hit the number to be searched, by the search start bit of the non-referenced queue The next numbered positions set are redefined as the search initial position of the non-referenced queue;
It is non-referenced at this to redefine the number to be searched for the number to be searched described in the search hit in the non-referenced queue Next numbered positions in queue, for the search initial position of the non-referenced queue.
11. method as claimed in claim 9, which is characterized in that according to the number to be searched, from each non-referenced queue really Fixed intermediate number, specifically includes:
For the non-referenced queue of number to be searched described in each search hit, determines to search for described in the non-referenced queue and compile The number of number next numbered positions;
From the number for each next numbered positions determined, the number of numerical value minimum is selected, is numbered as centre.
12. method as claimed in claim 9, which is characterized in that according to the intermediate number, determine the search of the reference queue Initial position and search end position, specifically include:
By position of the number to be searched in the reference queue, the search initial position as the reference queue;
According to the intermediate number, the number to be searched and described search initial position determined, using formula Locsearch(itemmedi-itemsearch)+1 search end position for determining the reference queue;
Wherein, itemmediFor the intermediate number, itemsearchFor the number to be searched, LocsearchFor the reference queue Search initial position.
13. method as claimed in claim 9, which is characterized in that in the search initial position of the reference queue and search In search range between end position, number to be searched is redefined, is specifically included:
It is searched in initial position and the corresponding search range of search end position in the reference queue, determines that numerical value is not less than The intermediate number, and the number of numerical value minimum, as the number to be searched redefined.
14. the method as described in claim 1, which is characterized in that using the corresponding content of recalling of the number to be searched as searching After hitch fruit, the method further includes:
It determines the maximum number of numerical value in the reference queue, not yet carried out search as number to be searched;
Redefine number to be searched;
Redefine the search range of each non-referenced queue;
According to the search order determined, corresponded to successively in the search initial position of each non-referenced queue and search end position Search range in, search and the consistent number of the number to be searched, until the maximum number of numerical value in the reference queue Be re-used as number to be searched carried out search until.
15. a kind of computer-readable medium, is stored thereon with computer-readable instruction, the computer-readable instruction can be handled Device is executed to realize the method as described in any one of claim 1 to 14.
16. a kind of for determining the network equipment of search result, wherein the network equipment includes:
One or more processors;And
It is stored with the memory of computer-readable instruction, the computer-readable instruction when executed executes the processor Such as the operation of any one of claim 1 to 14 the method.
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 true CN108536740A (en) 2018-09-14
CN108536740B 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 (8)

* 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
US20160098433A1 (en) * 2013-12-02 2016-04-07 Qbase, LLC Method for facet searching and search suggestions
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

Patent Citations (8)

* 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
US20160098433A1 (en) * 2013-12-02 2016-04-07 Qbase, LLC Method for facet searching and search suggestions
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
CN108536740B (en) 2020-06-26

Similar Documents

Publication Publication Date Title
KR102226257B1 (en) Method and device for writing service data to a blockchain system
CN110704037B (en) Rule engine implementation method and device
CN111813805A (en) Data processing method and device
US7539689B2 (en) Bundling database
US10628066B2 (en) Ensuring in-storage data atomicity and consistency at low cost
CN105808323A (en) Virtual machine creation method and system
CN113934763B (en) SQL query method and device for distributed database
CN111736982B (en) Data forwarding processing method and server of 5G data forwarding plane
CN110019298A (en) Data processing method and device
CN111680472A (en) Table data processing method and device, computer equipment and readable storage medium
CN110287444B (en) Website detection method and device and storage medium
CN106933611A (en) Kind loading method and Classloader
CN105550220B (en) A kind of method and device of the access of heterogeneous system
CN110895544B (en) Interface data processing method, device, system and storage medium
CN108399175A (en) A kind of storage of data, querying method and its device
CN109829678B (en) Rollback processing method and device and electronic equipment
CN109656947A (en) Data query method, apparatus, computer equipment and storage medium
CN104166649A (en) Caching method and device for search engine
CN104750749B (en) Data processing method and device
CN108536740A (en) A kind of method, medium and the equipment of determining search result
US20140310070A1 (en) Coordinated business rules management and mixed integer programming
CN111597407A (en) Keyword matching method, device, equipment and storage medium based on TCAM
CN110019295B (en) Database retrieval method, device, system and storage medium
CN107301097A (en) It is a kind of to call java objects, the storage method of the reference address information of java objects and device
CN109858204A (en) A kind of program code guard method and device based on LLVM

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
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.