CN104125310A - Semi-permanent address based message sending method - Google Patents

Semi-permanent address based message sending method Download PDF

Info

Publication number
CN104125310A
CN104125310A CN201410098231.0A CN201410098231A CN104125310A CN 104125310 A CN104125310 A CN 104125310A CN 201410098231 A CN201410098231 A CN 201410098231A CN 104125310 A CN104125310 A CN 104125310A
Authority
CN
China
Prior art keywords
message
rcode
rsvr
accountaddr
address
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201410098231.0A
Other languages
Chinese (zh)
Other versions
CN104125310B (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 invention discloses a semi-permanent address based message sending method. According to the semi-permanent address based message sending method, an RCode (Residence Code) of target equipment of an account is obtained firstly, then messages are sent to the target equipment directly, and message detour is reduced. The invention also discloses a residence identification method which is used for obtaining the RCode of the target equipment of the account. The invention also discloses a SPAddr (Service Provider Address) based message sending method which is used for directly sending messages to the target equipment of the account. The invention also discloses a SPEmailAddr (Service Provider Email Address) based message sending method. The invention also discloses a residence identification method which is used for directly obtaining a new RCode of the SPEmailAddr. The invention also discloses an HSvr (Home Server) which can eliminate bottleneck factors and reduce message detour. The invention also discloses a message processing method which is used for processing messages from other HSvrs. The invention also discloses a residence identification message processing method. The invention also discloses a RIDSvr (Residence Identification Server) which can achieve load sharing.

Description

Based on the message method of semi-permanent address
Technical field
The present invention relates to internet communication, relate to or rather the message method based on semi-permanent address in the Internet, and distributed HSvr; Guard station recognition methods, guard station identification message processing method, and distributed RIDSvr.
Background technology
In internet communication, Radix Angelicae Sinensis belongs to an attribution server (HSvr, Home Server) user (IUsr, Internet User) quantity is for example, when abundant (, the QQ number of users of Tengxun reaches 700,000,000), or these user distributions are in the time of a very large territorial scope, in order to improve service quality, usually, multiple child servers can be set, coming provides service to corresponding user respectively.
For example, described HSvr comprises some child servers.According to GUID(whole world Unified Identity, Global Unified Identity) UCode(user code, User Code), according to certain mapping relations, the accounts information of all IUsr that belong to this HSvr is stored in respectively in different child servers, and carrys out these accounts of addressing according to these mapping relations." a kind of by the method for the storage of data message key and the read data information " patent of invention that is 02146090.6 referring to application number.
Described GUID can be an email address, can be also principal and subordinate's code, can be also a shadow code.About GUID and the more descriptions of HSvr, " communication means and the system " patent of invention that is 201310037232.X referring to application number, and application number " the shadow code addressing method " patent of invention that is 201310049772.X.
For example, for 163 users of Netease: UsrA and UsrB, the mapping relations that arrange according to Netease, UsrA is mapped in Netease's Pekinese's child servers, and UsrB is mapped in the child servers in Netease Guangzhou.For the qq user of Tengxun: UsrC, the mapping relations that arrange according to Tengxun, UsrC is mapped in the child servers in Tengxun Shanghai.
In the time that UsrA sends information to UsrB, Netease's Pekinese's child servers can be according to the mapping relations that arrange, determine that the child servers at UsrB place is in Guangzhou, thereby corresponding message is sent to the child servers in Netease Guangzhou, by the child servers in Netease Guangzhou, this message is sent to UsrB.
But, in the time that UsrC sends message to UsrB, the child servers in Tengxun Shanghai is not in the time knowing the mapping relations of Netease, just cannot determine UsrB is in which child servers of Netease, at this moment, the child servers in Tengxun Shanghai may, according to access way nearby, send to message the child servers in Netease Nanjing.The child servers in Netease Nanjing is received after this message, according to the mapping relations of Netease, determine that UsrB, in the child servers in Netease Guangzhou, sends to this message the child servers in Netease Guangzhou, then by the child servers in Netease Guangzhou, this message is sent to UsrB again.Like this, just produce message detour problem.
If roundabout and allow the child servers in Tengxun Shanghai preserve the mapping relations data of Netease in order to reduce above-mentioned message, can cause the child servers in Tengxun Shanghai to safeguard huge mapping relations data, because, same reason, the child servers in Tengxun Shanghai may also will be safeguarded the mapping relations data of Sohu, Sina, Microsoft etc.
Especially, because the mapped relationship map of UsrB is in the child servers in Netease Guangzhou, although, the user that UsrB is corresponding Beijing that hangs up one's hat, in the time of the account of the each login of UsrB oneself, child servers that can only remote access Netease Guangzhou.For described remote access, can in the child servers in Netease Guangzhou, register the roaming child servers of UsrB.Like this, UsrB, in the time of Beijing, can register the child servers of UsrB current roaming in the child servers in Netease Guangzhou, i.e. Netease's Pekinese's child servers, and the accounts information of UsrB is saved in Netease's Pekinese's child servers.Like this, when UsrB logins the account of oneself in Beijing, just can directly login Netease's Pekinese's child servers.
Supporting that UsrB roams in Pekinese's situation, in the time that UsrA sends message to UsrB, Netease's Pekinese's child servers is first according to the mapping relations that arrange, this message is sent to the child servers in Netease Guangzhou, the child servers in Netease Guangzhou judges that UsrB roams into Beijing, so, then this message is forwarded to Netease's Pekinese's child servers, by Netease's Pekinese's child servers, this message is sent to UsrB.
But, supporting that UsrB roams in Pekinese's situation, send when message to UsrB at UsrC, the child servers in Tengxun Shanghai, according to access way nearby, sends to message the child servers in Netease Nanjing.The child servers in Netease Nanjing is received after this message, according to the mapping relations of Netease, this message is sent to the child servers in Netease Guangzhou, the child servers in Netease Guangzhou judges that UsrB roams into Beijing, so, again this message is forwarded to Netease's Pekinese's child servers, by Netease's Pekinese's child servers, this message is sent to UsrB.Like this, also produce the roundabout of message.
Across the transmission message between service-domain, the various message that produce are roundabout will additionally consume very large information exchange and communication resource, and has influence on service quality.The energy resource consumption additionally producing thus and environmental pollution also cannot be ignored.
Summary of the invention
In view of this, the open message method based on semi-permanent address of the present invention, sends for the message across between service-domain, and the method is obtained the RCode of an AccountAddr in advance.In the time that the account to this AccountAddr sends message, the target device that this message is directly sent to the account according to this AccountAddr and described RCode, has reduced message roundabout.The method comprises the following steps:
A, obtain the RCode of an AccountAddr;
B, send message according to this AccountAddr and the corresponding SPAddr of the RCode that obtains.
The recognition methods of a kind of guard station is also disclosed, for identifying the guard station information of an address to be identified.The method comprises the following steps:
A, according to domain name corresponding to described address to be identified, obtain IP address pointed by domain name mapping;
The IP address that b, basis obtain sends and comprises the guard station identification request message of identifying target, and described identification target is described address to be identified;
RCode corresponding to described identification target that d, reception are replied.
Also disclose a kind of method that sends message according to SPAddr, send message for the direct target device to an account.The method comprises the following steps:
A, resolve the corresponding domain name of RSvrCompDesc of described SPAddr, obtain the host IP address of RSvr pointed;
B, the IP address obtaining according to parsing, send described message to corresponding RSvr, and the destination address of message comprises the AccountAddr of this SPAddr.
Also disclose a kind of method that sends message according to SPEmailAddr, make, after SPEmailAddr lost efficacy, still can realize the normal transmission of message.The method comprises the following steps:
A, destination address using described SPEmailAddr as message, send this message;
B, receiving after the return information of expression " target account does not exist ", obtaining the RCode that this SPEmailAddr is corresponding; According to the RCode obtaining, obtain new SPEmailAddr, i.e. a NewSPEmailAddr; Destination address using this NewSPEmailAddr as message, resends this message.
The recognition methods of a kind of guard station is also disclosed, for identifying the guard station information that SPEmailAddr is corresponding.The method comprises the following steps:
A, according to the domain name of described SPEmailAddr, obtain the host IP address of RSvr pointed by domain name mapping;
The IP address that b, basis obtain sends and comprises the guard station identification request message of identifying target to described RSvr, and described identification target is described SPEmailAddr;
RCode corresponding to described identification target that d, reception are replied.
Also disclose a kind of HSvr, can eliminate bottleneck factor, reduce the roundabout phenomenon of message.Described HSvr comprises RIDSvr and RSvr; Each RSvr is assigned a RCode; Described RSvr is used for preserving corresponding accounts information;
Described RSvr receive from other HSvr comprise that destination address is the message of AccountAddr or SPEmailAddr after, according to this destination address, determine target account, this message is ended in to this target account;
Receive that at described RIDSvr one comprises after the guard station identification request message of identifying target, determines the RCode that this identification target is corresponding; Reply determined RCode.
A kind of message treatment method is also disclosed, for processing the message from other HSvr.The destination address of described message comprises AccountAddr or SPEmailAddr; The method comprises the following steps:
A, RSvr receive from the destination address of other HSvr and comprise after the message of AccountAddr or SPEmailAddr, determine target account according to this destination address, judge whether to determine to obtain, if so, perform step b: described message is ended in to determined target account; Otherwise, process ends;
A kind of guard station identification message processing method is also disclosed, for the treatment of a guard station identification request message.The method sets in advance message distribution module and multiple guard stations enquiry module; In the enquiry module of described guard station, roaming sublist is set; Set up the mapping relations of AccountAddr and corresponding guard station enquiry module; The method comprises the following steps:
A, described message distribution module receive and comprise the guard station identification request message of identifying target, according to described identification target, according to the mapping relations of set up AccountAddr and corresponding guard station enquiry module, determine corresponding guard station enquiry module; Then perform step b1 or step b2;
B1: send the query messages that comprises described identification target to determined guard station enquiry module; Described guard station enquiry module is received after described query messages, according to described identification target, from roaming sublist, searches corresponding RCode, and this RCode is sent to described message distribution module; This message distribution module is received after described response to query message, replys the RCode receiving to described request side;
B2: described request message is sent to determined guard station enquiry module; This guard station enquiry module is received after this request message, according to described identification target, from roaming sublist, searches corresponding RCode; Reply this RCode to described request side.
Also disclose a kind of distributed RIDSvr, can realize load balancing.Described RIDSvr comprises at least one HashSvr and multiple QSvr; In described QSvr, preserve roaming sublist; Set up the mapping relations of AccountAddr and QSvr;
Receive that at described HashSvr one comprises that after the guard station identification request message of identifying target, described HashSvr, according to described identification target, according to the mapping relations of set up AccountAddr and QSvr, determines corresponding QSvr; Then enter flow process 1 or flow process 2;
Flow process 1: send the query messages that comprises described identification target to determined QSvr; Described QSvr receives after described query messages, according to described identification target, from roaming sublist, searches corresponding RCode, and this RCode is sent to described HashSvr; This HashSvr receives after described response to query message, replys the RCode receiving to described request side;
Flow process 2: described request message is sent to determined QSvr; This QSvr receives after this request message, according to described identification target, from roaming sublist, searches corresponding RCode; Reply this RCode to described request side.
In the technical scheme that above-described embodiment provides, roundabout owing to reducing message, therefore, can save in a large number networking and operation investment; Owing to having eliminated the bottleneck factor of Message Processing, therefore, be conducive to large-scale equipment and dispose.And, because reduced the path that message transmits, can also improve the service quality of service provider (SP, Service Provider).
Brief description of the drawings
Shown in Fig. 1, it is the first instance graph of the distributed HSvr of the present invention.
Shown in Fig. 2, be the distributed HSvr of RSvr stack RIDSvr.
Shown in Fig. 3, for thering is the distributed HSvr of MsgDSvr.
Shown in Fig. 4, it is message method execution mode flow chart of the present invention.
Shown in Fig. 5, be distributed RIDSvr.
Shown in Fig. 6, be the distributed HSvr of RSvr stack QSvr.
Shown in Fig. 7, be the distributed RIDSvr of QSvr stack HashSvr.
Shown in Fig. 8, for thering is the distributed RIDSvr of MsgDSvr.
Shown in Fig. 9, be the distributed HSvr of RSvr stack QSvr and HashSvr.
Embodiment
For making the object of the invention, technical scheme and advantage clearer, below in conjunction with embodiment, be elaborated from many aspects.
The present invention taking described GUID be an Email address as example, for set forth, be principal and subordinate's code or shadow code or other situation but be applicable to GUID.
Each account has an account address (AccountAddr, Account Address), for account addressing.
The AccountAddr of the source account of a GUID is this GUID.
The AccountAddr of the migration account of a GUID is cross-domain address code corresponding to this migration account (CDAddr, Cross-domain Address).This GUID is this base GUID(BaseGUID of this CDAddr, The Base GUID), this CDAddr's is some ownership codes (HCode, Home Code) of this migration account place HSvr across last HSvr information (CeSvrDesc, Cross-end HSvr Description).About more descriptions of CDAddr, " supporting network and the related news processing method of the GUID migration " patent of invention that is 201310079118.3 referring to application number.
Each AccountAddr is made up of an address base (AddrBase, Address Base) and an address ownership (AddrHome, Address Home).In the time that an AccountAddr is a GUID, the AddrBase of this AccountAddr is the UCode of this GUID, and the AddrHome of this AccountAddr is the HCode of this GUID; In the time that an AccountAddr is a CDAddr, the AddrBase of this AccountAddr is the BaseGUID of this CDAddr, and the AddrHome of this AccountAddr is the CeSvrDesc of this CDAddr.
The AddrHome HSvr pointed that the HSvr of an AccountAddr ownership is this AccountAddr.
The AddrHome of an account is the AddrHome of the AccountAddr of the account; The AddrBase of an account is the AddrBase of the AccountAddr of the account.
The AccountAddr of an account is the permanent address (PermAddr, Permanent Address) of the account.
According to certain rule or algorithm, can produce a domain name according to a HCode, referring to described " communication means and system " patent of invention.Therefore, in the present invention's narration below, be example with { HCode that HSvr was had is a domain name, and an AccountAddr is an email address }, but be not used in restriction the present invention.
The present invention proposes a kind of HSvr, described HSvr comprises guard station identified server (RIDSvr, Residence Identification Server) and guard station server (RSvr, Residence Server).The HCode of described RIDSvr and described RSvr is the HCode of this HSvr.
As shown in Figure 1, be the first instance graph of the distributed HSvr of the present invention.In this example, described HSvr comprises a RIDSvr and four RSvr.Wherein, being positioned at the RSvr of Pekinese is RSvr-10, and the RSvr that is positioned at Guangzhou is RSvr-20, and the RSvr that is positioned at Shanghai is RSvr-21, and the RSvr that is positioned at Chengdu is RSvr-28.
Described RIDSvr is used for receiving guard station identification request message, and guard station identification service is provided.
In described RSvr, preserve corresponding accounts information.The RSvr that the RSvr at the account place that AccountAddr is corresponding is this AccountAddr.
Receive from other HSvr at described RSvr, for example, from RSvr in other HSvr, comprise after the message of object AccountAddr, carry out following flow process:
Step R01, described RSvr, according to described object AccountAddr, determine target account.
Step R09, this message is ended in to this target account.
For example, described message is for sending a short message to target account, and described this message is ended in to this target account can be the client that this short message is sent to this target account.
In step R01, in the time that described RSvr cannot determine target account, directly finish or reply to source address one side of message the reply message that represents " target account does not exist ".
Usually, in an accounts information, can comprise AddrBase, Password, ClientIP and the ClientPort of these attributes: AccountAddr or AccountAddr, etc.Wherein, the password that Password is proper account, the online information that ClientIP and ClientPort are proper account.When an account is in the time logining state, IP address and the port numbers of corresponding ClientIP and the client of the corresponding account of ClientPort; When the account is in the time publishing state, usually, corresponding ClientIP and/or ClientPort are null value null or 0, also can show as and there is no corresponding online record.
Described RSvr can obtain IP address and the port numbers of login client in the time of an account login, and the IP address obtaining and port numbers are kept in the ClientIP and ClientPort attribute of the account.
About more descriptions of accounts information referring to described " communication means and system " patent of invention.
Described RSvr can preserve by accounts information table as shown in table 1 the accounts information of proper account.
Table 1
AccountAddr Password ClientIP ClientPort
liubei@163.com ******** Corresponding IP address Respective ends slogan
xushu@163.com ******** Corresponding IP address Respective ends 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), for identify a RSvr in corresponding HSvr.Be example taking { RCode that the RCode that the RCode of RSvr-10 is 20, RSvr-21 as the RCode of 10, RSvr-20 is 21, RSvr-28 is for 28 } below.
The RCode of the RSvr of an AccountAddr is the RCode of this AccountAddr.
The present invention describes (RSvrCompDesc, RSvr Complete Description) completely with a RSvr and in the Internet, identifies a RSvr.The RSvrCompDesc of a RSvr, comprises HCode and RCode two parts information, can be write as (HCode, RCode) form, or be write as RCode.HCode form.The HCode that wherein HCode of this RSvrCompDesc is corresponding RSvr, the RCode that the RCode of this RSvrCompDesc is corresponding RSvr.
By setting up the corresponding relation of RSvrCompDesc and RSvr, can in the Internet, determine a RSvr according to a RSvrCompDesc.
The corresponding relation of setting up a RSvrCompDesc and a RSvr can be: in corresponding domain name system (DNS, Domain Name System), corresponding this RSvrCompDesc domain name is pointed to this RSvr.Like this, in the Internet, just can determine a RSvr according to a RSvrCompDesc.For example: resolve a corresponding domain name of RSvrCompDesc, obtain the host IP address of corresponding RSvr.Resolving a domain name can be: send domain name mapping request to corresponding DNS, request comprises domain name, and the host IP address that described DNS is corresponding according to this domain name lookup, returns to requestor by the host IP address obtaining.Be mature technology owing to resolving domain name, therefore, repeat no more here.
A RSvrCompDesc corresponding domain name can be the domain name producing according to this RSvrCompDesc.
The mode that produces domain name according to RSvrCompDesc can be: using the RCode of this RSvrCompDesc as a subdomain, with the subdomain name that produces this HCode together with the HCode of this RSvrCompDesc.For example, for RSvrCompDesc value (163.com, 21), using 21 as a subdomain, be inserted into before domain name 163.com, like this, obtain the subdomain name 21.163.com of domain name 163.com, be i.e. domain name corresponding to (163.com, 21).
After a RSvr disposes, for example, after corresponding host IP address sets, corresponding the RSvrCompDesc of this RSvr domain name can be pointed to the host IP address of this RSvr.
Having HCode taking described HSvr is that 163.com is as example.After this HSvr disposes, in corresponding DNS: the host IP address that corresponding the RSvrCompDesc value of RSvr-10 (163.com, 10) domain name 10.163.com is pointed to RSvr-10; Corresponding the RSvrCompDesc value of RSvr-20 (163.com, 20) domain name 20.163.com is pointed to the host IP address of RSvr-20; Corresponding the RSvrCompDesc value of RSvr-21 (163.com, 21) domain name 21.163.com is pointed to the host IP address of RSvr-21; Corresponding the RSvrCompDesc value of RSvr-28 (163.com, 28) domain name 28.163.com is pointed to the host IP address of RSvr-28.
Like this, just can come to send message to corresponding RSvr according to a RSvrCompDesc.
Described RIDSvr is receiving that one comprises after the guard station identification request message of identifying target, carries out following flow process:
Step S11, determine RCode corresponding to described identification target.
Step S12, reply determined RCode to described request side.
For example, described request side refers to source address one side of described request message, and the destination address of described reply message can be the source address of described request message.Repeat no more below.
Convenient for example narration, RCode value 0 is considered as invalid RCode value by the present invention.But be not intended to limit the present invention.
Like this, described request side is being received after the RCode of reply, if judge that this value is 0, confirms the RCode that described identification target is corresponding invalid.
Step S12 also can be further: described request message is sent to the RSvr that this RCode is corresponding by described RIDSvr, replied the RCode oneself being assigned by this RSvr to described request side.Here, this RSvr can preserve the RCode being assigned.Or described RIDSvr, in the time this request message being sent to RSvr corresponding to this RCode, also sends the RCode of this RSvr.
Described identification target can be the AddrBase of an AccountAddr.A HCode that at this moment, can have according to this AddrBase and this RIDSvr obtains an AccountAddr.Described RIDSvr can preserve had HCode.
Usually, described identification target is an AccountAddr.Below as example, but be not used in restriction.
By setting up the corresponding relation of HCode and RIDSvr, can in the Internet, determine a RIDSvr according to a HCode.
The corresponding relation of setting up a HCode and a RIDSvr can be: in DNS, a domain name corresponding to HCode is pointed to the host IP address of the corresponding RIDSvr of this HCode.Like this, in the Internet, just can determine a RIDSvr according to a HCode.For example: by resolving a domain name that HCode is corresponding, obtain the host IP address of corresponding RIDSvr.
The domain name that described HCode is corresponding can be directly this HCode self, can be also the domain name producing according to this HCode.
Taking described HSvr have HCode be 163.com as example, the corresponding domain name of this HCode can be directly 163.com, can be also using agreement word string " 001 " as subdomain, produce domain name 001.163.com together with 163.com.Here taking the former as example, after this HSvr disposes, domain name 163.com is pointed to the host IP address of the RIDSvr of this HSvr in corresponding DNS.
About the mode of corresponding relation of setting up a HCode and a main frame, can also be referring in described " communication means and system " patent of invention, about the description of the described corresponding relation of setting up HCode and HSvr.
As from the foregoing, after a RIDSvr disposes, for example, after corresponding host IP address sets, can corresponding the HCode of this RIDSvr domain name be pointed to the host IP address of this RIDSvr in corresponding DNS.Like this, just can send guard station identification request message to corresponding RIDSvr according to the AddrHome of an AccountAddr, thereby obtain the RCode of this AccountAddr.
The present invention proposes the recognition methods of a kind of guard station, for obtaining corresponding RCode according to an AccountAddr.
The method comprises the steps:
Step 01, according to the corresponding domain name of the AddrHome of described AccountAddr, obtain the host IP address of RIDSvr pointed by resolving this domain name.
The IP address that step 02, basis obtain and the port numbers of agreement, send and comprise the guard station identification request message of identifying target to described RIDSvr, and described identification target is described AccountAddr.Here the port numbers of unified agreement RIDSvr.
The RCode that step 04, reception are replied.
Before step 04, can further include step 03: described RIDSvr is receiving after described request message, determines RCode corresponding to described identification target; Reply determined RCode to described request side.Like this, identification requesting party in guard station just can receive replied RCode.
In step 03, described RIDSvr, in the time replying RCode corresponding to described identification target, can directly send to return information described request side, also this reply message can be sent to a certain server in this HSvr, for example RSvr corresponding to this RCode, and replied by this server.Especially, described request message is sent to the RSvr that this RCode is corresponding by described RIDSvr, replied the RCode oneself being assigned by this RSvr to described request side.Here, this RSvr can preserve the RCode being assigned.
The RCode that described reception is replied, can be to receive the RCode that described RIDSvr replys, also can be the RCode receiving from a certain RSvr replys in the HSvr under this RIDSvr, can be also the RCode receiving from arbitrary server is replied in the HSvr under this RIDSvr.In the middle of reality, according to the difference of HSvr design and difference.
Usually, in step 03, in described return information, further carry described identification target.
In a HSvr, can there be multiple equivalent RIDSvr, to realize load sharing, thereby contribute to the scale that realizes HSvr to dispose.For example, these equivalent RIDSvr, or backup each other, or mirror image each other, or selecting one of them is RIDSvr main frame, remaining is RIDSvr mirror image, or except deployed environment difference, other identical RIDSvr.
Can be in the Internet carry out Anywhere to dispose respectively these equivalent RIDSvr, for example, can be in this locality and/or high in the clouds dispose respectively described multiple equivalent RIDSvr.Correspondingly, in DNS system, carry out intelligently parsing configuration, make in the time that domain name corresponding to the HCode of this RIDSvr resolved, can according to domain name mapping request from different geographical, be resolved to respectively the host IP address of different RIDSvr.
For example, the HCode of HSvr is 163.com, in corresponding DNS, 163.com is pointed to simultaneously to the host IP address of multiple equivalent RIDSvr of this HSvr.Corresponding dns server is received after a domain name mapping request, with domain name mapping requestor's IP address (IPrequester, Requester IP) the coupling corresponding multiple IP of domain name 163.com address, determine optimum Match person, the IP address of optimum Match is returned to domain name mapping requestor as analysis result.
Like this, can realize according to the network segment at requestor place by a domain name mapping on configured different IP addresses.
Certainly, also a RIDSvr and a RSvr can be deployed in a server.
Especially, in a HSvr, can in the server at each RSvr place, dispose a RIDSvr.
The distributed HSvr of RSvr stack RIDSvr as shown in Figure 2.In this HSvr, RIDSvr1 and RSvr-10 are deployed in same server, RIDSvr2 and RSvr-20 are deployed in same server, and RIDSvr3 and RSvr-21 are deployed in same server, and RIDSvr4 and RSvr-28 are deployed in same server.Wherein, RIDSvr2 is master server, and RIDSvr1, RIDSvr3, RIDSvr4 are respectively mirror image server.Between master server and each mirror image server, keep synchronizeing of related data, for example, described related data can be the mapping relations data of AccountAddr and RCode.
It should be noted that, between the RIDSvr of multiple mutual backups, also can realize the synchronous of related data by craft.Like this, each RIDSvr is just connected on the Internet, does not need each other to set up as communication connections such as TCP.
If do not want in corresponding DNS configuration about the HCode of described HSvr the intelligently parsing of corresponding domain name, can also further comprise a message distribution services device (MsgDSvr at described HSvr, Message Distribution Server), described MsgDSvr sends to corresponding RIDSvr according to the strategy of random or poll or load balancing by the described guard station identification request message of receiving, is processed by corresponding RIDSvr.The distributed HSvr with MsgDSvr as shown in Figure 3.
For the HSvr with MsgDSvr, only need to be in corresponding DNS, by the HCode of described HSvr corresponding domain name point to the host IP address of this MsgDSvr.
In this case, step S12 also can be further: structure destination address is the reply message of the source address of described request message, and this reply message comprises RCode corresponding to described identification target; This reply message is sent to described MsgDSvr, reply RCode corresponding to described identification target by this MsgDSvr to described request side.Like this, described MsgDSvr, together with each RIDSvr, forms a super RIDSvr.
A semi-permanent address for the present invention (SPAddr, Semi-permanent Address) is described an AccountAddr corresponding address in its RSvr in the Internet.The SPAddr of an AccountAddr comprises RCode two parts of this AccountAddr and this AccountAddr.A SPAddr can be write as (AccountAddr, RCode) form, or is write as AccountAddr/RCode form.
Especially, a SPAddr also can be write as an email address format, and the SPAddr of this form is called a semipermanent email address (SPEmailAddr, Semi-permanent email Address).
The user name of the SPEmailAddr of one, SPAddr of mode is made up of the AddrBase of the AccountAddr of this SPAddr and the RCode of this SPAddr, correspondingly, and the domain name of the AccountAddr that the domain name of this SPEmailAddr is this SPAddr.For example, for SPAddr value (liubei@163.com, 10), the user name of corresponding SPEmailAddr forms by AddrBase value liubei and the RCode value 10 of AccountAddr value liubei@163.com the liubei.10 obtaining, and the domain name of corresponding SPEmailAddr is the domain name 163.com of this AccountAddr.
The AddrBase of the AccountAddr of user this SPAddr by name of the SPEmailAddr of two, SPAddr of mode, correspondingly, the domain name of this SPEmailAddr is made up of the domain name of the RCode of this SPAddr and the AccountAddr of this SPAddr.For example, corresponding SPAddr value (liubei@163.com, 10), the user name of corresponding SPEmailAddr is the AddrBase value liubei of the AccountAddr value liubei@163.com of this SPAddr, and the domain name of corresponding SPEmailAddr forms by the domain name 163.com of RCode value 10 and this AccountAddr the 10.163.com obtaining.After the present invention, as example, but be not used in restriction.
For a SPEmailAddr: known AccountAddr wherein can parse corresponding RCode from this SPEmailAddr; Known RCode wherein can parse corresponding AccountAddr from this SPEmailAddr.
Especially, a known SPEmailAddr when the HCode of corresponding RSvr, can from this SPEmailAddr, parse corresponding AccountAddr and RCode.For example, for SPEmailAddr value liubei@10.163.com, known described HCode value is 163.com, the liubei@163.com of the user name that corresponding AccountAddr is SPEmailAddr and this HCode composition, and corresponding RCode is 10.
In a SPAddr, contain a RSvrCompDesc, the AddrHome of the AccountAddr that the HCode of this RSvrCompDesc is this SPAddr, the RCode that the RCode of this RSvrCompDesc is this SPAddr.For example, liubei is liubei@163.com at the AccountAddr of Netease, the RSvr of this AccountAddr is RSvr-10, and corresponding RCode is 10,, the SPAddr of this AccountAddr is (liubei@163.com, 10), corresponding SPEmailAddr is liubei@10.163.com, correspondingly, the RSvrCompDesc of this SPAddr is (163.com, 10).
According to the RSvrCompDesc of a SPAddr, can determine that the corresponding account of this SPAddr is in the Internet in which RSvr.Like this, while sending message to the corresponding account of this AccountAddr according to the SPAddr of an AccountAddr, just can directly this message be sent in the RSvr of this AccountAddr, thereby, message reduced roundabout.
The present invention proposes a kind of message method, for sending message to an account corresponding to AccountAddr.Be illustrated in figure 4 message method execution mode flow chart of the present invention.In the figure,
First in step 11, obtain the RCode of described AccountAddr.
Step 12, send message according to described AccountAddr and the corresponding SPAddr of the RCode that obtains.
Described step 11 can be following sub-process:
First at step 11-101, according to the corresponding domain name of the AddrHome of described AccountAddr, obtain the host IP address of this domain name RIDSvr pointed by domain name mapping.
Step 11-102, send and comprise that the guard station of identify target identifies request message to corresponding RIDSvr according to obtained IP address, described identification target is described AccountAddr.
Step 11-103, described RIDSvr are receiving after this request message, determine RCode corresponding to described identification target; Reply determined RCode to described request side.
The RCode that step 11-104, reception are replied.Like this, just obtain the RCode of described AccountAddr.
In step 12, describedly send message according to SPAddr and can carry out in accordance with the following steps:
Step 12-101, according to the RSvrCompDesc of described SPAddr, obtain corresponding domain name.
Step 12-102, by domain name mapping, obtain the host IP address of this domain name RSvr pointed.
Step 12-103, the IP address obtaining according to parsing, send described message to corresponding RSvr, and the destination address of message comprises the AccountAddr of this SPAddr.
RSvr receives after described message accordingly, and according to the destination address of this message, the AccountAddr of described SPAddr determines target account, and this message is ended in to this target account.For example, described message is for sending a short message to target account, and described this message is ended in to this target account can be the client that this short message is sent to this target account.
When sending message according to SPAddr, can directly a message be sent in the RSvr of corresponding AccountAddr, reduce message roundabout.Therefore, after step 11, described sender of the message can preserve the RCode of obtained described AccountAddr, also preserve the SPAddr of this AccountAddr, like this, in the time that send message to account corresponding to this AccountAddr next time, just no longer need to perform step the guard station identifying operation described in 11.
The described message that comprises object AccountAddr is further: the message that comprises object SPEmailAddr.Correspondingly, described step R01 is further step R01B: described RSvr determines target account according to described object SPEmailAddr.Also, receive after the message that comprises object SPEmailAddr from other HSvr at described RSvr, according to this object SPEmailAddr, determine target account, this message is ended in to this target account.
Described step R01B is further: the AccountAddr that obtains described object SPEmailAddr according to had HCode value: determine target account according to this AccountAddr.For example, this SPEmailAddr is liubei@10.163.com, and this HCode is 163.com, and obtaining corresponding AccountAddr is liubei@163.com.In RSvr, can preserve had HCode value here.
Described step R01B is further: obtain the AccountAddr of described object SPEmailAddr according to the RCode value being assigned, determine target account according to this AccountAddr.For example, this SPEmailAddr is liubei@10.163.com, and this RCode is 10, and obtaining corresponding AccountAddr is liubei@163.com.Here in RSvr, can preserve the RCode value being assigned.
An accounts information corresponding to AccountAddr is kept in RSvr and can is: preserve account information according to the SPEmailAddr of this AccountAddr.For example, RSvr-10 preserves corresponding accounts information by the accounts information table as shown in table 1-1.
Table 1-1
SPEmailAddr Password ClientIP ClientPort
liubei@10.163.com ******** Corresponding IP address Respective ends slogan
xushu@10.163.com ******** Corresponding IP address Respective ends slogan
According to table 1-1, described step R01B further: directly determine target account according to described object SPEmailAddr.
If the RSvr of an AccountAddr changes, for example, because user migrates, accounts information corresponding this AccountAddr is moved in another one RSvr from a RSvr, in this case, while sending message according to the SPEmailAddr of the SPAddr of this AccountAddr or correspondence, corresponding RSvr receives after this message, according to the destination address of message, the AccountAddr of this SPAddr or corresponding SPEmailAddr, cannot determine target account.In this case, described RSvr can reply to the sender of message the reply message of expression " target account does not exist ".
The sender of described message, receiving after the reply message of the expression " target account does not exist " that described RSvr sends, can resend message according to described AccountAddr.The sender of for example message re-executes step 11, to obtain the RCode of RSvr of this AccountAddr after renewal, can obtain like this SPAddr or the corresponding SPEmailAddr of this AccountAddr after upgrading.Like this, just can resend corresponding message according to the SPAddr of this AccountAddr after upgrading or corresponding SPEmailAddr.
Because described request side is being received after the RCode of renewal, also, according to corresponding AccountAddr and new RCode, upgrade the SPAddr or the SPEmailAddr that preserve.Like this, can realize the automatic renewal of good friend address.
Usually, in step 11-103, in described reply message, also further carry described identification target.Like this, in step 11-104, in the time receiving the RCode replying, also receive described identification target.
For example, described request side has been preserved corresponding good friend's SPAddr.In the time carrying out described step 11, using the AccountAddr of a good friend's SPAddr as identification target, the flow process according to step 11-101 to step 11-104, receives the reply message that comprises this AccountAddr and corresponding RCode of reply.Like this, just the RCode part of this good friend's SPAddr can be updated to received RCode.For example, from buddy list, search the good friend that SPAddr attribute mates with this AccountAddr; The RCode part of this good friend's SPAddr is updated to received RCode.Here, a SPAddr mates and refers to an AccountAddr, the AccountAddr that this AccountAddr is this SPAddr.
Also for example, described request side has been preserved corresponding good friend's SPEmailAddr.In the time carrying out described step 11, using the AccountAddr of a good friend's SPEmailAddr as identification target, the flow process according to step 11-101 to step 11-104, receives the reply message that comprises this AccountAddr and corresponding RCode of reply.Like this, just can obtain a new SPEmailAddr according to this AccountAddr and corresponding RCode, i.e. NewSPEmailAddr, and this good friend's SPEmailAddr is updated to NewSPEmailAddr.For example, from buddy list, search the good friend that SPEmailAddr attribute mates with this AccountAddr, this good friend's SPEmailAddr is updated to described NewSPEmailAddr.Can mention below and how from a SPEmailAddr, to parse corresponding AccountAddr.
Here, a SPEmailAddr mates and refers to an AccountAddr, and the two meets following condition:
{ user name of this SPEmailAddr is identical with the user name of this AccountAddr, and the domain name of this SPEmailAddr is the subdomain name of the domain name of this AccountAddr }
Especially, in step 11-103, describedly reply determined RCode further to described request side: obtain new SPEmailAddr according to described AccountAddr and corresponding RCode, i.e. NewSPEmailAddr, replys NewSPEmailAddr to described request side.
Like this, described request side, receiving after described reply message, can directly be determined corresponding good friend according to this NewSPEmailAddr, upgrades this good friend's address with this NewSPEmailAddr.
For example, described request side is preserved corresponding good friend's SPEmailAddr.In the time carrying out guard station identifying operation, the described reply message receiving comprises new SPEmailAddr, i.e. NewSPEmailAddr.Receiving after replied NewSPEmailAddr, from buddy list, searching the good friend that SPEmailAddr attribute mates with this NewSPEmailAddr; This good friend's SPEmailAddr is updated to described NewSPEmailAddr.
For two SPEmailAddr:SPEmailAddr-A and SPEmailAddr-B, the two coupling refers to, meets following condition:
{ user name of SPEmailAddr-A is identical with the user name of SPEmailAddr-B, and last two subdomains of last two subdomains of the domain name of SPEmailAddr-A and the domain name of this SPEmailAddr-B are identical }.For example liubei@86.10.163.com mates with liubei@86.28.163.com.
Or for two SPEmailAddr:SPEmailAddr-A and SPEmailAddr-B, the two coupling refers to, meets following condition:
{ the two is except the lowermost level subdomain difference of domain name, and other parts are all identical }.For example liubei@8610.163.com mates with liubei@8628.163.com.
Therefore, by receiving the RCode about an AccountAddr replying from the respective server of HSvr, or about the SPEmailAddr of an AccountAddr, can realize corresponding good friend's address and automatically upgrade.
The invention allows for the recognition methods of a kind of guard station, for obtaining corresponding RCode according to a SPEmailAddr.Because the formation rule that requestor does not need to understand a SPEmailAddr is identified in guard station, therefore, the method has better extensibility.The method comprises the steps:
Step 01B, according to the domain name of described SPEmailAddr, obtain the host IP address of RSvr pointed by domain name mapping;
The IP address that step 02B, basis obtain sends and comprises the guard station identification request message of identifying target to described RSvr, and described identification target is described SPEmailAddr;
The RCode that step 04B, reception are replied.
Before step 04B, can further include step 03B: described RSvr receives after this request message, send and comprise the guard station identification request message of identifying target to corresponding RIDSvr, described identification target is described SPEmailAddr or AccountAddr corresponding to described SPEmailAddr; Described RIDSvr is receiving after described request message, determines RCode corresponding to described identification target; RCode corresponding this identification target is sent to this RSvr; This RSvr, receiving after RCode corresponding to described identification target, replys this RCode to described request side.
Described RSvr or described RIDSvr can preserve had HCode, and described RSvr or described RIDSvr can obtain corresponding AccountAddr according to the user name of a SPEmailAddr and the HCode having.Described RIDSvr determines corresponding RCode according to described AccountAddr.Certainly, described RSvr also can preserve the RCode being assigned, and according to this RCode, parses corresponding AccountAddr from described SPEmailAddr.
In step 03B, described RSvr receives after this request message, before described request message is sent to corresponding RIDSvr, also can first determine target account according to described SPEmailAddr, see and whether determine, if determined, directly reply to described request side the RCode oneself being assigned; Otherwise just described request message is sent to corresponding RIDSvr.
In step 03B, the described RCode of described reply, can further, according to the AccountAddr of this RCode and described correspondence, obtain a new SPEmailAddr, i.e. NewSPEmailAddr, directly replys this NewSPEmailAddr.
The present invention also proposes a kind of method that sends message according to a SPEmailAddr, and the method comprises the steps:
Step 51, destination address using this SPEmailAddr as message, send this message.
Corresponding RSvr, receiving after described message, determines target account according to the destination address of message, if determined, this message is ended in to this target account, otherwise, reply the return information of expression " target account does not exist " to sender of the message.
Step 55, receiving after the return information of expression " target account does not exist ", obtaining the RCode that this SPEmailAddr is corresponding.
RCode corresponding to this SPEmailAddr that step 56, basis are obtained, obtains new SPEmailAddr, i.e. a NewSPEmailAddr; Destination address using this NewSPEmailAddr as message, resends this message.
In step 55, described in obtain RCode that this SPEmailAddr is corresponding further: obtain an AccountAddr according to this SPEmailAddr; Obtain according to the guard station recognition methods of above-mentioned the first the RCode that this AccountAddr is corresponding.
In step 55, described in obtain RCode that this SPEmailAddr is corresponding further: according to the guard station recognition methods of above-mentioned the second, directly obtain the RCode that this SPEmailAddr is corresponding.
Describedly obtain an AccountAddr according to a SPEmailAddr and can be: from the domain name of this SPEmailAddr, remove a lowermost level subdomain, using remaining Email address as this AccountAddr.For example, described SPEmailAddr is liubei@8610.163.com, removes a lowermost level subdomain from the domain name of this SPEmailAddr, and remaining Email address is liubei@163.com.
Especially, for extensibility aspect is considered, in the time preserving the buddy list of an IUsr, for corresponding good friend's SPEmailAddr, a RCode length (RCodeLength is set, RCode Length) attribute, in order to indicate, in the domain name of this SPEmailAddr, to have several subdomains be RCode.Like this, in the time obtaining an AccountAddr according to a SPEmailAddr, can decide from the domain name of this SPEmailAddr according to RCodeLength value, remove several rudimentary subdomains, obtain corresponding AccountAddr.For example, some good friends' SPEmailAddr is liubei@86.10.163.com, corresponding RCodeLength=2, like this, from the domain name of SPEmailAddr value liubei@86.10.163.com, remove 2 rudimentary subdomains 86.10, can obtain corresponding AccountAddr value liubei@163.com.
Certainly, in the time preserving the buddy list of an IUsr, also can be for corresponding good friend's SPEmailAddr, an AddrHome length (AddrHomeLength is set, AddrHome Length) attribute, there are several subdomains in order to indicate in the AddrHome of the AccountAddr that this SPEmailAddr is corresponding.Like this, in the time obtaining an AccountAddr according to a SPEmailAddr, can decide from the domain name of this SPEmailAddr according to AddrHomeLength value, retain several senior subdomains, with with corresponding user name together, obtain corresponding AccountAddr.For example, some good friends' SPEmailAddr is liubei@8628.163.com, corresponding AddrHomeLength=2, like this, from the domain name of SPEmailAddr value liubei@8628.163.com, retain 2 senior subdomains, with corresponding user name liubei together, can obtain corresponding AccountAddr value liubei@163.com.
Due to people's inhabitation or the relative stability in place of working, therefore, in the time coming by the SPEmailAddr of an IUsr to send message to this IUsr, generally can not receive the return information of described expression " target account does not exist ".Like this, just can reduce dramatically in current the Internet ubiquitous message roundabout.
In step 03 or step 03B, source address one side of described message is being received after replied corresponding RCode, can upgraded the address information such as SPAddr or SPEmailAddr of preserving for corresponding good friend.
Usually, in step 03B, in described reply message, further carry corresponding identification target.
Receive after the message Msg1 that comprises object AccountAddr from other HSvr at described RSvr, in step R01, in the time cannot determining target account according to this AccountAddr, also can first carry out following flow process, then finish.Described flow process is as follows:
Step R03, described RSvr send guard station identification request message to corresponding RIDSvr, and the identification target that this request message comprises is this AccountAddr.
Step R04, described RIDSvr receive after this identification request, obtain the RCode of this AccountAddr, reply the RCode obtaining to described RSvr;
Step R05, receive after described reply message at described RSvr, reply described RCode to source address one side of message Msg1.
Certainly, in step R03, in described identification request, can also further carry the source address of message Msg1, correspondingly, in step R04, described RIDSvr is obtaining after the RCode of described AccountAddr, directly replys to source address one side of message Msg1 the RCode obtaining, and no longer performs step R05.
The described message Msg1 that comprises object AccountAddr is the message Msg1 that comprises object SPEmailAddr, correspondingly:
Step R03 is further step R03B: described RSvr sends guard station identification request message to corresponding RIDSvr, and the identification target that request message comprises is this SPEmailAddr or AccountAddr corresponding to this SPEmailAddr.
Step R04 is further step R04B: described RIDSvr receives that, after this identification request, the AccountAddr corresponding according to described SPEmailAddr, obtains corresponding RCode, replys the RCode obtaining to described RSvr;
Step R05 is further step R05B: receive after described reply message at described RSvr, reply to source address one side of message Msg1 the RCode receiving.
Certainly,, in step R03B, in described identification request, can also further carry the source address of message Msg1, correspondingly, in step R04B, described RIDSvr is obtaining after corresponding RCode, directly reply to source address one side of message Msg1 the RCode obtaining, and no longer perform step R05B.
Described RSvr or described RIDSvr can obtain corresponding AccountAddr according to the user name of had HCode and described SPEmailAddr.Described RIDSvr determines corresponding RCode according to corresponding AccountAddr.For example this HCode is 163.com, and this SPEmailAddr is liubei@10.163.com, and the AccountAddr that correspondence obtains is liubei@163.com.Here, described RIDSvr can preserve the HCode of corresponding HSvr.
A RSvr can preserve had HCode.Like this, described RSvr can judge whether a certain HCode is had by own.
Receive after the message from other HSvr at RSvr first to judge whether the AddrHome of the object AccountAddr of this message is had by own, if, just carry out and determine target account according to this AccountAddr, and follow-up corresponding operation, otherwise, directly finish.
In HSvr of the present invention, described RSvr is after the message that comprises object AccountAddr or SPEmailAddr receiving from other RSvr in this HSvr, can be with reference to described RSvr above after the message that comprises object AccountAddr or SPEmailAddr receiving from other HSvr, the processing mode adopting.
Described RSvr receives after the message that comprises object SPAddr or SPEmailAddr from client, can, according to above-mentioned message method, directly send described message according to this SPAddr or SPEmailAddr.
In the middle of reality, RSvr routing table also can be set, for the link information (RSvrConnDesc, RSvr Connection Description) of other RSvr of register HSvr.RSvr routing table referring to as shown in table 7-1:
Table 7-1
RCode RSvrConnDesc Remark
20 The RSvrConnDesc of RSvr-20 Corresponding RSvr-20
21 The RSvrConnDesc of RSvr-21 Corresponding RSvr-21
28 The RSvrConnDesc of RSvr-28 Corresponding RSvr-28
In table 7-1, the RSvr routing table data of having preserved RSvr-10.In this table, registered the RSvrConnDesc of this RSvr according to the RCode of a RSvr.
Described RSvrConnDesc can be the communication link number of corresponding RSvr, the socket descriptor (SktD, Socket Descriptor) that also can connect corresponding to the TCP of corresponding RSvr.
The present invention is example with { described RSvrConnDesc is the IP address of corresponding RSvr, and arranges unified port numbers }.
Described RSvr receives after the message that comprises object SPAddr or SPEmailAddr from client, according to this SPAddr or RCode value corresponding to SPEmailAddr, according to set RSvr routing table, obtains the IP address of corresponding RSvr; According to the port numbers of this IP address and agreement, send described message to corresponding RSvr, the destination address of message can be described object SPAddr or the corresponding AccountAddr of SPEmailAddr or SPEmailAddr.
Especially, described RSvr receives after the message that comprises object SPAddr or SPEmailAddr from client, can also first judge whether the RSvrCompDesc that this SPAddr or SPEmailAddr are corresponding points to oneself, if, directly determine target account according to corresponding AccountAddr, and this message is ended in to determined target account, then finish.
Receive after the message that comprises object AccountAddr from client at RSvr, can first obtain the RCode of described AccountAddr, then send message according to described AccountAddr and the corresponding SPAddr of RCode or the SPEmailAddr that obtain.
The RCode that can preserve its HCode having and oneself be assigned in RSvr.Like this, RSvr can judge whether a certain RSvrCompDesc points to oneself.For example, the HCode that described RSvr judges this RSvrCompDesc is had by own, and the RCode of this RSvrCompDesc is while being the RCode oneself being assigned, judges this RSvrCompDesc sensing oneself.
Within being encapsulated in HSvr about the design of HSvr, make different SP not need the design of the HSvr that understands other SP, and how corresponding RIDSvr to realize guard station identifying operation, therefore, there is better opening.
Example one, described RIDSvr determine RCode corresponding to described identification target by inquiring about corresponding RSvr.
1.1, step S11 is further step S11A: described RIDSvr sends the query messages that comprises described identification target to corresponding RSvr; Corresponding RSvr is receiving after this query messages, searches target account according to described identification target, if found, sends to this RIDSvr the response to query message that represents " target account existence "; Described RIDSvr receives after the described response to query message of corresponding RSvr transmission, using the RCode of this RSvr as RCode corresponding to described identification target.Obviously, described RIDSvr can set up the corresponding relation of RCode value and corresponding RSvr link information, like this, according to the corresponding link information of response to query message, can determine the RCode of corresponding RSvr.Certainly, described RSvr can preserve the RCode being assigned, and can further carry the RCode of this RSvr in described response to query message.
If all RSvr do not find corresponding target account according to described identification target, described RIDSvr just can not receive the response to query message of described expression " target account existence ", and at this moment, this RIDSvr can reply RCode value 0 to described request side.
Example two, set up in advance the mapping relations of AccountAddr and RCode, to according to an AccountAddr, can determine corresponding RCode according to these mapping relations.In the indicated RSvr of this RCode, the mapping account that the account that this AccountAddr is corresponding is this RSvr, is also the mapping account of this AccountAddr.
In the middle of reality, can set up by direct hash mode the mapping relations of AccountAddr and RCode.
Be example taking { RCode that the RCode that the RCode of RSvr-10 is 2, RSvr-21 as the RCode of 1, RSvr-20 is 3, RSvr-28 is for 4 }.The hashing algorithm of selecting can be: carry out modulo operation to 4 by the ASCII value of lowercase corresponding to the initial of the AddrBase of described AccountAddr, the remainder obtaining is one of four numbers such as 0,1,2,3, gained remainder is added to 1, obtain the HashValue of this AccountAddr.Directly using the HashValue of an AccountAddr as corresponding RCode.
For example, for AccountAddr value liubei@163.com, corresponding initial is l, and ASCII value is 108, carries out modulo operation to 4, and obtaining remainder is 0, and this remainder is added to 1, and to obtain corresponding RCode value be 1.
Preferably, set up the mapping relations of AccountAddr and RCode by indirect hash mode.
In this case, described RCode can be a coding, for example: jing, guang, hu; Also can be multiple subdomain strings that coupled together by point, for example: shen.guang.Certainly, described RCode can be also the on-site landline telephone area code of corresponding RSvr, and for example, the RCode that the RCode that the RCode that the RCode of RSvr-10 is 10, RSvr-20 is 20, RSvr-21 is 21, RSvr-28 is 28.
In described RIDSvr, set up the corresponding relation of HashValue and RCode value, the mapping table referring to HashValue as shown in table 2 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, all corresponding RCode values 20 of four HashValue such as 1,2,7,9, i.e. corresponding RSvr-20.
The hashing algorithm of selecting is: carry out modulo operation by the ASCII value of lowercase corresponding to the initial of the AddrBase of described AccountAddr to 13, obtain the HashValue of this AccountAddr.
Like this, according to the hashing algorithm of selecting, described RIDSvr carries out hash computing to an AccountAddr, obtains a HashValue; This RIDSvr searches the mapping table of HashValue as shown in table 2 and RCode value according to this HashValue, thereby obtains corresponding RCode value.For example, for AccountAddr value liubei@163.com, corresponding initial is l, and ASCII value is 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.
Set up the mapping relations of AccountAddr and RCode by indirect hash mode, owing to adjusting the corresponding RCode of this HashValue according to the quantity of a corresponding real account of HashValue, thereby make corresponding RSvr in a HSvr can reach preferably load balancing.Below as example.
2.1, described step S11 is further step S11B: described RIDSvr, according to described identification target, determines corresponding RCode according to the AccountAddr setting up with the mapping relations of RCode.
For example: the AccountAddr of sunquan is sunquan qq.com, corresponding RCode is 25, points to the RSvr that is positioned at Nanjing in qq.com institute's corresponding with service territory.When the account that is liubei@163.com to AccountAddr by the account of sunquan sends message, can carry out following process:
Step 101, send guard station identification request message to the RIDSvr of the HSvr of liubei@163.com ownership, the identification target that request message comprises is liubei@163.com, source address is sunquan@qq.com or SPAddr value (sunquan@qq.com, 25).
For example, the AddrHome value 163.com of liubei@163.com is carried out to domain name mapping, obtain the host IP address of this domain name RIDSvr pointed; According to this IP address, send guard station identification request message to this RIDSvr, the identification target that this request message comprises is liubei@163.com, source address is sunquan@qq.com or SPAddr value (sunquan@qq.com, 25).
Step 102, described RIDSvr are receiving that after described guard station identification request message,, according to described scattering algorithm, the HashValue that obtains liubei@163.com is 4; According to HashValue value 4, from the mapping table of HashValue as shown in table 2 and RCode value, obtain RCode value 10; Then reply to described request side the RCode value 10 obtaining.
The actual guard station identifying operation that completes of described step 101 and step 102.For example, the client that sunquan@qq.com is corresponding sends message to the RSvr of ownership, and the destination address of message is liubei@163.com, and source address is sunquan@qq.com; The RSvr that sunquan@qq.com is corresponding receives after described message, execution step 101.
The RSvr of step 103, this side of sunquan@qq.com is receiving after the RCode value 10 of described RIDSvr reply, according to AccountAddr value liubei@163.com and the corresponding SPAddr value of RCode value 10 (liubei@163.com, 10) send message Msg1, the destination address of this message is the AccountAddr value liubei@163.com of this SPAddr, source address is sunquan@qq.com or SPAddr value (sunquan@qq.com, 25).
For example, according to the RSvrCompDesc value (163.com, 10) of described SPAddr value (liubei@163.com, 10), obtain corresponding domain name 10.163.com; By domain name mapping, obtain the host IP address of this domain name RSvr-10 pointed; Send message Msg1 to RSvr-10, the AccountAddr value liubei@163.com that the destination address of this message is this SPAddr, source address is sunquan@qq.com or SPAddr value (sunquan@qq.com, 25).
Step 104, RSvr-10 receive after message Msg1, determine target account according to the destination address liubei@163.com of this message.
Step 105, described message is ended in to this target account.For example, described message is for sending a short message, and RSvr-10 ends in this target account by described message and is: this short message is rendered in the inbox of the account that liubei@163.com is corresponding, or sent to the client of the account.Like this, the other side can receive this information.
In step 103, the RSvr of this side of sunquan@qq.com can also preserve corresponding SPAddr value (liubei@163.com, 10), like this, in the time that send message to the account of liubei@163.com next time, just no longer need to perform step 101 and step 102.
Described step 103 can be also that the RSvr of this side of step 103B:sunquan@qq.com is receiving after the RCode value 10 of described RIDSvr reply, send message Msg1 according to the SPEmailAddr value liubei@10.163.com by liubei@163.com and RCode value 10 correspondences, the destination address of this message is liubei@10.163.com, source address is sunquan@qq.com or SPAddr value (sunquan@qq.com, 25).Correspondingly, described step 104 is further that step 104B:RSvr-10 receives after this message, determines target account according to destination address liubei@10.163.com.
In step 103, the RSvr of this side of sunquan@qq.com is receiving after the RCode value 10 of described RIDSvr reply, this RCode value 10 can also be replied to client corresponding to sunquan@qq.com, by the corresponding SPAddr value of this client storage (liubei@163.com, 10), like this, in the time that send message to the account of liubei@163.com next time, the directly destination address as message by this SPAddr value (liubei@163.com, 10).
The HCode value of preserving in the RSvr of this side of liubei@163.com is 163.com.
In step 104B, describedly determine that according to destination address liubei@10.163.com target account can be: determine target account according to the corresponding AccountAddr value of the HCode value 163.com liubei@163.com of the user name liubei of liubei@10.163.com and preservation.
According to table 1-1, in step 104B, RSvr-10 can directly determine target account according to the destination address liubei@10.163.com of message.
Described RIDSvr can, according to an AccountAddr, according to the AccountAddr setting up and the mapping relations of RCode, obtain corresponding RCode.But, but can not determine this AccountAddr whether corresponding effective account.
2.2, described step S11 is further following sub-process:
Step S11.2.101, described RIDSvr, according to described identification target, determine corresponding RCode according to the AccountAddr setting up with the mapping relations of RCode.
Step S11.2.102, described RIDSvr send to RSvr corresponding to described RCode the query messages that comprises described identification target.
Step S11.2.103, receive after described query messages at described RSvr, search target account according to described identification target, if found, send to described RIDSvr the response to query message that represents " target account existence ".
Step S11.2.104, described RIDSvr receive after the response to query message of expression " target account existence " of corresponding RSvr transmission, the RCode using determined RCode as described identification target.
In step S11.2.103, if search fall short account, described RSvr sends the response to query message that represents " not having target account " to described RIDSvr.Correspondingly, in step S11.2.104, described RIDSvr receives after the response to query message that expression that corresponding RSvr sends " do not exist target account ", confirms that identification target is invalid.In this case, the RCode of this RIDSvr using RCode value 0 as described identification target.Like this, in step S12, described RIDSvr replys RCode value 0 to described request side.
2.3, described step S11 is further step S11D: described RIDSvr, according to described identification target, determines corresponding RCode according to the AccountAddr setting up with the mapping relations of RCode.Described step S12 is further following sub-process:
Step S12.2.101, described RIDSvr directly send to by described request message the RSvr that this RCode is corresponding.
Step S12.2.102, described RSvr receive after described request message, reply the RCode being assigned to described request side.
In step S12.2.102, described RSvr carry out described replys the operation of the RCode being assigned to described request side before, can also further judge whether to exist account corresponding to described identification target, if this operation is just carried out in existence; Otherwise, directly finish or reply RCode value 0 to described request side.
According to one of various situations of above-mentioned example two, setting up after the mapping relations of AccountAddr and RCode, AccountAddr is hashed rule and is mapped to the RSvr of appointment, if account message corresponding this AccountAddr is moved other RSvr from shone upon RSvr, cannot addressing.Like this, just can not meet the needs that IUsr migrates.
In the middle of reality, due to the generation of migrating, the RSvr that can make an IUsr be mapped to away from its AccountAddr.For example, liubei is originally in Beijing life, closer apart from RSvr-10, therefore, according to the own account in RSvr-10 of AccountAddr value liubei@163.com access, fast.Afterwards, Liu advised in the standby another name for Sichuan Province that enters of adopting Zhuge Liang, had come Chengdu, closer apart from RSvr-28.But because the account that Liu is standby can not be moved (because move after RSvr-28, described in example two, can not be correctly validated guard station information, thereby cannot realize desired address), therefore, Liu is standby must access the RSvr-10 in Pekinese.Like this, just produce long-distance data access, thereby, more Internet resources can be consumed.
Example three, foundation roaming table, in this roaming table, preserve corresponding RCode according to AccountAddr.
Referring to roaming table 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
According to roaming table as shown in table 3, can search corresponding RCode value according to an AccountAddr value.
Step S11 is further step S11E: described RIDSvr, according to described identification target, searches corresponding RCode from described roaming table.If search less than, using 0 as RCode value.
Can also further set up the mapping relations of AccountAddr and RCode, referring to above-mentioned example two.Correspondingly, in step S11E, in the time searching less than corresponding RCode from described roaming table, also further according to described identification target, determine corresponding RCode according to the AccountAddr setting up and the mapping relations of RCode, using this RCode as target RCode.In this case, can also send query statement to this RCode RSvr pointed, carry described identification target in instruction, corresponding RSvr receives after described query statement, according to described identification target, whether search corresponding account, and will exist the Query Result of corresponding account to reply to described RIDSvr, this RIDSvr receives after reply, in the time there is corresponding account in judgement, using described RCode as target RCode, otherwise, using 0 as target RCode value.
Because described roaming table may be very huge, therefore, may produce access bottleneck.
The present invention proposes a kind of guard station identification message processing method especially, and the method sets in advance message distribution module and multiple guard stations enquiry module, in the enquiry module of described guard station, roaming sublist is set, for preserving corresponding RCode according to corresponding AccountAddr.Set up the mapping relations of AccountAddr and corresponding guard station enquiry module, so that described message distribution module can, according to an AccountAddr, according to set up mapping relations, be determined corresponding guard station enquiry module.
Described method comprises the steps:
Step 81, described message distribution module receive and comprise the guard station identification request message of identifying target, according to described identification target, according to the mapping relations of set up AccountAddr and corresponding guard station enquiry module, determine corresponding guard station enquiry module; Then perform step 82 or step 82B.
Described step 82 is: send the query messages that comprises described identification target to determined guard station enquiry module; Described guard station enquiry module is received after described query messages, according to described identification target, from roaming sublist, searches corresponding RCode, and this RCode is sent to described message distribution module; This message distribution module is received after described response to query message, replys the RCode receiving to described request side.
Described step 82B is: described request message is sent to determined guard station enquiry module; This guard station enquiry module is received after this request message, according to described identification target, from roaming sublist, searches corresponding RCode; Reply this RCode to described request side.
According to described guard station identification message processing method, the present invention has further proposed a kind of distributed RIDSvr.
A kind of distributed RIDSvr, comprises at least one hash server (HashSvr, Hash Server), and multiple roaming queries server (QSvr, Roam Query Server).Distributed RIDSvr as shown in Figure 5, comprises a HashSvr and three QSvr:QSvr1, QSvr2, QSvr3 at this RIDSvr.The HCode of described HashSvr and described QSvr is the HCode of this RIDSvr, is also the HCode of this HSvr.
Described HashSvr is used for receiving guard station identification request message., described RIDSvr receives guard station identification request message by described HashSvr.
Roaming sublist is set in described QSvr, for preserving corresponding RCode according to corresponding AccountAddr.
Set up the mapping relations of AccountAddr and QSvr, so that according to an AccountAddr, according to set up mapping relations, can determine corresponding QSvr.This QSvr is the QSvr of this AccountAddr mapping, is called for short the QSvr of this AccountAddr.
According to the AccountAddr setting up and the mapping relations of QSvr, can determine corresponding QSvr according to an AccountAddr.Like this, just can in the roaming sublist of this QSvr, preserve corresponding RCode according to this AccountAddr.
Receive that at described HashSvr one comprises after the guard station identification request message of identifying target, carries out following flow process:
Step S31, described HashSvr, according to described identification target, according to the mapping relations of set up AccountAddr and QSvr, determine corresponding QSvr; Send the query messages that comprises described identification target to this QSvr.
Step S32, described QSvr receive after described query messages, according to described identification target, from roaming sublist, search corresponding RCode; Judge whether to find, if found, by response to query message, this RCode is sent to described HashSvr; Otherwise, by response to query message, RCode value 0 is sent to described HashSvr.
Step S33, described HashSvr receive after described response to query message, reply the RCode receiving to described request side.
Receiving that at described HashSvr one comprises after the guard station identification request message of identifying target, can be also to carry out following flow process:
Step S41, described HashSvr, according to described identification target, according to the mapping relations of set up AccountAddr and QSvr, determine corresponding QSvr; Described request message is sent to this QSvr.
Step S42, described QSvr receive after described request message, according to described identification target, from roaming sublist, search corresponding RCode; Judge whether to find, if found, reply this RCode to described request side; Otherwise, reply the RCode value 0 receiving to described request side.
Described step 01 is further: according to the corresponding domain name of the AddrHome of described AccountAddr, obtain the host IP address of HashSvr pointed by resolving this domain name.Correspondingly, described step 02 further: according to the IP address obtaining and the port numbers of agreement, send and comprise the guard station identification request message of identifying target to described HashSvr, described identification target is described AccountAddr.Here the port numbers of unified agreement HashSvr.
The mapping relations of the described AccountAddr of foundation and QSvr can comprise following two parts:
1, select hashing algorithm, according to this hashing algorithm, can obtain a HashValue from an AccountAddr.
2, set up the corresponding relation of the link information (QSvrConnDesc, QSvr Connection Description) of HashValue and corresponding QSvr.
Like this, according to the mapping relations of set up AccountAddr and QSvr, just can obtain the QSvrConnDesc of a QSvr according to an AccountAddr, like this, just can send message to this QSvr according to the QSvrConnDesc obtaining.
The hashing algorithm of selecting can be: carry out modulo operation by the ASCII value of lowercase corresponding to the initial of the AddrBase of described AccountAddr to 13, obtain the HashValue of this AccountAddr.
The corresponding relation of the QSvrConnDesc of described HashValue and corresponding QSvr can be referring to HashValue as shown in table 6 and the mapping table of 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, five all corresponding QSvr2 of HashValue such as 0,1,2,6,8.
Like this, by above-mentioned hashing algorithm, an AccountAddr is carried out to hash computing, obtain a HashValue, search the mapping table of HashValue as shown in table 6 and QSvrConnDesc value according to this HashValue, thereby obtain the QSvrConnDesc of corresponding QSvr.
Described QSvrConnDesc can be the communication link number of corresponding QSvr, the socket descriptor (SktD, Socket Descriptor) that also can connect corresponding to the TCP of corresponding QSvr.
The present invention is example with { described QSvrConnDesc is the IP address of corresponding QSvr, and arranges unified port numbers }.
If described HashValue is directly corresponding QSvrConnDesc, do not need the corresponding relation of the QSvrConnDesc that sets up HashValue and corresponding QSvr.
In the middle of reality, can be inquiry code of each QSvr assignment (QCode, Query Code) in RIDSvr, for knowing corresponding QSvr a RIDSvr acceptance of the bid.For example, the QCode that QSvr1, QSvr2 and QSvr3 are assigned is respectively 1,2 and 3.The connection of described QSvr believes it can is the QCode of this QSvr.
Referring to HashValue as shown in Table 6-1 and the mapping table of QCode value:
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, all corresponding QCode values 2 of five HashValue such as 0,1,2,6,8, i.e. corresponding QSvr2.
Like this, by above-mentioned hashing algorithm, an AccountAddr is carried out to hash computing, obtain a HashValue, search HashValue as shown in Table 6-1 and the mapping table of QCode value according to this HashValue, thereby obtain corresponding QCode value.
Can produce a domain name according to the QCode of a QSvr and the HCode having, and in corresponding DNS, this domain name be pointed to the host IP address of this QSvr.
For example, the HCode of described HSvr is 163.com, and wherein the QCode of a certain QSvr is 3, while producing domain name, can, using word string " QSvr " as subdomain, obtain a domain name QSvr.163.com together with 163.com, then, again using 3 as subdomain, produce domain name 3.QSvr.163.com.In DNS, 3.QSvr.163.com is pointed to the host IP address of described QSvr.Like this, described HashSvr just can obtain a domain name according to the QCode of a QSvr and the HCode having, and obtains the host IP address of this QSvr by resolving this domain name.
In the middle of reality, the information interaction between HashSvr and QSvr is the information interaction of RIDSvr inside, therefore, can select flexibly according to actual needs corresponding connected mode and communication protocol by the SP under corresponding RIDSvr.
After described distributed RIDSvr disposes, just can the domain name corresponding HCode of this RIDSvr be pointed to the host IP address of the HashSvr of this RIDSvr in corresponding DNS.
For described distributed RIDSvr, described step 11 is further following sub-process:
Step 11-201, send and comprise that the guard station of identify target identifies request message to corresponding HashSvr, described identification target is described AccountAddr.For example, according to the corresponding domain name of the AddrHome of this AccountAddr, obtain the host IP address of this domain name HashSvr pointed by domain name mapping, send and comprise the guard station identification request message of identifying target to this HashSvr according to this IP address, described identification target is this AccountAddr.
Step 11-202, described HashSvr are receiving after described request message, according to described identification target, according to the mapping relations of set up AccountAddr and QSvr, determine corresponding QSvr; Send the query messages that comprises described identification target to this QSvr.For example, according to the mapping relations of set up AccountAddr and QSvr, determine the QSvrConnDesc of QSvr corresponding to described identification target; According to this QSvrConnDesc, send described query messages to corresponding QSvr.
Step 11-203, described QSvr receive after described query messages, according to described identification target, from roaming sublist, search corresponding RCode; Judge whether to find, if found, by response to query message, the RCode inquiring is sent to described HashSvr; Otherwise, by response to query message, RCode value 0 is sent to described HashSvr.
Step 11-204, described HashSvr receive after described response to query message, reply the RCode receiving to described request side.
In step 11-203 or step 11-204, described response to query information or described request are replied in message can further carry described identification target.
In the middle of reality, described QSvr can be deployed on the server at described RSvr place.The distributed HSvr of RSvr stack QSvr as shown in Figure 6.In this HSvr, in described RIDSvr, there are a HashSvr and three QSvr:QSvr1, QSvr2, QSvr3.Wherein, QSvr1 and RSvr-10 are deployed in same server, and QSvr2 and RSvr-20 are deployed in same server, and QSvr3 and RSvr-21 are deployed in same server.
Especially, also can directly allow RSvr realize QSvr function.In this case, if ignore the negative factors such as data redundancy, can also merge in the accounts information table of corresponding RSvr roaming accordingly sublist.Referring in the following example four.
Example four, AccountAddr based on setting up in example two and the mapping relations of RCode, also further roam configuration.
For example, described roaming configuration refers to: in accounts information table, increase RCode field, for indicating the resettlement object RSvr of an account.Correspondingly, in the resettlement object RSvr of an account, create the Account History of moving into of the account.For example, described RSvr preserves corresponding accounts information according to the accounts information table as shown in table 1-8.
Table 1-8
AccountAddr Password RCode ClientIP ClientPort
caocao@163.com ******** 10 Corresponding IP address Respective ends slogan
liubei@163.com ******** 10 Corresponding IP address Respective ends slogan
guanyunchang@163.com ******** 28 Corresponding IP address Respective ends slogan
zhangliao@163.com ******** 10 Corresponding IP address Respective ends slogan
xushu@163.com ******** 10 Corresponding IP address Respective ends slogan
In table 1-8, in the time of RCode that the RCode of account property value is current RSvr, if the mapping account that the account is current RSvr illustrates that the account do not move; Otherwise, illustrate that the account is for moving into account.In the time that the RCode of the RCode of account property value and current RSvr is inconsistent, the account is one and takes out of account.
Due to the mapping relations of the AccountAddr according to set up and RCode, obtain AccountAddr value: the RCode value of caocao@163.com, liubei@163.com, guanyunchang@163.com, zhangliao@163.com and xushu@163.com etc. is respectively: 10,10,10,21 and 28, therefore, in the time that described current RSvr is RSvr-10, in table 1-8, caocao@163.com and account corresponding to liubei@163.com are not moved; Account corresponding to zhangliao@163.com, for moving into account, taken out of by RSvr-21; Account corresponding to xushu@163.com, for moving into account, taken out of by RSvr-28; Account corresponding to guanyunchang@163.com, for taking out of account, moved in RSvr-28.
If account is not mapping account, and its RCode property value do not point to again current RSvr, illustrates that account data are invalid, delete account data in the accounts information table shown in Ying Congru table 1-8.
Usually, described RSvr preserves the RCode oneself being assigned.
4.1, step S11 is further following sub-process:
Step S11.4.101, described RIDSvr, according to described identification target, determine corresponding RCode according to the AccountAddr setting up with the mapping relations of RCode.
Step S11.4.102, described RIDSvr send to RSvr corresponding to described RCode the query messages that comprises described identification target.
Step S11.4.103, described RSvr are receiving after described query messages, according to described identification target, from the accounts information table as shown in table 1-8, search target account, if found, the RCode property value of this target account is sent to described RIDSvr as response to query; Otherwise, send to described RIDSvr using RCode value 0 as response to query.
Step S11.4.104, described RIDSvr receive the RCode value that corresponding RSvr sends, using this RCode value as RCode corresponding to described identification target.
4.2, step S11 is further step S11G: described RIDSvr, according to described identification target, determines corresponding RCode according to the AccountAddr setting up with the mapping relations of RCode.Step S12 is further following sub-process:
Step S12.4.101, described RIDSvr directly send to by described request message the RSvr that this RCode is corresponding.
Step S12.4.102, described RSvr receive after described request message, according to described identification target, from the accounts information table as shown in table 1-8, search target account, if found, reply the RCode property value of this target account to described request side; Otherwise, reply RCode value 0 to described request side.
According to example four, before step R09, also further comprise step R06: whether the RCode property value that judges determined target account points to current RSvr, if so, perform step R09; Otherwise, directly finish.
In step R06, before described end, can also, further to source address one side of this message, reply the reply message that represents " target account is taken out of ".Like this, source address one side of this message can, again according to the AccountAddr of this target account, according to the message method based on AccountAddr, resend message.
In step R06, before described end, can also further perform step R08: the RCode property value of replying this target account to source address one side of described message.
In step R06, before described end, described message can also be transmitted to the RCode property value RSvr pointed of determined target account; Described RSvr pointed, receiving after this message, determines target account according to the object AccountAddr of this message, and this message is ended in to this target account.
According to example four, if account corresponding to AccountAddr needs resettlement, as long as in the RSvr shining upon at this AccountAddr, the RCode property value of mapping account corresponding this AccountAddr is changed to the RCode of resettlement object RSvr.Like this, just can realize the desired address after resettlement, thereby reach the IUsr account object of resettlement arbitrarily.
For example, standby from Beijing migrates to Chengdu as Liu, can complete account resettlement according to following two steps:
The first step, RSvr-10 in the accounts information table of table as shown in 1-8, the RCode property value of mapping account corresponding AccountAddr value liubei@163.com is changed to 28 by 10, to point to RSvr-28.As show as shown in 1-8.10.
Table 1-8.10
AccountAddr Password RCode ClientIP ClientPort
caocao@163.com ******** 10 Corresponding IP address Respective ends slogan
liubei@163.com ******** 28 Corresponding IP address Respective ends slogan
guanyunchang@163.com ******** 28 Corresponding IP address Respective ends slogan
zhangliao@163.com ******** 10 Corresponding IP address Respective ends slogan
xushu@163.com ******** 10 Corresponding IP address Respective ends slogan
Second step in RSvr-28, creates the account of moving into according to AccountAddr value liubei@163.com, as shown in table 1-8.28.
Table 1-8.28
AccountAddr Password RCode ClientIP ClientPort
liubei@163.com ******** 28 Corresponding IP address Respective ends slogan
guanyunchang@163.com ******** 28 Corresponding IP address Respective ends slogan
xushu@163.com ******** 10 Corresponding IP address Respective ends slogan
In table 1-8.28, account corresponding to guanyunchang@163.com, also for moving into account, moved into by RSvr-10.Account corresponding to xushu@163.com, for taking out of account, moved in RSvr-10.
For described distributed RIDSvr, in described RIDSvr, can comprise the HashSvr of multiple equivalences, to realize load sharing.For example, the HashSvr that these are equivalent, or backup each other, or mirror image each other, or selecting one of them is HashSvr main frame, remaining is HashSvr mirror image, or except deployed environment difference, other identical HashSvr, to play load balancing effect.
Can be in the Internet carry out Anywhere to dispose respectively these equivalent HashSvr, for example, can be in this locality and/or high in the clouds dispose respectively described multiple equivalent HashSvr.Correspondingly, in DNS system, carry out intelligently parsing configuration, make, in the time that domain name corresponding to the HCode of this HSvr resolved, can according to domain name mapping request from different geographical, be resolved to respectively the host IP address of different HashSvr.
For example, the HCode of HSvr is 163.com, in corresponding DNS, 163.com is pointed to simultaneously to the host IP address of multiple equivalent HashSvr of the RIDSvr of this HSvr.Corresponding dns server is received after a domain name mapping request, obtain corresponding IPrequester, with this IPrequester coupling corresponding multiple IP of domain name 163.com address, determine optimum Match person, the IP address of optimum Match is returned to domain name mapping requestor as analysis result.Like this, can realize according to the network segment at requestor place by a domain name mapping to the host IP address of different HashSvr.
Especially, a HashSvr and a QSvr can be deployed on a server.For example, in the server at each QSvr place, dispose a HashSvr.The distributed RIDSvr of QSvr stack HashSvr as shown in Figure 7.In this RIDSvr, HashSvr1 and QSvr1 are deployed in same server, and HashSvr2 and QSvr2 are deployed in same server, and HashSvr3 and QSvr3 are deployed in same server.
If do not want in corresponding DNS configuration about the HCode of described HSvr the intelligently parsing of corresponding domain name, can also further comprise a MsgDSvr at described RIDSvr, described MsgDSvr sends to corresponding HashSvr according to the strategy of random or poll or load balancing by the described guard station identification request message of receiving, then is processed by this HashSvr.The distributed RIDSvr with MsgDSvr as shown in Figure 8.
For the RIDSvr with MsgDSvr, only need to, in corresponding DNS, the domain name corresponding HCode of corresponding HSvr be pointed to the host IP address of the MsgDSvr of described RIDSvr.In this case, corresponding QSvr or HashSvr reply described RCode to described request side, can be also: this reply message is sent to described MsgDSvr, reply described RCode by this MsgDSvr to described request side.Like this, described MsgDSvr, together with each HashSvr, forms a super HashSvr.
Also corresponding HashSvr also can be deployed on the server at described RSvr place.RSvr stack QSvr as shown in Figure 9 and the distributed HSvr of HashSvr.In this HSvr, described RIDSvr comprises 4 HashSvr:HashSvr1, HashSvr2, HashSvr3, HashSvr4, and 3 QSvr:QSvr1, QSvr2, QSvr3.Wherein, HashSvr1, QSvr1 and RSvr-10 are deployed in same server, HashSvr2, QSvr2 and RSvr-20 are deployed in same server, and HashSvr3, QSvr3 and RSvr-21 are deployed in same server, and HashSvr4 and RSvr-28 are deployed in same server.
According to the AccountAddr setting up and mapping relations and/or the described roaming table of RCode, can obtain a RCode according to an AccountAddr.Like this, just can determine a RSvr according to an AccountAddr, like this, just can in determined RSvr, preserve the accounts information that this AccountAddr is corresponding.
Taking example two above as example, setting up after the mapping relations of AccountAddr and RCode, for an AccountAddr value liubei@163.com, 108 pairs 13 of the ASCII values that the HashValue of liubei@163.com is alphabetical l are carried out modulo operation gained remainder 4.According to HashValue value 4, from the mapping table of HashValue as shown in table 2 and RCode value, obtain RCode value 10, corresponding RSvr-10.Like this, just accounts information corresponding to AccountAddr value liubei@163.com can be kept in RSvr-10.
Taking example three above as example, for an AccountAddr value liubei@163.com, accounts information corresponding to AccountAddr value liubei@163.com to be kept in RSvr-28, only need be in described roaming table, the RCode value that liubei@163.com is corresponding is set to 28.
If described HSvr is because certain reason has changed the mapping relations of described AccountAddr and RCode, for example adjust scattering algorithm, or change the corresponding relation of HashValue and RCode value, or change related data in roaming table, or the data in mapping relations or the described roaming sublist of AccountAddr and QSvr are changed, make the RCode that liubei@163.com is corresponding change to 28 by 10, and the accounts information of liubei@163.com in RSvr-10 is moved in RSvr-28.Like this, this side of sunquan@qq.com is again according to SPAddr value (liubei@163.com, 10) while sending message, in described step 104, RSvr-10 receives after described message, cannot determine corresponding target account according to destination address liubei@163.com or liubei@10.163.com time, RSvr-10 can be to the sender of message, be this side of sunquan@qq.com, reply the reply message that represents " target account does not exist ", and process ends.Like this, this side of sunquan@qq.com is being received after this reply, can be according to SPAddr value (liubei@163.com, 10) AccountAddr value liubei@163.com, re-execute described step 101 and step 102, obtain new SPAddr value (liubei@163.com, 28).
RSvr-10 receives after described message, cannot determine corresponding account according to destination address liubei@163.com or liubei@10.163.com time, also this message can be sent to described RIDSvr, according to the AddrBase of described destination address and the own corresponding AccountAddr value of the HCode value 163.com liubei@163.com having, obtain corresponding RCode value 28 by RIDSvr; Source address sunquan@qq.com mono-side to described message is replied the RCode value 28 of obtaining.For example, RIDSvr structure is replied message, and the destination address of this reply message is sunquan@qq.com, and this reply message comprises the RCode value 28 of obtaining, this reply message is sent to RSvr-10, by RSvr-10, this reply message is sent to this side of sunquan@qq.com; Or RIDSvr directly sends to this reply message this side of sunquan@qq.com.Like this, just can realize the automatic renewal of SPAddr.Usually, also carry the destination address of described message in described reply message, i.e. AccountAddr value liubei@163.com, so that distinguish different reply message.
Usually, in the buddy list of an account, can preserve each good friend's SPAddr or SPEmailAddr, in the time that a certain good friend's SPAddr or SPEmailAddr change, the SPAddr value or the SPEmailAddr value that adopt above-mentioned automatic refresh mode can updating message transmitter side to preserve for corresponding good friend.
Because the access message for HSvr is directly diverted in each RSvr, therefore, eliminate the bottleneck factor in HSvr, especially, also reduce message roundabout, thereby, the deployment that contributes to save Internet resources He realize ultra-large HSvr.
Those skilled in the art know, in order to improve recall precision, in described accounts information table or roaming table or roaming sublist, the domain name part of corresponding AccountAddr can be saved, and only retain user name part.Correspondingly, when such table is retrieved, only according to the user name part of an AccountAddr.
Those skilled in the art know, in the present invention, between the server or module of intercommunication, can realize by IP network interconnected mutually.In the time of the two close together, also can be by adopting RS485 communication modes to communicate.Due to the communication between simple two modules or server, according to actual conditions, can there is corresponding mature technology to realize, therefore, the present invention no longer repeats with regard to this respect.
The present invention also provides a kind of domain name intelligently parsing method, and the method comprises step like this:
Step 91, for a domain name, multiple host IP address are set.
Step 92, acceptance domain name analysis request message, the domain name that acquisition will be resolved and corresponding IPrequester.
Step 93, with the corresponding IP of the domain name address that will resolve described in described IPrequester coupling, optimum Match person is as a result of returned to described request person.
The following is an embodiment of domain name intelligently parsing method of the present invention, in this embodiment,
First at step 9-101, in DNS, be provided with 5 host IP address for domain name 163.com, these 5 IP addresses are according to order from small to large, be respectively IP1, IP2, IP3, IP4, IP5,, IP1<IP2<IP3<IP4LE ssT.LTssT.LTIP5.
Step 9-102, receiving one to resolve target be 163.com after domain name mapping request, the domain name 163.com that acquisition will be resolved and IPrequester.
Step 9-103, the host IP address that obtains corresponding preservation according to domain name 163.com, be respectively IP1, IP2, IP3, IP4, IP5.
Step 9-104, with 5 host IP address corresponding to described IPrequester coupling 163.com, select optimum Match person.
Step 9105, described optimum Match person is as a result of returned to described request person.
Usually, described selection optimum Match person is from multiple host IP address corresponding to domain name, the nearest host IP address of IPrequester described in chosen distance.
Especially, in order to reduce matching times, to improve domain name resolution efficiency, described DNS, in the time preserving domain name 163.com 5 IP addresses pointed, preserves according to ascending order.Like this, in step 9-104, in the time selecting optimum Match person, can adopt binary chop to search optimum Match person.And according to lookup result, determine optimum Match person.
If find the IP address equating completely with described IPrequester, using this IP address as optimum Match person.If described IPrequester is less than the IP address (IPcurrentmin) of current minimum, i.e. IP1, using IPmin as optimum Match person.If described IPrequester is greater than the IP address (IPmax) of current maximum, i.e. IP5, using IPmax as optimum Match person.For example, if described IPrequester between certain two of corresponding 5 host IP address of domain name 163.com adjacent IP addresses time, between IP2 and IP3, selects in IP2 and IP3, with nearest one of described IPrequester as optimum Match person.For example, the distance of IP3 and IPrequester is: L3=IP3-IPrequester, and the distance of IPrequester and IP2 is: L2=IPrequester-IP2, if L2 is less than L3, using IP2 as optimum Match person, otherwise, using IP3 as optimum Match person.
The present invention claims, the IP address that each bit position is 1 is an IP total head (IPfull, IP full Value).
Above in the time determining optimum Match person, in the time that described IPrequester is less than IPmin, or when described IPrequester is greater than IPmax, also can judge whether the distance of IPrequester and IPmin is less than the distance of IPrequester and IPmax, if, using IPmin as optimum Match person, otherwise, using IPmax as optimum Match person.
In the time that IPrequester is less than IPmin:
Distance=IPmin – IPrequester of IPrequester and IPmin
Distance=IPfull-IPmax+IPrequester of IPrequester and IPmax
In the time that IPrequester is greater than IPmax:
Distance=IPfull – IPrequester+IPmin of IPrequester and IPmin
Distance=IPrequester-IPmax of IPrequester and IPmax
These are only preferred embodiment of the present invention, be not intended to limit protection scope of the present invention.All in the spirit and principles in the present invention and so on, any amendment of doing, improve, be equal within replacement etc. all should be included in protection scope of the present invention.

Claims (10)

1. the message method based on semi-permanent address, is characterized in that, the method comprises the following steps:
A, obtain the RCode of an AccountAddr;
B, send message according to this AccountAddr and the corresponding SPAddr of the RCode that obtains.
2. a guard station recognition methods, for identifying the guard station information of an address to be identified, is characterized in that, the method comprises the following steps:
A, according to domain name corresponding to described address to be identified, obtain IP address pointed by domain name mapping;
The IP address that b, basis obtain sends and comprises the guard station identification request message of identifying target, and described identification target is described address to be identified;
RCode corresponding to described identification target that d, reception are replied.
3. a method that sends message according to SPAddr, is characterized in that, the method comprises the following steps:
A, resolve the corresponding domain name of RSvrCompDesc of described SPAddr, obtain the host IP address of RSvr pointed;
B, the IP address obtaining according to parsing, send described message to corresponding RSvr, and the destination address of message comprises the AccountAddr of this SPAddr.
4. a method that sends message according to SPEmailAddr, is characterized in that, the method comprises the following steps:
A, destination address using described SPEmailAddr as message, send this message;
B, receiving after the return information of expression " target account does not exist ", obtaining the RCode that this SPEmailAddr is corresponding; According to the RCode obtaining, obtain new SPEmailAddr, i.e. a NewSPEmailAddr; Destination address using this NewSPEmailAddr as message, resends this message.
5. a guard station recognition methods, for identifying the guard station information that SPEmailAddr is corresponding, is characterized in that, the method comprises the following steps:
A, according to the domain name of described SPEmailAddr, obtain the host IP address of RSvr pointed by domain name mapping;
The IP address that b, basis obtain sends and comprises the guard station identification request message of identifying target to described RSvr, and described identification target is described SPEmailAddr;
RCode corresponding to described identification target that d, reception are replied.
6. a HSvr, is characterized in that, described HSvr comprises RIDSvr and RSvr; Each RSvr is assigned a RCode;
Described RSvr is used for preserving corresponding accounts information;
Described RSvr receive from other HSvr comprise that destination address is the message of AccountAddr or SPEmailAddr after, according to this destination address, determine target account, this message is ended in to this target account;
Receive that at described RIDSvr one comprises after the guard station identification request message of identifying target, determines the RCode that this identification target is corresponding; Reply determined RCode.
7. a message treatment method, the destination address of described message comprises AccountAddr or SPEmailAddr; It is characterized in that, the method comprises the following steps:
A, RSvr receive from the destination address of other HSvr and comprise after the message of AccountAddr or SPEmailAddr, determine target account according to this destination address, judge whether to determine to obtain, if so, perform step b: described message is ended in to determined target account; Otherwise, process ends.
8. method according to claim 7, is characterized in that, before described end, also performs step c1 or step c2;
Described step c1 is: the message of replying expression " target account does not exist " to described sender of the message;
Described step c2 is: obtain the new RCode of the described destination address corresponding A ccountAddr of institute, this new RCode is replied to described sender of the message.
9. a guard station identification message processing method, is characterized in that, sets in advance message distribution module and multiple guard stations enquiry module; In the enquiry module of described guard station, roaming sublist is set; Set up the mapping relations of AccountAddr and corresponding guard station enquiry module; The method comprises the following steps:
A, described message distribution module receive and comprise the guard station identification request message of identifying target, according to described identification target, according to the mapping relations of set up AccountAddr and corresponding guard station enquiry module, determine corresponding guard station enquiry module; Then perform step b1 or step b2;
B1: send the query messages that comprises described identification target to determined guard station enquiry module; Described guard station enquiry module is received after described query messages, according to described identification target, from roaming sublist, searches corresponding RCode, and this RCode is sent to described message distribution module; This message distribution module is received after described response to query message, replys the RCode receiving to described request side;
B2: described request message is sent to determined guard station enquiry module; This guard station enquiry module is received after this request message, according to described identification target, from roaming sublist, searches corresponding RCode; Reply this RCode to described request side.
10. a distributed RIDSvr, is characterized in that, described RIDSvr comprises at least one HashSvr and multiple QSvr;
In described QSvr, preserve roaming sublist; Set up the mapping relations of AccountAddr and QSvr;
Receive that at described HashSvr one comprises that after the guard station identification request message of identifying target, described HashSvr, according to described identification target, according to the mapping relations of set up AccountAddr and QSvr, determines corresponding QSvr; Then enter flow process 1 or flow process 2;
Flow process 1: send the query messages that comprises described identification target to determined QSvr; Described QSvr receives after described query messages, according to described identification target, from roaming sublist, searches corresponding RCode, and this RCode is sent to described HashSvr; This HashSvr receives after described response to query message, replys the RCode receiving to described request side;
Flow process 2: described request message is sent to determined QSvr; This QSvr receives after this request message, according to described identification target, from roaming sublist, searches corresponding RCode; Reply this RCode to described request side.
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 true CN104125310A (en) 2014-10-29
CN104125310B 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)

Cited By (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
CN107087039A (en) * 2016-02-15 2017-08-22 王正伟 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 (7)

* 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
US20090252059A1 (en) * 2006-08-31 2009-10-08 France Telecom Determination of a list of preferred mobile access networks
CN101577867A (en) * 2008-05-08 2009-11-11 中国移动通信集团公司 Method, device and system for sending push messages in multimedia message service
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

Patent Citations (7)

* 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
US20090252059A1 (en) * 2006-08-31 2009-10-08 France Telecom Determination of a list of preferred mobile access networks
CN101198157A (en) * 2006-12-05 2008-06-11 华为技术有限公司 Method for modifying local proxy of mobile node
CN101577867A (en) * 2008-05-08 2009-11-11 中国移动通信集团公司 Method, device and system for sending push messages in multimedia message service
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域通信机制", 《计算机工程》 *

Cited By (5)

* 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
CN107087039A (en) * 2016-02-15 2017-08-22 王正伟 Exchange method and exchange cloud
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

Also Published As

Publication number Publication date
CN104125310B (en) 2019-08-13

Similar Documents

Publication Publication Date Title
CN105959433B (en) A kind of domain name analytic method and its domain name analysis system
CN101465889B (en) Network address translation equipment and request method of response address analysis protocol
CN106060180B (en) A kind of addressing method based on geographical location and application message for IPv6
CN102014043B (en) Address mapping system, data transmission method and address mapping maintenance method
US20150381557A1 (en) Container name server and method for container name resolution
CN103874157A (en) Routing forwarding, routing table building and content obtaining method and device thereof
CN101431539A (en) Domain name resolution method, system and apparatus
CN103166990B (en) P2P peer to peer connection method for building up and system
CN102025794B (en) Domain name resolution method, DNS (Domain Name Server) server and system
CN104303489A (en) Method for performing dns resolution in a network, content distribution system and client terminal for deployment in a content distribution system
CN103051740A (en) Domain name resolution method, domain name system (DNS) server and domain name resolution system
CN102843391A (en) Information transmitting method and gateway
CN101656765A (en) Address mapping system and data transmission method of identifier/locator separation network
CN103618801B (en) Method, equipment and the system of a kind of P2P resource-sharing
CN107786678B (en) Domain name resolution method, device and system
CN103905572A (en) Domain name resolution request processing method and device
CN103546593B (en) Wireless sensor network node identifier resolution method based on IP Yu non-IP
CN102594885B (en) Sensor network resolves interoperation A platform, sensor network interoperability methods and system
CN109076082A (en) Anonymous Identity in network and agreement towards identity
CN104125310A (en) Semi-permanent address based message sending method
CN104427007A (en) A domain name searching method for a DNS
CN103685584A (en) Method and system of resisting domain name hijacking based on tunnelling
CN102833287B (en) The method of visit data resource in distributed file system and distributed file system
CN100563188C (en) Communicating terminal inserts the method for routing of request in the communication network
Chung et al. RFID object tracking with IP compatibility for the internet of things

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C53 Correction of patent of 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