WO2019232750A1 - 一种网络通信方法、对等体及*** - Google Patents

一种网络通信方法、对等体及*** Download PDF

Info

Publication number
WO2019232750A1
WO2019232750A1 PCT/CN2018/090277 CN2018090277W WO2019232750A1 WO 2019232750 A1 WO2019232750 A1 WO 2019232750A1 CN 2018090277 W CN2018090277 W CN 2018090277W WO 2019232750 A1 WO2019232750 A1 WO 2019232750A1
Authority
WO
WIPO (PCT)
Prior art keywords
peer
communication
peers
user
communication room
Prior art date
Application number
PCT/CN2018/090277
Other languages
English (en)
French (fr)
Inventor
关迟
赖亭庆
Original Assignee
Guan Chi
Lai Khanh Dinh
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 Guan Chi, Lai Khanh Dinh filed Critical Guan Chi
Priority to CN201880000644.7A priority Critical patent/CN110192382B/zh
Priority to PCT/CN2018/090277 priority patent/WO2019232750A1/zh
Priority to US16/027,722 priority patent/US10686877B2/en
Publication of WO2019232750A1 publication Critical patent/WO2019232750A1/zh

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1044Group management mechanisms 
    • H04L67/1046Joining mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1061Peer-to-peer [P2P] networks using node-based peer discovery mechanisms
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/104Peer-to-peer [P2P] networks
    • H04L67/1061Peer-to-peer [P2P] networks using node-based peer discovery mechanisms
    • H04L67/1068Discovery involving direct consultation or announcement among potential requesting and potential source peers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/14Session management
    • H04L67/141Setup of application sessions

