CN116886561A - Data communication method, device, system, electronic equipment and storage medium - Google Patents
Data communication method, device, system, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN116886561A CN116886561A CN202311034532.2A CN202311034532A CN116886561A CN 116886561 A CN116886561 A CN 116886561A CN 202311034532 A CN202311034532 A CN 202311034532A CN 116886561 A CN116886561 A CN 116886561A
- Authority
- CN
- China
- Prior art keywords
- signaling
- server
- request
- client
- response message
- 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
Links
- 238000004891 communication Methods 0.000 title claims abstract description 99
- 238000000034 method Methods 0.000 title claims abstract description 64
- 230000011664 signaling Effects 0.000 claims abstract description 433
- 230000004044 response Effects 0.000 claims abstract description 164
- 238000001514 detection method Methods 0.000 claims abstract description 52
- 230000007246 mechanism Effects 0.000 claims abstract description 29
- 239000000523 sample Substances 0.000 claims description 131
- 238000012795 verification Methods 0.000 claims description 29
- 230000000694 effects Effects 0.000 abstract description 12
- 230000008569 process Effects 0.000 abstract description 12
- 230000005540 biological transmission Effects 0.000 description 18
- 238000010586 diagram Methods 0.000 description 17
- 230000006870 function Effects 0.000 description 9
- 238000012545 processing Methods 0.000 description 9
- 238000004590 computer program Methods 0.000 description 8
- 238000012216 screening Methods 0.000 description 7
- 230000003287 optical effect Effects 0.000 description 5
- 230000008901 benefit Effects 0.000 description 4
- 230000002452 interceptive effect Effects 0.000 description 4
- 230000009286 beneficial effect Effects 0.000 description 3
- 230000004913 activation Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000012634 fragment Substances 0.000 description 2
- 239000013307 optical fiber Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 238000013475 authorization Methods 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000002708 enhancing effect Effects 0.000 description 1
- 239000000835 fiber Substances 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 238000012546 transfer Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0805—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
- H04L43/0811—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
-
- 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
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Environmental & Geological Engineering (AREA)
- Computer And Data Communications (AREA)
Abstract
The embodiment of the disclosure provides a data communication method, a data communication device, a data communication system, electronic equipment and a storage medium. Wherein the method comprises the following steps: receiving a first signaling request sent by a client based on a load balancer; determining and storing a first signaling context corresponding to the first signaling request, generating a first signaling response message corresponding to the first signaling request, and feeding back the first signaling response message to the client; the first signaling response message comprises a virtual internet protocol address distributed by a load balancing mechanism and a first server identifier of a current server, wherein the first server identifier is used for acquiring a first signaling context, and the first signaling context is used for determining target communication data corresponding to a first signaling request. According to the technical scheme, the effect of feeding back the candidate address of the server and the server identification to the client side simultaneously is achieved, and further, data support is provided for the process of acquiring the signaling context based on the server identification in the subsequent connectivity detection stage.
Description
Technical Field
The embodiment of the disclosure relates to the technical field of data communication, in particular to a data communication method, a device, a system, electronic equipment and a storage medium.
Background
In some application scenarios where data communication is required, content delivery network (Content Delivery Network, CDN) technology is typically employed to distribute the requested data from clients to the various server nodes.
In the related art, a data transmission channel between a client and a server is established, and the client and the same server usually complete signaling negotiation and data transmission, so that data communication between the client and the server can be realized.
However, the above solution requires that each server has a virtual internet protocol address (i.e. a public IP address). In a CDN network, in order to enhance security of internal servers and reduce additional costs brought by public IP resources, a public IP address is generally not allocated to each server. Therefore, it may be impossible to ensure that the signaling channel and the data transmission channel in the data communication scenario are established on the same server, and thus, data communication between the client and the server cannot be achieved.
Disclosure of Invention
The disclosure provides a data communication method, a device, a system, an electronic device and a storage medium, so as to realize the effect of feeding back a server identifier of a server to a client while feeding back a candidate address of the server to the client, and further provide data support for the process of acquiring a signaling context based on the server identifier in the subsequent connectivity detection stage.
In a first aspect, an embodiment of the present disclosure provides a data communication method, including:
receiving a first signaling request sent by a client based on a load balancer;
determining and storing a first signaling context corresponding to the first signaling request, generating a first signaling response message corresponding to the first signaling request, and feeding back the first signaling response message to the client;
the first signaling response message includes a virtual internet protocol address allocated by the load balancing mechanism and a first server identifier of a current server, where the first server identifier is used to obtain the first signaling context, and the first signaling context is used to determine target communication data corresponding to the first signaling request.
In a second aspect, embodiments of the present disclosure further provide a data communication apparatus, the apparatus including:
the signaling request module is used for receiving a first signaling request sent by the client terminal based on the load balancer;
the signaling response module is used for determining and storing a first signaling context corresponding to the first signaling request, generating a first signaling response message corresponding to the first signaling request, and feeding back the first signaling response message to the client, wherein the first signaling response message comprises a virtual internet protocol address distributed by the load balancing mechanism and a first server identifier of a current server, the first server identifier is used for acquiring the first signaling context, and the first signaling context is used for determining target communication data corresponding to the first signaling request.
In a third aspect, embodiments of the present disclosure also provide a data communication system, the system comprising:
the system comprises a client and a server, wherein the server comprises a load balancer and at least two servers; wherein,,
the client is used for sending a signaling request to the load balancer;
the load balancer is used for sending the signaling request to the first server based on a preset load balancing mechanism;
The first server is configured to determine and store a signaling context corresponding to the signaling request, generate a signaling response message corresponding to the signaling request, and feed back the signaling response message to the client, where the signaling response message includes a virtual internet protocol address allocated by the load balancing mechanism and a server identifier of the first server;
the client is further configured to generate a connectivity probe request based on the first signaling response packet, and send the connectivity probe request to the load balancer based on the virtual internet protocol address, where the connectivity probe request carries a server identifier that receives the first server;
the load balancer is further configured to send the connectivity probe request to a second server based on a preset load balancing mechanism;
the second server is configured to obtain the signaling context from the first server based on the server identifier, generate a probe response packet corresponding to the connectivity probe request, feed back the probe response packet to the client, determine target communication data corresponding to the signaling request based on the signaling context, and feed back the target communication data to the client.
In a fourth aspect, an embodiment of the present disclosure further provides an electronic device, including:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement the data communication method as described in any of the embodiments of the present disclosure.
In a fifth aspect, the disclosed embodiments also provide a storage medium containing computer-executable instructions that, when executed by a computer processor, are for performing a data communication method as described in any of the disclosed embodiments.
According to the technical scheme, the effect of forwarding the first signaling request under the condition of ensuring load balance is achieved by receiving the first signaling request sent by the client based on the load balancer, further, the first signaling context corresponding to the first signaling request is determined and stored, the first signaling response message corresponding to the first signaling request is generated, the first signaling response message is fed back to the client, the problem that the signaling channel and the data transmission channel in the data communication scene cannot be established on the same server due to too high IP dependency on the server in the related art is solved, the problem that data communication between the client and the server cannot be achieved is solved, the effect that the server identifier of the server is fed back to the client while the candidate address of the server is fed back to the client is achieved, and further, data support is provided for the process of acquiring the signaling context based on the server identifier in the subsequent connectivity detection stage.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
Fig. 1 is a flow chart of a data communication method according to an embodiment of the disclosure;
fig. 2 is a schematic diagram of a signaling transmission procedure according to an embodiment of the disclosure;
fig. 3 is a flow chart of a data communication method according to an embodiment of the disclosure;
fig. 4 is a schematic diagram of a signaling transmission procedure according to an embodiment of the disclosure;
fig. 5 is a schematic structural diagram of a data communication device according to an embodiment of the disclosure;
fig. 6 is a schematic structural diagram of a data communication system according to an embodiment of the disclosure;
fig. 7 is a schematic diagram of signaling transmission of a data communication system according to an embodiment of the disclosure;
fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
It will be appreciated that prior to using the technical solutions disclosed in the embodiments of the present disclosure, the user should be informed and authorized of the type, usage range, usage scenario, etc. of the personal information related to the present disclosure in an appropriate manner according to the relevant legal regulations.
For example, in response to receiving an active request from a user, a prompt is sent to the user to explicitly prompt the user that the operation it is requesting to perform will require personal information to be obtained and used with the user. Thus, the user can autonomously select whether to provide personal information to software or hardware such as an electronic device, an application program, a server or a storage medium for executing the operation of the technical scheme of the present disclosure according to the prompt information.
As an alternative but non-limiting implementation, in response to receiving an active request from a user, the manner in which the prompt information is sent to the user may be, for example, a popup, in which the prompt information may be presented in a text manner. In addition, a selection control for the user to select to provide personal information to the electronic device in a 'consent' or 'disagreement' manner can be carried in the popup window.
It will be appreciated that the above-described notification and user authorization process is merely illustrative and not limiting of the implementations of the present disclosure, and that other ways of satisfying relevant legal regulations may be applied to the implementations of the present disclosure.
It will be appreciated that the data (including but not limited to the data itself, the acquisition or use of the data) involved in the present technical solution should comply with the corresponding legal regulations and the requirements of the relevant regulations.
Fig. 1 is a schematic flow chart of a data communication method provided by an embodiment of the present disclosure, where the embodiment of the present disclosure is applicable to a situation where a media transmission channel is established between a client and a server, the method may be performed by a data communication device, where the device may be implemented in a form of software and/or hardware, and optionally, implemented by an electronic device, where the electronic device may be a mobile terminal, a PC or a server, etc.
As shown in fig. 1, the method of this embodiment may specifically include:
s110, receiving a first signaling request sent by the client based on the load balancer.
The client refers to a program corresponding to the server and providing local service for the user. Is generally installed on a common user machine and needs to cooperate with a server to operate. Exemplary, commonly used clients include web browsers for use on the world wide web, email clients for receiving email, and client software for instant messaging, among others. In this embodiment, the client may be a video communication client. A load balancer can be understood as a hardware device that distributes network requests to available servers in a server cluster by managing incoming Web page (Web) data traffic and increasing the effective network bandwidth. As will be appreciated by those skilled in the art, load balancing refers to a mechanism that distributes network traffic to multiple backend servers. Through the flow distribution of load balancing, the load of a single server is reduced, and the response time of the application is reduced. The load balancer may include various models, and alternatively, may include a load balancer in a hardware device model, a load balancer integrated in a switching device (interposed between a server and an internet link), or a load balancing function integrated in a PC side in the form of two-block network adapter (one connected to the internet and one connected to an internal network of a back-end server group). It should be noted that, the load balancer may be a hardware device where any load balancing technique is pre-deployed, and alternatively, the pre-deployed load balancing technique may be four-layer load balancing. Four-tier load balancing is the determination of how to distribute requests of clients among a set of servers based on information defined by the network transport layer (four-tier). The four-layer load balancing is to make a load balancing decision according to the source IP address, the target IP address and the port recorded in the HTTP request header in the data packet, without considering the content of the data packet.
The first signaling request may be understood as a request message sent by the client to the server during the signaling phase, the request message being used to coordinate communication between the client and the server. The first signaling request may be any request, and optionally may be any one of a registration request, an attach request, a service request, and a live streaming request.
In practical applications, in order to establish a data transmission channel between a client and a server, the client may send a first signaling request to the server. Furthermore, after receiving the first signaling request, the load balancer at the server may determine an available server from at least one server associated with the load balancer according to a preset screening rule. Further, the received first signaling request may be forwarded to the determined available server based on the load balancer such that the available server responds to the received first signaling request. The available server is understood to be a server that can efficiently process the first signaling request when receiving the first signaling request, and does not affect the response speed of other servers.
It should be noted that, from the time of receiving the first signaling request to the time of sending the first signaling request to the determined available server, the load balancer does not perform any processing on the request message content in the first signaling request. That is, for the signaling request received by the load balancer, only the transmission is performed, and no change or adjustment is made.
S120, determining and storing a first signaling context corresponding to the first signaling request, generating a first signaling response message corresponding to the first signaling request, and feeding back the first signaling response message to the client.
The first signaling context may be understood as a snapshot of the server in the case of receiving the first signaling request, where the snapshot may be used to represent the environment and the state of the server when the server receives the first signaling request. In this embodiment, the first signaling context is used to determine target communication data corresponding to the first signaling request. Those skilled in the art will appreciate that a context, which may be understood as an ordered sequence of attributes, may define an environment for objects residing within the environment. The context is created during the activation of the object, which is configured to require certain automated services such as synchronization, transactions, real-time activation, security, etc. In this embodiment, the first signaling context includes check information and data information. The verification information may be understood as information for performing security verification, and may be understood as a character string to be verified. Alternatively, the verification information may be ICE-ufrag in an interactive connectivity establishment scheme (Interactive Connectivity Establishment, ICE). The ice-ufrag may provide fragments that make up the user name in connectivity detection. The data information may be understood as data response information corresponding to the data request included in the first signaling request. It should be noted that the data information may be data information negotiated between the client and the server, where the data information may include any information, and optionally may include at least one of data format information, data version information, and a data acquisition path.
The first signaling response message may be understood as a message that characterizes a response condition of the server to the first signaling request. The first signaling response message includes the virtual internet protocol address assigned by the load balancer and the first server identification of the current server. The virtual internet protocol Address (Virtual Internet Protocol Address) may be understood as an Address corresponding to the virtual internet, i.e., a public network IP Address connecting a plurality of servers. The virtual internet protocol address may be a virtual IP address of the public network where the current server is located. The current server may be understood as an available server determined by the load balancer from at least one server associated with the current server according to a preset screening rule after receiving the first signaling request; alternatively, it may be understood as a server receiving the first signaling request. The preset screening rule may be a rule set in advance for screening an available server. Optionally, the preset screening rule may be determined according to available capacity of the server; or determining according to the response speed of the server; or, as determined by the server data processing capabilities, etc.
The first server identifier may be understood as an identifier that characterizes the location of the current server. The first server identification may be used to locate the current server. In this embodiment, the first server identification may also be used to obtain the first signaling context. It should be noted that the first server identifier may be any type of identifier, and alternatively, may be an original server identifier of the current server or an encrypted server identifier obtained by encrypting the original server identifier. The original server identification may be understood as an unprocessed server identification. Alternatively, the origin server identification may comprise a server internet protocol address and/or a server number. The server internet protocol address may be understood as the IP address of the current server. The server internet protocol address may be the private IP address of the current server. The IP address is a unified address format provided by the IP protocol, which allocates a logical address to each network and each server on the internet, so as to mask the difference of physical addresses. In short, the server internet protocol address may be a string arranged according to a preset rule. The server number may be understood as a unique identification of the server. One server number corresponds to one server. Alternatively, the server number may be a number, letter, or other character. In practical application, in order to prevent the condition that the server identifier is leaked because the message information is intercepted, the original server identifier may be encrypted, and then the encrypted server identifier may be obtained. It should be noted that, the encryption processing may be performed on the original server identifier by using a preset encryption algorithm, or may be performed on the original server identifier by using other manners, which is not limited in particular in the embodiment of the present disclosure. The preset encryption algorithm may be any encryption algorithm, and alternatively, may be a symmetric encryption algorithm.
In practical application, after receiving the first signaling request, the first signaling context corresponding to the first signaling request may be determined according to the request information included in the first signaling request, and the determined first signaling context may be stored in the current server that receives the first signaling request. Further, a first signaling response message corresponding to the first signaling request may be generated according to the first signaling request. Thus, the generated first signaling response message can be fed back to the client.
Optionally, generating a first signaling response message corresponding to the first signaling request includes: determining a candidate address corresponding to the first signaling request based on the virtual internet protocol address; generating verification information based on the first server identification; and generating a first signaling response message corresponding to the first signaling request based on the candidate address and the verification information.
Where the candidate address may be understood as a virtual internet protocol address that may be responsive to the first signaling request. The number of candidate addresses may be one or more, and the embodiment of the present disclosure is not limited in detail. The verification information may be understood as information for performing security verification. Alternatively, the verification information may be an attribute value of the ICE-ufrag attribute in the interactive connectivity establishment mode (Interactive Connectivity Establishment, ICE). The ice-ufrag may provide fragments that make up the user name in connectivity detection.
In practical applications, in the case that the current server receives the first signaling request, a candidate address that can respond to the first signaling request may be determined according to the first signaling request and the virtual internet protocol address. Further, a first server identifier of the current server may be obtained, and verification information may be generated according to the first server identifier. It should be noted that the verification information may be obtained after the pre-generated random number is spliced with the first server identifier, or may be generated in other manners according to the first server, which is not specifically limited in the embodiment of the present disclosure. It should be noted that, the advantage of using the random number to generate the verification information is that: the invalid connectivity detection message can be filtered in the subsequent connectivity verification process, and the validity is verified.
Further, after the candidate address and the check information are obtained, the candidate address and the check information may be written into the row corresponding to the response message, so as to obtain the first signaling response message corresponding to the first signaling request. The advantages of this arrangement are that: the first signaling response message can be ensured to comprise the candidate address and the verification information, so that the server to be sent can be determined according to the candidate address in the subsequent connectivity detection stage, and the security verification can be performed according to the verification information. At the same time, the connectivity probe request in the connectivity probe phase can also be ensured to comprise the server internet protocol address of the signaling phase server.
Fig. 2 is a schematic diagram illustrating a signaling procedure between a client and a server. As shown in fig. 2, the server 1 may be regarded as the current server. Firstly, a client creates a first signaling request (namely SDP offer in figure 2) and sends the first signaling request to a server; further, the server 1 in the server receives the first signaling request, generates a first signaling response message (i.e., SDP answer in fig. 2) corresponding to the first signaling request, determines a first signaling context corresponding to the first signaling request, and stores the first signaling context in the server 1; and then, feeding back a signaling response to the client, and feeding back a first signaling response message to the client.
According to the technical scheme, the effect of forwarding the first signaling request under the condition of ensuring load balance is achieved by receiving the first signaling request sent by the client based on the load balancer, further, the first signaling context corresponding to the first signaling request is determined and stored, the first signaling response message corresponding to the first signaling request is generated, the first signaling response message is fed back to the client, the problem that the signaling channel and the data transmission channel in the data communication scene cannot be established on the same server due to too high IP dependency on the server in the related art is solved, the problem that data communication between the client and the server cannot be achieved is solved, the effect that the server identifier of the server is fed back to the client while the candidate address of the server is fed back to the client is achieved, and further, data support is provided for the process of acquiring the signaling context based on the server identifier in the subsequent connectivity detection stage.
Fig. 3 is a flowchart of a data communication method according to an embodiment of the disclosure. Based on the above embodiments, the technical solution of the present embodiment is to send, to the server, a connectivity probe request again when the client receives the signaling response packet, so as to establish a data transmission channel between the client and the server when the client receives the probe response packet corresponding to the connectivity probe request. Reference is made to the description of this example for a specific implementation. The technical features that are the same as or similar to those of the foregoing embodiments are not described herein.
As shown in fig. 3, the method of this embodiment may specifically include:
s210, receiving a first signaling request sent by the client based on the load balancer.
S220, determining and storing a first signaling context corresponding to the first signaling request, generating a first signaling response message corresponding to the first signaling request, and feeding back the first signaling response message to the client.
And S230, receiving a connectivity detection request sent by the client based on the virtual Internet protocol address, wherein the connectivity detection request is generated by the client according to a second signaling response message corresponding to the second signaling request, and the connectivity detection request carries a second server identifier of a target server receiving the second signaling request.
The connectivity probe request may be understood as a request message sent by the client to the server in the connectivity probe stage. The second signaling request may be understood as a request message received by the target server during the signaling phase. The target server may be understood as a server, from which the load balancer determines from at least one server associated with the load balancer according to a preset screening rule after receiving the second signaling request. Accordingly, the second server identifier may be understood as an identifier that characterizes the location of the target server. The second server identification may be used to locate the target server. The second server identifier may be the original server identifier of the target server or an encrypted server identifier obtained by encrypting the original server identifier, which is the same as the first server identifier.
In practical application, the target server receives a second signaling request sent by the client based on the load balancer. And further, generating a second signaling response message corresponding to the second signaling request and feeding back the second signaling response message to the client. Further, the client generates a request message for requesting connectivity detection according to the received second signaling response message, and takes the request message as a connectivity detection request message.
Note that, the current server corresponding to the first signaling request and the target server corresponding to the second signaling request may be the same server or different servers, and the embodiment of the present disclosure is not limited in detail. It should also be noted that references to "first" and "second" in the embodiments of the present disclosure do not indicate any order, quantity, or importance, but rather, the corresponding target subjects are different.
In practical application, after the client receives the second signaling response message fed back by the target server, the connectivity detection stage can be entered. The client may generate a connectivity probe request from the received second signaling response message. Since the second signaling response message includes the candidate address determined based on the virtual internet protocol address. Thus, after generating the connectivity probe request, the client may send the connectivity probe request to the server according to the candidate address. It should be noted that, in the case that the number of candidate addresses is one, the client may directly send the connectivity probe request to the server according to the virtual internet protocol address corresponding to the candidate address. In the case where the number of candidate addresses is plural, the plural received candidate addresses may be first arranged according to a predetermined address arrangement rule. And then, sequentially sending the connectivity detection requests to the server according to the arranged candidate addresses until detection response messages corresponding to the connectivity detection requests are received.
Further, after receiving the connectivity probe request, the load balancer at the server may determine, according to a preset screening rule, that the corresponding server may be performed on the connectivity probe request from at least one server associated with the load balancer. Further, a connectivity probe request is sent to the determined server.
S240, acquiring a second signaling context corresponding to the connectivity probe request from the target server based on the second server identifier, so as to determine target communication data corresponding to the second signaling request based on the second signaling context, and feeding back the target communication data to the client.
Wherein the second signaling context may be a signaling context generated from the second signaling request and stored in the target server. The second signaling context is used to determine target communication data corresponding to the second signaling request.
In practical application, after receiving the connectivity probe request, the second server identifier corresponding to the target server carried in the connectivity probe request may be obtained. The target server may then be determined from the second server identification. Further, a signaling context acquisition request may be sent to the target server, so that, when the target server receives the signaling context acquisition request, a second signaling context stored in advance is sent to the server corresponding to the connectivity probe request.
Optionally, acquiring the second signaling context corresponding to the connectivity probe request from the target server based on the second server identifier includes: analyzing the connectivity probe request to obtain a second server identifier, and determining a server Internet protocol address of the target server based on the second server identifier; generating a context acquisition request corresponding to the connectivity probe request, and sending the context acquisition request to a target server based on a server internet protocol address; and receiving a second signaling context corresponding to the context acquisition request fed back by the target server.
The context acquisition request may be understood as a request message for acquiring a signaling context. It should be noted that the protocol format of the context acquisition request may not be limited to the HTTP protocol or JSON format, and any text transmission protocol and format are possible.
In practical application, for a server that receives a connectivity probe request, after receiving the connectivity probe request, the connectivity probe request may be parsed to obtain a second server identifier carried in the connectivity probe request. The second server identification may then be processed to determine the server internet protocol address of the target server. It should be noted that, in the case that the second server identifier is the original server identifier of the target server, the server internet protocol address of the target server may be directly determined according to the second server identifier. In the case that the second server identifier is an encrypted server identifier of the target server, the second server identifier may be decrypted, and further, a server internet protocol address of the target server may be determined according to the decrypted identifier information.
Further, after determining the server internet protocol address of the target server, a context acquisition request for acquiring the signaling context may be generated. Further, a context acquisition request is sent to the target server according to the determined server internet protocol address. Thereafter, in case the target server receives the context acquisition request, a pre-stored second signaling context may be invoked. And feeding back the fetched second signaling context to the server sending the context acquisition request, so that the server can determine target communication data corresponding to the second signaling request based on the second signaling context, and feed back the target communication data to the client. The advantages of this arrangement are that: the sharing of signaling contexts among servers in the same cluster is realized, and further, the effect of data communication between the client and the servers can be realized even if the signaling stage and the connectivity detection stage correspond to different servers.
S250, generating a detection response message corresponding to the connectivity detection request, and feeding back the detection response message to the client.
The probe response message may be understood as a message characterizing a response situation of the server to the received connectivity probe request.
In practical applications, for a server that receives a connectivity probe request, after the second signaling context is acquired, it may be determined that connectivity probe is successful. Further, a probe response message corresponding to the connectivity probe request may be generated, and the probe response message may be fed back to the client. After the client receives the probe response message, the establishment of a data transmission channel between the client and the server can be determined.
It should be noted that, in practical application, the process of feeding back the signaling request to the client to the corresponding target communication data may be performed after the probe response message is fed back to the client, or may be performed after the signaling context fed back by the target server is acquired and before the probe response message is fed back to the client, which is not limited in particular in the embodiments of the present disclosure. After the probe response message is fed back to the client, the establishment of a data transmission channel between the client and the server can be determined. In this case, the feedback time for the target communication data may not be particularly limited, and the client may request the target communication data from the server at any timing.
In practical applications, after receiving the second signaling context and before generating the probe response message, security or validity check may also be performed on the second signaling context and the connectivity probe request. Further, when the verification passes, a probe response message corresponding to the connectivity probe request is generated.
In this embodiment, the second signaling context includes check information in a second signaling response message. The verification information includes a second server identification of the target server. Optionally, generating a probe response message corresponding to the connectivity probe request includes: and under the condition that the second server identifier carried by the connectivity probe request is consistent with the attribute value of the second server identifier in the second signaling context, generating a probe response message corresponding to the connectivity probe request.
In practical applications, for a server that receives a connectivity probe request, after receiving the second signaling context, the second signaling context may be parsed. Further, a second server identification in a second signaling context may be obtained. Then, the second server identifier in the second signaling context and the second server identifier carried by the connectivity probe request may be matched. And under the condition that the attribute values of the two second server identifications are consistent, determining that the verification is passed, and generating a detection response message corresponding to the connectivity detection request.
Fig. 4 is a schematic diagram illustrating a signaling procedure between a client and a server. As shown in fig. 4, the server 2 may be the target server, and the server 1 may be the current server. Firstly, the client creates a second signaling request (namely SDP offer in fig. 4) and sends the second signaling request to the server; further, the server 2 in the server receives the second signaling request, generates a second signaling response message (i.e., SDP answer in fig. 4) corresponding to the second signaling request, determines a second signaling context corresponding to the second signaling request, and stores the second signaling context in the server 2; and then, feeding back a signaling response to the client, and feeding back a second signaling response message to the client. Further, the client may generate a connectivity probe request (i.e. STUN Binding Request in fig. 4) according to the received second signaling message, and send the connectivity probe request to the server; further, the server 1 in the server receives the connectivity probe request, determines a server internet protocol address of the server 2 according to the server identifier of the server 2 carried in the connectivity probe request, and generates a context acquisition request; further, a context acquisition request is transmitted to the server 2 according to the determined server internet protocol address of the server 2; after that, the second signaling context fed back by the server 2 is received, and the received second signaling context is set in the server 1. Then, a probe response message corresponding to the connectivity probe request can be generated, and the probe response message is fed back to the client. Finally, in the case that the client receives the probe response message, the establishment of the media channel between the client and the server 1 is determined.
According to the technical scheme, a first signaling request sent by a client based on a load balancer is received, then a first signaling context corresponding to the first signaling request is determined and stored, a first signaling response message corresponding to the first signaling request is generated, the first signaling response message is fed back to the client, further, a connectivity probe request sent by the client based on a virtual internet protocol address is received, wherein the connectivity probe request is generated by the client according to a second signaling response message corresponding to a second signaling request, the connectivity probe request carries a second server identifier of a target server receiving the second signaling request, then the second signaling context corresponding to the connectivity probe request is acquired from the target server based on the second server identifier, target communication data corresponding to the second signaling request is determined based on the second signaling context, the target communication data is fed back to the client, finally, a probe response message corresponding to the connectivity probe request is generated, and the probe response message is fed back to the client, so that the connectivity probe response message is realized in the same cluster service nodes, and the same service stage and the same as the service stage can realize the communication effect even if the service nodes and the service stage can be shared with the same service stage.
Fig. 5 is a schematic structural diagram of a data communication device according to an embodiment of the present disclosure, as shown in fig. 5, where the device includes: a signaling request module 310 and a signaling response module 320.
The signaling request module 310 is configured to receive a first signaling request sent by a client based on a load balancer; the signaling response module 320 is configured to determine and store a first signaling context corresponding to the first signaling request, generate a first signaling response packet corresponding to the first signaling request, and feed back the first signaling response packet to the client, where the first signaling response packet includes a virtual internet protocol address allocated by the load balancing mechanism and a first server identifier of a current server, where the first server identifier is used to obtain the first signaling context, and the first signaling context is used to determine target communication data corresponding to the first signaling request.
Based on the above technical solutions, the signaling response module 320 includes: candidate address determining unit, check information generating unit and signaling response message generating unit.
A candidate address determining unit configured to determine a candidate address corresponding to the first signaling request based on the virtual internet protocol address;
The verification information generation unit is used for generating verification information based on the first server identification;
and the signaling response message generating unit is used for generating a first signaling response message corresponding to the first signaling request based on the candidate address and the verification information.
On the basis of the technical schemes, the first server identifier is an original server identifier of the current server or an encrypted server identifier obtained by encrypting the original server identifier, and the original server identifier comprises a server internet protocol address and/or a server number.
On the basis of the above technical solutions, the first signaling context includes the check information and data information, and the data information includes at least one of data format information, data version information and a data acquisition path.
On the basis of the technical schemes, the device further comprises: the system comprises a detection request receiving module, a signaling context acquisition module and a detection response message generation module.
The detection request receiving module is used for receiving a connectivity detection request sent by the client based on the virtual internet protocol address, wherein the connectivity detection request is generated by the client according to a second signaling response message corresponding to a second signaling request, and the connectivity detection request carries a second server identifier of a target server for receiving the second signaling request;
A signaling context obtaining module, configured to obtain, from the target server, a second signaling context corresponding to the connectivity probe request based on the second server identifier, so as to determine, based on the second signaling context, target communication data corresponding to the second signaling request, and feed back the target communication data to the client;
and the detection response message generation module is used for generating a detection response message corresponding to the connectivity detection request and feeding back the detection response message to the client.
On the basis of the above technical solutions, the signaling context acquisition module includes: the device comprises a server internet protocol address determining unit, a context acquisition request generating unit and a signaling context receiving unit.
A server internet protocol address determining unit, configured to parse the connectivity probe request, obtain the second server identifier, and determine a server internet protocol address of the target server based on the second server identifier;
a context acquisition request generating unit, configured to generate a context acquisition request corresponding to the connectivity probe request, and send the context acquisition request to the target server based on the server internet protocol address;
And the signaling context receiving unit is used for receiving a second signaling context corresponding to the context acquisition request and fed back by the target server.
On the basis of the above technical solutions, the second signaling context includes check information in the second signaling response message, where the check information includes a second server identifier of the target server;
and the detection response message generation module is specifically configured to generate a detection response message corresponding to the connectivity detection request when the second server identifier carried by the connectivity detection request is consistent with the attribute value of the second server identifier in the second signaling context.
According to the technical scheme, the effect of forwarding the first signaling request under the condition of ensuring load balance is achieved by receiving the first signaling request sent by the client based on the load balancer, further, the first signaling context corresponding to the first signaling request is determined and stored, the first signaling response message corresponding to the first signaling request is generated, the first signaling response message is fed back to the client, the problem that the signaling channel and the data transmission channel in the data communication scene cannot be established on the same server due to too high IP dependency on the server in the related art is solved, the problem that data communication between the client and the server cannot be achieved is solved, the effect that the server identifier of the server is fed back to the client while the candidate address of the server is fed back to the client is achieved, and further, data support is provided for the process of acquiring the signaling context based on the server identifier in the subsequent connectivity detection stage.
The data communication device provided by the embodiment of the disclosure can execute the data communication method provided by any embodiment of the disclosure, and has the corresponding functional modules and beneficial effects of the execution method.
It should be noted that each unit and module included in the above apparatus are only divided according to the functional logic, but not limited to the above division, so long as the corresponding functions can be implemented; in addition, the specific names of the functional units are also only for convenience of distinguishing from each other, and are not used to limit the protection scope of the embodiments of the present disclosure.
Fig. 6 is a schematic structural diagram of a data communication system according to an embodiment of the disclosure, as shown in fig. 6, where the system includes: client 410 and server 420. The server 420 includes a load balancer 421 and at least two servers.
Wherein, the client 410 is configured to send a signaling request to the load balancer 421; a load balancer 421 for sending a signaling request to the first server 422 based on a preset load balancing mechanism; the first server 422 is configured to determine and store a signaling context corresponding to the signaling request, generate a signaling response message corresponding to the signaling request, and feed back the signaling response message to the client 410, where the signaling response message includes a virtual internet protocol address allocated by the load balancing mechanism and a server identifier of the first server 422; the client 410 is further configured to generate a connectivity probe request based on the signaling response message, and send the connectivity probe request to the load balancer 421 based on the virtual internet protocol address, where the connectivity probe request carries a server identifier of the receiving first server 422; the load balancer 421 is further configured to send a connectivity probe request to the second server 423 based on a preset load balancing mechanism; the second server 423 is configured to obtain the signaling context from the first server 422 based on the server identifier, generate a probe response message corresponding to the connectivity probe request, feed back the probe response message to the client 410, determine target communication data corresponding to the signaling request based on the signaling context, and feed back the target communication data to the client 410.
In this embodiment, the preset load balancing mechanism may be understood as a mechanism that is preset and used to distribute the received network request to multiple servers in a balanced manner. The load balancing mechanism is a horizontal expansion mode, is established on the existing network structure, and provides an effective and transparent method for expanding the bandwidth of network equipment and servers, increasing throughput, enhancing network data processing capacity and improving flexibility and usability of the network. The first server 422 may be understood as a server that receives and responds to signaling requests. The second server 423 may be understood as a server that receives and responds to connectivity probe requests. It should be noted that, the first server 422 and the second server 423 may be the same server or different servers, which is not particularly limited in the embodiments of the present disclosure.
In practical applications, during the signaling phase, the client 410 may generate a signaling request, and send the signaling request to the load balancer 421 of the server 420. After that, after receiving the signaling request, the load balancer 421 may determine the first server 422 from the associated at least one server according to a preset load balancing mechanism, and send the received signaling request to the first server 422. After that, after the first server 422 receives the signaling request, a signaling context corresponding to the signaling request may be determined and stored in the first server 422, and a signaling response message corresponding to the signaling request is generated, and the generated signaling response message is fed back to the client 410.
Further, during the connectivity probe phase, the client 410 may generate a connectivity probe request according to the received signaling context, and send the connectivity probe request to the load balancer 421 of the server 420 based on the virtual internet protocol address included in the signaling response message. After that, the load balancer 421 may determine the second server 423 from the associated at least one server according to a preset load balancing mechanism after receiving the connectivity probe request, and send the connectivity probe request to the second server 423. After receiving the connectivity probe request, the second server 423 may parse the connectivity probe request to obtain a server identifier of the first server 422 carried by the connectivity probe request, and determine a server internet protocol address of the first server 422 according to the server identifier. Further, a context acquisition request is generated and sent to the first server 422 according to the server internet protocol address of the first server 422. Then, the signaling context fed back by the first server 422 is received, a probe response message corresponding to the connectivity probe request is generated, and the probe response message is fed back to the client 410. And, the second server 423 may determine target communication data corresponding to the signaling request according to the signaling context after receiving the signaling context, and feed back the target communication data to the client 410.
Fig. 7 is a schematic diagram illustrating a signaling procedure according to an alternative embodiment of the disclosed embodiments. As shown in fig. 7, the server side includes four layers of load balancing and N servers associated with the four layers of load balancing, which are server 1, server 2, …, and server N, respectively. The service 1 may be used as a first server, the server N may be used as a second server, and the signaling request is a signaling request of live broadcast and pull stream, and the signaling transmission process of the signaling stage and the connectivity detection stage may be described below:
1. and the client sends a signaling request of live broadcast streaming to the server.
2. After receiving the signaling request, the four-layer load balancing in the server side can determine the server 1 in the associated N servers according to a preset load balancing mechanism, and forward the signaling request to the server 1.
3. The server 1 may generate a signaling response message (i.e., SDP answer in fig. 7) according to the signaling request, and feed back to the client terminal. Meanwhile, the server 1 may determine a signaling context according to the signaling request and store it. The signaling context includes negotiated media information and verification information (ice-pwd and ice-ufrag). SDP answer may include a candidate address line (i.e., a=candidate line) and a check information line (i.e., a=ice-ufrag line). After receiving the signaling request, a candidate address corresponding to the signaling request may be determined according to the virtual internet protocol address, and the determined candidate address may be written into the candidate address line, resulting in a=candidate: [ vip ]. Wherein [ vip ] is a candidate address corresponding to the signaling request; and generating a random number and splicing the server internet protocol address of the server 1 to obtain the verification information and writing the verification information row to obtain a=ice-ufrag: [ server 1ip ]. The "server 1 ip" is a string obtained after the random number is spliced with the server internet protocol address of the server 1.
4. After receiving the signaling response message, the client sends a connectivity probe request (i.e. STUN Binding Request in fig. 7) to the server for connectivity probing. Wherein STUN Binding Request includes the USERNAME attribute. The verification information in the signaling response message can be used as the attribute value of the USERNAME, and the USERNAME: [ server 1ip ] can be obtained.
5. After receiving the connectivity probe request, the four-layer load balancing in the server side can determine a server N in the associated N servers according to a preset load balancing mechanism, and forward the connectivity probe request to the server N.
6. After receiving the connectivity probe request, the server N may extract the server internet protocol address of the server 1 in the USERNAME attribute of the connectivity probe request, and send the generated context acquisition request to the server 1 according to the server internet protocol address of the server 1.
7. The server 1 feeds back a signaling context to the server N in response to the context acquisition request of the server N.
8. After receiving the complete signaling context, the server N generates a probe response message (i.e. STUN Binding Response in fig. 7) corresponding to the connectivity probe request and feeds it back to the client.
According to the technical scheme, the effect of forwarding the first signaling request under the condition of ensuring load balance is achieved by receiving the first signaling request sent by the client based on the load balancer, further, the first signaling context corresponding to the first signaling request is determined and stored, the first signaling response message corresponding to the first signaling request is generated, the first signaling response message is fed back to the client, the problem that the signaling channel and the data transmission channel in the data communication scene cannot be established on the same server due to too high IP dependency on the server in the related art is solved, the problem that data communication between the client and the server cannot be achieved is solved, the effect that the server identifier of the server is fed back to the client while the candidate address of the server is fed back to the client is achieved, and further, data support is provided for the process of acquiring the signaling context based on the server identifier in the subsequent connectivity detection stage.
The data communication system provided by the embodiment of the present disclosure may perform the data communication method provided by any embodiment of the present disclosure, and the embodiment has the same beneficial effects as the above-described embodiment.
Fig. 8 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure. Referring now to fig. 8, a schematic diagram of an electronic device (e.g., a terminal device or server in fig. 8) 500 suitable for use in implementing embodiments of the present disclosure is shown. The terminal devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and the like, and stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 8 is merely an example and should not be construed to limit the functionality and scope of use of the disclosed embodiments.
As shown in fig. 8, the electronic device 500 may include a processing means (e.g., a central processing unit, a graphics processor, etc.) 501, which may perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM 503, various programs and data required for the operation of the electronic apparatus 500 are also stored. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An edit/output (I/O) interface 505 is also connected to bus 504.
In general, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; an output device 507 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 508 including, for example, magnetic tape, hard disk, etc.; and communication means 509. The communication means 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. While fig. 8 shows an electronic device 500 having various means, it is to be understood that not all of the illustrated means are required to be implemented or provided. More or fewer devices may be implemented or provided instead.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a non-transitory computer readable medium, the computer program comprising program code for performing the method shown in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 509, or from the storage means 508, or from the ROM 502. The above-described functions defined in the methods of the embodiments of the present disclosure are performed when the computer program is executed by the processing device 501.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
The electronic device provided by the embodiment of the present disclosure and the data communication method provided by the foregoing embodiment belong to the same inventive concept, and technical details not described in detail in the present embodiment may be referred to the foregoing embodiment, and the present embodiment has the same beneficial effects as the foregoing embodiment.
The present disclosure provides a computer storage medium having stored thereon a computer program which, when executed by a processor, implements the data communication method provided by the above embodiments.
It should be noted that the computer readable medium described in the present disclosure may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this disclosure, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present disclosure, however, the computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with the computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, fiber optic cables, RF (radio frequency), and the like, or any suitable combination of the foregoing.
In some implementations, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol ), and may be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the internet (e.g., the internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed networks.
The computer readable medium may be contained in the electronic device; or may exist alone without being incorporated into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: receiving a first signaling request sent by a client based on a load balancer; determining and storing a first signaling context corresponding to the first signaling request, generating a first signaling response message corresponding to the first signaling request, and feeding back the first signaling response message to the client; the first signaling response message includes a virtual internet protocol address allocated by the load balancing mechanism and a first server identifier of a current server, where the first server identifier is used to obtain the first signaling context, and the first signaling context is used to determine target communication data corresponding to the first signaling request.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including, but not limited to, an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units involved in the embodiments of the present disclosure may be implemented by means of software, or may be implemented by means of hardware. The name of the unit does not in any way constitute a limitation of the unit itself, for example the first acquisition unit may also be described as "unit acquiring at least two internet protocol addresses".
The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: a Field Programmable Gate Array (FPGA), an Application Specific Integrated Circuit (ASIC), an Application Specific Standard Product (ASSP), a system on a chip (SOC), a Complex Programmable Logic Device (CPLD), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, there is provided a data communication method, the method comprising:
receiving a first signaling request sent by a client based on a load balancer;
determining and storing a first signaling context corresponding to the first signaling request, generating a first signaling response message corresponding to the first signaling request, and feeding back the first signaling response message to the client;
the first signaling response message includes a virtual internet protocol address allocated by the load balancing mechanism and a first server identifier of a current server, where the first server identifier is used to obtain the first signaling context, and the first signaling context is used to determine target communication data corresponding to the first signaling request.
According to one or more embodiments of the present disclosure, there is provided a method of example one, further comprising:
optionally, the generating a first signaling response message corresponding to the first signaling request includes:
determining a candidate address corresponding to the first signaling request based on the virtual internet protocol address;
generating verification information based on the first server identification;
And generating a first signaling response message corresponding to the first signaling request based on the candidate address and the verification information.
According to one or more embodiments of the present disclosure, there is provided a method of example two, further comprising:
optionally, the first server identifier is an original server identifier of the current server or an encrypted server identifier obtained by encrypting the original server identifier, where the original server identifier includes a server internet protocol address and/or a server number.
According to one or more embodiments of the present disclosure, there is provided a method of example two, further comprising:
optionally, the first signaling context includes the check information and data information, and the data information includes at least one of data format information, data version information, and a data acquisition path.
According to one or more embodiments of the present disclosure, there is provided a method of example one [ example five ], further comprising:
optionally, the method further comprises: receiving a connectivity probe request sent by the client based on the virtual internet protocol address, wherein the connectivity probe request is generated by the client according to a second signaling response message corresponding to a second signaling request, and the connectivity probe request carries a second server identifier of a target server for receiving the second signaling request;
Acquiring a second signaling context corresponding to the connectivity probe request from the target server based on the second server identifier, so as to determine target communication data corresponding to the second signaling request based on the second signaling context, and feeding back the target communication data to the client;
and generating a detection response message corresponding to the connectivity detection request, and feeding back the detection response message to the client.
According to one or more embodiments of the present disclosure, there is provided a method of example five, further comprising:
optionally, the obtaining, based on the second server identifier, a second signaling context corresponding to the connectivity probe request from the target server includes:
analyzing the connectivity probe request to obtain the second server identifier, and determining a server internet protocol address of the target server based on the second server identifier;
generating a context acquisition request corresponding to the connectivity probe request, and sending the context acquisition request to the target server based on the server internet protocol address;
And receiving a second signaling context corresponding to the context acquisition request fed back by the target server.
According to one or more embodiments of the present disclosure, there is provided a method of example five, further comprising:
optionally, the second signaling context includes check information in the second signaling response message, where the check information includes a second server identifier of the target server;
the generating a probe response message corresponding to the connectivity probe request includes:
and generating a detection response message corresponding to the connectivity detection request under the condition that the second server identifier carried by the connectivity detection request is consistent with the attribute value of the second server identifier in the second signaling context.
According to one or more embodiments of the present disclosure, there is provided a data communication apparatus [ example eight ], the apparatus comprising:
the signaling request module is used for receiving a first signaling request sent by the client terminal based on the load balancer;
the signaling response module is used for determining and storing a first signaling context corresponding to the first signaling request, generating a first signaling response message corresponding to the first signaling request, and feeding back the first signaling response message to the client, wherein the first signaling response message comprises a virtual internet protocol address distributed by the load balancing mechanism and a first server identifier of a current server, the first server identifier is used for acquiring the first signaling context, and the first signaling context is used for determining target communication data corresponding to the first signaling request.
According to one or more embodiments of the present disclosure, there is provided a data communication system [ example nine ], the apparatus comprising: the system comprises a client and a server, wherein the server comprises a load balancer and at least two servers; wherein,,
the client is used for sending a signaling request to the load balancer;
the load balancer is used for sending the signaling request to the first server based on a preset load balancing mechanism;
the first server is configured to determine and store a signaling context corresponding to the signaling request, generate a signaling response message corresponding to the signaling request, and feed back the signaling response message to the client, where the signaling response message includes a virtual internet protocol address allocated by the load balancing mechanism and a server identifier of the first server;
the client is further configured to generate a connectivity probe request based on the signaling response packet, and send the connectivity probe request to the load balancer based on the virtual internet protocol address, where the connectivity probe request carries a server identifier that receives the first server;
The load balancer is further configured to send the connectivity probe request to a second server based on a preset load balancing mechanism;
the second server is configured to obtain the signaling context from the first server based on the server identifier, generate a probe response packet corresponding to the connectivity probe request, feed back the probe response packet to the client, determine target communication data corresponding to the signaling request based on the signaling context, and feed back the target communication data to the client.
The foregoing description is only of the preferred embodiments of the present disclosure and description of the principles of the technology being employed. It will be appreciated by persons skilled in the art that the scope of the disclosure referred to in this disclosure is not limited to the specific combinations of features described above, but also covers other embodiments which may be formed by any combination of features described above or equivalents thereof without departing from the spirit of the disclosure. Such as those described above, are mutually substituted with the technical features having similar functions disclosed in the present disclosure (but not limited thereto).
Moreover, although operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. In certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limiting the scope of the present disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are example forms of implementing the claims.
Claims (11)
1. A method of data communication, comprising:
receiving a first signaling request sent by a client based on a load balancer;
Determining and storing a first signaling context corresponding to the first signaling request, generating a first signaling response message corresponding to the first signaling request, and feeding back the first signaling response message to the client;
the first signaling response message includes a virtual internet protocol address allocated by the load balancing mechanism and a first server identifier of a current server, where the first server identifier is used to obtain the first signaling context, and the first signaling context is used to determine target communication data corresponding to the first signaling request.
2. The method of claim 1, wherein generating a first signaling response message corresponding to the first signaling request comprises:
determining a candidate address corresponding to the first signaling request based on the virtual internet protocol address;
generating verification information based on the first server identification;
and generating a first signaling response message corresponding to the first signaling request based on the candidate address and the verification information.
3. A data communication method according to claim 2, wherein the first server identifier is an original server identifier of the current server or an encrypted server identifier obtained by encrypting the original server identifier, and the original server identifier includes a server internet protocol address and/or a server number.
4. The data communication method of claim 2, wherein the first signaling context includes the check information and data information, the data information including at least one of data format information, data version information, and a data acquisition path.
5. The data communication method according to claim 1, characterized by further comprising:
receiving a connectivity probe request sent by the client based on the virtual internet protocol address, wherein the connectivity probe request is generated by the client according to a second signaling response message corresponding to a second signaling request, and the connectivity probe request carries a second server identifier of a target server for receiving the second signaling request;
acquiring a second signaling context corresponding to the connectivity probe request from the target server based on the second server identifier, so as to determine target communication data corresponding to the second signaling request based on the second signaling context, and feeding back the target communication data to the client;
and generating a detection response message corresponding to the connectivity detection request, and feeding back the detection response message to the client.
6. The method according to claim 5, wherein the obtaining, based on the second server identifier, a second signaling context corresponding to the connectivity probe request from the target server includes:
analyzing the connectivity probe request to obtain the second server identifier, and determining a server internet protocol address of the target server based on the second server identifier;
generating a context acquisition request corresponding to the connectivity probe request, and sending the context acquisition request to the target server based on the server internet protocol address;
and receiving a second signaling context corresponding to the context acquisition request fed back by the target server.
7. The data communication method according to claim 5, wherein the second signaling context includes check information in the second signaling response message, the check information including a second server identification of the target server;
the generating a probe response message corresponding to the connectivity probe request includes:
and generating a detection response message corresponding to the connectivity detection request under the condition that the second server identifier carried by the connectivity detection request is consistent with the attribute value of the second server identifier in the second signaling context.
8. A data communication apparatus, comprising:
the signaling request module is used for receiving a first signaling request sent by the client terminal based on the load balancer;
the signaling response module is used for determining and storing a first signaling context corresponding to the first signaling request, generating a first signaling response message corresponding to the first signaling request, and feeding back the first signaling response message to the client, wherein the first signaling response message comprises a virtual internet protocol address distributed by the load balancing mechanism and a first server identifier of a current server, the first server identifier is used for acquiring the first signaling context, and the first signaling context is used for determining target communication data corresponding to the first signaling request.
9. A data communication system, comprising: the system comprises a client and a server, wherein the server comprises a load balancer and at least two servers; wherein,,
the client is used for sending a signaling request to the load balancer;
the load balancer is used for sending the signaling request to the first server based on a preset load balancing mechanism;
The first server is configured to determine and store a signaling context corresponding to the signaling request, generate a signaling response message corresponding to the signaling request, and feed back the signaling response message to the client, where the signaling response message includes a virtual internet protocol address allocated by the load balancing mechanism and a server identifier of the first server;
the client is further configured to generate a connectivity probe request based on the signaling response packet, and send the connectivity probe request to the load balancer based on the virtual internet protocol address, where the connectivity probe request carries a server identifier that receives the first server;
the load balancer is further configured to send the connectivity probe request to a second server based on a preset load balancing mechanism;
the second server is configured to obtain the signaling context from the first server based on the server identifier, generate a probe response packet corresponding to the connectivity probe request, feed back the probe response packet to the client, determine target communication data corresponding to the signaling request based on the signaling context, and feed back the target communication data to the client.
10. An electronic device, the electronic device comprising:
one or more processors;
storage means for storing one or more programs,
when executed by the one or more processors, causes the one or more processors to implement the data communication method of any of claims 1-7.
11. A storage medium containing computer executable instructions which, when executed by a computer processor, are for performing the data communication method of any of claims 1-7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311034532.2A CN116886561A (en) | 2023-08-16 | 2023-08-16 | Data communication method, device, system, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311034532.2A CN116886561A (en) | 2023-08-16 | 2023-08-16 | Data communication method, device, system, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN116886561A true CN116886561A (en) | 2023-10-13 |
Family
ID=88264621
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311034532.2A Pending CN116886561A (en) | 2023-08-16 | 2023-08-16 | Data communication method, device, system, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116886561A (en) |
-
2023
- 2023-08-16 CN CN202311034532.2A patent/CN116886561A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110311983B (en) | Service request processing method, device and system, electronic equipment and storage medium | |
CN112866385B (en) | Interface calling method and device, electronic equipment and storage medium | |
CN111432001B (en) | Method, apparatus, electronic device and computer readable medium for jumping scenes | |
CN110996372B (en) | Message routing method, device and system and electronic equipment | |
CN111914229A (en) | Identity authentication method and device, electronic equipment and storage medium | |
CN113162836B (en) | Virtual local area network communication method and device, cloud server, medium and electronic equipment | |
US11758087B2 (en) | Multimedia conference data processing method and apparatus, and electronic device | |
CN114629911B (en) | Method, device, equipment, medium and program product for processing domain name resolution request | |
CN114938395B (en) | Service response method, device, equipment and storage medium | |
CN110489474A (en) | A kind of method, apparatus of data processing, medium and electronic equipment | |
CN114640533A (en) | Method, device, storage medium and electronic equipment for transmitting messages | |
CN112968871B (en) | Login method and device of application program, readable medium and electronic equipment | |
CN114048498A (en) | Data sharing method, device, equipment and medium | |
CN110855655B (en) | Information verification method, device, equipment and storage medium | |
CN115396178B (en) | User distributed authentication method, device, electronic equipment and storage medium | |
CN115914389B (en) | Cloud service control system, method, device, electronic equipment and storage medium | |
CN116886561A (en) | Data communication method, device, system, electronic equipment and storage medium | |
CN111049949B (en) | Domain name identification method and device, electronic equipment and medium | |
CN111752625B (en) | Method and device for interface mock | |
CN113297588A (en) | Password processing device, and control method and device of password processing device | |
CN112929453A (en) | Method and device for sharing session data | |
CN111953680B (en) | Anti-hijacking method, device, medium and electronic equipment for content distribution network | |
CN114245161B (en) | Live broadcast push method and device, storage medium and electronic equipment | |
CN114785794B (en) | Resource allocation method, device, equipment, medium and system | |
CN112261659B (en) | Control method and device for terminal and server, terminal and storage medium |
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 |