Data communication method, device, system, electronic device and storage medium

By utilizing load balancer and server identification in the content distribution network, the data communication problem between the client and the server is solved, and the signaling and data transmission channels are established on the same server, providing data support for the signaling context.

CN116886561BActive Publication Date: 2025-08-19DOUYIN VISION CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311034532.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-16
Publication Date
2025-08-19
Estimated Expiration
2043-08-16

AI Technical Summary

Technical Problem

In the content distribution network, since the server is not equipped with a public IP address, data communication between the client and the server cannot establish signaling channels and data transmission channels on the same server, and effective data communication cannot be achieved.

Method used

By receiving the client's signaling request based on the load balancer, the signaling context is determined and stored, and a signaling response message containing the virtual Internet protocol address and the server identification is generated to the client, and the signaling context is obtained in the subsequent connectivity detection stage using the server identification.

Benefits of technology

In the case of load balancing, data communication between the client and the server is realized, solving the problem of excessive dependence on public network IP, ensuring that the signaling channel and data transmission channel are established on the same server, and providing data support for signaling context.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116886561B_ABST
    Figure CN116886561B_ABST
Patent Text Reader

Abstract

The disclosed embodiments provide a data communication method, device, system, electronic device and storage medium. The method includes: 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 assigned by the load balancing mechanism and a first server identifier of the current server, the first server identifier is used to obtain a first signaling context, and the first signaling context is used to determine the target communication data corresponding to the first signaling request. This technical solution achieves the effect of simultaneously feeding back the candidate address and server identifier of the server to the client, thereby providing data support for the process of obtaining the signaling context based on the server identifier in the subsequent connectivity detection phase.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present disclosure relate to the field of data communication technology, and in particular to a data communication method, apparatus, system, electronic device, and storage medium. Background Art

[0002] In some application scenarios that require data communication, Content Delivery Network (CDN) technology is usually used to distribute requested data from the client to various server nodes.

[0003] In related technologies, establishing a data transmission channel between a client and a server generally involves the client completing signaling negotiation and data transmission with the same server, thereby enabling data communication between the client and the server.

[0004] However, this solution requires each server to have a virtual Internet Protocol address (i.e., a public IP address). In CDN networks, to enhance internal server security and reduce the additional costs associated with public IP resources, public IP addresses are typically not allocated to each server. Consequently, it can be difficult to ensure that signaling and data transmission channels in data communication scenarios are established on the same server, making data communication between clients and servers impossible. Summary of the Invention

[0005] The present disclosure provides a data communication method, device, system, electronic device and storage medium to achieve the effect of feeding back the server's candidate address to the client while also feeding back the server's server identifier to the client, thereby providing data support for the process of obtaining signaling context based on the server identifier in the subsequent connectivity detection phase.

[0006] In a first aspect, an embodiment of the present disclosure provides a data communication method, the method comprising:

[0007] receiving a first signaling request sent by the client based on the load balancer;

[0008] Determine and store a first signaling context corresponding to the first signaling request, generate a first signaling response message corresponding to the first signaling request, and feed back the first signaling response message to the client;

[0009] Among them, the first signaling response message includes the virtual Internet Protocol address allocated by the load balancing mechanism and the first server identifier of the current server, the first server identifier is used to obtain the first signaling context, and the first signaling context is used to determine the target communication data corresponding to the first signaling request.

[0010] In a second aspect, an embodiment of the present disclosure further provides a data communication device, the device comprising:

[0011] A signaling request module, configured to receive a first signaling request sent by a client based on a load balancer;

[0012] A signaling response module is used to determine and store a first signaling context corresponding to the first signaling request, generate a first signaling response message corresponding to the first signaling request, and feed back the first signaling response message to the client, wherein the first signaling response message includes the virtual Internet Protocol address allocated by the load balancing mechanism and the first server identifier of the current server, the first server identifier is used to obtain the first signaling context, and the first signaling context is used to determine the target communication data corresponding to the first signaling request.

[0013] In a third aspect, an embodiment of the present disclosure further provides a data communication system, the system comprising:

[0014] The client and the server include a load balancer and at least two servers;

[0015] The client is configured to send a signaling request to the load balancer;

[0016] The load balancer is configured to send the signaling request to the first server based on a preset load balancing mechanism;

[0017] 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 the signaling response message back to the client, wherein the signaling response message includes a virtual Internet Protocol address allocated by the load balancing mechanism and a server identifier of the first server;

[0018] The client is further configured to generate a connectivity detection request based on the first signaling response message, and send the connectivity detection request to the load balancer based on the virtual Internet Protocol address, wherein the connectivity detection request carries a server identifier of the receiving first server;

[0019] The load balancer is further configured to send the connectivity detection request to the second server based on a preset load balancing mechanism;

[0020] The second server is used to obtain the signaling context from the first server based on the server identifier, generate a probe response message corresponding to the connectivity probe request, and feed back the probe response message to the client, and determine the target communication data corresponding to the signaling request based on the signaling context, and feed back the target communication data to the client.

[0021] In a fourth aspect, an embodiment of the present disclosure further provides an electronic device, the electronic device comprising:

[0022] one or more processors;

[0023] a storage device for storing one or more programs,

[0024] When the one or more programs are executed by the one or more processors, the one or more processors implement the data communication method as described in any one of the embodiments of the present disclosure.

[0025] In a fifth aspect, an embodiment of the present disclosure further provides a storage medium containing computer-executable instructions, which, when executed by a computer processor, are used to execute the data communication method as described in any one of the embodiments of the present disclosure.

[0026] The technical solution of the embodiment of the present disclosure, by receiving the first signaling request sent by the client based on the load balancer, achieves the effect of forwarding the first signaling request while ensuring load balancing, further determines and stores the first signaling context corresponding to the first signaling request, generates a first signaling response message corresponding to the first signaling request, and feeds back the first signaling response message to the client, thereby solving the problem of excessive dependence on the server public network IP in the data communication scenario in the related technology, which makes it impossible to ensure that the signaling channel and the data transmission channel in the data communication scenario are established on the same server, and data communication between the client and the server cannot be achieved. It achieves the effect of feeding back the server's candidate address to the client while also feeding back the server's server identifier to the client, thereby providing data support for the process of obtaining the signaling context based on the server identifier in the subsequent connectivity detection phase. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The above and other features, advantages, and aspects of the various embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and that the originals and elements are not necessarily drawn to scale.

[0028] Figure 1 A flowchart of a data communication method provided by an embodiment of the present disclosure;

[0029] Figure 2 A schematic diagram of a signaling transmission process provided by an embodiment of the present disclosure;

[0030] Figure 3 A flowchart of a data communication method provided by an embodiment of the present disclosure;

[0031] Figure 4 A schematic diagram of a signaling transmission process provided by an embodiment of the present disclosure;

[0032] Figure 5 A schematic structural diagram of a data communication device provided in an embodiment of the present disclosure;

[0033] Figure 6 A schematic diagram of the structure of a data communication system provided by an embodiment of the present disclosure;

[0034] Figure 7 A schematic diagram of signaling transmission in a data communication system provided by an embodiment of the present disclosure;

[0035] Figure 8 A schematic structural diagram of an electronic device provided in an embodiment of the present disclosure. DETAILED DESCRIPTION

[0036] The following describes embodiments of the present disclosure in more detail with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as limited to the embodiments described herein. Rather, these embodiments 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 illustrative purposes only and are not intended to limit the scope of protection of the present disclosure.

[0037] It should be understood that the various steps described in the method embodiments of the present disclosure may be performed in different orders and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.

[0038] As used herein, the term "including" and its variations are open-ended, i.e., "including but not limited to." The term "based on" means "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," and the term "some embodiments" means "at least some embodiments." Other terms are defined in the following description.

[0039] It should be noted that the concepts of "first" and "second" mentioned in this disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units.

[0040] It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative rather than restrictive, and those skilled in the art should understand that unless otherwise clearly indicated in the context, they should be understood as "one or more".

[0041] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0042] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0043] For example, in response to a user's active request, a prompt message is sent to the user to clearly inform the user that the operation requested will require the acquisition and use of the user's personal information. This allows the user to independently choose whether to provide personal information to the electronic device, application, server, storage medium, or other software or hardware that performs the operations of the disclosed technical solution based on the prompt message.

[0044] As an optional but non-limiting implementation, in response to receiving a user's active request, the prompt information may be sent to the user in the form of a pop-up window, in which the prompt information may be presented in text form. Furthermore, the pop-up window may also contain a selection control for the user to select "agree" or "disagree" to provide personal information to the electronic device.

[0045] It is understandable that the above notification and user authorization process are merely illustrative and do not limit the implementation of the present disclosure. Other methods that comply with relevant laws and regulations may also be applied to the implementation of the present disclosure.

[0046] It is understandable that the data involved in this technical solution (including but not limited to the data itself, the acquisition or use of the data) must comply with the requirements of relevant laws, regulations and relevant provisions.

[0047] Figure 1This is a flow chart of a data communication method provided in an embodiment of the present disclosure. The embodiment of the present disclosure is applicable to situations where a media transmission channel is established between a client and a server. The method can be executed by a data communication device, which can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, which can be a mobile terminal, a PC or a server, etc.

[0048] like Figure 1 As shown, the method of this embodiment may specifically include:

[0049] S110: Receive a first signaling request sent by the client based on the load balancer.

[0050] Here, the client refers to a program that corresponds to a server and provides local services to users. It is generally installed on an ordinary user computer and needs to cooperate with the server to operate. For example, common clients include web browsers used for the World Wide Web, email clients for sending and receiving emails, and instant messaging client software. In this embodiment, the client can 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, managing incoming web data traffic and increasing effective network bandwidth. Those skilled in the art will understand that load balancing refers to a mechanism for distributing network traffic to multiple backend servers. Load-balanced traffic distribution reduces the load on a single server and shortens application response time. Load balancers can come in various forms, including hardware-based load balancers, load balancers integrated into switching devices (placed between the server and the internet), or load balancing functionality integrated into a PC in the form of two network adapters (one connected to the internet and one connected to the internal network of the backend server cluster). It should be noted that a load balancer can be a hardware device pre-deployed with any load balancing technology. Optionally, the pre-deployed load balancing technology can be Layer 4 load balancing. Layer 4 load balancing uses information defined by the network transport layer (Layer 4) to determine how to distribute client requests across a group of servers. Layer 4 load balancing makes load balancing decisions based on the source IP address, destination IP address, and port number recorded in the HTTP request header of a data packet, without considering the content of the data packet.

[0051] The first signaling request can be understood as a request message sent by the client to the server during the signaling phase. This request message is used to coordinate communication between the client and the server. The first signaling request can be any request, and can optionally be any of a registration request, an attachment request, a service request, and a live streaming request.

[0052] In actual applications, in order to establish a data transmission channel between the client and the server, the client can send a first signaling request to the server. Then, after receiving the first signaling request, the load balancer located on the server can determine an available server from at least one server associated with the load balancer according to a preset screening rule. Furthermore, the received first signaling request can be forwarded to the determined available server based on the load balancer, so that the available server responds to the received first signaling request. Among them, the available server can be understood as 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.

[0053] It should be noted that from the time the load balancer receives the first signaling request until it sends the first signaling request to the identified available server, the load balancer does not process the request message content in the first signaling request. In other words, the load balancer only transmits the received signaling request without making any changes or adjustments.

[0054] S120: Determine and store a first signaling context corresponding to the first signaling request, generate a first signaling response message corresponding to the first signaling request, and feed the first signaling response message back to the client.

[0055] The first signaling context can be understood as a snapshot of the server upon receiving the first signaling request. This snapshot can be used to represent the server's environment and state at the time of receiving the first signaling request. In this embodiment, the first signaling context is used to determine the target communication data corresponding to the first signaling request. Those skilled in the art will appreciate that a context can be understood as an ordered sequence of attributes that defines an environment for objects residing within it. A context is created during the activation process of an object, which is configured to require certain automatic services, such as synchronization, transactions, real-time activation, security, etc. In this embodiment, the first signaling context includes verification information and data information. The verification information can be understood as information used for security verification or as a string to be verified. Optionally, the verification information can be ice-ufrag in the Interactive Connectivity Establishment (ICE) format. The ice-ufrag can provide a fragment that constitutes a username during connectivity testing. The data information can 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, and the data information may include any information, and optionally may include at least one of data format information, data version information, and data acquisition path.

[0056] Among them, the first signaling response message can be understood as a message that characterizes the response 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 identifier of the current server. The virtual Internet Protocol address (VIPAddress) can be understood as the address corresponding to the virtual Internet, that is, the public IP address connecting multiple servers. The virtual Internet Protocol address can be the virtual IP address of the public network where the current server is located. The current server can be understood as an available server determined by the load balancer among at least one of its associated servers according to the preset screening rules after receiving the first signaling request; or, it can also be understood as the server that receives the first signaling request. The preset screening rules can be pre-set rules for screening available servers. Optionally, the preset screening rules can be determined based on the available capacity of the server; or, based on the response speed of the server; or, based on the data processing capability of the server, etc.

[0057] The first server identifier can be understood as an identifier representing the location of the current server. The first server identifier can be used to locate the current server. In this embodiment, the first server identifier can also be used to obtain the first signaling context. It should be noted that the first server identifier can be any form of identifier. Optionally, it can be the original server identifier of the current server or an encrypted server identifier obtained by encrypting the original server identifier. The original server identifier can be understood as an unprocessed server identifier. Optionally, the original server identifier can include the server Internet Protocol address and / or server number. The server Internet Protocol address can be understood as the IP address of the current server. The server Internet Protocol address can be the private IP address of the current server. The IP address is a unified address format provided by the IP protocol. It assigns a logical address to each network and each server on the Internet, thereby masking differences in physical addresses. In short, the server Internet Protocol address can be a string arranged according to preset rules. The server number can be understood as a unique identifier for the server. One server number corresponds to one server. Optionally, the server number can be numbers, letters, or other characters. In practical applications, to prevent the server identifier from being leaked due to interception of message information, the original server identifier can be encrypted to obtain an encrypted server identifier. It should be noted that the original server identifier can be encrypted using a preset encryption algorithm or other methods, which are not specifically limited in the present embodiments. The preset encryption algorithm can be any encryption algorithm, and optionally, can be a symmetric encryption algorithm.

[0058] In actual applications, after receiving the first signaling request, a first signaling context corresponding to the first signaling request can be determined based on the request information included in the first signaling request, and the determined first signaling context can be stored in the current server that received the first signaling request. Furthermore, a first signaling response message corresponding to the first signaling request can be generated based on the first signaling request. Thus, the generated first signaling response message can be fed back to the client.

[0059] 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 identifier; and generating a first signaling response message corresponding to the first signaling request based on the candidate address and the verification information.

[0060] Among them, the candidate address can be understood as a virtual Internet Protocol address that can respond to the first signaling request. The number of candidate addresses can be one or more, and the embodiment of the present disclosure does not specifically limit this. The verification information can be understood as information used to perform security verification. Optionally, the verification information can be the attribute value of the ice-ufrag attribute in the interactive connectivity establishment method (ICE). ice-ufrag can provide a fragment that constitutes a user name in connectivity detection.

[0061] In actual applications, when the current server receives the first signaling request, a candidate address that can respond to the first signaling request can be determined based on the first signaling request and the virtual Internet Protocol address. Furthermore, the first server identifier of the current server can be obtained, and verification information can be generated based on the first server identifier. It should be noted that the verification information can be obtained by concatenating a pre-generated random number with the first server identifier, or it can be generated by other means based on the first server. This embodiment of the present disclosure does not specifically limit this. It should also be noted that the advantage of using random numbers to generate verification information is that invalid connectivity detection messages can be filtered out and legality can be verified during the subsequent connectivity verification process.

[0062] Furthermore, after obtaining the candidate address and verification information, the candidate address and verification information can be written into the corresponding lines of the response message, thereby obtaining a first signaling response message corresponding to the first signaling request. This arrangement has the advantage of ensuring that the first signaling response message includes the candidate address and verification information, so that in the subsequent connectivity detection phase, the server to be sent can be determined based on the candidate address and security verification can be performed based on the verification information. Furthermore, it can also ensure that the connectivity detection request in the connectivity detection phase includes the server Internet Protocol address of the server in the signaling phase.

[0063] For example, Figure 2 This is a schematic diagram of the signaling transmission process between the client and the server. Figure 2 As shown, server 1 can be used as the current server. First, the client creates a first signaling request (i.e. Figure 2 SDP offer in the server), and sends a first signaling request to the server; then, the server 1 in the server receives the first signaling request, generates a first signaling response message corresponding to the first signaling request (ie Figure 2 SDP answer in), and determines the first signaling context corresponding to the first signaling request and stores it in server 1; thereafter, feeds back a signaling response to the client, and feeds back the first signaling response message to the client.

[0064] The technical solution of the embodiment of the present disclosure, by receiving the first signaling request sent by the client based on the load balancer, achieves the effect of forwarding the first signaling request while ensuring load balancing, further determines and stores the first signaling context corresponding to the first signaling request, generates a first signaling response message corresponding to the first signaling request, and feeds back the first signaling response message to the client, thereby solving the problem of excessive dependence on the server public network IP in the data communication scenario in the related technology, which makes it impossible to ensure that the signaling channel and the data transmission channel in the data communication scenario are established on the same server, and data communication between the client and the server cannot be achieved. It achieves the effect of feeding back the server's candidate address to the client while also feeding back the server's server identifier to the client, thereby providing data support for the process of obtaining the signaling context based on the server identifier in the subsequent connectivity detection phase.

[0065] Figure 3 This is a flow chart of a data communication method provided by an embodiment of the present disclosure. The technical solution of this embodiment is based on the above embodiment. When the client receives a signaling response message, it sends a connectivity probe request to the server again, so as to establish a data transmission channel between the client and the server when the client receives a probe response message corresponding to the connectivity probe request. For specific implementation methods, please refer to the description of this embodiment. Technical features that are the same or similar to those in the above embodiment will not be repeated here.

[0066] like Figure 3 As shown, the method of this embodiment may specifically include:

[0067] S210: Receive a first signaling request sent by the client based on the load balancer.

[0068] S220: Determine and store a first signaling context corresponding to the first signaling request, generate a first signaling response message corresponding to the first signaling request, and feed the first signaling response message back to the client.

[0069] S230. Receive 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 that receives the second signaling request.

[0070] Among them, the connectivity detection request can be understood as the request message sent by the client to the server in the connectivity detection phase. The second signaling request can be understood as the request message received by the target server in the signaling phase. The target server can be understood as the server determined by the load balancer from at least one server associated with it according to the preset screening rules after receiving the second signaling request. Correspondingly, the second server identifier can be understood as an identifier that represents the location of the target server. The second server identifier can be used to locate the target server. Similar to the first server identifier, the second server identifier can be the original server identifier of the target server or an encrypted server identifier obtained by encrypting the original server identifier.

[0071] In actual applications, the target server receives the second signaling request sent by the client via the load balancer. Furthermore, it generates a second signaling response message corresponding to the second signaling request and feeds it back to the client. Furthermore, the client generates a request message for requesting a connectivity probe based on the received second signaling response message and uses this request message as the connectivity probe request message.

[0072] It should be noted that the current server corresponding to the first signaling request and the target server corresponding to the second signaling request can be the same server or different servers, and this is not specifically limited in the present embodiment. It should also be noted that the "first" and "second" mentioned in the present embodiment do not indicate any order, quantity, or importance, but only that the corresponding target entities are different.

[0073] In actual applications, after the client receives the second signaling response message fed back by the target server, it can enter the connectivity detection phase. The client can generate a connectivity detection request based on the received second signaling response message. Since the second signaling response message includes a candidate address determined based on the virtual Internet Protocol address. Therefore, after generating the connectivity detection request, the client can send a connectivity detection request to the server based on the candidate address. It should be noted that when the number of candidate addresses is one, the client can directly send a connectivity detection request to the server based on the virtual Internet Protocol address corresponding to the candidate address. When the number of candidate addresses is multiple, the multiple received candidate addresses can be arranged according to a predetermined address arrangement rule. Afterwards, connectivity detection requests can be sent to the server in sequence according to the arranged candidate addresses until a detection response message corresponding to the connectivity detection request is received.

[0074] Furthermore, after receiving the connectivity detection request, the load balancer at the server side can determine a server that can respond to the connectivity detection request from at least one server associated with it according to a preset screening rule, and then send the connectivity detection request to the determined server.

[0075] S240: Acquire a second signaling context corresponding to the connectivity detection request from the target server based on the second server identifier, 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.

[0076] The second signaling context may be a signaling context generated according to the second signaling request and stored in the target server. The second signaling context is used to determine the target communication data corresponding to the second signaling request.

[0077] In practical applications, after receiving a connectivity probe request, the second server identifier corresponding to the target server carried in the connectivity probe request can be obtained. The target server can then be determined based on the second server identifier. Furthermore, a signaling context acquisition request can be sent to the target server. When the target server receives the signaling context acquisition request, the pre-stored second signaling context is sent to the server corresponding to the connectivity probe request.

[0078] Optionally, a second signaling context corresponding to the connectivity detection request is obtained from the target server based on the second server identifier, including: parsing the connectivity detection request to obtain the second server identifier, and determining the server Internet Protocol address of the target server based on the second server identifier; generating a context acquisition request corresponding to the connectivity detection request, and sending the context acquisition request to the target server based on the server Internet Protocol address; and receiving the second signaling context corresponding to the context acquisition request fed back by the target server.

[0079] The context acquisition request may be understood as a request message for acquiring signaling context. It should be noted that the protocol format of the context acquisition request is not limited to HTTP or JSON, and any text transmission protocol and format is feasible.

[0080] In actual applications, after receiving the connectivity detection request, the server that receives the connectivity detection request can parse the connectivity detection request to obtain the second server identifier carried in the connectivity detection request. The second server identifier can then be processed to determine the server Internet Protocol address of the target server. It should be noted that when the second server identifier is the original server identifier of the target server, the server Internet Protocol address of the target server can be directly determined based on the second server identifier. When the second server identifier is the encrypted server identifier of the target server, the second server identifier can be decrypted, and then the server Internet Protocol address of the target server can be determined based on the decrypted identifier information.

[0081] Furthermore, after determining the server Internet Protocol address of the target server, a context acquisition request for obtaining a signaling context can be generated. Then, the context acquisition request is sent to the target server based on the determined server Internet Protocol address. Afterwards, when the target server receives the context acquisition request, the pre-stored second signaling context can be retrieved. Then, the retrieved second signaling context is fed back to the server that sent the context acquisition request, so that the server can determine the 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 advantage of this setting is that it realizes the sharing of signaling contexts between servers in the same cluster, and further, it realizes that even if the signaling phase and the connectivity detection phase correspond to different servers, the effect of data communication between the client and the server can be achieved.

[0082] S250: Generate a probe response message corresponding to the connectivity probe request, and feed the probe response message back to the client.

[0083] The probe response message may be understood as a message representing the response of the server to the received connectivity probe request.

[0084] In practical applications, after receiving the connectivity probe request, the server can determine that the connectivity probe is successful after obtaining the second signaling context. Furthermore, it can generate a probe response message corresponding to the connectivity probe request and send the probe response message back to the client. After the client receives the probe response message, it can determine that the data transmission channel between the client and the server is established.

[0085] It should be noted that, in actual applications, the process of feeding back the target communication data corresponding to the signaling request to the client can be performed after the probe response message is fed back to the client, or it can be performed after obtaining the signaling context fed back by the target server and before feeding back the probe response message to the client. The embodiments of the present disclosure do not specifically limit this. After the probe response message is fed back to the client, it can be determined that the data transmission channel between the client and the server is established. In this case, there is no specific limit on the feedback time of the target communication data, and the client can request the target communication data from the server at any time.

[0086] In actual applications, after receiving the second signaling context and before generating the probe response message, the second signaling context and the connectivity probe request may be subjected to a security or legality check. Furthermore, if the check passes, a probe response message corresponding to the connectivity probe request is generated.

[0087] In this embodiment, the second signaling context includes verification information in the second signaling response message. The verification information includes the second server identifier of the target server. Optionally, generating a probe response message corresponding to the connectivity probe request includes: generating a probe response message corresponding to the connectivity probe request when the second server identifier carried in the connectivity probe request is consistent with an attribute value of the second server identifier in the second signaling context.

[0088] In practical applications, after receiving the second signaling context, the server receiving the connectivity probe request can parse the second signaling context. This can then obtain the second server identifier in the second signaling context. The second server identifier in the second signaling context can then be matched with the second server identifier carried in the connectivity probe request. If the attribute values of the two second server identifiers match, verification is determined to be successful, and a probe response message corresponding to the connectivity probe request is generated.

[0089] For example, Figure 4 This is a schematic diagram of the signaling transmission process between the client and the server. Figure 4As shown, server 2 can be used as the target server and server 1 as the current server. First, the client creates a second signaling request (i.e. Figure 4 SDP offer in the server), and sends a second signaling request to the server; then, the server 2 in the server receives the second signaling request, generates a second signaling response message corresponding to the second signaling request (ie Figure 4 The client receives the SDP answer in the SDP answer, determines the second signaling context corresponding to the second signaling request and stores it in the server 2; then, feeds back a signaling response to the client, and feeds back the second signaling response message to the client. Further, the client can generate a connectivity detection request (i.e., Figure 4 The server 1 receives the STUN Binding Request in the connection and sends a connectivity probe request to the server. Server 1 on the server side then receives the connectivity probe request, determines the server Internet Protocol address of server 2 based on the server identifier of server 2 carried in the connectivity probe request, and generates a context acquisition request. Furthermore, the server 1 sends the context acquisition request to server 2 based on the determined server Internet Protocol address of server 2. Server 1 then receives the second signaling context fed back by server 2 and sets the received second signaling context in server 1. A probe response message corresponding to the connectivity probe request is then generated and fed back to the client. Finally, upon receiving the probe response message, the client determines that the media channel between the client and server 1 has been established.

[0090] The technical solution of the embodiment of the present disclosure receives a first signaling request sent by a client based on a load balancer, then determines and stores a first signaling context corresponding to the first signaling request, generates a first signaling response message corresponding to the first signaling request, and feeds back the first signaling response message to the client. Further, a connectivity detection request sent by the client based on a virtual Internet Protocol address is received, 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 the target server receiving the second signaling request. Then, based on the second server identifier, a second signaling context corresponding to the connectivity detection request is obtained from the target server to determine the 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. Finally, a detection response message corresponding to the connectivity detection request is generated, and the detection response message is fed back to the client, thereby achieving the effect of signaling sharing within the server node in the same cluster, and further, achieving the effect of data communication between the client and the server even if the signaling phase and the connectivity detection phase correspond to different servers.

[0091] Figure 5 A schematic diagram of the structure of a data communication device provided by an embodiment of the present disclosure is shown in FIG. Figure 5 As shown, the device includes: a signaling request module 310 and a signaling response module 320.

[0092] Among them, the signaling request module 310 is used to receive a first signaling request sent by the client based on the load balancer; the signaling response module 320 is used to determine and store a first signaling context corresponding to the first signaling request, and generate a first signaling response message corresponding to the first signaling request, and feed back the first signaling response message to the client, wherein the first signaling response message includes the virtual Internet Protocol address allocated by the load balancing mechanism and the first server identifier of the current server, the first server identifier is used to obtain the first signaling context, and the first signaling context is used to determine the target communication data corresponding to the first signaling request.

[0093] On the basis of the above technical solutions, the signaling response module 320 includes: a candidate address determination unit, a verification information generation unit, and a signaling response message generation unit.

[0094] a candidate address determining unit, configured to determine a candidate address corresponding to the first signaling request based on the virtual Internet Protocol address;

[0095] a verification information generating unit, configured to generate verification information based on the first server identifier;

[0096] A signaling response message generating unit is used to generate a first signaling response message corresponding to the first signaling request based on the candidate address and the verification information.

[0097] Based on the above technical solutions, the first server identifier is the 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.

[0098] Based on the above technical solutions, the first signaling context includes the verification information and data information, and the data information includes at least one of data format information, data version information and data acquisition path.

[0099] On the basis of the above technical solutions, the device further includes: a probe request receiving module, a signaling context acquiring module and a probe response message generating module.

[0100] a probe request receiving module, configured to receive 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 the second signaling request, and the connectivity probe request carries a second server identifier of a target server for receiving the second signaling request;

[0101] a signaling context acquisition module, configured to acquire a second signaling context corresponding to the connectivity detection request from the target server based on the second server identifier, determine target communication data corresponding to the second signaling request based on the second signaling context, and feed the target communication data back to the client;

[0102] The probe response message generation module is configured to generate a probe response message corresponding to the connectivity probe request and feed the probe response message back to the client.

[0103] On the basis of the above technical solutions, the signaling context acquisition module includes: a server Internet Protocol address determination unit, a context acquisition request generation unit and a signaling context receiving unit.

[0104] a server Internet Protocol address determining unit, configured to parse the connectivity detection request, obtain the second server identifier, and determine the server Internet Protocol address of the target server based on the second server identifier;

[0105] a context acquisition request generating unit, configured to generate a context acquisition request corresponding to the connectivity detection request, and send the context acquisition request to the target server based on the server Internet Protocol address;

[0106] The signaling context receiving unit is configured to receive a second signaling context fed back by the target server and corresponding to the context acquisition request.

[0107] On the basis of the above technical solutions, the second signaling context includes verification information in the second signaling response message, and the verification information includes the second server identifier of the target server;

[0108] The probe response message generation module is specifically configured to generate a probe response message corresponding to the connectivity probe request when the second server identifier carried in the connectivity probe request is consistent with the attribute value of the second server identifier in the second signaling context.

[0109] The technical solution of the embodiment of the present disclosure, by receiving the first signaling request sent by the client based on the load balancer, achieves the effect of forwarding the first signaling request while ensuring load balancing, further determines and stores the first signaling context corresponding to the first signaling request, generates a first signaling response message corresponding to the first signaling request, and feeds back the first signaling response message to the client, thereby solving the problem of excessive dependence on the server public network IP in the data communication scenario in the related technology, which makes it impossible to ensure that the signaling channel and the data transmission channel in the data communication scenario are established on the same server, and data communication between the client and the server cannot be achieved. It achieves the effect of feeding back the server's candidate address to the client while also feeding back the server's server identifier to the client, thereby providing data support for the process of obtaining the signaling context based on the server identifier in the subsequent connectivity detection phase.

[0110] The data communication device provided in the embodiments of the present disclosure can execute the data communication method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0111] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.

[0112] Figure 6 A structural diagram of a data communication system provided by an embodiment of the present disclosure is shown in FIG. Figure 6 As shown, the system includes: a client 410 and a server 420. The server 420 includes a load balancer 421 and at least two servers.

[0113] Among them, the client 410 is used to send the signaling request to the load balancer 421; the load balancer 421 is used to send the signaling request to the first server 422 based on a preset load balancing mechanism; the first server 422 is used to determine and store the signaling context corresponding to the signaling request, and generate a signaling response message corresponding to the signaling request, and feed back the signaling response message to the client 410, wherein the signaling response message includes the virtual Internet Protocol address assigned by the load balancing mechanism and the server identifier of the first server 422; the client 410 is also used to generate a connectivity detection request based on the signaling response message, and generate a connectivity detection request based on the virtual Internet Protocol address assigned by the load balancing mechanism. The protocol address sends the connectivity detection request to the load balancer 421, wherein the connectivity detection request carries the server identifier of the receiving first server 422; the load balancer 421 is also used to send the connectivity detection request to the second server 423 based on the preset load balancing mechanism; the second server 423 is used to obtain the signaling context from the first server 422 based on the server identifier, generate a detection response message corresponding to the connectivity detection request, and feed back the detection response message to the client 410, and determine the target communication data corresponding to the signaling request based on the signaling context, and feed back the target communication data to the client 410.

[0114] In this embodiment, the preset load balancing mechanism can be understood as a pre-set mechanism for evenly distributing received network requests to multiple servers. The load balancing mechanism is a way of horizontal expansion. It is built on the existing network structure and provides an effective and transparent method to expand the bandwidth of network devices and servers, increase throughput, enhance network data processing capabilities, and improve network flexibility and availability. The first server 422 can be understood as a server that receives signaling requests and responds to signaling requests. The second server 423 can be understood as a server that receives connectivity detection requests and responds to connectivity detection requests. It should be noted that the first server 422 and the second server 423 can be the same server or different servers, and the embodiment of the present disclosure does not specifically limit this.

[0115] In actual applications, during the signaling phase, client 410 may generate a signaling request and send it to load balancer 421 of server 420. After receiving the signaling request, load balancer 421 may determine first server 422 from at least one associated server based on a preset load balancing mechanism and send the received signaling request to first server 422. After receiving the signaling request, first server 422 may determine the signaling context corresponding to the signaling request, store it in first server 422, generate a signaling response message corresponding to the signaling request, and feed the generated signaling response message back to client 410.

[0116] Furthermore, during the connectivity detection phase, client 410 can generate a connectivity detection request based on the received signaling context and send the connectivity detection request to load balancer 421 of server 420 based on the virtual IP address included in the signaling response message. After receiving the connectivity detection request, load balancer 421 can determine second server 423 from at least one associated server based on a preset load balancing mechanism and send the connectivity detection request to second server 423. After receiving the connectivity detection request, second server 423 can parse the connectivity detection request, obtain the server identifier of first server 422 carried in the connectivity detection request, and determine the server IP address of first server 422 based on the server identifier. Furthermore, second server 423 can generate a context acquisition request and send the context acquisition request to first server 422 based on the server IP address of first server 422. Afterwards, load balancer 421 receives the signaling context fed back by first server 422, generates a detection response message corresponding to the connectivity detection request, and sends the detection response message back to client 410. Furthermore, after receiving the signaling context, the second server 423 may determine the target communication data corresponding to the signaling request according to the signaling context, and feed the target communication data back to the client 410 .

[0117] For example, Figure 7 FIG. 1 is a schematic diagram of a signaling transmission process of an optional embodiment of the present disclosure. Figure 7 As shown, the server includes a four-layer load balancing system and N servers associated with the four-layer load balancing system, namely server 1, server 2, ..., server N. Server 1 can be regarded as the first server and server N as the second server. Taking the signaling request for live streaming as an example, the signaling transmission process in the signaling stage and the connectivity detection stage can be described below:

[0118] 1. The client sends a signaling request for live streaming to the server.

[0119] 2. After receiving the signaling request, the four-layer load balancing in the server can determine server 1 among the associated N servers according to the preset load balancing mechanism and forward the signaling request to server 1.

[0120] 3. Server 1 can generate a signaling response message (i.e. Figure 7) and feeds it back to the client. At the same time, server 1 can determine the signaling context according to the signaling request and store it. The signaling context includes the negotiated media information and verification information (ice-pwd and ice-ufrag). The SDP answer may include a candidate address line (i.e., a=candidate line) and a verification information line (i.e., a=ice-ufrag line). After receiving the signaling request, the candidate address corresponding to the signaling request can be determined based on the virtual Internet Protocol address, and the determined candidate address can be written into the candidate address line to obtain a=candidate:[vip]. Wherein, [vip] is the candidate address corresponding to the signaling request; and, a random number is generated and the server Internet Protocol address of server 1 is spliced together to obtain verification information and write it into the verification information line to obtain a=ice-ufrag:[server 1ip]. Wherein, [server 1ip] is the string obtained by splicing the random number and the server Internet Protocol address of server 1.

[0121] 4. After receiving the signaling response message, the client sends a connectivity detection request (i.e. Figure 7 The STUN Binding Request in the signaling response message is sent to the server for connectivity detection. The STUN Binding Request includes the USERNAME attribute. The verification information in the signaling response message can be used as the USERNAME attribute value to obtain USERNAME:[server 1ip].

[0122] 5. After receiving the connectivity detection request, the four-layer load balancing in the server can determine server N among the associated N servers according to the preset load balancing mechanism and forward the connectivity detection request to server N.

[0123] 6. After receiving the connectivity detection request, server N may extract the server Internet Protocol address of server 1 from the USERNAME attribute of the connectivity detection request, and send a generated context acquisition request to server 1 based on the server Internet Protocol address of server 1.

[0124] 7. Server 1 responds to the context acquisition request from server N and feeds back the signaling context to server N.

[0125] 8. After receiving the complete signaling context, server N generates a probe response message corresponding to the connectivity probe request (i.e. Figure 7 The STUN Binding Response in the Response object is sent back to the client.

[0126] The technical solution of the embodiment of the present disclosure, by receiving the first signaling request sent by the client based on the load balancer, achieves the effect of forwarding the first signaling request while ensuring load balancing, further determines and stores the first signaling context corresponding to the first signaling request, generates a first signaling response message corresponding to the first signaling request, and feeds back the first signaling response message to the client, thereby solving the problem of excessive dependence on the server public network IP in the data communication scenario in the related technology, which makes it impossible to ensure that the signaling channel and the data transmission channel in the data communication scenario are established on the same server, and data communication between the client and the server cannot be achieved. It achieves the effect of feeding back the server's candidate address to the client while also feeding back the server's server identifier to the client, thereby providing data support for the process of obtaining the signaling context based on the server identifier in the subsequent connectivity detection phase.

[0127] The data communication system provided by the embodiment of the present disclosure can execute the data communication method provided by any embodiment of the present disclosure, and this embodiment has the same beneficial effects as the above embodiments.

[0128] Figure 8 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 8 , which shows an electronic device (eg Figure 8 The terminal device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (such as in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 8 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.

[0129] like Figure 8 As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can 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 device 508 into a random access memory (RAM) 503. Various programs and data required for the operation of the electronic device 500 are also stored in the RAM 503. 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 the bus 504.

[0130] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 8 The electronic device 500 is shown with various devices, but it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed instead.

[0131] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a non-transitory computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the method of the embodiment of the present disclosure are performed.

[0132] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.

[0133] The electronic device provided by the embodiment of the present disclosure and the data communication method provided by the above embodiment belong to the same inventive concept. For technical details not fully described in this embodiment, please refer to the above embodiment, and this embodiment has the same beneficial effects as the above embodiment.

[0134] An embodiment of the present disclosure provides a computer storage medium having a computer program stored thereon. When the program is executed by a processor, the data communication method provided by the above embodiment is implemented.

[0135] It should be noted that the computer-readable medium mentioned above in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium, or any combination of the two. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or component, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present disclosure, a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. In the present disclosure, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such a propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination thereof.

[0136] In some embodiments, the client and server can communicate using any currently known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can 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"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.

[0137] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.

[0138] The above-mentioned computer-readable medium carries one or more programs. When the above-mentioned one or more programs are executed by the electronic device, the electronic device: receives a first signaling request sent by the client based on the load balancer; determines and stores a first signaling context corresponding to the first signaling request, and generates a first signaling response message corresponding to the first signaling request, and feeds back the first signaling response message to the client; wherein, the first signaling response message includes the virtual Internet Protocol address allocated by the load balancing mechanism and the first server identifier of the current server, the first server identifier is used to obtain the first signaling context, and the first signaling context is used to determine the target communication data corresponding to the first signaling request.

[0139] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including, but not limited to, object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on the remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).

[0140] The flowcharts and block diagrams in the accompanying drawings illustrate the possible implementation architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment, or a part of code, and the module, program segment, or a part of code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order than that marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flowchart, and the combination of the boxes in the block diagram and / or flowchart, can be implemented with a dedicated hardware-based system that performs the specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0141] The units involved in the embodiments described in this disclosure may be implemented in software or hardware. In some cases, the name of a unit does not limit the unit itself. For example, the first acquisition unit may also be described as a "unit for acquiring at least two Internet Protocol addresses."

[0142] The functions described above herein may be performed, at least in part, by one or more hardware logic components. For example, and without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chip (SOCs), complex programmable logic devices (CPLDs), and the like.

[0143] In the context of the present disclosure, a machine-readable medium can be a tangible medium that can contain or store a program for use by or in conjunction with an instruction execution system, device or equipment. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or equipment, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium can include an electrical connection based on one or more lines, a portable computer disk, 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 disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0144] According to one or more embodiments of the present disclosure, [Example 1] provides a data communication method, the method including:

[0145] receiving a first signaling request sent by the client based on the load balancer;

[0146] Determine and store a first signaling context corresponding to the first signaling request, generate a first signaling response message corresponding to the first signaling request, and feed back the first signaling response message to the client;

[0147] Among them, the first signaling response message includes the virtual Internet Protocol address allocated by the load balancing mechanism and the first server identifier of the current server, the first server identifier is used to obtain the first signaling context, and the first signaling context is used to determine the target communication data corresponding to the first signaling request.

[0148] According to one or more embodiments of the present disclosure, [Example 2] provides the method of Example 1, further comprising:

[0149] Optionally, the generating a first signaling response message corresponding to the first signaling request includes:

[0150] determining, based on the virtual Internet Protocol address, a candidate address corresponding to the first signaling request;

[0151] generating verification information based on the first server identifier;

[0152] A first signaling response message corresponding to the first signaling request is generated based on the candidate address and the verification information.

[0153] According to one or more embodiments of the present disclosure, [Example 3] provides the method of Example 2, further comprising:

[0154] Optionally, the first server identifier is the 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.

[0155] According to one or more embodiments of the present disclosure, [Example 4] provides the method of Example 2, further comprising:

[0156] Optionally, the first signaling context includes the verification information and data information, and the data information includes at least one of data format information, data version information and data acquisition path.

[0157] According to one or more embodiments of the present disclosure, [Example 5] provides the method of Example 1, further comprising:

[0158] Optionally, the method further includes: 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 for receiving the second signaling request;

[0159] Acquire a second signaling context corresponding to the connectivity detection request from the target server based on the second server identifier, determine target communication data corresponding to the second signaling request based on the second signaling context, and feed the target communication data back to the client;

[0160] Generate a probe response message corresponding to the connectivity probe request, and feed the probe response message back to the client.

[0161] According to one or more embodiments of the present disclosure, [Example 6] provides the method of Example 5, further comprising:

[0162] Optionally, the acquiring, from the target server based on the second server identifier, a second signaling context corresponding to the connectivity detection request includes:

[0163] Parsing the connectivity detection request to obtain the second server identifier, and determining the server Internet Protocol address of the target server based on the second server identifier;

[0164] generating a context acquisition request corresponding to the connectivity detection request, and sending the context acquisition request to the target server based on the server Internet Protocol address;

[0165] Receive a second signaling context fed back by the target server and corresponding to the context acquisition request.

[0166] According to one or more embodiments of the present disclosure, [Example 7] provides the method of Example 5, further comprising:

[0167] Optionally, the second signaling context includes verification information in the second signaling response message, and the verification information includes a second server identifier of the target server;

[0168] The generating a probe response message corresponding to the connectivity probe request includes:

[0169] In a case where the second server identifier carried in the connectivity detection request is consistent with the attribute value of the second server identifier in the second signaling context, a detection response message corresponding to the connectivity detection request is generated.

[0170] According to one or more embodiments of the present disclosure, [Example 8] provides a data communication device, the device including:

[0171] A signaling request module, configured to receive a first signaling request sent by a client based on a load balancer;

[0172] A signaling response module is used to determine and store a first signaling context corresponding to the first signaling request, generate a first signaling response message corresponding to the first signaling request, and feed back the first signaling response message to the client, wherein the first signaling response message includes the virtual Internet Protocol address allocated by the load balancing mechanism and the first server identifier of the current server, the first server identifier is used to obtain the first signaling context, and the first signaling context is used to determine the target communication data corresponding to the first signaling request.

[0173] According to one or more embodiments of the present disclosure, [Example 9] provides a data communication system, the device comprising: a client and a server, the server comprising a load balancer and at least two servers; wherein,

[0174] The client is configured to send a signaling request to the load balancer;

[0175] The load balancer is configured to send the signaling request to the first server based on a preset load balancing mechanism;

[0176] 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 the signaling response message back to the client, wherein the signaling response message includes a virtual Internet Protocol address allocated by the load balancing mechanism and a server identifier of the first server;

[0177] The client is further configured to generate a connectivity detection request based on the signaling response message, and send the connectivity detection request to the load balancer based on the virtual Internet Protocol address, wherein the connectivity detection request carries a server identifier of the receiving first server;

[0178] The load balancer is further configured to send the connectivity detection request to the second server based on a preset load balancing mechanism;

[0179] The second server is used to obtain the signaling context from the first server based on the server identifier, generate a probe response message corresponding to the connectivity probe request, and feed back the probe response message to the client, and determine the target communication data corresponding to the signaling request based on the signaling context, and feed back the target communication data to the client.

[0180] The above description is merely a preferred embodiment of the present disclosure and an illustration of the technical principles employed. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by the specific combination of the above-mentioned technical features, but also includes other technical solutions formed by any combination of the above-mentioned technical features or their equivalents without departing from the above-mentioned disclosed concepts. For example, a technical solution formed by replacing the above-mentioned features with (but not limited to) technical features with similar functions disclosed in this disclosure.

[0181] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details have been included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.

[0182] Although the subject matter has been described in language specific to structural features and / or methodological logical acts, it should 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 merely example forms of implementing the claims.

Claims

1. A data communication method, characterized in that: include: Receiving a first signaling request sent by a client based on a load balancer; wherein the first signaling request is used to coordinate communication between the client and a current server during a signaling phase; the current server is a server that receives the first signaling request; Determine and store a first signaling context corresponding to the first signaling request, generate a first signaling response message corresponding to the first signaling request, and feed back the first signaling response message to the client; Among them, the first signaling response message includes the virtual Internet Protocol address allocated by the load balancer based on the load balancing mechanism and the first server identifier of the current server, the first server identifier is used to obtain the first signaling context, and the first signaling context is used to determine the target communication data corresponding to the first signaling request; the first signaling response message includes the candidate address and verification information corresponding to the first signaling request; the verification information is used to perform security verification in the connectivity detection phase.

2. The data communication method according to claim 1, wherein: The generating a first signaling response message corresponding to the first signaling request includes: determining, based on the virtual Internet Protocol address, a candidate address corresponding to the first signaling request; generating verification information based on the first server identifier; A first signaling response message corresponding to the first signaling request is generated based on the candidate address and the verification information.

3. The data communication method according to claim 2, wherein: The first server identifier is the original server identifier of the current server or an encrypted server identifier obtained by encrypting the original server identifier. The original server identifier includes a server Internet Protocol address and / or a server number.

4. The data communication method according to claim 2, wherein: The first signaling context includes the verification information and data information, and the data information includes at least one of data format information, data version information, and a data acquisition path.

5. The data communication method according to claim 1, wherein: Also includes: 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; Acquire a second signaling context corresponding to the connectivity detection request from the target server based on the second server identifier, determine target communication data corresponding to the second signaling request based on the second signaling context, and feed the target communication data back to the client; Generate a probe response message corresponding to the connectivity probe request, and feed the probe response message back to the client.

6. The data communication method according to claim 5, wherein: The acquiring, from the target server based on the second server identifier, a second signaling context corresponding to the connectivity detection request includes: Parsing the connectivity detection request to obtain the second server identifier, and determining the server Internet Protocol address of the target server based on the second server identifier; generating a context acquisition request corresponding to the connectivity detection request, and sending the context acquisition request to the target server based on the server Internet Protocol address; Receive a second signaling context fed back by the target server and corresponding to the context acquisition request.

7. The data communication method according to claim 5, wherein: The second signaling context includes verification information in the second signaling response message, and the verification information includes the second server identifier of the target server; The generating a probe response message corresponding to the connectivity probe request includes: In a case where the second server identifier carried in the connectivity detection request is consistent with the attribute value of the second server identifier in the second signaling context, a detection response message corresponding to the connectivity detection request is generated.

8. A data communication device, characterized in that: include: a signaling request module, configured to receive a first signaling request sent by a client based on a load balancer; wherein the first signaling request is used to coordinate communication between the client and a current server during a signaling phase; and the current server is a server that receives the first signaling request; A signaling response module, used to determine and store a first signaling context corresponding to the first signaling request, generate a first signaling response message corresponding to the first signaling request, and feed back the first signaling response message to the client, wherein the first signaling response message includes the virtual Internet Protocol address allocated by the load balancer based on the load balancing mechanism and the first server identifier of the current server, the first server identifier is used to obtain the first signaling context, and the first signaling context is used to determine the target communication data corresponding to the first signaling request; the first signaling response message includes a candidate address and verification information corresponding to the first signaling request; the verification information is used to perform security verification in the connectivity detection phase.

9. A data communication system, characterized in that: include: The client and the server include a load balancer and at least two servers; The client is configured to send a signaling request to the load balancer; The load balancer is configured to send 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 the signaling response message back to the client, wherein 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 detection request based on the signaling response message, and send the connectivity detection request to the load balancer based on the virtual Internet Protocol address, wherein the connectivity detection request carries a server identifier of the receiving first server; The load balancer is further configured to send the connectivity detection request to the second server based on a preset load balancing mechanism; The second server is used to obtain the signaling context from the first server based on the server identifier, generate a probe response message corresponding to the connectivity probe request, and feed back the probe response message to the client, and determine the 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, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the data communication method according to any one of claims 1 to 7.

11. A storage medium containing computer-executable instructions, characterized in that: When the computer executable instructions are executed by a computer processor, the computer executable instructions are used to perform the data communication method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Data request method, communication device and communication system

    CN115967679A