Definitions

  • This solution belongs to the field of communication technology, and particularly relates to a network communication method, a peer, and a system.
  • cloud computing and cloud service platforms which can provide infrastructure and technologies that support software or hardware operation, so that users can obtain computing and information transmission services and technologies through the cloud platform.
  • the infrastructure providing cloud computing and cloud services is basically monopolized by large fixed enterprises, which hinders the development of technology; on the other hand, when network communication is not based on the infrastructure of some large enterprises Generally, it can only be limited to the connection and communication of two Internet protocol IP addresses.
  • the server needs to be extended. The cost of creating such a server is very expensive, and it cannot be implemented with a firewall or router. After the connection and communication of the IP address.
  • embodiments of this solution provide a network communication method peer and system to solve the problems of expensive server creation and inability to connect and communicate with an IP address behind a firewall or router in the prior art.
  • a first aspect of this embodiment of the present invention provides a network communication method, which is applied to a peer-to-peer network communication system, which includes one or more discovery peers, one or more leading peers, One or more communication room peers and at least two user peers;
  • the discovery peer is used to discover the Internet protocol IP address and port of other peers, and the lead peer is used to create a communication room peer and a message in a shared communication room peer, the communication
  • the room peer is used to temporarily store communication data;
  • the user peer is used to join a communication room to participate in communication;
  • the network communication method includes:
  • Establish communication with the lead peer obtain the IP address and port of the lead peer, and send the load of the communication room and the total number of user peers to the lead peer, so that the lead peer will Describe the communication room load and the total number of user peers, and create the required number of communication room peers;
  • a second aspect of this embodiment of the present invention provides a network communication method, which is applied to a peer-to-peer network communication system and includes:
  • a required number of communication room peers are created, so that the communication room peers establish communication with the discovery peers, and the communication room peers
  • the IP address and port are sent to the user peer, so that the user peer joins the corresponding communication room and the communication room peer participates in communication.
  • a third aspect of this embodiment of the present invention provides a network communication method, which is applied to a peer-to-peer network communication system and includes:
  • a fourth aspect of this embodiment of the present invention provides a discovery peer, including:
  • a first communication module configured to establish communication with a communication room peer, and obtain a load of the communication room peer and an Internet protocol IP address and port of the communication room;
  • a first sending module configured to establish communication with a lead peer, obtain an IP address and a port of the lead peer, and send the load of the communication room and the total number of user peers to the lead peer to Causing the leading peer to create the required number of communication room peers according to the load of the communication room and the total number of the user peers;
  • the second sending module is configured to establish communication with the user peer, and send the IP address and port of the communication room peer to the user peer, so that the user peer joins the corresponding communication room peer for communication.
  • a fifth aspect of this embodiment of the present invention provides a pilot peer, including:
  • a second communication module configured to establish communication with one or more discovery peers
  • a first receiving module configured to receive a load of a communication room peer sent by a discovery peer and a total number of user peers
  • a communication room creation module configured to create a required number of communication room peers according to the load and the total number of user peers participating in communication, so that the communication room peers establish communication with the discovery peers, The IP address and port of the communication room peer are sent to the user peer, so that the user peer joins the corresponding communication room and the communication room peer participates in communication.
  • a sixth aspect of this embodiment of the present invention provides a communication room peer, including:
  • a third communication module configured to establish communication with the discovery peer, and send the load of the peer in each communication room to the discovery peer, so that the discovery peer sends the load of the communication room and the user peer Sends the total number to the pilot peers, so that the pilot peers create the required number of communication room peers based on the load and the total number of user peers;
  • a third sending module configured to send the address of the communication room peer corresponding to the user peer to the discovery peer, so that the discovery peer sends the address of the communication room peer to the user peer, Make the user peer join the corresponding communication room peer;
  • the information sharing module is used to receive messages sent by user peers who join the communication room peer and forward the messages to other user peers and pilot peers who join the communication room peer.
  • a seventh aspect of the embodiment of the present invention provides a network communication system, including: a discovery peer, a leading peer, a communication room peer, a user peer, a memory, a processor, and stored in the memory.
  • a computer program may be run on the processor, and when the processor executes the computer program, the steps of the network communication method are implemented.
  • An eighth aspect of this embodiment of the present invention provides a computer-readable storage medium, where the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, implements the steps of the foregoing network communication method.
  • the beneficial effect brought by the technical solution provided by the embodiment of the present solution is that the embodiment of the present solution is based on peer-to-peer network communication, and acquires a communication room peer by establishing communication with a pilot peer, a communication room peer, and a user peer
  • the load of the peer allows the leading peer to create the required number of communication room peers based on the load and the number of user peers, and sends the address information of the communication room peers to the user peers, enabling the user to Adding peers to the corresponding communication room peers can enable a large number of user peers to join the communication room peers to participate in network communication and data sharing and transmission; it realizes the decentralization of network communication and overcomes the traditional needs Disadvantages of creating a server at a huge cost; solving the problem of each user peer communicating with a large number of other user peers at the same time without a central server; providing infrastructure and services for simultaneous communication of a large number of users , Meeting the requirements of multiple user peers participating in communication at the same time, has strong ease of use and practicality.
  • FIG. 1 is a schematic diagram of a system scenario applicable to a network communication method according to an embodiment of the present solution
  • FIG. 2 is a schematic diagram of an implementation process of discovering a peer by a network communication method according to an embodiment of the present solution
  • FIG. 3 is a schematic flowchart of an implementation process of a leading peer of a network communication method according to an embodiment of the present solution
  • FIG. 4 is a schematic flowchart of implementing a communication room peer in a network communication method according to an embodiment of the present solution
  • FIG. 6 is a structural block diagram of a discovery peer provided by an embodiment of the present solution.
  • FIG. 7 is a structural block diagram of a pilot peer according to an embodiment of the present solution.
  • FIG. 8 is a structural block diagram of a communication room peer provided by an embodiment of the present solution.
  • FIG. 9 is a schematic diagram of a network communication system provided by an embodiment of this solution.
  • the discovery peer establishes communication with the leading peer, communication room peer, and user peer to discover the IP address and port of the leading peer, communication room peer, and user peer. And receive the communication trigger instruction sent by the user peer, and send the communication room information and communication method information corresponding to the communication trigger instruction to the user peer, so that all user peers can join the corresponding communication room and pass the corresponding
  • the communication method enables direct communication between user peers. Therefore, user peers can establish direct point-to-point communication without having to know each other's IP addresses and ports.
  • FIG. 1 shows a schematic diagram of a system scenario to which the network communication method according to the embodiment of the present invention is applicable. For ease of description, only parts related to the embodiment are shown.
  • the system includes at least one discovery peer 11, at least one pilot peer 12, at least one communication room peer 13, and several user peers 14, where the user peer 14 may be a computer, Any entity with a networking capability, such as a tablet or mobile phone. It is found that the peer 11, the pilot peer 12, and the communication room peer 13 provide the network communication infrastructure for the user peer 14. In the above system scenario, even if the user peer 14 is behind a firewall or router, The set discovery peer 11, pilot peer 12, and communication room peer 13 can also realize direct peer-to-peer communication of user peers, and can discover discovery peer 11, pilot peer 12, and communication room peers. Peer 13 is extended to support a large number of user peers participating in communication at the same time.
  • FIG. 2 shows an implementation process of a network communication method according to an embodiment of the present solution.
  • the method is applied to a peer-to-peer network communication system, where the peer-to-peer network communication system includes one or more discovery peers, one or more Leading peer, one or more communication room peers, and one or more user peers;
  • the discovery peer is used to discover the Internet protocol IP address and port of other peers, and the lead peer is used to create a communication room peer and share data within the communication room peer, the communication Room peers are used to temporarily store and transmit communication data; the user peers are used to join a communication room to participate in communication.
  • the execution subject of this process is the discovery peer 11 shown in FIG. 1, which is detailed as follows:
  • step S201 communication is established with the communication room peer, and the load of the communication room peer and the Internet protocol IP address and port of the communication room are obtained.
  • the peer may be a physical computer PC or a virtual PC end; the physical PC may include an electronic circuit capable of executing a software process or having the same function as a software process, or an integrated circuit IC.
  • Each discovery peer has a global IP address, which can be viewed by other peers located anywhere and establish communication with the discovery peer; other peers establish communication with the discovery peer, even if other peers
  • the peer works behind a firewall or router. It is found that the peer can also find the IP address and port of each peer that joins the network and establishes a communication connection through the session transfer protocol STUN / TURN, including the IP address of the leading peer and Ports, IP addresses and ports of communication room peers, and IP addresses and ports of user peers.
  • the establishment of communication between the peer and the communication room peer can obtain the load of the current communication room, which is the number of user peers who have currently joined the communication room.
  • the number can be zero or one.
  • the discovery peer When there is only one discovery peer and one communication room peer to establish communication, the discovery peer obtains the IP address and port of the communication room peer, and sends the IP address and port to the user peer, so that the user The peer joins the communication room peer.
  • each discovery peer can correspond to a specific application.
  • the first discovery peer can be an application that manages chats and peers with users with chat capabilities. Or application to establish communication, so that the user peer or application with chat function can join the corresponding communication room; the second discovery peer can be to manage the application for publishing advertisements, and communicate with those who need to have the function of publishing advertisements.
  • the user peer or application establishes communication, so that the user peer or application having the function of publishing advertisements joins the corresponding communication room.
  • the discovery peer can be a virtual machine or a PC with a global Internet Protocol IP address.
  • establishing the communication with the communication room peer and obtaining the load of the communication room peer and the Internet protocol IP address and port of the communication room include:
  • the types of user peers added to each communication room peer are sent to other communication room peers.
  • the types of user peers that join each communication room peer are shared to the IP address and port of each communication room peer.
  • Each communication room peer so that user peers in different communication room peers can achieve communication, and enable user peers to join appropriate communication room peers.
  • Step S202 Establish communication with the lead peer, obtain the IP address and port of the lead peer, and send the load of the communication room and the total number of user peers to the lead peer so that the lead peer The peer creates a required number of communication room peers based on the communication room load and the total number of user peers.
  • the leading peer is a peer that creates a communication room and monitors all communication room running processes;
  • the load is the number of peers that have been added to the communication room, and the user
  • the total number of peers is the number of all user peers that have established communication with the discovery peer;
  • the discovery peer establishes communication with the lead peer, obtains the IP address and port of the lead peer, and pairs the communication room with
  • the load of the peer is sent to the leading peer; even if the leading peer works behind a firewall or router, it can be found that the peer can obtain the IP address and port of the leading peer; since each communication room peer can The amount of messages carried is limited. In the current communication room, the peer cannot bear the current amount of messages. Then, the leading peer creates more required communication room peers based on the load and the total number of user peers. body.
  • the communication is established with the lead peer, and the load of the communication room and the total number of user peers are sent to the lead peer, so that the lead peer is based on the load of the communication room.
  • the total number of user peers to create the required number of communication room peers including:
  • the number of created communication room peers sent by the receiving peer is the number of created communication room peers sent by the receiving peer.
  • the leading peer after the leading peer creates a new communication room peer, it sends the number of the created communication room peers to the discovery peer, so as to establish a communication with the user peer of the discovery peer.
  • Corresponding communication room peers can be added.
  • Step S203 Establish communication with the user peer, and send the IP address and port of the communication room peer to the user peer, so that the user peer joins the corresponding communication room peer for communication.
  • the discovery peer before the user peer joins the communication room, it first needs to establish communication with the discovery peer, the discovery peer obtains the IP address and port of the user peer, and sets the IP address of the communication room peer. The port is sent to the user peer so that the user peer can join the corresponding communication room.
  • the user peer may be one or more of a computer, a mobile phone, or an embedded electronic device.
  • the peer if the user peer participating in the communication exceeds the load of the current communication room peer, the peer is found to obtain the IP address and port of the new communication room peer created by the leading peer, and the new The IP address and port of the peer in the communication room are sent to the user peer, so that the user peer joins the appropriate communication room.
  • User peers participating in communication belong to applications that are set and implemented for specific goals and destinations, so user peers can be peered with different discoveries based on the communication goals and communication destinations of each user peer
  • the peer establishes communication; or the user peer queries the global database and selects the corresponding discovery peer to establish communication based on the target and destination.
  • the peer establishes communication with the user peer and obtains the IP address and port of the user peer, and sends the IP address and port of the user peer to the communication room peer, so that each User peers that join a communication room peer can send or multicast message data to other peers that join a communication room peer; each user peer that joins a communication room peer can also send messages or data Send to communication room peers, and send to other user peers through communication room peers.
  • establishing the communication with the user peer and sending the IP address and port of the communication room peer to the user peer so that the user peer joins the corresponding communication room peer for communication includes:
  • a new discovery peer is created, and the new discovery peer establishes communication with the user peer.
  • each discovery peer can carry the amount of messages that each discovery peer can carry.
  • Each discovery peer can process up to 100,000 messages per second, while processing the transmission of messages with other peers. ; If more users need to participate in communication, the discovery peers can be continuously expanded, and newly created discovery peers continue to establish communication connections with user peers that need to communicate, and handle user peers participating in communication in the same way body.
  • the creation of a new discovery peer is achieved by the load balancing software running in the first discovery peer.
  • This embodiment finds that a peer establishes communication with other peers, and obtains the IP address and port of the leading peer, the IP address and port of the communication room peer, and the IP address and port of the user peer.
  • the user peer provides the communication room information, so that the user peer joins the corresponding communication room; the user peer that joins the communication room peer can send data to the communication room peer, and the communication room peer will Data is sent to other user peers; or data is obtained from a communication room to enable a user peer to communicate with thousands of other user peers, exchanging information, data, audio, video, etc.
  • FIG. 3 shows the implementation flow of the network communication method provided by the embodiment of the present scheme.
  • the execution subject of the process is one of the leading peers 12 in FIG.
  • Step S301 Establish communication with one or more discovery peers.
  • each lead peer is used to create a communication room.
  • Each lead peer may be a computer including a software process, or an electronic circuit or an integrated circuit that can perform functions similar to the software process.
  • Each lead peer can process 100,000 messages per second. If a message is processed to represent a new user participating in network communication, each lead peer can process 100,000 peers per second to join the network; the leader The peer creates a communication room for the users participating in the communication, and ensures that the created communication room can always be joined by the user peers participating in the communication; if it needs to handle one million users participating in the communication, ten leading peers need to be used In the same way, the peers participating in communication are processed in the same way.
  • the specific number of leading peers is determined according to the number of user peers that establish communication with the found peers and the amount of messages that the leading peers can carry.
  • Each lead peer can establish communication with multiple discovery peers at the same time, so that it can obtain information about the load of different communication rooms sent by different discovery peers, monitor each communication room peer to join user peers And synchronize all the communication room peers sent by the discovery peers to the user peers to all communication room peers.
  • Step S302 Receive the load of the communication room peers and the total number of user peers sent by the discovery peers.
  • the load of the communication room peers is the number of user peers who join each communication room peer; it is found that the peer establishes communication with the communication room peer, and can obtain each The number of user peers added to the communication room peers.
  • the load of each communication room peer can be zero, one thousand or ten thousand, etc. According to the load of the communication room peers, the communication can be known. Whether room peers can continue to join user peers.
  • the pilot peers can also track the information about the peers leaving the peers in the communication room.
  • the system will automatically detect and automatically regenerate the leading peer through the corresponding software process to ensure that the leading peer always exists.
  • Step S303 Create a required number of communication room peers according to the load and the number of user peers participating in the communication, so that the communication room peers establish communication with the discovery peers, and pair the communication room peers The IP address and port of the peer are sent to the user peer, so that the user peer joins the corresponding communication room and the communication room peer participates in communication.
  • the load is the number of user peers that join each communication room peer, and the total number of user peers is the number of user peers that have established a communication connection with the discovery peer.
  • the load is the number of user peers that join each communication room peer
  • the total number of user peers is the number of user peers that have established a communication connection with the discovery peer.
  • the peer establishes communication with each communication room peer, obtains the load of the communication room peers and the IP addresses and ports of all the communication room peers, and obtains the load and the IP address. And the peer port are sent to the lead peer, and the lead peer sends the IP address and port to the user peer, so that the user peer will join the corresponding communication room peer.
  • a required number of communication room peers are created, so that the communication room peers establish communication with the discovery peers, and The IP address and port of the communication room peer are sent to the user peer, so that the user peer joins the corresponding communication room and the communication room peer participates in communication, including:
  • the number of created communication room peers is sent to the discovery peers, so that the user peers that have established communication with the discovery peers join the corresponding communication room peers.
  • a required number of communication room peers are created, so that the communication room peers establish communication with the discovery peers, and The IP address and port of the communication room peer are sent to the user peer, so that the user peer joins the corresponding communication room and the communication room peer participates in the communication, including:
  • the lead peer joins the created communication room peer while creating the communication room peer;
  • the pilot peer joins each communication room peer, and can receive data sent by the communication room peer and forward the data to other communication room peers, so that users in other communication rooms
  • the peer can also receive the message; thus, the synchronization and sharing of data between the peers in the communication room are maintained by the pilot peer; since the pilot peer loads and processes the message more conveniently, the pilot peer replaces the communication room pair
  • the peer synchronizes any message sent by any user peer to the corresponding communication room in each communication room peer.
  • the communication method further includes: if the amount of messages handled by the current lead peer in the communication room exceeds the load of the lead peer, creating a new lead peer so that the new lead peer creates more Communication room peers and process messages for communication room peers.
  • the carrying amount of processing information of each pilot peer is limited.
  • the amount of processed messages exceeds the processing amount of the current leading peer, a new leading peer needs to be created.
  • the new leading peer In the same way, the peer establishes a communication connection with the discovery peer, creates a new communication room peer based on the load, and shares data between the communication room peers.
  • Each pilot peer can create communication room peers of different application types. For example, the same pilot peer can create communication room peers for advertising, communication room peers for finding advertisements, and Communication room peers used for chatting, etc .; also, for different application categories, communication room peers corresponding to different applications can be created through pilot peers corresponding to different applications.
  • the pilot peer determines whether a new communication room peer needs to be created according to the number of user peers participating in the communication and the load of the current communication room peer, so that it can support more user peers. Join the communication room to participate in peer-to-peer network communication. At the same time, more pilot peers can also be used to create more communication room peers to satisfy more user peers to achieve point-to-point network communication.
  • FIG. 4 shows the implementation flow of the network communication method according to the embodiment of the present solution.
  • the execution subject of the process is the communication room peer 13 in FIG. 1.
  • the principles of the relevant steps shown in Figure 1 and Figure 2 are consistent, and the relevant implementation principles are not repeated here:
  • Step S401 Establish communication with the discovery peer, and send the load of each communication room peer to the discovery peer, so that the discovery peer sends the load of the communication room and the total number of user peers. To the leading peer, so that the leading peer creates a required number of communication room peers based on the load and the total number of user peers.
  • the communication room peer is a computer including a software process, or an electronic circuit or an integrated circuit having the same function as the software process.
  • Each communication room peer establishes a communication connection with the discovery peer.
  • the discovery peer obtains information about the number of user peers added to each communication room peer and creates the required number of users based on the total number of user peers. The number of communication room peers, so that the user peer joins the corresponding communication room to participate in communication.
  • the transmitting the communication room information corresponding to the user peer to the discovery peer, so that the discovery peer sends the communication room information to the user peer, so that the user peer joins the corresponding communication room Peers include:
  • Step S402 Send the address of the communication room peer corresponding to the user peer to the discovery peer, so that the discovery peer sends the address of the communication room peer to the user peer, so that the user is peered The peer joins the corresponding communication room peer.
  • the address of the communication room peer corresponding to the user peer includes the IP address and port of the communication room; all communication room peers establish communication with the discovery peer and discover the peer It can obtain the category information of user peers added to all communication room peers, and can send the communication room information corresponding to the user peer to the user peer according to the target and destination of the user peer, so that User peers join appropriate communication room peers to implement point-to-point network communication.
  • the communication room peers can be divided into communication room peers of multiple application categories according to different needs of user peers; for example, communication room peers used to publish advertisements can support users who need to publish advertisements.
  • Peers join the communication room peers to publish advertisements; communication room peers used to find advertisements can support user peers who find ads to join communication room peers, and user peers can perform Search for advertising content; there are also communication room peers for chatting, which can support the addition of user peers who need to chat; that is, the communication room peers can be set to different types of applications according to different needs to meet user needs. Communication needs of peers.
  • each communication room peer can support the loading service of 10,000 to 100,000 messages, and according to the number of user peers participating in communication and the increase in demand, more can be created through the pilot peer Communication room peers, enabling multiple communication room peers to provide the infrastructure for all user peers using a peer-to-peer network for communication.
  • the transmitting the communication room information corresponding to the user peer to the discovery peer, so that the discovery peer sends the communication room information to the user peer, so that the user peer joins the corresponding communication room Peers include:
  • Step S403 Receive the IP address and port of the user peer sent by the discovery peer, and send data to the user peer.
  • the peer sends the IP address and port of the user peer to the communication room peer, and the communication room peer can send and respond to all user peers joining the communication room peer. Or multicast data. Communication room peers can also receive data sent by user peers and forward the data to other user peers.
  • the message may contain a reference to a user pair that is suitable for the message Peer information, and received at the user peer that is appropriate for the message, will determine that the message is a message sent to itself.
  • the data and messages temporarily stored in the communication room peer will be stored as historical data, and when the user's peer weight When newly joining a communication room peer, re-acquire the historical data and messages, so as to avoid missed receiving data and messages due to the disconnection of the Internet or temporary errors.
  • messages and / or data are embedded with information that can only be decrypted and understood by the intended user peer, the intended user peer that joins the communication room peer will obtain the message or data, and other users who join the room The peer will not get the message or data.
  • the step of receiving a message sent by a user peer joining a communication room and forwarding the message to other user peers and pilot peers joining the communication room peer includes:
  • the current communication room peer receives messages from other communication room peers sent by the leading peer, and sends the message to the user peers who joined the current communication room peer, thereby achieving the communication room peering through the leading peer.
  • Data sharing between media, the message includes audio, video and any form of digital data.
  • the network communication method further includes: providing historical messages and data to a user peer that subsequently joins a communication room peer.
  • the creation of a communication room peer ensures sufficient storage space to accommodate messages or data of multiple user peers who are joining the communication room peer, and provides user peers with exchange data. Or the basic way and infrastructure of the message.
  • FIG. 5 shows an interaction flowchart of a network communication method according to an embodiment of the present solution.
  • the execution subject participating in the interaction process includes at least one discovery peer 11, at least one leading peer 12, and at least one communication in FIG. 1.
  • Room peers 13 and several user peers 14, the implementation principle of this interaction process is consistent with the implementation principle of each execution subject side described in Figures 2 to 4, so only the interaction process is briefly described, not Repeat:
  • the lead peer creates a communication room peer
  • the user peer joins the communication room peer
  • the pilot peer joins the communication room peer
  • the communication room peer sends the message to the leading peer
  • the lead peer sends data to other communication room peers.
  • whether new discovery peers, new pilot peers, or new communication room peers need to be created depends on the number of user peers who have established communication with the discovery peers, and whether they have joined The number of user peers in the communication room peers; the newly created leader peers and communication room peers establish communication with the discovery peers, so that the discovery peers can obtain the IP addresses of all the leading peers , Port, and IP address and port of all communication room peers.
  • FIG. 6 shows a structural block diagram of a discovery peer provided by this embodiment of the present invention. For convenience of explanation, only a part related to this embodiment is shown.
  • the discovery peer includes:
  • a first communication module 61 configured to establish communication with a communication room peer, and obtain a load of the communication room peer and an Internet protocol IP address and port of the communication room;
  • a first sending module 62 configured to establish communication with a lead peer, obtain an IP address and a port of the lead peer, and send the load of the communication room and the total number of user peers to the lead peer, So that the leading peer creates a required number of communication room peers according to the load of the communication room and the total number of the user peers;
  • the second sending module 63 is configured to establish communication with the user peer, and send the IP address and port of the communication room peer to the user peer, so that the user peer joins the corresponding communication room peer for communication .
  • FIG. 7 shows a structural block diagram of a lead peer provided by an embodiment of the present solution. For convenience of explanation, only a part related to this embodiment is shown.
  • the pilot peer includes:
  • a second communication module 71 configured to establish communication with one or more discovery peers
  • a first receiving module 72 configured to receive a load of a communication room peer sent by a discovery peer and a total number of user peers
  • a communication room creation module 73 is configured to create a required number of communication room peers according to the load and the total number of user peers participating in communication, so that the communication room peers establish communication with the discovery peers. And send the IP address and port of the communication room peer to the user peer, so that the user peer joins the corresponding communication room and the communication room peer participates in communication.
  • FIG. 8 shows a structural block diagram of a communication room peer provided by this embodiment of the present invention. For ease of description, only parts related to this embodiment are shown.
  • the communication room peer includes:
  • the third communication module 81 is configured to establish communication with the discovery peer, and send the load of the peer of each communication room to the discovery peer, so that the discovery peer will peer the load of the communication room with the user.
  • the total number of peers is sent to the pilot peers, so that the pilot peers create the required number of communication room peers based on the load and the total number of user peers;
  • the third sending module 82 is configured to send the address of the communication room peer corresponding to the user peer to the discovery peer, so that the discovery peer sends the address of the communication room peer to the user peer. So that the user peer joins the corresponding communication room peer;
  • the information sharing module 83 is configured to receive a message sent by a user peer joining a communication room peer and forward the message to other user peers and pilot peers joining the communication room peer.
  • This embodiment finds that a peer establishes communication with other peers, and obtains the IP address and port of the leading peer, the IP address and port of the communication room peer, and the IP address and port of the user peer.
  • the user peer provides the communication room information, so that the user peer joins the corresponding communication room; the user peer that joins the communication room peer can send data to the communication room peer, and the communication room peer will Data is sent to other user peers; or data is obtained from the communication room, enabling a user peer to communicate with thousands of other user peers, exchanging information, data, audio, video, etc.
  • the expansion of peers, pilot peers, and communication room peers can enable thousands of user peers to participate in point-to-point communication on the network; even users Peer work behind a firewall or router can direct P2P communication peer user.
  • FIG. 9 is a schematic diagram of a network communication system according to an embodiment of the solution.
  • the network communication system 9 of this embodiment includes a discovery peer, a leading peer, a communication room peer, a user peer, a processor 90, a memory 91, and stored in the memory 91. And a computer program 92 that can run on the processor 90.
  • the processor 90 executes the computer program 92, the steps in the embodiments of the foregoing network communication methods are implemented, for example, steps 101 to 104 shown in FIG.
  • the processor 90 executes the computer program 92, the functions of each module / unit in the foregoing device embodiments are implemented, for example, the functions of modules 61 to 64 shown in FIG. 6.
  • the computer program 92 may be divided into one or more modules / units, and the one or more modules / units are stored in the memory 91 and executed by the processor 90 to complete This program.
  • the one or more modules / units may be a series of computer program instruction segments capable of performing specific functions, and the instruction segments are used to describe the execution process of the computer program 92 in the network communication system 9.
  • the network communication system may include, but is not limited to, a processor 90 and a memory 91.
  • FIG. 9 is only an example of the network communication system, and does not constitute a limitation on the network communication system 9. It may include more or fewer components than shown in the figure, or combine some components, or different
  • the components, for example, the network communication system may further include an input-output device, a network access device, a bus, and the like.
  • the processor 90 may be a central processing unit (Central Processing Unit (CPU), or other general-purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (Application Specific Integrated Circuits) Specific Integrated Circuit (ASIC), off-the-shelf Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
  • CPU Central Processing Unit
  • DSP Digital Signal Processor
  • ASIC Application Specific Integrated Circuits
  • FPGA off-the-shelf Programmable Gate Array
  • a general-purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the memory 91 may be an internal storage unit of the network communication system 9, such as a hard disk or a memory of the network communication system 9.
  • the memory 91 may also be an external storage device of the network communication system 9, such as a plug-in hard disk, a smart media card (SMC), and a secure digital (Secure Digital, SD card, flash card Card) and so on.
  • the memory 91 may include both an internal storage unit of the network communication system 9 and an external storage device.
  • the memory 91 is configured to store the computer program and other programs and data required by the network communication system.
  • the memory 91 may also be used to temporarily store data that has been output or is to be output.
  • the disclosed apparatus / terminal device and method may be implemented in other ways.
  • the device / terminal device embodiments described above are only schematic.
  • the division of the modules or units is only a logical function division.
  • components can be combined or integrated into another system, or some features can be ignored or not implemented.
  • the displayed or discussed mutual coupling or direct coupling or communication connection may be indirect coupling or communication connection through some interfaces, devices or units, which may be electrical, mechanical or other forms.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the objective of the solution of this embodiment.
  • each functional unit in each embodiment of the solution may be integrated into one processing unit, or each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the above integrated unit may be implemented in the form of hardware or in the form of software functional unit.
  • the integrated module / unit When the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, this solution implements all or part of the processes in the method of the above embodiment, and can also be completed by a computer program instructing related hardware.
  • the computer program can be stored in a computer-readable storage medium. When the program is executed by a processor, the steps of the foregoing method embodiments can be implemented.
  • the computer program includes computer program code, and the computer program code may be in a source code form, an object code form, an executable file, or some intermediate form.
  • the computer-readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signals, telecommunication signals, and software distribution media.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • electric carrier signals telecommunication signals
  • software distribution media any entity or device capable of carrying the computer program code
  • a recording medium a U disk, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signals, telecommunication signals, and software distribution media.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer And Data Communications (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本方案适用于通信技术领域,提供了一种网络通信方法、对等体及***,所述方法包括:与通信房间对等体建立通信,并获取通信房间对等体的负载量和通信房间的互联网协议IP地址、端口;与先导对等体建立通信,获取先导对等体的IP地址和端口,将所述通信房间的负载量和用户对等体的总数量发送至先导对等体,以使得先导对等体根据所述通信房间负载量和所述用户对等体的总数量,创建所需数量的通信房间对等体;与用户对等体建立通信,将通信房间对等体的IP地址和端口发送至用户对等体,以使得用户对等体加入对应的通信房间对等体进行通信。通过本方案避免了使用造价昂贵的客户端/服务器架构,满足了多个用户对等方的同时参与通信。

Description

一种网络通信方法、对等体及*** 技术领域
本方案属于通信技术领域,尤其涉及一种网络通信方法、对等体及***。
背景技术
目前,许多大型企业设立了云计算和云服务平台,可以提供支持软件或硬件运行的基础架构与技术,使得应用者可以通过云平台获取计算、信息传输等的服务与技术。现有技术中,一方面,提供云计算和云服务的基础架构基本都被固定的大型企业所垄断,阻碍了技术的发展;另一方面,在不基于一些大型企业的基础架构进行网络通信时,一般只能局限于两个互联网协议IP地址的连接与通信,若要支持更多的用户通信,则需要对服务器进行扩展,而创建这样的服务器造价又非常昂贵,而且无法实现与防火墙或路由器之后的IP地址的连接与通信。
技术问题
有鉴于此,本方案实施例提供了一种网络通信方法对等体及***,以解决现有技术中服务器创建造价昂贵以及无法与防火墙或路由器之后的IP地址连接与通信的问题。
技术解决方案
本方案实施例的第一方面提供了一种网络通信方法,应用于对等网络通信***,所述对等网络通信***包括一个或多个发现对等体、一个或多个先导对等体、一个或多个通信房间对等体以及至少两个用户对等体;
其中,所述发现对等体用于发现其他对等体的互联网协议IP地址和端口,所述先导对等体用于创建通信房间对等体以及共享通信房间对等体内的消息,所述通信房间对等体用于暂存通信数据;所述用户对等体用于加入通信房间参与通信;
所述网络通信方法包括:
与通信房间对等体建立通信,并获取通信房间对等体的负载量和通信房间的互联网协议IP地址、端口;
与先导对等体建立通信,获取先导对等体的IP地址和端口,将所述通信房间的负载量和用户对等体的总数量发送至先导对等体,以使得先导对等体根据所述通信房间负载量和所述用户对等体的总数量,创建所需数量的通信房间对等体;
与用户对等体建立通信,将通信房间对等体的IP地址和端口发送至用户对等体,以使得用户对等体加入对应的通信房间对等体进行通信。
本方案实施例的第二方面提供了一种网络通信方法,应用于对等网络通信***,包括:
与一个或多个发现对等体建立通信;
接收发现对等体发送的通信房间对等体的负载量和用户对等体的总数量;
根据所述负载量以及参与通信的用户对等体的总数量,创建所需数量的通信房间对等体,以使得通信房间对等体与发现对等体建立通信,并将通信房间对等体的IP地址和端口发送至用户对等体,使得用户对等体加入对应的通信房间与通信房间对等体参与通信。
本方案实施例的第三方面提供了一种网络通信方法,应用于对等网络通信***,包括:
与发现对等体建立通信,将每个通信房间对等体的负载量发送至发现对等体,以使得发现对等体将通信房间的负载量和用户对等体的总数量发送至先导对等体,以使得先导对等体根据负载量和用户对等体总数量,创建所需数量的通信房间对等体;
将与用户对等体对应的通信房间对等体的地址发送至发现对等体,以使得发现对等体将通信房间对等体的地址发送至用户对等体,使得用户对等体加入对应的通信房间对等体;
接收加入通信房间对等体的用户对等体发送的消息,并将消息转发至加入通信房间对等体的其它用户对等体和先导对等体。
本方案实施例的第四方面提供了一种发现对等体,包括:
第一通信模块,用于与通信房间对等体建立通信,并获取通信房间对等体的负载量和通信房间的互联网协议IP地址、端口;
第一发送模块,用于与先导对等体建立通信,获取先导对等体的IP地址和端口,将所述通信房间的负载量和用户对等体的总数量发送至先导对等体,以使得先导对等体根据所述通信房间负载量和所述用户对等体的总数量,创建所需数量的通信房间对等体;
第二发送模块,用于与用户对等体建立通信,将通信房间对等体的IP地址和端口发送至用户对等体,以使得用户对等体加入对应的通信房间对等体进行通信。
本方案实施例的第五方面提供了一种先导对等体,包括:
第二通信模块,用于与一个或多个发现对等体建立通信;
第一接收模块,用于接收发现对等体发送的通信房间对等体的负载量和用户对等体的总数量;
通信房间创建模块,用于根据所述负载量以及参与通信的用户对等体的总数量,创建所需数量的通信房间对等体,以使得通信房间对等体与发现对等体建立通信,并将通信房间对等体的IP地址和端口发送至用户对等体,使得用户对等体加入对应的通信房间与通信房间对等体参与通信。
本方案实施例的第六方面提供了一种通信房间对等体,包括:
第三通信模块,用于与发现对等体建立通信,将每个通信房间对等体的负载量发送至发现对等体,以使得发现对等体将通信房间的负载量和用户对等体的总数量发送至先导对等体,以使得先导对等体根据负载量和用户对等体总数量,创建所需数量的通信房间对等体;
第三发送模块,用于将与用户对等体对应的通信房间对等体的地址发送至发现对等体,以使得发现对等体将通信房间对等体的地址发送至用户对等体,使得用户对等体加入对应的通信房间对等体;
信息共享模块,用于接收加入通信房间对等体的用户对等体发送的消息,并将消息转发至加入通信房间对等体的其它用户对等体和先导对等体。
本方案实施例的第七方面提供了一种网络通信***,包括:发现对等体、先导对等体、通信房间对等体、用户对等体、存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述网络通信方法的步骤。
本方案实施例的第八方面提供了一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,所述计算机程序被处理器执行时实现上述网络通信方法的步骤。
有益效果
本方案实施例提供的技术方案带来的有益效果是:本方案实施例基于对等网络通信,通过与先导对等体、通信房间对等体以及用户对等体建立通信,获取通信房间对等体的负载量,使得先导对等体根据负载量和用户对等体的数量,创建需要数量的通信房间对等体,并通信房间对等体的地址信息发送至用户对等体,使得用户对等体加入对应的通信房间对等体,可以使大量的用户对等体加入通信房间对等体,参与网络通信以及数据的共享和传输;实现了网络通信的去中心化,克服了传统中需要花费巨额费用创建服务器的弊端;解决了在没有中心服务器的情况下,每个用户对等体同时与大量的其它用户对等体进行通信的问题;为实现大量用户同时通信提供了基础架构与服务,满足了多个用户对等方的同时参与通信的要求,具有较强的易用性与实用性。
附图说明
为了更清楚地说明本方案实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本方案的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。
图1是本方案实施例提供的网络通信方法所适用的***场景示意图;
图2是本方案实施例提供的网络通信方法发现对等体的实现流程示意图;
图3是本方案实施例提供的网络通信方法先导对等体的实现流程示意图;
图4是本方案实施例提供的网络通信方法通信房间对等体的实现流程示意图;
图5是本方案实施例提供的网络通信方法的交互流程图;
图6是本方案实施例提供的发现对等体的结构框图;
图7是本方案实施例提供的先导对等体的结构框图;
图8是本方案实施例提供的通信房间对等体的结构框图;
图9是本方案实施例提供的网络通信***的示意图。
本发明的实施方式
以下描述中,为了说明而不是为了限定,提出了诸如特定***结构、技术之类的具体细节,以便透彻理解本方案实施例。然而,本领域的技术人员应当清楚,在没有这些具体细节的其它实施例中也可以实现本方案。在其它情况中,省略对众所周知的***、装置、电路以及方法的详细说明,以免不必要的细节妨碍本方案的描述。
应当理解,当在本说明书和所附权利要求书中使用时,术语“包括”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。
还应当理解,在此本方案说明书中所使用的术语仅仅是出于描述特定实施例的目的而并不意在限制本方案。如在本方案说明书和所附权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。
还应当进一步理解,在本方案说明书和所附权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。
为了说明本方案所述的技术方案,下面通过具体实施例来进行说明。
本方案实施例通过发现对等体与先导对等体、通信房间对等体、用户对等体建立通信,以发现先导对等体、通信房间对等体、用户对等体的IP地址和端口,并接收用户对等体发送的通信触发指令,将与通信触发指令对应的通信房间信息与通信方式信息发送至用户对等体,使得所有用户对等体可以加入对应的通信房间,并通过对应的通行方式实现用户对等体之间的直接通信。从而用户对等体之间不需要知道彼此的IP地址和端口也可以建立点对点之间的直接通信。
图1示出了本方案实施例提供的网络通信方法所适用的***场景示意图,为了便于说明,仅示出了与本实施例相关的部分。
参照图1,该***至少包括一个发现对等体11、至少一个先导对等体12、至少一个通信房间对等体13和若干个用户对等体14,其中用户对等体14可以为电脑、平板或手机等具有联网功能的任一实体。发现对等体11、先导对等体12和通信房间对等体13为用户对等体14提供网络通信的基础架构;在上述***场景下,即使用户对等体14位于防火墙或路由器之后,通过设置的发现对等体11、先导对等体12和通信房间对等体13也可以实现用户对等体点对点的直接通信,并且可以对发现对等体11、先导对等体12、通信房间对等体13进行扩展,从而可以支持大量的用户对等体同时参与通信。
下面对图1所述的***场景下的网络通信方法进行详细阐述:
图2示出了本方案实施例提供的网络通信方法的实现流程,该方法应用于对等网络通信***,所述的对等网络通信***包括一个或多个发现对等体、一个或多个先导对等体、一个或多个通信房间对等体以及一个或多个用户对等体;
其中,所述发现对等体用于发现其他对等体的互联网协议IP地址和端口,所述先导对等体用于创建通信房间对等体以及共享通信房间对等体内的数据,所述通信房间对等体用于暂存和传输通信数据;所述用户对等体用于加入通信房间参与通信。
在本实施例中,该流程的执行主体为图1所示的发现对等体11,详述如下:
在步骤S201中,与通信房间对等体建立通信,并获取通信房间对等体的负载量和通信房间的互联网协议IP地址、端口。
在本实施例中,发现对等体可以是一个实体计算机PC,也可以是一个虚拟PC端;实体PC可以包括可以执行软件过程的或与软件过程具有相同功能的电子电路,或者集成电路IC。
每个发现对等体具有一个全球IP地址,可以被位于任何地点的其它对等体查看并与该发现对等体建立通信;其它对等体在与发现对等体建立通信后,即使其他对等体工作在防火墙或路由器之后,发现对等体通过会话传输协议STUN/TURN也可以发现每个加入网络并建立通信连接的对等体的IP地址和端口,包括先导对等体的IP地址和端口、通信房间对等体的IP地址和端口以及用户对等体的IP地址和端口。
发现对等体和通信房间对等体建立通信,可以获取当前通信房间的负载量,所述负载量为当前已经加入到通信房间的用户对等体的数量,数量可以是零,也可以是一千或一万,具体根据通信房间可以承载的消息量决定最多可以加入的用户对等体的数量。
在只有一个发现对等体和一个通信房间对等体建立通信,则由发现对等体获取通信房间对等体的IP地址和端口,并将IP地址和端口发送至用户对等体,使用户对等体加入通信房间对等体。若有多个发现对等体,每个发现对等体可以对应一个具体的应用,例如第一个发现对等体可以是管理用于聊天的应用程序,并与具有聊天功能的用户对等体或应用程序进行建立通信,使具有聊天功能的用户对等体或应用程序加入对应的通信房间;第二发现对等体可以是管理用于发布广告的应用程序,并与需要具有发布广告功能的用户对等体或应用程序建立通信,使得具有发布广告功能的用户对等体或应用程序加入对应的通信房间。
需要说明的是,发现对等体可以是一个具有全球互联网协议IP地址的虚拟机或PC。
进一步的,所述与通信房间对等体建立通信,并获取通信房间对等体的负载量和通信房间的互联网协议IP地址、端口,包括:
根据通信房间对等体的IP地址和端口,将加入每个通信房间对等体的用户对等体的类别发送至其他通信房间对等体。
在本实施例中,若存在多个通信房间对等体,则加入每个通信房间对等体的用户对等体的类别通过已知的每个通信房间对等体的IP地址和端口共享至每个通信房间对等体,以便不同通信房间对等体中的用户对等体之间可以实现通信,以及使得用户对等体加入合适的通信房间对等体。
步骤S202,与先导对等体建立通信,获取先导对等体的IP地址和端口,将所述通信房间的负载量和用户对等体的总数量发送至先导对等体,以使得先导对等体根据所述通信房间负载量和所述用户对等体的总数量,创建所需数量的通信房间对等体。
在本实施例中,所述的先导对等体为创建通信房间的对等体,并监控所有的通信房间运行流程;所述负载量为已加入到通信房间对等体的数量,所述用户对等体的总数量为与发现对等体建立通信的所有用户对等体的数量;发现对等体与先导对等体建立通信,获取先导对等体的IP地址和端口,将通信房间对等体的负载量发送至先导对等体;即使先导对等体工作在防火墙或路由器之后,发现对等体也可以获取先导对等体的IP地址和端口;由于每个通信房间对等体可以承载的消息量是有限的,在当前的通信房间对等体无法承载当前的消息量是,则先导对等体根据负载量和用户对等体的总数量创建更多所需的通信房间对等体。
进一步的,所述与先导对等体建立通信,并将所述通信房间的负载量和用户对等体的总数量发送至先导对等体,以使得先导对等体根据所述通信房间负载量和所述用户对等体的总数量,创建所需数量的通信房间对等体,包括:
接收先导对等体发送的创建的通信房间对等体的数量。
在本实施例中,先导对等体创建新的通信房间对等体后,将创建的通信房间对等体的数量发送至发现对等体,以便与发现对等体建立通信的用户对等体可以加入对应的通信房间对等体。
步骤S203,与用户对等体建立通信,将通信房间对等体的IP地址和端口发送至用户对等体,以使得用户对等体加入对应的通信房间对等体进行通信。
在本实施例中,用户对等体在加入通信房间之前,首先需要与发现对等体建立通信,发现对等体获取用户对等体的IP地址和端口,将通信房间对等体的IP地址和端口发送至用户对等体,使得用户对等体可以加入对应的通信房间。所述的用户对等体可以是计算机、手机或嵌入式电子设备中的一种或多种。
其中,若参与通信的用户对等体超过当前通信房间对等体的负载量,则发现对等体获取由先导对等体创建的新的通信房间对等体的IP地址和端口,并将新的通信房间对等体的IP地址和端口发送至用户对等体,使得用户对等体加入合适的通信房间。
参与通信的用户对等体属于为特定的目标和目的地设定和实施的应用程序,因此根据每个用户对等体的通信目标以及通信目的地,用户对等体可以与不同的发现对等体建立通信;或者用户对等体通过查询全球数据库,并根据目标和目的地,选择对应的发现对等体建立通信。
在本实施例中,发现对等体与用户对等体建立通信并获取用户对等体的IP地址和端口,将用户对等体的IP地址和端口发送至通信房间对等体,使得每个加入通信房间对等体的用户对等体可以向其他加入通信房间对等体的对等体发送或多播消息数据;每个加入通信房间对等体的用户对等体也可以将消息或数据发送至通信房间对等体,通过通信房间对等体发送至其他用户对等体。
进一步的,所述与用户对等体建立通信,将通信房间对等体的IP地址和端口发送至用户对等体,以使得用户对等体加入对应的通信房间对等体进行通信,包括:
若建立连接的用户对等体数量超过当前发现对等体的负载量,则创建新的发现对等体,新的发现对等体与用户对等体建立通信。
在本实施例中,每个发现对等体可以承载的消息量也是有限的,每个发现对等体每秒最多可以处理十万条消息,同时处理与其他对等体之间的消息的传输;若更多用户需要参与通信,可以对发现对等体不断扩展,新创建的发现对等体继续与需要通信的用户对等体建立通信连接,并以相同的方式处理参与通信的用户对等体。
需要说明的是,新的发现对等体的创建是通过第一个发现对等体中运行的负载平衡软件实现的。
本实施例通过发现对等体与其他对等体建立通信,并获取先导对等体的IP地址和端口、通信房间对等体的IP地址和端口、用户对等体的IP地址和端口,为用户对等体提供通信房间信息,使得用户对等体加入对应的通信房间;使加入通信房间对等体的用户对等体可以向通信房间对等体发送数据,并通过通信房间对等体将数据发送至其他用户对等体;或者从通信房间获取数据,实现一个用户对等体与数以千计的其它用户对等体进行通信,交换信息、数据、音频、视频等。
图3示出了本方案实施例提供的网络通信方法的实现流程,在本实施例中,流程的执行主体为图1中的其中一个先导对等体12,详述如下:
步骤S301,与一个或多个发现对等体建立通信。
在本实施例中,先导对等体用于创建通信房间,每个先导对等体可以是包括软件过程的计算机,或者是可以执行与软件过程类似的功能的电子电路或集成电路。
每个先导对等体每秒可以处理十万条消息,若处理一条消息来代表参与网络通信的一个新用户,则每个先导对等体每秒可以处理十万个对等体加入网络;先导对等体为参与通信的用户创建通信房间,并确保所创建的通信房间可以一直有参与通信的用户对等体加入;若需要处理一百万用户参与通信,则需要采用十个先导对等体,通过相同的方式处理参与通信的对等体,具体需要先导对等体的数量根据与发现对等体建立通信的用户对等体的数量以及先导对等体可承载的消息量决定。
每个先导对等体可以同时与多个发现对等体建立通信,从而可以获取不同发现对等体发送的不同通信房间的负载量的信息,监控每个通信房间对等体加入用户对等体的情况,并将发现对等体发送的所有通信房间对等体加入用户对等体的情况同步至所有通信房间对等体。
步骤S302,接收发现对等体发送的通信房间对等体的负载量和用户对等体的总数量。
在本实施例中,所述通信房间对等体的负载量为加入每个通信房间对等体的用户对等体的数量;发现对等体与通信房间对等体建立通信,可以获取每个通信房间对等体中加入用户对等体的数量,每个通信房间对等体的负载量可以是零,可以是一千或者一万等,根据通信房间对等体的负载量可以得知通信房间对等体是否可以继续加入用户对等体。
另外,先导对等体除了监控通信房间对等体的负载量,还可以跟踪用户对等体离开通信房间对等体的信息。
需要说明的是,若先导对等体因其他原因消失,则***会自动检测并通过相应的软件进程自动运行重新生成先导对等体,从而保证先导对等体一直存在。
步骤S303,根据所述负载量以及参与通信的用户对等体的数量,创建所需数量的通信房间对等体,以使得通信房间对等体与发现对等体建立通信,并将通信房间对等体的IP地址和端口发送至用户对等体,使得用户对等体加入对应的通信房间与通信房间对等体参与通信。
在本实施例中,所述负载量为加入每个通信房间对等体的用户对等体的数量,用户对等体的总数量为与发现对等体建立通信连接的用户对等体的数量;在当前通信房间对等体的负载量的基础上,若当前参与通信的用户对等体的数量在当前通信房间对等体的限制内,则不创建新的通信房间对等体,若当前参与通信的用户对等体的数量超出了当前通信房间对等体的限制,则先导对等体根据当前参与通信的用户对等体数量创建新的通信房间对等体;新的通信房间对等体与发现对等体建立通信,发现对等体将通信房间对等体的IP地址和端口发送至参与通信的用户对等体,使得用户对等体加入通信房间,实现点对点的网络通信。
在本实施例中,发现对等体与每个通信房间对等体建立通信,获取通信房间对等体的负载量以及所有通信房间对等体的IP地址和端口,并将负载量以及IP地址和端口发送至先导对等体,先导对等体将IP地址和端口发送至用户对等体,使得用户对等体将加入对应的通信房间对等体。
进一步的,所述根据所述负载量以及参与通信的用户对等体的总数量,创建所需数量的通信房间对等体,以使得通信房间对等体与发现对等体建立通信,并将通信房间对等体的IP地址和端口发送至用户对等体,使得用户对等体加入对应的通信房间与通信房间对等体参与通信,包括:
将创建的通信房间对等体的数量发送至发现对等体,以使得与发现对等体建立通信的用户对等体加入对应的通信房间对等体。
进一步的,所述根据所述负载量以及参与通信的用户对等体的总数量,创建所需数量的通信房间对等体,以使得通信房间对等体与发现对等体建立通信,并将通信房间对等体的IP地址和端口发送至用户对等体,使得用户对等体加入对应的通信房间与通信房间对等体参与通信,还包括:
先导对等体在创建通信房间对等体的同时,加入所创建的通信房间对等体;
接收加入通信房间对等体的用户对等体发送的消息,并将消息转发至其它通信房间对等体。
在本实施例中,先导对等体加入每个通信房间对等体,可以接收通信房间对等体发送的数据,并将数据转发至其他通信房间对等体,以使得其他通信房间内的用户对等体也可以接收该消息;从而通过先导对等体保持通信房间对等体之间数据的同步与共享;由于先导对等体加载和处理消息更加便捷,由先导对等体代替通信房间对等体在每一个通信房间对等体中同步任一个用户对等体发送至对应通信房间的任何消息。
进一步的,所述通信方法还包括:若当前先导对等体处理通信房间消息量超过先导对等体的负载量,则创建新的先导对等体,以使得新的先导对等体创建更多通信房间对等体和处理通信房间对等体的消息。
在本实施例中,每个先导对等体处理信息的承载量是有限的,当处理的消息量超过当前先导对等体的处理量时,则需要创建新的先导对等体,新的先导对等体以同样的方式与发现对等体建立通信连接、根据负载量创建新的通信房间对等体以及将共享通信房间对等体之间的数据等。
每个先导对等体可以创建不同应用类型的通信房间对等体,比如同一个先导对等体可以创建用于发布广告的通信房间对等体、用于查找广告的通信房间对等体以及用于聊天的通信房间对等体等;也可以针对不同的应用类别,通过与不同的应用对应的先导对等体,创建与不同应用对应的通信房间对等体。
本实施例通过先导对等体根据参与通信的用户对等体的数量以及当前通信房间对等体的负载量判断是否需要创建新的通信房间对等体,从而可以支持更多的用户对等体加入通信房间参与点对点的网络通信。同时,也可以采用更多的先导对等体,创造更多的通信房间对等体,满足更多的用户对等体实现点对点网络通信。
图4示出了本方案实施例提供的网络通信方法的实现流程,在本实施例中,流程的执行主体为图1中的通信房间对等体13,由于本实施例与本方案实施例图1和图2所示的相关步骤原理相一致,在此不再对其相关实现原理进行重复阐述:
步骤S401,与发现对等体建立通信,将每个通信房间对等体的负载量发送至发现对等体,以使得发现对等体将通信房间的负载量和用户对等体的总数量发送至先导对等体,以使得先导对等体根据负载量和用户对等体总数量,创建所需数量的通信房间对等体。
在本实施例中,通信房间对等体为包括软件过程的计算机,或者具有与软件过程相同功能的电子电路或者集成电路。
每个通信房间对等体与发现对等体建立通信连接,发现对等体获取每个通信房间对等体加入用户对等体的数量信息,并根据用户对等体的总数量,创建所需数量的通信房间对等体,以使得用户对等体加入对应的通信房间参与通信。
进一步的,所述将与用户对等体对应的通信房间信息发送至发现对等体,以使得发现对等体将通信房间信息发送至用户对等体,使得用户对等体加入对应的通信房间对等体,包括:
将加入每个通信房间对等体的用户对等体的类别发送至发现对等体,以使得发现对等体将每个通信房间对等体的用户对等体的类别发送至其他通信房间对等体,以便用户对等体根据发现对等体的通知可以加入合适的通信房间对等体。
步骤S402,将与用户对等体对应的通信房间对等体的地址发送至发现对等体,以使得发现对等体将通信房间对等体的地址发送至用户对等体,使得用户对等体加入对应的通信房间对等体。
在本实施例中,所述与用户对等体对应的通信房间对等体的地址包括通信房间的IP地址和端口;所有的通信房间对等体与发现对等体建立通信,发现对等体可以获取所有通信房间对等体中加入的用户对等体的类别信息,并可以根据用户对等体的目标以及目的地将与用户对等体对应的通信房间信息发送至用户对等体,使得用户对等体加入合适的通信房间对等体,实现点对点的网络通信。所述的通信房间对等体根据用户对等体不同的需求可以分为多个应用类别的通信房间对等体;比如:用于发布广告的通信房间对等体,可以支持需要发布广告的用户对等体加入通信房间对等体进行广告的发布;用于找广告的通信房间对等体,可以支持查找广告的用户对等体加入通信房间对等体,用户对等体可以根据自身需要进行广告内容的查找;还有用于聊天的通信房间对等体,可以支持需要进行聊天的用户对等体加入;即通信房间对等体可以根据不同需求设置为不同类型的应用程序,以满足用户对等体的通信需求。
其中,每个通信房间对等体可以支持一万个至十万个消息量的载入服务,并且可以根据参与通信的用户对等体数量以及需求的增长,可以通过先导对等体创建更多的通信房间对等体,使多个通信房间对等体为所有使用对等网络进行通信的用户对等体提供基础架构。
进一步的,所述将与用户对等体对应的通信房间信息发送至发现对等体,以使得发现对等体将通信房间信息发送至用户对等体,使得用户对等体加入对应的通信房间对等体,包括:
将加入每个通信房间对等体的用户对等体的类别发送至发现对等体,以使得发现对等体将每个通信房间对等体的用户对等体的类别发送至其他通信房间对等体。
步骤S403,接收发现对等体发送的用户对等体的IP地址和端口,并向用户对等体发送数据。
在本实施例中,发现对等体将用户对等体的IP地址和端口发送至通信房间对等体,通信房间对等体可以对加入通信房间对等体的所有用户对等体发送、应答或多播数据。通信房间对等体还可以接收用户对等体发送的数据并将数据转发至其它用户对等体。
另外,若通信房间对等体中的数据或消息不适用于加入该通信房间的任何一个用户对等体,则在该消息的有效载荷内,该消息内可以包含提及适合该消息的用户对等体信息,并且在适合该消息的用户对等体接收到该信息,将确定该消息是针对自身发送的消息。
在用户对等体加入通信房间对等体的时间与通信房间内暂存的数据和消息不同步时,通信房间对等体内暂存的数据和消息将作为历史数据存储,并当用户对等体重新加入通信房间对等体的时,重新获取历史数据和消息,从而避免由于互联网的断开或临时出错而错过接收数据和消息。当消息和或数据中嵌入了只有预定的用户对等体才能解密并理解的信息,加入通信房间对等体的的预定的用户对等体才会获取该消息或数据,而其他加入房间的用户对等体则不会获取该消息或数据。
进一步的,所述接收加入通信房间的用户对等体发送的消息,并将消息转发至加入通信房间对等体的其它用户对等体和先导对等体,包括:
当前通信房间对等体接收先导对等体发送的其它通信房间对等体的消息,并将消息发送至加入当前通信房间对等体用户对等体,从而通过先导对等体实现通信房间对等体之间的数据共享,所述消息包括音频、视频以及任何形式的数字数据。
所述网络通信方法还包括:为后续加入通信房间对等体的用户对等体提供历史消息和数据。
在本实施例中,有些用户对等体在断开互联网连接的情况下,错过其它用户对等体加入房间后发送的消息和数据,网络断开的用户对等体可以随时恢复网络连接并加入到对应的通信房间对等体,通信房间对等体中存储的历史数据和消息将发送至后来加入通信房间对等体的所有用户对等体,以确保即使用户对等体断开互联网,也不会错过或丢失任何消息和数据。
本方案实施例通过通信房间对等体的创建,确保了有足够的存储空间来容纳正在加入通信房间对等体的的多个用户对等体的消息或数据,为用户对等体提供交换数据或消息的基础方式和基础架构。
需要说明的是,本领域技术人员在本方案揭露的技术范围内,可容易想到的其他排序方案也应在本方案的保护范围之内,在此不一一赘述。
应理解,上述实施例中各步骤的序号的大小并不意味着执行顺序的先后,各过程的执行顺序应以其功能和内在逻辑确定,而不应对本方案实施例的实施过程构成任何限定。
图5示出了本方案实施例提供的网络通信方法的交互流程图,参与该交互流程的执行主体包括图1中的至少一个发现对等体11,至少一个先导对等体12,至少一个通信房间对等体13以及若干个用户对等体14,该交互流程的实现原理与图2至图4所述的每个执行主体侧的实现原理相一致,因此仅简要的描述该交互流程,不赘述:
1、先导对等体创建通信房间对等体;
2、发现对等体获取通信房间对等体的IP地址和端口;
3、将通信房间对等体的IP地址和端口发送至用户对等体;
4、用户对等体加入通信房间对等体;
5、先导对等体加入通信房间对等体;
6、通信房间对等体接收用户对等体发送的消息或发送消息至用户对等体
7、通信房间对等体将消息发送至先导对等体;
8、先导对等体将数据发送至其他通信房间对等体。
在本实施例中,是否需要创建新的发现对等体、新的先导对等体、新的通信房间对等体,取决于与发现对等体建立通信的用户对等体的数量以及已加入通信房间对等体的用户对等体的数量;新创建的先导对等体和通信房间对等体均与发现对等体建立通信,从而发现对等体可以获取所有先导对等体的IP地址、端口以及所有通信房间对等体的IP地址和端口。
图6示出了本方案实施例提供的发现对等体的结构框图,为了便于说明,仅示出了与本实施例相关的部分。
参照图6,该发现对等体包括:
第一通信模块61,用于用于与通信房间对等体建立通信,并获取通信房间对等体的负载量和通信房间的互联网协议IP地址、端口;
第一发送模块62,用于与先导对等体建立通信,获取先导对等体的IP地址和端口,将所述通信房间的负载量和用户对等体的总数量发送至先导对等体,以使得先导对等体根据所述通信房间负载量和所述用户对等体的总数量,创建所需数量的通信房间对等体;
第二发送模块63,用于与用户对等体建立通信,将通信房间对等体的IP地址和端口发送至用户对等体,以使得用户对等体加入对应的通信房间对等体进行通信。
图7示出了本方案实施例提供的先导对等体的结构框图,为了便于说明,仅示出了与本实施例相关的部分。
参照图7,该先导对等体包括:
第二通信模块71,用于与一个或多个发现对等体建立通信;
第一接收模块72,用于接收发现对等体发送的通信房间对等体的负载量和用户对等体的总数量;
通信房间创建模块73,用于根据所述负载量以及参与通信的用户对等体的总数量,创建所需数量的通信房间对等体,以使得通信房间对等体与发现对等体建立通信,并将通信房间对等体的IP地址和端口发送至用户对等体,使得用户对等体加入对应的通信房间与通信房间对等体参与通信。
图8示出了本方案实施例提供的通信房间对等体的结构框图,为了便于说明,仅示出了与本实施例相关的部分。
参照图8,该通信房间对等体包括:
第三通信模块81,用于与发现对等体建立通信,将每个通信房间对等体的负载量发送至发现对等体,以使得发现对等体将通信房间的负载量和用户对等体的总数量发送至先导对等体,以使得先导对等体根据负载量和用户对等体总数量,创建所需数量的通信房间对等体;
第三发送模块82,用于将与用户对等体对应的通信房间对等体的地址发送至发现对等体,以使得发现对等体将通信房间对等体的地址发送至用户对等体,使得用户对等体加入对应的通信房间对等体;
信息共享模块83,用于接收加入通信房间对等体的用户对等体发送的消息,并将消息转发至加入通信房间对等体的其它用户对等体和先导对等体。
本实施例通过发现对等体与其他对等体建立通信,并获取先导对等体的IP地址和端口、通信房间对等体的IP地址和端口、用户对等体的IP地址和端口,为用户对等体提供通信房间信息,使得用户对等体加入对应的通信房间;使加入通信房间对等体的用户对等体可以向通信房间对等体发送数据,并通过通信房间对等体将数据发送至其他用户对等体;或者从通信房间获取数据,实现一个用户对等体与数以千计的其它用户对等体进行通信,交换信息、数据、音频、视频等,避免了当较多数量的用户对等体通信时需要创建比较昂贵的服务器,基于发现对等体、先导对等体、通信房间对等体为用户对等体提供的网络通信的基础架构,并通过对发现对等体、先导对等体以及通信房间对等体的扩展,可以实现成千上万的用户对等体参与网络点对点的通信;即使用户对等体工作在防火墙或路由器之后也能实现用户对等体直接的点对点通信。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述移动终端的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能模块的具体名称也只是为了便于相互区分,并不用于限制本申请的保护范围。上述移动终端中模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
图9是本方案一实施例提供的网络通信***的示意图。如图9所示,该实施例的网络通信***9包括:发现对等体、先导对等体、通信房间对等体、用户对等体、处理器90、存储器91以及存储在所述存储器91中并可在所述处理器90上运行的计算机程序92。所述处理器90执行所述计算机程序92时实现上述各个网络通信方法实施例中的步骤,例如图1所示的步骤101至104。或者,所述处理器90执行所述计算机程序92时实现上述各装置实施例中各模块/单元的功能,例如图6所示模块61至64的功能。
示例性的,所述计算机程序92可以被分割成一个或多个模块/单元,所述一个或者多个模块/单元被存储在所述存储器91中,并由所述处理器90执行,以完成本方案。所述一个或多个模块/单元可以是能够完成特定功能的一系列计算机程序指令段,该指令段用于描述所述计算机程序92在所述网络通信***9中的执行过程。
所述网络通信***可包括,但不仅限于,处理器90、存储器91。本领域技术人员可以理解,图9仅仅是网络通信***的示例,并不构成对网络通信***9的限定,可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件,例如所述网络通信***还可以包括输入输出设备、网络接入设备、总线等。
所称处理器90可以是中央处理单元(Central Processing Unit,CPU),还可以是其他通用处理器、数字信号处理器 (Digital Signal Processor,DSP)、专用集成电路 (Application Specific Integrated Circuit,ASIC)、现成可编程门阵列 (Field-Programmable Gate Array,FPGA) 或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件等。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
所述存储器91可以是所述网络通信***9的内部存储单元,例如网络通信***9的硬盘或内存。所述存储器91也可以是所述网络通信***9的外部存储设备,例如所述网络通信***9上配备的插接式硬盘,智能存储卡(Smart Media Card, SMC),安全数字(Secure Digital, SD)卡,闪存卡(Flash Card)等。进一步地,所述存储器91还可以既包括所述网络通信***9的内部存储单元也包括外部存储设备。所述存储器91用于存储所述计算机程序以及所述网络通信***所需的其他程序和数据。所述存储器91还可以用于暂时地存储已经输出或者将要输出的数据。
所属领域的技术人员可以清楚地了解到,为了描述的方便和简洁,仅以上述各功能单元、模块的划分进行举例说明,实际应用中,可以根据需要而将上述功能分配由不同的功能单元、模块完成,即将所述装置的内部结构划分成不同的功能单元或模块,以完成以上描述的全部或者部分功能。实施例中的各功能单元、模块可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中,上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。另外,各功能单元、模块的具体名称也只是为了便于相互区分,并不用于限制本方案的保护范围。上述***中单元、模块的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述或记载的部分,可以参见其它实施例的相关描述。
本领域普通技术人员可以意识到,结合本文中所公开的实施例描述的各示例的单元及算法步骤,能够以电子硬件、或者计算机软件和电子硬件的结合来实现。这些功能究竟以硬件还是软件方式来执行,取决于技术方案的特定应用和设计约束条件。专业技术人员可以对每个特定的应用来使用不同方法来实现所描述的功能,但是这种实现不应认为超出本方案的范围。
在本方案所提供的实施例中,应该理解到,所揭露的装置/终端设备和方法,可以通过其它的方式实现。例如,以上所描述的装置/终端设备实施例仅仅是示意性的,例如,所述模块或单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个***,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通讯连接可以是通过一些接口,装置或单元的间接耦合或通讯连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本方案各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的模块/单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本方案实现上述实施例方法中的全部或部分流程,也可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一计算机可读存储介质中,该计算机程序在被处理器执行时,可实现上述各个方法实施例的步骤。其中,所述计算机程序包括计算机程序代码,所述计算机程序代码可以为源代码形式、对象代码形式、可执行文件或某些中间形式等。所述计算机可读介质可以包括:能够携带所述计算机程序代码的任何实体或装置、记录介质、U盘、移动硬盘、磁碟、光盘、计算机存储器、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、电载波信号、电信信号以及软件分发介质等。需要说明的是,所述计算机可读介质包含的内容可以根据司法管辖区内立法和专利实践的要求进行适当的增减,例如在某些司法管辖区,根据立法和专利实践,计算机可读介质不包括是电载波信号和电信信号。
以上所述实施例仅用以说明本方案的技术方案,而非对其限制;尽管参照前述实施例对本方案进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本方案各实施例技术方案的精神和范围,均应包含在本方案的保护范围之内。

Claims (16)

  1. 一种网络通信方法,其特征在于,应用于对等网络通信***,所述对等网络通信***包括一个或多个发现对等体、一个或多个先导对等体、一个或多个通信房间对等体以及至少两个个用户对等体;
    其中,所述发现对等体用于发现其他对等体的互联网协议IP地址和端口,所述先导对等体用于创建通信房间对等体以及共享通信房间对等体内的数据,所述通信房间对等体用于暂存和传输通信数据;所述用户对等体用于加入通信房间参与通信;
    所述网络通信方法包括:
    与通信房间对等体建立通信,并获取通信房间对等体的负载量和通信房间的互联网协议IP地址、端口;
    与先导对等体建立通信,获取先导对等体的IP地址和端口,将所述通信房间的负载量和用户对等体的总数量发送至先导对等体,以使得先导对等体根据所述通信房间负载量和所述用户对等体的总数量,创建所需数量的通信房间对等体;
    与用户对等体建立通信,将通信房间对等体的IP地址和端口发送至用户对等体,以使得用户对等体加入对应的通信房间对等体进行通信。
  2. 如权利要求1所述的网络通信方法,其特征在于,所述与通信房间对等体建立通信,并获取通信房间对等体的负载量和通信房间的互联网协议IP地址、端口,包括:
    根据通信房间对等体的IP地址和端口,将加入每个通信房间对等体的用户对等体的类别发送至其他通信房间对等体。
  3. 如权利要求2所述的网络通信方法,其特征在于,所述与先导对等体建立通信,并将所述通信房间的负载量和用户对等体的总数量发送至先导对等体,以使得先导对等体根据所述通信房间负载量和所述用户对等体的总数量,创建所需数量的通信房间对等体,包括:
    接收先导对等体发送的创建的通信房间对等体的数量。
  4. 如权利要求3所述的网络通信方法,其特征在于,所述与用户对等体建立通信,将通信房间对等体的IP地址和端口发送至用户对等体,以使得用户对等体加入对应的通信房间对等体进行通信,包括:
    若建立连接的用户对等体数量超过当前发现对等体的负载量,则创建信息的发现对等体,新的发现对等体与用户对等体建立通信。
  5. 一种网络通信方法,其特征在于,应用于对等网络通信***,包括:
    与一个或多个发现对等体建立通信;
    接收发现对等体发送的通信房间对等体的负载量和用户对等体的总数量;
    根据所述负载量以及参与通信的用户对等体的总数量,创建所需数量的通信房间对等体,以使得通信房间对等体与发现对等体建立通信,并将通信房间对等体的IP地址和端口发送至用户对等体,使得用户对等体加入对应的通信房间与通信房间对等体参与通信。
  6. 如权利要求5所述的网络通信方法,其特征在于,所述根据所述负载量以及参与通信的用户对等体的总数量,创建所需数量的通信房间对等体,以使得通信房间对等体与发现对等体建立通信,并将通信房间对等体的IP地址和端口发送至用户对等体,使得用户对等体加入对应的通信房间与通信房间对等体参与通信,包括:
    将创建的通信房间对等体的数量发送至发现对等体,以使得与发现对等体建立通信的用户对等体加入对应的通信房间对等体。
  7. 如权利要求5所述的网络通信方法,其特征在于,所述根据所述负载量以及参与通信的用户对等体的总数量,创建所需数量的通信房间对等体,以使得通信房间对等体与发现对等体建立通信,并将通信房间对等体的IP地址和端口发送至用户对等体,使得用户对等体加入对应的通信房间与通信房间对等体参与通信,还包括:
    先导对等体在创建通信房间对等体的同时,加入所创建的通信房间对等体;
    接收加入通信房间对等体的用户对等体发送的消息,并将消息转发至其它通信房间对等体。
  8. 如权利要求5所示的网络通信方法,其特征在于,所述方法还包括:
    若当前先导对等体处理通信房间消息量超过先导对等体的负载量,则创建新的先导对等体,以使得新的先导对等体创建更多通信房间对等体和处理通信房间对等体的消息。
  9. 一种网络通信方法,其特征在于,应用于对等网络通信***,包括:
    与发现对等体建立通信,将每个通信房间对等体的负载量发送至发现对等体,以使得发现对等体将通信房间的负载量和用户对等体的总数量发送至先导对等体,以使得先导对等体根据负载量和用户对等体总数量,创建所需数量的通信房间对等体;
    将与用户对等体对应的通信房间对等体的地址发送至发现对等体,以使得发现对等体将通信房间对等体的地址发送至用户对等体,使得用户对等体加入对应的通信房间对等体;
    接收加入通信房间对等体的用户对等体发送的消息,并将消息转发至加入通信房间对等体的其它用户对等体和先导对等体。
  10. 如权利要求9所述的网络通信方法,其特征在于,所述将与用户对等体对应的通信房间信息发送至发现对等体,以使得发现对等体将通信房间信息发送至用户对等体,使得用户对等体加入对应的通信房间对等体,包括:
    将加入每个通信房间对等体的用户对等体的类别发送至发现对等体,以使得发现对等体将每个通信房间对等体的用户对等体的类别发送至其他通信房间对等体。
  11. 如权利要求9所述的网络通信方法,其特征在于,所述接收加入通信房间的用户对等体发送的消息,并将消息转发至加入通信房间对等体的其它用户对等体和先导对等体,包括:
    当前通信房间对等体接收先导对等体发送的其它通信房间对等体的消息,并将消息发送至加入当前通信房间对等体用户对等体。
  12. 一种发现对等体,其特征在于,包括:
    第一通信模块,用于与通信房间对等体建立通信,并获取通信房间对等体的负载量和通信房间的互联网协议IP地址、端口;
    第一发送模块,用于与先导对等体建立通信,获取先导对等体的IP地址和端口,将所述通信房间的负载量和用户对等体的总数量发送至先导对等体,以使得先导对等体根据所述通信房间负载量和所述用户对等体的总数量,创建所需数量的通信房间对等体;
    第二发送模块,用于与用户对等体建立通信,将通信房间对等体的IP地址和端口发送至用户对等体,以使得用户对等体加入对应的通信房间对等体进行通信。
  13. 一种先导对等体,其特征在于,包括:
    第二通信模块,用于与一个或多个发现对等体建立通信;
    第一接收模块,用于接收发现对等体发送的通信房间对等体的负载量和用户对等体的总数量;
    通信房间创建模块,用于根据所述负载量以及参与通信的用户对等体的总数量,创建所需数量的通信房间对等体,以使得通信房间对等体与发现对等体建立通信,并将通信房间对等体的IP地址和端口发送至用户对等体,使得用户对等体加入对应的通信房间与通信房间对等体参与通信。
  14. 一种通信房间对等体,其特征在于,包括:
    第三通信模块,用于与发现对等体建立通信,将每个通信房间对等体的负载量发送至发现对等体,以使得发现对等体将通信房间的负载量和用户对等体的总数量发送至先导对等体,以使得先导对等体根据负载量和用户对等体总数量,创建所需数量的通信房间对等体;
    第三发送模块,用于将与用户对等体对应的通信房间对等体的地址发送至发现对等体,以使得发现对等体将通信房间对等体的地址发送至用户对等体,使得用户对等体加入对应的通信房间对等体;
    信息共享模块,用于接收加入通信房间对等体的用户对等体发送的消息,并将消息转发至加入通信房间对等体的其它用户对等体和先导对等体。
  15. 一种网络通信***,包括发现对等体、先导对等体、通信房间对等体、用户对等体、存储器、处理器以及存储在所述存储器中并可在所述处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现如权利要求1至11任一项所述方法的步骤。
  16. 一种计算机可读存储介质,所述计算机可读存储介质存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现如权利要求1至11任一项所述方法的步骤。
PCT/CN2018/090277 2018-06-07 2018-06-07 一种网络通信方法、对等体及*** WO2019232750A1 (zh)

Priority Applications (3)

Application Number Priority Date Filing Date Title
CN201880000644.7A CN110192382B (zh) 2018-06-07 2018-06-07 一种网络通信方法、对等体及***
PCT/CN2018/090277 WO2019232750A1 (zh) 2018-06-07 2018-06-07 一种网络通信方法、对等体及***
US16/027,722 US10686877B2 (en) 2018-06-07 2018-07-05 Network communication method, peers, and network communication system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2018/090277 WO2019232750A1 (zh) 2018-06-07 2018-06-07 一种网络通信方法、对等体及***

Related Child Applications (1)

Application Number Title Priority Date Filing Date
US16/027,722 Continuation-In-Part US10686877B2 (en) 2018-06-07 2018-07-05 Network communication method, peers, and network communication system

Publications (1)

Publication Number Publication Date
WO2019232750A1 true WO2019232750A1 (zh) 2019-12-12

Family

ID=67713862

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/090277 WO2019232750A1 (zh) 2018-06-07 2018-06-07 一种网络通信方法、对等体及***

Country Status (3)

Country Link
US (1) US10686877B2 (zh)
CN (1) CN110192382B (zh)
WO (1) WO2019232750A1 (zh)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112153108B (zh) * 2020-08-14 2021-10-08 中国科学院电子学研究所苏州研究院 一种面向微服务架构的消息传输***及其方法
US11757956B2 (en) 2021-11-26 2023-09-12 Tracy Kpemou Internet (over the top) worldwide public chat capabilities matched to specified (“URL”) streaming content and non specified (“prenamed and hardcoded”) streaming content rooms

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101313292A (zh) * 2005-05-12 2008-11-26 国际商业机器公司 对等数据传送指挥协调
US20100250589A1 (en) * 2009-03-26 2010-09-30 Grasstell Networks Llc Tree structured P2P overlay database system
CN101855889A (zh) * 2007-11-09 2010-10-06 诺基亚公司 在p2p网络中提供数据管理的方法、装置和计算机程序产品
CN103166860A (zh) * 2011-12-19 2013-06-19 中兴通讯股份有限公司 一种p2p叠加网络数据迁移的方法和装置
WO2015018427A1 (en) * 2013-08-05 2015-02-12 Nokia Solutions And Networks Oy Mobile presence status exchange

Family Cites Families (48)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2002057917A2 (en) * 2001-01-22 2002-07-25 Sun Microsystems, Inc. Peer-to-peer network computing platform
US7177950B2 (en) * 2001-04-26 2007-02-13 Microsoft Corporation Synchronization and recovery of peers in a peer to peer environment
US7130921B2 (en) * 2002-03-15 2006-10-31 International Business Machines Corporation Centrally enhanced peer-to-peer resource sharing method and apparatus
US7139798B2 (en) * 2002-05-17 2006-11-21 Groove Networks, Inc. Method and apparatus for connecting a secure peer-to-peer collaboration system to an external system
US7206934B2 (en) * 2002-09-26 2007-04-17 Sun Microsystems, Inc. Distributed indexing of identity information in a peer-to-peer network
US8370523B1 (en) * 2002-12-20 2013-02-05 Symantec Operating Corporation Managing routing information for a computer network
US7653059B1 (en) * 2002-12-20 2010-01-26 Symantec Operating Corporation Communication sessions for a computer network
US8275864B1 (en) * 2002-12-20 2012-09-25 Symantec Operating Corporation Peer-to-peer network with recovery capability
US7596625B2 (en) * 2003-01-27 2009-09-29 Microsoft Corporation Peer-to-peer grouping interfaces and methods
US7792915B2 (en) * 2003-06-04 2010-09-07 Sony Computer Entertainment Inc. Content distribution overlay network and methods for operating same in a P2P network
US7660889B2 (en) * 2003-11-18 2010-02-09 Cisco Technology, Inc. Initialization and acquisition of peers in a peers' list in a peer-to-peer network
US7342895B2 (en) * 2004-01-30 2008-03-11 Mark Serpa Method and system for peer-to-peer wireless communication over unlicensed communication spectrum
US7536467B2 (en) * 2004-04-20 2009-05-19 Microsoft Corporation Peer-to-peer (P2P) mobility system, and method
US20090228944A1 (en) * 2004-04-21 2009-09-10 Koninklijke Philips Electronics, N.V. System and method for chat load management in a network chat environment
US8806020B1 (en) * 2004-12-20 2014-08-12 Avaya Inc. Peer-to-peer communication session monitoring
CN100479415C (zh) * 2005-06-06 2009-04-15 腾讯科技(深圳)有限公司 一种实现数据通讯的***及其方法
CN100488139C (zh) * 2005-08-10 2009-05-13 华为技术有限公司 建立聊天室数据传输通道实现聊天消息传送的方法
CN100407201C (zh) * 2005-09-23 2008-07-30 腾讯科技(深圳)有限公司 一种网络搜索***及其实现方法
US7756924B2 (en) * 2005-12-21 2010-07-13 Microsoft Corporation Peer communities
GB0607294D0 (en) * 2006-04-11 2006-05-24 Nokia Corp A node
US8923267B2 (en) * 2006-06-30 2014-12-30 Qualcomm Incorporated System and method for high speed peer-to-peer connectivity between wireless devices
US7680482B2 (en) * 2006-07-13 2010-03-16 Motorola, Inc. Method and apparatus for session tracing and session logging in a peer-to-peer communication environment
US7881316B2 (en) * 2006-09-29 2011-02-01 Microsoft Corporation Multiple peer groups for efficient scalable computing
US7953083B1 (en) * 2006-12-12 2011-05-31 Qurio Holdings, Inc. Multicast query propagation scheme for a peer-to-peer (P2P) network
US8027342B2 (en) * 2006-12-21 2011-09-27 Motorola Mobility, Inc. Method and apparatus for establishing peer-to-peer communications
US9137027B2 (en) * 2007-02-21 2015-09-15 Avaya Canada Corp. Bootstrapping in peer-to-peer networks with network address translators
US8656017B2 (en) * 2007-05-16 2014-02-18 Microsoft Corporation Peer-to-peer collaboration system with edge routing
WO2009070927A1 (en) * 2007-12-03 2009-06-11 Ebay Inc. Live search chat room
CN101965716A (zh) * 2008-01-10 2011-02-02 惠普开发有限公司 多路对等媒体流传送
CN101562784B (zh) * 2008-04-14 2012-06-06 华为技术有限公司 报文分发方法、设备及***
JP2010272973A (ja) * 2009-05-19 2010-12-02 Sharp Corp ネットワークシステム、通信端末、通信方法、および通信プログラム
US9949305B2 (en) * 2009-10-02 2018-04-17 Blackberry Limited Methods and apparatus for peer-to-peer communications in a wireless local area network
US8874785B2 (en) * 2010-02-15 2014-10-28 Damaka, Inc. System and method for signaling and data tunneling in a peer-to-peer environment
EP2369812B1 (en) * 2010-03-24 2015-12-02 BlackBerry Limited Peer-to-peer network connectivity status
US8402516B2 (en) * 2010-05-06 2013-03-19 Jonathan Weizman Apparatus and method for establishing a peer-to-peer communication session with a host device
US8402515B2 (en) * 2010-05-06 2013-03-19 Jonathan Weizman Apparatus and method for establishing a peer-to-peer communication session with a client device
CN101834874A (zh) * 2010-05-21 2010-09-15 四川长虹电器股份有限公司 一种能穿透防火墙的多媒体网络通信方法
US9477738B2 (en) * 2010-07-21 2016-10-25 International Business Machines Corporation Initialization protocol for a peer-to-peer replication environment
US8700782B2 (en) * 2010-08-18 2014-04-15 Microsoft Corporation Directing modalities over different networks in multimodal communications
US8880670B1 (en) * 2011-03-30 2014-11-04 Google Inc. Group membership discovery service
US9177328B2 (en) * 2011-06-21 2015-11-03 Bittorrent, Inc. Peer-to-peer network chatting
CN102904916B (zh) * 2011-07-28 2016-07-06 华为技术有限公司 建立点对点通信的方法、索引服务器及***
US9197848B2 (en) * 2012-06-25 2015-11-24 Intel Corporation Video conferencing transitions among a plurality of devices
US20140280989A1 (en) * 2013-03-14 2014-09-18 Thomas J. Borkowski System and method for establishing peer to peer connections through symmetric nats
US10165047B2 (en) * 2013-03-15 2018-12-25 Google Technology Holdings LLC Methods and apparatus for transmitting service information in a neighborhood of peer-to-peer communication groups
US8843835B1 (en) * 2014-03-04 2014-09-23 Banter Chat, Inc. Platforms, systems, and media for providing multi-room chat stream with hierarchical navigation
US9629042B2 (en) * 2014-12-05 2017-04-18 Cisco Technology, Inc. System and method for providing collaborative neighbor management in a network environment
US20190297119A1 (en) * 2018-03-23 2019-09-26 Cisco Technology, Inc. Establishing direct secure connection between collaboration devices in a room or space

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101313292A (zh) * 2005-05-12 2008-11-26 国际商业机器公司 对等数据传送指挥协调
CN101855889A (zh) * 2007-11-09 2010-10-06 诺基亚公司 在p2p网络中提供数据管理的方法、装置和计算机程序产品
US20100250589A1 (en) * 2009-03-26 2010-09-30 Grasstell Networks Llc Tree structured P2P overlay database system
CN103166860A (zh) * 2011-12-19 2013-06-19 中兴通讯股份有限公司 一种p2p叠加网络数据迁移的方法和装置
WO2015018427A1 (en) * 2013-08-05 2015-02-12 Nokia Solutions And Networks Oy Mobile presence status exchange

Also Published As

Publication number Publication date
CN110192382B (zh) 2021-08-31
US20190379732A1 (en) 2019-12-12
US10686877B2 (en) 2020-06-16
CN110192382A (zh) 2019-08-30

Similar Documents

Publication Publication Date Title
US10164826B2 (en) Distributed bootstrapping mechanism for peer-to-peer networks
JP4416733B2 (ja) 状態の同期化を有するクラスタのための仮想マルチキャスト経路指定
US9432754B2 (en) Maintaining a fabric name across a distributed switch
US7978631B1 (en) Method and apparatus for encoding and mapping of virtual addresses for clusters
US7493413B2 (en) APIS to build peer to peer messaging applications
US9191219B2 (en) Network multicast peer discovery methods
US20060117025A1 (en) Optimizing communication using scaleable peer groups
US9172550B2 (en) Management of a multicast system in a software-defined network
JP2006236344A (ja) ピアツーピアネットワークを利用したコミュニティ形成方法
KR102685010B1 (ko) 계정 연결 방법 및 장치, 저장 매체 그리고 전자 디바이스
CN104852972A (zh) 基于所发现的nat类型选择主机的方法
US8219614B2 (en) Edge peer device, pan gateway device, super peer device, and P2P network-based interconnection method
US10742545B2 (en) Multicasting system
KR20120071576A (ko) 분산 해쉬 테이블 기반의 rtps 디스커버리 방법, 장치 및 시스템
CN104202364A (zh) 一种控制器的自动发现和配置方法和设备
US20180343197A1 (en) Link aggregated fibre channel over ethernet system
WO2019232750A1 (zh) 一种网络通信方法、对等体及***
CN110391919A (zh) 组播流量转发方法、装置、电子设备
CN103716244A (zh) 一种实现组播跨vpn转发的方法及装置
US10938591B2 (en) Multicast system
CN109639565B (zh) 一种去中心化的即时通信多服务节点互联互通***
WO2016095510A1 (zh) 一种路径选择方法、设备及***
US20200341968A1 (en) Differential Update of Local Cache from Central Database
CN107005840B (zh) 使用发现节点的设备发现
US11863592B2 (en) Active speaker tracking using a global naming scheme

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: 18921971

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: 18921971

Country of ref document: EP

Kind code of ref document: A1