CN112181755B - Method for determining parameter threshold in search service and related equipment - Google Patents
Method for determining parameter threshold in search service and related equipment Download PDFInfo
- Publication number
- CN112181755B CN112181755B CN201910590186.3A CN201910590186A CN112181755B CN 112181755 B CN112181755 B CN 112181755B CN 201910590186 A CN201910590186 A CN 201910590186A CN 112181755 B CN112181755 B CN 112181755B
- Authority
- CN
- China
- Prior art keywords
- search
- parameter
- parameter threshold
- server
- performance
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 104
- 230000008569 process Effects 0.000 claims abstract description 38
- 238000012545 processing Methods 0.000 claims description 15
- 230000008859 change Effects 0.000 abstract description 8
- 238000012544 monitoring process Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 8
- 230000006870 function Effects 0.000 description 6
- 230000004044 response Effects 0.000 description 5
- 230000009471 action Effects 0.000 description 3
- 230000003287 optical effect Effects 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000013479 data entry Methods 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002085 persistent effect Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
- 235000019633 pungent taste Nutrition 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3003—Monitoring arrangements specially adapted to the computing system or computing system component being monitored
- G06F11/3024—Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a central processing unit [CPU]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/3051—Monitoring arrangements for monitoring the configuration of the computing system or of the computing system component, e.g. monitoring the presence of processing resources, peripherals, I/O links, software programs
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computing Systems (AREA)
- Physics & Mathematics (AREA)
- Quality & Reliability (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Mathematical Physics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Debugging And Monitoring (AREA)
Abstract
The invention discloses a method and related equipment for determining a parameter threshold in search service, wherein the method for determining the parameter threshold in search service comprises the following steps: acquiring performance data of a search server in the process of providing search service in real time; determining a performance index corresponding to the performance data; comparing the performance index with a preset performance index, and generating a first parameter threshold of a target search parameter when the comparison result meets a preset condition; and sending the first parameter threshold value of the target search parameter to the search server so that the search server provides search service according to the first parameter threshold value of the target search parameter. According to the invention, the first parameter threshold value of the target search parameter is associated with the real-time performance data of the search server in the search service, so that dynamic change is realized, the load of the search server can be effectively adjusted, and the change of the parameter threshold value is completely automatic, so that the process is simple and easy to maintain.
Description
Technical Field
The present invention relates to the field of computer technologies, and in particular, to a method for determining a parameter threshold in a search service and related devices.
Background
When online search recall is performed, considering the huge data volume, a threshold value of some parameters in the search service is generally set in a configuration file or related codes, for example, a threshold value of the data volume traversed in the search service is set, and when the data volume traversed in the search process reaches the set threshold value, other data is not traversed any more, so that the aim of reducing the load of a search server is fulfilled.
In the related art, thresholds of some parameters in the search service are set through configuration files or in related codes, and the setting mode enables the thresholds of the parameters to be relatively solidified, once the thresholds of the parameters are set, only solidified parameters can be used when the online search service is carried out, if a new parameter threshold is needed, the related codes or the configuration files are needed to be modified, the service is required to be reissued, and the process is tedious, long in time consumption and difficult to maintain.
Disclosure of Invention
In order to solve the problems in the prior art, the embodiment of the invention provides a method for determining a parameter threshold in search service and related equipment. The technical scheme is as follows:
In one aspect, a method of determining a parameter threshold in a search service is provided, the method comprising:
acquiring performance data of a search server in the process of providing search service in real time;
Determining a performance index corresponding to the performance data;
Comparing the performance index with a preset performance index, and generating a first parameter threshold of a target search parameter when the comparison result meets a preset condition;
and sending the first parameter threshold value of the target search parameter to the search server so that the search server provides search service according to the first parameter threshold value of the target search parameter.
In one aspect, a method of determining a parameter threshold in a search service is provided, the method comprising:
The method comprises the steps that a threshold server acquires performance data of a search server in a search service providing process in real time, determines performance indexes corresponding to the performance data, compares the performance indexes with preset performance indexes, generates a first parameter threshold of a target search parameter when a comparison result meets preset conditions, and sends the first parameter threshold of the target search parameter to the search server;
the search server receives a first parameter threshold of the target search parameter; and responding to a search service providing request, and providing the search service according to a first parameter threshold value of the target search parameter.
In another aspect, an apparatus for determining a parameter threshold in a search service is provided, the apparatus comprising:
The first acquisition module is used for acquiring performance data of the search server in the process of providing search service in real time;
the first determining module is used for determining a performance index corresponding to the performance data;
The generation module is used for comparing the performance index with a preset performance index, and generating a first parameter threshold value of the target search parameter when the comparison result meets a preset condition;
And the first sending module is used for sending the first parameter threshold value of the target search parameter to the search server so that the search server provides search service according to the first parameter threshold value of the target search parameter.
Optionally, the apparatus further includes:
the second acquisition module is used for responding to the parameter threshold input operation and acquiring a preset parameter threshold of the input preset search parameter;
Correspondingly, the first sending module comprises:
A second determining module, configured to determine candidate search parameters corresponding to the preset search parameters in the target search parameters;
the replacing module is used for replacing the first parameter threshold value of the candidate search parameter with the preset parameter threshold value of the preset search parameter;
and the first sending sub-module is used for sending the replaced first parameter threshold value of the target search parameter to the search server.
Optionally, the first sending submodule is specifically configured to: responding to a search parameter threshold acquisition request sent by the search server at intervals of preset time, and sending a first parameter threshold of the target search parameter to the search server; or sending the first parameter threshold value of the target search parameter to the search server at preset time intervals.
Optionally, the performance data includes: the search service times in the unit time period and CPU occupancy rates corresponding to the plurality of time stamps in the unit time period;
Correspondingly, the first determining module includes:
the third determining module is used for determining the time consumption of the single search service according to the search service times in the unit time period;
A fourth determining module, configured to determine an average CPU occupancy rate according to CPU occupancy rates corresponding to the plurality of timestamps in the unit time period;
and a fifth determining module, configured to take the time consumption of the single search service and the average CPU occupancy rate as the performance index.
Optionally, the generating module includes:
The first judging module is used for judging whether the performance index is matched with a preset performance index;
A sixth determining module, configured to determine that the comparison result meets a preset condition when the result of the determination by the first determining module is yes;
and the first generation sub-module is used for generating a first parameter threshold value of the target search parameter.
Optionally, the first generating sub-module includes:
The third acquisition module is used for acquiring the current parameter threshold value of the target search parameter;
The second judging module is used for judging whether the current parameter threshold reaches a target extremum or not;
and the second generation sub-module is used for generating a first parameter threshold value of the target search parameter according to the current parameter threshold value and a preset adjustment value when the judgment result of the second judgment module is negative.
In another aspect, a system for determining a parameter threshold in a search service is provided, the system comprising a threshold server and a search server, wherein,
The threshold server is used for acquiring performance data of the search server in the process of providing search service in real time, determining performance indexes corresponding to the performance data, comparing the performance indexes with preset performance indexes, generating a first parameter threshold of a target search parameter when a comparison result meets preset conditions, and transmitting the first parameter threshold of the target search parameter to the search server;
The search server is used for receiving a first parameter threshold value of the target search parameter; and responding to a search service providing request, and providing the search service according to a first parameter threshold value of the target search parameter.
Optionally, the search server is further configured to: acquiring a real-time parameter value of the target search parameter in the search process; judging whether the real-time parameter value of the target search parameter is matched with the first parameter threshold value or not; ending the search and obtaining a search result when the judgment result is yes; and returning the search result.
In another aspect, a server is provided, including a processor and a memory, where the memory stores at least one instruction, at least one program, a set of codes, or a set of instructions, where the at least one instruction, the at least one program, the set of codes, or the set of instructions are loaded and executed by the processor to implement the method for determining a parameter threshold in a search service.
In another aspect, a computer readable storage medium having stored therein at least one instruction, at least one program, code set, or instruction set loaded and executed by a processor to implement a method of determining parameter thresholds in a search service as described above is provided.
According to the method, the device and the system, the performance index corresponding to the performance data is determined by acquiring the performance data of the search server in the process of providing the search service in real time, the performance index is compared with the preset performance index, the first parameter threshold of the target search parameter is generated when the comparison result meets the preset condition, and the first parameter threshold of the target search parameter is sent to the search server, so that the search server can provide the search service according to the first parameter threshold of the target search parameter.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic illustration of an implementation environment provided by an embodiment of the present invention;
FIG. 2 is a flowchart of a method for determining parameter thresholds in a search service according to an embodiment of the present invention;
FIG. 3 is a flowchart of another method for determining parameter thresholds in a search service according to an embodiment of the present invention;
FIG. 4 is a flowchart of a method for generating a first parameter threshold for a target search parameter according to an embodiment of the present invention;
FIG. 5 is a flowchart of another method for determining parameter thresholds in a search service according to an embodiment of the present invention;
FIG. 6 is a timing diagram of a method for determining parameter thresholds in a search service according to an embodiment of the present invention;
FIG. 7 is a timing diagram of another method for determining parameter thresholds in search services according to an embodiment of the present invention;
FIG. 8 is a schematic structural diagram of an apparatus for determining parameter thresholds in search services according to an embodiment of the present invention;
FIG. 9 is a schematic structural diagram of another apparatus for determining parameter thresholds in search services according to an embodiment of the present invention;
Fig. 10 is a block diagram of a hardware structure of a server according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be noted that the terms "first," "second," and the like in the description and the claims of the present invention and the above figures are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the invention described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or server that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed or inherent to such process, method, article, or apparatus, but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Referring to fig. 1, a schematic diagram of an implementation environment provided by an embodiment of the present invention is shown, where the implementation environment may include a terminal 110, a search server 120 and a threshold server 130.
Wherein the terminal 110 may transmit a search service provision request to the search server 120, and the search server 120 may perform a search recall of related data in response to the search service provision request and return a search result to the terminal 110 so that the terminal 110 displays the search result to the user. The terminal 110 and the search server 120 may be connected through a wired or wireless network, and the terminal 110 may be, but not limited to, a smart phone, a desktop computer, a tablet computer, a notebook computer, a digital assistant, a smart wearable device, etc., and the search server 120 may be a server operating independently, a distributed server, or a server cluster composed of a plurality of servers.
The threshold server 130 may be coupled to the search server 120 via a wired or wireless network for dynamically determining thresholds for search parameters that the search server 120 may be involved in the search process. In the embodiment of the present disclosure, the threshold server 130 may provide multiple services related to the above-mentioned threshold determining process, and in practical application, the multiple services related to the above-mentioned threshold determining process may be completed in one server, or may be completed in different servers, that is, the threshold server 130 may be a server running independently, or may be a server cluster formed by multiple servers.
Referring to fig. 2, a flowchart of a method for determining a parameter threshold in a search service according to an embodiment of the present invention is shown, and the method may be applied to the threshold server side in fig. 1. It is noted that the present specification provides method operational steps as described in the examples or flowcharts, but may include more or fewer operational steps based on conventional or non-inventive labor. The order of steps recited in the embodiments is merely one way of performing the order of steps and does not represent a unique order of execution. In actual system or product execution, the methods illustrated in the embodiments or figures may be performed sequentially or in parallel (e.g., in a parallel processor or multi-threaded processing environment). As shown in fig. 2, the method may include:
S201, performance data of the search server in the process of providing the search service is acquired in real time.
In embodiments of the present disclosure, the threshold server may provide a real-time monitoring service that may monitor the search server in real-time to obtain performance data of the search server in providing the search recall service. The real-time monitoring may be performed at preset time intervals, which may be in the order of milliseconds, such as 10 milliseconds monitoring, etc.
Performance data is data that characterizes the performance of the server, for example, performance data may include, but is not limited to, CPU (Central Processing Unit, central processing unit,) occupancy, number of search services per unit time period, disk read rate, and so forth. In practice, the real-time monitoring service may be implemented by a performance data monitoring tool, which may include, but is not limited to, top, vmstat, iostat, netstat, etc.
S203, determining a performance index corresponding to the performance data.
In the embodiment of the present specification, the performance index refers to data obtained after processing performance data, and the performance index may be directly used for evaluating the performance of the search server. The specific processing mode of the performance data can be different according to different types of the performance data, and the processing of the performance data can be completed by the real-time monitoring service of the threshold server.
In a specific embodiment, the performance data acquired by the real-time monitoring service may be the number of searching service in a unit time period and CPU occupancy rates corresponding to a plurality of time stamps in the unit time period. The unit time period may be set according to actual needs, for example, may be set to 1 minute, 3 minutes, or the like; the number of CPU occupancy rates per unit time period may be set according to actual needs, and for example, may be set to CPU occupancy rates corresponding to 3 or 5 time stamps at intervals.
In this embodiment, step S203 may include the following steps when actually performed:
And determining the time consumption of the single search service according to the search service times in the unit time period. Specifically, the unit time period may be divided by the number of search services in the unit time period, thereby obtaining the time consumption of the single search service. In practical applications, the time consumption of the single search service may be expressed as milliseconds, for example, the unit time period is 1 minute, and 60000 milliseconds per number of search services is employed when calculating the time consumption of the single search service.
According to CPU occupancy rates corresponding to a plurality of time stamps in a unit time period, determining an average CPU occupancy rate, wherein a corresponding calculation formula is as follows:
N is the number of CPU occupancy rates acquired in a unit time period; CPU occupancy rate corresponding to the ith timestamp in the unit time period; /(I) Representing the average CPU occupancy.
And taking the time consumption and the average CPU occupancy rate of the single search service as performance indexes for evaluating the performance condition of the search server subsequently.
S205, comparing the performance index with a preset performance index, and generating a first parameter threshold of the target search parameter when the comparison result meets a preset condition.
The target search parameter refers to one or more parameters involved in the search recall process of the search server, and the thresholds of the parameters can influence the search process, such as the duration of one search, or can influence the search result, such as the accuracy of the search result. In particular, the target search parameters may include, but are not limited to, data entries traversed during the search, data relevance scores, hotness scores, and the like. In practical applications, the step S205 may be completed through a dynamic decision service provided by the threshold server.
In a specific embodiment, the comparison between the performance index and the preset performance index may be implemented by using a method shown in fig. 3, and when the comparison result meets the preset condition, a first parameter threshold of the target search parameter is generated, as shown in fig. 3, where the method may include:
s301, judging whether the performance index is matched with a preset performance index.
The preset performance index may be set according to an actual situation or according to a test situation of the search server.
In the embodiment of the present specification, the preset performance index may include a preset maximum performance index and a preset minimum performance index. When the performance index is greater than the preset maximum performance index or the performance index is less than the preset minimum performance index, it indicates that the performance index is matched with the preset performance index, and step S303 may be executed; when the performance index is located between the preset maximum performance index and the preset minimum performance index, the performance index is not matched with the preset performance index, and the parameter threshold value of the target search parameter can not be adjusted at the moment.
In practical applications, since the performance index may include indexes corresponding to performance data of multiple categories, for example, the performance index may include both time consuming and average CPU occupancy of the single search service, and thus, the condition that the performance index matches the preset performance index may include, but is not limited to: when all the performance indexes are larger than the corresponding preset maximum performance indexes or all the performance indexes are smaller than the corresponding preset minimum performance indexes, the performance indexes are considered to be matched with the preset performance indexes, namely, when any one performance index is located between the preset maximum performance indexes and the preset minimum performance indexes, the performance indexes are not matched with the preset performance indexes.
In a specific embodiment, when the time consumption of the single search service is greater than the time consumption of the preset maximum single search service and the average CPU occupancy is greater than the preset maximum average CPU occupancy, the performance index is considered to be matched with the preset performance index; and when the time consumption of the single search service is less than the time consumption of the preset minimum single search service and the average CPU occupancy rate is less than the preset minimum average CPU occupancy rate, the performance index is considered to be matched with the preset performance index.
S303, determining that the comparison result meets a preset condition.
In the embodiment of the specification, when the judging result is that the performance index is matched with the preset performance index, the comparison result of the performance index and the preset performance index is considered to meet the preset condition.
In this embodiment of the present disclosure, the preset conditions may include a first preset condition and a second preset condition, where the first preset condition is that the performance index is greater than a preset maximum performance index; the second preset condition is that the performance index is smaller than the preset minimum performance index.
S305, generating a first parameter threshold of the target search parameter.
Specifically, when executing the first parameter threshold for generating the target search parameter, the method may include the steps as shown in fig. 4:
S401, acquiring a current parameter threshold of the target search parameter. The current parameter threshold of the target search parameter can be understood as the parameter threshold of the target search parameter obtained by the last adjustment, and in practical application, after the parameter threshold of the target search parameter is adjusted each time, the threshold server can store the adjusted parameter threshold of the target search parameter, and can store the corresponding relation between the parameter name of the target search parameter and the parameter threshold during specific storage.
It may be appreciated that the parameter name of one target search parameter may correspond to a plurality of parameter thresholds, each parameter threshold corresponds to an adjustment action, so that, when the first parameter threshold of the target search parameter is generated, the current parameter threshold of the target search parameter may be more quickly obtained, and the plurality of parameter thresholds corresponding to the parameter name of one target search parameter may be ordered according to the timestamp of the adjustment action, so that the parameter threshold corresponding to the timestamp closest to the current timestamp may be obtained later as the current parameter threshold.
S403, judging whether the current parameter threshold reaches a target extremum.
Specifically, the target extremum may include a target maximum value and a target minimum value, which may be set according to a specific situation of the actual search server.
In practical application, when judging whether the current parameter threshold is greater than the target extremum, the method can be performed in combination with a specific satisfied preset condition, specifically:
When the first preset condition is satisfied, that is, the performance index is greater than the preset maximum performance index, whether the current parameter threshold reaches the target minimum value or not can be judged, if the judgment result is that the current parameter threshold does not reach the target minimum value, step S405 can be executed, otherwise, the adjustment of the parameter threshold of the target search parameter can be omitted; when the second preset condition is satisfied, that is, the performance index is smaller than the preset minimum performance index, it may be determined whether the current parameter threshold reaches the target maximum value, if the result of the determination is that the current parameter threshold does not reach the target maximum value, step S405 may be executed, or else, adjustment of the parameter threshold of the target search parameter may not be performed.
S405, generating a first parameter threshold of the target search parameter according to the current parameter threshold and a preset adjustment value.
In this embodiment of the present disclosure, the generation of the first parameter threshold of the target search parameter according to the current parameter threshold and the preset adjustment value may be performed continuously in combination with the satisfied preset condition, specifically:
when the first preset condition is met, namely the performance index is larger than the preset maximum performance index, the difference value between the current parameter threshold value and the preset adjustment value can be calculated, and the difference value is used as the first parameter threshold value of the target search parameter, so that the purposes of reducing the parameter threshold value and further reducing the load of the search server are achieved; when the second preset condition is satisfied, that is, the performance index is smaller than the preset minimum performance index, the sum of the current parameter threshold and the preset adjustment value can be calculated, and the sum is used as the first parameter threshold of the target search parameter, so that the purpose of increasing the parameter threshold and further improving the processing capacity of the search server is achieved.
It should be noted that the preset adjustment value may be a preset value according to actual needs. In practical application, when a first preset condition is met, namely, the performance index is larger than a preset maximum performance index, if the difference value between the calculated current parameter threshold and the preset adjustment value is smaller than a target minimum value, the target minimum value is used as a first parameter threshold of a target search parameter; similarly, when the second preset condition is satisfied, that is, the performance index is smaller than the preset minimum performance index, if the sum of the calculated current parameter threshold and the preset adjustment value is larger than the target maximum value, the target maximum value is used as the first parameter threshold of the target search parameter.
S207, the first parameter threshold value of the target search parameter is sent to the search server, so that the search server provides search service according to the first parameter threshold value of the target search parameter.
In this embodiment of the present disclosure, the search server may send a parameter threshold obtaining request to the threshold server at intervals of a preset time, and accordingly, the threshold server may send, in response to the request, a first parameter threshold of a target search parameter to the search server, so that the search server provides a search service according to the first parameter threshold of the target search parameter. Of course, the threshold server may also send the first parameter threshold of the target search parameter to the search server at preset time intervals.
The preset time interval may be set according to actual needs, for example, may be set to 1 minute or 30 seconds, etc.
In a specific embodiment, before the threshold server sends the first parameter threshold of the target search parameter to the search server, the threshold server may further determine whether the parameter threshold of the target search parameter is adjusted, and if the result of the determination is that adjustment occurs, send the adjusted first parameter threshold to the search server; otherwise, if the result of the judgment is that the adjustment is not performed, the threshold server may send an indication that the parameter threshold is not adjusted to the search server, and accordingly, the search server will provide the search service according to the parameter threshold already present after receiving the indication.
In practice, the threshold server may also provide a name service, which refers to a computer application program that can provide query and write functions, and may be a file, database (e.g., redis), or an application program, etc. The dynamic decision service, after generating the first parameter threshold of the target search parameter, may periodically write decision data to the name service, which may include the generated first parameter threshold of the target search parameter or indication that no adjustment has occurred in the parameter threshold, from which a subsequent search server may obtain the decision data.
According to the technical scheme, the first parameter threshold value of the target search parameter is associated with the real-time performance data of the search server in the search service, so that the dynamic change of the first parameter threshold value of the target search parameter is realized, the load of the search server can be adjusted more effectively, the change of the parameter threshold value is completely automatic, and the process is simple and easy to maintain.
In practical application, in order to avoid the problem that the parameter threshold of the target search parameter of the search server cannot be timely adjusted due to an emergency such as a dynamic decision service fault of the threshold server, the embodiment of the invention further provides another method for determining the parameter threshold in the search service, as shown in fig. 5, the method may further include:
S501, responding to a parameter threshold input operation, and acquiring a preset parameter threshold of an input preset search parameter.
In this embodiment of the present disclosure, the threshold server may further provide a manual decision service, and when a parameter threshold of a certain search parameter needs to be set forcibly, a preset parameter threshold of a preset search parameter may be input through the manual decision service, and correspondingly, the threshold server may respond to the parameter threshold input operation and obtain the input preset parameter threshold of the preset search parameter. The preset search parameter may be one or more of target search parameters, and the preset parameter threshold may be set according to actual needs. In practice, the manual decision service may be implemented through web access provided by a threshold server.
S503, determining candidate search parameters corresponding to the preset search parameters in the target search parameters.
S505, replacing the first parameter threshold of the candidate search parameters with the preset parameter threshold of the preset search parameters.
S507, the replaced first parameter threshold value of the target search parameter is sent to the search server.
In the embodiment of the present disclosure, the priority of the preset parameter threshold value input through the manual decision service is higher than the first parameter threshold value of the corresponding target search parameter, so that the first parameter threshold value corresponding to the preset search parameter in the target search parameter is replaced by the preset parameter threshold value in steps S503 to S507, and the replaced first parameter threshold value of the target search parameter is sent to the search server, so that the search server can provide the search recall service with the preset parameter threshold value of the corresponding target search parameter, which can well avoid the problem that the parameter threshold value of the target search parameter of the search server cannot be adjusted in time due to the conditions of dynamic decision service failure of the threshold server, and the like, and has great flexibility.
The embodiment of the invention also provides another method for determining parameter thresholds in search service, which can be applied to the implementation environment of fig. 1, and comprises the following steps:
The method comprises the steps that a threshold server acquires performance data of a search server in a search service providing process in real time, determines performance indexes corresponding to the performance data, compares the performance indexes with preset performance indexes, generates a first parameter threshold of a target search parameter when a comparison result meets preset conditions, and sends the first parameter threshold of the target search parameter to the search server;
The search server receives a first parameter threshold value of the target search parameter; and responding to a search service providing request, and providing the search service according to a first parameter threshold value of the target search parameter.
In practical applications, the threshold server may provide a real-time monitoring service, a dynamic decision service, a name service and a manual decision service, and based on the above various services provided by the threshold server, a timing chart of the method for determining a parameter threshold in a search service according to this embodiment is shown in fig. 6, and may include:
S601, the real-time monitoring service acquires performance data of the search server in the process of providing the search service in real time.
S603, the real-time monitoring service determines a performance index corresponding to the acquired performance data, and sends the performance index to the dynamic decision service.
Accordingly, the dynamic decision service receives performance metrics.
S605, the dynamic decision service compares the performance index with a preset performance index, and generates a first parameter threshold of the target search parameter when the comparison result meets a preset condition.
S607, the dynamic decision service writes the first parameter threshold of the target search parameter to the name service.
S609, the name service sends the first parameter threshold value of the target search parameter to the search server.
Correspondingly, the search server receives a first parameter threshold of the target search parameter.
S611, the search server provides the search service according to the first parameter threshold of the target search parameter in response to the search service providing request.
Specifically, when the search server provides the search service according to the first parameter threshold value of the target search parameter, the search server can acquire the real-time parameter value of the target search parameter in the search process, judge whether the real-time parameter value of the target search parameter is matched with the first parameter threshold value, and finish the search and acquire the search result when the judgment result is yes, and return the search result. Taking the target search parameter as an example of the traversed data items in the search process, the search server records the number of the traversed data items in the process of providing the search service corresponding to the search service providing request, and when the number reaches a first number threshold value, the search is ended, the search result is obtained, and the search result is returned.
In another specific embodiment, as shown in fig. 7, the method may further include step S613, in which the manual decision service obtains a preset parameter threshold of the input preset search parameter in response to the parameter threshold input operation, and writes the preset parameter threshold of the preset search parameter into the name service.
Accordingly, the name service receives a preset parameter threshold for the preset search parameter.
S615, the name service determines candidate search parameters corresponding to the preset search parameters in the target search parameters;
s617, the name service replaces the first parameter threshold of the candidate search parameters with a preset parameter threshold of the preset search parameters;
accordingly, in step S609, the name service sends the replaced first parameter threshold of the target search parameter to the search server.
Correspondingly, the search server receives a first parameter threshold of the target search parameter.
According to the technical scheme, the first parameter threshold value of the target search parameter is associated with the real-time performance data of the search server in the search service, so that the dynamic change of the first parameter threshold value of the target search parameter is realized, the load of the search server can be adjusted more effectively, the change of the parameter threshold value is completely automatic, and the process is simple and easy to maintain. In addition, the method and the device can also dynamically determine the problem that the parameter threshold value of the target search parameter of the search server cannot be adjusted in time due to the conditions of service faults and the like, and improve the flexibility of the system.
The foregoing method for determining a parameter threshold in a search service is also applicable to the apparatus for determining a parameter threshold in a search service provided by the present embodiment, and will not be described in detail in the present embodiment.
Referring to fig. 8, a schematic structural diagram of an apparatus for determining a parameter threshold in a search service according to an embodiment of the present invention is shown, where the apparatus has a function of implementing the method for determining a parameter threshold in a search service in the foregoing method embodiment, and the function may be implemented by hardware or implemented by executing corresponding software by hardware. As shown in fig. 8, the apparatus may include:
A first obtaining module 810, configured to obtain, in real time, performance data of a search server in a process of providing a search service;
a first determining module 820, configured to determine a performance index corresponding to the performance data;
The generating module 830 is configured to compare the performance index with a preset performance index, and generate a first parameter threshold of the target search parameter when the comparison result meets a preset condition;
the first sending module 840 is configured to send the first parameter threshold of the target search parameter to the search server, so that the search server provides a search service according to the first parameter threshold of the target search parameter.
In some embodiments, as shown in fig. 9, the apparatus may further include:
A second obtaining module 850, configured to obtain a preset parameter threshold of the input preset search parameter in response to a parameter threshold input operation;
Accordingly, the first transmitting module 840 may include:
A second determining module, configured to determine candidate search parameters corresponding to the preset search parameters in the target search parameters;
the replacing module is used for replacing the first parameter threshold value of the candidate search parameter with the preset parameter threshold value of the preset search parameter;
and the first sending sub-module is used for sending the replaced first parameter threshold value of the target search parameter to the search server.
Optionally, the first sending sub-module is specifically configured to: responding to a search parameter threshold acquisition request sent by the search server at intervals of preset time, and sending a first parameter threshold of the target search parameter to the search server; or sending the first parameter threshold value of the target search parameter to the search server at preset time intervals.
Optionally, the performance data may include: the search service times in the unit time period and CPU occupancy rates corresponding to the plurality of time stamps in the unit time period;
accordingly, the first determining module 820 may include:
the third determining module is used for determining the time consumption of the single search service according to the search service times in the unit time period;
A fourth determining module, configured to determine an average CPU occupancy rate according to CPU occupancy rates corresponding to the plurality of timestamps in the unit time period;
and a fifth determining module, configured to take the time consumption of the single search service and the average CPU occupancy rate as the performance index.
Optionally, the generating module 830 may include:
The first judging module is used for judging whether the performance index is matched with a preset performance index;
A sixth determining module, configured to determine that the comparison result meets a preset condition when the result of the determination by the first determining module is yes;
and the first generation sub-module is used for generating a first parameter threshold value of the target search parameter.
Alternatively, the first generating sub-module may include:
The third acquisition module is used for acquiring the current parameter threshold value of the target search parameter;
The second judging module is used for judging whether the current parameter threshold reaches a target extremum or not;
and the second generation sub-module is used for generating a first parameter threshold value of the target search parameter according to the current parameter threshold value and a preset adjustment value when the judgment result of the second judgment module is negative.
The embodiment of the invention also provides a system for determining the parameter threshold value in the search service, which can comprise a threshold value server and a search server, wherein,
The threshold server is used for acquiring performance data of the search server in the process of providing search service in real time, determining performance indexes corresponding to the performance data, comparing the performance indexes with preset performance indexes, generating a first parameter threshold of a target search parameter when a comparison result meets preset conditions, and transmitting the first parameter threshold of the target search parameter to the search server;
The search server is used for receiving a first parameter threshold value of the target search parameter; and responding to a search service providing request, and providing the search service according to a first parameter threshold value of the target search parameter.
Optionally, the search server is further configured to: acquiring a real-time parameter value of the target search parameter in the search process; judging whether the real-time parameter value of the target search parameter is matched with the first parameter threshold value or not; ending the search and obtaining a search result when the judgment result is yes; and returning the search result.
It should be noted that, in the apparatus provided in the foregoing embodiment, when implementing the functions thereof, only the division of the foregoing functional modules is used as an example, in practical application, the foregoing functional allocation may be implemented by different functional modules, that is, the internal structure of the device is divided into different functional modules, so as to implement all or part of the functions described above. In addition, the apparatus and the method embodiments provided in the foregoing embodiments belong to the same concept, and specific implementation processes of the apparatus and the method embodiments are detailed in the method embodiments and are not repeated herein.
According to the device and the system for determining the parameter threshold in the search service, the first parameter threshold of the target search parameter is associated with the real-time performance data of the search server in the search service, so that the dynamic change of the first parameter threshold of the target search parameter is realized, the load of the search server can be adjusted more effectively, the change of the parameter threshold is completely automatic, and the process is simple and easy to maintain.
The embodiment of the invention provides a server, which comprises a processor and a memory, wherein at least one instruction, at least one section of program, a code set or an instruction set is stored in the memory, and the at least one instruction, the at least one section of program, the code set or the instruction set is loaded and executed by the processor to realize the method for determining parameter thresholds in search service, which is provided by the embodiment of the method.
The memory may be used to store software programs and modules that the processor executes to perform various functional applications and to determine parameter thresholds in the search service by running the software programs and modules stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, application programs required for functions, and the like; the storage data area may store data created according to the use of the device, etc. In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory may also include a memory controller to provide access to the memory by the processor.
The method embodiments provided by the embodiments of the present invention may be executed in a computer terminal, a server, or similar computing device. Taking the example of running on a server, fig. 10 is a block diagram of a hardware structure of a server running a method for determining a parameter threshold in a search service according to an embodiment of the present invention. As shown in fig. 10, the server 1000 may vary considerably in configuration or performance and may include one or more central processing units (Central Processing Units, CPU) 1010 (the processor 1010 may include, but is not limited to, a microprocessor MCU or a processing device such as a programmable logic device FPGA), a memory 1030 for storing data, one or more storage mediums 1020 (e.g., one or more mass storage devices) for storing applications 1023 or data 1022. Wherein the memory 1030 and storage medium 1020 can be transitory or persistent storage. The program stored on the storage medium 1020 may include one or more modules, each of which may include a series of instruction operations on a server. Still further, the central processor 1010 may be configured to communicate with a storage medium 1020 and execute a series of instruction operations in the storage medium 1020 on the server 1000. The server 1000 may also include one or more power supplies 1060, one or more wired or wireless network interfaces 1050, one or more input/output interfaces 1040, and/or one or more operating systems 1021, such as Windows Server, mac OS XTM, unixTM, linuxTM, freeBSDTM, and the like.
Input-output interface 1040 may be used to receive or transmit data via a network. The specific example of the network described above may include a wireless network provided by a communication provider of the server 1000. In one example, input-output interface 1040 includes a network adapter (Network Interface Controller, NIC) that may be connected to other network devices via base stations to communicate with the internet. In one example, the input-output interface 1040 may be a Radio Frequency (RF) module for communicating with the internet wirelessly.
It will be appreciated by those of ordinary skill in the art that the configuration shown in fig. 10 is merely illustrative and is not intended to limit the configuration of the electronic device described above. For example, the server 1000 may also include more or fewer components than shown in fig. 10, or have a different configuration than shown in fig. 10.
Embodiments of the present invention also provide a computer readable storage medium that may be disposed in a server to hold at least one instruction, at least one program, code set, or instruction set associated with implementing a text classification method, the at least one instruction, the at least one program, the code set, or instruction set being loaded and executed by the processor to implement the method of determining parameter thresholds in a search service provided by the above method embodiments.
Alternatively, in the present embodiment, the storage medium may include, but is not limited to: a usb disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
It should be noted that: the sequence of the embodiments of the present invention is only for description, and does not represent the advantages and disadvantages of the embodiments. And the foregoing description has been directed to specific embodiments of this specification. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can 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 are also possible or may be advantageous.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments in part.
It will be understood by those skilled in the art that all or part of the steps for implementing the above embodiments may be implemented by hardware, or may be implemented by a program for instructing relevant hardware, where the program may be stored in a computer readable storage medium, and the storage medium may be a read-only memory, a magnetic disk or an optical disk, etc.
The foregoing description of the preferred embodiments of the invention is not intended to limit the invention to the precise form disclosed, and any such modifications, equivalents, and alternatives falling within the spirit and scope of the invention are intended to be included within the scope of the invention.
Claims (11)
1. A method of determining a parameter threshold in a search service, the method comprising:
acquiring performance data of a search server in the process of providing search service in real time; the performance data is data representing the operation performance of the search server;
Processing the performance data to obtain the processed performance index; the performance metrics include metrics for evaluating performance of the search server;
Comparing the performance index with a preset performance index, and generating a first parameter threshold of a target search parameter when the comparison result meets a preset condition;
and sending the first parameter threshold value of the target search parameter to the search server so that the search server provides search service according to the first parameter threshold value of the target search parameter.
2. The method of determining a parameter threshold in a search service of claim 1, further comprising:
responding to a parameter threshold input operation, and acquiring a preset parameter threshold of an input preset search parameter;
correspondingly, the sending the first parameter threshold of the target search parameter to the search server includes:
determining candidate search parameters corresponding to the preset search parameters in the target search parameters;
replacing the first parameter threshold of the candidate search parameters with a preset parameter threshold of the preset search parameters;
and sending the replaced first parameter threshold value of the target search parameter to the search server.
3. The method of determining parameter thresholds in a search service of claim 1, wherein the performance data comprises: the search service times in the unit time period and CPU occupancy rates corresponding to the plurality of time stamps in the unit time period;
Correspondingly, the processing the performance data to obtain the processed performance index includes:
Determining the time consumption of single search service according to the search service times in the unit time period;
Determining an average CPU occupancy rate according to the CPU occupancy rates corresponding to the plurality of time stamps in the unit time period;
taking the time consumption of the single search service and the average CPU occupancy rate as the performance index.
4. The method for determining a parameter threshold in a search service according to claim 1, wherein comparing the performance index with a preset performance index, and generating a first parameter threshold of a target search parameter when the comparison result meets a preset condition comprises:
Judging whether the performance index is matched with a preset performance index or not;
when the judgment result is yes, determining that the comparison result meets the preset condition;
a first parameter threshold for the target search parameter is generated.
5. The method of determining a parameter threshold in a search service of claim 4, wherein generating the first parameter threshold for the target search parameter comprises:
Acquiring a current parameter threshold of the target search parameter;
Judging whether the current parameter threshold reaches a target extremum or not;
and if not, generating a first parameter threshold of the target search parameter according to the current parameter threshold and a preset adjustment value.
6. A method of determining a parameter threshold in a search service, the method comprising:
The method comprises the steps that a threshold server acquires performance data of a search server in a search service providing process in real time, processes the performance data to obtain processed performance indexes, compares the performance indexes with preset performance indexes, generates a first parameter threshold of a target search parameter when a comparison result meets preset conditions, and sends the first parameter threshold of the target search parameter to the search server; the performance data is data representing the operation performance of the search server, and the performance indexes comprise indexes for evaluating the performance of the search server;
the search server receives a first parameter threshold of the target search parameter; and responding to a search service providing request, and providing the search service according to a first parameter threshold value of the target search parameter.
7. The method of determining parameter thresholds in a search service of claim 6, wherein the search server providing the search service according to a first parameter threshold of the target search parameter comprises:
The search server acquires real-time parameter values of the target search parameters in the search process; judging whether the real-time parameter value of the target search parameter is matched with the first parameter threshold value or not; ending the search and obtaining a search result when the judgment result is yes; and returning the search result.
8. An apparatus for determining a parameter threshold in a search service, the apparatus comprising:
the first acquisition module is used for acquiring performance data of the search server in the process of providing search service in real time; the performance data is data representing the operation performance of the search server;
The first determining module is used for processing the performance data to obtain the processed performance index; the performance metrics include metrics for evaluating performance of the search server;
The generation module is used for comparing the performance index with a preset performance index, and generating a first parameter threshold value of the target search parameter when the comparison result meets a preset condition;
And the first sending module is used for sending the first parameter threshold value of the target search parameter to the search server so that the search server provides search service according to the first parameter threshold value of the target search parameter.
9. A system for determining parameter thresholds in a search service, wherein the system comprises a threshold server and a search server, wherein,
The threshold server is used for acquiring performance data of the search server in the process of providing search service in real time, processing the performance data to obtain the processed performance index, comparing the performance index with a preset performance index, generating a first parameter threshold of a target search parameter when the comparison result meets a preset condition, and transmitting the first parameter threshold of the target search parameter to the search server; the performance data is data representing the operation performance of the search server, and the performance indexes comprise indexes for evaluating the performance of the search server;
The search server is used for receiving a first parameter threshold value of the target search parameter; and responding to a search service providing request, and providing the search service according to a first parameter threshold value of the target search parameter.
10. A server comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, code set, or instruction set, the at least one instruction, the at least one program, the code set, or instruction set being loaded and executed by the processor to implement the method of determining a parameter threshold in a search service of any of the preceding claims 1-5.
11. A computer readable storage medium having stored therein at least one instruction, at least one program, a set of codes, or a set of instructions, the at least one instruction, the at least one program, the set of codes, or the set of instructions being loaded and executed by a processor to implement the method of determining a parameter threshold in a search service of any one of claims 1-5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910590186.3A CN112181755B (en) | 2019-07-02 | 2019-07-02 | Method for determining parameter threshold in search service and related equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910590186.3A CN112181755B (en) | 2019-07-02 | 2019-07-02 | Method for determining parameter threshold in search service and related equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112181755A CN112181755A (en) | 2021-01-05 |
CN112181755B true CN112181755B (en) | 2024-05-10 |
Family
ID=73914302
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910590186.3A Active CN112181755B (en) | 2019-07-02 | 2019-07-02 | Method for determining parameter threshold in search service and related equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112181755B (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103678624A (en) * | 2013-12-18 | 2014-03-26 | 百度在线网络技术(北京)有限公司 | Searching method, searching server, and searching request executing method and terminal |
CN106202581A (en) * | 2016-08-30 | 2016-12-07 | 北京奇艺世纪科技有限公司 | A kind of data search method and device |
CN109829098A (en) * | 2017-08-28 | 2019-05-31 | 广东神马搜索科技有限公司 | Search result optimization method, device and server |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7411957B2 (en) * | 2004-03-26 | 2008-08-12 | Cisco Technology, Inc. | Hardware filtering support for denial-of-service attacks |
-
2019
- 2019-07-02 CN CN201910590186.3A patent/CN112181755B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103678624A (en) * | 2013-12-18 | 2014-03-26 | 百度在线网络技术(北京)有限公司 | Searching method, searching server, and searching request executing method and terminal |
CN106202581A (en) * | 2016-08-30 | 2016-12-07 | 北京奇艺世纪科技有限公司 | A kind of data search method and device |
CN109829098A (en) * | 2017-08-28 | 2019-05-31 | 广东神马搜索科技有限公司 | Search result optimization method, device and server |
Also Published As
Publication number | Publication date |
---|---|
CN112181755A (en) | 2021-01-05 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106375420B (en) | Server cluster intelligent monitoring system and method based on load balancing | |
US8572621B2 (en) | Selection of server for relocation of application program based on largest number of algorithms with identical output using selected server resource criteria | |
CN109981744B (en) | Data distribution method and device, storage medium and electronic equipment | |
CN107656807B (en) | Automatic elastic expansion method and device for virtual resources | |
CN112751726B (en) | Data processing method and device, electronic equipment and storage medium | |
US10853372B1 (en) | Distributed pattern matching over streaming time series | |
US20150234883A1 (en) | Method and system for retrieving real-time information | |
CN107608781B (en) | Load prediction method, device and network element | |
CN111158999B (en) | Formatting time calculation method and device | |
CN105491079B (en) | The method and device of the required resource of adjustment application in cloud computing environment | |
CN113283502A (en) | Clustering-based equipment state threshold determining method and device | |
CN107193749B (en) | Test method, device and equipment | |
CN114281256A (en) | Data synchronization method, device, equipment and medium based on distributed storage system | |
CN112181755B (en) | Method for determining parameter threshold in search service and related equipment | |
US20140214826A1 (en) | Ranking method and system | |
CN112817719A (en) | Method, device and equipment for adjusting parameters of thread pool and readable storage medium | |
CN113448747B (en) | Data transmission method, device, computer equipment and storage medium | |
CN111506422B (en) | Event analysis method and system | |
CN110543509A (en) | Monitoring system, method and device for user access data and electronic equipment | |
CN115883376A (en) | Node dynamic capacity expansion method and system based on platform real-time access volume | |
US9052952B1 (en) | Adaptive backup model for optimizing backup performance | |
CN113032225B (en) | Monitoring data processing method, device and equipment of data center and storage medium | |
CN115525394A (en) | Method and device for adjusting number of containers | |
CN111598390B (en) | Method, device, equipment and readable storage medium for evaluating high availability of server | |
CN109684094B (en) | Load distribution method and system for parallel mining of massive documents in cloud platform environment |
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 |