CN104125310B - Message method based on semi-permanent address - Google Patents

Message method based on semi-permanent address Download PDF

Info

Publication number
CN104125310B
CN104125310B CN201410098231.0A CN201410098231A CN104125310B CN 104125310 B CN104125310 B CN 104125310B CN 201410098231 A CN201410098231 A CN 201410098231A CN 104125310 B CN104125310 B CN 104125310B
Authority
CN
China
Prior art keywords
rsvr
rcode
accountaddr
address
hsvr
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201410098231.0A
Other languages
Chinese (zh)
Other versions
CN104125310A (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.)
Individual
Original Assignee
Individual
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 Individual filed Critical Individual
Priority to CN201410098231.0A priority Critical patent/CN104125310B/en
Publication of CN104125310A publication Critical patent/CN104125310A/en
Application granted granted Critical
Publication of CN104125310B publication Critical patent/CN104125310B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present invention discloses a kind of message method based on semi-permanent address, first obtains the RCode of the target device of an account, then directly sends message to target device, reduces message detour.A kind of guard station recognition methods is also disclosed, the RCode of the target device for obtaining an account.A kind of method sending message according to SPAddr is also disclosed, for directly sending message to the target device of an account.A kind of method sending message according to SPEmailAddr is also disclosed.A kind of guard station recognition methods is also disclosed, for directly acquiring the new RCode of a SPEmailAddr.A kind of HSvr is also disclosed, can elimination gap factor, and reduce message detour phenomenon.A kind of message treatment method is also disclosed, for handling the message from other HSvr.A kind of guard station identification message treatment method is also disclosed.A kind of RIDSvr is also disclosed, load balancing may be implemented.

Description

Message method based on semi-permanent address
Technical field
The present invention relates to internet communications, send more particularly to the message in internet based on semi-permanent address Method, and distribution HSvr;Guard station recognition methods, guard station identify message treatment method, and distribution RIDSvr.
Background technique
In internet communication, Radix Angelicae Sinensis belong to an attribution server (HSvr, Home Server) user (IUsr, Internet User) quantity it is enough when (for example, the QQ number of users of Tencent reaches 700,000,000) or these user distributions in one When a very big territorial scope, in order to improve service quality, generally, multiple child servers can be set, come respectively to corresponding User provide service.
For example, the HSvr includes several child servers.According to GUID (global Unified Identity, Global Unified Identity UCode (user code, User Code)) will belong to all of the HSvr according to certain mapping relations The account information of IUsr is stored in respectively in different child servers, and these accounts are addressed according to the mapping relations.Referring to Application No. is 02146090.6 " a method of store and read data information by data information key field " patents of invention.
The GUID can be the address email, is also possible to principal and subordinate's code, is also possible to a shadow code.About GUID and HSvr are more described, referring to application No. is " communication means and system " patents of invention of 201310037232.X, and Application No. is " shadow code addressing method " patents of invention of 201310049772.X.
For example, for 163 user of Netease: for UsrA and UsrB, according to the mapping relations that Netease is arranged, UsrA is mapped Into Netease's Pekinese's child servers, UsrB is mapped in the child servers in Netease Guangzhou.For Tencent qq user: UsrC comes It says, according to the mapping relations that Tencent is arranged, UsrC is mapped in the child servers in Tencent Shanghai.
When UsrA sends information to UsrB, Netease's Pekinese's child servers can be determined according to the mapping relations of setting Child servers where UsrB are in Guangzhou, so that corresponding message is sent to the child servers in Netease Guangzhou, it is wide by Netease The child servers in state transmit the message to UsrB.
But when UsrC sends message to UsrB, the child servers in Tencent Shanghai are in the mapping relations for not knowing Netease When, UsrB can not be just determined in which child servers of Netease, and at this moment, the child servers in Tencent Shanghai may be according to nearest Access way transmits the message to the child servers in Netease Nanjing.After the child servers in Netease Nanjing receive the message, according to net Easy mapping relations determine that UsrB in the child servers in Netease Guangzhou, transmits the message to the child servers in Netease Guangzhou, Then UsrB is transmitted the message to by the child servers in Netease Guangzhou again.In this way, just producing message detour problem.
If the child servers in Tencent Shanghai is allowed to save the mapping relations data of Netease to reduce above-mentioned message detour, The child servers that then will lead to Tencent Shanghai safeguard huge mapping relations data, because, same reason, the son clothes in Tencent Shanghai Business device will may also safeguard the mapping relations data of Sohu, Sina, Microsoft etc..
Particularly, since UsrB is mapped relationship map into the child servers in Netease Guangzhou, although, the corresponding use of UsrB Family Beijing that hangs up one's hat can only remotely access the child servers in Netease Guangzhou when UsrB logs in the account of oneself every time.Needle To the remote access, UsrB can be registered in the child servers in Netease Guangzhou migrates child servers.In this way, UsrB is in north When capital, the child servers that UsrB is currently migrated, i.e. Netease's Pekinese's sub-services can be registered in the child servers in Netease Guangzhou Device, and the account information of UsrB is saved in Netease's Pekinese's child servers.In this way, UsrB logins the account of oneself in Beijing When, so that it may directly enter Netease's Pekinese's child servers.
When supporting UsrB to migrate to Pekinese, when UsrA sends message to UsrB, Netease's Pekinese's sub-services Device first according to the mapping relations of setting, sends this message to the child servers in Netease Guangzhou, the child servers in Netease Guangzhou are sentenced Disconnected UsrB migrates to Beijing, then, then Netease's Pekinese's child servers is forwarded the message to, by Netease's Pekinese's child servers Transmit the message to UsrB.
But when supporting UsrB to migrate to Pekinese, when UsrC sends message to UsrB, the son in Tencent Shanghai Server transmits the message to the child servers in Netease Nanjing according to nearest access way.The child servers in Netease Nanjing receive After the message, according to the mapping relations of Netease, the child servers in Netease Guangzhou, the sub-services in Netease Guangzhou are transmitted the message to Device judges that UsrB migrates to Beijing, then, then forwards the message to Netease's Pekinese's child servers, is taken by Netease's Pekinese's Business device transmits the message to UsrB.In this way, also producing the detour of message.
Across the transmission message between service-domain, generated various message detours will additionally consume very big information exchange and information Transfer resource, and influence service quality.Thus the energy consumption and environmental pollution additionally generated also will be unable to ignore.
Summary of the invention
In view of this, the present invention discloses the message method based on semi-permanent address, for across the message between service-domain It sends, this method obtains the RCode of an AccountAddr in advance.When sending message to the account of the AccountAddr, The message is transmitted directly to the target device of the account according to the AccountAddr and the RCode, it is circuitous to reduce message It returns.Method includes the following steps:
A, the RCode of an AccountAddr is obtained;
B, the SPAddr according to corresponding to the AccountAddr and the RCode of acquisition sends message.
A kind of guard station recognition methods is also disclosed, for identification the guard station information of an address to be identified.This method include with Lower step:
A, according to the corresponding domain name in the address to be identified, pointed IP address is obtained by domain name mapping;
B, being sent according to obtained IP address includes the guard station identification request message for identifying target, and the identification target is institute State address to be identified;
D, the corresponding RCode of the identification target replied is received.
A kind of method that message is sent according to SPAddr is also disclosed, disappears for the target device transmission directly to an account Breath.Method includes the following steps:
A, domain name corresponding to the RSvrCompDesc of the SPAddr is parsed, with obtaining the host ip of pointed RSvr Location;
B, the IP address obtained according to parsing, Xiang Xiangying RSvr send the message, and the destination address of message includes should The AccountAddr of SPAddr.
A kind of method sending message according to SPEmailAddr is also disclosed, so that, after SPEmailAddr failure, still The normal transmission of message may be implemented.Method includes the following steps:
A, using the SPEmailAddr as the destination address of message, the message is sent;
B, after receiving the return information for indicating " target account is not present ", it is corresponding to obtain the SPEmailAddr RCode;According to the RCode of acquisition, a new SPEmailAddr, i.e. NewSPEmailAddr are obtained;It should Destination address of the NewSPEmailAddr as message, retransmits the message.
A kind of guard station recognition methods is also disclosed, for identification the corresponding guard station information of a SPEmailAddr.This method packet Include following steps:
A, according to the domain name of the SPEmailAddr, the host IP address of pointed RSvr is obtained by domain name mapping;
B, being sent according to obtained IP address to the RSvr includes identifying that the guard station of target identifies request message, the knowledge Other target is the SPEmailAddr;
D, the corresponding RCode of the identification target replied is received.
A kind of HSvr is also disclosed, message detour phenomenon can be reduced with elimination gap factor.The HSvr include RIDSvr and RSvr;Each RSvr is assigned a RCode;The RSvr is for saving corresponding account information;
Receiving in the RSvr from other HSvr includes destination address for AccountAddr's or SPEmailAddr After message, according to the destination address, target account is determined, which is ended in into the target account;
After the guard station identification request message that the RIDSvr receives that includes an identification target, the identification target pair is determined The RCode answered;RCode determined by replying.
A kind of message treatment method is also disclosed, for handling the message from other HSvr.The destination of the message Location includes AccountAddr or SPEmailAddr;Method includes the following steps:
A, after RSvr receives the message that the destination address from other HSvr includes AccountAddr or SPEmailAddr, Target account is determined according to the destination address, judges whether that determination obtains, if so, thening follow the steps b: the message is terminated In identified target account;Otherwise, terminate process;
A kind of guard station identification message treatment method is also disclosed, identifies request message for handling a guard station.This method is pre- Message distribution module and multiple guard station enquiry modules are first set;Sublist is migrated in setting in the guard station enquiry module;It establishes The mapping relations of AccountAddr and corresponding guard station enquiry module;Method includes the following steps:
A, it includes identifying that the guard station of target identifies request message that the message distribution module, which receives, according to the identification mesh Mark determines corresponding guard station inquiry mould according to the mapping relations of the AccountAddr and corresponding guard station enquiry module that are established Block;Then step b1 or step b2 is executed;
B1: sending to identified guard station enquiry module includes the query messages for identifying target;The guard station inquiry After module receives the query messages, according to the identification target, corresponding RCode is searched from migrating in sublist, by the RCode It is sent to the message distribution module;After the message distribution module receives the response to query message, replied to the request side Received RCode;
B2: the request message is sent to identified guard station enquiry module;The guard station enquiry module receives the request After message, according to the identification target, corresponding RCode is searched from migrating in sublist;The RCode is replied to the request side.
A kind of distribution RIDSvr is also disclosed, load balancing may be implemented.The RIDSvr includes at least one HashSvr With multiple QSvr;It is saved in the QSvr and migrates sublist;Establish the mapping relations of AccountAddr and QSvr;
The HashSvr receive one include identification target guard station identification request message after, the HashSvr according to The identification target determines corresponding QSvr according to the mapping relations of the AccountAddr and QSvr that are established;Subsequently into Process 1 or process 2;
Process 1: sending to identified QSvr includes the query messages for identifying target;The QSvr receives described look into After asking message, according to the identification target, corresponding RCode is searched from migrating in sublist, which is sent to described HashSvr;After the HashSvr receives the response to query message, received RCode is replied to the request side;
Process 2: the request message is sent to identified QSvr;After the QSvr receives the request message, according to institute Identification target is stated, searches corresponding RCode from migrating in sublist;The RCode is replied to the request side.
In technical solution provided by the above embodiment, since message detour can be reduced, can largely save network Construction and operation investment;Due to eliminating the bottleneck factor of Message Processing, be conducive to large-scale equipment deployment.Also, because For the path for reducing messaging, the service quality of service provider (SP, Service Provider) can also be improved.
Detailed description of the invention
Shown in Fig. 1, for the first instance graph of distribution HSvr of the invention.
Shown in Fig. 2, the distributed HSvr of RIDSvr is superimposed for RSvr.
Shown in Fig. 3, for the distributed HSvr with MsgDSvr.
It is message method embodiment flow chart of the present invention shown in Fig. 4.
It is distribution RIDSvr shown in Fig. 5.
Shown in Fig. 6, the distributed HSvr of QSvr is superimposed for RSvr.
Shown in Fig. 7, the distributed RIDSvr of HashSvr is superimposed for QSvr.
Shown in Fig. 8, for the distributed RIDSvr with MsgDSvr.
Shown in Fig. 9, the distributed HSvr of QSvr and HashSvr is superimposed for RSvr.
Specific embodiment
For the object of the invention, technical solution and advantage is more clearly understood, below with reference to embodiment, from many aspects into Row is described in detail.
The present invention is by taking the GUID is the address Email as an example, and for illustrating, but being suitable for GUID is principal and subordinate's code or shadow Code or other situations.
Each account has an account address (AccountAddr, Account Address), to address for account.
The AccountAddr of the source account of one GUID is the GUID.
The AccountAddr of the migration account of one GUID be the corresponding cross-domain address code of the migration account (CDAddr, Cross-domain Address).The GUID is this base GUID (BaseGUID, The Base GUID) of the CDAddr, should CDAddr is migration account place across last HSvr information (CeSvrDesc, Cross-end HSvr Description) Some ownership code (HCode, Home Code) of HSvr.About more descriptions of CDAddr, referring to application No. is 201310079118.3 " support GUID migration network and related news processing method " patent of invention.
Each AccountAddr is by an address base (AddrBase, Address Base) and an address attribution (AddrHome, Address Home) is constituted.When an AccountAddr is a GUID, the AccountAddr's AddrBase is the UCode of the GUID, and the AddrHome of the AccountAddr is the HCode of the GUID;When one When AccountAddr is a CDAddr, the AddrBase of the AccountAddr is the BaseGUID of the CDAddr, should The AddrHome of AccountAddr is the CeSvrDesc of the CDAddr.
The HSvr of one AccountAddr ownership is HSvr pointed by the AddrHome of the AccountAddr.
The AddrHome of one account is the AddrHome of the AccountAddr of the account;One account AddrBase is the AddrBase of the AccountAddr of the account.
The AccountAddr of one account is the permanent address (PermAddr, Permanent Address) of the account.
According to certain rules or algorithm, a domain name can produce according to a HCode, referring to " the communication means And system " patent of invention.Therefore, in the subsequent narration of the present invention with the HCode that a HSvr is possessed is a domain name, one A AccountAddr is the address email } for, but it is not used in the restriction present invention.
The invention proposes a kind of HSvr, the HSvr includes guard station identification server (RIDSvr, Residence Identification Server) and guard station server (RSvr, Residence Server).The RIDSvr with it is described The HCode of RSvr is the HCode of this HSvr.
As shown in Figure 1, for the first instance graph of distribution HSvr of the invention.In this example, the HSvr includes one RIDSvr and four RSvr.Wherein, being located at Pekinese RSvr is RSvr-10, and the RSvr positioned at Guangzhou is RSvr-20, is located at upper The RSvr in sea is RSvr-21, and the RSvr positioned at Chengdu is RSvr-28.
The RIDSvr provides guard station identification service for receiving guard station identification request message.
Corresponding account information is saved in the RSvr.RSvr where the corresponding account of one AccountAddr is should The RSvr of AccountAddr.
It receives in the RSvr from other HSvr, such as the RSvr in other HSvr, including purpose After the message of AccountAddr, following process is executed:
Step R01, the described RSvr determines target account according to the purpose AccountAddr.
Step R09, the message is ended in into the target account.
For example, the message be for target account send a short message, then it is described that the message is ended in into the mesh Mark account can be the client that the short message is sent to the target account.
In step R01, when the RSvr can not determine target account, directly terminate or to message source address one Side, which is replied, indicates replying message for " target account being not present ".
It generally, may include these attributes in an account information: AccountAddr or AccountAddr AddrBase, Password, ClientIP and ClientPort, etc..Wherein, Password is the password of proper account, ClientIP and ClientPort is the online information of proper account.When an account, which is in, logins state, accordingly ClientIP and ClientPort corresponds to the IP address and port numbers of the client of the account;State is published when the account is in When, generally, corresponding ClientIP and/or ClientPort are null value null or 0, be can also appear as no corresponding online Record.
The RSvr available IP address and port numbers for logging in client in an Account Logon, and will acquire IP address and port numbers are stored in ClientIP the and ClientPort attribute of the account.
More descriptions about account information are referring to " the communication means and system " patent of invention.
The RSvr can save the account information of proper account by account information table as shown in Table 1.
Table 1
AccountAddr Password ClientIP ClientPort
liubei@163.com ******** Corresponding IP address Respective end slogan
xushu@163.com ******** Corresponding IP address Respective end slogan
According to table 1, corresponding RSvr can determine corresponding account according to an AccountAddr.
Each RSvr is assigned a guard station code (RCode, Residence Code), in corresponding HSvr Identify a RSvr.Below with the RCode that the RCode that the RCode of RSvr-10 is 10, RSvr-20 is 20, RSvr-21 for 21, The RCode of RSvr-28 is 28 } for.
The RCode of the RSvr of one AccountAddr is the RCode of the AccountAddr.
The present invention is fully described (RSvrCompDesc, RSvr Complete Description) with a RSvr and comes A RSvr is identified in internet.The RSvrCompDesc of one RSvr, including HCode and RCode two parts information, can write At (HCode, RCode) form, or write as RCode.HCode form.Wherein the HCode of the RSvrCompDesc is to correspond to The RCode of the HCode of RSvr, the RSvrCompDesc are the RCode of corresponding RSvr.
It, can be in internet according to one by establishing the corresponding relationship of RSvrCompDesc and RSvr RSvrCompDesc determines a RSvr.
Establish a RSvrCompDesc and the corresponding relationship of a RSvr may is that corresponding domain name system (DNS, Domain Name System) in, domain name corresponding to the RSvrCompDesc is directed toward the RSvr.In this way, in internet, A RSvr can be determined according to a RSvrCompDesc.Such as: domain name corresponding to one RSvrCompDesc of parsing, Obtain the host IP address of corresponding RSvr.Parsing a domain name may is that corresponding DNS transmission domain name analysis request, request In include domain name, the DNS returns to obtained host IP address according to the corresponding host IP address of the domain name lookup Requestor.Since parsing domain name is mature technology, which is not described herein again.
Domain name corresponding to one RSvrCompDesc can be the domain name generated according to the RSvrCompDesc.
According to the mode that RSvrCompDesc generates domain name may is that using the RCode of the RSvrCompDesc as One subdomain, generates the subdomain name of the HCode together with the HCode of the RSvrCompDesc.For example, for For RSvrCompDesc value (163.com, 21), it is used as a subdomain by 21, before being inserted into domain name 163.com, in this way, obtaining The subdomain name 21.163.com of domain name 163.com, i.e. (163.com, 21) corresponding domain name.
It, can be by the RSvr's after a RSvr is disposed, such as after corresponding host IP address is set Domain name corresponding to RSvrCompDesc is directed toward the host IP address of the RSvr.
Possessed for HCode is 163.com by the HSvr.After the HSvr is disposed, in corresponding DNS: will The host ip of the direction of domain name 10.163.com corresponding to the RSvrCompDesc value (163.com, 10) of RSvr-10 RSvr-10 Address;Domain name 20.163.com corresponding to RSvrCompDesc value (163.com, 20) by RSvr-20 is directed toward RSvr-20's Host IP address;Domain name 21.163.com corresponding to RSvrCompDesc value (163.com, 21) by RSvr-21 is directed toward The host IP address of RSvr-21;Domain name corresponding to RSvrCompDesc value (163.com, 28) by RSvr-28 28.163.com being directed toward the host IP address of RSvr-28.
In this manner it is possible to send message to corresponding RSvr according to a RSvrCompDesc.
The RIDSvr executes following process after receiving the guard station identification request message that one includes identification target:
Step S11, the corresponding RCode of the identification target is determined.
Step S12, RCode determined by being replied to the request side.
For example, the request side refers to the source address side of the request message, the destination address replied message can Think the source address of the request message.It repeats no more below.
For describe convenient, RCode value 0 is considered as invalid RCode value by the present invention.But it is not intended to limit the present invention.
In this way, the request side after receiving the RCode of reply, if it is determined that the value is 0, then confirms the identification target Corresponding invalid RCode.
Step S12 also may furthermore is that: it is corresponding that the request message is sent to the RCode by the RIDSvr RSvr replys the RCode oneself being assigned from the RSvr to the request side.Here, which, which can save, is assigned RCode.Alternatively, the RIDSvr also sends the RSvr's when the request message is sent to the corresponding RSvr of the RCode RCode。
The identification target can be the AddrBase of an AccountAddr.At this moment, can according to the AddrBase with The HCode that the RIDSvr is possessed obtains an AccountAddr.The RIDSvr can save possessed HCode.
Generally, the identification target is an AccountAddr.Below as example, but it is not used in restriction.
By establishing the corresponding relationship of HCode and RIDSvr, one can be determined according to a HCode in internet RIDSvr。
The corresponding relationship for establishing HCode and RIDSvr may is that in DNS, by the corresponding domain a HCode Name is directed toward the host IP address of RIDSvr corresponding to the HCode.In this way, can be true according to a HCode in internet A fixed RIDSvr.Such as: by the corresponding domain name of one HCode of parsing, obtain the host IP address of corresponding RIDSvr.
The corresponding domain name of the HCode can directly be the HCode itself, be also possible to the domain generated according to the HCode Name.
Possessed for HCode is 163.com by the HSvr, domain name corresponding to the HCode can directly be 163.com is also possible to the word string " 001 " that will arrange as subdomain, domain name 001.163.com is generated together with 163.com.This In for the former, after the HSvr is disposed, domain name 163.com is directed toward to the RIDSvr's of the HSvr in corresponding DNS Host IP address.
About the mode for the corresponding relationship for establishing HCode and host, referring also to it is described " communication means and System " in patent of invention, the description about the corresponding relationship for establishing HCode and HSvr.
It, can be corresponding from the foregoing, it will be observed that after a RIDSvr is disposed, such as after corresponding host IP address is set DNS in domain name corresponding to HCode by the RIDSvr be directed toward the host IP address of the RIDSvr.In this manner it is possible to according to The AddrHome of one AccountAddr sends guard station to corresponding RIDSvr and identifies request message, should to obtain The RCode of AccountAddr.
The invention proposes a kind of guard station recognition methods, with corresponding for being obtained according to an AccountAddr RCode。
This method comprises the following steps:
Step 01, the domain name according to corresponding to the AddrHome of the AccountAddr obtain institute by parsing the domain name The host IP address of the RIDSvr of direction.
The port numbers of IP address and agreement that step 02, basis obtain, it includes identification target that Xiang Suoshu RIDSvr, which is sent, Guard station identifies request message, and the identification target is the AccountAddr.Here unify the port numbers of agreement RIDSvr.
Step 04 receives the RCode replied.
Before step 04, can further include step 03: the RIDSvr is after receiving the request message, really Determine the corresponding RCode of the identification target;RCode determined by being replied to the request side.In this way, guard station identification requesting party is just It can receive to the RCode replied.
In step 03, the RIDSvr will can be replied directly and be believed in the corresponding RCode of the reply identification target Breath is sent to the request side, this can also be replied message to a certain server being sent in this HSvr, such as this RCode pairs The RSvr answered, and replied by the server.Particularly, it is corresponding to be sent to the RCode by the RIDSvr for the request message RSvr replys the RCode oneself being assigned from the RSvr to the request side.Here, which, which can save, is assigned RCode。
It is described to receive the RCode replied, it can be and receive the RCode that the RIDSvr is replied, be also possible to reception and come from The RCode that a certain RSvr is replied in HSvr belonging to the RIDSvr is also possible to receive in the HSvr belonging to the RIDSvr The RCode that any server is replied.It is different according to the difference of HSvr design in reality.
Generally, the identification target is further carried in step 03, in the return information.
There can be multiple equivalent RIDSvr in one HSvr, to realize load sharing, to help to realize the rule of HSvr Modelling deployment.For example, these equivalent RIDSvr, or be mutually backups, or mirror image each other, alternatively, selecting one of them for RIDSvr Host, remaining is RIDSvr mirror image, or other than deployed environment is different, other identical RIDSvr.
These equivalent RIDSvr can be disposed respectively from anywhere in internet, for example, can it is local and/ Or the multiple equivalent RIDSvr is disposed in cloud respectively.Correspondingly, in DNS system, intelligently parsing configuration is carried out, so that right When the corresponding domain name of the HCode of the RIDSvr is parsed, can according to domain name mapping request from different geographical, respectively It is resolved to the host IP address of different RIDSvr.
For example, the HCode of HSvr is 163.com, in corresponding DNS, 163.com is directed toward the multiple of the HSvr simultaneously The host IP address of equivalent RIDSvr.After corresponding dns server receives a domain name mapping request, with domain name mapping requestor IP address (IPrequester, Requester IP) matching domain name 163.com corresponding to multiple IP address, determine best The IP address of best match is returned to domain name mapping requestor by matcher.
In this manner it is achieved that according to the network segment where requestor come by a domain name mapping to the different IP addresses configured On.
It is of course also possible to which RIDSvr and RSvr is deployed in a server.
Particularly, in a HSvr, a RIDSvr can be disposed in the server where each RSvr.
The distributed HSvr of RSvr superposition RIDSvr as shown in Figure 2.In the HSvr, RIDSvr1 and RSvr-10 deployment In the same server, RIDSvr2 and RSvr-20 are deployed in the same server, and RIDSvr3 and RSvr-21 are deployed in In the same server, RIDSvr4 and RSvr-28 are deployed in the same server.Wherein, RIDSvr2 is primary server, RIDSvr1, RIDSvr3, RIDSvr4 are respectively mirror image server.It is kept between primary server and each mirror image server related The synchronization of data, for example, the related data can be the mapping relations data of AccountAddr and RCode.
It should be noted that between multiple RIDSvr mutually backed up, it can also be by realizing the same of related data by hand Step.In this way, each RIDSvr is only all connected on internet, such as TCP communication connection is not needed to establish between each other.
If being not desired to the intelligently parsing of the domain name corresponding to HCode of the configuration about the HSvr in corresponding DNS, may be used also To further comprise message distribution services device (MsgDSvr, Message a Distribution in the HSvr Server), the guard station received is identified request message according to the strategy of random or poll or load balancing by the MsgDSvr It is sent to corresponding RIDSvr, is handled by corresponding RIDSvr.Distribution with MsgDSvr as shown in Figure 3 HSvr。
For the HSvr with MsgDSvr, it is only necessary to, will be corresponding to the HCode of the HSvr in corresponding DNS Domain name is directed toward the host IP address of the MsgDSvr.
In this case, step S12 also may furthermore is that: construction destination address is the source address of the request message Reply message, this reply message in include the corresponding RCode of the identification target;This is replied message described in being sent to MsgDSvr replys the corresponding RCode of the identification target from the MsgDSvr to the request side.In this way, the MsgDSvr with Each RIDSvr together, forms a super RIDSvr.
The present invention is with a semi-permanent address (SPAddr, Semi-permanent Address), to retouch in internet State the corresponding address in its RSvr an AccountAddr.The SPAddr of one AccountAddr includes should RCode two parts of AccountAddr and the AccountAddr.One SPAddr can be write as (AccountAddr, RCode) Form, or write as AccountAddr/RCode form.
Particularly, a SPAddr can also be write as an email address format, and the SPAddr of this form is known as one The semipermanent address email (SPEmailAddr, Semi-permanent email Address).
The user name of the SPEmailAddr of one, SPAddr of mode by the SPAddr AccountAddr The RCode of the AddrBase and SPAddr is formed, and correspondingly, the domain name of the SPEmailAddr is the SPAddr's The domain name of AccountAddr.For example, for for SPAddr value (liubei@163.com, 10), corresponding SPEmailAddr's User name is made of AddrBase value liubei and the RCode value 10 of AccountAddr value liubei@163.com The domain name of liubei.10, corresponding SPEmailAddr are the domain name 163.com of the AccountAddr.
The AccountAddr's of the entitled SPAddr of user of the SPEmailAddr of two, SPAddr of mode AddrBase, correspondingly, the domain name of the SPEmailAddr by the SPAddr RCode and the SPAddr AccountAddr Domain name composition.For example, corresponding SPAddr value for (liubei@163.com, 10), the user name of corresponding SPEmailAddr is this The AddrBase value liubei of the AccountAddr value liubei@163.com of SPAddr, the domain name for corresponding to SPEmailAddr are The 10.163.com being made of the domain name 163.com of RCode value 10 and the AccountAddr.Behind the present invention as Example, but it is not used in restriction.
For a SPEmailAddr: known AccountAddr therein can be solved from the SPEmailAddr Corresponding RCode is precipitated;Known RCode therein can parse corresponding AccountAddr from the SPEmailAddr.
It particularly, can be from the SPEmailAddr when HCode of the RSvr corresponding to a known SPEmailAddr Parse corresponding AccountAddr and RCode.For example, for SPEmailAddr value liubei@10.163.com, Know that the HCode value is 163.com, then the user name and the HCode that corresponding AccountAddr is SPEmailAddr form Liubei@163.com, corresponding RCode is 10.
Contain a RSvrCompDesc in one SPAddr, the HCode of the RSvrCompDesc is the SPAddr's The RCode of the AddrHome of AccountAddr, the RSvrCompDesc are the RCode of the SPAddr.For example, liubei is in net Easy AccountAddr is that the RSvr of liubei@163.com, the AccountAddr are RSvr-10, and corresponding RCode is 10, Then, the SPAddr of the AccountAddr is (liubei@163.com, 10), and corresponding SPEmailAddr is liubei@ 10.163.com, correspondingly, the RSvrCompDesc of the SPAddr is (163.com, 10).
According to the RSvrCompDesc of a SPAddr, can determine account corresponding to the SPAddr in internet which In one RSvr.In this way, being disappeared according to the SPAddr of an AccountAddr to the transmission of account corresponding to the AccountAddr When breath, so that it may it directly sends this message in the RSvr of the AccountAddr, thus, reduce message detour.
The present invention proposes a kind of message method, for sending message to the corresponding account of an AccountAddr. It is illustrated in figure 4 message method embodiment flow chart of the present invention.In the figure,
First in step 11, the RCode of the acquisition AccountAddr.
Step 12, the SPAddr according to corresponding to the AccountAddr and the RCode of acquisition send message.
The step 11 can be following sub-process:
First in step 11-101, the domain name according to corresponding to the AddrHome of the AccountAddr, pass through domain name solution Analysis obtains the host IP address of RIDSvr pointed by the domain name.
Step 11-102, sent according to obtained IP address to corresponding RIDSvr includes identifying that the guard station identification of target is asked Message is sought, the identification target is the AccountAddr.
Step 11-103, the described RIDSvr determines the corresponding RCode of the identification target after receiving the request message; RCode determined by being replied to the request side.
Step 11-104, the RCode replied is received.In this way, just obtaining the RCode of the AccountAddr.
In step 12, described to be carried out in accordance with the following steps according to a SPAddr transmission message:
Step 12-101, according to the RSvrCompDesc of the SPAddr, corresponding domain name is obtained.
Step 12-102, by domain name mapping, the host IP address of RSvr pointed by the domain name is obtained.
Step 12-103, the IP address obtained according to parsing, Xiang Xiangying RSvr send the message, the destination address of message AccountAddr including the SPAddr.
After corresponding RSvr receives the message, according to the destination address of the message, i.e., the described SPAddr's AccountAddr determines target account, which is ended in the target account.For example, the message is for target account Family sends a short message, then it is described the message ended in into the target account can be the short message is sent to the target account The client at family.
When due to sending message according to a SPAddr, corresponding AccountAddr directly can be sent by a message RSvr in, reduce message detour.Therefore, after step 11, the sender of the message can save obtained described The RCode of AccountAddr, namely the SPAddr of the AccountAddr is saved, in this way, giving this AccountAddr pairs in next time When the account answered sends message, in this way it is no longer necessary to execute the identification operation of guard station described in step 11.
The message including purpose AccountAddr is further: the message including purpose SPEmailAddr.Accordingly Ground, the step R01 is further step R01B: the RSvr determines target account according to the purpose SPEmailAddr.? That is, after the RSvr receives the message including purpose SPEmailAddr from other HSvr, according to the purpose SPEmailAddr determines target account, which is ended in the target account.
The step R01B is further: obtaining the purpose SPEmailAddr according to the HCode value possessed AccountAddr: target account is determined according to the AccountAddr.For example, the SPEmailAddr is liubei@ 10.163.com, which is 163.com, then obtaining corresponding AccountAddr is liubei@163.com.Herein, exist Possessed HCode value can be saved in RSvr.
The step R01B is further: obtaining the purpose SPEmailAddr according to the RCode value being assigned AccountAddr determines target account according to the AccountAddr.For example, the SPEmailAddr is liubei@ 10.163.com, which is 10, then obtaining corresponding AccountAddr is liubei@163.com.Here, in RSvr The RCode value being assigned can be saved.
The corresponding account information of one AccountAddr, which is stored in RSvr, may is that according to the AccountAddr's SPEmailAddr saves account information.For example, RSvr-10 is saved accordingly by the account information table as shown in table 1-1 Account information.
Table 1-1
SPEmailAddr Password ClientIP ClientPort
liubei@10.163.com ******** Corresponding IP address Respective end slogan
xushu@10.163.com ******** Corresponding IP address Respective end slogan
According to table 1-1, the step R01B is further: directly determining target according to the purpose SPEmailAddr Account.
If the RSvr of an AccountAddr changes, for example, since user migrates, by this AccountAddr pairs The account information answered is moved from a RSvr into another RSvr, in this case, according to the AccountAddr's When SPAddr or corresponding SPEmailAddr sends message, after corresponding RSvr receives the message, according to the destination of message Location, the i.e. AccountAddr of the SPAddr or corresponding SPEmailAddr will be unable to determine target account.In this case, The RSvr can be replied to the sender of message indicates replying message for " target account being not present ".
The sender of the message after receiving the replying message of expression " target account is not present " that the RSvr is sent, Message can be retransmitted according to the AccountAddr.Such as the sender of message re-execute the steps 11, is updated with obtaining The RCode of the RSvr of the AccountAddr afterwards, the SPAddr or right of the updated AccountAddr available in this way The SPEmailAddr answered.In this manner it is possible to according to the SPAddr of the updated AccountAddr or corresponding SPEmailAddr retransmits corresponding message.
Since the request side is after receiving the RCode of update, according further to corresponding AccountAddr and new RCode, update The SPAddr or SPEmailAddr of preservation.In this manner it is achieved that good friend address automatically updates.
Generally, in step 11-103, the identification target is also further carried in described reply message.In this way, In step 11-104, when receiving the RCode replied, the identification target is also received.
For example, the request side saves the SPAddr of corresponding good friend.When executing the step 11, by good friend's The AccountAddr of SPAddr receives the packet of reply according to step 11-101 to the process of step 11-104 as identification target Include replying message for the AccountAddr and corresponding RCode.In this manner it is possible to more by the part RCode of the SPAddr of the good friend The new RCode to be received.For example, searching SPAddr attribute and the matched good friend of the AccountAddr from buddy list;It will The part RCode of the SPAddr of the good friend is updated to received RCode.Here, SPAddr and AccountAddr Matching refers to that the AccountAddr is the AccountAddr of the SPAddr.
Further for example, the request side saves the SPEmailAddr of corresponding good friend.When executing the step 11, by one The AccountAddr of the SPEmailAddr of a good friend is as identification target, according to step 11-101 to the stream of step 11-104 Journey receives the replying message including the AccountAddr and corresponding RCode of reply.In this manner it is possible to according to this AccountAddr and corresponding RCode obtains a new SPEmailAddr, i.e. NewSPEmailAddr, and by the good friend's SPEmailAddr is updated to NewSPEmailAddr.For example, searching SPEmailAddr attribute from buddy list and being somebody's turn to do The SPEmailAddr of the good friend is updated to the NewSPEmailAddr by the matched good friend of AccountAddr.It can mention below To how from a SPEmailAddr parsing corresponding AccountAddr.
Here, a SPEmailAddr is matched with an AccountAddr and is referred to, the two meets following condition:
{ user name of the SPEmailAddr and the user name of the AccountAddr are identical, the domain name of the SPEmailAddr It is the subdomain name of the domain name of the AccountAddr }
Particularly, described to be further to RCode determined by the reply of the request side in step 11-103: according to The AccountAddr and corresponding RCode obtain new SPEmailAddr, i.e. NewSPEmailAddr, to the request side Reply NewSPEmailAddr.
In this way, the request side after receiving described reply message, can directly be determined according to the NewSPEmailAddr Corresponding good friend updates the address of the good friend with the NewSPEmailAddr.
For example, the request side saves the SPEmailAddr of corresponding good friend.When executing guard station identification operation, receive It is described reply message in include new SPEmailAddr, i.e. NewSPEmailAddr.It is replied receiving After NewSPEmailAddr, SPEmailAddr attribute and the matched good friend of the NewSPEmailAddr are searched from buddy list; The SPEmailAddr of the good friend is updated to the NewSPEmailAddr.
For two SPEmailAddr:SPEmailAddr-A and SPEmailAddr-B, the two matching refers to, full The following condition of foot:
{ user name of SPEmailAddr-A and the user name of SPEmailAddr-B are identical, and the domain of SPEmailAddr-A Last two subdomains of name are identical as last two subdomains of the domain name of the SPEmailAddr-B }.Such as liubei@ 86.10.163.com being matched with liubei@86.28.163.com.
Alternatively, for two SPEmailAddr:SPEmailAddr-A and SPEmailAddr-B, the two matching is Refer to, meet following condition:
{ for the two other than the lowermost level subdomain of domain name is different, other parts are all identical }.Such as liubei@ 8610.163.com being matched with liubei@8628.163.com.
Therefore by receiving that respective server from HSvr replys about AccountAddr's RCode, or about the SPEmailAddr of an AccountAddr, the address that corresponding good friend may be implemented is automatically updated.
The invention also provides a kind of guard station recognition methods, with corresponding for being obtained according to a SPEmailAddr RCode.Due to guard station, identification requestor is not required to the formation rule it is to be understood that a SPEmailAddr, this method has more Good scalability.This method comprises the following steps:
Step 01B, according to the domain name of the SPEmailAddr, the host of pointed RSvr is obtained by domain name mapping IP address;
Step 02B, being sent according to obtained IP address to the RSvr includes identifying that the guard station of target identifies request message, The identification target is the SPEmailAddr;
Step 04B, the RCode replied is received.
Before step 04B, step 03B can further include: after the RSvr receives the request message, to correspondence RIDSvr send include identification target guard station identify request message, the identification target is the SPEmailAddr or institute State the corresponding AccountAddr of SPEmailAddr;The RIDSvr determines the identification mesh after receiving the request message Mark corresponding RCode;The corresponding RCode of the identification target is sent to the RSvr;The RSvr is receiving the identification target pair After the RCode answered, the RCode is replied to the request side.
The RSvr or RIDSvr can save possessed HCode, the RSvr or the RIDSvr can root Corresponding AccountAddr is obtained with the HCode possessed according to the user name of a SPEmailAddr.The RIDSvr according to The AccountAddr determines corresponding RCode.Certainly, the RSvr can also save the RCode being assigned, according to this RCode parses corresponding AccountAddr from the SPEmailAddr.
It is corresponding the request message to be sent to after the RSvr receives the request message in step 03B Before RIDSvr, target account first can also be determined according to the SPEmailAddr, see whether determine, if it is determined that arrived, then Directly the RCode oneself being assigned is replied to the request side;Otherwise the request message is just sent to corresponding RIDSvr.
It is described to reply the RCode in step 03B, it may furthermore is that, according to the RCode and described corresponding AccountAddr obtains a new SPEmailAddr, i.e. NewSPEmailAddr, and directly replying should NewSPEmailAddr。
The present invention also proposes a kind of method for sending message according to a SPEmailAddr, and this method comprises the following steps:
Step 51, using the SPEmailAddr as the destination address of message, send the message.
Corresponding RSvr determines target account according to the destination address of message after receiving the message, if it is determined that it arrives, The message is then ended in into the target account, otherwise, the reply letter for indicating " target account is not present " is replied to sender of the message Breath.
Step 55, after receiving the return information for indicating " target account is not present ", it is corresponding to obtain the SPEmailAddr RCode.
Step 56, the corresponding RCode of the SPEmailAddr according to acquisition, obtain a new SPEmailAddr, i.e., NewSPEmailAddr;Using the NewSPEmailAddr as the destination address of message, the message is retransmitted.
In step 55, the corresponding RCode of described acquisition SPEmailAddr is further: according to the SPEmailAddr Obtain an AccountAddr;The corresponding RCode of the AccountAddr is obtained according to the first above-mentioned guard station recognition methods.
In step 55, the corresponding RCode of described acquisition SPEmailAddr is further: staying according to above-mentioned second Ground recognition methods directly acquires the corresponding RCode of the SPEmailAddr.
It is described an AccountAddr is obtained according to a SPEmailAddr to may is that from the domain of the SPEmailAddr Remove a lowermost level subdomain in name, using the remaining address Email as the AccountAddr.For example, described SPEmailAddr is liubei@8610.163.com, removes a lowermost level subdomain from the domain name of the SPEmailAddr, is remained Under the address Email be liubei@163.com.
Particularly, for from the aspect of to scalability, when saving the buddy list of an IUsr, for corresponding good friend SPEmailAddr, a RCode length (RCodeLength, RCode Length) attribute is set, to indicate this Having several subdomains in the domain name of SPEmailAddr is RCode.In this way, obtaining one according to a SPEmailAddr It when AccountAddr, can be determined from the domain name of the SPEmailAddr, be removed several rudimentary according to RCodeLength value Subdomain, to obtain corresponding AccountAddr.For example, the SPEmailAddr of some good friend is liubei@ 86.10.163.com, corresponding RCodeLength=2, in this way, from SPEmailAddr value liubei@86.10.163.com's Remove 2 rudimentary subdomains 86.10 in domain name, corresponding AccountAddr value liubei@163.com can be obtained.
Certainly, when saving the buddy list of an IUsr, the SPEmailAddr of corresponding good friend, setting can also be directed to One AddrHome length (AddrHomeLength, AddrHome Length) attribute, to indicate this SPEmailAddr pairs There are several subdomains in the AddrHome of the AccountAddr answered.In this way, obtaining one according to a SPEmailAddr It when AccountAddr, can be determined from the domain name of the SPEmailAddr, be retained several according to AddrHomeLength value Advanced subdomain, to obtain corresponding AccountAddr together with corresponding user name.For example, some good friend SPEmailAddr is liubei@8628.163.com, corresponding AddrHomeLength=2, in this way, from SPEmailAddr value Retain 2 advanced subdomains in the domain name of liubei@8628.163.com can be obtained together with corresponding user name liubei Corresponding AccountAddr value liubei@163.com.
Due to the inhabitation of people or the relative stability in place of working, the SPEmailAddr by an IUsr come When sending message to the IUsr, the return information for indicating " target account is not present " not will receive generally.In this manner it is possible to Message detour generally existing in current internet is reduced to a great extent.
In step 03 or step 03B, the source address side of the message after receiving the corresponding RCode replied, The address informations such as the SPAddr or SPEmailAddr saved for corresponding good friend can be updated.
Generally, in step 03B, it is described reply message in further carry corresponding identification target.
After the RSvr receives the message Msg1 including purpose AccountAddr from other HSvr, in step R01 In, when that can not determine target account according to the AccountAddr, following process can also be first carried out, is then terminated.The stream Journey is as follows:
Step R03, the described RSvr sends guard station to corresponding RIDSvr and identifies request message, includes in the request message Identification target is the AccountAddr.
Step R04, after the described RIDSvr receives identification request, the RCode of the AccountAddr, Xiang Suoshu are obtained RSvr replys the RCode obtained;
Step R05, after the RSvr receives described reply message, to described in the reply of the source address side of message Msg1 RCode。
Certainly, in step R03, the source address of message Msg1 can also be further carried in the identification request, accordingly Ground, in step R04, the RIDSvr is after the RCode for obtaining the AccountAddr, directly to the source of message Msg1 The RCode obtained is replied in location side, and no longer executes step R05.
The message Msg1 including purpose AccountAddr is the message Msg1 for including purpose SPEmailAddr, accordingly Ground:
Step R03 is further step R03B: the RSvr sends guard station to corresponding RIDSvr and identifies request message, asks Seeking the identification target for including in message is the SPEmailAddr or corresponding AccountAddr of the SPEmailAddr.
Step R04 is further step R04B: after the RIDSvr receives identification request, according to described The corresponding AccountAddr of SPEmailAddr, obtains corresponding RCode, and Xiang Suoshu RSvr replys the RCode obtained;
Step R05 is further step R05B: after the RSvr receives described reply message, to the source of message Msg1 Reply received RCode in location side.
Certainly, in step R03B, the source address of message Msg1 can also be further carried in the identification request, accordingly Ground, in step R04B, the RIDSvr is directly replied to the source address side of message Msg1 after obtaining corresponding RCode The RCode of acquisition, and no longer execute step R05B.
The RSvr or RIDSvr can be obtained according to the user name of the HCode and the SPEmailAddr that are possessed To corresponding AccountAddr.The RIDSvr determines corresponding RCode according to corresponding AccountAddr.Such as it should HCode is 163.com, which is liubei@10.163.com, and corresponding obtained AccountAddr is liubei@163.com.Here, the RIDSvr can save the HCode of corresponding HSvr.
One RSvr can save possessed HCode.In this way, the RSvr may determine that whether a certain HCode is certainly Oneself is possessed.
After RSvr receives the message from other HSvr, the purpose of the message can also be first judged Whether the AddrHome of AccountAddr is possessed by oneself, determines target according to the AccountAddr if so, just executing Otherwise account and subsequent corresponding operation directly terminate.
In HSvr of the present invention, the RSvr includes purpose receive in this HSvr other RSvr After the message of AccountAddr or SPEmailAddr, it is referred to RSvr described above and is receiving the packet from other HSvr After the message for including purpose AccountAddr or SPEmailAddr, used processing mode.
It, can be according to after the RSvr receives the message including purpose SPAddr or SPEmailAddr from client Above-mentioned message method directly sends the message according to the SPAddr or SPEmailAddr.
In reality, also settable RSvr routing table, the link information for other RSvr in register HSvr (RSvrConnDesc, RSvr Connection Description).Referring to the RSvr routing table as shown in table 7-1:
Table 7-1
In table 7-1, the RSvr routing table data of RSvr-10 is saved.It is stepped in the table according to the RCode of a RSvr The RSvrConnDesc of the RSvr is remembered.
The RSvrConnDesc can be the communication link number of corresponding RSvr, may correspond to the TCP of corresponding RSvr The socket descriptor (SktD, Socket Descriptor) of connection.
For the present invention is with { RSvrConnDesc is the IP address of corresponding RSvr, and arranges unified port numbers }.
After the RSvr receives the message including purpose SPAddr or SPEmailAddr from client, according to this The corresponding RCode value of SPAddr or SPEmailAddr obtains the IP address of corresponding RSvr according to set RSvr routing table; According to the port numbers of the IP address and agreement, the message is sent to corresponding RSvr, the destination address of message can be described AccountAddr or SPEmailAddr corresponding to purpose SPAddr or SPEmailAddr.
Particularly, after the RSvr receives the message including purpose SPAddr or SPEmailAddr from client, also It can first judge whether the corresponding RSvrCompDesc of the SPAddr or SPEmailAddr is directed toward oneself, if it is, direct root Target account is determined according to corresponding AccountAddr, and the message is ended in into identified target account, is then terminated.
After RSvr receives the message including purpose AccountAddr from client, can first it obtain described The RCode of AccountAddr, then the SPAddr according to corresponding to the AccountAddr and the RCode of acquisition or SPEmailAddr sends message.
The RCode that owned HCode can be saved in RSvr and oneself be assigned.In this way, RSvr can sentence Whether a certain RSvrCompDesc that breaks is directed toward oneself.For example, the RSvr judges the HCode of the RSvrCompDesc for oneself institute Possess, and when the RCode of the RSvrCompDesc is the RCode oneself being assigned, that is, judge the RSvrCompDesc be directed toward from Oneself.
Since the design about HSvr is encapsulated within HSvr, so that different SP is not required to the HSvr it is to be understood that other SP Design scheme, and how corresponding RIDSvr to realize guard station identification operation, therefore, has preferably open.
Example one, the RIDSvr determine the corresponding RCode of the identification target by inquiring corresponding RSvr.
1.1, step S11 is further step S11A: it includes the identification mesh that the RIDSvr is sent to corresponding RSvr Target query messages;Corresponding RSvr searches target account after receiving the query messages, according to the identification target, if looked into It finds, then sends the response to query message for indicating " target account presence " to the RIDSvr;The RIDSvr receives corresponding RSvr After the response to query message sent, using the RCode of the RSvr as the corresponding RCode of the identification target.Obviously, described RIDSvr can establish the corresponding relationship of RCode value Yu corresponding RSvr link information, in this way, according to corresponding to response to query message Link information, can determine the RCode of corresponding RSvr.Certainly, the RSvr can save the RCode being assigned, described to look into Ask the RCode that the RSvr can be further carried in replying message.
If all RSvr do not find corresponding target account, the RIDSvr according to the identification target It just can not receive the response to query message for indicating " target account presence ", at this moment, which can reply to the request side RCode value 0.
Example two, the mapping relations for pre-establishing AccountAddr and RCode, to press according to an AccountAddr Corresponding RCode can be determined according to the mapping relations.In the RSvr indicated by the RCode, the corresponding account of the AccountAddr Family is the mapping account of the RSvr, is also the mapping account of the AccountAddr.
In reality, the mapping relations of AccountAddr and RCode can be established by directly hashing mode.
With { RCode that the RCode that the RCode of RSvr-10 is 1, RSvr-20 is 2, RSvr-21 is 3, RSvr-28's RCode is 4 } for.The hashing algorithm of selection may is that the initial of the AddrBase with the AccountAddr is corresponding The ASCII value of lowercase carries out modulo operation to 4, and obtained remainder is one of 0,1,2,3 etc. four numbers, and gained remainder is added 1, obtain the HashValue of the AccountAddr.Directly using the HashValue of an AccountAddr as corresponding RCode。
For example, corresponding initial is l for AccountAddr value liubei@163.com, ASCII value is 108, modulo operation is carried out to 4, obtaining remainder is 0, and adding 1 to obtain corresponding RCode value the remainder is 1.
Preferably, establishing the mapping relations of AccountAddr and RCode by hashing mode indirectly.
In this case, the RCode can be a coding, such as: jing, guang, hu;Be also possible to one by Multiple subdomain strings that point connects, such as: shen.guang.Certainly, the RCode is also possible to the corresponding location RSvr Fixed-line telephone area code, for example, the RCode that the RCode that the RCode of RSvr-10 is 10, RSvr-20 is 20, RSvr-21 is 21, The RCode of RSvr-28 is 28.
The corresponding relationship that HashValue Yu RCode value are established in the RIDSvr, referring to as shown in Table 2 The mapping table of HashValue and RCode value:
Table 2
HashValue RCode Remark
4、8、12 10 Corresponding RSvr-10
1、2、7、9 20 Corresponding RSvr-20
0、5、11 21 Corresponding RSvr-21
3、6、10 28 Corresponding RSvr-28
In table 2,1,2,7,9 etc. four HashValue correspond to RCode value 20, that is, correspond to RSvr-20.
The hashing algorithm of selection are as follows: with the corresponding lowercase of the initial of the AddrBase of the AccountAddr ASCII value carries out modulo operation to 13, obtains the HashValue of the AccountAddr.
In this way, the RIDSvr carries out hash operations to an AccountAddr according to the hashing algorithm of selection, obtain One HashValue;It is corresponding with RCode value that the RIDSvr according to the HashValue searches HashValue as shown in Table 2 Relation table, to obtain corresponding RCode value.For example, for AccountAddr value liubei@163.com, it is corresponding Initial is l, and ASCII value 108 carries out modulo operation to 13, and obtaining remainder is 4;According to HashValue value 4, from table 2 Finding corresponding RCode value is 10.
The mapping relations that AccountAddr and RCode are established by hashing mode indirectly, due to can be according to one The quantity of real account corresponding to HashValue adjusts RCode corresponding to the HashValue, so that one Corresponding RSvr can admirably achieve load balancing in HSvr.Below as example.
2.1, the step S11 is further step S11B: the RIDSvr is according to the identification target, according to foundation AccountAddr determines corresponding RCode with the mapping relations of RCode.
Such as: the AccountAddr of sunquan is sunquan@qq.com, and corresponding RCode is 25, is directed toward qq.com It is located at the RSvr in Nanjing in corresponding service-domain.It to AccountAddr is liubei@163.com's by the account of sunquan When account sends message, following process can be executed:
Step 101 sends identification request message in guard station to the RIDSvr of the liubei@163.com HSvr belonged to, and request disappears The identification target for including in breath is liubei@163.com, and source address is sunquan@qq.com or SPAddr value (sunquan@ Qq.com, 25).
For example, the AddrHome value 163.com to liubei@163.com carries out domain name mapping, obtain pointed by the domain name RIDSvr host IP address;According to the IP address, guard station is sent to the RIDSvr and identifies request message, in the request message Including identification target be liubei@163.com, source address be sunquan@qq.com or SPAddr value (sunquan@ Qq.com, 25).
Step 102, the RIDSvr, according to the scattering algorithm, are obtained after receiving the guard station identification request message The HashValue of liubei@163.com is 4;According to HashValue value 4, from HashValue as shown in Table 2 and RCode value Mapping table in obtain RCode value 10;Then obtained RCode value 10 is replied to the request side.
The step 101 and step 102 actually accomplish guard station identification operation.For example, the corresponding visitor of sunquan@qq.com Family end sends message to the RSvr of ownership, and the destination address of message is liubei@163.com, and source address is sunquan@ qq.com;After the corresponding RSvr of sunquan@qq.com receives the message, step 101 is executed.
Step 103, this side sunquan qq.com RSvr in the RCode value 10 for receiving the RIDSvr and replying Afterwards, the SPAddr value according to corresponding to AccountAddr value liubei@163.com and RCode value 10 (liubei@163.com, 10) message Msg1 is sent, the destination address of the message is the AccountAddr value liubei@163.com of the SPAddr, source Location is sunquan@qq.com or SPAddr value (sunquan@qq.com, 25).
For example, according to the RSvrCompDesc value (163.com, 10) of the SPAddr value (liubei@163.com, 10), Obtain corresponding domain name 10.163.com;By domain name mapping, the host IP address of RSvr-10 pointed by the domain name is obtained; Message Msg1 is sent to RSvr-10, the destination address of the message is the AccountAddr value liubei@of the SPAddr 163.com, source address are sunquan@qq.com or SPAddr value (sunquan@qq.com, 25).
After step 104, RSvr-10 receive message Msg1, determined according to the destination address liubei@163.com of the message Target account.
The message is ended in the target account by step 105.For example, the message is to be used to send a short message, Then the message is ended in the target account by RSvr-10 is: the short message is launched to the corresponding account of liubei@163.com In the inbox at family, or it is sent to the client of the account.In this way, other side can receive the information.
In step 103, the RSvr of this side sunquan qq.com can also save corresponding SPAddr value (liubei@163.com, 10), in this way, when sending message to the account of liubei@163.com next time, in this way it is no longer necessary to hold Row step 101 and step 102.
The step 103 be also possible to the RSvr of this side step 103B:sunquan qq.com receive it is described After the RCode value 10 that RIDSvr is replied, according to by the corresponding SPEmailAddr value of liubei@163.com and RCode value 10 Liubei@10.163.com sends message Msg1, and the destination address of the message is liubei@10.163.com, and source address is Sunquan@qq.com or SPAddr value (sunquan@qq.com, 25).Correspondingly, the step 104 is further step After 104B:RSvr-10 receives the message, target account is determined according to destination address liubei@10.163.com.
In step 103, the RSvr of this side sunquan qq.com is in the RCode value for receiving the RIDSvr reply After 10, which can also be replied to the corresponding client of sunquan@qq.com, saved by the client corresponding SPAddr value (liubei@163.com, 10), in this way, when sending message to the account of liubei@163.com next time, directly Destination address by the SPAddr value (liubei@163.com, 10) as message.
The HCode value saved in the RSvr of this side liubei 163.com is 163.com.
It is described to determine that target account may is that basis according to destination address liubei@10.163.com in step 104B AccountAddr value corresponding to the user name liubei of the liubei@10.163.com and HCode value 163.com of preservation Liubei@163.com determines target account.
According to table 1-1, in step 104B, RSvr-10 can be directly according to the destination address liubei@of message 10.163.com determining target account.
The RIDSvr can be according to an AccountAddr, according to the mapping of the AccountAddr and RCode of foundation Relationship obtains corresponding RCode.But but it not can determine that whether the AccountAddr has corresponded to effective account.
2.2, the step S11 is further following sub-process:
Step S11.2.101, the described RIDSvr is according to the identification target, according to the AccountAddr and RCode of foundation Mapping relations determine corresponding RCode.
Step S11.2.102, it includes looking into for the identification target that the described RIDSvr is sent to the corresponding RSvr of the RCode Ask message.
Step S11.2.103, after the RSvr receives the query messages, target account is searched according to the identification target Family sends the response to query message for indicating " target account presence " to the RIDSvr if found.
Step S11.2.104, the inquiry that the described RIDSvr receives the expression " target account presence " that corresponding RSvr is sent is returned After multiple message, using identified RCode as the RCode of the identification target.
In step S11.2.103, if searching fall short account, the RSvr sends to the RIDSvr and indicates The response to query message of " target account is not present ".Correspondingly, in step S11.2.104, the RIDSvr is received accordingly After the response to query message for the expression " target account is not present " that RSvr is sent, confirmation identification target is invalid.In this case, should RCode of the RIDSvr by RCode value 0 as the identification target.In this way, in step s 12, the RIDSvr is to the request Reply RCode value 0 in side.
2.3, the step S11 is further step S11D: the RIDSvr is according to the identification target, according to foundation AccountAddr determines corresponding RCode with the mapping relations of RCode.The step S12 is further following sub-process:
Step S12.2.101, the request message is directly sent to the corresponding RSvr of the RCode by the described RIDSvr.
Step S12.2.102, it after the described RSvr receives the request message, is assigned to request side reply RCode。
In step S12.2.102, execute the RCode's being assigned to request side reply in the RSvr Before operation, it can also further determine whether that there are the corresponding accounts of the identification target, if it does, just executing the behaviour Make;Otherwise, directly terminate or reply RCode value 0 to the request side.
According to one of the various situations of above-mentioned example two, after establishing the mapping relations of AccountAddr and RCode, one AccountAddr is hashed rule and is mapped to specified RSvr, if by the corresponding account information of the AccountAddr from being mapped RSvr move in other RSvr, will be unable to address.In this way, the needs that IUsr is migrated cannot be met.
In reality, due to the generation migrated, an IUsr can be made to be mapped to far from its AccountAddr RSvr.For example, liubei lives in Beijing originally, and it is closer away from RSvr-10, therefore, according to AccountAddr value liubei@ 163.com accesses oneself account in RSvr-10, fast.Later, the standby another name for Sichuan Province that enters for adopting Zhuge Liang of Liu was suggested, was come Chengdu, it is away from RSvr-28 closer.But since the standby account of Liu cannot move (because after moving RSvr-28, according to example Described in two, it cannot be correctly validated guard station information, to cannot achieve desired address), therefore, Liu is standby must to be accessed in Pekinese RSvr-10.In this way, long-distance data access is just produced, thus, more Internet resources can be consumed.
Table is migrated in example three, foundation, is migrated in table at this, is saved corresponding RCode according to AccountAddr.
Table is migrated referring to as shown in table 3.
Table 3
AccountAddr RCode Remark
caocao@163.com 10 Corresponding RSvr-10
liubei@163.com 28 Corresponding RSvr-28
guanyunchang@163.com 20 Corresponding RSvr-20
zhangliao@163.com 21 Corresponding RSvr-21
xushu@163.com 10 Corresponding RSvr-10
Table is migrated according to as shown in table 3, corresponding RCode value can be searched according to an AccountAddr value.
Step S11 is further step S11E: the RIDSvr is searched according to the identification target from described migrate in table Corresponding RCode.If searched less than by 0 as RCode value.
The mapping relations that AccountAddr and RCode can also further be established, referring to above-mentioned example two.Correspondingly, in step In rapid S11E, from it is described migrate search in table less than corresponding RCode when, yet further still according to the identification target, according to The mapping relations of the AccountAddr and RCode of foundation determine corresponding RCode, using the RCode as target RCode.It is this In the case of, inquiry instruction can also be sent to RSvr pointed by the RCode, carry the identification target in instruction, accordingly After RSvr receives the inquiry instruction, according to the identification target, corresponding account is searched, and will be with the presence or absence of corresponding account Query result replies to the RIDSvr, after which receives reply, in judgement there are when corresponding account, by the RCode As target RCode, otherwise, target RCode value is used as by 0.
Since the table of migrating may be very huge, accordingly, it is possible to which access bottleneck can be generated.
Present invention particularly provides a kind of guard stations to identify message treatment method, and this method presets message distribution module and more A guard station enquiry module, sublist is migrated in setting in the guard station enquiry module, for according to corresponding AccountAddr preservation pair The RCode answered.The mapping relations of AccountAddr Yu corresponding guard station enquiry module are established, so as to the message distribution module energy Enough according to an AccountAddr, according to the mapping relations established, to determine corresponding guard station enquiry module.
Described method includes following steps:
It includes identifying that the guard station of target identifies request message that step 81, the message distribution module, which receive, according to the knowledge Other target determines corresponding guard station inquiry according to the mapping relations of the AccountAddr and corresponding guard station enquiry module that are established Module;Then step 82 or step 82B are executed.
The step 82 is: sending to identified guard station enquiry module includes the query messages for identifying target;Institute State after guard station enquiry module receives the query messages, according to the identification target, from migrate in sublist search it is corresponding The RCode is sent to the message distribution module by RCode;After the message distribution module receives the response to query message, to Reply received RCode in the request side.
The step 82B is: the request message is sent to identified guard station enquiry module;The guard station enquiry module After receiving the request message, according to the identification target, corresponding RCode is searched from migrating in sublist;It is returned to the request side The multiple RCode.
Message treatment method is identified according to the guard station, and present invention further proposes a kind of distribution RIDSvr.
A kind of distribution RIDSvr, including at least one hash server (HashSvr, Hash Server) and multiple move Query service of moving device (QSvr, Roam Query Server).Distributed RIDSvr as shown in Figure 5 includes in the RIDSvr One HashSvr and three QSvr:QSvr1, QSvr2, QSvr3.The HCode of the HashSvr and QSvr is this The HCode of RIDSvr is also the HCode of this HSvr.
The HashSvr is for receiving guard station identification request message.That is, the RIDSvr is connect by the HashSvr It receives guard station and identifies request message.
Sublist is migrated in setting in the QSvr, for saving corresponding RCode according to corresponding AccountAddr.
The mapping relations of AccountAddr and QSvr are established, so as to according to an AccountAddr, according to what is established Mapping relations can determine corresponding QSvr.The QSvr is the QSvr of AccountAddr mapping, referred to as the AccountAddr QSvr.
According to the mapping relations of the AccountAddr and QSvr of foundation, correspondence can be determined according to an AccountAddr QSvr.In this manner it is possible to save corresponding RCode according to the AccountAddr in migrating in sublist for the QSvr.
After the guard station identification request message that the HashSvr receives that includes an identification target, following process is executed:
Step S31, the described HashSvr is according to the identification target, according to reflecting for the AccountAddr and QSvr established Relationship is penetrated, determines corresponding QSvr;Sending to the QSvr includes the query messages for identifying target.
Step S32, it after the described QSvr receives the query messages, according to the identification target, is searched from migrating in sublist Corresponding RCode;Judge whether to find, if found, by response to query message, which is sent to described HashSvr;Otherwise, by response to query message, RCode value 0 is sent to the HashSvr.
Step S33, it after the described HashSvr receives the response to query message, is replied to the request side received RCode。
After the guard station identification request message that the HashSvr receives that includes an identification target, it is also possible to execute such as Lower process:
Step S41, the described HashSvr is according to the identification target, according to reflecting for the AccountAddr and QSvr established Relationship is penetrated, determines corresponding QSvr;The request message is sent to the QSvr.
Step S42, it after the described QSvr receives the request message, according to the identification target, is searched from migrating in sublist Corresponding RCode;Judge whether to find, if found, replys the RCode to the request side;Otherwise, to the request Reply received RCode value 0 in side.
The step 01 is further: according to domain name corresponding to the AddrHome of the AccountAddr, passing through parsing The domain name obtains the host IP address of pointed HashSvr.Correspondingly, the step 02 is further: according to obtained IP The port numbers of address and agreement, it includes identifying that the guard station of target identifies request message, the identification mesh that Xiang Suoshu HashSvr, which is sent, It is designated as the AccountAddr.Here unify the port numbers of agreement HashSvr.
The mapping relations for establishing AccountAddr and QSvr may include following two parts:
1, selection hashing algorithm can obtain a HashValue from an AccountAddr according to the hashing algorithm.
2, link information (QSvrConnDesc, the QSvr Connection of HashValue Yu corresponding QSvr are established Description corresponding relationship).
In this way, according to the mapping relations of the AccountAddr and QSvr that are established, it can according to an AccountAddr To obtain the QSvrConnDesc of a QSvr, in this manner it is possible to be disappeared according to obtained QSvrConnDesc to QSvr transmission Breath.
The hashing algorithm of selection can be with are as follows: with the corresponding small letter of the initial of the AddrBase of the AccountAddr Female ASCII value carries out modulo operation to 13, obtains the HashValue of the AccountAddr.
The corresponding relationship of the QSvrConnDesc of the HashValue and corresponding QSvr may refer to as shown in table 6 The mapping table of HashValue and QSvrConnDesc:
Table 6
HashValue QSvrConnDesc Remark
3、4、7、10 The QSvrConnDesc of QSvr1 Corresponding QSvr1
0、1、2、6、8 The QSvrConnDesc of QSvr2 Corresponding QSvr2
5、9、11、12 The QSvrConnDesc of QSvr3 Corresponding QSvr3
In table 6,0,1,2,6,8 etc. five HashValue correspond to QSvr2.
In this way, carrying out hash operations by above-mentioned hashing algorithm to an AccountAddr, obtaining one HashValue searches the corresponding relationship of HashValue and QSvrConnDesc value as shown in table 6 according to the HashValue Table, to obtain the QSvrConnDesc of corresponding QSvr.
The QSvrConnDesc can be the communication link number of corresponding QSvr, may correspond to the TCP of corresponding QSvr The socket descriptor (SktD, Socket Descriptor) of connection.
For the present invention is with { QSvrConnDesc is the IP address of corresponding QSvr, and arranges unified port numbers }.
If the HashValue is directly corresponding QSvrConnDesc, HashValue and corresponding is not needed to establish The corresponding relationship of the QSvrConnDesc of QSvr.
In reality, an inquiry code (QCode, Query Code) can be assigned for QSvr each in RIDSvr, with In in a corresponding QSvr of RIDSvr acceptance of the bid knowledge.For example, the QCode that QSvr1, QSvr2 and QSvr3 are assigned is respectively 1,2 With 3.The QCode that can be the QSvr is believed in the connection of the QSvr.
Referring to the mapping table of HashValue and QCode value as shown in Table 6-1:
Table 6-1
HashValue QCode Remark
3、4、7、10 1 Corresponding QSvr1
0、1、2、6、8 2 Corresponding QSvr2
5、9、11、12 3 Corresponding QSvr3
In table 6-1,0,1,2,6,8 etc. five HashValue correspond to QCode value 2, that is, correspond to QSvr2.
In this way, carrying out hash operations by above-mentioned hashing algorithm to an AccountAddr, obtaining one HashValue searches the mapping table of HashValue and QCode value as shown in Table 6-1 according to the HashValue, thus Obtain corresponding QCode value.
A domain name can be generated with the HCode possessed according to the QCode of a QSvr, and in corresponding DNS, it will The domain name is directed toward the host IP address of the QSvr.
For example, the HCode of the HSvr is 163.com, wherein the QCode of a certain QSvr is 3, then it, can when generating domain name Word string " QSvr " as subdomain, is obtained a domain name QSvr.163.com together with 163.com, then again by 3 as son Domain generates domain name 3.QSvr.163.com.In DNS, 3.QSvr.163.com is directed toward to the host IP address of the QSvr.This Sample, the HashSvr can obtain a domain name with the HCode possessed according to the QCode of a QSvr, should by parsing Domain name obtains the host IP address of the QSvr.
In reality, information exchange between HashSvr and QSvr is the information exchange inside RIDSvr, therefore, can be with The SP as belonging to corresponding the RIDSvr corresponding connection type of flexible choice and communication protocol according to actual needs.
After the distribution RIDSvr is disposed, so that it may in corresponding DNS that the HCode of the RIDSvr is corresponding Domain name is directed toward the host IP address of the HashSvr of the RIDSvr.
For the distribution RIDSvr, the step 11 is further following sub-process:
Step 11-201, send to corresponding HashSvr includes identifying that the guard station of target identifies request message, the identification Target is the AccountAddr.For example, the domain name according to corresponding to the AddrHome of the AccountAddr, passes through domain name solution Analysis obtains the host IP address of HashSvr pointed by the domain name, and sending according to the IP address to the HashSvr includes identification mesh Target guard station identifies request message, and the identification target is the AccountAddr.
Step 11-202, the described HashSvr is after receiving the request message, according to the identification target, according to being built The mapping relations of vertical AccountAddr and QSvr, determine corresponding QSvr;Sending to the QSvr includes the identification target Query messages.For example, determining that the identification target is corresponding according to the mapping relations of the AccountAddr and QSvr that are established The QSvrConnDesc of QSvr;According to the QSvrConnDesc, the query messages are sent to corresponding QSvr.
Step 11-203, it after the described QSvr receives the query messages, according to the identification target, is looked into from migrating in sublist Look for corresponding RCode;Judge whether to find, if found, by response to query message, the RCode inquired is sent out Give the HashSvr;Otherwise, by response to query message, RCode value 0 is sent to the HashSvr.
Step 11-204, it after the described HashSvr receives the response to query message, is replied to the request side received RCode。
In step 11-203 or step 11-204, the response to query information or the request reply message in can be into One step carries the identification target.
In reality, the QSvr can be deployed on the server where the RSvr.RSvr as shown in FIG. 6 is folded Add the distributed HSvr of QSvr.In the HSvr, have in the RIDSvr HashSvr and three QSvr:QSvr1, QSvr2,QSvr3.Wherein, QSvr1 and RSvr-10 are deployed in the same server, and QSvr2 and RSvr-20 is deployed in same In a server, QSvr3 and RSvr-21 are deployed in the same server.
Particularly, RSvr can also directly be allowed to realize QSvr function.In this case, negative if ignoring data redundancy etc. Factor will can also migrate accordingly sublist and be merged into the account information table of corresponding RSvr.Referring in the following example four.
Example four, the mapping relations based on the AccountAddr and RCode established in example two, also further progress are migrated Configuration.
It migrates configuration for example, described and refers to: increasing RCode field, in account information table to be used to indicate an account Resettlement purpose RSvr.Correspondingly, in the resettlement purpose RSvr of an account, create the account moves in Account History.Example Such as, the RSvr saves corresponding account information according to the account information table as shown in table 1-8.
Table 1-8
AccountAddr Password RCode ClientIP ClientPort
caocao@163.com ******** 10 Corresponding IP address Respective end slogan
liubei@163.com ******** 10 Corresponding IP address Respective end slogan
guanyunchang@163.com ******** 28 Corresponding IP address Respective end slogan
zhangliao@163.com ******** 10 Corresponding IP address Respective end slogan
xushu@163.com ******** 10 Corresponding IP address Respective end slogan
In table 1-8, when the RCode attribute value of an account is the RCode of current RSvr, if the account is current The mapping account of RSvr then illustrates that the account does not move;Otherwise, illustrate that the account is to move in account.When account When the RCode of RCode attribute value and current RSvr are inconsistent, then the account is one and moves out account.
By the mapping relations according to the AccountAddr and RCode that are established, AccountAddr value is obtained: Caocao@163.com, liubei@163.com, guanyunchang@163.com, zhangliao@163.com and xushu@ The RCode value of 163.com etc. is respectively as follows: 10,10,10,21 and 28, therefore, when the current RSvr is RSvr-10, in table In 1-8, the corresponding account of caocao@163.com and liubei@163.com is not moved;Zhangliao@163.com is corresponding Account be move in account, moved out by RSvr-21;The corresponding account of xushu@163.com is to move in account, is removed by RSvr-28 Out;The corresponding account of guanyunchang@163.com is to move out account, is moved in RSvr-28.
If an account is not mapping account, and its RCode attribute value is not directed to current RSvr again, then illustrates the account Data invalid deletes account data in account information table shown in Ying Congru table 1-8.
Generally, the RSvr saves the RCode oneself being assigned.
4.1, step S11 is further following sub-process:
Step S11.4.101, the described RIDSvr is according to the identification target, according to the AccountAddr and RCode of foundation Mapping relations determine corresponding RCode.
Step S11.4.102, it includes looking into for the identification target that the described RIDSvr is sent to the corresponding RSvr of the RCode Ask message.
Step S11.4.103, the described RSvr is after receiving the query messages, according to the identification target, Cong Rubiao 1-8 Shown in search target account in account information table, if found, using the RCode attribute value of the target account as inquiry Reply is sent to the RIDSvr;Otherwise, RCode value 0 is sent to the RIDSvr as response to query.
Step S11.4.104, the described RIDSvr receives the RCode value that corresponding RSvr is sent, using the RCode value as described in Identify the corresponding RCode of target.
4.2, step S11 is further step S11G: the RIDSvr is according to the identification target, according to foundation AccountAddr determines corresponding RCode with the mapping relations of RCode.Step S12 is further following sub-process:
Step S12.4.101, the request message is directly sent to the corresponding RSvr of the RCode by the described RIDSvr.
Step S12.4.102, after the described RSvr receives the request message, according to the identification target, Cong Rubiao 1-8 institute Target account is searched in the account information table shown, if found, the RCode for replying the target account to the request side belongs to Property value;Otherwise, RCode value 0 is replied to the request side.
According to example four, before step R09, step R06 is still further comprised: target account determined by judging Whether RCode attribute value is directed toward current RSvr, if so, thening follow the steps R09;Otherwise, directly terminate.
, can also be further to the source address side of the message before the end in step R06, replying indicates " target account moves out " replies message.In this way, the source address side of the message can be again according to the target account AccountAddr retransmits message according to the message method based on AccountAddr.
In step R06, before the end, the source address of R08: Xiang Suoshu message of step can also be further executed Reply the RCode attribute value of the target account in side.
In step R06, before the end, the message can also be transmitted to identified target account RSvr pointed by RCode attribute value;The pointed RSvr after receiving that message, according to the purpose of the message AccountAddr determines target account, which is ended in the target account.
According to example four, if the corresponding account of AccountAddr needs to move, as long as being mapped in the AccountAddr RSvr in, by the AccountAddr it is corresponding mapping account RCode attribute value be changed to resettlement purpose RSvr RCode ?.This way it is possible to realize the desired address after resettlement, to achieve the purpose that IUsr account is arbitrarily moved.
For example, after Liu is for Chengdu is migrated to from Beijing account resettlement can be completed according to following two step:
The first step, in the account information table as shown in table 1-8 of RSvr-10 by AccountAddr value liubei@ The RCode attribute value of the corresponding mapping account of 163.com is changed to 28 by 10, to be directed toward RSvr-28.As shown in table 1-8.10.
Table 1-8.10
AccountAddr Password RCode ClientIP ClientPort
caocao@163.com ******** 10 Corresponding IP address Respective end slogan
liubei@163.com ******** 28 Corresponding IP address Respective end slogan
guanyunchang@163.com ******** 28 Corresponding IP address Respective end slogan
zhangliao@163.com ******** 10 Corresponding IP address Respective end slogan
xushu@163.com ******** 10 Corresponding IP address Respective end slogan
Second step and in RSvr-28 creates one according to AccountAddr value liubei@163.com and moves into account, As shown in table 1-8.28.
Table 1-8.28
AccountAddr Password RCode ClientIP ClientPort
liubei@163.com ******** 28 Corresponding IP address Respective end slogan
guanyunchang@163.com ******** 28 Corresponding IP address Respective end slogan
xushu@163.com ******** 10 Corresponding IP address Respective end slogan
In table 1-8.28, the corresponding account of guanyunchang@163.com is also to move in account, is removed by RSvr-10 Enter.The corresponding account of xushu@163.com is to move out account, is moved in RSvr-10.
It may include multiple equivalent HashSvr in the RIDSvr for the distribution RIDSvr, to realize Load sharing.For example, these equivalent HashSvr, or be mutually backups, or mirror image each other, alternatively, select one of them for HashSvr host, remaining is HashSvr mirror image, or other than deployed environment is different, other identical HashSvr, to play the role of load balancing.
These equivalent HashSvr can be disposed respectively from anywhere in internet, for example, can be in local And/or the multiple equivalent HashSvr is disposed in cloud respectively.Correspondingly, in DNS system, intelligently parsing configuration is carried out, is made , when the corresponding domain name of HCode to the HSvr parses, can according to domain name mapping request from differently Domain is resolved to the host IP address of different HashSvr respectively.
For example, the HCode of HSvr is 163.com, in corresponding DNS, 163.com is directed toward the HSvr's simultaneously The host IP address of multiple equivalent HashSvr of RIDSvr.After corresponding dns server receives a domain name mapping request, obtain Corresponding IPrequester is obtained, multiple IP address corresponding to IPrequester matching domain name 163.com determine best The IP address of best match is returned to domain name mapping requestor by matcher.In this manner it is achieved that according to asking Network segment where the person of asking will be on the host IP address of a domain name mapping to different HashSvr.
It particularly, can be by HashSvr and QSvr deployment on one server.For example, in each QSvr A HashSvr is disposed in the server at place.The distributed RIDSvr of QSvr superposition HashSvr as shown in Figure 7.At this In RIDSvr, HashSvr1 and QSvr1 are deployed in the same server, and HashSvr2 and QSvr2 are deployed in the same service In device, HashSvr3 and QSvr3 are deployed in the same server.
If being not desired to the intelligently parsing of the domain name corresponding to HCode of the configuration about the HSvr in corresponding DNS, may be used also To further comprise a MsgDSvr in the RIDSvr, the MsgDSvr is according to random or poll or the plan of load balancing The guard station received identification request message is slightly sent to corresponding HashSvr, then is handled by the HashSvr.Such as Fig. 8 Shown in MsgDSvr distributed RIDSvr.
For the RIDSvr with MsgDSvr, it is only necessary in corresponding DNS, the HCode of corresponding HSvr is corresponding Domain name be directed toward the RIDSvr MsgDSvr host IP address.In this case, corresponding QSvr or HashSvr replys the RCode to the request side, is also possible to: this being replied message and is sent to the MsgDSvr, by this MsgDSvr replys the RCode to the request side.Surpass in this way, the MsgDSvr together with each HashSvr, forms one Grade HashSvr.
Corresponding HashSvr can also be also deployed on the server where the RSvr.RSvr as shown in Figure 9 is folded Add the distributed HSvr of QSvr and HashSvr.In the HSvr, the RIDSvr include 4 HashSvr:HashSvr1, HashSvr2, HashSvr3, HashSvr4 and 3 QSvr:QSvr1, QSvr2, QSvr3.Wherein, HashSvr1, QSvr1 with RSvr-10 is deployed in the same server, and HashSvr2, QSvr2 and RSvr-20 are deployed in the same server, HashSvr3, QSvr3 and RSvr-21 are deployed in the same server, and HashSvr4 and RSvr-28 are deployed in the same service In device.
According to the AccountAddr and RCode of foundation mapping relations and/or it is described migrate table, can be according to one AccountAddr obtains a RCode.In this way, a RSvr is assured that according to an AccountAddr, in this way, can To save the corresponding account information of the AccountAddr in identified RSvr.
By taking example two above as an example, after establishing the mapping relations of AccountAddr and RCode, for one For AccountAddr value liubei@163.com, the HashValue of liubei@163.com is the ASCII value 108 of letter l Remainder 4 obtained by modulo operation is carried out to 13.According to HashValue value 4, from HashValue as shown in Table 2 and RCode value RCode value 10, corresponding RSvr-10 are obtained in mapping table.In this manner it is possible to by AccountAddr value liubei@ The corresponding account information of 163.com is stored in RSvr-10.
It, will for an AccountAddr value liubei 163.com by taking example three above as an example The corresponding account information of AccountAddr value liubei@163.com is stored in RSvr-28, need to only be migrated in table described, 28 are set by the corresponding RCode value of liubei@163.com.
If the HSvr is because certain reason changes the mapping relations of the AccountAddr and RCode, such as adjusts Whole scattering algorithm perhaps changes the corresponding relationship of HashValue and RCode value or changes and migrates related data in table, Or the mapping relations or the data migrated in sublist of AccountAddr and QSvr are changed, so that liubei@ The corresponding RCode of 163.com is changed to 28 by 10, and the account information of the liubei@163.com in RSvr-10 is moved In RSvr-28.In this way, this side sunquan qq.com sends message further according to SPAddr value (liubei 163.com, 10) When, in the step 104, after RSvr-10 receives the message, according to destination address liubei@163.com or When liubei@10.163.com can not determine corresponding target account, RSvr-10 can be to the sender of message, i.e., This side sunquan qq.com, replying indicates replying message for " target account being not present ", and terminates process.In this way, It this side sunquan qq.com, can be according to SPAddr value (liubei 163.com, 10) after receiving the reply AccountAddr value liubei@163.com, re-executes the step 101 and step 102, to obtain new SPAddr value (liubei@163.com, 28).
After RSvr-10 receives the message, according to destination address liubei@163.com or liubei@10.163.com When can not determine corresponding account, the RIDSvr can also be transmitted the message to, by RIDSvr according to the destination address AddrBase and the HCode value 163.com that oneself is possessed corresponding to AccountAddr value liubei@163.com, obtain Take corresponding RCode value 28;The RCode value 28 obtained is replied to the side@qq.com source address sunquan of the message.Example Such as, RIDSvr construction reply message, the destination address replied message be sunquan@qq.com, this reply message in include obtain The RCode value 28 taken, this is replied message and is sent to RSvr-10, is replied message this by RSvr-10 and is sent to sunquan@ This side qq.com;Alternatively, RIDSvr, which directly replies message this, is sent to this side sunquan qq.com.In this way, can To realize automatically updating for SPAddr.Generally, it is described reply message in also carry the destination address of the message, i.e., AccountAddr value liubei@163.com, in order to distinguish different reply message.
Generally, the SPAddr or SPEmailAddr that each good friend can be saved in the buddy list of an account, when certain When the SPAddr or SPEmailAddr of one good friend change, use above-mentioned automatic refresh mode can be with update message sending side The SPAddr value or SPEmailAddr value saved for corresponding good friend.
Since the access message for HSvr is directly diverted in each RSvr, eliminate the bottleneck in HSvr Factor particularly also reduces message detour, thus, help to save Internet resources and realizes the deployment of ultra-large HSvr.
As it is known by the man skilled in the art that in the account information table or migrating table in order to improve recall precision or migrating In sublist, the domain name part of corresponding AccountAddr can be saved, and only retain a username portion.Correspondingly, to such When table is retrieved, only according to a username portion of an AccountAddr.
As it is known by the man skilled in the art that in the present invention, between the server or module that are in communication with each other, IP network can be passed through Network realizes interconnection.When the two is closer, can also be communicated by using RS485 communication modes.Due to simple two Communication between module or server can have corresponding mature technology to realize according to the actual situation, and therefore, the present invention is not This respect is repeated again.
The present invention also provides a kind of domain name intelligently parsing method, this method includes such step:
Multiple main frames IP address is arranged for a domain name in step 91.
Step 92 receives domain name mapping request message, obtains the domain name to be parsed and corresponding IPrequester.
IP address corresponding to step 93, the domain name to be parsed described in IPrequester matching, by best match Person returns to the requestor as a result.
It the following is one embodiment of domain name intelligently parsing method of the present invention, then in the embodiment,
First in step 9-101, in DNS, 5 host IP address, this 5 IP are provided with for domain name 163.com Location is according to sequence from small to large, respectively IP1, IP2, IP3, IP4, IP5, that is, IP1 < IP2 < IP3 < IP4 < IP5.
Step 9-102, after receiving the domain name mapping request that a parsing target is 163.com, the domain to be parsed is obtained Name 163.com and IPrequester.
Step 9-103, the corresponding host IP address saved is obtained according to domain name 163.com, respectively IP1, IP2, IP3, IP4、IP5。
Step 9-104, with corresponding 5 host IP address of IPrequester matching 163.com, best is selected With person.
The best match person is returned to the requestor by step 9105 as a result.
Generally, the selection best match person is to select distance from the corresponding multiple main frames IP address of domain name The IPrequester nearest host IP address.
Particularly, in order to reduce matching times, to improve domain name resolution efficiency, the DNS is saving domain name 163.com When pointed 5 IP address, saved according to ascending order.It, can be with when selecting best match person in this way, in step 9-104 Best match person is searched using binary chop.And according to lookup result, to determine best match person.
If the IP address essentially equal with the IPrequester is found, using the IP address as best match person. If the IPrequester is less than current the smallest IP address (IPcurrentmin), i.e. IP1, then using IPmin as best Matcher.If the IPrequester is greater than current maximum IP address (IPmax), i.e. IP5, then using IPmax as best Matcher.If certain of the IPrequester 5 host IP address corresponding to the domain name 163.com is two adjacent It when between IP address, such as between IP2 and IP3, then selects in IP2 and IP3, nearest one work with the IPrequester For best match person.For example, the distance of IP3 and IPrequester are as follows: L3=IP3-IPrequester, IPrequester and The distance of IP2 are as follows: L2=IPrequester-IP2, if L2 is less than L3, using IP2 as best match person, otherwise, by IP3 As best match person.
The present invention claims, and it is an IP total head (IPfull, IP full Value) that each bit, which is 1 IP address,.
It is when the IPrequester is less than IPmin or described above when determining best match person When IPrequester is greater than IPmax, it also may determine that whether IPrequester is less than IPrequester at a distance from IPmin At a distance from IPmax, if it is, using IPmin as best match person, otherwise, using IPmax as best match person.
When IPrequester is less than IPmin:
IPrequester at a distance from IPmin=IPmin-IPrequester
IPrequester at a distance from IPmax=IPfull-IPmax+IPrequester
When IPrequester is greater than IPmax:
IPrequester at a distance from IPmin=IPfull-IPrequester+IPmin
IPrequester at a distance from IPmax=IPrequester-IPmax
The foregoing is merely a prefered embodiment of the invention, is not intended to limit the scope of the present invention.It is all of the invention Spirit and principle etc, made any modification, improvement, equivalent replacement etc. should all be included in the protection scope of the present invention.

Claims (9)

1. one kind is based on the message method of semi-permanent address (SPAddr, Semi-permanent Address), described to disappear The sender of breath, that is, source user ownership attribution server HSvr, recipient, that is, purpose user attaching HSvr with the message For different HSvr;
Each HSvr includes that guard station identification server RIDSvr and guard station server RSvr, each RSvr are assigned a guard station Code RCode, for identifying a RSvr in the HSvr;
Corresponding account information is saved in the RSvr;
Each HSvr is assigned an ownership code (HCode, Home Code), and the HCode of the RIDSvr and RSvr is this The HCode of HSvr;
The account address AccountAddr of user is the permanent address PermAddr of the account, by an address base (AddrBase, Address Base) and an address attribution (AddrHome, Address Home) are constituted, should HSvr pointed by the AddrHome of AccountAddr is the HSvr of AccountAddr ownership;
The RSvr that RSvr where the corresponding account information of the AccountAddr is the AccountAddr, the RSvr's RCode is the RCode of the AccountAddr;The RCode composition of the AccountAddr and AccountAddr should The semi-permanent address SPAddr of AccountAddr;
It is characterized in that, method includes the following steps:
A, the RSvr of source user side sends guard station to the RIDSvr of the purpose AccountAddr HSvr belonged to and identifies request message, The identification target for including in request message is the purpose AccountAddr;The RIDSvr receives the guard station identification request After message, the corresponding RCode of the identification target is determined;The RCode is sent to the source user side by the RIDSvr RSvr, alternatively, the RIDSvr allows the corresponding RSvr of the RCode to reply;
B, the RSvr of the source user side is according to corresponding to the purpose AccountAddr and the RCode of acquisition SPAddr sends message;
This method further include: after the RCode for obtaining the AccountAddr, corresponding SPAddr is also saved in source user side, Directly to be carried out according to the SPAddr when sending message to the purpose user next time;
Described is further in the source user side corresponding SPAddr of preservation: the RSvr of the source user side saves corresponding SPAddr;Alternatively, the RCode is replied to the corresponding client of the source user by the RSvr of the source user side, by the client End saves corresponding SPAddr.
2. a kind of guard station recognition methods, for requesting side to obtain address to be identified staying in the attribution server HSvr of its ownership Ground information, the HSvr and the HSvr of the address attribution to be identified of request side ownership are different HSvr;
Each HSvr includes that guard station identification server RIDSvr and guard station server RSvr, each RSvr are assigned a guard station Code RCode, for identifying a RSvr in the HSvr;
Corresponding account information is saved in the RSvr;
Each HSvr is assigned an ownership code (HCode, Home Code), and the HCode of the RIDSvr and RSvr is this The HCode of HSvr;
The account address AccountAddr of user is the permanent address PermAddr of the account, by an address base (AddrBase, Address Base) and an address attribution (AddrHome, Address Home) are constituted, should HSvr pointed by the AddrHome of AccountAddr is the HSvr of AccountAddr ownership;
The RSvr that RSvr where the corresponding account information of the AccountAddr is the AccountAddr, the RSvr's RCode is the RCode of the AccountAddr;The RCode composition of the AccountAddr and AccountAddr should The semi-permanent address SPAddr of AccountAddr;
The address to be identified is AccountAddr;
It is characterized in that, method includes the following steps:
A, request the RSvr of side according to the corresponding domain name in the address to be identified, by domain name mapping obtain it is pointed should be wait know The IP address of the RIDSvr of the HSvr of other address attribution;
B, the RSvr of the request side is according to obtained IP address, to the RIDSvr hair of the HSvr of the address attribution to be identified Guard station is sent to identify request message, the identification target for including in request message is the address to be identified;
C, the RIDSvr determines the corresponding RCode of the identification target after receiving the request message;The RIDSvr will The RCode is sent to the RSvr of the request side, alternatively, the RIDSvr allows the corresponding RSvr of the RCode to reply;
D, the RSvr of the request side receives the corresponding RCode of the identification target replied.
3. one kind is based on the message method of semi-permanent address (SPAddr, Semi-permanent Address), described to disappear The sender of breath, that is, source user ownership attribution server HSvr, recipient, that is, purpose user attaching HSvr with the message For different HSvr;
Each HSvr includes that guard station identification server RIDSvr and guard station server RSvr, each RSvr are assigned a guard station Code RCode, for identifying a RSvr in the HSvr;
Corresponding account information is saved in the RSvr;
Each HSvr is assigned an ownership code (HCode, Home Code), and the HCode of the RIDSvr and RSvr is this The HCode of HSvr;
The account address AccountAddr of user is the permanent address PermAddr of the account, by an address base (AddrBase, Address Base) and an address attribution (AddrHome, Address Home) are constituted, should HSvr pointed by the AddrHome of AccountAddr is the HSvr of AccountAddr ownership;
The RSvr that RSvr where the corresponding account information of the AccountAddr is the AccountAddr, the RSvr's RCode is the RCode of the AccountAddr;The RCode composition of the AccountAddr and AccountAddr should The semi-permanent address SPAddr of AccountAddr;
One RSvr is fully described (RSvrCompDesc, RSvr Complete Description) and identifies one in internet A RSvr, the RSvrCompDesc include HCode and RCode two parts information, and wherein the HCode of the RSvrCompDesc is to be somebody's turn to do The RCode of the HCode of RSvr, the RSvrCompDesc are the RCode of the RSvr;
Contain a RSvrCompDesc in one SPAddr, the HCode of the RSvrCompDesc is the SPAddr's The RCode of the AddrHome of AccountAddr, the RSvrCompDesc are the RCode of the SPAddr;
It is characterized in that, method includes the following steps:
A, domain name corresponding to the RSvrCompDesc of the RSvr parsing purpose SPAddr of source user side, obtains pointed purpose The IP address of corresponding purpose RSvr in the HSvr of side;
B, the RSvr of the source user side sends the message according to obtained IP address, Xiang Suoshu purpose RSvr, message Destination address includes the AccountAddr of the SPAddr;
This method further include:
The RSvr of the source user side is receiving expression " target account is not present " correlation replied from the purpose RSvr Return information after, the new RCode of the AccountAddr of the SPAddr is obtained from the RIDSvr of the HSvr of the destination Value updates the SPAddr according to the new RCode in source user lateral root, when sending message to the purpose user so as to next time, root It is carried out according to the updated SPAddr;Alternatively, the RSvr of the source user side is receiving the HSvr from the destination After the new RCode that middle respective server is replied, the SPAddr is updated according to the new RCode in source user lateral root, so as in next time When sending message to the purpose user, carried out according to the updated SPAddr;
Described is further according to the new RCode update SPAddr in source user lateral root: the RSvr of the source user side The SPAddr is updated according to the new RCode;It is used alternatively, the new RCode is replied to the source by the RSvr of the source user side The corresponding client in family updates corresponding SPAddr by the client.
4. one kind is based on the message method of semi-permanent address (SPAddr, Semi-permanent Address), described to disappear The sender of breath, that is, source user ownership attribution server HSvr, recipient, that is, purpose user attaching HSvr with the message For different HSvr;
Each HSvr includes that guard station identification server RIDSvr and guard station server RSvr, each RSvr are assigned a guard station Code RCode, for identifying a RSvr in the HSvr;
Corresponding account information is saved in the RSvr;
Each HSvr is assigned an ownership code (HCode, Home Code), and the HCode of the RIDSvr and RSvr is this The HCode of HSvr;
The account address AccountAddr of user is the permanent address PermAddr of the account, by an address base (AddrBase, Address Base) and an address attribution (AddrHome, Address Home) are constituted, should HSvr pointed by the AddrHome of AccountAddr is the HSvr of AccountAddr ownership;
The RSvr that RSvr where the corresponding account information of the AccountAddr is the AccountAddr, the RSvr's RCode is the RCode of the AccountAddr;The RCode composition of the AccountAddr and AccountAddr should The semi-permanent address SPAddr of AccountAddr;
One RSvr is fully described (RSvrCompDesc, RSvr Complete Description) and identifies one in internet A RSvr, the RSvrCompDesc include HCode and RCode two parts information, and wherein the HCode of the RSvrCompDesc is to be somebody's turn to do The RCode of the HCode of RSvr, the RSvrCompDesc are the RCode of the RSvr;
Contain a RSvrCompDesc in one SPAddr, the HCode of the RSvrCompDesc is the SPAddr's The RCode of the AddrHome of AccountAddr, the RSvrCompDesc are the RCode of the SPAddr;
When one SPAddr is write as an email address format, the SPAddr of this form is known as the semipermanent address email (SPEmailAddr, Semi-permanent email Address);The user of the SPEmailAddr of the SPAddr is entitled should The AddrBase of the AccountAddr of SPAddr, correspondingly, the domain name of the SPEmailAddr is by the RCode of the SPAddr and this The corresponding domain name composition of the AccountAddr of SPAddr;
It is characterized in that, method includes the following steps:
A, the RSvr of source user side is according to purpose SPEmailAddr, and into the HSvr of destination, corresponding purpose RSvr transmission disappears Breath;
B, the RSvr of the source user side is being received from the purpose RSvr expression " target account is not present " replied After return information, the new RCode of the corresponding AccountAddr of the purpose SPEmailAddr is obtained;It is somebody's turn to do in source user lateral root evidence New RCode obtains a new SPEmailAddr, when sending message to the purpose user so as to next time, new according to this SPEmailAddr is carried out;Alternatively, the RSvr of the source user side accordingly takes in receiving the HSvr from the destination It is engaged in after the new RCode that device is replied, a new SPEmailAddr is obtained according to the new RCode in source user lateral root, so as in next time When sending message to the purpose user, carried out according to the new SPEmailAddr;
It is described to obtain a new SPEmailAddr according to RCode described in this in source user lateral root and be further: the source user The RSvr of side obtains a new SPEmailAddr according to the new RCode;Alternatively, the RSvr of the source user side will be described new RCode replies to the corresponding client of the source user, by the client according to the new RCode obtain one it is new SPEmailAddr。
5. a kind of guard station recognition methods, for requesting side to obtain address to be identified staying in the attribution server HSvr of its ownership Ground information, the HSvr and the HSvr of the address attribution to be identified of request side ownership are different HSvr;
Each HSvr includes that guard station identification server RIDSvr and guard station server RSvr, each RSvr are assigned a guard station Code RCode, for identifying a RSvr in the HSvr;
Corresponding account information is saved in the RSvr;
Each HSvr is assigned an ownership code (HCode, Home Code), and the HCode of the RIDSvr and RSvr is this The HCode of HSvr;
The account address AccountAddr of user is the permanent address PermAddr of the account, by an address base (AddrBase, Address Base) and an address attribution (AddrHome, Address Home) are constituted, should HSvr pointed by the AddrHome of AccountAddr is the HSvr of AccountAddr ownership;
The RSvr that RSvr where the corresponding account information of the AccountAddr is the AccountAddr, the RSvr's RCode is the RCode of the AccountAddr;The RCode composition of the AccountAddr and AccountAddr should The semi-permanent address SPAddr of AccountAddr;
One RSvr is fully described (RSvrCompDesc, RSvr Complete Description) and identifies one in internet A RSvr, the RSvrCompDesc include HCode and RCode two parts information, and wherein the HCode of the RSvrCompDesc is to be somebody's turn to do The RCode of the HCode of RSvr, the RSvrCompDesc are the RCode of the RSvr;
Contain a RSvrCompDesc in one SPAddr, the HCode of the RSvrCompDesc is the SPAddr's The RCode of the AddrHome of AccountAddr, the RSvrCompDesc are the RCode of the SPAddr;
When one SPAddr is write as an email address format, the SPAddr of this form is known as the semipermanent address email (SPEmailAddr, Semi-permanent email Address);The user of the SPEmailAddr of the SPAddr is entitled should The AddrBase of the AccountAddr of SPAddr, correspondingly, the domain name of the SPEmailAddr is by the RCode of the SPAddr and this The corresponding domain name composition of the AccountAddr of SPAddr;
The address to be identified is SPEmailAddr;
It is characterized in that, method includes the following steps:
A, it requests the RSvr of side according to the domain name of SPEmailAddr, pointed corresponding purpose RSvr is obtained by domain name mapping IP address;
B, it includes the guard station for identifying target that the RSvr of the request side, which is sent according to obtained IP address to the purpose RSvr, Identify request message, the identification target is the SPEmailAddr;
C, after the purpose RSvr receives the request message, it includes staying for identification target that the RIDSvr of Xiang Suoshu destination, which is sent, Ground identifies request message, and the identification target is that the SPEmailAddr or SPEmailAddr is corresponding The AddrBase of AccountAddr or the corresponding AccountAddr of the SPEmailAddr;The RIDSvr receive it is described After request message, the corresponding RCode of the identification target is determined;The RCode is replied to the RSvr of the request side, alternatively, will The corresponding RCode of the identification target is sent to the purpose RSvr;Purpose RSvr is to receive the identification target corresponding After RCode, the RCode is replied to the RSvr of the request side;
D, the RSvr of the request side receives the corresponding RCode of the identification target replied.
6. a kind of attribution server (HSvr, Home Server), which is characterized in that the HSvr includes guard station identification server RIDSvr and guard station server RSvr, each RSvr are assigned a guard station code RCode, for identifying one in the HSvr A RSvr;
Corresponding account information is saved in the RSvr;
The HSvr is assigned an ownership code (HCode, Home Code), and the HCode of the RIDSvr and RSvr is this The HCode of HSvr;
The account address AccountAddr of user is the permanent address PermAddr of the account, by an address base (AddrBase, Address Base) and an address attribution (AddrHome, Address Home) are constituted, should HSvr pointed by the AddrHome of AccountAddr is the HSvr of AccountAddr ownership;
The RSvr that RSvr where the corresponding account information of the AccountAddr is the AccountAddr, the RSvr's RCode is the RCode of the AccountAddr;The RCode composition of the AccountAddr and AccountAddr should The semi-permanent address SPAddr of AccountAddr;
One RSvr is fully described (RSvrCompDesc, RSvr Complete Description) and identifies one in internet A RSvr, the RSvrCompDesc include HCode and RCode two parts information, and wherein the HCode of the RSvrCompDesc is to be somebody's turn to do The RCode of the HCode of RSvr, the RSvrCompDesc are the RCode of the RSvr;
Contain a RSvrCompDesc in one SPAddr, the HCode of the RSvrCompDesc is the SPAddr's The RCode of the AddrHome of AccountAddr, the RSvrCompDesc are the RCode of the SPAddr;
When one SPAddr is write as an email address format, the SPAddr of this form is known as the semipermanent address email (SPEmailAddr, Semi-permanent email Address);The user of the SPEmailAddr of the SPAddr is entitled should The AddrBase of the AccountAddr of SPAddr, correspondingly, the domain name of the SPEmailAddr is by the RCode of the SPAddr and this The corresponding domain name composition of the AccountAddr of SPAddr;
The RSvr receive the RSvr from other HSvr include destination address be AccountAddr or SPEmailAddr Message after, according to the destination address, determine target account, which ended in into the target account;
After the RIDSvr receives the guard station identification request message including identification target of the RSvr from other HSvr, determine The corresponding RCode of the identification target;RCode determined by being replied to request side, alternatively, the corresponding RSvr of the RCode is allowed to return It is multiple.
7. HSvr according to claim 6, which is characterized in that receive the packet of the RSvr from other HSvr in the RSvr It is described according to the destination address after including the message that destination address is AccountAddr or SPEmailAddr, determine target account Family, which, which is ended in the target account further, is:
A, target account is determined according to the destination address, judges whether that determination obtains, if so, thening follow the steps b: disappearing described Breath ends in identified target account;Otherwise, step c1 or step c2 or c3 are executed;
The step c1 is: Xiang Suoshu sender of the message replys the message for indicating " target account is not present ";
The step c2 is: obtaining new RCode corresponding to the destination address, which is replied to the message and is sent out The person of sending;
The step c3 is: Xiang Suoshu RIDSvr sends guard station and identifies request message, allows the RIDSvr by the destination address institute Corresponding new RCode replies to the sender of the message.
8. a kind of guard station identifies message treatment method, the guard station identification for attribution server HSvr processing from other HSvr is asked Seek message;
Each HSvr includes that guard station identification server RIDSvr and guard station server RSvr, each RSvr are assigned a guard station Code RCode, for identifying a RSvr in the HSvr;The RIDSvr presets message distribution module and multiple guard stations Enquiry module;Sublist is migrated in setting in the guard station enquiry module;Establish AccountAddr and corresponding guard station enquiry module Mapping relations;
Corresponding account information is saved in the RSvr;
Each HSvr is assigned an ownership code (HCode, Home Code), and the HCode of the RIDSvr and RSvr is this The HCode of HSvr;
The account address AccountAddr of user is the permanent address PermAddr of the account, by an address base (AddrBase, Address Base) and an address attribution (AddrHome, Address Home) are constituted, should HSvr pointed by the AddrHome of AccountAddr is the HSvr of AccountAddr ownership;
The RSvr that RSvr where the corresponding account information of the AccountAddr is the AccountAddr, the RSvr's RCode is the RCode of the AccountAddr;The RCode composition of the AccountAddr and AccountAddr should The semi-permanent address SPAddr of AccountAddr;
It is characterized in that, method includes the following steps:
A, what the message distribution module received the RSvr from other HSvr includes the guard station identification request message of identification target, It determines and corresponds to according to the mapping relations of the AccountAddr and corresponding guard station enquiry module that are established according to the identification target Guard station enquiry module;Then step b1 or step b2 is executed;
B1: sending to identified guard station enquiry module includes the query messages for identifying target;The guard station enquiry module After receiving the query messages, according to the identification target, corresponding RCode is searched from set migrating in sublist, by this RCode is sent to the message distribution module;After the message distribution module receives the response to query message, to described other The RSvr of HSvr replys received RCode;
B2: the request message is sent to identified guard station enquiry module;The guard station enquiry module receives the request message Afterwards, according to the identification target, corresponding RCode is searched from set migrating in sublist;To the RSvr of other HSvr Reply the RCode.
9. a kind of distributed guard station identifies server RIDSvr, it is contained in attribution server HSvr, is used for other HSvr Guard station identification service is provided;
Each HSvr further includes guard station server RSvr, each RSvr is assigned a guard station code RCode, at this A RSvr is identified in HSvr;
Corresponding account information is saved in the RSvr;
Each HSvr is assigned an ownership code (HCode, Home Code), and the HCode of the RIDSvr and RSvr is this The HCode of HSvr;
The account address AccountAddr of user is the permanent address PermAddr of the account, by an address base (AddrBase, Address Base) and an address attribution (AddrHome, Address Home) are constituted, should HSvr pointed by the AddrHome of AccountAddr is the HSvr of AccountAddr ownership;
The RSvr that RSvr where the corresponding account information of the AccountAddr is the AccountAddr, the RSvr's RCode is the RCode of the AccountAddr;The RCode composition of the AccountAddr and AccountAddr should The semi-permanent address SPAddr of AccountAddr;
It is characterized in that,
The RIDSvr includes at least one hash server HashSvr and multiple migrates query service device QSvr;
It is saved in the QSvr and migrates sublist;Establish the mapping relations of AccountAddr and QSvr;
After the HashSvr receives the guard station identification request message including identification target of the RSvr from other HSvr, according to The identification target determines corresponding QSvr according to the mapping relations of the AccountAddr and QSvr that are established;Subsequently into Process 1 or process 2;
Process 1: sending to identified QSvr includes the query messages for identifying target;The QSvr receives the inquiry and disappears After breath, according to the identification target, corresponding RCode is searched from set migrating in sublist, which is sent to described HashSvr;After the HashSvr receives the response to query message, received RCode is replied to the RSvr of other HSvr;
Process 2: the request message is sent to identified QSvr;After the QSvr receives the request message, according to the knowledge Other target searches corresponding RCode from set migrating in sublist;The RCode is replied to the RSvr of other HSvr.
CN201410098231.0A 2013-04-23 2014-03-18 Message method based on semi-permanent address Active CN104125310B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410098231.0A CN104125310B (en) 2013-04-23 2014-03-18 Message method based on semi-permanent address

Applications Claiming Priority (4)

Application Number Priority Date Filing Date Title
CN201310143393 2013-04-23
CN201310143393.7 2013-04-23
CN2013101433937 2013-04-23
CN201410098231.0A CN104125310B (en) 2013-04-23 2014-03-18 Message method based on semi-permanent address

Publications (2)

Publication Number Publication Date
CN104125310A CN104125310A (en) 2014-10-29
CN104125310B true CN104125310B (en) 2019-08-13

Family

ID=51770574

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410098231.0A Active CN104125310B (en) 2013-04-23 2014-03-18 Message method based on semi-permanent address

Country Status (1)

Country Link
CN (1) CN104125310B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106657425A (en) * 2015-11-03 2017-05-10 王正伟 Automatic finding method of residence code
CN107087039B (en) * 2016-02-15 2021-10-01 王正伟 Exchange method and exchange cloud
CN107181687A (en) * 2016-03-09 2017-09-19 王正伟 Service switching method and operation exchange cloud
CN107580012A (en) * 2016-07-05 2018-01-12 王正伟 Distributed hsvr

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1489363A (en) * 2002-10-08 2004-04-14 华为技术有限公司 Personal number system and application method thereof
CN101127758A (en) * 2006-08-16 2008-02-20 华为技术有限公司 IP address acquisition method and acquisition system for mobile nodes
CN101198157A (en) * 2006-12-05 2008-06-11 华为技术有限公司 Method for modifying local proxy of mobile node
CN101754170A (en) * 2008-12-12 2010-06-23 中国移动通信集团公司 Distributed HLR system and method for acquiring called roaming number thereof
CN102333105A (en) * 2010-07-14 2012-01-25 华为技术有限公司 Business communication method, system, push client terminal and user equipment

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1895800A1 (en) * 2006-08-31 2008-03-05 France Télécom Determination of a list of preferred mobile access networks
CN101577867B (en) * 2008-05-08 2011-08-03 中国移动通信集团公司 Method, device and system for sending push messages in multimedia message service

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1489363A (en) * 2002-10-08 2004-04-14 华为技术有限公司 Personal number system and application method thereof
CN101127758A (en) * 2006-08-16 2008-02-20 华为技术有限公司 IP address acquisition method and acquisition system for mobile nodes
CN101198157A (en) * 2006-12-05 2008-06-11 华为技术有限公司 Method for modifying local proxy of mobile node
CN101754170A (en) * 2008-12-12 2010-06-23 中国移动通信集团公司 Distributed HLR system and method for acquiring called roaming number thereof
CN102333105A (en) * 2010-07-14 2012-01-25 华为技术有限公司 Business communication method, system, push client terminal and user equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于邮箱的移动Agent域通信机制;常朝稳等;《计算机工程》;20080831;第34卷(第16期);全文

Also Published As

Publication number Publication date
CN104125310A (en) 2014-10-29

Similar Documents

Publication Publication Date Title
US20150381557A1 (en) Container name server and method for container name resolution
CN104009920B (en) The processing method of data source movement, the method for E-Packeting and its device
CN101431539B (en) Domain name resolution method, system and apparatus
EP2700208B1 (en) Global traffic management using modified hostname
CN103618801B (en) Method, equipment and the system of a kind of P2P resource-sharing
CN103874157A (en) Routing forwarding, routing table building and content obtaining method and device thereof
CN104125310B (en) Message method based on semi-permanent address
CN109076082A (en) Anonymous Identity in network and agreement towards identity
CN107222587B (en) A kind of method for remotely accessing private network device
CN103546593B (en) Wireless sensor network node identifier resolution method based on IP Yu non-IP
CN101465817A (en) Method, server and system for transmitting network community message
EP2668740A2 (en) Site-aware distributed file system access from outside enterprise network
CN103685584A (en) Method and system of resisting domain name hijacking based on tunnelling
CN104468805A (en) Message routing device and method
CN105871698A (en) Management method and system of instant communication service
CN109413224B (en) Message forwarding method and device
CN100566344C (en) A kind of online user search method and system
Djamaa et al. Fetchiot: Efficient resource fetching for the internet of things
US11196666B2 (en) Receiver directed anonymization of identifier flows in identity enabled networks
CN106130912B (en) A kind of routing node and method for routing
Cho P2p-based mobile social networks
CN111835573B (en) ZeroNet network service site proxy relation mapping method
CN104954500B (en) Message addressing method based on semi-permanent address
Chung et al. RFID object tracking with IP compatibility for the internet of things
CN107580012A (en) Distributed hsvr

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C53 Correction of patent for invention or patent application
CB02 Change of applicant information

Address after: Wuhou District Shaoling road Chengdu city Sichuan province 610000 No. 29 2-2-3 Li Huaijiang

Applicant after: Wang Zhengwei

Address before: 610000 Sichuan city in Chengdu province Wuhou Temple Street No. 87 (empty Jiashuyuan) 1 Building 1 unit 3

Applicant before: Wang Zhengwei

C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant