WO2009024020A1 - A server implementing network short message service and the communication method between the server and the clients - Google Patents

A server implementing network short message service and the communication method between the server and the clients Download PDF

Info

Publication number
WO2009024020A1
WO2009024020A1 PCT/CN2008/001447 CN2008001447W WO2009024020A1 WO 2009024020 A1 WO2009024020 A1 WO 2009024020A1 CN 2008001447 W CN2008001447 W CN 2008001447W WO 2009024020 A1 WO2009024020 A1 WO 2009024020A1
Authority
WO
WIPO (PCT)
Prior art keywords
information
server
short message
client
network
Prior art date
Application number
PCT/CN2008/001447
Other languages
French (fr)
Chinese (zh)
Inventor
Hanmin Yang
Original Assignee
Hanmin Yang
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 Hanmin Yang filed Critical Hanmin Yang
Publication of WO2009024020A1 publication Critical patent/WO2009024020A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/12Messaging; Mailboxes; Announcements

Definitions

  • the present invention relates to a server for implementing NSM Network Short Message service, and more particularly to a server capable of forwarding a network short message in real time.
  • the present invention also relates to a method for communicating between clients based on a network short message server, which can implement direct client communication through a network short message server, also called Peer-to-Peer (P2P) communication.
  • P2P Peer-to-Peer
  • the NSM service is a universal real-time forwarding service for network information, which enables instant messaging (IM) and Internet telephony (V0IP).
  • IM instant messaging
  • V0IP Internet telephony
  • P2P Peer-to-Peer
  • the existing Internet instant messaging service is a common service, but these services are usually only one application service.
  • the most common method is to offload on the client side. This method requires a communication manager on the client side to provide a communication offload interface. However, this method requires all applications of the same username to be in the same computing device, and this approach is also inconvenient for embedded applications.
  • the existing methods for establishing ⁇ 2 ⁇ communication mainly have the following three treatment methods:
  • US Patent 6108704 Point-to-Point Internet Protocol discloses an implementation of an address server, which is implemented by the client logging in to the address server, and the address server stores the client's IP address and online status. information.
  • the address server is first queried for the target client state, the address server feeds back the IP address of the target client and the online state information, and then initiates P2P to the target client.
  • This patent mainly includes two technical points: one is to set up an address server, and the other is to feed back the target client address information to the querier through the address server, so that the querier can initiate P2P to the target client address.
  • the address server is only responsible for the address information service of the client, and has no function of forwarding information. When the target client is in the private network, it is difficult to establish P2P communication. 2008/001447
  • connection client first determines the address of the P2P communication (public network address) Or the private network address), and send the address together with the P2P connection request to the central server, the central server forwards the above information to the connected client, and the P2P is initiated by the connected client.
  • the connection party in the private network must query its public network address from a third party (for example, a central server) before the P2P connection request is sent, if the request carries its own public address.
  • the first method is simple to operate, but can only initiate P2P communication from one side. Due to the existence of private networks, there are not many opportunities for successful P2P establishment. The latter two patents attempt to improve this problem. From the bilateral launch of P2P communication, the chances of success increase a lot. But the process of obtaining and transmitting their own and the address of the other party is more complicated. In addition, it is more likely that the information should be sent directly to the address of the other party. The above patent methods do not give the best answer. Their success rate in establishing P2P is still not enough. Summary of the invention
  • the server for implementing a network short message service is configured to receive a login request from a client, the login request at least: a user name, authentication information, one or more receivable information titles, and a login validity period ;
  • the network short message server is configured to obtain a network protocol packet source address of the login request from the network transmission protocol as the client network address;
  • the network short message server is configured to check a login request of the client, and if the verification is passed, the network short message server constructs the client record, and the record includes at least: a login request of the client and the client network address;
  • the network short message server is further configured to receive information from other applications, the information including at least: one or more recipient user names, one or more information titles, and information content;
  • the network short message server is configured to obtain a network protocol packet source address of the received information from the network transmission protocol, and use the sender address as the sender address of the information;
  • the network short message server is configured to combine the received original information and the sender address of the information to construct a new information, and forward the message to a client that meets the following conditions: the recipient user name of the original information includes the username of the client, And the client can receive any one of the information headers whose information header contains the original information;
  • the client network address in the client record is used as the destination address for forwarding new information.
  • the network short message server receives greeting information from the client and other applications, and replies to the server time thereto.
  • the network short message service is further configured to store only a client record of the last one of the clients with the same user name and the same receivable information header client.
  • the network short message server is configured to receive a client login request having only one receivable information header; the network short message server forwards only one recipient name and only one information header.
  • the server of the present invention obtains the source address of the network protocol packet of the forwarding information through the underlying transmission protocol, and forwards the network address as the sender of the information to the receiver. After the recipient obtains this address, sending information directly to this address is most likely to be received by the other party.
  • the present invention is only a mechanical (and thus a single) IP packet source address for extracting information from the TCP/IP protocol. Whether the sender is on the public network or on the private network. If the sender is on the private network, the source address retrieved is not the actual sender address. The true sender address is not good for establishing P2P unless the communicating parties are in the same network.
  • the second technical problem solved by the present invention is to propose an inter-client communication method based on a network short message server, which uses the sender address attached when the NSM server forwards information. Try P2P direct communication.
  • the method for communicating between clients based on the network short message server proposed by the invention includes the following processing:
  • the communication parties forward the information through the network short message server to which the other party belongs, the information includes the other party's network short message user name, the same information title, their own network short message user name and information content;
  • the client When the client receives the other party's information forwarded by the network short message server to which it belongs, it obtains the network short message user name of the other party, and the sender address of the information attached when the network short message server forwards, and records the sender address of the information. For the direct address of the other party; when sending new information to the other party again, in addition to forwarding the new information through the network short message server to which the other party belongs, the same new information is also sent to the direct address of the other party;
  • the NSM server notifies the recipient of the TCP/IP transport protocol IP packet source address of the received forwarding information as the sender address.
  • the NSM server sends a message back to the sender at this address, the sender Can be received. Then, instead of returning the message to the sender by the recipient at this address, it is most likely to be received.
  • the advantage of using NSM to establish P2P is that the communication parties do not need other facilities (such as central servers) and processes that are specifically used to establish P2P. The two parties do not need to care about their network address. The process of not querying your own or the other party's network address. Both parties to the communication normally use the NSM service to forward information and attempt to establish P2P. If P2P is not established, it does not affect the normal indirect communication of forwarding information through the NSM service.
  • FIG. 1 is a schematic diagram of a login of a client of the present invention to a network short message server;
  • FIG. 2 is a schematic diagram of forwarding information of a network short message server to a client according to the present invention
  • FIG. 3 is a schematic diagram of a method for communicating between clients based on a network short message server according to the present invention. detailed description
  • the short message service short message service used in the network short message and the mobile communication terminal of the present invention is not a concept.
  • the network short message of the present invention can be regarded as a short information body and transmitted through the network.
  • the network address mentioned in the present invention is specifically for the TCP/IP network: IP: PORT.
  • the network short message server of the present invention will be described in detail below through specific embodiments. For convenience of description, the following describes the implementation in TCP/IP UDP communication.
  • both the client and server are compute units in a TCP/IP network.
  • Clients can hang directly on the public network, or they can hang on the private network and connect to the public network or the upper private network through a router.
  • the NAT of the router translates the IP packet source address of the information.
  • a reliable system can be served by the primary and secondary servers, and a simple system can also be a single server.
  • the primary server and backup server function the same, except that their network address (IP:PORT) is different.
  • Each user has a user name.
  • the name is of the form: ⁇ user id>@ ⁇ domain name or IP>, column ⁇ port: yanghm@12.34, 56.78 or 13902904910@headcall.com.
  • Username is also known as NSM username and user NSM address.
  • the server address can be identified by the NSM user name.
  • the server addresses of 13902290910@headcall.com are: nsm.headcall.com (primary server) and nsm2.headcall.com (backup server).
  • a client is a computing unit. It uses an NSM username and an acceptable message header. The information title is shaped like abc or 123 or abc8.headcall.com. Different applications use different information headings so that the server can serve different applications at the same time.
  • iphone.headcall.com is the title used by headcall VoIP
  • ichat.headcall.com is the title used by some instant message software.
  • the login request sent by the client to the server includes: user name, authentication data, message title, login validity period (ie, lifetime).
  • the client should send a new login request during this login lifetime to allow the server to keep the client online.
  • the server After receiving the login request, the server obtains the IP packet source address (IP:PORT) of the login request from the underlying network transport protocol as the client network address.
  • IP:PORT IP packet source address
  • the server constructs a client record that records the client's login request, the client's network address.
  • the recorded client network address is not the actual client network address, but the NAT-converted network address.
  • the server only needs to record the converted network address and does not need a real client network address.
  • the server If the login request passes verification, the server returns a login confirmation to the client. Otherwise, the reason for the login failure is returned. For example: user error, authentication error, or the user has already
  • the login authentication mode supports trivial authentication (that is, password encryption), and also supports SHA (password + challenge code) authentication, and other authentication methods. If the authentication fails, the return message tells the client the authentication method and the required challenge code in addition to the normal authentication. The challenge code is randomly generated and the NSM server will change the challenge code at any time. After receiving the message of the authentication error, the client recalculates the authentication information and issues the login request again. If the server is configured to restrict the use of certain headers, then the reason for the client login failure also includes a header error.
  • the request for login to the server through multiple clients has the same username and When the same user can receive the message title, the server only saves the client record of the last login request in those clients, and the previous client record will be discarded.
  • the client on the left in Figure 1 is the client 201 in the private network 101, and its login is not its native network address 601: 192168.0.12:1089, but the source network address 602 after NAT 102 conversion: 202.96.56.78: 65321.
  • the login request 701 includes the information about the client: The name of the user yanghm@one.com, it can be seen that the address of the server 301 corresponding to the user is nsm.one.com (if there is a backup server, the backup server address is: nsm2 .one.com ).
  • client 201 logs in to the server with the address nsm.one.com (and to nsm2.one.com, if it exists).
  • the information header supported by this client is: yanghm.xyz.com.
  • the TCP/IP transmission protocol will encapsulate the login request 701 with the IP header information, the destination address (the address of the server 301), the source address 601, etc., and the result packet is 401, which is sent to the server 301.
  • the packet 401 is routed to the private network exit and needs to pass through the NAT 102.
  • the NAT has the IP address 203.34.56.78 of the public network 100.
  • the converter NAT 102 converts the source address 601 in the translation packet to 602, and the packet 401 becomes 402, where the login request 701 is unchanged.
  • the server 301 receives the 402 packet, takes out the login information 701 therefrom, and obtains the IP packet source address 602 from the TCP/IP transport protocol. If the login request 701 passes the check, the server 301 saves the login information 701, the same time storage source address 602, and the save record is 501.
  • the client 203 on the right side of FIG. 1 is a client hanged on the public network 100, and the network address 603 of the login is: 202.96.56.78.2078, and the client name displayed in the login request 703 is: john@one.com, supported. The message title is: headcall.one.com.
  • the TCP/IP transport protocol will include the login request 703 packet, the IP header information, the destination address (the address of the server 301), the source address 603, etc., and the result packet is 403, which is sent to the server 301.
  • the server 301 receives the 403 packet, takes out the login information 703 therefrom, and obtains the IP packet source address 603 from the TCP/IP transport protocol. If the login request 703 passes the check, the server 301 saves the login request 703, the same time storage source address 603, and the record is recorded as 503.
  • the other application 801 transmits the information 802 to the client 201 through the NSM server 301.
  • Application The sequence 801 first creates an NSM format packet 805 containing a header 803 (recipient name, message header) and information 802.
  • the TCP/IP transmission protocol encapsulates the 4 bar information 805 packet, adds the IP header information, contains the target address (the address of the server 301), the source address 804, etc., and the packet is 806, and is sent to the server 301 via the public network 100, that is, FIG. 2
  • the NSM server 301 receives the 806 packet, extracts the NSM format packet 805 therefrom, and finds the login information 501 of the corresponding client as indicated by the header 803. In addition, the NSM server 301 also obtains the IP packet source address 804 from the TCP/IP transport protocol. The NSM server 301 will add the source address 804 as the sender address 904 to the header 803 to form a new header 903 and a new packet 905. The NSM server 301 then sends this packet 905 to the TCP/IP transport protocol to the client address 908 of the 501 record. TCP/IP will add 905 packets, plus IP header information, including destination address 908, source address (address of server 301), etc., to 906. The IP packet 906 is sent to the NAT 102, i.e., the information transmission step of 907 in FIG. 2, which forwards the packet to the client 201 via the private network 101.
  • the NSM server 301 When receiving the information, the NSM server 301 does not care whether the sender is on the public network such as 801 or in the private network such as the client 809. The NSM server will mechanically obtain the IP packet source address of the received information from the TCP/IP transport protocol as its sender network address.
  • the NSM server 301 forwards information, it does not care whether the recipient is on the public network such as the client 203 or in the private network such as the client 201. It is also not necessary to know the recipient's local address. It will only mechanically retrieve the forwarded destination address from the login information and forward the information.
  • the NSM server fails to forward successfully if the client is offline or for other reasons, the NSM server replies to the sender's network address for the reason for the forwarding failure. This reply must have been received.
  • the NSM server also receives greeting messages from clients and other applications and replies to the server time.
  • the server 301 shown in Figure 1 is the primary server, and can also be replaced with a backup server (if present) to forward information.
  • the process and effect are the same.
  • the NSM server receives only one client login request that can receive the information header; and only the information forwarded by the NSM server A recipient name and only one message title.
  • Client B of server NSM-B which will initiate communication to client A of server NSM-A first.
  • NSM-A here may be the same server as NSM-B, or it may be a different server.
  • Communication includes the following processes:
  • Client B sends the message 01 to the server NSM-A, which contains the user name, message title, own user name and information content of the recipient A.
  • the server NSM-A forwards the message 01, it adds the IP packet source address of the information 01 obtained from the TCP/IP protocol, adds it as the sender address to the message 01, and the new information is sent to the client.
  • the server NSM-A adds the IP packet source address of the information 01 obtained from the TCP/IP protocol, adds it as the sender address to the message 01, and the new information is sent to the client.
  • Machine A adds the IP packet source address of the information 01 obtained from the TCP/IP protocol, adds it as the sender address to the message 01, and the new information is sent to the client.
  • client A After receiving the new information in step 3), client A obtains the NSM user name of client B and also obtains the sender address of the information. The information sender address is recorded as the direct address of client B.
  • client B If client B receives message 02P, then client B knows that direct communication P2P has been established. When the content of the message 03 is resent, the P2P transmission, that is, the information 03P, can be used, and the information N03-A is not required to be forwarded through the server NSM-A. When client A receives the information 03P directly from client B, it knows that the direct communication P2P has been established, and then sends the information to P2P, which does not need to be forwarded by the NSM server.
  • client B If client B does not receive message 02P, but will definitely receive message 02, client B also obtains the sender address of the message. Record the sender's address as the direct address of A.
  • client B When client B continues to send message 03 to client A, it forwards the message 03 through the server NSM-A and simultaneously sends the same message 03Po to the direct address of client A. 9) If client A receives message 03P, client A knows that direct communication P2P has been established. When the information is sent again, it can be sent by P2P, and the information does not need to be forwarded through the NSM server. When Client B receives the information directly from Client A, it knows that the Direct Communication P2P has been established.

Abstract

The invention discloses a method which realizes the communication between a server and a client in the network short message(NSM) service. A NSM server receives the login of the client, which declares the own user name and the acceptable information title when logging in. Other application programs can send out information to the NSM server, and the information indicts the receiver and the title. The NSM server can instantly transmit the information to the proper client. When the NSM server transmits the information, the network protocol packet source address of the information, which is obtained from the network transmission protocol, is attached. Different titles represent different applications, and the NSM server can serve for the different applications at the same time. Adopting the NSM server of the invention can realize the direct communication (P2P) among the clients. The both parties of the communication do not need other facilities and processes which are specially used to build the P2P, and the both parties of the communication also do not need to care the network addresses thereof, thereby dispensing with the course to inquire a third party the network address of the own party or the opposite party. The communication process is simple and effective.

Description

实现网絡短信服务的服务器及其客户机间通讯方法 技术领域  Server for realizing network short message service and communication method between clients thereof
本发明涉及一种实现网络短信 ( NSM Network Short Message ) 服 务的服务器, 特别是涉及一种可以实时转发网络短信的服务器。 本发 明还涉及一种基于网络短信服务器的客户机间通讯方法, 可以通过网 络短信服务器实现客户机直接通讯, 也称为 Peer-to-Peer (P2P) 通讯。 背景技术  The present invention relates to a server for implementing NSM Network Short Message service, and more particularly to a server capable of forwarding a network short message in real time. The present invention also relates to a method for communicating between clients based on a network short message server, which can implement direct client communication through a network short message server, also called Peer-to-Peer (P2P) communication. Background technique
NSM服务是一种通用的网络信息实时转发服务,利用它可以实现 即时通讯 (IM ), 网络电话 (V0IP )。 在很多情况下, NSM 客户机 之间能实现直接通讯, 也称为 Peer-to-Peer ( P2P )通讯。  The NSM service is a universal real-time forwarding service for network information, which enables instant messaging (IM) and Internet telephony (V0IP). In many cases, direct communication between NSM clients is also possible, also known as Peer-to-Peer (P2P) communication.
现有的互联网即时信息转发服务是一种^ ί艮常见的服务, 但是这些 服务通常只为一种应用服务,如何让转发服务器同时为多种应用服务, 存在许多办法。 最常见的办法是在客户机端进行分流, 这种办法需要 客户机端有一个通讯总管, 由其提供通讯分流接口。 但是这种方法需 要同一用户名的所有应用都在同一计算设备中, 而且这种办法对于嵌 入式应用也是不方便的。  The existing Internet instant messaging service is a common service, but these services are usually only one application service. There are many ways to make the forwarding server serve multiple applications at the same time. The most common method is to offload on the client side. This method requires a communication manager on the client side to provide a communication offload interface. However, this method requires all applications of the same username to be in the same computing device, and this approach is also inconvenient for embedded applications.
此外, 现有的建立 Ρ2Ρ通讯方式主要有以下三种处理方式: In addition, the existing methods for establishing Ρ2Ρ communication mainly have the following three treatment methods:
1. 美国专利 6108704 Point--to-Point Internet Protocol中披露了一 种地址服务器的实现方式, 其实现方式为客户机都向地址服务器进行 登录, 地址服务器中保存客户机的 IP地址和在线状态等信息。 当需要 向某客户机发送信息时, 先向地址服务器查询目标客户机状态, 地址 服务器向其反馈目标客户机的 IP地址以及在线状态信息,然后向目标 客户机发起 P2P。 这个专利主要包括两个技术要点: 一是设立地址服 务器, 二是通过地址服务器反馈目标客户机地址信息给查询者, 以便 让查询者向目标客户机地址发起 P2P。 其中地址服务器只负责客户机 的地址信息服务, 没有转发信息的功能。 当目标客户机在私网内时, 很难建立 P2P通讯。 2008/001447 1. US Patent 6108704 Point-to-Point Internet Protocol discloses an implementation of an address server, which is implemented by the client logging in to the address server, and the address server stores the client's IP address and online status. information. When it is necessary to send information to a client, the address server is first queried for the target client state, the address server feeds back the IP address of the target client and the online state information, and then initiates P2P to the target client. This patent mainly includes two technical points: one is to set up an address server, and the other is to feed back the target client address information to the querier through the address server, so that the querier can initiate P2P to the target client address. The address server is only responsible for the address information service of the client, and has no function of forwarding information. When the target client is in the private network, it is difficult to establish P2P communication. 2008/001447
2. 美国专利 US 7227864 Methods and systems for establishing communications through firewalls and network address translators中披露 了另一种实现 P2P的通讯方式。 客户机先向中心服务器登录, 然后通 过中心服务器转发 P2P通讯请求, 并由接收请求的客户机发起 P2P。 当无法成功建立 P2P时, 通过其他方式获取对方的地址信息, 然后再 发起 P2P。 该专利的中心服务器仅用于协助建立 P2P, 例如转发 P2P 通讯请求, 而不转发其他数据。 如果未建立 P2P, 客户间通讯需要另 外的转发服务器。 该专利未披露接收请求的客户机是如何获取发送方 的网络地址的, 以便发起 P2P。 从该专利描述的过程中还得知, 发起 方需要从笫三方(例如中心服务器)查询对方的地址, 以便直接发起 P2P。 2. Another way of implementing P2P communication is disclosed in US Patent No. 7,227,864 Methods and systems for establishing communications through firewalls and network address translators. The client first logs in to the central server, then forwards the P2P communication request through the central server, and initiates P2P by the client receiving the request. When P2P cannot be successfully established, the other party's address information is obtained by other means, and then P2P is initiated. The patent's central server is only used to assist in establishing P2P, such as forwarding P2P communication requests without forwarding other data. If P2P is not established, inter-client communication requires an additional forwarding server. The patent does not disclose how the client receiving the request obtains the sender's network address in order to initiate P2P. It is also known from the process described in the patent that the originator needs to query the address of the other party from a third party (for example, a central server) to directly initiate P2P.
3. 中国专利申请 CN 1881916A—种在通讯设备间实现通讯的方 法和装置中还披露了实现 P2P通讯的方式, 其实现方式为: 连接方客 户机先确定其参与 P2P通讯的地址 (公网地址或者私网地址), 并将该 地址和 P2P连接请求一起发送到中心服务器, 中心服务器转发以上信 息到被连接方客户机, 由被连接方客户机发起 P2P。 从该专利描述中 获知, 在私网内的连接方在发送 P2P连接请求前, 如果该请求携带自 己的公网地址的话, 必须从第三方 (例如中心服务器)查询了自己的公 网地址。  3. Chinese patent application CN 1881916A - A method and device for realizing communication between communication devices also discloses a method for realizing P2P communication, and the implementation manner thereof is: the connection client first determines the address of the P2P communication (public network address) Or the private network address), and send the address together with the P2P connection request to the central server, the central server forwards the above information to the connected client, and the P2P is initiated by the connected client. It is known from the patent description that the connection party in the private network must query its public network address from a third party (for example, a central server) before the P2P connection request is sent, if the request carries its own public address.
以上 3种 P2P实现方式, 第一种方法操作简单, 但只能从一边发 起 P2P通讯。 由于私网的存在, 其成功建立 P2P 的机会不多。 后两 个专利试图改进这个问题, 从双边发起 P2P 通讯, 成功的机会增加 不少。 但它们获得和传输自己和对方地址的过程比较复杂。 另外, 应 该向对方什么样的地址直接发送信息才更有可能成功, 上面这些专利 方法给出的并不是最佳答案。 它们建立 P2P 的成功率仍然不够。 发明内容  The above three P2P implementations, the first method is simple to operate, but can only initiate P2P communication from one side. Due to the existence of private networks, there are not many opportunities for successful P2P establishment. The latter two patents attempt to improve this problem. From the bilateral launch of P2P communication, the chances of success increase a lot. But the process of obtaining and transmitting their own and the address of the other party is more complicated. In addition, it is more likely that the information should be sent directly to the address of the other party. The above patent methods do not give the best answer. Their success rate in establishing P2P is still not enough. Summary of the invention
本发明解决的技术问题之一是提出了一种可以为多种应用服务的 网络短信服务器。 本发明提出的实现网络短信服务的服务器, 所述网络短信服务器 用于接收来自客户机的登录请求, 该登录请求至少包括: 用户名、 认 证信息、 一个或多个可接收的信息标题、 登录有效期; One of the technical problems solved by the present invention is to propose a network short message server that can serve a variety of applications. The server for implementing a network short message service, wherein the network short message server is configured to receive a login request from a client, the login request at least: a user name, authentication information, one or more receivable information titles, and a login validity period ;
所述网络短信服务器用于从网络传输协议中获得登录请求的网絡 协议包源地址作为该客户机网络地址;  The network short message server is configured to obtain a network protocol packet source address of the login request from the network transmission protocol as the client network address;
所述网络短信服务器用于检查客户机的登录请求,如果验证通过, 所述网络短信服务器构造该客户机记录, 该记录至少包括: 客户机的 登录请求和该客户机网络地址;  The network short message server is configured to check a login request of the client, and if the verification is passed, the network short message server constructs the client record, and the record includes at least: a login request of the client and the client network address;
所述网络短信服务器还用于接收来自其它应用程序的信息, 该信 息至少包括: 一个或多个接收者用户名、 一个或多个信息标题、 信息 内容;  The network short message server is further configured to receive information from other applications, the information including at least: one or more recipient user names, one or more information titles, and information content;
所述网络短信服务器用于从网络传输协议中获得接收信息的网络 协议包源地址, 并将其作为该信息的发送者地址;  The network short message server is configured to obtain a network protocol packet source address of the received information from the network transmission protocol, and use the sender address as the sender address of the information;
所述网络短信服务器用于把接收到的原信息和该信息的发送者地 址合并构造新信息, 转发给符合下面条件的客户机: 原信息的接收者 用户名当中包含该客户机的用户名, 并且该客户机可接收信息标题包 含原信息的信息标题中的任何一个;  The network short message server is configured to combine the received original information and the sender address of the information to construct a new information, and forward the message to a client that meets the following conditions: the recipient user name of the original information includes the username of the client, And the client can receive any one of the information headers whose information header contains the original information;
所述网络短信服务器转发新信息给符合上面条件的客户机时, 把 该客户机记录中的客户机网络地址作为转发新信息的目的地址。  When the network short message server forwards new information to the client that meets the above conditions, the client network address in the client record is used as the destination address for forwarding new information.
优选的, 所述网络短信服务器接收来自客户机和其它应用程序的 问候信息, 并且向其回复服务器时间。  Preferably, the network short message server receives greeting information from the client and other applications, and replies to the server time thereto.
优选的, 所述网络短信服务还用于对多个具有相同用户名和相同 可接收信息标题客户机, 仅保存这些客户机中最后一个登录请求的客 户机记录。  Preferably, the network short message service is further configured to store only a client record of the last one of the clients with the same user name and the same receivable information header client.
优选的, 所述网络短信服务器用于接收仅有一个可接收信息标题 的客户机登录请求; 所述网络短信服务器转发的信息中仅有一个接收 者名称和仅有一个信息标题。  Preferably, the network short message server is configured to receive a client login request having only one receivable information header; the network short message server forwards only one recipient name and only one information header.
采用本发明的网络短信服务器, 由于在服务器就支持信息分流, 这是通过使用 NSM 信息标题实现的。 不同的应用会使用不同的标 题。 这是一个非常简单但有效的处理方式。 此外本发明的服务器通过底层传输协议获取转发信息的网络协议 包源地址, 作为该信息发送者网络地址转发给接收者。 接收者获得这 个地址后, 向这个地址直接发送信息最有可能被对方接收到。 以With the network short message server of the present invention, since the information is offloaded at the server, this is achieved by using the NSM information header. Different apps will use different titles. This is a very simple but effective way to handle it. In addition, the server of the present invention obtains the source address of the network protocol packet of the forwarding information through the underlying transmission protocol, and forwards the network address as the sender of the information to the receiver. After the recipient obtains this address, sending information directly to this address is most likely to be received by the other party. Take
TCP/IP协议为例, 本发明只是机械的(从而是筒单的)从 TCP/IP 协议 中取出信息的 IP 包源地址。 不管发送者在公网上还是在私网内。 如 果发送方在私网内, 这个取出来的源地址并不是真正的发送者地址。 真正的发送者地址对于建立 P2P反而没有益处, 除非通讯双方在同 一局网内。 Taking the TCP/IP protocol as an example, the present invention is only a mechanical (and thus a single) IP packet source address for extracting information from the TCP/IP protocol. Whether the sender is on the public network or on the private network. If the sender is on the private network, the source address retrieved is not the actual sender address. The true sender address is not good for establishing P2P unless the communicating parties are in the same network.
本发明解决的技术问题之二是提出了一种基于网络短信服务器的 客户机间通讯方法, 利用 NSM 服务器转发信息时附加的发送者地 址。 尝试 P2P直接通讯。  The second technical problem solved by the present invention is to propose an inter-client communication method based on a network short message server, which uses the sender address attached when the NSM server forwards information. Try P2P direct communication.
本发明提出的基于网络短信服务器的客户机间通讯方法, 包括以 下处理过程:  The method for communicating between clients based on the network short message server proposed by the invention includes the following processing:
a) 通讯双方向各自所属的网络短信服务器登录, 从客户机网络短 信用户名可获知该客户机所属的网络短信服务器地址;  a) The network short message server to which the communication belongs to each other is logged in, and the address of the network short message server to which the client belongs is known from the client network short message user name;
b) 通讯双方通过对方所属的网络短信服务器转发信息,信息中包 含对方的网络短信用户名, 相同的信息标题, 自己的网络短信用户名 及信息内容;  b) The communication parties forward the information through the network short message server to which the other party belongs, the information includes the other party's network short message user name, the same information title, their own network short message user name and information content;
c) 当客户机接收到自己所属的网络短信服务器转发来的对方信 息后, 获得了对方的网络短信用户名, 还有网络短信服务器转发时附 加的该信息发送者地址, 将信息发送者地址记录为对方直接地址; 当再次向对方发送新信息时, 除了通过对方所属的网络短信服务 器转发新信息外, 还向对方直接地址发送相同的新信息;  c) When the client receives the other party's information forwarded by the network short message server to which it belongs, it obtains the network short message user name of the other party, and the sender address of the information attached when the network short message server forwards, and records the sender address of the information. For the direct address of the other party; when sending new information to the other party again, in addition to forwarding the new information through the network short message server to which the other party belongs, the same new information is also sent to the direct address of the other party;
d) 在双方互相发送信息的过程中,如果某一方收到了对方直接发 送的信息, 则 P2P建立, 之后通过 P2P通讯, 不再通过对方的网络 短信服务器转发信息; 如果多次互相发送信息仍不能建立 P2P, 则放 弃直接发送信息, 只通过对方的网络短信服务器转发信息。  d) In the process of sending information between the two parties, if a party receives the information directly sent by the other party, the P2P is established, and then the P2P communication is used, and the information is no longer forwarded through the network short message server of the other party; When P2P is established, the information is sent directly, and the information is forwarded only through the network short message server of the other party.
采用本发明的客户机间通讯方法, NSM 服务器把接收到的转发 信息的 TCP/IP传输协议 IP 包源地址作为发送方地址告诉了接收者。 设想一下, 如果 NSM服务器按此地址向发送者反送信息, 发送者一 定可以收到。 那么, 换成由接收者按此地址向发送者回送信息, 也最 有可能被收到。 而且利用 NSM 建立 P2P 的好处还在于, 通讯双方 并不需要其它的专门为建立 P2P 使用的设施 (如中心服务器) 和过 程。 通讯双方也不需要关心自己的网络地址。 没有查询自己或对方网 络地址的过程。 通讯双方正常利用 NSM服务转发信息, 同时尝试建 立 P2P。 如果没有建立起来 P2P, 并不影响正常的通过 NSM服务转 发信息的间接通讯。 附图说明 With the inter-client communication method of the present invention, the NSM server notifies the recipient of the TCP/IP transport protocol IP packet source address of the received forwarding information as the sender address. Imagine if the NSM server sends a message back to the sender at this address, the sender Can be received. Then, instead of returning the message to the sender by the recipient at this address, it is most likely to be received. And the advantage of using NSM to establish P2P is that the communication parties do not need other facilities (such as central servers) and processes that are specifically used to establish P2P. The two parties do not need to care about their network address. The process of not querying your own or the other party's network address. Both parties to the communication normally use the NSM service to forward information and attempt to establish P2P. If P2P is not established, it does not affect the normal indirect communication of forwarding information through the NSM service. DRAWINGS
图 1是本发明客户机向网络短信服务器登录示意图;  1 is a schematic diagram of a login of a client of the present invention to a network short message server;
图 2是本发明网络短信服务器向客户机转发信息示意图; 图 3是本发明基于网络短信服务器的客户机间通讯方法原理图。 具体实施方式  2 is a schematic diagram of forwarding information of a network short message server to a client according to the present invention; FIG. 3 is a schematic diagram of a method for communicating between clients based on a network short message server according to the present invention. detailed description
首先需要说明的是本发明中的网络短信与移动通讯终端使用的短 信服务的短信不是一个概念, 本发明的网络短信可以认为是一个短小 的信息体,通过网络传输。 本发明中提到的网络地址对于 TCP/IP网络 具体为: IP : PORT。  First of all, it should be noted that the short message service short message service used in the network short message and the mobile communication terminal of the present invention is not a concept. The network short message of the present invention can be regarded as a short information body and transmitted through the network. The network address mentioned in the present invention is specifically for the TCP/IP network: IP: PORT.
以下通过具体的实施例对本发明的网络短信服务器进行详细说 明。 为方便描述, 下面以 TCP/IP 的 UDP 通讯描述实施方式。  The network short message server of the present invention will be described in detail below through specific embodiments. For convenience of description, the following describes the implementation in TCP/IP UDP communication.
假设客户机和服务器都为 TCP/IP网络中的计算单元。客户机可以 直接挂在公网上, 也可以挂在私网上并通过路由器连接公网或上层私 网。 当私网内的客户机对外发送信息时,路由器的 NAT将该信息的 IP 包源地址进行转换。  Assume that both the client and server are compute units in a TCP/IP network. Clients can hang directly on the public network, or they can hang on the private network and connect to the public network or the upper private network through a router. When a client in the private network sends information to the outside, the NAT of the router translates the IP packet source address of the information.
一个可靠的系统可以采用主备服务器的提供服务, 对于简单的系 统也可以采用单服务器的方式。主服务器和备份服务器功能是一样的, 只是其网络地址 (IP:PORT ) 不同。  A reliable system can be served by the primary and secondary servers, and a simple system can also be a single server. The primary server and backup server function the same, except that their network address (IP:PORT) is different.
每个用户都拥有一个用户名称, 在本实施例中该名称的形式为: <user id>@<domain name or IP>, 列^口: yanghm@12.34, 56.78 或者 13902904910@headcall.com。 用户名也被称为 NSM 用户名和用户的 NSM 地址。 通过 NSM 用户名称可以识别其服务器地址, 例如 13902904910@headcall.com 的服务器地址是: nsm.headcall.com (主服 务器) 和 nsm2.headcall.com (备份服务器)。 客户机是一个计算单元。 它使用一个 NSM 用户名和可接收的信息标题。 信息标题的形如 abc 或 123 或 abc8.headcall.com。 不同的应用程序使用不同的信息标题, 这样服务器就可以 同 时为 不 同 的应用 进行服务。 例如 iphone.headcall.com 是 headcall 网 络 电 话 使 用 的 标 题 , ichat.headcall.com是某个 instant message 软件使用的标题。 Each user has a user name. In this embodiment, the name is of the form: <user id>@<domain name or IP>, column ^ port: yanghm@12.34, 56.78 or 13902904910@headcall.com. Username is also known as NSM username and user NSM address. The server address can be identified by the NSM user name. For example, the server addresses of 13902290910@headcall.com are: nsm.headcall.com (primary server) and nsm2.headcall.com (backup server). A client is a computing unit. It uses an NSM username and an acceptable message header. The information title is shaped like abc or 123 or abc8.headcall.com. Different applications use different information headings so that the server can serve different applications at the same time. For example, iphone.headcall.com is the title used by headcall VoIP, and ichat.headcall.com is the title used by some instant message software.
如图 1所示的客户机向服务器进行的登录过程。 客户机向服务器 发出的登录请求中包括: 用户名称, 认证资料, 信息标题, 登录有效 期(即存活期)。客户机应该在本次登录存活期内,发送新的登录请求, 以便让服务器保持该客户机的在线状态。  The login process performed by the client to the server as shown in Figure 1. The login request sent by the client to the server includes: user name, authentication data, message title, login validity period (ie, lifetime). The client should send a new login request during this login lifetime to allow the server to keep the client online.
服务器接收到登录请求后, 从底层网络传输协议中获取该登录请 求的 IP包源地址 (IP:PORT ), 作为该客户机网络地址。  After receiving the login request, the server obtains the IP packet source address (IP:PORT) of the login request from the underlying network transport protocol as the client network address.
如果该登录请求通过 -检证, 则服务器构造一个客户机记录, 记录 该客户机的登录请求、 客户机的网络地址。  If the login request passes - verification, the server constructs a client record that records the client's login request, the client's network address.
当该客户机在私网内时, 被记录的客户机网络地址并不是真正的 客户机网络地址, 而是经过 NAT 转换后的网络地址。 但服务器只需 要记录这个转换后的网络地址, 不需要真正的客户机网络地址。  When the client is in the private network, the recorded client network address is not the actual client network address, but the NAT-converted network address. However, the server only needs to record the converted network address and does not need a real client network address.
如果登录请求通过验证, 服务器向客户机返回登录确认。 否则, 返回登录失败的原因。 例如: 用户错误, 认证错误, 或者该用户已经 If the login request passes verification, the server returns a login confirmation to the client. Otherwise, the reason for the login failure is returned. For example: user error, authentication error, or the user has already
(临时或永久) 转移。 利用临时转移特性, 还可以构造服务器集群。 登录的认证方式支持平凡认证(即密码明码), 也支持 SHA (密码 明码 + 挑战码)认证, 以及其它认证方式。 如果认证失败, 返回信 息中会告诉客户机除平凡认证以外的认证方式及需要的挑战码。 挑战 码是随机产生的, NSM 服务器会随时改变挑战码。 客户机接收到认 证错误的消息后, 重新计算认证信息, 再次发出登录请求。 如果服务 器被配置为限制使用某些标题, 那么, 客户机登录失败的原因还包括 标题错误。 (temporary or permanent) transfer. With the temporary transfer feature, you can also construct a server cluster. The login authentication mode supports trivial authentication (that is, password encryption), and also supports SHA (password + challenge code) authentication, and other authentication methods. If the authentication fails, the return message tells the client the authentication method and the required challenge code in addition to the normal authentication. The challenge code is randomly generated and the NSM server will change the challenge code at any time. After receiving the message of the authentication error, the client recalculates the authentication information and issues the login request again. If the server is configured to restrict the use of certain headers, then the reason for the client login failure also includes a header error.
此外, 对于通过多个客户机向服务器请求登录具有相同用户名和 相同可接收信息标题的用户时, 服务器仅保存这些客户机中最后一个 登录请求的客户机记录, 之前的客户机记录将被丢弃。 In addition, the request for login to the server through multiple clients has the same username and When the same user can receive the message title, the server only saves the client record of the last login request in those clients, and the previous client record will be discarded.
图 1 中左边的客户机为私网 101 内的客户机 201 , 其登录时被记 录的不是其本机网络地址 601 : 192168.0.12:1089, 而是经过 NAT 102 转换后的源网络地址 602: 202.96.56.78:65321。 登录请求 701 中包括 客户机的相关信息: 该用户的名称 yanghm@one.com, 可以看出该用 户对应的服务器 301地址为 nsm.one.com (如果有备份服务器,该备份 服务器地址为: nsm2.one.com )。 在登录时客户机 201 向地址为 nsm.one.com (同时向 nsm2.one.com , 果存在的话) 的月良务器进行 登录。 该客户机支持的信息标题为: yanghm.xyz.com。 TCP/IP传输协 议将把登录请求 701 封包,加上 IP头信息,含有目标地址(服务器 301 的地址), 源地址 601等, 结果封包为 401 , 向服务器 301发送。 封 包 401 被路由到私网出口,需要经过 NAT102 ,此 NAT拥有公网 100 的 IP 地址 203.34.56.78。 转换器 NAT 102 将转换封包中的源地址 601 转换到 602, 封包 401 变成了 402, 其中的登录请求 701 没有 改变。 服务器 301 接收到 402 封包, 从中取出登录信息 701 , 并从 TCP/IP 传输协议中获得 IP包源地址 602。 如果登录请求 701通过检 验, 则服务器 301 保存该登录信息 701 , 同保时存源地址 602, 保存 记录为 501。  The client on the left in Figure 1 is the client 201 in the private network 101, and its login is not its native network address 601: 192168.0.12:1089, but the source network address 602 after NAT 102 conversion: 202.96.56.78: 65321. The login request 701 includes the information about the client: The name of the user yanghm@one.com, it can be seen that the address of the server 301 corresponding to the user is nsm.one.com (if there is a backup server, the backup server address is: nsm2 .one.com ). At login, client 201 logs in to the server with the address nsm.one.com (and to nsm2.one.com, if it exists). The information header supported by this client is: yanghm.xyz.com. The TCP/IP transmission protocol will encapsulate the login request 701 with the IP header information, the destination address (the address of the server 301), the source address 601, etc., and the result packet is 401, which is sent to the server 301. The packet 401 is routed to the private network exit and needs to pass through the NAT 102. The NAT has the IP address 203.34.56.78 of the public network 100. The converter NAT 102 converts the source address 601 in the translation packet to 602, and the packet 401 becomes 402, where the login request 701 is unchanged. The server 301 receives the 402 packet, takes out the login information 701 therefrom, and obtains the IP packet source address 602 from the TCP/IP transport protocol. If the login request 701 passes the check, the server 301 saves the login information 701, the same time storage source address 602, and the save record is 501.
图 1中右边的客户机 203为挂在公网 100的客户机, 其登录的网 络地址 603为: 202.96.56.78.2078,登录请求 703中显示客户机名称为: john@one.com, 支持的信息标题为: headcall.one.com。 TCP/IP 传输 协议将把登录请求 703 封包, 加上 IP头信息, 含有目标地址 (服务 器 301 的地址), 源地址 603 等, 结果封包为 403 , 被发送到服务器 301。 服务器 301 接收到 403 封包, 从中取出登录信息 703 , 并从 TCP/IP传输协议中获得 IP包源地址 603。 如果登录请求 703通过检 验, 则服务器 301 保存该登录请求 703 , 同保时存源地址 603 , 保 存己录为 503。  The client 203 on the right side of FIG. 1 is a client hanged on the public network 100, and the network address 603 of the login is: 202.96.56.78.2078, and the client name displayed in the login request 703 is: john@one.com, supported. The message title is: headcall.one.com. The TCP/IP transport protocol will include the login request 703 packet, the IP header information, the destination address (the address of the server 301), the source address 603, etc., and the result packet is 403, which is sent to the server 301. The server 301 receives the 403 packet, takes out the login information 703 therefrom, and obtains the IP packet source address 603 from the TCP/IP transport protocol. If the login request 703 passes the check, the server 301 saves the login request 703, the same time storage source address 603, and the record is recorded as 503.
现在参考图 2来说明 NSM服务器是如何转发信息的。 其它应用 程序 801通过 NSM服务器 301向客户机 201发送信息 802。 应用程 序 801 首先制作 NSM 格式封包 805 , 它含有头部 803 (接收者名 称, 信息标题) 及信息 802。 TCP/IP传输协议将 4巴信息 805 封包, 加上 IP头信息,含有目标地址(服务器 301 的地址), 源地址 804等, 封包为 806, 经过公网 100 被发送到服务器 301 , 即图 2中 807的信 息发送步骤。 NSM服务器 301 接收到 806 封包,从中取出 NSM格 式封包 805 ,按头部 803 指示找到对应客户机的登录信息 501。另外, NSM 服务器 301 还从 TCP/IP传输协议中获得 IP 包源地址 804。 NSM 服务器 301 将把源地址 804作为发送者地址 904,加入头部 803 中, 构成新的头部 903 和新的封包 905。 然后 NSM 良务器 301将此 封包 905 交 TCP/IP传输协议发送到 501 记录的客户机地址 908。 TCP/IP将把 905 封包, 加上 IP头信息, 含有目标地址 908, 源地址 (服务器 301 的地址) 等, 封包为 906。 IP 包 906 被发送到 NAT 102, 即图 2中 907的信息发送步骤, NAT会把此包通过私网 101正 确地转送给客户机 201。 Referring now to Figure 2, it is illustrated how the NSM server forwards information. The other application 801 transmits the information 802 to the client 201 through the NSM server 301. Application The sequence 801 first creates an NSM format packet 805 containing a header 803 (recipient name, message header) and information 802. The TCP/IP transmission protocol encapsulates the 4 bar information 805 packet, adds the IP header information, contains the target address (the address of the server 301), the source address 804, etc., and the packet is 806, and is sent to the server 301 via the public network 100, that is, FIG. 2 The information transmission step in 807. The NSM server 301 receives the 806 packet, extracts the NSM format packet 805 therefrom, and finds the login information 501 of the corresponding client as indicated by the header 803. In addition, the NSM server 301 also obtains the IP packet source address 804 from the TCP/IP transport protocol. The NSM server 301 will add the source address 804 as the sender address 904 to the header 803 to form a new header 903 and a new packet 905. The NSM server 301 then sends this packet 905 to the TCP/IP transport protocol to the client address 908 of the 501 record. TCP/IP will add 905 packets, plus IP header information, including destination address 908, source address (address of server 301), etc., to 906. The IP packet 906 is sent to the NAT 102, i.e., the information transmission step of 907 in FIG. 2, which forwards the packet to the client 201 via the private network 101.
NSM服务器 301 在接收信息时, 并不关心发送者是在公网上如 801 ,还是在私网里如客户机 809。NSM服务器会机械的从 TCP/IP传 输协议中获得所接收信息的 IP包源地址, 作为其发送者网络地址。  When receiving the information, the NSM server 301 does not care whether the sender is on the public network such as 801 or in the private network such as the client 809. The NSM server will mechanically obtain the IP packet source address of the received information from the TCP/IP transport protocol as its sender network address.
NSM服务器 301 在转发信息时, 也不关心接收者是在公网上如 客户机 203 , 还是在私网里如客户机 201。 也不需要知道接收者的本 机地址。 它只会机械的从登录信息中取出转发的目标地址, 进行信息 的转发。  When the NSM server 301 forwards information, it does not care whether the recipient is on the public network such as the client 203 or in the private network such as the client 201. It is also not necessary to know the recipient's local address. It will only mechanically retrieve the forwarded destination address from the login information and forward the information.
如果客户机不在线或者其它原因导致 NSM服务器不能成功转发, NSM服务器给发送者网络地址回复转发失败的原因。 这个回复肯定 被接收到。  If the NSM server fails to forward successfully if the client is offline or for other reasons, the NSM server replies to the sender's network address for the reason for the forwarding failure. This reply must have been received.
此外 NSM服务器还接收来自客户机和其它应用程序的问候信息, 并且向其回复服务器时间。  In addition, the NSM server also receives greeting messages from clients and other applications and replies to the server time.
图 1所示服务器 301是主服务器,也可以换成备份服务器 (如果存 在的话)转发信息. 过程和效果是一样的。  The server 301 shown in Figure 1 is the primary server, and can also be replaced with a backup server (if present) to forward information. The process and effect are the same.
对于基于 NSM服务器的 P2P应用, NSM服务器接收仅有一个可 接收信息标题的客户机登录请求; 且 NSM服务器转发的信息中仅有 一个接收者名称和仅有一个信息标题。 For a P2P application based on an NSM server, the NSM server receives only one client login request that can receive the information header; and only the information forwarded by the NSM server A recipient name and only one message title.
下面通过两个 NSM客户机如何通过 NSM服务器完成通讯过程, 对本发明提出的客户机间通讯方法进行详细说明。 参考图 3所示。  The following describes how the inter-client communication method proposed by the present invention is described in detail by how two NSM clients complete the communication process through the NSM server. Refer to Figure 3.
服务器 NSM—B 的客户机 B , 它将首先发起向服务器 NSM—A 的客户机 A 的通讯。 需要说明的是这里的 NSM—A可能跟 NSM— B 是同一个服务器, 也可以是不同的服务器。 通讯包括以下过程:  Client B of server NSM-B, which will initiate communication to client A of server NSM-A first. It should be noted that the NSM-A here may be the same server as NSM-B, or it may be a different server. Communication includes the following processes:
1 ) 客户机 A, B 首先要向各自的服务器 (NSM— A, NSM— B)登 录。  1) Clients A, B must first log in to their respective servers (NSM-A, NSM-B).
2 ) 客户机 B 发送信息 01 给服务器 NSM— A, 该信息包含接收 者 A的用户名, 信息标题, 自己的用户名及信息内容等。  2) Client B sends the message 01 to the server NSM-A, which contains the user name, message title, own user name and information content of the recipient A.
3 ) 服务器 NSM— A转发信息 01 时, 加上了从 TCP/IP 协议中 获得的该信息 01的 IP包源地址, 把它作为发送者地址加入到了信息 01中, 新的信息被发送给客户机 A。  3) When the server NSM-A forwards the message 01, it adds the IP packet source address of the information 01 obtained from the TCP/IP protocol, adds it as the sender address to the message 01, and the new information is sent to the client. Machine A.
4 ) 客户机 A接收到步骤 3 )中的新的信息后,从中获得了客户 机 B的 NSM 用户名, 同时也获得了该信息发送者地址。 将该信息发 送者地址记录为客户机 B的直接地址。  4) After receiving the new information in step 3), client A obtains the NSM user name of client B and also obtains the sender address of the information. The information sender address is recorded as the direct address of client B.
5 ) 客户机 A 继续向客户机 B 发送信息 02 时, 通过服务器 NSM— B 转发该信息,同时向客户机 B的直接地址发送与信息 02内容 相同的信息 02P。  5) When client A continues to send message 02 to client B, the message is forwarded by server NSM-B, and the same information 02P as that of message 02 is sent to the direct address of client B.
6 ) 如果客户机 B接收到了信息 02P,那么客户 B知道直接通讯 P2P 已经建立。 再发送信息 03的内容时就可以采用 P2P发送, 即信 息 03P, 不需要经过服务器 NSM—A转发信息 03了。 当客户机 A接 收到直接来自客户机 B 的信息 03P时,知道直接通讯 P2P 已经建立, 再发送信息时就可以 P2P发送, 不需要经过 NSM服务器转发。  6) If client B receives message 02P, then client B knows that direct communication P2P has been established. When the content of the message 03 is resent, the P2P transmission, that is, the information 03P, can be used, and the information N03-A is not required to be forwarded through the server NSM-A. When client A receives the information 03P directly from client B, it knows that the direct communication P2P has been established, and then sends the information to P2P, which does not need to be forwarded by the NSM server.
7 ) 如果客户机 B 没有接收到信息 02P,但肯定会收到信息 02, 那么客户机 B也获得了该信息发送者地址。 将该信息发送者地址记录 为 A 的直接地址。  7) If client B does not receive message 02P, but will definitely receive message 02, client B also obtains the sender address of the message. Record the sender's address as the direct address of A.
8 ) 客户机 B 继续向客户机 A发送信息 03 时, 通过服务器 NSM— A转发该信息 03 , 同时向客户机 A 的直接地址发送相同信息 03Po 9 ) 如果客户机 A接收到了信息 03P, 那么客户机 A知道直接 通讯 P2P 已经建立。 再发送信息时就可以 P2P 发送, 不需要经过 NSM服务器转发信息了。 当 客户机 B 接收到直接来自客户机 A 的 信息时, 知道直接通讯 P2P 已经建立。 8) When client B continues to send message 03 to client A, it forwards the message 03 through the server NSM-A and simultaneously sends the same message 03Po to the direct address of client A. 9) If client A receives message 03P, client A knows that direct communication P2P has been established. When the information is sent again, it can be sent by P2P, and the information does not need to be forwarded through the NSM server. When Client B receives the information directly from Client A, it knows that the Direct Communication P2P has been established.
10 ) 如果客户机 A没有收到信息 03P。 但现在双方都知道了对 方的直接地址, 在发送信息时, 通过对方 NSM服务器转发信息, 同 时向对方直接地址发送相同信息。 一旦建立 P2P 通讯, 则不再通过 对方的 NSM 服务器转发信息。 如果多次互相发送信息仍不能建立 P2P, 则放弃直接发送信息, 只通过对方的 NSM 服务器转发信息。 说明, 不能认定本发明的具体实施只局限于这些说明。 对于本发明所 属技术领域的普通技术人员来说, 在不脱离本发明构思的前提下, 还 可以做出若干筒单推演或替换, 都应当视为属于本发明的保护范围。  10) If client A does not receive the message 03P. But now both parties know the direct address of the other party. When sending the message, the information is forwarded through the NSM server of the other party, and the same information is sent to the direct address of the other party. Once P2P communication is established, the information is no longer forwarded through the other NSM server. If P2P cannot be established even if the information is sent to each other multiple times, the information is sent directly and the information is forwarded only through the NSM server of the other party. It is to be understood that the specific implementation of the invention is not limited to the description. It is to be understood by those skilled in the art that the present invention can be deduced or substituted without departing from the spirit and scope of the invention.

Claims

权利要求: Rights request:
1. 一种实现网络短信服务的服务器, 其特征在于, A server for implementing a network short message service, characterized in that
所述网络短信服务器用于接收来自客户机的登录请求, 该登录请 求至少包括: 用户名、 认证信息、 一个或多个可接收的信息标题、 登 录有效期;  The network short message server is configured to receive a login request from a client, where the login request includes at least: a username, authentication information, one or more receivable information headers, and a login validity period;
所述网络短信服务器用于从网络传输协议中获得该登录请求的网 络协议包源地址作为该客户机网絡地址;  The network short message server is configured to obtain a network protocol packet source address of the login request from the network transmission protocol as the client network address;
所述网络短信服务器用于检查客户机的登录请求,如果验证通过, 所述网络短信服务器构造该客户机记录, 该记录至少包括: 客户机的 登录请求和该客户机网络地址;  The network short message server is configured to check a login request of the client, and if the verification is passed, the network short message server constructs the client record, and the record includes at least: a login request of the client and the client network address;
所述网络短信服务器还用于接收来自其它应用程序的信息, 该信 息至少包括: 一个或多个接收者用户名、 一个或多个信息标题、 信息 内容;  The network short message server is further configured to receive information from other applications, the information including at least: one or more recipient user names, one or more information titles, and information content;
所述网络短信服务器用于从网络传输协议中获得接收信息的网络 协议包源地址, 并将其作为该信息的发送者地址;  The network short message server is configured to obtain a network protocol packet source address of the received information from the network transmission protocol, and use the sender address as the sender address of the information;
所述网络短信服务器用于把接收到的原信息和该信息的发送者地 址合并构造新信息, 转发给符合下面条件的客户机: 原信息的接收者 用户名当中包含该客户机的登录请求中的用户名, 并且该客户机的登 录请求中的可接收信息标题包含原信息的信息标题中的任何一个; 所述网络短信服务器转发新信息给符合上面条件的客户机时, 把 该客户机记录中的客户机网络地址作为转发新信息的目的地址。  The network short message server is configured to combine the received original information and the sender address of the information to construct new information, and forward the message to a client that meets the following conditions: the recipient user name of the original information includes the login request of the client. User name, and the receivable information header in the login request of the client contains any one of the information headers of the original information; when the network short message server forwards the new information to the client that meets the above conditions, the client records The client network address in the address is used as the destination address for forwarding new information.
2. 根据权利要求 1所述的实现网络短信服务的服务器, 其特征在 于,所述网络短信服务器接收来自客户机和其它应用程序的问候信息, 并且向其回复服务器时间。 2. The server for implementing a network short message service according to claim 1, wherein the network short message server receives greeting information from the client and other applications, and replies to the server time thereto.
3. 根据权利要求 1或 2所述的实现网絡短信服务的服务器, 其特 征在于, 所述网络短信服务还用于对多个具有相同用户名和相同可接 收信息标题的客户机, 仅保存这些客户机中最后一个登录请求的客户 机记录 The server for realizing a network short message service according to claim 1 or 2, wherein the network short message service is further used to save only a plurality of clients having the same user name and the same receivable information title. The last login request in the machine Machine record
4. 根据权利要求 1或 2所述的实现网络短信服务的服务器, 其特 征在于, 所述网络短信服务器用于接收仅有一个可接收信息标题的客 户机登录请求; 所述网络短信服务器转发的信息中仅有一个接收者名 称和仅有一个信息标题。 The server for implementing a network short message service according to claim 1 or 2, wherein the network short message server is configured to receive a client login request having only one receivable information header; and the network short message server forwards There is only one recipient name and only one message title in the message.
5. 根据权利要求 3所述的实现网络短信服务的服务器, 其特征在 于, 所述网络短信服务器用于接收仅有一个可接收信息标题的客户机 登录请求; 所述网络短信服务器转发的信息中仅有一个接收者名称和 仅有一个信息标题。 The server for implementing a network short message service according to claim 3, wherein the network short message server is configured to receive a client login request having only one receivable information header; and the information forwarded by the network short message server There is only one recipient name and only one message title.
6. —种基于网络短信服务器的客户机间通讯方法, 其特征在于, 所述方法包括以下处理过程: 6. An inter-client communication method based on a network short message server, characterized in that the method comprises the following processing:
a) 通讯双方向各自所属的网络短信服务器登录, 从客户机的用户 名可获知该客户机所属的网络短信服务器地址;  a) The network short message server to which the communication belongs to each other is logged in, and the address of the network short message server to which the client belongs is known from the username of the client;
b) 通讯双方通过对方所属的网络短信服务器转发信息,信息中包 含对方的网络短信用户名, 相同的信息标题, 自己的网络短信用户名 及信息内容;  b) The communication parties forward the information through the network short message server to which the other party belongs, the information includes the other party's network short message user name, the same information title, their own network short message user name and information content;
c) 当客户机接收到自己所属的网络短信服务器转发来的对方信 息后, 获得了对方的网络短信用户名, 还有网络短信服务器转发时附 加的该信息发送者地址, 将信息发送者地址记录为对方直接地址; 当再次向对方发送新信息时, 除了通过对方所属的网络短信服务 器转发新信息外, 还向对方直接地址发送相同的新信息;  c) When the client receives the other party's information forwarded by the network short message server to which it belongs, it obtains the network short message user name of the other party, and the sender address of the information attached when the network short message server forwards, and records the sender address of the information. For the direct address of the other party; when sending new information to the other party again, in addition to forwarding the new information through the network short message server to which the other party belongs, the same new information is also sent to the direct address of the other party;
d) 在双方互相发送信息的过程中,如果某一方收到了对方直接发 送的信息, 则 P2P建立, 之后通过 P2P通讯, 不再通过对方的网络 短信服务器转发信息; 如果多次互相发送信息仍不能建立 P2P, 则放 弃直接发送信息, 只通过对方的网络短信服务器转发信息。  d) In the process of sending information between the two parties, if a party receives the information directly sent by the other party, the P2P is established, and then the P2P communication is used, and the information is no longer forwarded through the network short message server of the other party; When P2P is established, the information is sent directly, and the information is forwarded only through the network short message server of the other party.
PCT/CN2008/001447 2007-08-15 2008-08-11 A server implementing network short message service and the communication method between the server and the clients WO2009024020A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN2007100757628A CN101207579B (en) 2007-08-15 2007-08-15 Server for implementing network note service and communication method among client machines
CN200710075762.8 2007-08-15

Publications (1)

Publication Number Publication Date
WO2009024020A1 true WO2009024020A1 (en) 2009-02-26

Family

ID=39567470

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2008/001447 WO2009024020A1 (en) 2007-08-15 2008-08-11 A server implementing network short message service and the communication method between the server and the clients

Country Status (2)

Country Link
CN (1) CN101207579B (en)
WO (1) WO2009024020A1 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101207579B (en) * 2007-08-15 2010-08-18 杨汉民 Server for implementing network note service and communication method among client machines
CN103227746B (en) * 2012-01-31 2018-03-27 珠海德百祺科技有限公司 Data communications method and system
CN114302349B (en) * 2021-12-07 2023-05-30 北京羽乐创新科技有限公司 Method and system for extracting number by client

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1515506A1 (en) * 2003-09-09 2005-03-16 Alcatel A method of establishing a data packet communication session between a terminal arrangements of a data packet network and an exchange therefore
WO2006089593A1 (en) * 2005-02-24 2006-08-31 Siemens Enterprise Communications Gmbh & Co. Kg Method for recording a voip communication using a peer-to-peer databank
WO2007003850A2 (en) * 2005-07-01 2007-01-11 France Telecom Method for managing messages in a peer-to-peer network
WO2007044049A2 (en) * 2005-10-04 2007-04-19 Yahoo! Inc. Peer-to-peer message chaining for initiating a data exchange with a server
CN1960338A (en) * 2005-10-31 2007-05-09 株式会社东芝 Communication controlling method
US20070147399A1 (en) * 2005-11-15 2007-06-28 Arcsoft (Shanghai) Technology Company, Ltd Using Secondary Channels to Communicate IP Addresses for Point-To-Point Communication
CN101207579A (en) * 2007-08-15 2008-06-25 杨汉民 Server for implementing network note service and communication method among client machines

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1377081A1 (en) * 2002-06-26 2004-01-02 Alcatel A method for providing services located in a connectionless data packet network to terminals of a connection oriented communications network, a terminal, a terminal program module and a terminal program module download server system therefor
JP2005236728A (en) * 2004-02-20 2005-09-02 Matsushita Electric Ind Co Ltd Server apparatus, request issuing the apparatus, request accepting apparatus, communications system and communication method
CN1881916B (en) * 2005-06-17 2012-07-04 腾讯科技(深圳)有限公司 Method and apparatus for realizing communication between communication equipments

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1515506A1 (en) * 2003-09-09 2005-03-16 Alcatel A method of establishing a data packet communication session between a terminal arrangements of a data packet network and an exchange therefore
WO2006089593A1 (en) * 2005-02-24 2006-08-31 Siemens Enterprise Communications Gmbh & Co. Kg Method for recording a voip communication using a peer-to-peer databank
WO2007003850A2 (en) * 2005-07-01 2007-01-11 France Telecom Method for managing messages in a peer-to-peer network
WO2007044049A2 (en) * 2005-10-04 2007-04-19 Yahoo! Inc. Peer-to-peer message chaining for initiating a data exchange with a server
CN1960338A (en) * 2005-10-31 2007-05-09 株式会社东芝 Communication controlling method
US20070147399A1 (en) * 2005-11-15 2007-06-28 Arcsoft (Shanghai) Technology Company, Ltd Using Secondary Channels to Communicate IP Addresses for Point-To-Point Communication
CN101207579A (en) * 2007-08-15 2008-06-25 杨汉民 Server for implementing network note service and communication method among client machines

Also Published As

Publication number Publication date
CN101207579B (en) 2010-08-18
CN101207579A (en) 2008-06-25

Similar Documents

Publication Publication Date Title
US10630730B2 (en) NAT traversal for media conferencing
KR101278297B1 (en) Method and apparatus for reliably delivering multicast data
US7792065B2 (en) Securely establishing sessions over secure paths
US7778187B2 (en) System and method for dynamic stability in a peer-to-peer hybrid communications network
US8010793B2 (en) Data communication method and system
US8205074B2 (en) Data communication method and data communication system
US20080215669A1 (en) System and Method for Peer-to-Peer Connection of Clients Behind Symmetric Firewalls
EP1892887B1 (en) Communication method between communication devices and communication apparatus
JP4662078B2 (en) Communication system, communication method, and program
US20120269063A1 (en) System and method for data transfer in a peer-to-peer hybrid communication network
US6879593B1 (en) Connections of nodes on different networks
WO2006034635A1 (en) A method for establishing the p2p connection
JP2011205642A5 (en)
JP2004363897A (en) Ip multicast distribution system, streaming data distributing method, and program therefor
JP2004531110A (en) System and method for outsourcing the function of a SIP user agent to a proxy
WO2007036160A1 (en) An apparatus, system and method for realizing communication between the client and the server
US20100040057A1 (en) Communication method
WO2013166696A1 (en) Data transmission method, system and device
WO2012034309A1 (en) Method, terminal and system for file transfers between session initiation protocol (sip) terminals in network address translation (nat) network
WO2009024020A1 (en) A server implementing network short message service and the communication method between the server and the clients
JP2005210352A (en) Ip address converter and converting method
US20080137647A1 (en) VoIP terminal and method for providing multi-call service
Kantola et al. Customer edge traversal protocol (cetp)
Hansen Message Tracking Query Protocol
WO2014180415A1 (en) Media stream packet nat traversal method, mdu and iptv system

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 08783632

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 08783632

Country of ref document: EP

Kind code of ref document: A1