WO2024083008A1 - Data transmission method, apparatus and system, electronic device, and medium - Google Patents

Data transmission method, apparatus and system, electronic device, and medium Download PDF

Info

Publication number
WO2024083008A1
WO2024083008A1 PCT/CN2023/123925 CN2023123925W WO2024083008A1 WO 2024083008 A1 WO2024083008 A1 WO 2024083008A1 CN 2023123925 W CN2023123925 W CN 2023123925W WO 2024083008 A1 WO2024083008 A1 WO 2024083008A1
Authority
WO
WIPO (PCT)
Prior art keywords
server
target
server cluster
address information
data packet
Prior art date
Application number
PCT/CN2023/123925
Other languages
French (fr)
Chinese (zh)
Inventor
丁培倡
Original Assignee
维沃移动通信有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 维沃移动通信有限公司 filed Critical 维沃移动通信有限公司
Publication of WO2024083008A1 publication Critical patent/WO2024083008A1/en

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/1066Session management

Definitions

  • the present application belongs to the technical field of data transmission, and specifically relates to a video conference data transmission method, device, system, electronic device and medium.
  • 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.
  • SIP Session Initiation Protocol
  • the server needs to directly map the public network to each media port corresponding to the four ports of the terminal, and the server may need to conduct conversations with multiple terminals at the same time, thus occupying more public network port resources.
  • the purpose of the embodiments of the present application is to provide a data transmission method, device, system, electronic device and medium, which can solve the problem of occupying a large number of public network port resources.
  • an embodiment of the present application provides a data transmission method, the method comprising:
  • 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;
  • 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.
  • an embodiment of the present application provides a data transmission device, the device comprising:
  • 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;
  • 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.
  • 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;
  • 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 characterize the mapping relationship between the address information of the target terminal and the address information of the target port.
  • 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.
  • an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored.
  • the program or instruction is executed by a processor, the steps of the data transmission method described in the first aspect are implemented.
  • 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.
  • 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.
  • an electronic device configured to execute the steps of the data transmission method as described in the first aspect.
  • 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.
  • FIG1 is a flow chart of a data transmission method provided in an embodiment of the present application.
  • FIG. 2 is a schematic diagram of a terminal sending a data packet to a target server according to an embodiment of the present application
  • FIG3 is one of the structural schematic diagrams of the hash ring provided in the embodiment of the present application.
  • FIG4 is a second schematic diagram of the structure of a hash ring provided in an embodiment of the present application.
  • FIG5 is a schematic diagram of data transmission based on a hash ring provided in an embodiment of the present application.
  • FIG6 is a schematic diagram of establishing a first mapping relationship provided in an embodiment of the present application.
  • FIG7 is a structural diagram of a data transmission device provided in an embodiment of the present application.
  • FIG8 is a structural diagram of a data transmission system provided in an embodiment of the present application.
  • FIG9 is an application flow chart of a data transmission system provided in an embodiment of the present application.
  • FIG. 10 is a schematic diagram of a terminal sending a data packet to a target server according to an embodiment of the present application
  • FIG. 11 is a second schematic diagram of a terminal sending a data packet to a target server according to an embodiment of the present application
  • FIG12 is a structural diagram of an electronic device provided in an embodiment of the present application.
  • FIG. 13 is a hardware structure diagram of the electronic device provided in an embodiment of the present application.
  • first, second, etc. in the specification and claims of this 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.
  • the first object can be one or more.
  • “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.
  • the server maps each port of the terminal to the public network and establishes a session with the terminal to achieve data transmission.
  • 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.
  • the server can only have a session connection with a limited number of terminals.
  • the embodiment of the present application provides a data transmission method. Please refer to Figure 1, which is a flow chart of the data transmission method provided by the embodiment of the present application.
  • the data transmission method provided by the embodiment of the present application includes the following steps:
  • 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.
  • 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.
  • the source address of the first data packet received by the target server is required to remain unchanged. Therefore, 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.
  • 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.
  • the address information of the target terminal is Internet Protocol (IP) information.
  • IP Internet Protocol
  • 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.
  • 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.
  • 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.
  • 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.
  • the first server cluster 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.
  • 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.
  • the first terminal and the second terminal need to establish a session with the target server.
  • 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.
  • 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.
  • 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:
  • 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
  • the first server cluster Mapping relationship sending the N first data packets to the target port in the target server;
  • 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.
  • 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.
  • 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.
  • 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 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.
  • 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.
  • SB load balancing
  • FIG. 2 is a schematic diagram of a terminal sending a data packet to a target server provided in an embodiment of the present application.
  • 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.
  • 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.
  • the hash ring is a virtual ring
  • the second server cluster determines the first target server based on the hash ring.
  • there are M nodes on the hash ring and each node corresponds to a first server.
  • the range of hash values between each node is represented. 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.
  • 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.
  • the first server cluster is based on a hash ring and P virtual servers between the N first 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.
  • M first servers establish an association relationship based on a hash ring.
  • 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.
  • 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.
  • 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]
  • the hash value range between node R3-1 and node R1-2 is [68,100].
  • 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, wherein node R1-1 and node R2-1 are virtual server nodes.
  • the first target server is determined to be the first server R1, as shown in Figure 5.
  • the access volume of a single node is reduced, thereby achieving load balancing of the first server cluster.
  • the method 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.
  • 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.
  • 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.
  • the second data packet is a data packet sent by the target terminal to the target port of the target server
  • the third data packet is a data packet sent by the target server to the address information of the target terminal.
  • FIG6 is a schematic diagram of establishing a first mapping relationship provided by an embodiment of the present application.
  • the target terminal 201 and the target server 204 Before the target terminal 201 and the target server 204 establish a session, they need to register through the messenger server 301 in FIG6 , the target terminal 201 sends the address information to the messenger server 301, and 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.
  • 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.
  • 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.
  • the N data packets include:
  • 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.
  • 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.
  • the first protocol is the Real-Time Transport Protocol (RTP)
  • the second protocol is the Real-Time Transport Control Protocol (RTCP).
  • RTP Real-Time Transport Protocol
  • RTCP Real-Time Transport Control Protocol
  • 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.
  • the third data packet includes a message sent by the target terminal 201 to the target server 204 as shown in Table 1:
  • 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.
  • the process of the target terminal 201 sending the third data packet to the second server cluster 202 is an external network transmission process
  • the process of the first server cluster 203 sending the third data packet to the target server 204 is an internal network transmission process.
  • the target terminal 201 sends the third data packet to the second server cluster 202, it sends the third data packet 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 After that, it is sent to the first server cluster 203; during the internal transmission process, the target port of the target server needs to be converted from the public network address to the intranet address, as shown in the following Table 2:
  • 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
  • the video RTCP in the third data packet is sent to Port-d
  • a first mapping relationship is established, that is, the public network port of IP1 is mapped to the intranet port of IP3.
  • FIG. 7 is a structural diagram of a data transmission device provided in an embodiment of the present application, including a first server cluster. As shown in FIG. 7 , the data transmission device 700 includes:
  • 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;
  • 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.
  • the sending module 702 is specifically configured to:
  • 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.
  • 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.
  • the first server cluster is based on a hash ring and P virtual servers between the N first 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.
  • the device before the first receiving module 701, 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, 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;
  • 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.
  • 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.
  • 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.
  • 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.
  • NAS Network Attached Storage
  • PC personal computer
  • TV television
  • teller machine a self-service machine
  • 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.
  • the embodiment of the present application provides a data transmission device that can implement each process implemented by the method embodiment of Figure 1. To avoid repetition, they are not described again here.
  • FIG. 8 is a structural diagram of a data transmission system provided in an embodiment of the present application.
  • 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.
  • the first server cluster 803 is respectively connected to the second server cluster 802 and the target server 404 in communication
  • the target terminal 801 is connected to the second server cluster 802 in communication;
  • 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;
  • 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;
  • the first server cluster 803 is used to receive N first data packets sent by the second server cluster 802;
  • 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.
  • 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.
  • 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.
  • 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.
  • 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;
  • 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 .
  • 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.
  • 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.
  • the second 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.
  • the second server cluster sends the first data packet to the first server cluster according to the second mapping relationship.
  • 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.
  • 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 the first mapping relationship and the second mapping relationship; after the first mapping relationship and the second mapping relationship are established, After the mapping relationship, 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, completing the data transmission of the video conference.
  • 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;
  • 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;
  • the second server cluster 802 is further configured to send the N first data packets to the first target server.
  • 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.
  • 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.
  • 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.
  • 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;
  • 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.
  • the hash ring is a virtual ring
  • the second server cluster determines the first target server according to the hash ring.
  • each node corresponds to a first server.
  • the range of hash values between each node is represented. 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.
  • a node on the hash ring is determined.
  • 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.
  • a selection order is specified, and the nearest node is selected in order as the node corresponding to the first server.
  • the nearest node is R3, that is, the first server corresponding to node R3 is the first target server.
  • 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;
  • the second server cluster 802 is further configured to generate a plurality of virtual servers in the hash ring and the P virtual servers according to the third hash value.
  • the corresponding location information on the server determines the first target server.
  • the M first servers establish an association relationship based on the hash ring.
  • 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.
  • 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.
  • 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]
  • the hash value range between node R3-1 and node R1-2 is [68,100].
  • 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, wherein node R1-1 and node R2-1 are virtual server nodes.
  • the second server cluster determines that the first target server is the first server R1, as shown in Figure 5.
  • 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.
  • the target terminal when the first target server is abnormal and cannot transmit data, the target terminal sends a third data packet again to redetermine the first target server.
  • the target terminal when the first target server is R1, server R1 is abnormal, and the target terminal sends a third data packet again, at which time the first server cluster redetermines server R2 as the first target server based on the hash ring.
  • 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.
  • the target terminal when the second target server is abnormal and cannot transmit data, the target terminal sends a third data packet again to redetermine the second target server.
  • the target terminal when the second target server is L1, server L1 is abnormal, and the target terminal sends a third data packet again, at which time the second server cluster redetermines server L2 as the second target server based on the hash ring.
  • the second target server is determined by the target terminal resending the third data packet, thereby achieving replacement of the second target server during the data transmission process and ensuring the continuity of data transmission.
  • 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.
  • the data transmission system provided in the embodiment of the present application can implement each process implemented by the method embodiment of Figure 1 and achieve the same technical effect. To avoid repetition, it will not be repeated here.
  • the embodiment of the present application further provides an electronic device 1200, including a processor 1201, Memory 1202, programs or instructions stored in memory 1202 and executable on the processor 1201, which, when executed by processor 1201, implement various processes of the training method embodiment of the above-mentioned data transmission model, or implement various processes of the above-mentioned data transmission method embodiment, and can achieve the same technical effect, are not described again here to avoid repetition.
  • the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
  • FIG. 13 is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.
  • 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.
  • 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, so that the power management system can manage charging, discharging, and power consumption management.
  • a power source such as a battery
  • the electronic device structure shown in FIG13 does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown, or combine certain components, or arrange components differently, which will not be described in detail here.
  • the electronic device is a first server
  • 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;
  • 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.
  • 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
  • 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.
  • 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;
  • 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.
  • 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;
  • the N first data packets are sent to the first server.
  • the radio frequency unit 1301 is further configured to receive a fourth data packet sent by the target terminal; the fourth data packet The 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;
  • 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.
  • 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.
  • the input unit 1304 may include a 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 a volume control key, a switch key, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
  • 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.
  • 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.
  • 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.
  • 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 the operating system, user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the above-mentioned modem processor The processor may not be integrated into the processor 1310.
  • An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored.
  • a program or instruction is stored.
  • 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.
  • 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.
  • 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.
  • 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.
  • 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.
  • the technical solution of the present application can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM/RAM, a magnetic 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.
  • a storage medium such as ROM/RAM, a magnetic disk, or an optical disk
  • a terminal which can be a mobile phone, a computer, a server, or a network device, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Business, Economics & Management (AREA)
  • General Business, Economics & Management (AREA)
  • Multimedia (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The present application belongs to the technical field of data transmission. Disclosed are a data transmission method, apparatus and system, an electronic device, and a medium. The data transmission method comprises: a first server cluster receiving N first data packets sent by a second server cluster, each first data packet comprising data to be transmitted and address information of a target terminal, and N being a positive integer greater than 1; and, according to a preset first mapping relationship, the first server cluster sending the N first data packets to a target port in a target server, the first mapping relationship being used for representing the mapping relationship between the address information of the target terminal and the address information of the target port.

Description

数据传输方法、装置、系统、电子设备及介质Data transmission method, device, system, electronic device and medium
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请主张在2022年10月17日在中国提交的中国专利申请No.202211284471.0的优先权,其全部内容通过引用包含于此。This application claims priority to Chinese Patent Application No. 202211284471.0 filed in China on October 17, 2022, the entire contents of which are incorporated herein by reference.
技术领域Technical Field
本申请属于数据传输技术领域,具体涉及一种视频会议数据传输方法、装置、系统、电子设备及介质。The present application belongs to the technical field of data transmission, and specifically relates to a video conference data transmission method, device, system, electronic device and medium.
背景技术Background technique
目前的视频会议系统采用会话初始协议(Session Initiation Protocol,SIP)进行数据传输,通过四个端口建立终端和服务器之间的会话。而对于服务器,服务器需要直接公网映射与终端四个端口对应的每个媒体端口,且服务器可能需要同时和多个终端进行会话,从而占用了较多的公网端口资源。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 the public network to each media port corresponding to the four ports of the terminal, 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
本申请实施例的目的是一种数据传输方法、装置、系统、电子设备及介质,能够解决占用了较多的公网端口资源的问题。The purpose of the embodiments of the present application is to provide a data transmission method, device, system, electronic device and medium, which can solve the problem of occupying a large number of public network port resources.
第一方面,本申请实施例提供了数据传输方法,该方法包括:In a first aspect, an embodiment of the present application provides a data transmission method, the method comprising:
第一服务器集群接收第二服务器集群发送的N个第一数据包;所述N个数据包中的每个第一数据包包括待传输数据和所述目标终端的地址信息,N为大于1的正整数;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;
所述第一服务器集群根据预设的第一映射关系,向目标服务器中的目标端口发送所述N个第一数据包;所述第一映射关系用于表征所述目标终端的地址信息与所述目标端口之间的映射关系。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.
第二方面,本申请实施例提供了数据传输装置,所述装置包括:In a second aspect, an embodiment of the present application provides a data transmission device, the device comprising:
第一接收模块,用于接收第二服务器集群发送的N个第一数据包;每个第一数据包包括待传输数据和目标终端的地址信息,N为大于1的正整数;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;
发送模块,用于根据预设的第一映射关系,向目标服务器中的目标端口发送所述N个第一数据包;所述第一映射关系用于表征所述目标终端的地址信息与所述目标端口的地址信息之间的映射关系。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.
第三方面,本申请实施例提供了数据传输系统,包括第一服务器集群、第二服务器集群、目标终端和目标服务器,所述第一服务器集群分别与所述第二服务器集群和所述目标服务器通信连接,所述目标终端与所述第二服务器集群通信连接; 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;
所述第二服务器集群,用于接收所述目标终端发送的N个第一数据包;每个第一数据包包括待传输数据和所述目标终端的地址信息,N为大于1的正整数;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;
所述第二服务器集群,还用于根据预设的第二映射关系,向所述第一服务器集群发送所述N个第一数据包;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;
所述第一服务器集群,用于接收所述第二服务器集群发送的N个第一数据包;The first server cluster is used to receive N first data packets sent by the second server cluster;
所述第一服务器集群,还用于根据预设的第一映射关系,向所述目标服务器中的目标端口发送所述N个第一数据包;所述第一映射关系用于表征所述目标终端的地址信息与所述目标端口的地址信息之间的映射关系。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.
第四方面,本申请实施例提供了一种电子设备,该电子设备包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第一方面所述的数据传输方法的步骤。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.
第五方面,本申请实施例提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第一方面所述的数据传输方法的步骤。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.
第六方面,本申请实施例提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现如第一方面所述的数据传输方法的步骤。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.
第七方面,本申请实施例提供一种计算机程序产品,该程序产品被存储在存储介质中,该程序产品被至少一个处理器执行以实现如第一方面所述的数据传输方法的步骤。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.
第八方面,提供了电子设备,被配置成用于执行如第一方面所述的数据传输方法的步骤。In an eighth aspect, an electronic device is provided, which is configured to execute the steps of the data transmission method as described in the first aspect.
本申请实施例中,第一服务器集群接收第二服务器集群发送的N个第一数据包;第一服务器集群基于第一映射关系,向目标服务器中的目标端口发送N个数据包,通过该目标端口建立第一服务器集群和目标服务器之间的会话,其中,第一映射关系用于表征目标终端的地址信息与目标端口的地址信息之间的映射关系,以此第一服务器集群通过调用目标服务器中的目标端口,即可建立第一服务器集群与目标服务器之间的会话,减少了对端口资源的占用,释放了端口资源。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
图1是本申请实施例提供的数据传输方法的流程图;FIG1 is a flow chart of a data transmission method provided in an embodiment of the present application;
图2是本申请实施例提供的终端向目标服务器发送数据包的示意图;2 is a schematic diagram of a terminal sending a data packet to a target server according to an embodiment of the present application;
图3是本申请实施例提供的哈希环的结构示意图之一;FIG3 is one of the structural schematic diagrams of the hash ring provided in the embodiment of the present application;
图4是本申请实施例提供的哈希环的结构示意图之二;FIG4 is a second schematic diagram of the structure of a hash ring provided in an embodiment of the present application;
图5是本申请实施例提供的基于哈希环进行数据传输的示意图;FIG5 is a schematic diagram of data transmission based on a hash ring provided in an embodiment of the present application;
图6是本申请实施例提供的一种建立第一映射关系的示意图;FIG6 is a schematic diagram of establishing a first mapping relationship provided in an embodiment of the present application;
图7是本申请实施例提供的一种数据传输装置的结构图; FIG7 is a structural diagram of a data transmission device provided in an embodiment of the present application;
图8是本申请实施例提供的一种数据传输系统的结构图;FIG8 is a structural diagram of a data transmission system provided in an embodiment of the present application;
图9是本申请实施例提供的数据传输系统的应用流程图;FIG9 is an application flow chart of a data transmission system provided in an embodiment of the present application;
图10是本申请实施例提供的终端向目标服务器发送数据包的示意图之一;10 is a schematic diagram of a terminal sending a data packet to a target server according to an embodiment of the present application;
图11是本申请实施例提供的终端向目标服务器发送数据包的示意图之二;11 is a second schematic diagram of a terminal sending a data packet to a target server according to an embodiment of the present application;
图12是本申请实施例提供的一种电子设备的结构图;FIG12 is a structural diagram of an electronic device provided in an embodiment of the present application;
图13是本申请实施例提供的电子设备的硬件结构图。FIG. 13 is a hardware structure diagram of the electronic device provided in an embodiment of the present application.
具体实施方式Detailed ways
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员获得的所有其他实施例,都属于本申请保护的范围。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.
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second", etc. in the specification and claims of this 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.
下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的数据传输方法进行详细地说明。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.
现有技术中,服务器公网映射终端的每个端口,建立和终端之间的会话,以此实现数据传输。然而,终端具有多个端口,服务器需要公网映射终端用于会话的所有端口,占用多个公网端口资源。在这种情况下,由于与服务器进行会话的终端受限于公网端口资源,而每个终端和服务器建立会话均需要占用多个公网端口资源,使服务器只能与有限数量的终端进行会话连接。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.
为了解决上述存在的技术问题,本申请实施例提供了一种数据传输方法,请参阅图1,图1是本申请实施例提供的数据传输方法的流程图。本申请实施例提供的数据传输方法包括以下步骤:In order to solve the above-mentioned technical problems, the embodiment of the present application provides a data transmission method. Please refer to Figure 1, which is a flow chart of the data transmission method provided by the embodiment of the present application. The data transmission method provided by the embodiment of the present application includes the following steps:
S101,第一服务器集群接收第二服务器集群发送的N个第一数据包;每个第一数据包包括待传输数据和目标终端的地址信息,N为大于1的正整数。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.
上述第一服务器集群为路由服务器集群,用于在接收到目标终端发送的N个第一数据包后,将第一数据包直接发送至目标服务器。其中,由于目标服务器在同一会话中接收的到第一数据包的源地址要求不发生变化,故在同一会话中,终端的第一数据包都从第一服务器集群中的同一第一服务器向目标服务器发送。其中,数据包包括目标终端的地址信息和待传输数据,且N个第一数据包的类型不同,N为大于1的正整数。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, the source address of the first data packet received by the target server is required to remain unchanged. Therefore, 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.
其中,目标终端的地址信息为网际互连协议(Internet Protocol,IP)信息。 The address information of the target terminal is Internet Protocol (IP) information.
上述N个第一数据包为从目标终端的端口发送的数据包,不同的目标终端的端口发送的第一数据包类型不同。例如,第一数据包包括视频会议的视频数据和音频数据。可以理解的,N个第一数据包均为目标终端发送的数据包,故数据包的地址信息相同,第一服务器通过该地址信息判断出数据包来自一个目标终端,对地址信息相同的数据包做相同的发送处理,请参阅后续实施例。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.
S102,所述第一服务器集群根据预设的第一映射关系,向目标服务器中的目标端口发送所述N个第一数据包;所述第一映射关系用于表征所述目标终端的地址信息与所述目标端口的地址信息之间的映射关系。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.
上述目标服务器为会议服务器,用于处理视频会议相关的第一数据包;目标端口为会议服务器的媒体端口,用于接收或发送视频会议相关的第一数据包。其中,第一映射关系包括目标终端的地址信息与目标服务器的目标端口之间的映射关系,且目标端口为目标服务器的一个端口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.
本步骤中,第一服务器集群在接收到目标终端的第一数据包之后,根据第一映射关系将数据包发送至目标服务器,完成目标终端的多个端口的数据包发送至目标服务器的目标端口数据传输过程。具体的,第一服务器集群在接收到地址信息相同的第一数据包后,查询预设的映射关系,确定第一映射关系;根据第一映射关系确定目标服务器的目标端口,再将接收到的第一数据包发送至目标服务器的目标端口。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.
应理解,在一个视频会议中,一个或多个终端与目标服务器建立会话,第一服务器集群预设有与多个终端的地址信息对应的映射关系。例如,第一终端和第二终端需要与目标服务器建立会话,此时第一服务器集群接收到第一终端的第一数据包和第二终端的第一数据包,第一终端的第一数据包包括第一终端的地址信息,第二终端的第一数据包包括第二终端的地址信息;再根据第一终端的地址信息确认目标服务器,根据第二终端的地址信息确认目标服务器;将第一终端的数据包和第二终端的数据包发送至目标服务器的目标端口,建立第一终端与目标服务器的会话,以及第二终端与目标服务器的会话。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.
本申请实施例中,第一服务器集群接收第二服务器集群发送的N个第一数据包;第一服务器集群基于第一映射关系,向目标服务器中的目标端口发送N个数据包,通过该目标端口建立第一服务器集群和目标服务器之间的会话,其中,第一映射关系用于表征目标终端的地址信息与目标端口的地址信息之间的映射关系,以此第一服务器集群通过调用目标服务器中的目标端口,即可建立第一服务器集群与目标服务器之间的会话,减少了对端口资源的占用,释放了端口资源。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.
可选的,所述第一服务器集群根据预设的第一映射关系,向目标服务器中的目标端口发送所述N个第一数据包,包括: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:
所述第一服务器集群对所述N个第一数据包包括的所述目标终端的地址信息进行哈希运算,得到第一哈希值;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;
所述第一服务器集群在所述第一哈希值与第二哈希值相同的情况下,根据预设的第一 映射关系,向目标服务器中的目标端口发送所述N个第一数据包;When the first hash value is the same as the second hash value, the first server cluster Mapping relationship, sending the N first data packets to the target port in the target server;
其中,所述第二哈希值基于对第二数据包包括的所述目标终端的地址信息进行哈希运算确定,所述第二数据包为所述第二服务器集群向所述第一服务器集群初次发送的数据包。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.
本实施例中,第二服务器集群向第一服务器集群发送目标终端的第二数据包,使得第一服务器集群在接收到第二数据包后确定第二哈希值;第一服务器集群在接收到第一数据包后,根据第一数据包的地址信息确定第一哈希值,对比第一哈希值和第二哈希值,确定第一数据包是否为目标终端发送,在第一哈希值与第二哈希值相同的情况下,根据第一映射关系,向目标服务器发送N个第一数据包。这样,通过第一服务器集群向第二服务器集群发送第二数据包,使在同一会话中,第一服务器集群接收到的目标终端的第一数据包总是由第二服务器集群中的同一第二服务器发送,实现流数据通过同样的中间节点传输,确保在一个完整的会话过程中目标服务器接收到的源地址不发生变化。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 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.
应理解,第二服务器集群为负载均衡(Server Load Balancing,SLB)服务器集群,用于在接收到目标终端发送的数据包之后分配到多个负载服务器执行。为确保在同一会话中目标服务器接收到的源地址不发生变化,第二服务器集群由同一负载服务器向第一服务器集群发送目标终端的数据包。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.
例如,请参阅图2,图2是本申请实施例提供的一种终端向目标服务器发送数据包的示意图。在图2中,第二服务器集群202在接收到目标终端201发送的数据包后,根据历史发送信息将数据包进行分配,将数据包分配给负载服务器L1。负载服务器L1根据历史发送信息将数据包发送至第一服务器集群203的路由服务器R1,由路由服务器R1将目标终端201的数据包发送至目标服务器204中的服务器S1。For example, please refer to FIG. 2, which is a schematic diagram of a terminal sending a data packet to a target server provided in an embodiment of the present application. In FIG. 2, 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.
可选的,所述第一服务器集群包括M个第一服务器,所述第一服务器集群在所述M个第一服务器之间基于哈希环建立关联关系,所述哈希环基于所述M个第一服务器对应的地址信息确定,M为大于1的正整数;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;
所述哈希环用于确定第一目标服务器,所述第一目标服务器为所述第一服务器集群中的一个服务器,所述第一目标服务器用于接收所述第二服务器集群发送的N个第一数据包。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所示,哈希环上设有M个节点,每个节点对应一个第一服务器。其中,每个节点之间表示哈希值的范围。例如,哈希环上设有3个节点,节点R1、节点R2和节点R3,节点R1和节点R2之间表示哈希值的范围为[0,100],节点R2和节点R3之间表示的哈希值的范围为[100,200],节点R3和节点R1之间的哈希值范围为[200,300]。通过哈希环和第二服务器集群确定的哈希值,确定第一目标服务器,详见后续实施例。Wherein, the hash ring is a virtual ring, and the second server cluster determines the first target server based on the hash ring. Exemplarily, as shown in Figure 3, there are M nodes on the hash ring, and each node corresponds to a first server. Wherein, the range of hash values between each node is represented. 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.
本实施例中,通过哈希环和第二服务器集群确定的哈希值,确定第一目标服务器,再通过第一目标服务器持续接收第二服务器集群发送的N个第一数据包,实现了中间传输阶段的固定。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.
可选的,所述第一服务器集群在所述N个第一服务器之间基于哈希环和P个虚拟服 务器建立关联关系,在所述哈希环上存在相邻关系的第一服务器之间设置有虚拟服务器,且所述虚拟服务器的地址信息与对应的第一服务器的地址信息相同,P为大于1的正整数;Optionally, the first server cluster is based on a hash ring and P virtual servers between the N first 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;
所述哈希环和所述P个虚拟服务器用于确定所述第一目标服务器。The hash ring and the P virtual servers are used to determine the first target server.
其中,M个第一服务器基于哈希环建立关联关系,在第二服务器集群确定第一目标服务器的情况下,存在某一个节点集中较多的访问的情况,故基于此引入虚拟服务器,用于降低单一节点的访问量。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.
示例性的,如图4所述,三个第一服务器基于哈希环建立关联关系,在每个第一服务器之间增加两个虚拟服务器。其中,虚拟服务器的地址信息和第一服务器的地址信息相同,使得第二服务器集群在确定虚拟服务器之后,将N个第一数据包发送至第一服务器。Exemplarily, as shown in Figure 4, 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.
例如,节点R1-1和节点R2-1之间的哈希值范围为[0,33],节点R2-1和节点R3-1之间的哈希值范围为[34,67],节点R3-1和节点R1-2之间的哈希值范围为[68,100]。其中,节点R1-1与节点R1-2之间的范围仍为[0,100],与节点R1-1和节点R2-1、节点R2-1和节点R3-1、节点R3-1和节点R1-2之间的范围对应。节点R1-1、节点R2-1和节点R3-1对应的地址信息均为一个地址信息,为第一服务器R1的地址信息,其中,节点R1-1、节点R2-1为虚拟服务器节点。在确定的哈希环位置为节点R1-1、节点R2-1和节点R3-1的情况下,确定第一目标服务器为第一服务器R1,如图5所示。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, wherein 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, as shown in Figure 5.
本实施例中,通过在哈希环上增加虚拟服务器,降低了单一节点的访问量,从而实现均衡第一服务器集群的负载。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.
可选的,所述第一服务器集群接收第二服务器集群发送的N个第一数据包之前,所述方法还包括:Optionally, 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.
本实施例中,第一映射关系包括目标终端的地址信息和目标服务器的映射关系,而在视频会议的数据传输中,目标终端并不是一直与目标服务器进行数据传输,在不同的会话中不同的终端与不同的服务器存在映射关系。本实施例中通过在第一服务器集群接收目标终端发送的N个第一数据包之前,建立第一映射关系,使目标终端和目标服务器建立会话。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.
其中,上述第二数据包为目标终端向目标服务器的目标端口发送的数据包,第三数据包为目标服务器向目标终端的地址信息发送的数据包。目标终端在向目标服务器的目标端口发送的第二数据包之前,目标终端需要接收到目标服务器的目标端口的信息。同样的,目标服务器在向目标终端的地址信息发送第三数据包之前,目标服务器需要接收到目标终 端的地址信息。过程如下: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 target port information of the target terminal. The process is as follows:
请参阅图6,图6是本申请实施例提供的一种建立第一映射关系的示意图。在目标终端201和目标服务器204建立会话之前,需要分别通过图6中的信使服务器301进行注册,目标终端201将地址信息发送至信使服务器301,目标服务器204将目标端口的信息发送至信使服务器301,信使服务器301存储地址信息和目标端口的信息。在目标终端201和目标服务器204建立会话时,信使服务器301向目标终端201发送目标服务器204的目标端口的信息,向目标服务器204发送目标终端201的地址信息。Please refer to FIG6 , which is a schematic diagram of establishing a first mapping relationship provided by an embodiment of the present application. Before the target terminal 201 and the target server 204 establish a session, they need to register through the messenger server 301 in FIG6 , the target terminal 201 sends the address information to the messenger server 301, and 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.
进一步的,第一服务器集群203接收目标终端201的第二数据包的地址信息和目标服务器204的第三数据包的地址信息,建立第一映射关系。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.
可选的,所述N个数据包包括:Optionally, the N data packets include:
第一协议的音频数据包、第二协议的音频数据包、第一协议的视频数据包、第二协议的视频数据包。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.
应理解,视频会议的数据传输包括音频数据和视频数据,分别通过第一协议和第二协议进行数据传输。其中,第一协议为实时传输协议(Real-Time Transport Protocol,RTP),第二协议为实时传输控制协议(Real-Time Transport Control Protocol,RTCP)。在目标终端中,采用不同的接口发送不同协议的数据包;在目标服务器中,采用一个媒体接口接收全部数据包,实现端口复用,从而减少会话对公网端口资源的占用,提高目标服务器可以连接的终端数量。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.
示例性的,第三数据包包括目标终端201向目标服务器204发送的报文如表一所示:Exemplarily, the third data packet includes a message sent by the target terminal 201 to the target server 204 as shown in Table 1:
表一
Table I
其中,目标终端201向目标服务器204发送第三数据包,具体过程为目标终端201向第二服务器集群202发送第三数据包,再由第二服务器集群202向第一服务器集群203发送第三数据包,最后由第一服务器集群203向目标服务器204发送第三数据包。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.
应理解,目标终端201向第二服务器集群202发送第三数据包的过程为外网传输过程,而第一服务器集群203向目标服务器204发送第三数据包的过程为内网传输过程。其中,目标终端201向第二服务器集群202发送第三数据包时,是向目标服务器的目标端口的公网地址发送第三数据包,即表一中的Port-A;第二服务器集群202在接收到第三数据包之 后,发送至第一服务器集群203;在内部传输过程中,需要将目标服务器的目标端口从公网地址转换为内网地址,如下表二所示: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, it sends the third data packet 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 After that, it is sent to the first server cluster 203; during the internal transmission process, the target port of the target server needs to be converted from the public network address to the intranet address, as shown in the following Table 2:
表二
Table II
根据上表,在第一服务器集群203接收到第三数据包之后,将第三数据包的公网地址从IP2转换为IP3,将公网端口从Port-A转换为Port-a、Port-b、Port-c和Port-d,再将第三数据包中的音频RTP发送至Port-a,第三数据包中的音频RTCP发送至Port-b,第三数据包中的视频RTP发送至Port-c,第三数据包中的视频RTCP发送至Port-d,并建立第一映射关系,即IP1的公网端口映射IP3的内网端口。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.
请参见图7,图7是本申请实施例提供的一种数据传输装置的结构图,包括第一服务器集群,如图7所示,该数据传输装置700包括:Please refer to FIG. 7 , which is a structural diagram of a data transmission device provided in an embodiment of the present application, including a first server cluster. As shown in FIG. 7 , the data transmission device 700 includes:
第一接收模块701,用于接收第二服务器集群发送的N个第一数据包;每个第一数据包包括待传输数据和目标终端的地址信息,N为大于1的正整数;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;
发送模块702,用于根据预设的第一映射关系,向目标服务器中的目标端口发送所述N个第一数据包;所述第一映射关系用于表征所述目标终端的地址信息与所述目标端口之间的映射关系。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.
可选的,所述发送模块702,具体用于:Optionally, the sending module 702 is specifically configured to:
对所述N个第一数据包包括的所述目标终端的地址信息进行哈希运算,得到第一哈希值;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;
在所述第一哈希值与第二哈希值相同的情况下,根据预设的第一映射关系,向目标服务器中的目标端口发送所述N个第一数据包;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.
可选的,所述第一服务器集群包括M个第一服务器,所述第一服务器集群在所述M个第一服务器之间基于哈希环建立关联关系,所述哈希环基于所述M个第一服务器对应的地址信息确定,M为大于1的正整数;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;
所述哈希环用于确定第一目标服务器,所述第一目标服务器为所述第一服务器集群中的一个服务器,所述第一目标服务器用于接收所述第二服务器集群发送的N个第一数据包。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.
可选的,所述第一服务器集群在所述N个第一服务器之间基于哈希环和P个虚拟服 务器建立关联关系,在所述哈希环上存在相邻关系的第一服务器之间设置有虚拟服务器,且所述虚拟服务器的地址信息与对应的第一服务器的地址信息相同,P为大于1的正整数;Optionally, the first server cluster is based on a hash ring and P virtual servers between the N first 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;
所述哈希环和所述P个虚拟服务器用于确定所述第一目标服务器。The hash ring and the P virtual servers are used to determine the first target server.
可选的,在所述第一接收模块701之前,所述装置还包括:Optionally, before the first receiving module 701, 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, 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;
处理模块,用于基于所述目标终端的地址信息和所述目标端口的地址信息,建立所述第一映射关系。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.
本申请实施例中,第一服务器集群接收第二服务器集群发送的N个第一数据包;第一服务器集群基于第一映射关系,向目标服务器中的目标端口发送N个数据包,通过该目标端口建立第一服务器集群和目标服务器之间的会话,其中,第一映射关系用于表征目标终端的地址信息与目标端口的地址信息之间的映射关系,以此第一服务器集群通过调用目标服务器中的目标端口,即可建立第一服务器集群与目标服务器之间的会话,减少了对端口资源的占用,释放了端口资源。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.
本申请实施例中的数据传输装置可以是电子设备,也可以是电子设备中的部件、例如集成电路或芯片。该电子设备可以是终端,也可以为除终端之外的其他设备。示例性的,电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、移动上网装置(Mobile Internet Device,MID)、增强现实(augmented reality,AR)/虚拟现实(virtual reality,VR)设备、机器人、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,还可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。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., and the embodiment of the present application does not make specific limitations.
本申请实施例中的数据传输装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为ios操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。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.
本申请实施例提供数据传输装置能够实现图1的方法实施例实现的各个过程,为避免重复,这里不再赘述。The embodiment of the present application provides a data transmission device that can implement each process implemented by the method embodiment of Figure 1. To avoid repetition, they are not described again here.
请参见图8,图8是本申请实施例提供的一种数据传输系统的结构图,如图8所示,数据传输系统800包括目标终端801、第一服务器集群803、第二服务器集群802和目标服务器804,所述第一服务器集群803分别与所述第二服务器集群802和所述目标服务器404通信连接,所述目标终端801与所述第二服务器集群802通信连接;Please refer to FIG. 8 , which is a structural diagram of a data transmission system provided in an embodiment of the present application. As shown in FIG. 8 , 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. 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;
所述第二服务器集群802,用于接收所述目标终端801发送的N个第一数据包;每个第一数据包包括待传输数据和所述目标终端801的地址信息,N为大于1的正整数; 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;
所述第二服务器集群802,还用于根据预设的第二映射关系,向所述第一服务器集群803发送所述N个第一数据包;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;
所述第一服务器集群803,用于接收所述第二服务器集群802发送的N个第一数据包;The first server cluster 803 is used to receive N first data packets sent by the second server cluster 802;
所述第一服务器集群803,还用于根据预设的第一映射关系,向所述目标服务器804中的目标端口发送所述N个第一数据包;所述第一映射关系用于表征所述目标终端801的地址信息与所述目标端口的地址信息之间的映射关系。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.
上述第二服务器集群为SLB服务器,提供公网入口,将从目标终端的客户端接收到的数据包发送至第一服务器集群,或将第一服务器集群的发送的数据包发送至目标终端。其中,数据包包括目标终端的地址信息,且N个数据包的类型不同,N为大于1的正整数。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.
其中,第二映射关系包括述目标终端的地址信息与第一服务器集群的目标端口的地址信息映射关系。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.
本申请实施例中,第一服务器集群接收第二服务器集群发送的N个第一数据包;第一服务器集群基于第一映射关系,向目标服务器中的目标端口发送N个数据包,通过该目标端口建立第一服务器集群和目标服务器之间的会话,其中,第一映射关系用于表征目标终端的地址信息与目标端口的地址信息之间的映射关系,以此第一服务器集群通过调用目标服务器中的目标端口,即可建立第一服务器集群与目标服务器之间的会话,减少了对端口资源的占用,释放了端口资源。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.
可选的,所述第二服务器集群802,还用于接收所述目标终端发送的第四数据包;所述第四数据包为所述目标终端向所述第二服务器集群802初次发送的数据包括,且所述第四数据包包括所述目标终端的地址信息;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;
所述第二服务器集群802,还用于获取所述第一服务器集群803的地址信息,并基于所述目标终端的地址信息和所述第一服务器集群803的地址信息建立所述第二映射关系。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 .
应理解,第二服务器集群接收第四数据包,第四数据包包括目标终端的地址信息,第二服务器集群对地址信息进行哈希计算,得到第三哈希值;同时,第二服务器集群还获取第一服务器集群的地址信息,并基于目标终端的地址信息和第一服务器集群的地址信息建立第二映射关系。在第二服务器集群接收到第一数据包后,对第一数据包的地址信息进行哈希计算,确定第一哈希值,在第一哈希值与第三哈希值相同的情况下,第二服务器集群根据第二映射关系将第一数据包发送至第一服务器集群。这样,通过目标终端向第一服务器集群发送第四数据包,使在同一会话中,第二服务器集群接收到的目标终端的第一数据包总是由第二服务器集群发送,实现流数据通过同样的中间节点传输,确保在一个完整的会话过程中目标服务器接收到的源地址不发生变化。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.
为便于理解本申请实施例提供的数据传输方法中的技术方案,请参阅图9,如图9所示,首先目标终端和目标服务器向信使服务器进行注册;在需要建立会话时,目标终端向目标服务器的目标端口发送第二数据包和第四数据包,目标服务器向目标终端的地址信息发送第三数据包,以实现建立第一映射关系和第二映射关系;在建立第一映射关系和第二 映射关系之后,目标终端发送N个第一数据包;第二服务器集群接收第一N个数据包,根据第二映射关系向第一服务器集群发送N个第一数据包;第一服务器集群接收N个第一数据包,根据第一映射关系向目标服务器的目标端口发送N个第一数据包,完成视频会议的数据传输。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. As shown in FIG. 9, 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 the first mapping relationship and the second mapping relationship; after the first mapping relationship and the second mapping relationship are established, After the mapping relationship, 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, completing the data transmission of the video conference.
可选的,所述第二服务器集群802,还用于对所述N个第一数据包的目标终端801的地址信息进行哈希计算,得到第三哈希值;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;
所述第二服务器集群802,还用于根据所述第三哈希值,确定所述第一服务器集群803中的第一目标服务器;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;
所述第二服务器集群802,还用于向所述第一目标服务器发送所述N个第一数据包。The second server cluster 802 is further configured to send the N first data packets to the first target server.
应理解,第一服务器集群包括多个第一服务器,在传输N个第一数据包至目标服务器的过程中,中间经过第二服务器集群中的一个SLB服务器,以及第一服务器集群中的一个第一服务器。其中,在数据传输过程中,为保持传输至目标服务器的路径保持一致,第二服务器集群根据第三哈希值确定第一服务器集群中的一个第一服务器为第一目标服务器,再向第一目标服务器发送N个第一数据包。第一目标服务器在接收到N个第一数据包之后向目标服务器发送N个第一数据包,这样,目标服务器接收到的N个第一数据包均为第一目标服务器发送,保证了路径的一致性。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.
可选的,所述第一服务器集群803包括M个第一服务器,所述M个第一服务器之间基于哈希环建立关联关系,所述哈希环基于所述M个第一服务器对应的地址信息确定,M为大于1的正整数;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;
所述第二服务器集群802,具体用于根据所述第三哈希值在所述哈希环上对应的指向位置,确定所述第一目标服务器。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.
其中,哈希环是一个虚拟环结,第二服务器集群根据哈希环确定第一目标服务器。The hash ring is a virtual ring, and the second server cluster determines the first target server according to the hash ring.
示例性的,如图3所示,哈希环上设有M个节点,每个节点对应一个第一服务器。其中,每个节点之间表示哈希值的范围。例如,哈希环上设有3个节点,节点R1、节点R2和节点R3,节点R1和节点R2之间表示哈希值的范围为[0,100],节点R2和节点R3之间表示的哈希值的范围为[100,200],节点R3和节点R1之间的哈希值范围为[200,300]。第二服务器集群基于计算得到的第三哈希值确定哈希环上节点对应的第一服务器。Exemplarily, as shown in FIG3 , 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 is represented. 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.
其中,在第二服务器集群确定哈希值后,确定哈希环上的一个节点。例如,确定第三哈希值为150,此时第三哈希值对应的哈希环位置为节点R2和节点R3之间。此时规定一个选择顺序,按顺序选择最近的节点为第一服务器对应的节点。例如,按顺时针顺序选择,此时最近的节点为R3,即节点R3对应的第一服务器为第一目标服务器。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.
可选的,所述N个第一服务器之间基于哈希环和P个虚拟服务器建立关联关系,在所述哈希环上存在相邻关系的第一服务器之间设置有虚拟服务器,且所述虚拟服务器的地址信息与对应的第一服务器的地址信息相同,P为大于1的正整数;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;
所述第二服务器集群802,还具体用于根据所述第三哈希值在所述哈希环和P个虚拟 服务器上对应的位置信息,确定所述第一目标服务器。The second server cluster 802 is further configured to generate a plurality of virtual servers in the hash ring and the P virtual servers according to the third hash value. The corresponding location information on the server determines the first target server.
应理解,M个第一服务器基于哈希环建立关联关系,在第二服务器集群确定第一目标服务器的情况下,存在某一个节点集中较多的访问的情况,故基于此引入虚拟服务器,用于降低单一节点的访问量。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.
示例性的,如图4所述,三个第一服务器基于哈希环建立关联关系,在每个第一服务器之间增加两个虚拟服务器。其中,虚拟服务器的地址信息和第一服务器的地址信息相同,使得第二服务器集群在确定虚拟服务器之后,将N个第一数据包发送至第一服务器。Exemplarily, as shown in Figure 4, 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.
例如,节点R1-1和节点R2-1之间的哈希值范围为[0,33],节点R2-1和节点R3-1之间的哈希值范围为[34,67],节点R3-1和节点R1-2之间的哈希值范围为[68,100]。其中,节点R1-1与节点R1-2之间的范围仍为[0,100],与节点R1-1和节点R2-1、节点R2-1和节点R3-1、节点R3-1和节点R1-2之间的范围对应。节点R1-1、节点R2-1和节点R3-1对应的地址信息均为一个地址信息,为第一服务器R1的地址信息,其中,节点R1-1、节点R2-1为虚拟服务器节点。在第二服务器集群确定的哈希环位置为节点R1-1、节点R2-1和节点R3-1的情况下,第二服务器集群确定第一目标服务器为第一服务器R1,如图5所示。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, wherein 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, as shown in Figure 5.
应理解,第二服务器集群包括多个第二服务器,确定多个第二服务器中的一个服务器为第二目标服务器,第二目标服务器用于向第一目标服务器传输N个第一数据包。其中,第二服务器集群通过第三哈希值和哈希环确定第二目标服务器,与通过第三哈希值和哈希环确定第一目标服务器相同,在此不再赘述。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.
可选的,如图10所示,在第一目标服务器异常无法传输数据的情况下,目标终端再次发送第三数据包,用于重新确定第一目标服务器。例如,在第一目标服务器为R1时,服务器R1异常,目标终端再次发送第三数据包,此时第一服务器集群重新根据哈希环确定服务器R2为第一目标服务器。Optionally, as shown in Figure 10, when the first target server is abnormal and cannot transmit data, the target terminal sends a third data packet again to redetermine the first target server. For example, when the first target server is R1, server R1 is abnormal, and the target terminal sends a third data packet again, at which time the first server cluster redetermines server R2 as the first target server based on the hash ring.
在本实施例中,通过目标终端重新发送第三数据包确定第一目标服务器,实现了在数据传输过程中替换第一目标服务器,保证了数据传输的连续性。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.
可选的,如图11所示,在第二目标服务器异常无法传输数据的情况下,目标终端再次发送第三数据包,用于重新确定第二目标服务器。例如,在第二目标服务器为L1时,服务器L1异常,目标终端再次发送第三数据包,此时第二服务器集群重新根据哈希环确定服务器L2为第二目标服务器。Optionally, as shown in Figure 11, when the second target server is abnormal and cannot transmit data, the target terminal sends a 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 a third data packet again, at which time the second server cluster redetermines server L2 as the second target server based on the hash ring.
在本实施例中,通过目标终端重新发送第三数据包确定第二目标服务器,实现了在数据传输过程中替换第二目标服务器,保证了数据传输的连续性。In this embodiment, the second target server is determined by the target terminal resending the third data packet, thereby achieving replacement of the second target server during the data transmission process and ensuring the continuity of data transmission.
本申请实施例中的数据传输系统可以是装置,具有操作系统的装置或电子设备,也可以是数据传输装置中的部件、集成电路、或芯片。该装置或网络侧设备可以是基站。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.
本申请实施例提供的数据传输系统能够实现图1的方法实施例实现的各个过程,并达到相同的技术效果,为避免重复,这里不再赘述。The data transmission system provided in the embodiment of the present application can implement each process implemented by the method embodiment of Figure 1 and achieve the same technical effect. To avoid repetition, it will not be repeated here.
可选地,如图12所示,本申请实施例还提供一种电子设备1200,包括处理器1201, 存储器1202,存储在存储器1202上并可在所述处理器1201上运行的程序或指令,该程序或指令被处理器1201执行时实现上述数据传输模型的训练方法实施例的各个过程,或者实现上述数据传输方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。Optionally, as shown in FIG12 , the embodiment of the present application further provides an electronic device 1200, including a processor 1201, Memory 1202, programs or instructions stored in memory 1202 and executable on the processor 1201, which, when executed by processor 1201, implement various processes of the training method embodiment of the above-mentioned data transmission model, or implement various processes of the above-mentioned data transmission method embodiment, and can achieve the same technical effect, are not described again here to avoid repetition.
需要说明的是,本申请实施例中的电子设备包括上述所述的移动电子设备和非移动电子设备。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.
图13为实现本申请实施例的一种电子设备的硬件结构示意图。FIG. 13 is a schematic diagram of the hardware structure of an electronic device implementing an embodiment of the present application.
该电子设备1300包括但不限于:射频单元1301、网络模块1302、音频输出单元1303、输入单元1304、传感器1305、显示单元1306、用户输入单元1307、接口单元1308、存储器1309、以及处理器1210等部件。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.
本领域技术人员可以理解,电子设备1300还可以包括给各个部件供电的电源(比如电池),电源可以通过电源管理系统与处理器1310逻辑相连,从而通过电源管理系统实现管理充电、放电、以及功耗管理等功能。图13中示出的电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,在此不再赘述。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, so that the power management system can manage charging, discharging, and power consumption management. The electronic device structure shown in FIG13 does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown, or combine certain components, or arrange components differently, which will not be described in detail here.
在一个实施例中,上述电子设备为第一服务器,射频单元1301,用于接收第二服务器发送的N个第一数据包;每个第一数据包包括待传输数据和目标终端的地址信息,N为大于1的正整数;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;
根据预设的第一映射关系,向目标服务器中的目标端口发送所述N个第一数据包;所述第一映射关系用于表征所述目标终端的地址信息与所述目标端口之间的映射关系。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.
可选的,处理器1310,用于对所述N个第一数据包包括的所述目标终端的地址信息进行哈希运算,得到第一哈希值;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;
射频单元1301,还用于在所述第一哈希值与第二哈希值相同的情况下,根据预设的第一映射关系,向目标服务器中的目标端口发送所述N个第一数据包。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.
可选的,射频单元1301,还用于接收所述第二服务器发送的第二数据包和所述目标服务器发送的第三数据包;所述第二数据包为所述第二服务器向所述第一服务器初次发送的数据包,且所述第二数据包包括所述目标终端的地址信息,所述第三数据包为所述目标服务器向所述第一服务器初次发送的数据包,且所述第三数据包包括所述目标端口的信息;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;
处理器1310,还用于基于所述目标终端的地址信息和所述目标端口的信息,建立所述第一映射关系。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.
在一个实施例中,上述电子设备为第二服务器,射频单元1301,用于接收所述目标终端发送的N个第一数据包;每个第一数据包包括待传输数据和所述目标终端的地址信息,N为大于1的正整数;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;
根据预设的第二映射关系,向所述第一服务器发送所述N个第一数据包。According to a preset second mapping relationship, the N first data packets are sent to the first server.
可选的,射频单元1301,还用于接收所述目标终端发送的第四数据包;所述第四数 据包为所述目标终端向所述第二服务器初次发送的数据包括,且所述第四数据包包括所述目标终端的地址信息;Optionally, the radio frequency unit 1301 is further configured to receive a fourth data packet sent by the target terminal; the fourth data packet The 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;
处理器1310,还用于获取第一服务器的地址信息,并基于所述目标终端的地址信息和所述第一服务器的地址信息建立所述第二映射关系。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.
本申请实施例中,第一服务器接收第二服务器发送的N个第一数据包;第一服务器基于第一映射关系,向目标服务器中的目标端口发送N个数据包,通过该目标端口建立第一服务器和目标服务器之间的会话,其中,第一映射关系用于表征目标终端的地址信息与目标端口的端口信息之间的映射关系,以此第一服务器通过调用目标服务器中的目标端口,即可建立第一服务器与目标服务器之间的会话,减少了对端口资源的占用,释放了端口资源。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.
应理解的是,本申请实施例中,输入单元1304可以包括图形处理器(Graphics Processing Unit,GPU)13041和麦克风13042,图形处理器13041对在视频捕获模式或图像捕获模式中由图像捕获装置(如摄像头)获得的静态图片或视频的图像数据进行处理。显示单元1306可包括显示面板13061,可以采用液晶显示器、有机发光二极管等形式来配置显示面板13061。用户输入单元1307包括触控面板13071以及其他输入设备13072中的至少一种。触控面板13071,也称为触摸屏。触控面板13071可包括触摸检测装置和触摸控制器两个部分。其他输入设备13072可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。It should be understood that in the embodiment of the present application, the input unit 1304 may include a 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 a volume control key, a switch key, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
存储器1309可用于存储软件程序以及各种数据。存储器1309可主要包括存储程序或指令的第一存储区和存储数据的第二存储区,其中,第一存储区可存储操作系统、至少一个功能所需的应用程序或指令(比如声音播放功能、图像播放功能等)等。此外,存储器1309可以包括易失性存储器或非易失性存储器,或者,存储器1309可以包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synch link DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。本申请实施例中的存储器1309包括但不限于这些和任意其它适合类型的存储器。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.
处理器1310可包括一个或多个处理单元;可选的,处理器1310集成应用处理器和调制解调处理器,其中,应用处理器主要处理涉及操作系统、用户界面和应用程序等的操作,调制解调处理器主要处理无线通信信号,如基带处理器。可以理解的是,上述调制解调处 理器也可以不集成到处理器1310中。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 the operating system, user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the above-mentioned modem processor The processor may not be integrated into the processor 1310.
本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述数据传输方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。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.
其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器(ROM)、随机存取存储器(RAM)、磁碟或者光盘等。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.
本申请实施例另提供了一种芯片,所述芯片包括处理器和通信接口,所述通信接口和所述处理器耦合,所述处理器用于运行程序或指令,实现上述数据传输方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。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.
应理解,本申请实施例提到的芯片还可以称为系统级芯片、系统芯片、芯片系统或片上系统芯片等。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.
本申请实施例提供一种计算机程序产品,该程序产品被存储在存储介质中,该程序产品被至少一个处理器执行以实现上述数据传输方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。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.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, in this article, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises one..." does not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be noted 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.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以计算机软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,或者网络设备等)执行本申请各个实施例所述的方法。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 magnetic 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.
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。 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 (20)

  1. 一种数据传输方法,包括:A data transmission method, comprising:
    第一服务器集群接收第二服务器集群发送的N个第一数据包;每个第一数据包包括待传输数据和目标终端的地址信息,N为大于1的正整数;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, and N is a positive integer greater than 1;
    所述第一服务器集群根据预设的第一映射关系,向目标服务器中的目标端口发送所述N个第一数据包;所述第一映射关系用于表征所述目标终端的地址信息与所述目标端口的地址信息之间的映射关系。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.
  2. 根据权利要求1所述的方法,其中,所述第一服务器集群根据预设的第一映射关系,向目标服务器中的目标端口发送所述N个第一数据包,包括:The method according to claim 1, wherein 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, comprising:
    所述第一服务器集群对所述N个第一数据包包括的所述目标终端的地址信息进行哈希运算,得到第一哈希值;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;
    所述第一服务器集群在所述第一哈希值与第二哈希值相同的情况下,根据预设的第一映射关系,向目标服务器中的目标端口发送所述N个第一数据包;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.
  3. 根据权利要求2所述的方法,其中,所述第一服务器集群包括M个第一服务器,所述第一服务器集群在所述M个第一服务器之间基于哈希环建立关联关系,所述哈希环基于所述M个第一服务器对应的地址信息确定,M为大于1的正整数;The method according to claim 2, wherein 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;
    所述哈希环用于确定第一目标服务器,所述第一目标服务器为所述第一服务器集群中的一个服务器,所述第一目标服务器用于接收所述第二服务器集群发送的N个第一数据包。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.
  4. 根据权利要求3所述的方法,其中,所述第一服务器集群在所述N个第一服务器之间基于哈希环和P个虚拟服务器建立关联关系,在所述哈希环上存在相邻关系的第一服务器之间设置有虚拟服务器,且所述虚拟服务器的地址信息与对应的第一服务器的地址信息相同,P为大于1的正整数;The method according to claim 3, wherein 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 have an adjacent relationship 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;
    所述哈希环和所述P个虚拟服务器用于确定所述第一目标服务器。The hash ring and the P virtual servers are used to determine the first target server.
  5. 根据权利要求1所述的方法,其中,所述第一服务器集群接收第二服务器集群发送的N个第一数据包之前,所述方法还包括:The method according to claim 1, wherein before the first server cluster receives the N first data packets sent by the second server cluster, the method further comprises:
    所述第一服务器集群接收所述第二服务器集群发送的第二数据包和所述目标服务器发送的第三数据包;所述第二数据包为所述第二服务器集群向所述第一服务器集群初次发送的数据包,且所述第二数据包包括所述目标终端的地址信息,所述第三数据包为所述目标服务器向所述第一服务器集群初次发送的数据包,且所述第三数据包包括所述目标端口的地址信息;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 the 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 the address information of the target port;
    所述第一服务器集群基于所述目标终端的地址信息和所述目标端口的地址信息,建立 所述第一映射关系。The first server cluster establishes a The first mapping relationship.
  6. 一种数据传输装置,包括第一服务器集群,其中,所述装置包括:A data transmission device, comprising a first server cluster, wherein the device comprises:
    第一接收模块,用于接收第二服务器集群发送的N个第一数据包;每个第一数据包包括待传输数据和目标终端的地址信息,N为大于1的正整数;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;
    发送模块,用于根据预设的第一映射关系,向目标服务器中的目标端口发送所述N个第一数据包;所述第一映射关系用于表征所述目标终端的地址信息与所述目标端口之间的映射关系。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 target port.
  7. 根据权利要求6所述的装置,其中,所述发送模块,具体用于:The device according to claim 6, wherein the sending module is specifically configured to:
    对所述N个第一数据包包括的所述目标终端的地址信息进行哈希运算,得到第一哈希值;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;
    在所述第一哈希值与第二哈希值相同的情况下,根据预设的第一映射关系,向目标服务器中的目标端口发送所述N个第一数据包;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.
  8. 根据权利要求6所述的装置,其中,所述第一服务器集群包括M个第一服务器,所述第一服务器集群在所述M个第一服务器之间基于哈希环建立关联关系,所述哈希环基于所述M个第一服务器对应的地址信息确定,M为大于1的正整数;The device according to claim 6, wherein the first server cluster includes M first servers, 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;
    所述哈希环用于确定第一目标服务器,所述第一目标服务器为所述第一服务器集群中的一个服务器,所述第一目标服务器用于接收所述第二服务器集群发送的N个第一数据包。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.
  9. 根据权利要求8所述的装置,其中,所述第一服务器集群在所述N个第一服务器之间基于哈希环和P个虚拟服务器建立关联关系,在所述哈希环上存在相邻关系的第一服务器之间设置有虚拟服务器,且所述虚拟服务器的地址信息与对应的第一服务器的地址信息相同,P为大于1的正整数;The device according to claim 8, wherein 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 have an adjacent relationship 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;
    所述哈希环和所述P个虚拟服务器用于确定所述第一目标服务器。The hash ring and the P virtual servers are used to determine the first target server.
  10. 根据权利要求6所述的装置,其中,在所述第一接收模块之前,所述装置还包括:The device according to claim 6, wherein before the first receiving module, the device further comprises:
    第二接收模块,用于接收所述第二服务器集群发送的第二数据包和所述目标服务器发送的第三数据包;所述第二数据包为所述第二服务器集群向所述第一服务器集群初次发送的数据包,且所述第二数据包包括所述目标终端的地址信息,所述第三数据包为所述目标服务器向所述第一服务器集群初次发送的数据包,且所述第三数据包包括所述目标端口的地址信息;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.
  11. 一种数据传输系统,包括第一服务器集群、第二服务器集群、目标终端和目标服务器,其中,所述第一服务器集群分别与所述第二服务器集群和所述目标服务器通信连接,所述目标终端与所述第二服务器集群通信连接; A data transmission system comprises a first server cluster, a second server cluster, a target terminal and a target server, wherein the first server cluster is communicatively connected with the second server cluster and the target server respectively, and the target terminal is communicatively connected with the second server cluster;
    所述第二服务器集群,用于接收所述目标终端发送的N个第一数据包;每个第一数据包包括待传输数据和所述目标终端的地址信息,N为大于1的正整数;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;
    所述第二服务器集群,还用于根据预设的第二映射关系,向所述第一服务器集群发送所述N个第一数据包;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;
    所述第一服务器集群,用于接收所述第二服务器集群发送的N个第一数据包;The first server cluster is used to receive N first data packets sent by the second server cluster;
    所述第一服务器集群,还用于根据预设的第一映射关系,向所述目标服务器中的目标端口发送所述N个第一数据包;所述第一映射关系用于表征所述目标终端的地址信息与所述目标端口的地址信息之间的映射关系。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.
  12. 根据权利要求11所述的数据传输系统,其中,所述第二服务器集群,还用于接收所述目标终端发送的第四数据包;所述第四数据包为所述目标终端向所述第二服务器集群初次发送的数据包,且所述第四数据包包括所述目标终端的地址信息;The data transmission system according to claim 11, wherein 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 configured to obtain 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.
  13. 根据权利要求11所述的数据传输系统,其中,所述第二服务器集群,还用于对所述N个第一数据包的目标终端的地址信息进行哈希计算,得到第三哈希值;The data transmission system according to claim 11, wherein the second server cluster is further configured 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;
    所述第二服务器集群,还用于向所述第一目标服务器发送所述N个第一数据包。The second server cluster is further used to send the N first data packets to the first target server.
  14. 根据权利要求13所述的数据传输系统,其中,所述第一服务器集群包括M个第一服务器,所述M个第一服务器之间基于哈希环建立关联关系,所述哈希环基于所述M个第一服务器对应的地址信息确定,M为大于1的正整数;The data transmission system according to claim 13, wherein the first server cluster 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;
    所述第二服务器集群,具体用于根据所述第三哈希值在所述哈希环上对应的指向位置,确定所述第一目标服务器。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.
  15. 根据权利要求14所述的数据传输系统,其中,所述N个第一服务器之间基于哈希环和P个虚拟服务器建立关联关系,在所述哈希环上存在相邻关系的第一服务器之间设置有虚拟服务器,且所述虚拟服务器的地址信息与对应的第一服务器的地址信息相同,P为大于1的正整数;The data transmission system according to claim 14, wherein 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;
    所述第二服务器集群,还具体用于根据所述第三哈希值在所述哈希环和P个虚拟服务器上对应的位置信息,确定所述第一目标服务器。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.
  16. 一种电子设备,包括处理器,存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,其中,所述程序或指令被所述处理器执行时实现如权利要求1-5中任一项所述的数据传输方法的步骤。An electronic device 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 as described in any one of claims 1 to 5.
  17. 一种可读存储介质,所述可读存储介质上存储程序或指令,其中,所述程序或指令被处理器执行时实现如权利要求1-5中任一项所述的数据传输方法的步骤。A readable storage medium stores a program or instruction, wherein the program or instruction, when executed by a processor, implements the steps of the data transmission method according to any one of claims 1 to 5.
  18. 一种芯片,所述芯片包括处理器和通信接口,其中,所述通信接口和所述处理器 耦合,所述处理器用于运行程序或指令,实现如权利要求1-5中任一项所述的数据传输方法的步骤。A chip comprising a processor and a communication interface, wherein the communication interface and the processor The processor is coupled to run a program or instruction to implement the steps of the data transmission method according to any one of claims 1 to 5.
  19. 一种计算机程序产品,所述计算机程序产品被存储在存储介质中,所述计算机程序产品被至少一个处理器执行以实现如权利要求1-5中任一项所述的数据传输方法的步骤。A computer program product, wherein the computer program product is stored in a storage medium and is executed by at least one processor to implement the steps of the data transmission method according to any one of claims 1 to 5.
  20. 一种电子设备,被配置成用于执行如权利要求1-5中任一项所述的数据传输方法的步骤。 An electronic device is configured to execute the steps of the data transmission method according to any one of claims 1 to 5.
PCT/CN2023/123925 2022-10-17 2023-10-11 Data transmission method, apparatus and system, electronic device, and medium WO2024083008A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211284471.0 2022-10-17
CN202211284471.0A CN115633016A (en) 2022-10-17 2022-10-17 Data transmission method, device, system, electronic equipment and medium

Publications (1)

Publication Number Publication Date
WO2024083008A1 true WO2024083008A1 (en) 2024-04-25

Family

ID=84906708

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/123925 WO2024083008A1 (en) 2022-10-17 2023-10-11 Data transmission method, apparatus and system, electronic device, and medium

Country Status (2)

Country Link
CN (1) CN115633016A (en)
WO (1) WO2024083008A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115633016A (en) * 2022-10-17 2023-01-20 维沃移动通信有限公司 Data transmission method, device, system, electronic equipment and medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170208002A1 (en) * 2016-01-14 2017-07-20 International Business Machines Corporation Data processing
WO2017128953A1 (en) * 2016-01-26 2017-08-03 中兴通讯股份有限公司 Server virtualization network sharing apparatus and method
CN110225146A (en) * 2019-05-20 2019-09-10 浙江华创视讯科技有限公司 Intranet and extranet mapping method, device, electronic equipment, medium and video conferencing system
CN114125025A (en) * 2021-11-23 2022-03-01 北京奥星贝斯科技有限公司 Data transmission method and device under multi-target network
CN115633016A (en) * 2022-10-17 2023-01-20 维沃移动通信有限公司 Data transmission method, device, system, electronic equipment and medium

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10735597B1 (en) * 2018-03-23 2020-08-04 Amazon Technologies, Inc. Selecting user device during communications session
CN111629427B (en) * 2020-07-30 2020-11-03 腾讯科技(深圳)有限公司 Multimedia data processing method and device, electronic equipment and storage medium
CN112398845B (en) * 2020-11-11 2023-03-28 Oppo广东移动通信有限公司 Data transmission method, data transmission device, data transmission system and electronic equipment
CN113285931B (en) * 2021-05-12 2022-10-11 阿波罗智联(北京)科技有限公司 Streaming media transmission method, streaming media server and streaming media system
CN113282941A (en) * 2021-06-15 2021-08-20 深圳市商汤科技有限公司 Method and device for acquiring object identification, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170208002A1 (en) * 2016-01-14 2017-07-20 International Business Machines Corporation Data processing
WO2017128953A1 (en) * 2016-01-26 2017-08-03 中兴通讯股份有限公司 Server virtualization network sharing apparatus and method
CN110225146A (en) * 2019-05-20 2019-09-10 浙江华创视讯科技有限公司 Intranet and extranet mapping method, device, electronic equipment, medium and video conferencing system
CN114125025A (en) * 2021-11-23 2022-03-01 北京奥星贝斯科技有限公司 Data transmission method and device under multi-target network
CN115633016A (en) * 2022-10-17 2023-01-20 维沃移动通信有限公司 Data transmission method, device, system, electronic equipment and medium

Also Published As

Publication number Publication date
CN115633016A (en) 2023-01-20

Similar Documents

Publication Publication Date Title
US11316909B2 (en) Data transmission method and apparatus, and computer storage medium
US11805158B2 (en) Method and system for elevating a phone call into a video conferencing session
US8873561B2 (en) Supporting enhanced media communications using a packet-based communication link
US9584760B2 (en) Multifunctional conferencing systems and methods
US10887359B2 (en) Parallel peer to peer connection establishment in webRTC conferencing
US9288810B2 (en) Wireless media sharing from multiple sources to a single sink
CN101917586B (en) Joining method and equipment for conference
WO2024083008A1 (en) Data transmission method, apparatus and system, electronic device, and medium
US10778736B2 (en) On demand in-band signaling for conferences
JP5067451B2 (en) Communication terminal, communication method, and communication program
CN110737638A (en) data sharing method, device, electronic equipment and storage medium
US8018899B2 (en) Handoff system and method between different kinds of devices, SIP server and operational method of SIP server
US20230413349A1 (en) Call establishment method and apparatus, electronic device, and readable storage medium
WO2016095510A1 (en) Path selection method, device and system
KR102522585B1 (en) System for synchronizing data and method thereof
EP1664991B1 (en) Supporting enhanced media communications
WO2023169202A1 (en) Video stream data acquisition method and apparatus, and electronic device and computer-readable medium
JP2010171663A (en) Communication method, communication system, communication device, and computer program
CN117395363A (en) Conference terminal control method, user terminal and conference terminal
CN113381864A (en) Digital audio-visual place control method, system and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23878999

Country of ref document: EP

Kind code of ref document: A1