CN109981815A - Selection method, terminal, server and the system of IP address - Google Patents
Selection method, terminal, server and the system of IP address Download PDFInfo
- Publication number
- CN109981815A CN109981815A CN201910210605.6A CN201910210605A CN109981815A CN 109981815 A CN109981815 A CN 109981815A CN 201910210605 A CN201910210605 A CN 201910210605A CN 109981815 A CN109981815 A CN 109981815A
- Authority
- CN
- China
- Prior art keywords
- address
- round
- trip delay
- application program
- configuration information
- 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
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0852—Delays
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/50—Address allocation
- H04L61/5092—Address allocation by self-assignment, e.g. picking addresses at random and testing if they are already in use
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
The invention discloses a kind of selection method of IP address, the selection method of the IP address is the following steps are included: send probe requests thereby to the corresponding each IP address of application program, to obtain the round-trip delay of each IP address;When getting the round-trip delay of each IP address, the round-trip delay correction value of each IP address is obtained, and is modified according to round-trip delay of the round-trip delay correction value to each IP address;Set the revised the smallest IP address of round-trip delay to the access IP address of the application program.The invention also discloses the selection systems of a kind of terminal, server and IP address.Due to can each IP address corresponding to application program preset round-trip delay correction value, be adjusted by the IP that round-trip delay correction value accesses terminal, improve the utilization rate of idle IP, reduce operating cost.
Description
Technical field
The present invention relates to the selection method of field of communication technology more particularly to IP address, terminal, server and systems.
Background technique
With the development of network application, the amount of access of network application is increasing, in order to meet growing access need
It asks, often network application is configured to multiple Internet data centers (Internet Data Center, IDC), it is therefore, same
Web application is corresponding with multiple addresses ID.
Currently, client can according to the round-trip delay of the corresponding each IP address of application program (Round-Trip Time,
RTT) come select connection IP address, i.e., by each IP address send probe requests thereby, obtain the RTT of each IP address, so
Afterwards set the smallest IP address of RTT to the IP address of connection.However, will cause according to the IP address of RTT selection access merely
Single ip address access amount is excessive and situation that other IP address are idle, increases operating cost.
Above content is only used to facilitate the understanding of the technical scheme, and is not represented and is recognized that above content is existing skill
Art.
Summary of the invention
The main purpose of the present invention is to provide a kind of selection method of the IP address of IP address, terminal, server and it is
It unites, it is intended to solve to will cause single ip address access amount excessively and it according to the IP address of round-trip delay selection access merely at present
The idle situation of his IP address, the technical issues of increasing operating cost.
To achieve the above object, the present invention provides a kind of selection method of IP address, the selection method packet of the IP address
Include following steps:
Probe requests thereby is sent to the corresponding each IP address of application program, to obtain the round-trip delay of each IP address;
When getting the round-trip delay of each IP address, the round-trip delay amendment of each IP address is obtained
Value, and be modified according to round-trip delay of the round-trip delay correction value to each IP address;
Set the revised the smallest IP address of round-trip delay to the access IP address of the application program.
Preferably, the selection method of the IP address further include:
To server sending application program IP address configuration information acquisition request;
In the application program IP address configuration information for receiving server feedback, by the IP address configuration information and institute
State application program associated storage, wherein the application program IP address configuration information includes that the application program is corresponding each
The round-trip delay correction value of IP address and each IP address.
Preferably, described when getting the round-trip delay of each IP address, obtain the past of each IP address
Return time delay correction value, and the step of being modified according to round-trip delay of the round-trip delay correction value to each IP address
Later, further includes:
The round-trip delay of each IP address is sent to the server, for applying described in the server statistics
The round-trip delay of the corresponding each IP address of program is distributed.
In addition, in order to achieve the above object, the present invention also provides a kind of selection method of IP address, the selection of the IP address
Method the following steps are included:
When receiving the application program IP address configuration information acquisition request of terminal transmission, the application program IP is obtained
The corresponding application program of address configuration information acquisition request;
Obtain the corresponding IP address configuration information of the application program, wherein the IP address configuration information includes described
The corresponding each IP address of application program and the corresponding round-trip delay correction value of each IP address;
The corresponding IP address configuration information of the application program is sent to the terminal.
Preferably, described the step of obtaining the application program corresponding IP address configuration information, includes:
Obtain the ID of the terminal;
Hash calculation is carried out to the ID of the terminal, obtains corresponding number;
Obtain the corresponding IP address configuration information in digital section locating for the number.
Preferably, the ID to the terminal carries out Hash calculation, and the step for obtaining corresponding number includes:
MD5 calculating is carried out to the ID of the terminal, obtains the corresponding summary info of the ID;
The ordered series of numbers for obtaining presetting digit capacity in the summary info converts the ordered series of numbers of the presetting digit capacity with hexadecimal
To ten's digit.
In addition, in order to achieve the above object, the present invention also provides a kind of terminal, the terminal include: memory, processor and
It is stored in the option program for the IP address that can be run on the memory and on the processor, the selection journey of the IP address
The step of selection method for the IP address that as above any one is applied to terminal is realized when sequence is executed by the processor.
In addition, in order to achieve the above object, the terminal includes: memory, processor the present invention also provides a kind of server
And it is stored in the option program for the IP address that can be run on the memory and on the processor, the selection of the IP address
As above step of any one applied to the selection method of the IP address of server is realized when program is executed by the processor
Suddenly.
In addition, in order to achieve the above object, the present invention also provides a kind of selection system of IP address, the selection of the IP address
System includes terminal as described above and server as described above, wherein the quantity of the terminal is at least one.
Selection method, terminal, server and the system for a kind of IP address that the embodiment of the present invention proposes, terminal need to access
When application program, probe requests thereby is sent to the corresponding each IP address of application program, to obtain the round-trip delay of each IP address,
When getting the round-trip delay of each IP address, the round-trip delay correction value of each IP address of acquisition, and according to
The round-trip delay correction value is modified the round-trip delay of each IP address, most by the revised round-trip delay
Small IP address is set as the access IP address of the application program.Due to can each IP address corresponding to application program it is preparatory
Round-trip delay correction value is set, is adjusted by the IP that round-trip delay correction value accesses terminal, the utilization of idle IP is improved
Rate reduces operating cost.
Detailed description of the invention
Fig. 1 is the system architecture schematic diagram that invention this embodiment scheme is related to;
Fig. 2 is the running environment structural schematic diagram for the terminal that the embodiment of the present invention is related to;
Fig. 3 is the running environment structural schematic diagram for the server that the embodiment of the present invention is related to;
Fig. 4 is the flow diagram of the selection method first embodiment of IP address of the present invention;
Fig. 5 is the flow diagram of the selection method second embodiment of IP address of the present invention;
Fig. 6 is the flow diagram of the selection method 3rd embodiment of IP address of the present invention;
Fig. 7 is the flow diagram of the selection method fourth embodiment of IP address of the present invention.
The embodiments will be further described with reference to the accompanying drawings for the realization, the function and the advantages of the object of the present invention.
Specific embodiment
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
The primary solutions of the embodiment of the present invention are:
Probe requests thereby is sent to the corresponding each IP address of application program, to obtain the round-trip delay of each IP address;
When getting the round-trip delay of each IP address, the round-trip delay amendment of each IP address is obtained
Value, and be modified according to round-trip delay of the round-trip delay correction value to each IP address;
Set the revised the smallest IP address of round-trip delay to the access IP address of the application program.
Due in the prior art, will cause single ip address access amount according to the IP address of round-trip delay selection access merely
Excessive and situation that other IP address are idle, increases operating cost.
The present invention provides a solution, can each IP address corresponding to application program preset round-trip delay and repair
Positive value is adjusted by the IP that round-trip delay correction value accesses terminal, improves the utilization rate of idle IP, reduce operation at
This.
As shown in Figure 1, Fig. 1 is the system architecture schematic diagram that invention this embodiment scheme is related to, the system architecture includes
Terminal and server, wherein
The terminal sends probe requests thereby to the corresponding each IP address of application program, to obtain the round-trip of each IP address
Time delay;
When getting the round-trip delay of each IP address, the round-trip delay amendment of each IP address is obtained
Value, and be modified according to round-trip delay of the round-trip delay correction value to each IP address;
Set the revised the smallest IP address of round-trip delay to the access IP address of the application program.
The server is when receiving the application program IP address configuration information acquisition request of terminal transmission, described in acquisition
The corresponding application program of application program IP address configuration information acquisition request;
Obtain the corresponding IP address configuration information of the application program, wherein the IP address configuration information includes described
The corresponding each IP address of application program and the corresponding round-trip delay correction value of each IP address;
The corresponding IP address configuration information of the application program is sent to the terminal.
As shown in Fig. 2, Fig. 2 is the running environment structural schematic diagram for the terminal that the embodiment of the present invention is related to.
As shown in Fig. 2, the terminal may include: processor 1001, such as CPU, network interface 1004, user interface
1003, memory 1005, communication bus 1002.Wherein, communication bus 1002 is for realizing the connection communication between these components.
User interface 1003 may include display screen (Display), input unit such as keyboard (Keyboard), optional user interface
1003 can also include standard wireline interface and wireless interface.Network interface 1004 optionally may include that the wired of standard connects
Mouth, wireless interface (such as WI-FI interface).Memory 1005 can be high speed RAM memory, be also possible to stable memory
(non-volatile memory), such as magnetic disk storage.Memory 1005 optionally can also be independently of aforementioned processor
1001 storage device.
It will be understood by those skilled in the art that the restriction of terminal structure shown in Figure 2 not structure paired terminal, can wrap
It includes than illustrating more or fewer components, perhaps combines certain components or different component layouts.
As shown in Fig. 2, as may include that operating system, network are logical in a kind of memory 1005 of computer storage medium
Believe module, Subscriber Interface Module SIM and network-based data recording program.
In terminal shown in Fig. 2, network interface 1004 is mainly used for connecting background server, carries out with background server
Data communication;User interface 1003 is mainly used for connecting client (user terminal), carries out data communication with client;And processor
1001 can be used for calling the option program of the IP address stored in memory 1005, and execute following operation:
Probe requests thereby is sent to the corresponding each IP address of application program, to obtain the round-trip delay of each IP address;
When getting the round-trip delay of each IP address, the round-trip delay amendment of each IP address is obtained
Value, and be modified according to round-trip delay of the round-trip delay correction value to each IP address;
Set the revised the smallest IP address of round-trip delay to the access IP address of the application program.
Further, processor 1001 can call the option program of the IP address stored in memory 1005, also execute
It operates below:
To server sending application program IP address configuration information acquisition request;
In the application program IP address configuration information for receiving server feedback, by the IP address configuration information and institute
State application program associated storage, wherein the application program IP address configuration information includes that the application program is corresponding each
The round-trip delay correction value of IP address and each IP address.
Further, processor 1001 can call the option program of the IP address stored in memory 1005, also execute
It operates below:
The round-trip delay of each IP address is sent to the server, for applying described in the server statistics
The round-trip delay of the corresponding each IP address of program is distributed.
As shown in figure 3, Fig. 3 is the running environment structural schematic diagram for the server that the embodiment of the present invention is related to.
The server of the embodiment of the present invention can be traditional physical server, be also possible to Cloud Server.
As shown in figure 3, the server may include: processor 1006, such as CPU, network interface 1008, memory
1009, communication bus 1007.Wherein, communication bus 1007 is for realizing the connection communication between these components.Network interface
1008 may include optionally standard wireline interface and wireless interface (such as WI-FI interface).Memory 1009 can be high speed
RAM memory is also possible to stable memory (non-volatile memory), such as magnetic disk storage.Memory 1009
It optionally can also be the storage device independently of aforementioned processor 1006.
It will be understood by those skilled in the art that server architecture shown in Fig. 3 does not constitute the restriction to server, it can
To include perhaps combining certain components or different component layouts than illustrating more or fewer components.
As shown in figure 3, as may include that operating system, network are logical in a kind of memory 1009 of computer storage medium
Believe module and network-based data recording program.
In server shown in Fig. 3, network interface 1008 is mainly used for connecting terminal, carries out data communication with terminal;
And processor 1006 can be used for calling the option program of the IP address stored in memory 1009, and execute following operation:
When receiving the application program IP address configuration information acquisition request of terminal transmission, the application program IP is obtained
The corresponding application program of address configuration information acquisition request;
Obtain the corresponding IP address configuration information of the application program, wherein the IP address configuration information includes described
The corresponding each IP address of application program and the corresponding round-trip delay correction value of each IP address;
The corresponding IP address configuration information of the application program is sent to the terminal.
Further, processor 1006 can call the option program of the IP address stored in memory 1009, also execute
It operates below:
Obtain the ID of the terminal;
Hash calculation is carried out to the ID of the terminal, obtains corresponding number;
Obtain the corresponding IP address configuration information in digital section locating for the number.
Further, processor 1006 can call the option program of the IP address stored in memory 1009, also execute
It operates below:
MD5 calculating is carried out to the ID of the terminal, obtains the corresponding summary info of the ID;
The ordered series of numbers for obtaining presetting digit capacity in the summary info converts the ordered series of numbers of the presetting digit capacity with hexadecimal
To ten's digit.
According to above scheme, when terminal needs access application, sends and visit to the corresponding each IP address of application program
Request is surveyed, to obtain the round-trip delay of each IP address, when getting the round-trip delay of each IP address, is obtained each
The round-trip delay correction value of the IP address, and according to the round-trip delay correction value to the round-trip delay of each IP address
It is modified, sets the revised the smallest IP address of round-trip delay to the access IP address of the application program.By
In can each IP address corresponding to application program preset round-trip delay correction value, by round-trip delay correction value to terminal
The IP of access is adjusted, and is improved the utilization rate of idle IP, is reduced operating cost.
It is the flow diagram of the selection method first embodiment of IP address of the present invention, the IP address referring to Fig. 4, Fig. 4
Selection method include:
Step S10 sends probe requests thereby to the corresponding each IP address of application program, to obtain the round-trip of each IP address
Time delay;
The selection method of IP address provided by the invention is mainly used in the IP address access of application program, is applied especially to
One application program has IP address selection when multiple access IP, the present embodiments relate to terminal include but is not limited to hand
Machine, tablet computer and computer etc..
It is loaded with various application programs in terminal, while being stored with the corresponding IP address configuration information of each application program,
The IP address configuration information includes the round-trip delay amendment of the corresponding each IP address of application program and each IP address
Value, the corresponding IP address configuration information of application program can be obtained and be stored from server.When terminal needs to run application program, obtain
The corresponding each IP address of the application program of storage is taken, then sends probe requests thereby respectively to each IP address, to obtain
The round-trip delay of each IP address.
Step S20, when getting the round-trip delay of each IP address, obtain each IP address it is round-trip when
Prolong correction value, and is modified according to round-trip delay of the round-trip delay correction value to each IP address;
After terminal gets the true round-trip delay of each IP address, obtain each IP address returns time delay correction value,
True round-trip delay is modified using the round-trip delay correction value, obtains revised round-trip delay.Specifically, will
The true round-trip delay of each IP address is added to arrive revised round-trip delay with corresponding round-trip delay correction value.
For example, wherein ID1 round-trip delay correction value is 0ms, and ID2 is round-trip as application program corresponding three IP address ID1, ID2 and ID3
Time delay correction value is 500ms, and when ID3 round-trip delay correction value is 0ms, then the true round-trip delay of ID1 and ID3 adds 0ms respectively
The revised round-trip delay of ID1 and ID3 is obtained, the true round-trip delay of ID2 adds 500ms to obtain the revised round-trip delay of ID.
Step S30 sets the revised the smallest IP address of round-trip delay to the access IP of the application program
Address.
The round-trip delay of revised each IP address is ranked up by terminal, selects revised round-trip delay the smallest
IP address sends data to the IP address and carries out application program access as the access IP address of the application program.
In the present embodiment, the round-trip delay correction value of each IP address of application program can be corresponding according to each IP address
The RTT of the operating cost of IDC computer room and each IP address distribution determines;Such as it may be configured as the corresponding IDC computer room of IP address
Operating cost is higher, then corresponding round-trip delay correction value is bigger or the true round trip time delay of IP address is smaller, then corresponding
Round-trip delay correction value is bigger, and the RTT distribution that can also integrate the operating cost and each IP address of IDC computer room is configured.
By the amendment of IP address correction value, so that the terminal quantity of the corresponding each IP address access of application program is balanced.
Further, in this embodiment sending it to service after terminal gets the round-trip delay of each IP address
Device, so that the round-trip delay of the corresponding each IP address of application program described in the server statistics is distributed.Server receives
After the RTT for each IP address that terminal is sent, respectively by the RTT of each IP address IDC machine corresponding with each IP address
Room is stored, so that the corresponding RTT distribution of each IDC computer room is obtained, so that the round-trip delay of IP address is arranged in administrative staff
Correction value provides reference.
In the present embodiment, it when terminal needs access application, sends and visits to the corresponding each IP address of application program
Request is surveyed, to obtain the round-trip delay of each IP address, when getting the round-trip delay of each IP address, is obtained each
The round-trip delay correction value of the IP address, and according to the round-trip delay correction value to the round-trip delay of each IP address
It is modified, sets the revised the smallest IP address of round-trip delay to the access IP address of the application program.By
In can each IP address corresponding to application program preset round-trip delay correction value, by round-trip delay correction value to terminal
The IP of access is adjusted, and is improved the utilization rate of idle IP, is reduced operating cost.
It further, is the flow diagram of the selection method second embodiment of IP address of the present invention, base referring to Fig. 5, Fig. 5
In first embodiment, the selection method of the IP address further include:
Step S40, to server sending application program IP address configuration information acquisition request;
Step S50 configures the IP address in the application program IP address configuration information for receiving server feedback
Information and the application program associated storage, wherein the application program IP address configuration information includes the application program pair
The round-trip delay correction value of each IP address and each IP address answered.
In the present embodiment, the IP address configuration information of application program is obtained and is stored from configuration server in terminal.
Specifically, the trigger condition of application program IP address configuration information acquisition, the triggering can be preset in terminal
Condition can self-setting according to the actual situation, such as may be configured as in application program launching or when network switching, Huo Zhe
Preset time point.Terminal is asked when meeting preset trigger condition to the acquisition of server sending application program IP address configuration information
It asks, to obtain newest application program IP address configuration information from server, wherein the application program IP address configuration information
Round-trip delay correction value including the application program corresponding each IP address and each IP address.Server receives
When the application program IP address configuration information acquisition request that terminal is sent, by the corresponding IP address configuration information of the application program
It is sent to the terminal.When terminal receives the application program IP address configuration information of server feedback, the IP address is matched
Confidence breath and the application program associated storage.It is understood that as the IP for being stored with the application program in terminal
When address configuration information, when terminal receives the application program IP address configuration information of server feedback, to having stored
The IP address configuration information for stating application program is updated.
Technical solution provided in this embodiment, terminal is when meeting preset trigger condition, to server sending application journey
Sequence IP address configuration information acquisition request will be described in the application program IP address configuration information for receiving server feedback
IP address configuration information and the application program associated storage;So that IP address configuration information is adjusted in server
Afterwards, terminal can obtain in time, so that the adjustment of IP address selection is much sooner.
It further, is the flow diagram of the selection method 3rd embodiment of IP address of the present invention, institute referring to Fig. 6, Fig. 6
The selection method for stating IP address includes:
Step S60 is answered described in acquisition when receiving the application program IP address configuration information acquisition request of terminal transmission
With the corresponding application program of program IP address configuration information acquisition request;
Step S70 obtains the corresponding IP address configuration information of the application program, wherein the IP address configuration information
Including the corresponding each IP address of the application program and the corresponding round-trip delay correction value of each IP address;
The corresponding IP address configuration information of the application program is sent to the terminal by step S80.
The present embodiment is applied to server, and the server can be conventional physical server, be also possible to cloud service
Device.The configuration information of the corresponding IP address of application program is stored in server, the configuration information of the IP address includes application
The corresponding each IP address of program and the corresponding round-trip delay correction value of each IP address, each IP address are corresponding
Round-trip delay correction value can be according to the operating cost of the corresponding server of each IP address and the round-trip delay of each IP address
Distribution is configured.Such as may be configured as the corresponding IDC computer room of IP address operating cost it is higher, then corresponding round-trip delay is repaired
Bigger or IP address the true round trip time delay of positive value is smaller, then corresponding round-trip delay correction value is bigger, can also integrate
The RTT of the operating cost of IDC computer room and each IP address distribution is configured.
When server receives the application program IP address configuration information acquisition request of terminal transmission, obtain described using journey
The corresponding application program of sequence IP address configuration information acquisition request, then further obtains the corresponding IP address of the application program
Configuration information, wherein the IP address configuration information includes the corresponding each IP address of the application program and each IP
The corresponding IP address configuration information of the application program is sent to the terminal by the corresponding round-trip delay correction value in address.
Technical solution provided in this embodiment, server is in the application program IP address configuration information for receiving terminal transmission
When acquisition request, the corresponding application program of the application program IP address configuration information acquisition request is obtained, then described in acquisition
The corresponding IP address configuration information of application program, wherein the IP address configuration information includes that the application program is corresponding each
The corresponding IP address of the application program is matched confidence by a IP address and the corresponding round-trip delay correction value of each IP address
Breath is sent to the terminal.So that after administrative staff's login service device setting IP address configuration information, institute's connection in need
The terminal of the application system can get IP address configuration information.
It further, is the flow diagram of the selection method fourth embodiment of IP address of the present invention, note referring to Fig. 7, Fig. 7
Recall 3rd embodiment, the refinement step of the step S70 includes:
Step S71 obtains the ID of the terminal;
Step S72 carries out Hash calculation to the ID of the terminal, obtains corresponding number;
Step S73 obtains the corresponding IP address configuration information in digital section locating for the number, wherein the IP
Location configuration information includes the corresponding each IP address of the application program and the corresponding round-trip delay amendment of each IP address
Value.
In order to enable the adjustment of IP address access amount is more accurate, settable multiple groups IP address configuration information in this implementation,
The round-trip delay correction value of IP address is respectively set in every group of configuration information.And weight proportion is arranged to every group of configuration information, then
Digital section is divided according to weight proportion, the ratio between the corresponding number total digital block section Zhan of every group of configuration information is equal to reorganization
The weight proportion of configuration information.
When server receives the ID address configuration information acquisition request of terminal transmission, the ID of the terminal is obtained, to institute
The ID for stating terminal carries out Hash calculation, obtains corresponding number, then obtains the corresponding IP in digital section locating for the number
Then the IP address configuration information is sent to the terminal, so that different terminals are got not by address configuration information
Same IP address configuration information.Specifically, server can carry out Hash calculation by the ID to the terminal by the following method, obtain
Corresponding number: MD5 calculating is carried out to the ID of the terminal, obtains the corresponding summary info of the ID, what is be calculated is described
Summary info is hexadecimal number, then obtains the ordered series of numbers of presetting digit capacity in the summary info, by the number of the presetting digit capacity
Column are converted to ten's digit with hexadecimal, it is to be understood that the ordered series of numbers of the presetting digit capacity can be according to the actual situation
Self-setting, such as class are set as last four in the summary info.
Preferably, in order to enable the digital section of setting is easier, [0,1], each group can be set by total digital section
Configuration information for digital section be then [0,1] subinterval.Further, when the weight ratio of the configuration information of user setting
When example summation is not 100%, server automatically standardizes weight proportion, and weight proportion summation is converted to 100%, for example,
When the configuration information and weight proportion of user setting are respectively configuration information A:10%, when configuration information B:40%, server from
It is dynamic to be standardized, it is converted into configuration information A:20%, configuration information B:80%, so that allocation ratio summation is 100%.
Server removes the ten's digit after the ordered series of numbers of the presetting digit capacity is converted to ten's digit with hexadecimal
With the corresponding decimal number of maximum hexadecimal number of the presetting digit capacity, so that obtained number is in [0,1] section.Example
Such as, when the presetting digit capacity is 4, then divided by the corresponding decimal number 65536 of maximum 4 hexadecimal number OxFFFF,
When the presetting digit capacity is 3, then divided by the corresponding decimal number 4095 of maximum 3 hexadecimal number OxFFF.
To better understand this programme, citing elaboration, corresponding three IP address of application program are now carried out with a specific example
ID1, ID2 and ID3, settable 3 groups of configuration informations, the RTT correction value and weight proportion of the corresponding IP address of every group of configuration information
It is as shown in the table:
Then according to the weight proportion of each group configuration information, corresponding digital section is respectively set are as follows: configuration information 1 for
Digital section be [0,0.1), configuration information 1 be for digital section [0.1,0.4) configuration information 1 is for digital section
[0.4,1].Server get server receive terminal transmission ID address configuration information acquisition request when, obtain the end
The ID at end carries out MD5 calculating to the ID of the terminal, obtains the corresponding summary info of the ID, the abstract being calculated
Information is hexadecimal number, then obtains the ordered series of numbers (such as last 4) of presetting digit capacity in the summary info, will be described default
The ordered series of numbers of digit is converted to ten's digit with hexadecimal, by the ten's digit divided by the maximum of the presetting digit capacity
The corresponding decimal number of hexadecimal number (such as the corresponding decimal number 65536 of 4 hexadecimal number OxFFFF) obtains [0,1]
Number in section.For example, then corresponding digital section is [0.4,1], corresponding IP address when obtained number is 0.8
Configuration information is configuration information 3, i.e., ID1 round-trip delay correction value is 0ms, and ID2 round-trip delay correction value is 500ms, and ID3 is round-trip
Time delay correction value is 0ms.Then configuration information 3 is sent to the terminal by server.
Technical solution provided in this embodiment, server are stored with multiple groups IP address configuration information, every group of IP address configuration
Information has respectively corresponded digital section and has obtained institute when server receives the IP address configuration information acquisition request of terminal transmission
The ID of terminal is stated, Hash calculation then is carried out to the ID of the terminal, obtains corresponding number, is then obtained locating for the number
The corresponding IP address configuration information in digital section, the configuration information of the IP address is sent to the terminal;So that
Different terminals can get different configuration informations, so that the allotment that IP address obtains is more accurate.
In addition, the terminal includes: memory, place in order to achieve the above object, the embodiment of the present invention also provides a kind of terminal
Reason device and the option program for being stored in the IP address that can be run on the memory and on the processor, the IP address
The step of selection method of the IP address as described in first or second embodiments is realized when option program is executed by the processor.
In addition, in order to achieve the above object, the embodiment of the present invention also provides a kind of server, the terminal include: memory,
Processor and the option program for being stored in the IP address that can be run on the memory and on the processor, the IP address
Option program realize when being executed by the processor IP address as described in third or fourth embodiment selection method step
Suddenly.
In addition, in order to achieve the above object, the embodiment of the present invention also provides a kind of selection system of IP address, the IP address
Selection system include terminal as described above and server as described above, wherein the quantity of the terminal is at least one.
It should be noted that, in this document, the terms "include", "comprise" or its any other variant are intended to non-row
His property includes, so that the process, method, article or the system that include a series of elements not only include those elements, and
And further include other elements that are not explicitly listed, or further include for this process, method, article or system institute it is intrinsic
Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including being somebody's turn to do
There is also other identical elements in the process, method of element, article or system.
The serial number of the above embodiments of the invention is only for description, does not represent the advantages or disadvantages of the embodiments.
Through the above description of the embodiments, those skilled in the art can be understood that above-described embodiment side
Method can be realized by means of software and necessary general hardware platform, naturally it is also possible to by hardware, but in many cases
The former is more preferably embodiment.Based on this understanding, technical solution of the present invention substantially in other words does the prior art
The part contributed out can be embodied in the form of software products, which is stored in one as described above
In storage medium (such as ROM/RAM, magnetic disk, CD), including some instructions are used so that terminal device (it can be mobile phone,
Computer, server or network equipment etc.) execute method described in each embodiment of the present invention.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair
Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills
Art field, is included within the scope of the present invention.
Claims (9)
1. a kind of selection method of IP address, which is characterized in that the selection method of the IP address the following steps are included:
Probe requests thereby is sent to the corresponding each IP address of application program, to obtain the round-trip delay of each IP address;
When getting the round-trip delay of each IP address, the round-trip delay correction value of each IP address is obtained, and
It is modified according to round-trip delay of the round-trip delay correction value to each IP address;
Set the revised the smallest IP address of round-trip delay to the access IP address of the application program.
2. the selection method of IP address as described in claim 1, which is characterized in that the selection method of the IP address is also wrapped
It includes:
To server sending application program IP address configuration information acquisition request;
In the application program IP address configuration information for receiving server feedback, by the IP address configuration information and described answer
With program associated storage, wherein the application program IP address configuration information includes the application program corresponding each IP
The round-trip delay correction value of location and each IP address.
3. the selection method of IP address as described in claim 1, which is characterized in that described to get each IP address
Round-trip delay when, obtain the round-trip delay correction value of each IP address, and according to the round-trip delay correction value to each
After the step of round-trip delay of a IP address is modified, further includes:
The round-trip delay of each IP address is sent to the server, for application program described in the server statistics
The round-trip delay of corresponding each IP address is distributed.
4. a kind of selection method of IP address, which is characterized in that the selection method of the IP address the following steps are included:
When receiving the application program IP address configuration information acquisition request of terminal transmission, the application program IP address is obtained
The corresponding application program of configuration information acquisition request;
Obtain the corresponding IP address configuration information of the application program, wherein the IP address configuration information includes the application
The corresponding each IP address of program and the corresponding round-trip delay correction value of each IP address;
The corresponding IP address configuration information of the application program is sent to the terminal.
5. the selection method of IP address as claimed in claim 4, which is characterized in that the acquisition application program is corresponding
IP address configuration information, wherein the IP address configuration information includes the corresponding each IP address of the application program and each
The step of IP address corresponding round-trip delay correction value includes:
Obtain the ID of the terminal;
Hash calculation is carried out to the ID of the terminal, obtains corresponding number;
Obtain the corresponding IP address configuration information in digital section locating for the number, wherein the IP address configuration information packet
Include the corresponding each IP address of the application program and the corresponding round-trip delay correction value of each IP address.
6. the selection method of IP address as claimed in claim 5, which is characterized in that the ID to the terminal carries out Hash
It calculates, the step for obtaining corresponding number includes:
MD5 calculating is carried out to the ID of the terminal, obtains the corresponding summary info of the ID;
The ordered series of numbers of the presetting digit capacity is converted to ten with hexadecimal by the ordered series of numbers for obtaining presetting digit capacity in the summary info
Binary digits.
7. a kind of terminal, which is characterized in that the terminal includes: memory, processor and is stored on the memory and can
The option program of the IP address run on the processor, it is real when the option program of the IP address is executed by the processor
Now the step of selection method of IP address as claimed any one in claims 1 to 3.
8. a kind of server, which is characterized in that the terminal includes: memory, processor and is stored on the memory simultaneously
The option program for the IP address that can be run on the processor, when the option program of the IP address is executed by the processor
The step of realizing the selection method of the IP address as described in any one of claim 4 to 6.
9. a kind of selection system of IP address, which is characterized in that the selection system of the IP address includes as claimed in claim 7
Terminal and server as claimed in claim 8, wherein the quantity of the terminal is at least one.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910210605.6A CN109981815B (en) | 2019-03-19 | 2019-03-19 | IP address selection method, terminal, server and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910210605.6A CN109981815B (en) | 2019-03-19 | 2019-03-19 | IP address selection method, terminal, server and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109981815A true CN109981815A (en) | 2019-07-05 |
CN109981815B CN109981815B (en) | 2022-05-27 |
Family
ID=67079650
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910210605.6A Active CN109981815B (en) | 2019-03-19 | 2019-03-19 | IP address selection method, terminal, server and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109981815B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114760226A (en) * | 2020-12-29 | 2022-07-15 | 海能达通信股份有限公司 | Method, device and storage medium for improving round trip delay estimation precision |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1778079A (en) * | 2003-06-17 | 2006-05-24 | 思科技术公司 | Methods and devices for the coordination of flow control between a TCP/IP network and other networks |
CN103905328A (en) * | 2012-12-25 | 2014-07-02 | 中国移动通信集团公司 | Data transmission control system and method and related equipment |
CN104412550A (en) * | 2012-05-11 | 2015-03-11 | 惠普发展公司,有限责任合伙企业 | Server selection |
CN104780212A (en) * | 2015-04-14 | 2015-07-15 | 天脉聚源(北京)教育科技有限公司 | Method for selecting server with highest connection speed and terminal |
CN104994036A (en) * | 2015-06-09 | 2015-10-21 | 北京邮电大学 | Dynamic data scheduling method in multi-path transfer protocol |
CN106302168A (en) * | 2016-09-18 | 2017-01-04 | 东软集团股份有限公司 | A kind of ISP route selecting method, device and gateway |
US20180026899A1 (en) * | 2016-07-21 | 2018-01-25 | The Regents Of The University Of Colorado, A Body Corporate | Method and apparatus for controlling send buffer of transmission control protocol in communication system |
-
2019
- 2019-03-19 CN CN201910210605.6A patent/CN109981815B/en active Active
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN1778079A (en) * | 2003-06-17 | 2006-05-24 | 思科技术公司 | Methods and devices for the coordination of flow control between a TCP/IP network and other networks |
CN104412550A (en) * | 2012-05-11 | 2015-03-11 | 惠普发展公司,有限责任合伙企业 | Server selection |
CN103905328A (en) * | 2012-12-25 | 2014-07-02 | 中国移动通信集团公司 | Data transmission control system and method and related equipment |
CN104780212A (en) * | 2015-04-14 | 2015-07-15 | 天脉聚源(北京)教育科技有限公司 | Method for selecting server with highest connection speed and terminal |
CN104994036A (en) * | 2015-06-09 | 2015-10-21 | 北京邮电大学 | Dynamic data scheduling method in multi-path transfer protocol |
US20180026899A1 (en) * | 2016-07-21 | 2018-01-25 | The Regents Of The University Of Colorado, A Body Corporate | Method and apparatus for controlling send buffer of transmission control protocol in communication system |
CN106302168A (en) * | 2016-09-18 | 2017-01-04 | 东软集团股份有限公司 | A kind of ISP route selecting method, device and gateway |
Non-Patent Citations (2)
Title |
---|
段友提: "基于动态数据调度的MPTCP并行数据传输技术研究与设计", 《中国优秀硕士学位论文全文数据库》 * |
王圣元等: "DNS权威服务器选择方式研究", 《智能计算机与应用》 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114760226A (en) * | 2020-12-29 | 2022-07-15 | 海能达通信股份有限公司 | Method, device and storage medium for improving round trip delay estimation precision |
CN114760226B (en) * | 2020-12-29 | 2023-07-18 | 海能达通信股份有限公司 | Method, device and storage medium for improving round trip delay estimation precision |
Also Published As
Publication number | Publication date |
---|---|
CN109981815B (en) | 2022-05-27 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5490738B2 (en) | System and method for handshaking between a wireless device and a server | |
KR100593516B1 (en) | System and method for providing a wireless device with an application catalog on an application server | |
US8959234B2 (en) | Method and system for providing online services corresponding to multiple mobile devices, server, mobile device, and computer program product | |
US9092812B2 (en) | Method and system for distributing business application and contents for mobile equipment using application store and wireless AP | |
CN109660607A (en) | A kind of service request distribution method, method of reseptance, device and server cluster | |
CN109547286B (en) | CDN node selection method, device and storage medium | |
WO2021098407A1 (en) | Mec-based service node allocation method and apparatus, and related server | |
CN109167674A (en) | Methods of marking, domain name system DNS dispatching method and the server of service node | |
CN104348798B (en) | A kind of method, apparatus, dispatch server and system for distributing network | |
CN110166526B (en) | Multi-CDN access management method and device, computer equipment and storage medium | |
CN106657383A (en) | Data downloading method and relevant equipment | |
CN107451853A (en) | Method, apparatus, system and the storage medium that a kind of red packet distributes in real time | |
CN109729139A (en) | Access request retransmission method, device, equipment and readable storage medium storing program for executing | |
CN107018503A (en) | A kind of note transmission method and system | |
CN109981815A (en) | Selection method, terminal, server and the system of IP address | |
CN104702634A (en) | Method, device and system for processing data operation request | |
CN115706741A (en) | Method and device for returning slice file | |
RU2618943C2 (en) | Method, device and system for distribution of applications | |
CN108124021A (en) | Internet protocol IP address obtains, the method, apparatus and system of website visiting | |
CN105847396A (en) | Data transmission method and device | |
CN109639629A (en) | Data access processing method, device, computer equipment and storage medium | |
CN110995890B (en) | Domain name request scheduling method and device | |
CN107528884B (en) | User request processing method and device of aggregation server | |
CN110336746A (en) | User face nodes selection method, system and storage medium | |
JP6734303B2 (en) | Information processing method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |