Data transmission method, device, system, electronic device and medium

By using the first server cluster in the video conferencing system to receive and send data packets according to the mapping relationship, the problem of excessive resource utilization of public network ports is solved, and the number of terminal connections and data transmission efficiency is improved.

CN115633016BActive Publication Date: 2024-11-22VIVO MOBILE COMM CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202211284471.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-17
Publication Date
2024-11-22
Estimated Expiration
2042-10-17

AI Technical Summary

Technical Problem

The existing video conferencing system occupies a large amount of public network port resources during data transmission, resulting in the server being able to communicate with a limited number of terminals.

Method used

The first server cluster receives the data packets sent by the second server cluster, and sends data packets to the target port in the target server according to the preset mapping relationship, establishes a session between the server cluster and the target server, and reduces the use of port resources .

Benefits of technology

It realizes that without occupying a large amount of public network port resources, the number of terminals that the server can connect to is increased, the port resources are released, and the data transmission efficiency of the video conferencing system is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115633016B_ABST
    Figure CN115633016B_ABST
Patent Text Reader

Abstract

The present application discloses a data transmission method, device, electronic device and medium, belonging to the field of data transmission technology. The data transmission method comprises: a first server cluster receives N first data packets sent by a second server cluster; each first data packet comprises data to be transmitted and address information of a target terminal, where N is a positive integer greater than 1; the first server cluster sends the N first data packets to a target port in a target server according to a preset first mapping relationship; the first mapping relationship is used to characterize the mapping relationship between the address information of the target terminal and the address information of the target port.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of data transmission, and specifically relates to a video conference data transmission method, device, system, electronic equipment and medium. Background Art

[0002] The current video conferencing system uses the Session Initiation Protocol (SIP) for data transmission and establishes a session between the terminal and the server through four ports. For the server, the server needs to directly map each media port corresponding to the four ports of the terminal to the public network, and the server may need to conduct conversations with multiple terminals at the same time, thus occupying more public network port resources. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a data transmission method, device, electronic device and medium, which can solve the problem of occupying a large number of public network port resources.

[0004] In a first aspect, an embodiment of the present application provides a data transmission method, the method comprising:

[0005] The first server cluster receives N first data packets sent by the second server cluster; each of the N first data packets includes data to be transmitted and address information of the target terminal, and N is a positive integer greater than 1;

[0006] The first server cluster sends the N first data packets to the target port in the target server according to a preset first mapping relationship; the first mapping relationship is used to represent the mapping relationship between the address information of the target terminal and the target port.

[0007] In a second aspect, an embodiment of the present application provides a data transmission device, the device comprising:

[0008] A first receiving module, configured to receive N first data packets sent by the second server cluster; each first data packet includes data to be transmitted and address information of a target terminal, and N is a positive integer greater than 1;

[0009] The sending module is used to send the N first data packets to the target port in the target server according to a preset first mapping relationship; the first mapping relationship is used to represent the mapping relationship between the address information of the target terminal and the address information of the target port.

[0010] In a third aspect, an embodiment of the present application provides a data transmission system, including a first server cluster, a second server cluster, a target terminal and a target server, wherein the first server cluster is communicatively connected to the second server cluster and the target server respectively, and the target terminal is communicatively connected to the second server cluster;

[0011] The second server cluster is used to receive N first data packets sent by the target terminal; each first data packet includes data to be transmitted and address information of the target terminal, and N is a positive integer greater than 1;

[0012] The second server cluster is further configured to send the N first data packets to the first server cluster according to a preset second mapping relationship;

[0013] The first server cluster is used to receive N first data packets sent by the second server cluster;

[0014] The first server cluster is further used to send the N first data packets to the target port in the target server according to a preset first mapping relationship; the first mapping relationship is used to characterize the mapping relationship between the address information of the target terminal and the address information of the target port.

[0015] In a fourth aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the data transmission method described in the first aspect.

[0016] In a fifth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the data transmission method described in the first aspect are implemented.

[0017] In a sixth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the steps of the data transmission method as described in the first aspect.

[0018] In a seventh aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the steps of the data transmission method as described in the first aspect.

[0019] In an embodiment of the present application, the first server cluster receives N first data packets sent by the second server cluster; the first server cluster sends N data packets to the target port in the target server based on the first mapping relationship, and establishes a session between the first server cluster and the target server through the target port, wherein the first mapping relationship is used to characterize the mapping relationship between the address information of the target terminal and the address information of the target port, so that the first server cluster can establish a session between the first server cluster and the target server by calling the target port in the target server, thereby reducing the occupancy of port resources and releasing port resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 is a flow chart of a data transmission method provided in an embodiment of the present application;

[0021] Figure 2 It is a schematic diagram of a terminal sending a data packet to a target server provided in an embodiment of the present application;

[0022] Figure 3 This is one of the structural diagrams of the hash ring provided in the embodiment of the present application;

[0023] Figure 4 This is the second structural diagram of the hash ring provided in the embodiment of the present application;

[0024] Figure 5 It is a schematic diagram of data transmission based on a hash ring provided in an embodiment of the present application;

[0025] Figure 6 is a schematic diagram of establishing a first mapping relationship provided in an embodiment of the present application;

[0026] Figure 7 is a structural diagram of a data transmission device provided in an embodiment of the present application;

[0027] Figure 8 is a structural diagram of a data transmission system provided in an embodiment of the present application;

[0028] Fig. 9 is an application flow chart of the data transmission system provided in an embodiment of the present application;

[0029] Fig.10 It is one of the schematic diagrams of a terminal sending a data packet to a target server provided in an embodiment of the present application;

[0030] Fig.11 This is the second schematic diagram of a terminal sending a data packet to a target server provided in an embodiment of the present application;

[0031] Fig.12 is a structural diagram of an electronic device provided in an embodiment of the present application;

[0032] Fig.13 It is a hardware structure diagram of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION

[0033] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0034] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0035] The data transmission method provided in the embodiment of the present application is described in detail below through specific embodiments and their application scenarios in conjunction with the accompanying drawings.

[0036] In the prior art, the server maps each port of the terminal to the public network and establishes a session with the terminal to achieve data transmission. However, the terminal has multiple ports, and the server needs to map all the ports of the terminal used for the session to the public network, occupying multiple public network port resources. In this case, since the terminal that has a session with the server is limited by the public network port resources, and each terminal needs to occupy multiple public network port resources to establish a session with the server, the server can only have a session connection with a limited number of terminals.

[0037] In order to solve the above-mentioned technical problems, the present application embodiment provides a data transmission method. Figure 1 , Figure 1 : is a flow chart of a data transmission method provided in an embodiment of the present application. The data transmission method provided in an embodiment of the present application comprises the following steps:

[0038] S101, a first server cluster receives N first data packets sent by a second server cluster; each first data packet includes data to be transmitted and address information of a target terminal, and N is a positive integer greater than 1.

[0039] The first server cluster is a routing server cluster, which is used to send the first data packet directly to the target server after receiving N first data packets sent by the target terminal. In the same session, since the source address of the first data packet received by the target server is required to remain unchanged, in the same session, the first data packet of the terminal is sent from the same first server in the first server cluster to the target server. In the same session, the data packet includes the address information of the target terminal and the data to be transmitted, and the types of the N first data packets are different, and N is a positive integer greater than 1.

[0040] The address information of the target terminal is Internet Protocol (IP) information.

[0041] The N first data packets are data packets sent from the ports of the target terminal, and the types of first data packets sent from the ports of different target terminals are different. For example, the first data packet includes video data and audio data of a video conference. It can be understood that the N first data packets are all data packets sent by the target terminal, so the address information of the data packets is the same. The first server determines that the data packet comes from a target terminal through the address information, and performs the same sending processing on the data packets with the same address information. Please refer to the subsequent embodiments.

[0042] S102, the first server cluster sends the N first data packets to the target port in the target server according to a preset first mapping relationship; the first mapping relationship is used to represent the mapping relationship between the address information of the target terminal and the address information of the target port.

[0043] The target server is a conference server, which is used to process the first data packet related to the video conference; the target port is a media port of the conference server, which is used to receive or send the first data packet related to the video conference. The first mapping relationship includes the mapping relationship between the address information of the target terminal and the target port of the target server, and the target port is a port of the target server.

[0044] In this step, after receiving the first data packet of the target terminal, the first server cluster sends the data packet to the target server according to the first mapping relationship, completing the data transmission process of sending the data packets of multiple ports of the target terminal to the target port of the target server. Specifically, after receiving the first data packet with the same address information, the first server cluster queries the preset mapping relationship to determine the first mapping relationship; determines the target port of the target server according to the first mapping relationship, and then sends the received first data packet to the target port of the target server.

[0045] It should be understood that in a video conference, one or more terminals establish a session with the target server, and the first server cluster is preset with a mapping relationship corresponding to the address information of multiple terminals. For example, the first terminal and the second terminal need to establish a session with the target server. At this time, the first server cluster receives the first data packet of the first terminal and the first data packet of the second terminal, the first data packet of the first terminal includes the address information of the first terminal, and the first data packet of the second terminal includes the address information of the second terminal; then confirms the target server according to the address information of the first terminal, and confirms the target server according to the address information of the second terminal; sends the data packet of the first terminal and the data packet of the second terminal to the target port of the target server, and establishes a session between the first terminal and the target server, and a session between the second terminal and the target server.

[0046] In an embodiment of the present application, the first server cluster receives N first data packets sent by the second server cluster; the first server cluster sends N data packets to the target port in the target server based on the first mapping relationship, and establishes a session between the first server cluster and the target server through the target port, wherein the first mapping relationship is used to characterize the mapping relationship between the address information of the target terminal and the address information of the target port, so that the first server cluster can establish a session between the first server cluster and the target server by calling the target port in the target server, thereby reducing the occupancy of port resources and releasing port resources.

[0047] Optionally, the first server cluster sends the N first data packets to a target port in a target server according to a preset first mapping relationship, including:

[0048] The first server cluster performs a hash operation on the address information of the target terminal included in the N first data packets to obtain a first hash value;

[0049] When the first hash value is the same as the second hash value, the first server cluster sends the N first data packets to the target port in the target server according to a preset first mapping relationship;

[0050] The second hash value is determined based on a hash operation on the address information of the target terminal included in the second data packet, and the second data packet is a data packet initially sent by the second server cluster to the first server cluster.

[0051] In this embodiment, the second server cluster sends the second data packet of the target terminal to the first server cluster, so that the first server cluster determines the second hash value after receiving the second data packet; after receiving the first data packet, the first server cluster determines the first hash value according to the address information of the first data packet, compares the first hash value with the second hash value, and determines whether the first data packet is sent by the target terminal. When the first hash value is the same as the second hash value, N first data packets are sent to the target server according to the first mapping relationship. In this way, the second data packet is sent from the first server cluster to the second server cluster, so that in the same session, the first data packet of the target terminal received by the first server cluster is always sent by the same second server in the second server cluster, so that the stream data is transmitted through the same intermediate node, ensuring that the source address received by the target server does not change during a complete session.

[0052] It should be understood that the second server cluster is a load balancing (SLB) server cluster, which is used to distribute the data packets sent by the target terminal to multiple load servers for execution after receiving the data packets sent by the target terminal. To ensure that the source address received by the target server does not change in the same session, the second server cluster sends the data packets of the target terminal to the first server cluster from the same load server.

[0053] For example, see Figure 2 , Figure 2 Schematic diagram of a terminal sending a data packet to a target server provided by an embodiment of the present application. Figure 2 In the example, after receiving the data packet sent by the target terminal 201, the second server cluster 202 distributes the data packet according to the historical sending information and distributes the data packet to the load server L1. The load server L1 sends the data packet to the routing server R1 of the first server cluster 203 according to the historical sending information, and the routing server R1 sends the data packet of the target terminal 201 to the server S1 in the target server 204.

[0054] Optionally, the first server cluster includes M first servers, and the first server cluster establishes an association relationship between the M first servers based on a hash ring, the hash ring is determined based on address information corresponding to the M first servers, and M is a positive integer greater than 1;

[0055] The hash ring is used to determine a first target server, where the first target server is a server in the first server cluster, and the first target server is used to receive N first data packets sent by the second server cluster.

[0056] The hash ring is a virtual ring, and the second server cluster determines the first target server according to the hash ring. Figure 3 As shown, there are M nodes on the hash ring, and each node corresponds to a first server. Among them, the range of hash values ​​between each node. For example, there are 3 nodes on the hash ring, node R1, node R2 and node R3, the range of hash values ​​between node R1 and node R2 is [0,100], the range of hash values ​​between node R2 and node R3 is [100,200], and the range of hash values ​​between node R3 and node R1 is [200,300]. The first target server is determined by the hash value determined by the hash ring and the second server cluster, as detailed in the subsequent embodiments.

[0057] In this embodiment, the first target server is determined by the hash ring and the hash value determined by the second server cluster, and then the first target server continuously receives N first data packets sent by the second server cluster, thereby achieving fixation of the intermediate transmission stage.

[0058] Optionally, the first server cluster establishes an association relationship between the N first servers based on a hash ring and P virtual servers, a virtual server is set between the first servers that are adjacent to each other on the hash ring, and the address information of the virtual server is the same as the address information of the corresponding first server, and P is a positive integer greater than 1;

[0059] The hash ring and the P virtual servers are used to determine the first target server.

[0060] Among them, M first servers establish an association relationship based on a hash ring. When the second server cluster determines the first target server, there is a situation where more access is concentrated on a certain node. Therefore, a virtual server is introduced based on this to reduce the access volume of a single node.

[0061] For example, Figure 4 The three first servers establish an association relationship based on a hash ring, and two virtual servers are added between each first server. The address information of the virtual server is the same as the address information of the first server, so that after determining the virtual server, the second server cluster sends N first data packets to the first server.

[0062] For example, the hash value range between node R1-1 and node R2-1 is [0,33], the hash value range between node R2-1 and node R3-1 is [34,67], and the hash value range between node R3-1 and node R1-2 is [68,100]. Among them, the range between node R1-1 and node R1-2 is still [0,100], which corresponds to the range between node R1-1 and node R2-1, node R2-1 and node R3-1, and node R3-1 and node R1-2. The address information corresponding to node R1-1, node R2-1, and node R3-1 are all one address information, which is the address information of the first server R1, among which node R1-1 and node R2-1 are virtual server nodes. When the determined hash ring positions are node R1-1, node R2-1, and node R3-1, the first target server is determined to be the first server R1, such as Figure 5 shown.

[0063] In this embodiment, by adding a virtual server to the hash ring, the access volume of a single node is reduced, thereby achieving load balancing of the first server cluster.

[0064] Optionally, before the first server cluster receives the N first data packets sent by the second server cluster, the method further includes:

[0065] The first server cluster receives a second data packet sent by the second server cluster and a third data packet sent by the target server; the second data packet is a data packet sent by the second server cluster to the first server cluster for the first time, and the second data packet includes address information of the target terminal, and the third data packet is a data packet sent by the target server to the first server cluster for the first time, and the third data packet includes address information of the target port;

[0066] The first server cluster establishes the first mapping relationship based on the address information of the target terminal and the address information of the target port.

[0067] In this embodiment, the first mapping relationship includes the mapping relationship between the address information of the target terminal and the target server, and in the data transmission of the video conference, the target terminal does not always transmit data with the target server, and different terminals have mapping relationships with different servers in different sessions. In this embodiment, the first mapping relationship is established before the first server cluster receives the N first data packets sent by the target terminal, so that the target terminal and the target server establish a session.

[0068] The second data packet is a data packet sent by the target terminal to the target port of the target server, and the third data packet is a data packet sent by the target server to the address information of the target terminal. Before the target terminal sends the second data packet to the target port of the target server, the target terminal needs to receive the target port information of the target server. Similarly, before the target server sends the third data packet to the address information of the target terminal, the target server needs to receive the address information of the target terminal. The process is as follows:

[0069] See also Figure 6 , Figure 6 201 and the target server 204 establish a session. Figure 6 The target terminal 201 registers with the messenger server 301 in the target server 204, the target terminal 201 sends the address information to the messenger server 301, the target server 204 sends the target port information to the messenger server 301, and the messenger server 301 stores the address information and the target port information. When the target terminal 201 and the target server 204 establish a session, the messenger server 301 sends the target port information of the target server 204 to the target terminal 201, and sends the address information of the target terminal 201 to the target server 204.

[0070] Furthermore, the first server cluster 203 receives the address information of the second data packet of the target terminal 201 and the address information of the third data packet of the target server 204, and establishes a first mapping relationship.

[0071] Optionally, the N data packets include:

[0072] Audio data packets of the first protocol, audio data packets of the second protocol, video data packets of the first protocol, video data packets of the second protocol.

[0073] It should be understood that the data transmission of the video conference includes audio data and video data, which are transmitted through the first protocol and the second protocol respectively. Among them, the first protocol is the Real-Time Transport Protocol (RTP), and the second protocol is the Real-Time Transport Control Protocol (RTCP). In the target terminal, different interfaces are used to send data packets of different protocols; in the target server, one media interface is used to receive all data packets to realize port multiplexing, thereby reducing the occupation of public network port resources by the session and increasing the number of terminals that can be connected to the target server.

[0074] Exemplarily, the third data packet includes a message sent by the target terminal 201 to the target server 204 as shown in Table 1:

[0075] Table 1

[0076]

[0077] Among them, the target terminal 201 sends the third data packet to the target server 204. The specific process is that the target terminal 201 sends the third data packet to the second server cluster 202, and then the second server cluster 202 sends the third data packet to the first server cluster 203, and finally the first server cluster 203 sends the third data packet to the target server 204.

[0078] It should be understood that the process of the target terminal 201 sending the third data packet to the second server cluster 202 is an external network transmission process, while the process of the first server cluster 203 sending the third data packet to the target server 204 is an internal network transmission process. Among them, when the target terminal 201 sends the third data packet to the second server cluster 202, the third data packet is sent to the public network address of the target port of the target server, that is, Port-A in Table 1; after receiving the third data packet, the second server cluster 202 sends it to the first server cluster 203; in the internal transmission process, the target port of the target server needs to be converted from the public network address to the internal network address, as shown in Table 2 below:

[0079] Table 2

[0080]

[0081]

[0082] According to the above table, after the first server cluster 203 receives the third data packet, the public network address of the third data packet is converted from IP2 to IP3, and the public network port is converted from Port-A to Port-a, Port-b, Port-c and Port-d. The audio RTP in the third data packet is sent to Port-a, the audio RTCP in the third data packet is sent to Port-b, the video RTP in the third data packet is sent to Port-c, and the video RTCP in the third data packet is sent to Port-d, and a first mapping relationship is established, that is, the public network port of IP1 is mapped to the intranet port of IP3.

[0083] See also Figure 7 , Figure 7 is a structural diagram of a data transmission device provided in an embodiment of the present application, including a first server cluster, such as Figure 7 As shown, the data transmission device 700 includes:

[0084] The first receiving module 701 is used to receive N first data packets sent by the second server cluster; each first data packet includes data to be transmitted and address information of a target terminal, and N is a positive integer greater than 1;

[0085] The sending module 702 is used to send the N first data packets to the target port in the target server according to a preset first mapping relationship; the first mapping relationship is used to represent the mapping relationship between the address information of the target terminal and the target port.

[0086] Optionally, the sending module 702 is specifically configured to:

[0087] Performing a hash operation on the address information of the target terminal included in the N first data packets to obtain a first hash value;

[0088] When the first hash value is the same as the second hash value, sending the N first data packets to the target port in the target server according to a preset first mapping relationship;

[0089] The second hash value is determined based on a hash operation on the address information of the target terminal included in the second data packet, and the second data packet is a data packet initially sent by the second server cluster to the first server.

[0090] Optionally, the first server cluster includes M first servers, and the first server cluster establishes an association relationship between the M first servers based on a hash ring, the hash ring is determined based on address information corresponding to the M first servers, and M is a positive integer greater than 1;

[0091] The hash ring is used to determine a first target server, where the first target server is a server in the first server cluster, and the first target server is used to receive N first data packets sent by the second server cluster.

[0092] Optionally, the first server cluster establishes an association relationship between the N first servers based on a hash ring and P virtual servers, a virtual server is set between the first servers that are adjacent to each other on the hash ring, and the address information of the virtual server is the same as the address information of the corresponding first server, and P is a positive integer greater than 1;

[0093] The hash ring and the P virtual servers are used to determine the first target server.

[0094] Optionally, before the first receiving module 701, the device further includes:

[0095] a second receiving module, configured to receive a second data packet sent by the second server cluster and a third data packet sent by the target server; the second data packet is a data packet initially sent by the second server cluster to the first server, and the second data packet includes address information of the target terminal; the third data packet is a data packet initially sent by the target server to the first server cluster, and the third data packet includes information of the target port;

[0096] A processing module is used to establish the first mapping relationship based on the address information of the target terminal and the address information of the target port.

[0097] In an embodiment of the present application, the first server cluster receives N first data packets sent by the second server cluster; the first server cluster sends N data packets to the target port in the target server based on the first mapping relationship, and establishes a session between the first server cluster and the target server through the target port, wherein the first mapping relationship is used to characterize the mapping relationship between the address information of the target terminal and the address information of the target port, so that the first server cluster can establish a session between the first server cluster and the target server by calling the target port in the target server, thereby reducing the occupancy of port resources and releasing port resources.

[0098] The data transmission device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or it can be other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc. It can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0099] The data transmission device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0100] The data transmission device provided by the embodiment of the present application can realize Figure 1 To avoid repetition, the various processes implemented by the method embodiment are not described here.

[0101] See also Figure 8 , Figure 8 is a structural diagram of a data transmission system provided in an embodiment of the present application, such as Figure 8 As shown, the data transmission system 800 includes a target terminal 801, a first server cluster 803, a second server cluster 802 and a target server 804, wherein the first server cluster 803 is respectively connected to the second server cluster 802 and the target server 404 in communication, and the target terminal 801 is connected to the second server cluster 802 in communication;

[0102] The second server cluster 802 is used to receive N first data packets sent by the target terminal 801; each first data packet includes data to be transmitted and address information of the target terminal 801, and N is a positive integer greater than 1;

[0103] The second server cluster 802 is further configured to send the N first data packets to the first server cluster 803 according to a preset second mapping relationship;

[0104] The first server cluster 803 is used to receive N first data packets sent by the second server cluster 802;

[0105] The first server cluster 803 is also used to send the N first data packets to the target port in the target server 804 according to a preset first mapping relationship; the first mapping relationship is used to characterize the mapping relationship between the address information of the target terminal 801 and the address information of the target port.

[0106] The second server cluster is an SLB server, which provides a public network entrance and sends the data packet received from the client of the target terminal to the first server cluster, or sends the data packet sent by the first server cluster to the target terminal. The data packet includes the address information of the target terminal, and the types of N data packets are different, and N is a positive integer greater than 1.

[0107] The second mapping relationship includes a mapping relationship between the address information of the target terminal and the address information of the target port of the first server cluster.

[0108] In an embodiment of the present application, the first server cluster receives N first data packets sent by the second server cluster; the first server cluster sends N data packets to the target port in the target server based on the first mapping relationship, and establishes a session between the first server cluster and the target server through the target port, wherein the first mapping relationship is used to characterize the mapping relationship between the address information of the target terminal and the address information of the target port, so that the first server cluster can establish a session between the first server cluster and the target server by calling the target port in the target server, thereby reducing the occupancy of port resources and releasing port resources.

[0109] Optionally, the second server cluster 802 is further configured to receive a fourth data packet sent by the target terminal; the fourth data packet is data initially sent by the target terminal to the second server cluster 802, and the fourth data packet includes address information of the target terminal;

[0110] The second server cluster 802 is further configured to obtain address information of the first server cluster 803 , and establish the second mapping relationship based on the address information of the target terminal and the address information of the first server cluster 803 .

[0111] It should be understood that the second server cluster receives the fourth data packet, which includes the address information of the target terminal. The second server cluster performs a hash calculation on the address information to obtain a third hash value. At the same time, the second server cluster also obtains the address information of the first server cluster, and establishes a second mapping relationship based on the address information of the target terminal and the address information of the first server cluster. After the second server cluster receives the first data packet, it performs a hash calculation on the address information of the first data packet to determine the first hash value. When the first hash value is the same as the third hash value, the second server cluster sends the first data packet to the first server cluster according to the second mapping relationship. In this way, the fourth data packet is sent to the first server cluster through the target terminal, so that in the same session, the first data packet of the target terminal received by the second server cluster is always sent by the second server cluster, so that the streaming data is transmitted through the same intermediate node, ensuring that the source address received by the target server does not change during a complete session.

[0112] To facilitate understanding of the technical solution in the data transmission method provided in the embodiment of the present application, please refer to Fig. 9 ,like Fig. 9As shown, first, the target terminal and the target server register with the messenger server; when a session needs to be established, the target terminal sends a second data packet and a fourth data packet to the target port of the target server, and the target server sends a third data packet to the address information of the target terminal to establish a first mapping relationship and a second mapping relationship; after the first mapping relationship and the second mapping relationship are established, the target terminal sends N first data packets; the second server cluster receives the first N data packets, and sends N first data packets to the first server cluster according to the second mapping relationship; the first server cluster receives N first data packets, and sends N first data packets to the target port of the target server according to the first mapping relationship, thereby completing the data transmission of the video conference.

[0113] Optionally, the second server cluster 802 is further used to perform hash calculation on the address information of the target terminal 801 of the N first data packets to obtain a third hash value;

[0114] The second server cluster 802 is further used to determine a first target server in the first server cluster 803 according to the third hash value;

[0115] The second server cluster 802 is further configured to send the N first data packets to the first target server.

[0116] It should be understood that the first server cluster includes multiple first servers, and in the process of transmitting N first data packets to the target server, they pass through an SLB server in the second server cluster and a first server in the first server cluster. In the process of data transmission, in order to keep the path transmitted to the target server consistent, the second server cluster determines that a first server in the first server cluster is the first target server according to the third hash value, and then sends N first data packets to the first target server. After receiving the N first data packets, the first target server sends N first data packets to the target server. In this way, the N first data packets received by the target server are all sent by the first target server, ensuring the consistency of the path.

[0117] Optionally, the first server cluster 803 includes M first servers, and an association relationship is established between the M first servers based on a hash ring, the hash ring is determined based on address information corresponding to the M first servers, and M is a positive integer greater than 1;

[0118] The second server cluster 802 is specifically configured to determine the first target server according to a pointing position corresponding to the third hash value on the hash ring.

[0119] The hash ring is a virtual ring, and the second server cluster determines the first target server according to the hash ring.

[0120] For example, Figure 3 As shown, there are M nodes on the hash ring, and each node corresponds to a first server. Among them, the range of hash values ​​between each node. For example, there are 3 nodes on the hash ring, node R1, node R2 and node R3, the range of hash values ​​between node R1 and node R2 is [0,100], the range of hash values ​​between node R2 and node R3 is [100,200], and the range of hash values ​​between node R3 and node R1 is [200,300]. The second server cluster determines the first server corresponding to the node on the hash ring based on the calculated third hash value.

[0121] Among them, after the second server cluster determines the hash value, a node on the hash ring is determined. For example, the third hash value is determined to be 150, and the hash ring position corresponding to the third hash value is between nodes R2 and R3. At this time, a selection order is specified, and the nearest node is selected in order as the node corresponding to the first server. For example, in a clockwise order, the nearest node is R3, that is, the first server corresponding to node R3 is the first target server.

[0122] Optionally, an association relationship is established between the N first servers based on a hash ring and P virtual servers, a virtual server is set between the first servers that are adjacent to each other on the hash ring, and the address information of the virtual server is the same as the address information of the corresponding first server, and P is a positive integer greater than 1;

[0123] The second server cluster 802 is further specifically configured to determine the first target server according to location information corresponding to the third hash value on the hash ring and the P virtual servers.

[0124] It should be understood that the M first servers establish an association relationship based on the hash ring. When the second server cluster determines the first target server, there is a situation where more access is concentrated on a certain node. Therefore, a virtual server is introduced based on this to reduce the access volume of a single node.

[0125] For example, Figure 4 The three first servers establish an association relationship based on a hash ring, and two virtual servers are added between each first server. The address information of the virtual server is the same as the address information of the first server, so that after determining the virtual server, the second server cluster sends N first data packets to the first server.

[0126] For example, the hash value range between node R1-1 and node R2-1 is [0,33], the hash value range between node R2-1 and node R3-1 is [34,67], and the hash value range between node R3-1 and node R1-2 is [68,100]. Among them, the range between node R1-1 and node R1-2 is still [0,100], which corresponds to the range between node R1-1 and node R2-1, node R2-1 and node R3-1, and node R3-1 and node R1-2. The address information corresponding to node R1-1, node R2-1, and node R3-1 are all one address information, which is the address information of the first server R1, among which node R1-1 and node R2-1 are virtual server nodes. When the hash ring position determined by the second server cluster is node R1-1, node R2-1, and node R3-1, the second server cluster determines that the first target server is the first server R1, such as Figure 5 shown.

[0127] It should be understood that the second server cluster includes multiple second servers, and one of the multiple second servers is determined as the second target server, and the second target server is used to transmit N first data packets to the first target server. The second server cluster determines the second target server through the third hash value and the hash ring, which is the same as determining the first target server through the third hash value and the hash ring, and will not be repeated here.

[0128] Optional, such as Fig.10 As shown, when the first target server is abnormal and cannot transmit data, the target terminal sends the third data packet again to re-determine the first target server. For example, when the first target server is R1, server R1 is abnormal, and the target terminal sends the third data packet again. At this time, the first server cluster re-determines server R2 as the first target server based on the hash ring.

[0129] In this embodiment, the first target server is determined by the target terminal resending the third data packet, thereby achieving replacement of the first target server during the data transmission process and ensuring the continuity of data transmission.

[0130] Optional, such as Fig.11 As shown, when the second target server is abnormal and cannot transmit data, the target terminal sends the third data packet again to redetermine the second target server. For example, when the second target server is L1, server L1 is abnormal, and the target terminal sends the third data packet again. At this time, the second server cluster re-determines server L2 as the second target server based on the hash ring.

[0131] In this embodiment, the second target server is determined by the target terminal resending the third data packet, so that the second target server is replaced during the data transmission process, thereby ensuring the continuity of data transmission.

[0132] The data transmission system in the embodiment of the present application may be a device, a device or electronic device with an operating system, or a component, an integrated circuit, or a chip in a data transmission device. The device or network side device may be a base station.

[0133] The data transmission system provided in the embodiment of the present application can achieve Figure 1 The various processes implemented by the method embodiment and achieving the same technical effect are not described here to avoid repetition.

[0134] Alternatively, if Fig.12 As shown, an embodiment of the present application also provides an electronic device 1200, including a processor 1201, a memory 1202, and a program or instruction stored in the memory 1202 and executable on the processor 1201. When the program or instruction is executed by the processor 1201, the various processes of the training method embodiment of the above-mentioned data transmission model are implemented, or the various processes of the above-mentioned data transmission method embodiment are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0135] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0136] Fig.13 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.

[0137] The electronic device 1300 includes but is not limited to: a radio frequency unit 1301, a network module 1302, an audio output unit 1303, an input unit 1304, a sensor 1305, a display unit 1306, a user input unit 1307, an interface unit 1308, a memory 1309, and a processor 1210 and other components.

[0138] Those skilled in the art will appreciate that the electronic device 1300 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 1310 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Fig.13 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0139] In one embodiment, the electronic device is a first server, and the radio frequency unit 1301 is used to receive N first data packets sent by the second server; each first data packet includes data to be transmitted and address information of a target terminal, and N is a positive integer greater than 1;

[0140] According to a preset first mapping relationship, the N first data packets are sent to a target port in a target server; the first mapping relationship is used to characterize a mapping relationship between the address information of the target terminal and the target port.

[0141] Optionally, the processor 1310 is configured to perform a hash operation on the address information of the target terminal included in the N first data packets to obtain a first hash value;

[0142] The radio frequency unit 1301 is further configured to send the N first data packets to a target port in a target server according to a preset first mapping relationship when the first hash value is the same as the second hash value.

[0143] Optionally, the radio frequency unit 1301 is further configured to receive a second data packet sent by the second server and a third data packet sent by the target server; the second data packet is a data packet initially sent by the second server to the first server, and the second data packet includes address information of the target terminal, and the third data packet is a data packet initially sent by the target server to the first server, and the third data packet includes information of the target port;

[0144] The processor 1310 is further configured to establish the first mapping relationship based on the address information of the target terminal and the information of the target port.

[0145] In one embodiment, the electronic device is a second server, and the radio frequency unit 1301 is used to receive N first data packets sent by the target terminal; each first data packet includes data to be transmitted and address information of the target terminal, and N is a positive integer greater than 1;

[0146] According to a preset second mapping relationship, the N first data packets are sent to the first server.

[0147] Optionally, the radio frequency unit 1301 is further configured to receive a fourth data packet sent by the target terminal; the fourth data packet is data initially sent by the target terminal to the second server, and the fourth data packet includes address information of the target terminal;

[0148] The processor 1310 is further configured to obtain address information of the first server, and establish the second mapping relationship based on the address information of the target terminal and the address information of the first server.

[0149] In an embodiment of the present application, a first server receives N first data packets sent by a second server; based on a first mapping relationship, the first server sends N data packets to a target port in a target server, and establishes a session between the first server and the target server through the target port, wherein the first mapping relationship is used to characterize a mapping relationship between address information of the target terminal and port information of the target port, so that the first server can establish a session between the first server and the target server by calling the target port in the target server, thereby reducing the occupancy of port resources and releasing port resources.

[0150] It should be understood that in the embodiment of the present application, the input unit 1304 may include a graphics processor (Graphics Processing Unit, GPU) 13041 and a microphone 13042, and the graphics processor 13041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 1306 may include a display panel 13061, and the display panel 13061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1307 includes a touch panel 13071 and at least one of other input devices 13072. The touch panel 13071 is also called a touch screen. The touch panel 13071 may include two parts: a touch detection device and a touch controller. Other input devices 13072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0151] The memory 1309 can be used to store software programs and various data. The memory 1309 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 1309 may include a volatile memory or a non-volatile memory, or the memory 1309 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 1309 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0152] The processor 1310 may include one or more processing units; optionally, the processor 1310 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 1310.

[0153] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the various processes of the above-mentioned data transmission method embodiment are implemented and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0154] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0155] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned data transmission method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0156] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0157] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned data transmission method embodiment and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0158] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0159] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0160] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A data transmission method, characterized in that: include: The first server cluster receives N first data packets sent by the second server cluster; Each first data packet includes data to be transmitted and address information of a target terminal, where N is a positive integer greater than 1; The first server cluster sends the N first data packets to a target port in a target server according to a preset first mapping relationship; The first mapping relationship is used to represent the mapping relationship between the address information of the target terminal and the address information of the target port; The first server cluster sends the N first data packets to the target port in the target server according to the preset first mapping relationship, including: The first server cluster performs a hash operation on the address information of the target terminal included in the N first data packets to obtain a first hash value; When the first hash value is the same as the second hash value, the first server cluster sends the N first data packets to the target port in the target server according to a preset first mapping relationship; The second hash value is determined based on a hash operation on the address information of the target terminal included in the second data packet, and the second data packet is a data packet initially sent by the second server cluster to the first server cluster.

2. The method according to claim 1, characterized in that The first server cluster includes M first servers, and the first server cluster establishes an association relationship between the M first servers based on a hash ring, the hash ring is determined based on address information corresponding to the M first servers, and M is a positive integer greater than 1; The hash ring is used to determine a first target server, where the first target server is a server in the first server cluster, and the first target server is used to receive N first data packets sent by the second server cluster.

3. The method according to claim 2, characterized in that The first server cluster establishes an association relationship between the M first servers based on a hash ring and P virtual servers, a virtual server is set between the first servers that are adjacent to each other on the hash ring, and the address information of the virtual server is the same as the address information of the corresponding first server, and P is a positive integer greater than 1; The hash ring and the P virtual servers are used to determine the first target server.

4. The method according to claim 1, characterized in that: Before the first server cluster receives the N first data packets sent by the second server cluster, the method further includes: The first server cluster receives a second data packet sent by the second server cluster and a third data packet sent by the target server; the second data packet is a data packet sent by the second server cluster to the first server cluster for the first time, and the second data packet includes address information of the target terminal, and the third data packet is a data packet sent by the target server to the first server cluster for the first time, and the third data packet includes address information of the target port; The first server cluster establishes the first mapping relationship based on the address information of the target terminal and the address information of the target port.

5. A data transmission device, comprising a first server cluster, characterized in that: The device comprises: A first receiving module, configured to receive N first data packets sent by the second server cluster; each first data packet includes data to be transmitted and address information of a target terminal, and N is a positive integer greater than 1; A sending module, used for sending the N first data packets to a target port in a target server according to a preset first mapping relationship; the first mapping relationship is used to represent a mapping relationship between the address information of the target terminal and the target port; The sending module is further configured to cause the first server cluster to perform a hash operation on the address information of the target terminal included in the N first data packets to obtain a first hash value; and to cause the first server cluster to send the N first data packets to a target port in the target server according to a preset first mapping relationship when the first hash value is the same as the second hash value; The second hash value is determined based on a hash operation on the address information of the target terminal included in the second data packet, and the second data packet is a data packet initially sent by the second server cluster to the first server cluster.

6. The device according to claim 5, characterized in that The sending module is specifically used for: Performing a hash operation on the address information of the target terminal included in the N first data packets to obtain a first hash value; When the first hash value is the same as the second hash value, sending the N first data packets to the target port in the target server according to a preset first mapping relationship; The second hash value is determined based on a hash operation on the address information of the target terminal included in the second data packet, and the second data packet is a data packet initially sent by the second server cluster to the first server cluster.

7. The device according to claim 5, characterized in that The first server cluster includes M first servers, and the first server cluster establishes an association relationship between the M first servers based on a hash ring, the hash ring is determined based on address information corresponding to the M first servers, and M is a positive integer greater than 1; The hash ring is used to determine a first target server, where the first target server is a server in the first server cluster, and the first target server is used to receive N first data packets sent by the second server cluster.

8. The device according to claim 7, characterized in that The first server cluster establishes an association relationship between the M first servers based on a hash ring and P virtual servers, a virtual server is set between the first servers that are adjacent to each other on the hash ring, and the address information of the virtual server is the same as the address information of the corresponding first server, and P is a positive integer greater than 1; The hash ring and the P virtual servers are used to determine the first target server.

9. The device according to claim 8, characterized in that Before the first receiving module, the device further includes: a second receiving module, configured to receive a second data packet sent by the second server cluster and a third data packet sent by the target server; the second data packet is a data packet initially sent by the second server cluster to the first server cluster, and the second data packet includes address information of the target terminal; the third data packet is a data packet initially sent by the target server to the first server cluster, and the third data packet includes address information of the target port; A processing module is used to establish the first mapping relationship based on the address information of the target terminal and the address information of the target port.

10. A data transmission system, characterized in that: It comprises a first server cluster, a second server cluster, a target terminal and a target server, wherein the first server cluster is respectively connected to the second server cluster and the target server in communication, and the target terminal is connected to the second server cluster in communication; The second server cluster is used to receive N first data packets sent by the target terminal; each first data packet includes data to be transmitted and address information of the target terminal, and N is a positive integer greater than 1; The second server cluster is further configured to send the N first data packets to the first server cluster according to a preset second mapping relationship; The first server cluster is used to receive N first data packets sent by the second server cluster; The first server cluster is further used to send the N first data packets to the target port in the target server according to a preset first mapping relationship; the first mapping relationship is used to represent the mapping relationship between the address information of the target terminal and the address information of the target port; The first server cluster is further configured to perform a hash operation on the address information of the target terminal included in the N first data packets to obtain a first hash value; and for sending the N first data packets to a target port in a target server according to a preset first mapping relationship when the first hash value is the same as the second hash value; The second hash value is determined based on a hash operation on the address information of the target terminal included in the second data packet, and the second data packet is a data packet initially sent by the second server cluster to the first server cluster.

11. The data transmission system according to claim 10, characterized in that: The second server cluster is further configured to receive a fourth data packet sent by the target terminal; the fourth data packet is a data packet initially sent by the target terminal to the second server cluster, and the fourth data packet includes address information of the target terminal; The second server cluster is further used to obtain the address information of the first server cluster, and establish the second mapping relationship based on the address information of the target terminal and the address information of the first server cluster.

12. The data transmission system according to claim 10, characterized in that: The second server cluster is further used to perform hash calculation on the address information of the target terminals of the N first data packets to obtain a third hash value; The second server cluster is further used to determine a first target server in the first server cluster according to the third hash value; The second server cluster is further used to send the N first data packets to the first target server.

13. The data transmission system according to claim 12, characterized in that: The first server cluster includes M first servers, and an association relationship is established between the M first servers based on a hash ring, and the hash ring is determined based on address information corresponding to the M first servers, and M is a positive integer greater than 1; The second server cluster is specifically used to determine the first target server according to the pointing position corresponding to the third hash value on the hash ring.

14. The data transmission system according to claim 13, characterized in that: An association relationship is established between the M first servers based on a hash ring and P virtual servers, a virtual server is set between the first servers that are adjacent to each other on the hash ring, and the address information of the virtual server is the same as the address information of the corresponding first server, and P is a positive integer greater than 1; The second server cluster is further specifically used to determine the first target server according to the location information corresponding to the third hash value on the hash ring and the P virtual servers.

15. An electronic device, characterized in that: The method comprises a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the data transmission method according to any one of claims 1 to 4.

16. A readable storage medium, characterized in that: The readable storage medium stores a program or an instruction, and when the program or the instruction is executed by the processor, the steps of the data transmission method according to any one of claims 1 to 4 are implemented.