CN110493353A - Communication means, device and server - Google Patents

Communication means, device and server Download PDF

Info

Publication number
CN110493353A
CN110493353A CN201910835905.3A CN201910835905A CN110493353A CN 110493353 A CN110493353 A CN 110493353A CN 201910835905 A CN201910835905 A CN 201910835905A CN 110493353 A CN110493353 A CN 110493353A
Authority
CN
China
Prior art keywords
server
long connection
user
communication
established
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.)
Pending
Application number
CN201910835905.3A
Other languages
Chinese (zh)
Inventor
崔城瑞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhuomi Private Ltd
Original Assignee
Hong Kong LiveMe Corp ltd
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 Hong Kong LiveMe Corp ltd filed Critical Hong Kong LiveMe Corp ltd
Priority to CN201910835905.3A priority Critical patent/CN110493353A/en
Publication of CN110493353A publication Critical patent/CN110493353A/en
Pending legal-status Critical Current

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/14Session management
    • H04L67/141Setup of application sessions
    • 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/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

A kind of communication means, device and server provided in an embodiment of the present invention.Wherein, a kind of communication means is applied to management server, in the user's request for receiving client transmission, obtains the server identification that the user requests corresponding Edge Server;From the multiple long connections pre-established, the corresponding long connection of the server identification is searched;Wherein, the multiple length pre-established are connected as management server before receiving user's request of client transmission, the long connection pre-established respectively with each Edge Server;Searched long connection is utilized, Edge Server corresponding with the server identification carries out the communication requested about the user.This programme can reduce the time cost and bandwidth cost of communication.

Description

Communication means, device and server
Technical field
The present invention relates to behavior fields of communication technology, more particularly to a kind of communication means, device and server.
Background technique
In system relevant to internet communication, for example, in instant communicating system and live broadcast system etc. system, system Management server and Edge Server between when communicating, usually realize communication by establishing short connection.That is: each data are directed to It sends, establishes this number by the three-way handshake of TCP (Transmission Control Protocol, transmission control protocol) According to the short connection of transmission, after one time data are sent, carry out conventional 4-Way Handshake and close connection.
But when communicating frequent between management server and Edge Server, the above-mentioned mode for establishing short connection communication Be easy to cause largely establish connection and close connection operations, cause communication time cost and bandwidth cost in contrast compared with It is high.
Summary of the invention
The embodiment of the present invention is designed to provide a kind of communication means, device and server, reduces communication to realize The effect of time cost and bandwidth cost.Specific technical solution is as follows:
In a first aspect, it is applied to management server the embodiment of the invention provides a kind of communication means, this method comprises:
In the user's request for receiving client transmission, the service that the user requests corresponding Edge Server is obtained Device mark;
From the multiple long connections pre-established, the corresponding long connection of the server identification is searched;Wherein, described preparatory The multiple length established are connected as management server before receiving user's request of client transmission, take respectively with each edge The long connection that business device pre-establishes;
Searched long connection is utilized, Edge Server progress corresponding with the server identification is asked about the user The communication asked.
Optionally, described from the multiple long connections pre-established, search the corresponding long connection of the server identification, packet It includes:
From the multiple long connections pre-established, searches and take out the corresponding long connection of the server identification;
Searched long connection is utilized described, Edge Server corresponding with the server identification is carried out about described After the communication of user's request, the method also includes:
When the communication about user request is completed, by what is pre-established described in the long connection return taken out In multiple long connections.
Optionally, searched long connection is utilized described, Edge Server corresponding with the server identification carries out After communication about user request, the method also includes:
Whether the use duration for detecting utilized long connection meets preset overtime use condition;
If it is satisfied, closing utilized long connection.
Optionally, after the utilized long connection of the closing, the method also includes:
From the multiple long connections pre-established, closed long connection is deleted;
In the multiple long connections pre-established, there is no the long phases for connecting corresponding Edge Server deleted When should grow connection, the new long connection with the Edge Server is established, and is stored in the multiple long connections pre-established.
Optionally, it obtains the user in the user's request for receiving client transmission in the management server and asks After the server identification for seeking corresponding Edge Server, the method also includes:
According to acquired server identification, user's number of request of the corresponding client of each Edge Server is counted Amount;
It is pre-established according to user's number of requests of the Edge Server to described for each Edge Server Multiple long connections in, the corresponding long connection of the Edge Server is updated.
Second aspect, the embodiment of the invention provides a kind of communication devices, are applied to management server, which includes:
Server identification obtains module, for obtaining the user and asking in the user's request for receiving client transmission Seek the server identification of corresponding Edge Server;
Long connection obtains module, for it is corresponding to search the server identification from the multiple long connections pre-established Long connection;Wherein, the multiple length pre-established are connected as management server in the user's request for receiving client transmission Before, the long connection pre-established respectively with each Edge Server;
Communication module, for utilizing searched long connection, Edge Server corresponding with the server identification is carried out Communication about user request.
Optionally, the long connection obtains module, is specifically used for:
From the multiple long connections pre-established, searches and take out the corresponding long connection of the server identification;
The communication module module is also used to utilize searched length to connect described, corresponding with the server identification Edge Server carry out communication request about the user after, when the communication completion about user request When, it will be in the multiple long connections that pre-established described in the long connection return that taken out.
Optionally, described device further include: long connection closed module is used for:
Searched long connection is utilized in the communication module, Edge Server corresponding with the server identification carries out After communication about user request, whether the use duration for detecting utilized long connection, which meets preset time-out, is used Condition;If it is satisfied, closing utilized long connection.
Optionally, the long connection closed module, is also used to:
After the utilized long connection of the closing, from the multiple long connections pre-established, deletes and closed Long connection;
In the multiple long connections pre-established, there is no the long phases for connecting corresponding Edge Server deleted When should grow connection, the new long connection with the Edge Server is established, and is stored in the multiple long connections pre-established.
Optionally, described device further include: long connection update module is used for:
When the server identification obtains module and receives user's request of client transmission, user's request is obtained After the server identification of corresponding Edge Server, according to acquired server identification, each Edge Server difference is counted User's number of requests of corresponding client;
It is pre-established according to user's number of requests of the Edge Server to described for each Edge Server Multiple long connections in, the corresponding long connection of the Edge Server is updated.
The third aspect, the embodiment of the invention provides a kind of server, which includes:
Processor, communication interface, memory and communication bus, wherein processor, communication interface, memory pass through bus Complete mutual communication;Memory, for storing computer program;Processor, for executing the journey stored on memory Sequence, the step of realizing the communication means that above-mentioned first aspect provides.
Fourth aspect is stored in the storage medium the embodiment of the invention provides a kind of computer readable storage medium The step of computer program, which realizes the communication means that above-mentioned first aspect provides when being executed by processor.
In scheme provided in an embodiment of the present invention, management server is in the user's request for receiving client transmission It communicates between corresponding with user's request Edge Server, from the multiple long connections pre-established, searches corresponding The corresponding long connection of server identification, and then using the long connection searched, Edge Server corresponding with server identification carries out Communication about user's request.Wherein, the multiple length pre-established are connected as management server and are receiving client transmission Before user's request, the length established respectively with each Edge Server in advance is connected, it is ensured that server is at each and edge When server communication, without carrying out creation connection, but can directly it be taken using in the multiple long connections pre-established with edge The corresponding long connection of business device is communicated, the number of creation connection when reducing communication.Also, long connection will not be sent out in a data After sending, it is attached closing, in contrast can reduce the number for closing connection.Therefore, with frequently establish it is short connect into The mode of row communication is compared, and the number that connection is created and closed in communication can be largely reduced, thus reduce time of communication at Sheet and bandwidth cost.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described.
Fig. 1 is the flow diagram for the communication means that one embodiment of the invention provides;
Fig. 2 be another embodiment of the present invention provides communication means flow diagram;
Fig. 3 is the structural schematic diagram for the communication device that one embodiment of the invention provides;
Fig. 4 be another embodiment of the present invention provides communication device structural schematic diagram;
Fig. 5 is the structural schematic diagram for the server that one embodiment of the invention provides.
Specific embodiment
In order to make those skilled in the art more fully understand the technical solution in the present invention, implement below in conjunction with the present invention Attached drawing in example, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment Only a part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, the common skill in this field Art personnel every other embodiment obtained without creative efforts belongs to the model that the present invention protects It encloses.
The communication means of one embodiment of the invention is introduced first below.
Communication means provided in an embodiment of the present invention can be applied to the management clothes in system relevant to internet communication It is engaged in device, can specifically include desktop computer, portable computer, internet television, intelligent mobile terminal, server and can Wearable intelligent terminal etc., is not limited thereto, and any server that the embodiment of the present invention may be implemented belongs to the present invention The protection scope of embodiment.Wherein, system relevant to internet communication can be a variety of.Illustratively, which can be with It include: instant communicating system, live broadcast system and audio/video player system etc..
As shown in Figure 1, the process of the communication means of one embodiment of the invention, this method may include steps of:
S101 obtains the clothes that user requests corresponding Edge Server in the user's request for receiving client transmission Business device mark.
In a particular application, in order to inform management server client, there are business demands, so as to management server and visitor The corresponding Edge Server in family end is communicated, and provides clothes corresponding with business demand to client using the Edge Server Business, the navigation server or client that client can dispose in the communication network by system where management server It is used for transmission the communication link of user's request between management server, sends user's request to management server.Wherein, user Request the business demand for showing the client.
Also, the efficiency of service is provided in order to improve to client, different clients can correspond to different edge clothes Business device, correspondingly, client is sending user in order to guarantee to provide service from the corresponding Edge Server of client to client When request, the server identification of corresponding Edge Server can also be sent.Wherein, management server obtains user and requests to correspond to Edge Server server identification mode, specifically can be a variety of.Illustratively, when user request in carry side When the server identification of edge server, management server can read corresponding Edge Server from the received user's request of institute Server identification.Alternatively, it is illustrative, when the server identification of Edge Server is requested independently of user, management service Device can receive the server identification of the Edge Server of client transmission.
The acquisition modes of the server identification of any Edge Server are used equally for the present invention, and the present embodiment does not limit this System.
S102 searches the corresponding long connection of acquired server identification from the multiple long connections pre-established.Its In, the multiple length pre-established are connected as management server before receiving user's request of client transmission, respectively and respectively The long connection that a Edge Server pre-establishes.
In a particular application, it on the multiple long establishment of connection opportunitys pre-established, specifically can be a variety of.It is exemplary , it can be when system completion be established where management server, such as live broadcast system completion is when establishing, before system initialization, Long connection is established with each Edge Server by management server respectively, and saves the information of established long connection, is obtained pre- The multiple long connections first established.Alternatively, it is illustrative, it can be when system be initialized where management server, by managing Server establishes long connection with each Edge Server respectively, and saves the information of established long connection, is pre-established Multiple long connections.Alternatively, system can complete initialization where management server, the user for receiving client transmission is asked Before asking, long connection is established with each Edge Server by management server respectively, and saves the information of established long connection, The multiple long connections pre-established.Certainly, above-mentioned multiple long establishment of connections, can be from management server respectively to each Edge Server is initiated, alternatively, can be initiated from each Edge Server to management server.
Also, long connection can be established using the three-way handshake of TCP, specifically establish mode can be it is a variety of.It is exemplary , long connection can be established based on http protocol (hypertext transfer protocol).At this point, initiating interaction every time, connection by client After foundation, after client receives the feedback of management server, detect comprising long connection in feedback mark " Connection: Keep-alive (connection: when persistently) ", determines that established connection is long connection, does not close the connection.Alternatively, it is illustrative, Long connection can be established by the way of long poll: by the temporary suspension to HTTP request, and working as suspending time-out or non-same When the event of step occurs, the mechanism that the HTTP request being suspended can be restored again, realization need not repeatedly establish connection The long connection of continuous transmission data.
Any mode that can establish the above-mentioned multiple long connections pre-established and opportunity, it is used equally for the present invention, this reality Example is applied to this with no restriction.
Also, in the multiple long connections pre-established, the quantity of the corresponding long connection of each Edge Server can To be a variety of.Illustratively, for each Edge Server, the quantity of the corresponding long connection of the Edge Server can be one It is a.Alternatively, it is illustrative, when transmitting due to any long connection for carrying out the data of a certain business, it is not used to another business Data transmission, therefore, in order to improve the QPS (Query Per Second, concurrency) of system, for each edge service Device, the quantity of the corresponding long connection of the Edge Server can be multiple.
S103, utilizes searched long connection, and Edge Server corresponding with server identification request about user Communication.
When finding the corresponding long connection for requesting corresponding Edge Server to the user of client, management server can Directly to utilize searched long connection, communicated with the Edge Server with corresponding server identification.Also, it should Communication is related to user's request, transmits for carrying out data relevant to the indicated business demand of user's request.At this point, due to Long to be connected as pre-establishing and save, therefore, management server is not necessarily to carry out the operation of creation connection, also, long connection is not It can be attached closing after a data are sent, in contrast can reduce the number for closing connection.
Illustratively, the server identification that corresponding Edge Server is requested with user is ES1, and user requests the industry shown Business demand is to watch the live streaming of main broadcaster A.The multiple long connections pre-established include: the corresponding long connection of server identification ES1 The corresponding long corresponding length of LC2 and server identification ES3 that connects of LC1, server identification ES2 connects LC3.Management server can To utilize searched long connection LC1, transmitted with the Edge Server ES1 data for carrying out the live streaming about main broadcaster A.
In scheme provided in an embodiment of the present invention, management server is in the user's request for receiving client transmission It communicates between corresponding with user's request Edge Server, from the multiple long connections pre-established, searches corresponding The corresponding long connection of server identification, and then using the long connection searched, Edge Server corresponding with server identification carries out Communication about user's request.Wherein, the multiple length pre-established are connected as management server and are receiving client transmission Before user's request, the length established respectively with each Edge Server in advance is connected, it is ensured that server is at each and edge When server communication, without carrying out creation connection, but can directly it be taken using in the multiple long connections pre-established with edge The corresponding long connection of business device is communicated, the number of creation connection when reducing communication.Also, long connection will not be sent out in a data After sending, it is attached closing, in contrast can reduce the number for closing connection.Therefore, with frequently establish it is short connect into The mode of row communication is compared, and the number that connection is created and closed in communication can be largely reduced, thus reduce time of communication at Sheet and bandwidth cost.
Optionally, in the step S103 of aforementioned present invention Fig. 1 embodiment: searched long connection is utilized, with server mark After knowing the communication that corresponding Edge Server progress is requested about the user, communication means provided in an embodiment of the present invention, It can also include the following steps:
Whether the use duration for detecting utilized long connection meets preset overtime use condition;
If it is satisfied, closing utilized long connection.
In a particular application, since long connection is not closed, accordingly, there exist the risks being illegally used.Also, with it is legal Using comparing, illegal user is in order to obtain the data that legitimate user is transmitted using long connection, to the use duration of long connection It is often longer compared with legitimate user.In this regard, in order to reduce long connection leaking data caused by illegally occupying, management service Device can utilize searched long connection, what Edge Server progress corresponding with server identification was requested about the user It after communication, detects to whether the use duration of the long connection utilized meets preset overtime use condition, to connect long It connects and closes utilized long connection when illegal using duration, reduce leaking data.
When the use duration of the long connection utilized meets preset overtime use condition, when showing the use of long connection Long to be likely to the use duration beyond legitimate user, long connection is likely to be illegally occupied, and therefore, management server can close Close utilized long connection.Wherein, whether the use duration for detecting utilized long connection meets preset overtime use condition Mode, can be a variety of.Illustratively, management server can detect whether to connect after the preset duration for starting communication The notice provided about the service of completion that corresponding Edge Server is sent is provided and determines utilized length if do not received The use duration of connection meets the preset overtime use condition of foot.Alternatively, illustrative, management server can start to communicate Preset duration after, detect whether to receive the data transfer request sent by the long connection utilized, if it does, determining The use duration of the long connection utilized meets the preset overtime use condition of foot.Alternatively, it is illustrative, when the long company utilized It is connected in and is taken out since the multiple long connections pre-established in use, after the preset duration that management server can be communicated, It detects whether utilized long connection is stored in the multiple long connections pre-established, if do not saved, determines utilized length The use duration of connection meets the preset overtime use condition of foot.
The mode for whether meeting preset overtime use condition using duration of the utilized long connection of any detection, For the present invention, the present embodiment to this with no restriction.
Optionally, after the long connection that above-mentioned closing is utilized, communication means provided in an embodiment of the present invention can be with Include the following steps:
From the multiple long connections pre-established, closed long connection is deleted;
In the multiple long connections pre-established, there is no the long corresponding length for connecting corresponding Edge Server deleted When connection, the new long connection with the Edge Server is established, and be stored in the multiple long connections pre-established.
In a particular application, the information of the case where being illegally used if there is long connection, length connection is likely to be let out Dew.Therefore, in order to improve the safeties of subsequent communications, management server can be when detecting the use of utilized long connection It is long to meet preset overtime use condition, it closes after utilized long connection, from the multiple long connections pre-established, deletes The long connection closed.On this basis, subsequent between the corresponding Edge Server of long connection that is being deleted in order to guarantee Communication, can be in the multiple long connections pre-established, and there is no the corresponding of the corresponding Edge Server of long connection deleted When length connection, establishes the new length with the Edge Server and connect, and be stored in the multiple long connections pre-established.
Illustratively, the server identification that corresponding Edge Server is requested with user is ES1, and user requests the industry shown Business demand is to watch the live streaming of main broadcaster A, and management server is utilizing searched long connection LC1, is carried out with Edge Server ES1 During the data transmission of live streaming about main broadcaster A, detect that long connection LC1 meets preset overtime use condition, and close Close long connection LC1.At this point, management server can " the corresponding length of server identification ES1 be even from the multiple long connections pre-established LC1 is met, the corresponding long corresponding length of LC2 and server identification ES3 that connects of server identification ES2 connects in LC3 ", deletes length Connect LC1.Also, there is no the corresponding long connections of server identification ES1 in the multiple long connections pre-established at this time, therefore, In order to guarantee subsequent and Edge Server ES1 communication, management server can establish the new long company with Edge Server ES1 LC11 is met, and is stored in the multiple long connections pre-established, the communication for subsequent realization and Edge Server ES1.
As shown in Fig. 2, the process of the communication means of another embodiment of the present invention, this method may include:
S201 obtains the clothes that user requests corresponding Edge Server in the user's request for receiving client transmission Business device mark.
Above-mentioned S201 is the step identical as the S101 of Fig. 1 embodiment of the present invention, and details are not described herein, is detailed in figure of the present invention The description of 1 embodiment.
S202 is searched from the multiple long connections pre-established and is taken out the corresponding length of acquired server identification even It connects.
In a particular application, it is contemplated that another when the occupied data transmission to carry out a certain business of any long connection The unusable length connection of business, management server can be looked into when using long connection from the multiple long connections pre-established It looks for and takes out the corresponding long connection of acquired server identification.There will be no places in the multiple long connections pre-established as a result, In the long connection of use state, to avoid invalid long connection and locating.Illustratively, management server can use method GetConnection (obtains connection), and from the multiple long connections pre-established, it is corresponding to take out acquired server identification Long connection.
S203, utilizes searched long connection, and Edge Server corresponding with server identification request about user Communication.
Above-mentioned S203 is the step identical as the S103 of Fig. 1 embodiment of the present invention, and details are not described herein, is detailed in figure of the present invention The description of 1 embodiment.
The long connection taken out is returned to the multiple length pre-established when the communication requested about user is completed by S204 In connection.
After taking out long connection by step S202, when communication request about preceding user terminates the long use connected, Length connection can be used for the data transmission of another business.Therefore, management server can be complete in the communication requested about user Cheng Shi returns to the long connection taken out in the multiple long connections pre-established, for use in communicating next time.Illustratively, Management server can use method ReleaseConnection (release connection) and be back to the long connection taken out builds in advance In vertical multiple long connections.
Wherein, the method for determination completed about the communication of user's request, can be a variety of.Illustratively, management service Device can receive the notice for the business indicated about completion user's request that corresponding Edge Server is sent.Alternatively, showing Example property, management server can receive the notice about end respective service that corresponding client is sent.It is any about The method of determination that the communication of user's request is completed, is used equally for the present invention, the present embodiment to this with no restriction.
In this alternative embodiment, by taking out long connection, and the long connection of end will be used to be back to and pre-established Multiple long connections, to guarantee that same business is served in long connection.With the availability for showing long connection using available mode information It compares, without carrying out the confirmation of available mode information, the efficiency of communication can be improved.Also, length is connected to a sign off After be not turned off, but be back to and remain communication next time in the multiple long connections pre-established and use, further decrease closing The time overhead of long connection.
Optionally, it obtains the user in the user's request for receiving client transmission in above-mentioned management server and asks After the server identification for seeking corresponding Edge Server, communication means provided in an embodiment of the present invention can also include as follows Step:
According to acquired server identification, user's number of request of the corresponding client of each Edge Server is counted Amount;
For each Edge Server, according to user's number of requests of the Edge Server, to the multiple length pre-established In connection, the corresponding long connection of the Edge Server is updated.
In a particular application, the quantity of the corresponding client of different Edge Servers and user habit etc. there may be The quantity of difference, the business demand for causing different Edge Servers to handle is different.Correspondingly, Edge Server and management service Number of communications between device is also different.In this regard, in order to improve the response efficiency of the utilization rate of long connection and business, management server The server mark that the user requests corresponding Edge Server can be obtained in the user's request for receiving client transmission After knowledge, according to acquired server identification, user's number of requests of the corresponding client of each Edge Server is counted; And then it is directed to each Edge Server, multiple long connections according to user's number of requests of the Edge Server, to pre-establishing In, the corresponding long connection of the Edge Server is updated.
Wherein, according to acquired server identification, the user for counting the corresponding client of each Edge Server is asked Quantity is sought, can be a variety of.Illustratively, management server records acquired clothes when receiving user's request Business device mark, and then it is directed to each Edge Server, the quantity of the server identification of the Edge Server recorded is counted, it will The quantity of the server identification counted, user's number of requests as the corresponding client of the Edge Server.Alternatively, example Property, management server can establish the corresponding relationship of acquired server identification and user's number of requests, every to receive once User's request adds one to user's number of requests, to obtain having the corresponding client of the Edge Server of server identification User's number of requests.
Also, it is directed to each Edge Server, it is more to what is pre-established according to user's number of requests of the Edge Server In a long connection, the corresponding long connection of the Edge Server is updated, and can specifically include: according to each Edge Server The sequence of user's number of requests from big to small sorts to each Edge Server;It is asked respectively with the user for coming preceding specified quantity Seek quantity in contrast more Edge Server, establish the long connection of the first preset quantity, and be stored in pre-establish it is more In a long connection, to increase the in contrast corresponding long connection of more Edge Server of user's number of requests;From pre-establishing Multiple long connections in, delete come rear specified quantity user's number of requests it is in contrast less and there are it is multiple it is long even The long connection of the second preset quantity of the Edge Server connect, to reduce, user's number of requests is in contrast less and presence is more The quantity of the long connection of the Edge Server of a long connection.Wherein, specified quantity, the first preset quantity and the second preset quantity can To be configured according to specific requirements, the present embodiment is not specifically limited this.Certainly, the setting principle of the second preset quantity is Each Edge Server is at least corresponding with a long connection, to guarantee to communicate.
It is right according to user's number of requests of the Edge Server for each Edge Server in this alternative embodiment In the multiple long connections pre-established, the corresponding long connection of the Edge Server is updated.Thus, it is possible to be directed to business demand Quantity in contrast less Edge Server, reduce the quantity of the corresponding long connection of the Edge Server, improve long connection Utilization rate.And it is possible to increase the Edge Server for the quantity in contrast more Edge Server of business demand The quantity of corresponding long connection, improves the response efficiency to business.
Corresponding to above method embodiment, one embodiment of the invention additionally provides communication device.
As shown in figure 3, the communication device of one embodiment of the invention, is applied to management server, the apparatus may include:
Server identification obtains module 301, for obtaining the user in the user's request for receiving client transmission Request the server identification of corresponding Edge Server;
Long connection obtains module 302, for it is corresponding to search the server identification from the multiple long connections pre-established Long connection;Wherein, the multiple length pre-established be connected as management server receive client transmission user ask Before asking, the length pre-established respectively with each Edge Server is connected;
Communication module 303, for utilizing searched long connection, Edge Server corresponding with the server identification into The communication that row is requested about the user.
In scheme provided in an embodiment of the present invention, management server is in the user's request for receiving client transmission It communicates between corresponding with user's request Edge Server, from the multiple long connections pre-established, searches corresponding The corresponding long connection of server identification, and then using the long connection searched, Edge Server corresponding with server identification carries out Communication about user's request.Wherein, the multiple length pre-established are connected as management server and are receiving client transmission Before user's request, the length established respectively with each Edge Server in advance is connected, it is ensured that server is at each and edge When server communication, without carrying out creation connection, but can directly it be taken using in the multiple long connections pre-established with edge The corresponding long connection of business device is communicated, the number of creation connection when reducing communication.Also, long connection will not be sent out in a data After sending, it is attached closing, in contrast can reduce the number for closing connection.Therefore, with frequently establish it is short connect into The mode of row communication is compared, and the number that connection is created and closed in communication can be largely reduced, thus reduce time of communication at Sheet and bandwidth cost.
Optionally, the long connection obtains module 302, is specifically used for:
From the multiple long connections pre-established, searches and take out the corresponding long connection of the server identification;
The communication module module is also used to utilize searched length to connect described, corresponding with the server identification Edge Server carry out communication request about the user after, when the communication completion about user request When, it will be in the multiple long connections that pre-established described in the long connection return that taken out.
As shown in figure 4, the communication device of one embodiment of the invention, is applied to management server, the apparatus may include:
Server identification obtains module 401, for obtaining the user in the user's request for receiving client transmission Request the server identification of corresponding Edge Server;
Long connection obtains module 402, for it is corresponding to search the server identification from the multiple long connections pre-established Long connection;Wherein, the multiple length pre-established be connected as management server receive client transmission user ask Before asking, the length pre-established respectively with each Edge Server is connected;
Communication module 403, for utilizing searched long connection, Edge Server corresponding with the server identification into The communication that row is requested about the user.
Long connection closed module 404, for utilizing searched long connection in the communication module, with the server mark After knowing the communication that corresponding Edge Server progress is requested about the user, the use duration of utilized long connection is detected Whether preset overtime use condition is met;If it is satisfied, closing utilized long connection.
Optionally, the long connection closed module 404, is also used to:
After the utilized long connection of the closing, from the multiple long connections pre-established, deletes and closed Long connection;
In the multiple long connections pre-established, there is no the long phases for connecting corresponding Edge Server deleted When should grow connection, the new long connection with the Edge Server is established, and is stored in the multiple long connections pre-established.
Optionally, described device further include: long connection update module is used for:
When the server identification obtains module and receives user's request of client transmission, user's request is obtained After the server identification of corresponding Edge Server, according to acquired server identification, each Edge Server difference is counted User's number of requests of corresponding client;
It is pre-established according to user's number of requests of the Edge Server to described for each Edge Server Multiple long connections in, the corresponding long connection of the Edge Server is updated.
Corresponding to above-described embodiment, the embodiment of the invention also provides a kind of servers, as shown in figure 5, the server can To include:
Processor 501, communication interface 502, memory 503 and communication bus 504, wherein processor 501, communication interface 502, memory logical 503 crosses communication bus 504 and completes mutual communication;
Memory 503, for storing computer program;
Processor 501 when for executing the computer program stored on above-mentioned memory 503, realizes above-described embodiment In any communication means the step of.
It is understood that in a particular application, the server in the present embodiment is system relevant to internet communication In management server.
In scheme provided in an embodiment of the present invention, management server is in the user's request for receiving client transmission It communicates between corresponding with user's request Edge Server, from the multiple long connections pre-established, searches corresponding The corresponding long connection of server identification, and then using the long connection searched, Edge Server corresponding with server identification carries out Communication about user's request.Wherein, the multiple length pre-established are connected as management server and are receiving client transmission Before user's request, the length established respectively with each Edge Server in advance is connected, it is ensured that server is at each and edge When server communication, without carrying out creation connection, but can directly it be taken using in the multiple long connections pre-established with edge The corresponding long connection of business device is communicated, the number of creation connection when reducing communication.Also, long connection will not be sent out in a data After sending, it is attached closing, in contrast can reduce the number for closing connection.Therefore, with frequently establish it is short connect into The mode of row communication is compared, and the number that connection is created and closed in communication can be largely reduced, thus reduce time of communication at Sheet and bandwidth cost.
Above-mentioned memory may include RAM (Random Access Memory, random access memory), also may include NVM (Non-Volatile Memory, nonvolatile memory), for example, at least a magnetic disk storage.Optionally, memory It can also be that at least one is located away from the storage device of above-mentioned processor.
Above-mentioned processor can be general processor, including CPU (Central Processing Unit, central processing Device), NP (Network Processor, network processing unit) etc.;Can also be DSP (Digital Signal Processor, Digital signal processor), ASIC (Application Specific Integrated Circuit, specific integrated circuit), FPGA (Field-Programmable Gate Array, field programmable gate array) or other programmable logic device are divided Vertical door or transistor logic, discrete hardware components.
The computer readable storage medium that one embodiment of the invention provides, is contained in server, the computer-readable storage Dielectric memory contains computer program, when which is executed by processor, realizes any in above-described embodiment be applied to The step of communication means of management server.
In scheme provided in an embodiment of the present invention, management server is in the user's request for receiving client transmission It communicates between corresponding with user's request Edge Server, from the multiple long connections pre-established, searches corresponding The corresponding long connection of server identification, and then using the long connection searched, Edge Server corresponding with server identification carries out Communication about user's request.Wherein, the multiple length pre-established are connected as management server and are receiving client transmission Before user's request, the length established respectively with each Edge Server in advance is connected, it is ensured that server is at each and edge When server communication, without carrying out creation connection, but can directly it be taken using in the multiple long connections pre-established with edge The corresponding long connection of business device is communicated, the number of creation connection when reducing communication.Also, long connection will not be sent out in a data After sending, it is attached closing, in contrast can reduce the number for closing connection.Therefore, with frequently establish it is short connect into The mode of row communication is compared, and the number that connection is created and closed in communication can be largely reduced, thus reduce time of communication at Sheet and bandwidth cost.
In another embodiment provided by the invention, a kind of computer program product comprising instruction is additionally provided, when it When running on computers, so that computer executes any communication party applied to management server in above-described embodiment Method.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.The computer program Product includes one or more computer instructions.When loading on computers and executing the computer program instructions, all or It partly generates according to process or function described in the embodiment of the present invention.The computer can be general purpose computer, dedicated meter Calculation machine, computer network or other programmable devices.The computer instruction can store in computer readable storage medium In, or from a computer readable storage medium to the transmission of another computer readable storage medium, for example, the computer Instruction can pass through wired (such as coaxial cable, optical fiber, DSL from a web-site, computer, server or data center (Digital Subscriber Line, digital operation maintenance personnel line) or wireless (such as: infrared ray, radio, microwave etc.) mode It is transmitted to another web-site, computer, server or data center.The computer readable storage medium can be Any usable medium that computer can access either includes the integrated server of one or more usable mediums, data center Equal data storage servers.The usable medium can be magnetic medium, (for example, floppy disk, hard disk, tape), optical medium (example Such as: DVD (Digital Versatile Disc, digital versatile disc)) or semiconductor medium (such as: SSD (Solid State Disk, solid state hard disk)) etc..
Herein, relational terms such as first and second and the like be used merely to by an entity or operation with it is another One entity or operation distinguish, and without necessarily requiring or implying between these entities or operation, there are any this reality Relationship or sequence.Moreover, the terms "include", "comprise" or its any other variant are intended to the packet of nonexcludability Contain, so that the process, method, article or the server that include a series of elements not only include those elements, but also wraps Include other elements that are not explicitly listed, or further include for this process, method, article or server intrinsic want Element.In the absence of more restrictions, the element limited by sentence "including a ...", it is not excluded that including described want There is also other identical elements in the process, method of element, article or server.
Each embodiment in this specification is all made of relevant mode and describes, same and similar portion between each embodiment Dividing may refer to each other, and each embodiment focuses on the differences from other embodiments.Especially for device and For server example, since it is substantially similar to the method embodiment, so being described relatively simple, related place is referring to side The part of method embodiment illustrates.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the scope of the present invention.It is all Any modification, equivalent replacement, improvement and so within the spirit and principles in the present invention, are all contained in protection scope of the present invention It is interior.

Claims (10)

1. a kind of communication means, which is characterized in that be applied to management server, which comprises
In the user's request for receiving client transmission, the server mark that the user requests corresponding Edge Server is obtained Know;
From the multiple long connections pre-established, the corresponding long connection of the server identification is searched;Wherein, described to pre-establish Multiple length be connected as management server receive client transmission user request before, respectively with each Edge Server The long connection pre-established;
Searched long connection is utilized, what Edge Server progress corresponding with the server identification was requested about the user Communication.
2. the method according to claim 1, wherein described from the multiple long connections pre-established, lookup institute State the corresponding long connection of server identification, comprising:
From the multiple long connections pre-established, searches and take out the corresponding long connection of the server identification;
Searched long connection is utilized described, Edge Server corresponding with the server identification is carried out about the user After the communication of request, the method also includes:
It is multiple by being pre-established described in the long connection return taken out when the communication about user request is completed In long connection.
3. the method according to claim 1, wherein searched long connection is utilized described, with the service After device identifies the communication that corresponding Edge Server progress is requested about the user, the method also includes:
Whether the use duration for detecting utilized long connection meets preset overtime use condition;
If it is satisfied, closing utilized long connection.
4. according to the method described in claim 3, it is characterized in that, it is described close utilized long connection after, the side Method further include:
From the multiple long connections pre-established, closed long connection is deleted;
In the multiple long connections pre-established, there is no the long corresponding length for connecting corresponding Edge Server deleted When connection, the new long connection with the Edge Server is established, and is stored in the multiple long connections pre-established.
5. method according to any one of claims 1 to 4, which is characterized in that receiving visitor in the management server When user's request that family end is sent, after obtaining the server identification that the user requests corresponding Edge Server, the side Method further include:
According to acquired server identification, user's number of requests of the corresponding client of each Edge Server is counted;
For each Edge Server, according to user's number of requests of the Edge Server, to it is described pre-establish it is more In a long connection, the corresponding long connection of the Edge Server is updated.
6. a kind of communication device, which is characterized in that be applied to management server, described device includes:
Server identification obtains module, for obtaining user's request pair in the user's request for receiving client transmission The server identification for the Edge Server answered;
Length connection obtains module, for searching the corresponding length of the server identification even from the multiple long connections pre-established It connects;Wherein, the multiple length pre-established are connected as management server before receiving user's request of client transmission, The long connection pre-established respectively with each Edge Server;
Communication module, for utilizing searched long connection, Edge Server corresponding with the server identification carry out about The communication of user's request.
7. device according to claim 6, which is characterized in that the long connection obtains module, is specifically used for:
From the multiple long connections pre-established, searches and take out the corresponding long connection of the server identification;
The communication module module is also used to utilize searched long connection, side corresponding with the server identification described It, will when the communication about user request is completed after edge server carries out the communication requested about the user In the multiple long connections pre-established described in the long connection return taken out.
8. device according to claim 6, which is characterized in that described device further include: long connection closed module is used for:
Utilize searched long connection in the communication module, Edge Server corresponding with the server identification carry out about After the communication of user's request, whether the use duration for detecting utilized long connection, which meets preset time-out, uses item Part;If it is satisfied, closing utilized long connection.
9. a kind of server, which is characterized in that including processor, communication interface, memory and communication bus, wherein the place Device, the communication interface are managed, the memory completes mutual communication by bus;The memory is calculated for storing Machine program;The processor is realized for executing the program stored on the memory such as any one of claim 1-5 institute The method and step stated.
10. a kind of computer readable storage medium, which is characterized in that computer program is stored in the storage medium, it is described The method according to claim 1 to 5 step is realized when computer program is executed by processor.
CN201910835905.3A 2019-09-05 2019-09-05 Communication means, device and server Pending CN110493353A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910835905.3A CN110493353A (en) 2019-09-05 2019-09-05 Communication means, device and server

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910835905.3A CN110493353A (en) 2019-09-05 2019-09-05 Communication means, device and server

Publications (1)

Publication Number Publication Date
CN110493353A true CN110493353A (en) 2019-11-22

Family

ID=68556530

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910835905.3A Pending CN110493353A (en) 2019-09-05 2019-09-05 Communication means, device and server

Country Status (1)

Country Link
CN (1) CN110493353A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111225242A (en) * 2020-01-17 2020-06-02 广州酷狗计算机科技有限公司 Video playing disaster tolerance method and device and computer storage medium
CN111262779A (en) * 2020-01-21 2020-06-09 香港乐蜜有限公司 Method, device, server and system for acquiring data in instant messaging
CN116600016A (en) * 2023-07-19 2023-08-15 苏州浪潮智能科技有限公司 Site calling method and device, storage medium and electronic device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5553242A (en) * 1993-11-03 1996-09-03 Wang Laboratories, Inc. Client/server connection sharing
CN102761864A (en) * 2011-04-29 2012-10-31 中国移动通信集团公司 Data transmission method, system and device
CN104142868A (en) * 2013-05-10 2014-11-12 腾讯科技(深圳)有限公司 Connection establishment method and device
CN104462335A (en) * 2014-12-03 2015-03-25 北京和利时系统工程有限公司 Data accessing method and server agent
CN104980419A (en) * 2014-09-11 2015-10-14 腾讯科技(深圳)有限公司 Agent communication method and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5553242A (en) * 1993-11-03 1996-09-03 Wang Laboratories, Inc. Client/server connection sharing
CN102761864A (en) * 2011-04-29 2012-10-31 中国移动通信集团公司 Data transmission method, system and device
CN104142868A (en) * 2013-05-10 2014-11-12 腾讯科技(深圳)有限公司 Connection establishment method and device
CN104980419A (en) * 2014-09-11 2015-10-14 腾讯科技(深圳)有限公司 Agent communication method and device
CN104462335A (en) * 2014-12-03 2015-03-25 北京和利时系统工程有限公司 Data accessing method and server agent

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111225242A (en) * 2020-01-17 2020-06-02 广州酷狗计算机科技有限公司 Video playing disaster tolerance method and device and computer storage medium
CN111262779A (en) * 2020-01-21 2020-06-09 香港乐蜜有限公司 Method, device, server and system for acquiring data in instant messaging
CN116600016A (en) * 2023-07-19 2023-08-15 苏州浪潮智能科技有限公司 Site calling method and device, storage medium and electronic device

Similar Documents

Publication Publication Date Title
US8554827B2 (en) Virtual peer for a content sharing system
CN110493353A (en) Communication means, device and server
US20140307589A1 (en) Method, apparatus and system for determining policy and charging rule function entity
CN102546590A (en) System and method for distributing application traffic to servers based on dynamic service response time
US20090006177A1 (en) Providing ads to unconnected client devices
CN101156407B (en) Method for supplying content through communication network
CN105580385B (en) Channel cut-in method and system
US20190014532A1 (en) Adss enabled global roaming system
US20050144070A1 (en) Method and apparatus for advertising a user interface for configuring, controlling and/or monitoring a service
US20150046830A1 (en) Methods, Device and Social Network Manager for Enabling Interaction with Another Device
CN103279468A (en) System and method for identifying transient friends
JP2018505579A (en) Method, server, and terminal device for deleting push information
EP3547748A1 (en) Method and system for guiding service application traffic
TW201206213A (en) Wireless network system and wireless access point device and wireless terminal device thereof
WO2016127693A1 (en) Service data sending method and storage system
CN102447740A (en) Communication history management method applied to network cloud servers and cloud server
CN111263338A (en) Network distribution method of Bluetooth Mesh network and related network distribution equipment and system
WO2015184823A1 (en) Access control method and device for mobile terminal, and computer storage medium
CN110909030B (en) Information processing method and server cluster
US20100240353A1 (en) Remote control system and facility side control apparatus and control program of facility apparatus and control method of facility apparatus
CN104601644A (en) Service provider determining method, service provider determining device and service provider determining system
US8464331B2 (en) Data transmission management server and method
TWI619031B (en) Metadata server, network device and automatic resource management method
CN107483637B (en) NFS-based client link management method and device
US20160099928A1 (en) Systems and methods for managing connections for universal plug-and-play devices

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
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20210531

Address after: 25, 5th floor, shuangjingfang office building, 3 frisha street, Singapore

Applicant after: Zhuomi Private Ltd.

Address before: Room 1101, Santai Commercial Building, 139 Connaught Road, Hong Kong, China

Applicant before: HONG KONG LIVE.ME Corp.,Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20191122