CN109445934A - The distribution method and system of inquiry request - Google Patents

The distribution method and system of inquiry request Download PDF

Info

Publication number
CN109445934A
CN109445934A CN201811122388.7A CN201811122388A CN109445934A CN 109445934 A CN109445934 A CN 109445934A CN 201811122388 A CN201811122388 A CN 201811122388A CN 109445934 A CN109445934 A CN 109445934A
Authority
CN
China
Prior art keywords
processing server
server
inquiry request
address
target
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
CN201811122388.7A
Other languages
Chinese (zh)
Other versions
CN109445934B (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.)
Ping An Life Insurance Company of China Ltd
Original Assignee
Ping An Life Insurance Company of China 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 Ping An Life Insurance Company of China Ltd filed Critical Ping An Life Insurance Company of China Ltd
Priority to CN201811122388.7A priority Critical patent/CN109445934B/en
Publication of CN109445934A publication Critical patent/CN109445934A/en
Application granted granted Critical
Publication of CN109445934B publication Critical patent/CN109445934B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer And Data Communications (AREA)

Abstract

The present invention is suitable for field of communication technology, provides the distribution method and system of a kind of inquiry request, determines target ip address according to the inquiry request that user inputs by terminal device, and inquiry request is sent to the corresponding distribution server of target ip address;Distribution server passes through preset load-balancing algorithm, the selected target processing server from multiple processing servers, if target processing server does not overload, inquiry request is then sent to by target processing server by distribution server, to analyze inquiry request, if target processing server overloads, a processing server then inquiry request being sent to except target processing server, to improve reasonability during distributing inquiry request, the more efficient computing resource using each processing server.

Description

The distribution method and system of inquiry request
Technical field
The invention belongs to field of communication technology more particularly to the distribution methods and system of a kind of inquiry request.
Background technique
In distributed inquiry system, the processing capacity for the server that each pair of inquiry request is handled is limited , if inquiry request is excessive, have exceeded the processing capacity of the server, it is likely that data jamming and inquiry request occur The case where being retired, to influence the normal operation and treatment effeciency of whole system.
In order to which the resource preferably to each server is rationally utilized, existing load-balancing technique is often based on Fixed server search order is preset to be allocated inquiry request, even if encountering the busy situation of processing server, and Corresponding request is forwarded in the backup server predefined.But existing load-balancing technique matching for resource It sets process more to ossify, due to not considering the actual conditions of system operation, the assigning process of entire resource is not most Excellent, there is the case where request unreasonable distribution still in inquiry business, it is lower to result in system treatment effeciency.
Summary of the invention
In view of this, the embodiment of the invention provides a kind of distribution method of inquiry request and system, to solve existing skill Art there is a problem of lower in the presence of the system treatment effeciency as caused by request unreasonable distribution in inquiry business.
The first aspect of the embodiment of the present invention provides a kind of distribution method of inquiry request, comprising:
Terminal device determines target ip address according to the inquiry request that user inputs, and the inquiry request is sent to described The corresponding distribution server of target ip address;
The distribution server is by preset load-balancing algorithm, the selected target from preset processing server set Processing server, the processing server in the processing server set are used for after analyzing the inquiry request, obtain To the data of user query;
If the target processing server does not overload, the inquiry request is sent to the mesh by the distribution server Mark processing server;
If the target processing server overload, the distribution server select one from the processing server set A above back-up processing server, and the inquiry request is arbitrarily sent to one of them described back-up processing server, The back-up processing server is the processing server in addition to the target processing server.
The second aspect of the embodiment of the present invention provides a kind of distribution system of inquiry request, including terminal device, distribution Server and processing server;
The terminal device, the inquiry request for being inputted according to user determine target ip address, by the inquiry request It is sent to the corresponding distribution server of the target ip address;
The distribution server, for being selected from preset processing server set by preset load-balancing algorithm Set the goal processing server, the processing server in the processing server set, and the processing server is used for described After inquiry request is analyzed, the data of user query are obtained;
If the target processing server does not overload, the inquiry request is sent to the mesh by the distribution server Mark processing server;
If the target processing server overload, the distribution server select one from the processing server set A above back-up processing server, and the inquiry request is arbitrarily sent to one of them described back-up processing server, The back-up processing server is the processing server in addition to the target processing server.
In embodiments of the present invention, target ip address is determined according to the inquiry request that user inputs by terminal device, and Inquiry request is sent to the corresponding distribution server of target ip address;Distribution server passes through preset load-balancing algorithm, The selected target processing server from multiple processing servers passes through distribution service if target processing server does not overload Inquiry request is sent to target processing server by device, to analyze inquiry request, if target processing server overloads, Inquiry request is then sent to a processing server except target processing server, to improve in distribution inquiry request process In reasonability, the more efficient computing resource using each processing server.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only of the invention some Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these Attached drawing obtains other attached drawings.
Fig. 1 is the implementation flow chart of the distribution method of inquiry request provided in an embodiment of the present invention;
Fig. 2 is the specific implementation flow chart of the distribution method S101 of inquiry request provided in an embodiment of the present invention;
Fig. 3 is the specific implementation flow chart of the distribution method S102 of inquiry request provided in an embodiment of the present invention;
Fig. 4 is the system interaction figure of the distribution system of inquiry request provided in an embodiment of the present invention.
Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposed Body details, to understand thoroughly the embodiment of the present invention.However, it will be clear to one skilled in the art that there is no these specific The present invention also may be implemented in the other embodiments of details.In other situations, it omits to well-known system, device, electricity The detailed description of road and method, in case unnecessary details interferes description of the invention.
In order to illustrate technical solutions according to the invention, the following is a description of specific embodiments.
Fig. 1 shows the implementation process of the distribution method of inquiry request provided in an embodiment of the present invention, this method process packet Include step S101 to S105.The specific implementation principle of each step is as follows.
S101: terminal device determines target ip address according to the inquiry request that user inputs, and the inquiry request is sent To the corresponding distribution server of the target ip address.
In embodiments of the present invention, inquiry request can be handled in the assignment procedure by three ends, this three end is respectively as follows: Terminal device, distribution server and processing server.Wherein, terminal device is used to receive the inquiry request of user's input, and Determine suitable distribution server;Distribution server is used for the operating condition according to each processing server, by inquiry request point It is assigned to each processing server;Processing server is used to carry out calculating analysis to inquiry request, generates what user wished to inquire Various types of data.
In embodiments of the present invention, there are multiple distribution servers, so first step of the embodiment of the present invention is exactly A distribution server appropriate is determined by inquiry request, thus in subsequent steps, is conducive to fast and accurately to looking into Request is ask to be allocated.
As an embodiment of the present invention, as shown in Fig. 2, above-mentioned S101 includes:
S1011 extracts the inquiry content for including in the inquiry request, and passes through preset script to the inquiry content Component carries out word segmentation processing, obtains more than one query word.
In embodiments of the present invention, inquiry content can be a word and be also possible to the sentence being made of multiple words, In order to more accurately analyze the feature of inquiry content, need to carry out word segmentation processing to inquiry content.
Word segmentation processing is carried out to inquiry content by jieba participle packet, obtains more than one query word.
S1012 transfers preset multiple IP address, and according to the corresponding relationship of preset IP address and set of words, will It include the quantity of the query word in the corresponding set of words of each IP address, as the corresponding search number of each IP address Amount.
In embodiments of the present invention, there can be multiple, each distribution to the distribution server that inquiry request is allocated Server all corresponds to an IP address, each IP address corresponds to a set of words.The corresponding set of words of IP address is Engineer is preset, for embody the corresponding distribution server of each IP address be good at calculating and distribute which kind of inquiry ask It asks.So by calculating the quantity comprising query word in the corresponding set of words of each IP address, with can reflect out which IP The corresponding distribution server in location is more suitable for being allocated inquiry request.Include in the corresponding set of words of one IP address looks into The quantity for asking word is higher, it was demonstrated that the degree of correlation of the corresponding distribution server of the IP address and inquiry request is bigger, more suitable to looking into Request is ask to be allocated.
S1013, if in the corresponding number of searches of each IP address only one number of searches maximum value, by institute The corresponding IP address of maximum value of number of searches is stated as target ip address.
Such case occur when, only one uniquely with the maximum IP address of the degree of correlation of inquiry request, so handle The IP address is as target ip address.
S1014 will be described if there is the maximum value of multiple number of searches in the corresponding number of searches of each IP address The corresponding IP address of the maximum value of number of searches is as candidate IP address.
When such case occurs, there is multiple and inquiry request the degree of correlation maximum IP address side by side, so also needing Further screening process, could maximum IP address be with determining Target IP side by side from these degrees of correlation with inquiry request Location.
S1015 calculates the routing node quantity between the terminal device and each candidate IP address, any to select The corresponding IP address of one the smallest routing node quantity is as target ip address.
By traceroute order can controlling terminal equipment calculate the road between terminal device and candidate IP address By number of nodes.
In embodiments of the present invention, pass through point of IP address and the corresponding set of words of IP address to distribution server Analysis can specify a distribution server appropriate for inquiry request, to more quickly and accurately realize for inquiry request Distribution.
S102: the distribution server is selected from preset processing server set by preset load-balancing algorithm Set the goal processing server, and the processing server in the processing server set to the inquiry request for analyzing Afterwards, the data of user query are obtained.
It in embodiments of the present invention, can be according in processing server set after distribution server receives inquiry request The loading condition of each processing server, dynamically distributes inquiry request.
As an embodiment of the present invention, as shown in figure 3, above-mentioned S102 includes:
S1021 counts the distribution server within a preset period of time, and each processing server received is retracted Inquiry request quantity, retract numerical value as each processing server is corresponding.
Notably, when a processing server in preset processing server set goes out for an inquiry request When now processing is abnormal, the inquiry request will be returned to distribution server.Under normal circumstances, a processing service When device overloads, the probability for occurring retracting inquiry request is higher.But a processing server is not when overloading, it is also possible to move back The case where returning inquiry request, a processing server overload, is also not meant to be bound to retract inquiry request, can only incite somebody to action The inquiry request received afterwards deposits in waiting queue or buffer area, at after a period of time again to the inquiry request Reason.
S1022 transfers the corresponding capability value of each processing server in the processing server set, and according to the place The corresponding capability value of reason server and it is described retract numerical value, calculate the corresponding best forwarding of each processing server Ratio, the capability value indicate the processing server for inquiry request synchronization maximum processing limit, it is described most Good forwarding ratio is used to indicate the distribution server theoretically and should distribute inquiry request best to each processing server Ratio.
In embodiments of the present invention, the capability value of processing server indicates that the processing server can be located at the same moment The maximum value of the inquiry request of reason may cause when the inquiry request that a processing server receives exceeds the capability value Two class problems, first, since the inquiry request needs newly received are temporarily stored into waiting queue or buffer area, so influencing newly to connect The processing speed of the inquiry request received;Second, processing server will appear the case where handling abnormal increase under undesirably heavy loads, This may cause the exception of the processing to the inquiry request newly received, to retract the inquiry request showing to distribution server As.
Based on the above issues, so the embodiment of the present invention proposes a kind of load-balancing algorithm, and according to the load balancing Algorithm is by inquiry request reasonable distribution to each processing server.In this load-balancing algorithm, need to calculate first best Forwarding ratio, the best forwarding ratio should distribute inquiry request for indicating the distribution server theoretically to each place Manage the optimal proportion of server.
It is described according to the corresponding capability value of the processing server and it is described retract numerical value, calculate each place Manage the corresponding best forwarding ratio of server, comprising:
Pass through formula:Theoretical retransmitting paramater is calculated, The K (i) indicates the corresponding theoretical retransmitting paramater of processing server i, and the Z (i) indicates the corresponding appearance of processing server i Magnitude, the DEV (i) indicate that processing server i retracts numerical value described in corresponding.
By above-mentioned formula, it can select correspond to respectively according to three kinds of situations for retracting numerical value of a processing server Assignment subformula.In general, the corresponding theoretical retransmitting paramater of numerical value of retracting of a processing server is negatively correlated Relationship.
The sum of corresponding described retransmitting paramater of whole processing server in the processing server set is calculated, as parameter Summation, and the ratio of the corresponding retransmitting paramater of the processing server Yu the parameter summation is calculated, it is serviced as the processing The corresponding best forwarding ratio of device.
S1023 is calculated in the preset time period, and each processing server is corresponding in the processing server set It is practical to receive ratio;The practical ratio that receives indicates that in the preset time period, what the processing server received looks into The ratio of the total amount for the inquiry request that the quantity and the distribution server for asking request are sent.
Illustratively, it is assumed that the total amount for the inquiry request that distribution server is sent within a preset period of time is 10000, and is located The inquiry request quantity that reason server A receives is 200, then the practical reception ratio of processing server A is 2%.
S1024 calculates the corresponding best forwarding ratio of each processing server and subtracts the practical reception ratio The difference of example, as the corresponding error rate of each processing server.
Illustratively, it is assumed that the best forwarding ratio of processing server A is 3%, the best forwarding ratio of processing server B It is 5%, the best forwarding ratio of processing server C is 10%.In addition, the practical reception ratio of processing server A is 4%, place The practical reception ratio for managing server B is 2%, and the practical reception ratio of processing server C is 9%, then by calculating each place The corresponding best forwarding ratio of reason server subtracts the practical difference for receiving ratio, corresponding as each processing server Error rate, the error rate that can be processed server A is -1%, and the error rate of processing server B is 3%, processing The error rate of server C is 1%.
S1025, the arbitrarily corresponding processing server of the maximum error rate of selection one, as target processing Server.
Illustratively, it is assumed that the error rate of processing server A is -1%, and the error rate of processing server B is 3%, The error rate of processing server C is 1%, then since the error rate of processing server B is maximum, so by processing server B As target processing server.
S103, judges whether the destination server overloads.
As described above, although a processing server overloads, the probability for occurring retracting inquiry request is higher.But When one processing server does not overload, it is also possible to the case where retracting inquiry request occur, a processing server overloads, also not Mean to be bound to retract inquiry request.So also needing further to judge whether target processing server overloads.
The distribution server sends inquiry message to the target processing server;The target processing server is connecing After receiving the inquiry message, Xiang Suoshu distribution server, which returns, replies message, identify comprising overload in the answers message or Do not overload mark;The distribution server judges whether the target processing server overloads according to the answer message.
S104, if the target processing server does not overload, the inquiry request is sent to by the distribution server The target processing server.
S105, if the target processing server overloads, the distribution server is from the processing server set More than one back-up processing server is selected, and the inquiry request is arbitrarily sent to one of them described back-up processing and is taken Business device, the back-up processing server are the processing server in addition to the target processing server.
By in addition to the target processing server, the numerical value of retracting is present count in the processing server set The processing server of value sends inquiry message as candidate processes server, and to each candidate processes server;According to The overload mark for including in the answer message that the candidate processes server returns or the mark that do not overload, judge each candidate Whether processing server overloads;The candidate processes server not overloaded is chosen to be back-up processing server.
In embodiments of the present invention, target ip address is determined according to the inquiry request that user inputs by terminal device, and Inquiry request is sent to the corresponding distribution server of target ip address;Distribution server passes through preset load-balancing algorithm, The selected target processing server from multiple processing servers passes through distribution service if target processing server does not overload Inquiry request is sent to target processing server by device, to analyze inquiry request, if target processing server overloads, Inquiry request is then sent to a processing server except target processing server, to improve in distribution inquiry request process In reasonability, the more efficient computing resource using each processing server.
Corresponding to the distribution method of inquiry request described in foregoing embodiments, Fig. 4 shows provided in an embodiment of the present invention The system interaction figure of the distribution system of inquiry request, for ease of description, only parts related to embodiments of the present invention are shown.
Referring to Fig. 4, the distribution system of the inquiry request includes: terminal device 401, distribution server 402 and processing clothes Business device 403,
Terminal device, the inquiry request for being inputted according to user determine target ip address, and the inquiry request is sent To the corresponding distribution server of the target ip address;
The distribution server, for being selected from preset processing server set by preset load-balancing algorithm Set the goal processing server, and the processing server in the processing server set to the inquiry request for analyzing Afterwards, the data of user query are obtained;
If the target processing server does not overload, the inquiry request is sent to the mesh by the distribution server Mark processing server;
If the target processing server overload, the distribution server select one from the processing server set A above back-up processing server, and the inquiry request is arbitrarily sent to one of them described back-up processing server, The back-up processing server is the processing server in addition to the target processing server.
It is described that target ip address is determined according to the inquiry request, comprising:
Extract the inquiry content for including in the inquiry request, and to the inquiry content by preset script component into Row word segmentation processing obtains more than one query word;
Preset multiple IP address are transferred, and according to the corresponding relationship of preset IP address and set of words, by each IP It include the quantity of the query word in the corresponding set of words in address, as the corresponding number of searches of each IP address;
If the maximum value of only one number of searches in the corresponding number of searches of each IP address, by described search The corresponding IP address of the maximum value of quantity is as target ip address;
If having the maximum value of multiple number of searches in the corresponding number of searches of each IP address, by described search number The corresponding IP address of the maximum value of amount is as candidate IP address;
The routing node quantity between the terminal device and each candidate IP address is calculated, any selection one is most The small corresponding IP address of routing node quantity is as target ip address.
It is described by preset load-balancing algorithm, the selected target processing service from preset processing server set Device, comprising:
Count the distribution server within a preset period of time, the inquiry that each processing server received is retracted The quantity of request retracts numerical value as each processing server is corresponding;
The corresponding capability value of each processing server in the processing server set is transferred, and is serviced according to the processing The corresponding capability value of device and it is described retract numerical value, calculate the corresponding best forwarding ratio of each processing server, The capability value indicates maximum processing limit of the processing server for inquiry request in synchronization, the best forwarding Ratio should distribute inquiry request for indicating the distribution server theoretically to the optimal proportion of each processing server;
It calculates in the preset time period, each processing server is corresponding in the processing server set actually connects Receipts ratio;The reality receives ratio and indicates in the preset time period, the inquiry request that the processing server receives Quantity and the distribution server send inquiry request total amount ratio;
It calculates the corresponding best forwarding ratio of each processing server and subtracts the practical difference for receiving ratio Value, as the corresponding error rate of each processing server;
The arbitrarily corresponding processing server of the maximum error rate of selection one, services as target processing Device.
It is described according to the corresponding capability value of the processing server and it is described retract numerical value, calculate each place Manage the corresponding best forwarding ratio of server, comprising:
Pass through formula:Theoretical retransmitting paramater is calculated, The K (i) indicates the corresponding theoretical retransmitting paramater of processing server i, and the Z (i) indicates the corresponding appearance of processing server i Magnitude, the DEV (i) indicate that processing server i retracts numerical value described in corresponding;
The sum of corresponding described retransmitting paramater of whole processing server in the processing server set is calculated, as parameter Summation, and the ratio of the corresponding retransmitting paramater of the processing server Yu the parameter summation is calculated, it is serviced as the processing The corresponding best forwarding ratio of device.
Described after selected target processing server in preset processing server set, further includes:
The distribution server sends inquiry message to the target processing server;
For the target processing server after receiving the inquiry message, Xiang Suoshu distribution server, which returns, replies report Text includes overload mark or the mark that do not overload in the answer message;
The distribution server judges whether the target processing server overloads according to the answer message.
It is described that back-up processing server is selected from the processing server set, comprising:
By in addition to the target processing server, the numerical value of retracting is present count in the processing server set The processing server of value sends inquiry message as candidate processes server, and to each candidate processes server;
The overload mark for including in the answer message returned according to the candidate processes server or the mark that do not overload, judgement Whether each candidate processes server overloads;
The candidate processes server not overloaded is chosen to be back-up processing server.
In embodiments of the present invention, by obtaining the policy information of declaration form to be allocated and the threshold of making loans of each risk-bearing entity Value;The ratio for calculating the accumulative amount of making loans of each risk-bearing entity within a preset period of time with threshold value of making loans, as the ratio of making loans;It will The risk-bearing entity that ratio of making loans is less than preset ratio threshold value is included into first and accepts group, conversely, then by risk-bearing entity be included into second by Reason group;According to policy information, the declaration form classification of declaration form to be allocated is determined;If first, which accepts interior be not present of group, processes guarantor to be allocated The risk-bearing entity of single declaration form classification, the then risk-bearing entity that the declaration form classification that declaration form to be allocated is processed in group is accepted second are made It for candidate unit, and distributes into candidate unit a minimum risk-bearing entity of ratio of making loans declaration form to be allocated, is protected with improving The resonable degree and the degree of automation singly distributed.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different Functional unit, module are completed, i.e., the internal structure of described device is divided into different functional unit or module, more than completing The all or part of function of description.Each functional unit in embodiment, module can integrate in one processing unit, can also To be that each unit physically exists alone, can also be integrated in one unit with two or more units, it is above-mentioned integrated Unit both can take the form of hardware realization, can also realize in the form of software functional units.In addition, each function list Member, the specific name of module are also only for convenience of distinguishing each other, the protection scope being not intended to limit this application.Above system The specific work process of middle unit, module, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment The part of load may refer to the associated description of other embodiments.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme 's.
If the integrated module/unit be realized in the form of SFU software functional unit and as independent product sale or In use, can store in a computer readable storage medium.Based on this understanding, the present invention realizes above-mentioned implementation All or part of the process in example method, can also instruct relevant hardware to complete, the meter by computer program Calculation machine program can be stored in a computer readable storage medium.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all It is included within protection scope of the present invention.

Claims (10)

1. a kind of distribution method of inquiry request characterized by comprising
Terminal device determines target ip address according to the inquiry request that user inputs, and the inquiry request is sent to the target The corresponding distribution server of IP address;
The distribution server is by preset load-balancing algorithm, and selected target is handled from preset processing server set Server, the processing server in the processing server set are used for after analyzing the inquiry request, are used The data of family inquiry;
If the target processing server does not overload, the inquiry request is sent at the target by the distribution server Manage server;
If target processing server overload, the distribution server selected from the processing server set one with On back-up processing server, and the inquiry request is arbitrarily sent to one of them described back-up processing server, it is described Back-up processing server is the processing server in addition to the target processing server.
2. the distribution method of inquiry request as described in claim 1, which is characterized in that described to be determined according to the inquiry request Target ip address, comprising:
The inquiry content for including in the inquiry request is extracted, and the inquiry content is divided by preset script component Word processing, obtains more than one query word;
Preset multiple IP address are transferred, and according to the corresponding relationship of preset IP address and set of words, by each IP address It include the quantity of the query word in corresponding set of words, as the corresponding number of searches of each IP address;
If the maximum value of only one number of searches in the corresponding number of searches of each IP address, by described search quantity The corresponding IP address of maximum value as target ip address;
If having the maximum value of multiple number of searches in the corresponding number of searches of each IP address, by described search quantity The corresponding IP address of maximum value is as candidate IP address;
The routing node quantity between the terminal device and each candidate IP address is calculated, any selection is one the smallest The corresponding IP address of routing node quantity is as target ip address.
3. the distribution method of inquiry request as described in claim 1, which is characterized in that described to be calculated by preset load balancing Method, the selected target processing server from preset processing server set, comprising:
Count the distribution server within a preset period of time, the inquiry request that each processing server received is retracted Quantity, retract numerical value as each processing server is corresponding;
The corresponding capability value of each processing server in the processing server set is transferred, and according to the processing server pair The capability value answered and it is described retract numerical value, calculate the corresponding best forwarding ratio of each processing server, it is described Capability value indicates maximum processing limit of the processing server for inquiry request in synchronization, the best forwarding ratio For indicating that the distribution server should distribute inquiry request to the optimal proportion of each processing server;
It calculates in the preset time period, the corresponding practical reception ratio of each processing server in the processing server set Example;The practical ratio that receives indicates the number for the inquiry request that the processing server receives in the preset time period The ratio of the total amount for the inquiry request that amount is sent with the distribution server;
It calculates the corresponding best forwarding ratio of each processing server and subtracts the practical difference for receiving ratio, make For the corresponding error rate of each processing server;
The arbitrarily corresponding processing server of the maximum error rate of selection one, as the target processing server.
4. the distribution method of inquiry request as claimed in claim 3, which is characterized in that described according to the processing server pair The capability value answered and it is described retract numerical value, calculate the corresponding best forwarding ratio of each processing server, comprising:
Pass through formula:Calculate theoretical retransmitting paramater, the K (i) the corresponding theoretical retransmitting paramater of processing server i is indicated, the Z (i) indicates the corresponding capability value of processing server i, The DEV (i) indicates that processing server i retracts numerical value described in corresponding;
The sum of corresponding described retransmitting paramater of whole processing server in the processing server set is calculated, it is total as parameter With, and the ratio of the corresponding retransmitting paramater of the processing server Yu the parameter summation is calculated, as the processing server The corresponding best forwarding ratio.
5. the distribution method of inquiry request as described in claim 1, which is characterized in that described from preset processing server In set after selected target processing server, further includes:
The distribution server sends inquiry message to the target processing server;
For the target processing server after receiving the inquiry message, Xiang Suoshu distribution server, which returns, replies message, institute It states and replies in message comprising overload mark or the mark that do not overload;
The distribution server judges whether the target processing server overloads according to the answer message.
6. the distribution method of inquiry request as claimed in claim 3, which is characterized in that described from the processing server set Middle selection back-up processing server, comprising:
By in addition to the target processing server, the numerical value of retracting is default value in the processing server set Processing server sends inquiry message as candidate processes server, and to each candidate processes server;
The overload mark for including in the answer message returned according to the candidate processes server or the mark that do not overload, judge each Whether the candidate processes server overloads;
The candidate processes server not overloaded is chosen to be back-up processing server.
7. a kind of distribution system of inquiry request, which is characterized in that including terminal device, distribution server and processing service Device;
The terminal device, the inquiry request for being inputted according to user determine target ip address, and the inquiry request is sent To the corresponding distribution server of the target ip address;
The distribution server, for selecting mesh from preset processing server set by preset load-balancing algorithm Processing server, the processing server in the processing server set are marked, the processing server is used for the inquiry After request is analyzed, the data of user query are obtained;
If the target processing server does not overload, the inquiry request is sent at the target by the distribution server Manage server;
If target processing server overload, the distribution server selected from the processing server set one with On back-up processing server, and the inquiry request is arbitrarily sent to one of them described back-up processing server, it is described Back-up processing server is the processing server in addition to the target processing server.
8. the distribution system of inquiry request as claimed in claim 7, which is characterized in that described to be determined according to the inquiry request Target ip address, comprising:
The inquiry content for including in the inquiry request is extracted, and the inquiry content is divided by preset script component Word processing, obtains more than one query word;
Preset multiple IP address are transferred, and according to the corresponding relationship of preset IP address and set of words, by each IP address It include the quantity of the query word in corresponding set of words, as the corresponding number of searches of each IP address;
If the maximum value of only one number of searches in the corresponding number of searches of each IP address, by described search quantity The corresponding IP address of maximum value as target ip address;
If having the maximum value of multiple number of searches in the corresponding number of searches of each IP address, by described search quantity The corresponding IP address of maximum value is as candidate IP address;
The routing node quantity between the terminal device and each candidate IP address is calculated, any selection is one the smallest The corresponding IP address of routing node quantity is as target ip address.
9. the distribution system of inquiry request as claimed in claim 7, which is characterized in that described to be calculated by preset load balancing Method, the selected target processing server from preset processing server set, comprising:
Count the distribution server within a preset period of time, the inquiry request that each processing server received is retracted Quantity, retract numerical value as each processing server is corresponding;
The corresponding capability value of each processing server in the processing server set is transferred, and according to the processing server pair The capability value answered and it is described retract numerical value, calculate the corresponding best forwarding ratio of each processing server, it is described Capability value indicates maximum processing limit of the processing server for inquiry request in synchronization, the best forwarding ratio Inquiry request should be distributed for indicating the distribution server theoretically to the optimal proportion of each processing server;
It calculates in the preset time period, the corresponding practical reception ratio of each processing server in the processing server set Example;The practical ratio that receives indicates the number for the inquiry request that the processing server receives in the preset time period The ratio of the total amount for the inquiry request that amount is sent with the distribution server;
It calculates the corresponding best forwarding ratio of each processing server and subtracts the practical difference for receiving ratio, make For the corresponding error rate of each processing server;
The arbitrarily corresponding processing server of the maximum error rate of selection one, as the target processing server.
10. the distribution system of inquiry request as claimed in claim 9, which is characterized in that described according to the processing server The corresponding capability value and it is described retract numerical value, calculate the corresponding best forwarding ratio of each processing server, packet It includes:
Pass through formula:Calculate theoretical retransmitting paramater, the K (i) the corresponding theoretical retransmitting paramater of processing server i is indicated, the Z (i) indicates the corresponding capability value of processing server i, The DEV (i) indicates that processing server i retracts numerical value described in corresponding;
The sum of corresponding described retransmitting paramater of whole processing server in the processing server set is calculated, it is total as parameter With, and the ratio of the corresponding retransmitting paramater of the processing server Yu the parameter summation is calculated, as the processing server The corresponding best forwarding ratio.
CN201811122388.7A 2018-09-26 2018-09-26 Query request distribution method and system Active CN109445934B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811122388.7A CN109445934B (en) 2018-09-26 2018-09-26 Query request distribution method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811122388.7A CN109445934B (en) 2018-09-26 2018-09-26 Query request distribution method and system

Publications (2)

Publication Number Publication Date
CN109445934A true CN109445934A (en) 2019-03-08
CN109445934B CN109445934B (en) 2024-03-29

Family

ID=65544464

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811122388.7A Active CN109445934B (en) 2018-09-26 2018-09-26 Query request distribution method and system

Country Status (1)

Country Link
CN (1) CN109445934B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102438278A (en) * 2011-12-21 2012-05-02 优视科技有限公司 Load allocation method and device for mobile communication network
CN104375992A (en) * 2013-08-12 2015-02-25 中国移动通信集团浙江有限公司 Address matching method and device
US20160127256A1 (en) * 2014-11-03 2016-05-05 Facebook, Inc. Load balancing for multi-tiered querying
CN106708826A (en) * 2015-07-30 2017-05-24 中兴通讯股份有限公司 Data processing method and apparatus, and data query method and apparatus
CN106815059A (en) * 2016-12-31 2017-06-09 广州勤加缘科技实业有限公司 Linux virtual server LVS automates O&M method and operational system

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102438278A (en) * 2011-12-21 2012-05-02 优视科技有限公司 Load allocation method and device for mobile communication network
CN104375992A (en) * 2013-08-12 2015-02-25 中国移动通信集团浙江有限公司 Address matching method and device
US20160127256A1 (en) * 2014-11-03 2016-05-05 Facebook, Inc. Load balancing for multi-tiered querying
CN106708826A (en) * 2015-07-30 2017-05-24 中兴通讯股份有限公司 Data processing method and apparatus, and data query method and apparatus
CN106815059A (en) * 2016-12-31 2017-06-09 广州勤加缘科技实业有限公司 Linux virtual server LVS automates O&M method and operational system

Also Published As

Publication number Publication date
CN109445934B (en) 2024-03-29

Similar Documents

Publication Publication Date Title
US6748414B1 (en) Method and apparatus for the load balancing of non-identical servers in a network environment
CN102281190B (en) Networking method for load balancing apparatus, server and client access method
CN109218355A (en) Load equalizing engine, client, distributed computing system and load-balancing method
CN103401947A (en) Method and device for allocating tasks to multiple servers
CN107087014B (en) Load balancing method and controller thereof
JP6062034B2 (en) Processing control system, processing control method, and processing control program
US7769032B1 (en) Topology split manager using graph contraction
US8862775B2 (en) Network server and load balancing routing method for networks thereof
EP1472846A1 (en) Method and apparatus for web farm traffic control
CN110365748A (en) Treating method and apparatus, storage medium and the electronic device of business datum
CN109831524A (en) A kind of load balance process method and device
US20040098499A1 (en) Load balancing system
JP2016046736A (en) Service chaining system, service chaining forwarder device, and service chaining method
JP6131203B2 (en) Device selection network system, device selection server and program
CN105872082B (en) Fine granularity resource response system based on container cluster load-balancing algorithm
EP1515499A1 (en) System and method for routing network traffic
US8443372B2 (en) Methods and systems for partitioning data in parallel processing systems
US7647592B2 (en) Methods and systems for assigning objects to processing units
CN109445934A (en) The distribution method and system of inquiry request
CN101986627B (en) Method, device and equipment for balancing loads
CN105335376A (en) Stream processing method, device and system
CN111447282B (en) Method and device for determining transmission path
CN108200185A (en) A kind of method and device for realizing load balancing
KR100663579B1 (en) Device to collect real-time data of performance for ATM network on high speed information telecommunication network and method thereof
CN111818134A (en) Data transmission method and device based on fog calculation in substation data center

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