CN107404504B - Communication method, device and system - Google Patents
Communication method, device and system Download PDFInfo
- Publication number
- CN107404504B CN107404504B CN201610339144.9A CN201610339144A CN107404504B CN 107404504 B CN107404504 B CN 107404504B CN 201610339144 A CN201610339144 A CN 201610339144A CN 107404504 B CN107404504 B CN 107404504B
- Authority
- CN
- China
- Prior art keywords
- service
- port
- connection
- client
- accessed
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/02—Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1001—Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
- H04L67/1004—Server selection for load balancing
- H04L67/1008—Server selection for load balancing based on parameters of servers, e.g. available memory or workload
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/104—Peer-to-peer [P2P] networks
- H04L67/1044—Group management mechanisms
- H04L67/1053—Group management mechanisms with pre-configuration of logical or physical connections with a determined number of other peers
- H04L67/1055—Group management mechanisms with pre-configuration of logical or physical connections with a determined number of other peers involving connection limits
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Hardware Design (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Theoretical Computer Science (AREA)
- Telephonic Communication Services (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention discloses a communication method, a communication device and a communication system. In the scheme, the client establishes connection with the server through the public port, the server selects a relatively idle service port for the client, and sends the port identifier of the selected service port to the client, so that the client establishes connection with the selected service port to further access the service to be accessed. Compared with the prior art that a single-port service is adopted, one service in the embodiment of the invention can have a plurality of ports, can select idle ports for clients to provide service, can increase the number of clients capable of being served compared with the single-port service, and can effectively avoid the conditions of service speed reduction and congestion of the clients.
Description
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a communication method, apparatus, and system.
Background
With further deepening of network management informatization, the requirements of users on service systems are higher and higher, and an open and easy-to-use B/S (Browser/Server) framework is more and more favored by users. However, the huge amount of business data poses a challenge to the service capability of the B/S framework, and how to improve the browsing speed and how to ensure the timeliness of the data becomes a problem that must be mainly solved by the B/S framework.
In the prior art, to facilitate a user to access a service, the following techniques are generally adopted:
1. HTTP (HyperText Transfer Protocol)) fixed single port service technology: the technology is a traditional and commonly applied technology, has existed for many years, and is that a website background service provides the business data of a website by using a fixed single port through an HTTP protocol.
2. Tcp fixed single port service technology: the website background service is based on the net.tcp technology and provides the website support service by using a fixed single port.
It can be seen that in the prior art, a single port is used for providing services for users. The number of single-port connections is limited, the number of clients capable of being served is limited, the single port becomes a large bottleneck of multi-client application, and the situations of client service speed reduction and congestion easily occur under the condition of large service volume.
Disclosure of Invention
The embodiment of the invention provides a communication method, a communication device and a communication system, which are used for solving the problems that the number of clients capable of being served is limited because a single port provides services for users, the single port becomes a large bottleneck of multi-client application, and the service speed of the clients is easy to decrease and the clients are easy to be squeezed under the condition of large service volume.
The embodiment of the invention provides a communication method, which comprises the following steps:
a server receives a public port connection request sent by a client; the connection request comprises a service to be accessed;
after the connection is established with the client through the public port, selecting a service port with the connection number not reaching the upper limit of the connection number from at least one service port of the service to be accessed;
and sending the port identification of the selected service port to the client through the public port so as to enable the client to access the service to be accessed after establishing connection with the selected service port.
Further, an embodiment of the present invention further provides a communication method, including:
the client sends a public port connection request to the server; the connection request comprises a service to be accessed;
after establishing connection with the server through the public port, receiving a port identifier of a service port of the service to be accessed, which is sent by the server through the public port, wherein the service port is a service port of which the connection number selected from at least one service port of the service to be accessed does not reach the upper limit of the connection number after the server establishes connection with the client through the public port;
and after establishing connection with the service port corresponding to the service port identifier sent by the server, accessing the service to be accessed.
Further, an embodiment of the present invention further provides a communication apparatus, including:
the public port is used for establishing connection with a client and sending a port identifier of a service port selected by the server to the client;
the system comprises at least one service port, a client and a server, wherein the service port is used for establishing connection with the client and sending service data requested by the client to the client;
the receiving unit is used for receiving a public port connection request sent by a client; the connection request comprises a service to be accessed;
a port selection unit, configured to select a service port with a connection number that does not reach an upper limit of a connection number from at least one service port of the service to be accessed after establishing a connection with the client through the public port;
and the port identifier sending unit is used for sending the port identifier of the selected service port to the client through the public port so as to enable the client to access the service to be accessed after establishing connection with the selected service port.
Further, an embodiment of the present invention further provides a communication apparatus, including:
the sending unit is used for sending the public port connection request to the server; the connection request comprises a service to be accessed;
a receiving unit, configured to receive, after establishing a connection with the server through the public port, a port identifier of a service port of the service to be accessed, where the port identifier is sent by the server through the public port, and the service port is a service port whose connection number does not reach an upper limit of a connection number and is selected from at least one service port of the service to be accessed after the server establishes a connection with the client through the public port;
and the communication unit is used for accessing the service to be accessed after establishing connection with the service port corresponding to the service port identifier sent by the server.
The beneficial effects of the invention include: the server establishes connection with the client through the public port, selects a relatively idle service port for the client, and sends the port identification of the selected service port to the client, so that the client establishes connection with the selected service port to further access the service to be accessed. Compared with the prior art that a single-port service is adopted, one service in the embodiment of the invention can have a plurality of ports, can select idle ports for clients to provide service, can increase the number of clients capable of being served compared with the single-port service, and can effectively avoid the conditions of service speed reduction and congestion of the clients.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flow chart illustrating a communication method according to a first embodiment of the present invention;
fig. 2 is a schematic flow chart illustrating a communication method according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a communication device according to a third embodiment of the present invention;
fig. 4 is a schematic structural diagram of a communication device according to a fourth embodiment of the present invention;
fig. 5 is a schematic structural diagram of a communication system according to a fifth embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a communication method, a device and a system, in the technical scheme of the embodiment of the invention, a server receives a public port connection request sent by a client; the connection request comprises a service to be accessed; after the server establishes connection with the client through the public port, selecting a service port with the connection number not reaching the upper limit of the connection number from at least one service port of the service to be accessed; and sending the port identification of the selected service port to the client through the public port so as to enable the client to access the service to be accessed after establishing connection with the selected service port. Therefore, at least one service port can be provided for one service, the service port selected by the user is a relatively idle port, the selected port can provide service for the client, and the situations of service speed reduction and congestion of the client can be effectively avoided under the condition of large handling capacity.
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The first embodiment is as follows:
as shown in fig. 1, which is a flowchart illustrating a communication method according to a first embodiment of the present invention, the communication method may include the following steps:
step 101: a server receives a public port connection request sent by a client; the connection request comprises the service to be accessed.
Step 102: and after the connection is established with the client through the public port, selecting a service port with the connection number not reaching the upper limit of the connection number from at least one service port of the service to be accessed.
Step 103: and sending the port identification of the selected service port to the client through the public port so as to enable the client to access the service to be accessed after establishing connection with the selected service port.
Therefore, the server establishes connection with the client through the public port, selects a relatively idle service port for the client, and sends the port identifier of the selected service port to the client, so that the client establishes connection with the selected service port to further access the service to be accessed. Compared with the prior art that a single-port service is adopted, one service in the embodiment of the invention can have a plurality of ports, can select idle ports for clients to provide service, can increase the number of clients capable of being served compared with the single-port service, and can effectively avoid the conditions of service speed reduction and congestion of the clients.
To further understand the communication method provided by the embodiment of the present invention, the following further description includes the following contents:
1) wherein, in one embodiment, the embodiment of the invention is suitable for net.tcp service and http service. Here, taking a net.tcp service as an example, a configuration method of a common port and a service port in the embodiment of the present invention is described:
assuming that there are three services provided, which are a performance service, a resource service, and an alarm service, respectively, the definition of the port includes:
< | A! -defining a common port- >: < add key ═ DisClientResourceProort >
< | A! -defining service ports for resource traffic- >: < add key ═ value ═ 4503,4504,4505,4506,4507'/>, of "resourcedataport
< | A! -defining service ports for performance services- >: < add key ═ performanedataport ═ value ═ 4513,4514,4515,4516,4517'/>
< | A! -defining service ports for alarm services- - >: < add key ═ AlarmDataPort "value ═ 4523,4524,4525,4526,4527"/>, and
the public port is a fixed open port, and is used for providing service for the client to initially apply for the service channel resource and dynamically allocating the service port for the client according to the busy degree of the service port.
The service port is used for providing the accessed service data for the client after establishing connection with the client.
After each port is defined, if each port can be used to provide a corresponding function, the following three operations need to be performed on each defined port: firstly, creating a service object instance, and secondly, binding a public port service interaction interface class for the service object instance; and thirdly, opening the port to provide corresponding service. Specifically, continuing with the above example, the common port and the service port are described separately:
1. for a common port:
(1) creating a service object instance:
creating a net.tcp service system model class object instance for public port services, an example method may be as follows, assuming the object name is svrPublic:
ServiceHost svrPublic;
(2) binding a public port service interaction interface class and a net.tcp basic service address for a service object instance:
for the public port service interactive interface class appointed between the clients, the responsibility is to receive the client request and return the processing result, for example, the assumed class name is svrPublicService. If the IP of the service address is assumed to be svrp and the port of the net.tcp service address is assumed to be svrPublicPORT, the binding example method is as follows:
svrPublic=new ServiceHost(typeof(svrPublicService),new Uri[]{“net.tcp:// svrIP:svrPublicPORT”)。
(3) opening a port:
an exemplary method is as follows:
svrPublic.Open();
2. for service port
(1) Creating a service object instance:
creating a net.tcp service system model class object instance for public port service, assuming the object name is svrYewu, the method is as follows:
ServiceHost svrYewu;
(2) binding a public port service interaction interface class and a net.tcp basic service address for a service object instance:
for the public port service interactive interface class appointed between the clients, the role is to receive the client request and return the processing result, for example, the assumed class name is svrYewuService. If the IP of the service address is assumed to be svrjp and the port of the net.tcp service address is assumed to be svrYewuPORT, the binding example method is as follows:
svrYewu=new ServiceHost(typeof(svrYewuService),new Uri[]{“net.tcp://svrIP:svrYewuPORT”)。
(3) opening a port:
an exemplary method is as follows:
svrYewu.Open();
(4) in the manner of the above (1) to (3), circularly creating and opening all service ports:
an exemplary method is as follows:
foreach (int port in service port list)
{
Creating open traffic port services
}。
Of course, the method for creating and configuring the port is only an exemplary illustration, and any reasonable method may be adopted according to actual needs in specific implementation, and is applicable to the embodiment of the present invention, and the present invention is not limited to this.
2) In an embodiment of the present invention, to implement that the selected service port is relatively reasonable, and a relatively idle port can be selected to provide services, in step 102, a service port whose connection number does not reach the upper limit of the connection number is selected from at least one service port of the service to be accessed, which can be implemented in one of the following two manners:
the first method is as follows: and selecting the service port with the minimum connection number from the at least one service port of the service to be accessed. Therefore, the selected service port with the minimum number of the summary connections enables the loads of all the service ports to be balanced, and service for accessing services can be effectively provided for the client.
In specific implementation, a polling method may be used to determine which service port has the smallest number of connections, or a number comparison method in the prior art may be used to determine which service port has the smallest number of connections, which is not limited in the present invention.
The second method comprises the following steps: and selecting service ports with the connection number smaller than the preset number from at least one service port of the service to be accessed, wherein the preset number is smaller than the upper limit of the connection number. Therefore, a better port is selected, so that the selected port can be ensured to be idle, and the service can be provided for the client well.
It should be noted that any method capable of selecting a relatively idle port from at least one service port is applicable to the embodiment of the present invention, and the present invention is not limited to this.
3) Wherein, in one embodiment, some services are actually associated, such as the performance service and the alarm service, which generally provide services for the client at the same time. Therefore, in the embodiment of the present invention, in order to facilitate the user to access the associated service, the method may further include the following steps:
step A1: determining whether the associated service of the service to be accessed exists or not according to a pre-stored service association relation;
step A2: if the connection number of the service ports does not reach the upper limit of the connection number, the service ports with the connection number not reaching the upper limit of the connection number are selected from at least one service port of each associated service, and the port identification of the selected service port is sent to the client through the public port, so that the client establishes connection with the selected service port of the associated service.
For example, when the client requests to access the performance service, the port identifier of the service port of the alarm service associated with the performance service is also sent to the client, so that the client can access the alarm service without requesting the service port of the alarm service again while accessing the performance service. Therefore, the client does not need to send a public port connection request for requesting to access the alarm service, and the server does not need to process the connection request, so that the processing resources of the server can be saved, and the bandwidth can be saved.
It should be noted that the port identifier of the service port associated with the service may be sent to the client together with the port identifier of the service port of the service to be accessed, or may be sent separately.
Example two
Based on the same inventive concept, an embodiment of the present invention further provides a communication method, as shown in fig. 2, which is an exemplary flowchart of the method, and may include the following steps:
step 201: the client sends a public port connection request to the server; the connection request comprises the service to be accessed.
Step 202: after the connection is established between the public port and the server, the port identification of the service port of the service to be accessed, which is sent by the server through the public port, is received, and the service port is the service port of which the connection number selected from at least one service port of the service to be accessed does not reach the upper limit of the connection number after the connection is established between the server and the client through the public port.
Step 203: and after establishing connection with the service port corresponding to the service port identifier sent by the server, accessing the service to be accessed.
Therefore, after the client establishes connection with the server through the public port, the idle service port allocated by the server is obtained, and then the service to be accessed is accessed through the allocated service port. The method and the system can improve the speed of the client accessing the service to be accessed and avoid the client being squeezed.
In one embodiment, some services are actually associated, and if a service is not accessed, a public port connection request is sent to a server, and if the server is requested to allocate a service port, it obviously occupies more bandwidth and wastes processing resources of the server, so that, in order to avoid wasting bandwidth and saving processing resources of the server, in this embodiment of the present invention, it may further be:
step B1: and receiving the port identification of the service port of the associated service of the service to be accessed, which is sent by the server through the public port.
Step B2: and establishing connection with the service port corresponding to the port identification of the service port of the associated service. Therefore, the service port of the service to be accessed and the service port of the associated service can be obtained only by sending the public port connection request once, so that the access to the service to be accessed and the associated service is realized.
In summary, in the embodiment of the present invention, the client can obtain a relatively idle service port of the service to be accessed through the public port. The situations of service speed reduction and extrusion caused by single-port service in the prior art can be effectively avoided.
EXAMPLE III
Based on the same inventive concept, an embodiment of the present invention further provides a communication apparatus, as shown in fig. 3, which is a schematic structural diagram of the apparatus, including:
the public port 301 is used for establishing connection with a client and sending a port identifier of a service port selected by the server to the client;
at least one service port 302, configured to establish a connection with a client and send service data requested by the client to the client;
a receiving unit 303, configured to receive a public port connection request sent by a client; the connection request comprises a service to be accessed;
a port selecting unit 304, configured to select a service port with a connection number that does not reach an upper limit of a connection number from at least one service port of the service to be accessed after establishing a connection with the client through the public port;
a port identifier sending unit 305, configured to send the port identifier of the selected service port to the client through the public port, so that the client accesses the service to be accessed after establishing connection with the selected service port.
In an embodiment, the port selecting unit is specifically configured to select a service port with a minimum connection number from the at least one service port of the service to be accessed.
In an embodiment, the port selecting unit is specifically configured to select, from the at least one service port of the service to be accessed, a service port whose connection number is smaller than a preset number, where the preset number is smaller than the upper limit of the connection number.
Wherein, in one embodiment, the apparatus further comprises:
an associated service determining unit, configured to determine whether an associated service of the service to be accessed exists according to a pre-stored service association relationship;
and the processing unit is used for indicating the port selection unit to select a service port with the connection number not reaching the upper limit of the connection number from at least one service port of each associated service if the associated service exists, and indicating the port identification sending unit to send the port identification of the selected service port to the client through the public port so as to enable the client to establish connection with the selected service port of the associated service.
The communication device provided by the embodiment of the invention firstly establishes connection with the client through the public port, does not select a relatively idle service port from the client, and sends the port identification of the selected service port to the client, so that the client can conveniently establish connection with the selected service port to further access the service to be accessed. Compared with the prior art that a single-port service is adopted, one service in the embodiment of the invention can have a plurality of ports, can select idle ports for clients to provide service, can increase the number of clients capable of being served compared with the single-port service, and can effectively avoid the conditions of service speed reduction and congestion of the clients.
Example four
Based on the same inventive concept, an embodiment of the present invention further provides a communication apparatus, as shown in fig. 4, which is a schematic structural diagram of the apparatus, including:
a sending unit 401, configured to send a public port connection request to a server; the connection request comprises a service to be accessed;
a receiving unit 402, configured to receive, after establishing a connection with the server through the public port, a port identifier of a service port of the service to be accessed, where the service port is a service port whose connection number selected from at least one service port of the service to be accessed does not reach an upper limit of the connection number after the server establishes a connection with the client through the public port;
a communication unit 403, configured to access the service to be accessed after establishing connection with the service port corresponding to the service port identifier sent by the server.
In an embodiment, the receiving unit is further configured to receive, by the server, a port identifier of a service port of a service associated with the service to be accessed, where the service port is sent through the public port;
the device further comprises:
and the connection unit is used for establishing connection with the service port corresponding to the port identifier of the service port of the associated service.
The communication device provided by the embodiment of the invention can obtain the idle service port of the service to be accessed through the public port. The situations of service speed reduction and extrusion caused by single-port service in the prior art can be effectively avoided.
EXAMPLE five
Based on the same inventive concept, an embodiment of the present invention further provides a communication system, as shown in fig. 5, which is a schematic structural diagram of the system, including:
a server 501, configured to receive a public port connection request sent by a client; the connection request comprises a service to be accessed; after the connection is established with the client through the public port, selecting a service port with the connection number not reaching the upper limit of the connection number from at least one service port of the service to be accessed; sending the port identification of the selected service port to the client through the public port so as to enable the client to access the service to be accessed after establishing connection with the selected service port;
a client 502, configured to send a public port connection request to a server; after establishing connection with the server through the public port, receiving a port identifier of a service port of the service to be accessed, which is sent by the server through the public port; and after establishing connection with the service port corresponding to the service port identifier sent by the server, accessing the service to be accessed.
With regard to the apparatus in the above-described embodiment, the specific manner in which each unit performs the operation has been described in detail in the embodiment related to the method, and will not be described in detail here.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, apparatus, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention has been described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (devices) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.
Claims (9)
1. A method of communication, comprising:
a server receives a public port connection request sent by a client; the connection request comprises a service to be accessed;
after the connection is established with the client through the public port, selecting a service port with the connection number not reaching the upper limit of the connection number from at least one service port of the service to be accessed;
sending the port identification of the selected service port to the client through the public port so as to enable the client to access the service to be accessed after establishing connection with the selected service port,
wherein the method further comprises:
determining whether the associated service of the service to be accessed exists or not according to a pre-stored service association relation;
if the connection number of the service ports does not reach the upper limit of the connection number, the service ports with the connection number not reaching the upper limit of the connection number are selected from at least one service port of each associated service, and the port identification of the selected service port is sent to the client through the public port, so that the client establishes connection with the selected service port of the associated service.
2. The method according to claim 1, wherein selecting a service port whose connection number does not reach an upper limit of a connection number from the at least one service port of the service to be accessed specifically comprises:
and selecting the service port with the minimum connection number from the at least one service port of the service to be accessed.
3. The method according to claim 1, wherein selecting a service port whose connection number does not reach an upper limit of a connection number from the at least one service port of the service to be accessed specifically comprises:
and selecting service ports with the connection number smaller than the preset number from at least one service port of the service to be accessed, wherein the preset number is smaller than the upper limit of the connection number.
4. A method of communication, comprising:
the client sends a public port connection request to the server; the connection request comprises a service to be accessed;
after establishing connection with the server through the public port, receiving a port identifier of a service port of the service to be accessed, which is sent by the server through the public port, wherein the service port is a service port of which the connection number selected from at least one service port of the service to be accessed does not reach the upper limit of the connection number after the server establishes connection with the client through the public port;
and accessing the service to be accessed after establishing connection with the service port corresponding to the service port identifier sent by the server, wherein the method further comprises the following steps:
receiving a port identifier of a service port of the associated service of the service to be accessed, which is sent by the server through the public port;
and establishing connection with the service port corresponding to the port identification of the service port of the associated service.
5. A server, comprising:
the public port is used for establishing connection with the client and sending the port identification of the service port selected by the server to the client;
the system comprises at least one service port, a client and a server, wherein the service port is used for establishing connection with the client and sending service data requested by the client to the client;
the receiving unit is used for receiving a public port connection request sent by a client; the connection request comprises a service to be accessed;
a port selection unit, configured to select a service port with a connection number that does not reach an upper limit of a connection number from at least one service port of the service to be accessed after establishing a connection with the client through the public port;
a port identifier sending unit, configured to send a port identifier of the selected service port to the client through the public port, so that the client accesses the service to be accessed after establishing connection with the selected service port;
wherein, the server further comprises:
an associated service determining unit, configured to determine whether an associated service of the service to be accessed exists according to a pre-stored service association relationship;
and the processing unit is used for indicating the port selection unit to select a service port with the connection number not reaching the upper limit of the connection number from at least one service port of each associated service if the associated service exists, and indicating the port identification sending unit to send the port identification of the selected service port to the client through the public port so as to enable the client to establish connection with the selected service port of the associated service.
6. The server according to claim 5, wherein the port selecting unit is specifically configured to select a service port with a smallest connection number from the at least one service port of the service to be accessed.
7. The server according to claim 5, wherein the port selecting unit is specifically configured to select, from the at least one service port of the service to be accessed, a service port whose connection number is smaller than a preset number, where the preset number is smaller than the upper limit of the connection number.
8. A client, comprising:
the sending unit is used for sending the public port connection request to the server; the connection request comprises a service to be accessed;
a receiving unit, configured to receive, after establishing a connection with the server through the public port, a port identifier of a service port of the service to be accessed, where the port identifier is sent by the server through the public port, and the service port is a service port whose connection number does not reach an upper limit of a connection number and is selected from at least one service port of the service to be accessed after the server establishes a connection with the client through the public port;
the communication unit is used for accessing the service to be accessed after establishing connection with the service port corresponding to the service port identifier sent by the server, wherein the receiving unit is also used for receiving the port identifier of the service port of the service related to the service to be accessed, which is sent by the server through the public port;
the client further comprises:
and the connection unit is used for establishing connection with the service port corresponding to the port identifier of the service port of the associated service.
9. A communication system, comprising:
the server is used for receiving a public port connection request sent by the client; the connection request comprises a service to be accessed; after the connection is established with the client through the public port, selecting a service port with the connection number not reaching the upper limit of the connection number from at least one service port of the service to be accessed; sending the port identification of the selected service port to the client through the public port so as to enable the client to access the service to be accessed after establishing connection with the selected service port;
the client is used for sending a public port connection request to the server; after establishing connection with the server through the public port, receiving a port identifier of a service port of the service to be accessed, which is sent by the server through the public port; and after establishing connection with the service port corresponding to the service port identifier sent by the server, accessing the service to be accessed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610339144.9A CN107404504B (en) | 2016-05-19 | 2016-05-19 | Communication method, device and system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610339144.9A CN107404504B (en) | 2016-05-19 | 2016-05-19 | Communication method, device and system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107404504A CN107404504A (en) | 2017-11-28 |
CN107404504B true CN107404504B (en) | 2020-08-04 |
Family
ID=60389266
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610339144.9A Active CN107404504B (en) | 2016-05-19 | 2016-05-19 | Communication method, device and system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107404504B (en) |
Families Citing this family (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111953615A (en) * | 2019-05-17 | 2020-11-17 | 华为技术有限公司 | Load sharing method and device and BRAS |
CN116055565B (en) * | 2023-01-28 | 2023-06-06 | 北京蓝色星际科技股份有限公司 | Data transmission method, system, device, electronic equipment and storage medium |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103618738A (en) * | 2013-12-09 | 2014-03-05 | 惠州华阳通用电子有限公司 | Intelligent load distribution system and method for achieving TCP long connection and communication |
CN105007336A (en) * | 2015-08-14 | 2015-10-28 | 深圳市云舒网络技术有限公司 | Load balancing method and load balancing system of server |
CN105306967A (en) * | 2015-10-28 | 2016-02-03 | 天彩电子(深圳)有限公司 | Resource allocation method of Cloud video platform |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103024001B (en) * | 2012-11-30 | 2018-07-31 | 中兴通讯股份有限公司 | A kind of business scheduling method and device and fusion device |
-
2016
- 2016-05-19 CN CN201610339144.9A patent/CN107404504B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103618738A (en) * | 2013-12-09 | 2014-03-05 | 惠州华阳通用电子有限公司 | Intelligent load distribution system and method for achieving TCP long connection and communication |
CN105007336A (en) * | 2015-08-14 | 2015-10-28 | 深圳市云舒网络技术有限公司 | Load balancing method and load balancing system of server |
CN105306967A (en) * | 2015-10-28 | 2016-02-03 | 天彩电子(深圳)有限公司 | Resource allocation method of Cloud video platform |
Also Published As
Publication number | Publication date |
---|---|
CN107404504A (en) | 2017-11-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9251040B2 (en) | Remote debugging in a cloud computing environment | |
US10034222B2 (en) | System and method for mapping a service-level topology to a service-specific data plane logical topology | |
US10069928B1 (en) | Translating requests/responses between communication channels having different protocols | |
US9276860B2 (en) | Distributed data center technology | |
US20220263768A1 (en) | Method and Apparatus for Node Speed Limiting, Electronic Device and Storage Medium | |
CN104219127A (en) | Creation method and device of virtual network instance | |
CN108920111B (en) | Data sharing method and distributed data sharing system | |
CN106302640A (en) | Data request processing method and device | |
CN112261094A (en) | Message processing method and proxy server | |
CN113709200B (en) | Method and device for establishing communication connection | |
CN104601534A (en) | Method and system for processing CDN system images | |
WO2014141283A1 (en) | Access control in a secured cloud environment | |
CN114915593B (en) | Redis-based flow control method and device, electronic equipment and storage medium | |
US20210084100A1 (en) | Packet Processing Method, Related Device, and Computer Storage Medium | |
US20180091631A1 (en) | Systems and methods for writing prioritized http/2 data to a socket buffer | |
WO2019218478A1 (en) | Response method and device for call service | |
CN104468594A (en) | Data request method, device and system | |
CN107404504B (en) | Communication method, device and system | |
CN105763616B (en) | Resource downloading method and device | |
CN106686635B (en) | Data transmission method and device based on control and configuration protocol of wireless access point | |
CN112104679A (en) | Method, apparatus, device and medium for processing hypertext transfer protocol request | |
CN103685485A (en) | Mobile terminal VoIP (voice over internet protocol) communication audio management system | |
CN114296953A (en) | Multi-cloud heterogeneous system and task processing method | |
WO2012000455A1 (en) | Client terminal and load balancing method | |
WO2023088362A1 (en) | Network traffic processing method and apparatus, and medium and electronic device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |