Data transmission system and method
By working together with the proxy node cluster and the server cluster, and using historical connection information to establish transmission links, the problem of node changes when long connections are disconnected and reconnected is solved, thus achieving continuity of data transmission and efficient use of resources.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-23
- Publication Date
- 2026-03-27
AI Technical Summary
When a long-term connection between a mobile device and a server is disconnected and reconnected, how can we ensure that the nodes on both ends remain unchanged in order to avoid retransmitting data, reduce resource waste, and improve user experience?
By using a cluster of proxy nodes and a cluster of servers, historical connection information is used to identify the second proxy node, and a transmission link is established between the target client, the first proxy node, the second proxy node, and the target server to ensure that the target client can still connect to the same target server after disconnection and reconnection.
This feature ensures that the connection between both ends remains unchanged even if the target client disconnects and reconnects, reducing the resource consumption of retransmitting data and improving user experience and project processing efficiency.
Smart Images

Figure CN116193635B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present specification relate to the technical field of network communication, and in particular to a data transmission system and a data transmission method. One or more embodiments of the present specification also relate to a data transmission apparatus, a computing device, and a computer-readable storage medium. BACKGROUND
[0002] With the rapid popularization of smart phones and the rapid development of Internet technology, mobile Internet related projects have gradually matured, such as uploading live streaming to the server for live streaming through the mobile client, transmitting video stream to the server for online editing processing, etc. In order to meet the needs of long-time data transmission, a long connection needs to be established between the mobile client and the server. The long connection usually refers to multiplexing a connection when the client and the server communicate data, and the client and the server can both send and receive data, which is usually used in interactive project scenarios. Due to the unstable network environment of the mobile terminal, the long connection between the mobile terminal and the server may be disconnected, and in the scenario of processing stream data on the server, it needs to be processed by the same server. Therefore, the disconnection and reconnection of the mobile terminal may result in connection with other servers, which leads to the need to retransmit stream data, not only affecting the user experience of the mobile terminal, but also wasting the computing resources of the server. Therefore, how to ensure that the two end nodes do not change when the long connection is disconnected and reconnected in a distributed scenario is a problem that needs to be solved at present. SUMMARY
[0003] In view of this, the embodiments of the present specification provide a data transmission system and a data transmission method. One or more embodiments of the present specification also relate to a data transmission apparatus, a computing device, a computer-readable storage medium, and a computer program to solve the technical defects in the prior art.
[0004] According to a first aspect of an embodiment of the present specification, a data transmission system is provided, the system comprising a proxy node cluster and a server cluster, wherein the server cluster comprises a target server having a transmission relationship with a target client;
[0005] a first proxy node, configured to receive a reconnection request sent by the target client to the proxy node cluster, parse the reconnection request, obtain historical connection information corresponding to the target client, determine a second proxy node in the proxy node cluster according to the historical connection information, and create a reconnection task for the second proxy node, wherein the proxy node cluster comprises the first proxy node and the second proxy node;
[0006] The second agent node is configured to determine the target server in the server cluster by executing the reconnection task, and establish a transmission link comprising the target client, the first agent node, the second agent node and the target server, wherein the transmission link is used for data transmission between the target client and the target server.
[0007] According to a second aspect of the embodiments of the present specification, a data transmission method is provided, applied to a first agent node, comprising:
[0008] receiving and parsing a reconnection request sent by a target client to obtain historical connection information corresponding to the target client;
[0009] determining a second agent node according to the historical connection information, wherein the first agent node and the second agent node are located in the same agent node cluster;
[0010] creating a reconnection task for the second agent node, wherein the reconnection task is used to establish a transmission link comprising the target client, a target server in a server cluster, the first agent node and the second agent node, and the transmission link is used for data transmission between the target client and the target server.
[0011] According to a third aspect of the embodiments of the present specification, a data transmission method is provided, applied to a second agent node, comprising:
[0012] executing a reconnection task established by a first agent node for a target client, wherein the first agent node and the second agent node are located in the same agent node cluster;
[0013] determining a target server corresponding to the target client in a server cluster according to the execution result;
[0014] establishing a transmission link comprising the target client, the target server, the first agent node and the second agent node, wherein the transmission link is used for data transmission between the target client and the target server.
[0015] According to a fourth aspect of the embodiments of the present specification, a data transmission device is provided, applied to a first agent node, comprising:
[0016] a receiving module configured to receive and parse a reconnection request sent by a target client to obtain historical connection information corresponding to the target client;
[0017] a determining module configured to determine a second agent node according to the historical connection information, wherein the first agent node and the second agent node are located in the same agent node cluster;
[0018] a creating module configured to create a reconnection task for the second proxy node, wherein the reconnection task is used to establish a transmission link containing the target client, a target server in a server cluster, the first proxy node, and the second proxy node, and the transmission link is used for data transmission between the target client and the target server.
[0019] According to a fifth aspect of the embodiments of the present specification, a data transmission apparatus is provided, applied to a second proxy node, and comprising:
[0020] a performing module configured to perform a reconnection task established by a first proxy node for a target client, wherein the first proxy node and the second proxy node are located in a same proxy node cluster;
[0021] a determining module configured to determine a target server corresponding to the target client in a server cluster according to a performing result;
[0022] a establishing module configured to establish a transmission link containing the target client, the target server, the first proxy node, and the second proxy node, wherein the transmission link is used for data transmission between the target client and the target server.
[0023] According to a sixth aspect of the embodiments of the present specification, a data transmission system is provided, comprising a first proxy node and a second proxy node;
[0024] the first proxy node is configured to store a reconnection task creation executable instruction, and the second proxy node is configured to store a transmission link establishment executable instruction;
[0025] the reconnection task creation executable instruction is executed by the first proxy node, and the transmission link establishment executable instruction is executed by the second proxy node, so as to implement the steps of any one of the data transmission methods.
[0026] According to a seventh aspect of the embodiments of the present specification, a computing device is provided, comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, and the processor executes the computer instructions to implement the steps of any one of the data transmission methods.
[0027] According to an eighth aspect of the embodiments of the present specification, a computer readable storage medium is provided, which stores computer instructions, and the computer instructions are executed by a processor to implement the steps of any one of the data transmission methods.
[0028] According to a ninth aspect of an embodiment of the present specification, a computer program is provided, wherein when the computer program is executed in a computer, the computer is caused to execute the steps of any one of the data transmission methods.
[0029] The data transmission system provided by the present specification comprises a proxy node cluster, a server cluster, wherein the server cluster comprises a target server having a transmission relationship with a target client; a first proxy node, configured to receive a reconnection request sent by the target client to the proxy node cluster, analyze the reconnection request, obtain historical connection information corresponding to the target client, determine a second proxy node in the proxy node cluster according to the historical connection information, and create a reconnection task for the second proxy node, wherein the proxy node cluster comprises the first proxy node and the second proxy node; and the second proxy node, configured to determine the target server in the server cluster by executing the reconnection task, and establish a transmission link comprising the target client, the first proxy node, the second proxy node and the target server, wherein the transmission link is used for data transmission between the target client and the target server.
[0030] An embodiment of the present specification realizes that, in the case that a target client disconnects a long connection with the target client through a proxy node and sends a proxy node cluster to the proxy node cluster, a first proxy node in the proxy node cluster can determine a second proxy node connected with the target client according to historical connection information of the target client, and create a reconnection task for the second proxy node to execute. The second proxy node determines a target server corresponding to the target client in the server cluster by executing the reconnection task, and establishes a transmission link between the target client, the first proxy node, the second proxy node and the target server, so as to realize that, in the case of reconnection of the target client, the same target server can also be connected through the proxy node in the proxy node cluster, so as to ensure that the target client can continue to transmit data to the target server, reduce resource loss caused by retransmission of data due to server change, and improve user experience. BRIEF DESCRIPTION OF DRAWINGS
[0031] Figure 1 is a structural schematic diagram of a data transmission system provided by an embodiment of the present specification;
[0032] Figure 2 is a system processing flowchart of a data transmission system provided by an embodiment of the present specification;
[0033] Figure 3 is a flowchart of a data transmission method applied to a first proxy node provided by an embodiment of the present specification;
[0034] Figure 4 is a flowchart of a data transmission method applied to a second proxy node according to an embodiment of the present specification;
[0035] Figure 5 is a flowchart of a processing procedure of a data transmission system according to an embodiment of the present specification;
[0036] Figure 6 is a structural schematic diagram of a data transmission device applied to a first proxy node according to an embodiment of the present specification;
[0037] Figure 7 is a structural schematic diagram of a data transmission device applied to a second proxy node according to an embodiment of the present specification;
[0038] Figure 8 is a structural block diagram of a computing device according to an embodiment of the present specification. DETAILED DESCRIPTION
[0039] In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present specification. However, the present specification can be practiced without the specific details, other than in the examples, set forth in this description. Those skilled in the art, in light of the description, can implement the present specification without limiting to the specific details disclosed in this description.
[0040] The terminology used in one or more embodiments of the present specification is for the purpose of describing particular embodiments only and is not intended to be limiting of one or more embodiments of the present specification. As used in one or more embodiments of the present specification and the accompanying claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It will be further understood that the terms "comprises" and / or "comprising," when used in one or more embodiments of the present specification, specify the presence of stated features, integers, steps, operations, elements, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0041] It will be understood that, although the terms first, second, etc. can be used herein to describe various information, these terms are not intended to denote a temporal or chronological order. Rather, these terms are used solely to distinguish one from another only. For example, without departing from the scope of one or more embodiments of the present specification, first can be termed second, and similarly, second can be termed first. The term "if' as used herein, can be interpreted as meaning "when" or "upon" or "in response to determining," depending on the context.
[0042] First, the noun terms related to one or more embodiments of the present specification are explained.
[0043] Proxy node cluster: the proxy node cluster is composed of multiple proxy nodes, each of which is used to be responsible for forwarding message communication between the client and the server.
[0044] Server cluster: the server cluster is composed of multiple servers, each of which has computing power and is used to be responsible for processing data transmitted by the client.
[0045] More and more company projects may involve scenarios of real-time processing of stream data by the server. For example, in the scenario of a loan project, the service provider may need the user to provide the area and volume of the house to estimate the loan amount of the user, and the data provided by the user can be to guide the user to shoot and submit relevant video data through the mobile phone. During the shooting process, in addition to the video data, camera pose data may also be needed, and the server performs real-time modeling processing after receiving the video data and camera pose data. Real-time modeling processing depends on video stream and camera pose context data, so the mobile terminal transmits data through long connection with the server. In the prior art, the network environment of the mobile terminal is very complex, and network jitter and disconnection often occur, such as when the user shoots in the basement, resulting in poor mobile phone signal. In this case, the long connection between the mobile terminal and the server is disconnected, and when one end of the long connection is disconnected, the other end is also disconnected synchronously. Since the server is distributed, after load balancing, the mobile terminal cannot be guaranteed to be connected to the same server after disconnection and reconnection. If the mobile terminal reconnects to other servers, the server will perform modeling processing again, which loses the video data previously shot by the user, affects the execution efficiency of the project, wastes server resources, and reduces the user experience.
[0046] Therefore, in the present specification, a data transmission system is provided to solve the problem that after the client is disconnected and reconnected, the double-end connection is not changed, so that the client can be reconnected to the previous server. The present specification also relates to a data transmission method, a data transmission device, a computing device, a computer readable storage medium, and a computer program, which are described in detail one by one in the following embodiments.
[0047] Figure 1A structural diagram of a data transmission system according to an embodiment of the present specification is shown, wherein, for example, a target client is connected to a service end 1 through a proxy node 2 in advance, and the target client sends data to the proxy node 2, and the proxy node 2 forwards the data to the service end 1 for data processing. After the target client is disconnected from the proxy node 2 due to network environment, device hardware and software failure and other problems, in order to continue to recommend the project, the target client needs to send a reconnection request to the proxy node cluster, and the reconnection request is a request for the client to reestablish a long connection. Due to the load balancing of the proxy node cluster, the client is connected to the proxy node 1 after reconnection, and the service end 1 is still connected to the proxy node 2 at this time. In order to ensure the consistency of data transmission, the proxy node 1 needs to determine the proxy node 2 connected to the target client last time in the proxy node cluster according to the historical connection information in the target client reconnection request, and create a reconnection task and send it to the proxy node 2. The proxy node 2 executes the reconnection task to determine the service end 1 having a transmission relationship with the target client in the service end cluster, that is, the transmission link between the target client, the proxy node 1, the proxy node 2 and the service end 1 can be established. The target client can send the to-be-processed data to the proxy node 1 through the transmission link, the proxy node 1 forwards the to-be-processed data to the proxy node 2, and the proxy node 2 sends the to-be-processed data to the service end 1 for processing, so as to realize the context consistency of transmission data. Through the data transmission system provided by the present application, the target client can be connected to the target service end connected last time after disconnection and reconnection, the effect of unchanged long connection disconnection and reconnection is realized, the project processing efficiency is improved, the calculation resource consumption of the service end is reduced, and the user experience is also improved.
[0048] Figure 2 A system processing flowchart of a data transmission system according to an embodiment of the present specification is shown, and the system includes a proxy node cluster and a service end cluster, wherein the service end cluster includes a target service end having a transmission relationship with a target client.
[0049] The first proxy node 202 is configured to receive a reconnection request sent by the target client to the proxy node cluster, parse the reconnection request, obtain historical connection information corresponding to the target client, determine a second proxy node in the proxy node cluster according to the historical connection information, and create a reconnection task for the second proxy node, wherein the proxy node cluster includes the first proxy node and the second proxy node.
[0050] The first proxy node can be understood as a certain proxy node in the proxy node cluster, and the first proxy node receives the reconnection request sent by the target client this time. The first proxy node is used for message forwarding between the target client and the target server. A plurality of proxy nodes are configured in the proxy node cluster, which are responsible for receiving and processing message requests sent by the client. Therefore, when the target client sends a reconnection request to the proxy node cluster, a management node in the proxy node cluster selects a proxy node as the first proxy node for receiving the reconnection request.
[0051] The reconnection request can be understood as a request of the target client to reestablish a long connection. Since the target client has established a long connection with the target server through a certain proxy node before, after the target client is disconnected due to network environment and other elements, the target client sends a reconnection request to the proxy node cluster to reestablish a long connection with the target server, so that data transmission can continue. In order to ensure that the target client is connected to the target server after reconnection, subsequent node judgment and server selection through the proxy node are required, so as to ensure that the double-end connection remains unchanged after reconnection, and the effect of consistent transmission data context is achieved.
[0052] In actual application, after the target client sends a reconnection request to the proxy node cluster, a management node in the proxy node cluster selects a proxy node to receive and process the request, and the selected proxy node is the first proxy node. The first proxy node analyzes and processes the reconnection request, obtains the historical connection information of the target client according to the processing result, and the historical connection information can include the client identifier of the target client. The first proxy node can find out which proxy node the target client connected to last time in the distributed cache according to the client identifier, so as to determine the second proxy node. The second proxy node can be understood as the proxy node to which the target client connected last time or the proxy node to which the target client connected for the first time. Whether the second proxy node is the proxy node to which the target client connected last time or the proxy node to which the target client connected for the first time, the first proxy node needs to create a reconnection task for the second proxy node. The reconnection task can be understood as a task of establishing a transmission link between the target client and the target server by the second proxy node.
[0053] In a specific implementation, after the target client sends the reconnection request to the proxy node cluster, the reconnection request is received and processed by the first proxy node. Since the first proxy node can be determined according to the management node in the proxy node cluster, the first proxy node can be a proxy node that has been connected to the target client before, or a proxy node that has not been connected to the target client. In the case where the first proxy node is the proxy node that has been connected to the target client before, the second proxy node determined by the first proxy node according to the historical connection information is also the first proxy node, that is, the first proxy node and the second proxy node are the same proxy node. At this time, the first proxy node creates a reconnection task and executes it. The first proxy node can directly determine the target server and establish a transmission link including the target client, the first proxy node, and the target server.
[0054] In an embodiment of the present specification, in a loan project, a user needs to update his asset proof in order to increase the loan limit, and uploads the asset proof data through the software provided by the project service party. The user shoots the video of the residence through the mobile terminal running the software, thereby providing his asset proof to the project service party. After the project server deployed by the project service party receives the video stream data shot by the mobile terminal and the pose data of the mobile terminal, it can start real-time SLAM (Simultaneous Localization and Mapping) modeling, and determine the residence area, house volume and other data shot by the user according to the modeling result. These data can be used for subsequent loan limit calculation by the project service party. When the user shoots the video and collects the data through the mobile terminal, a connection request can be sent to the proxy node cluster first. A certain proxy node in the proxy node cluster receives the connection request, writes the mobile terminal identifier and the node identifier of the local proxy node into the distributed cache of the proxy node, and sends it to a certain service end in the service end cluster. After the service end receives the mobile terminal identifier and the node identifier of the proxy node, it sends a connection request to the proxy node for connection with the proxy node to communicate with the mobile terminal. At this point, the proxy node is connected with the mobile terminal and the service end respectively, and a transmission link containing the mobile terminal, the proxy node and the service end is established, so that the proxy node can forward the video stream data to the service end after the mobile terminal sends the video stream data to the proxy node, so that the service end can perform real-time modeling processing based on the received video stream data. In the transmission process, if the connection between the mobile terminal and the proxy node is disconnected due to poor signal of the user's mobile terminal, the mobile terminal will automatically send a reconnection request to the proxy node cluster within a preset time according to the preset reconnection strategy. The proxy node cluster allocates and selects the first proxy node to receive the reconnection request of the mobile terminal. The first proxy node analyzes the reconnection request to determine the historical connection information of the mobile terminal, which includes the mobile terminal identifier. According to the mobile terminal identifier, the last connected proxy node of the mobile terminal can be found in the distributed cache, which is taken as the second proxy node, and a reconnection task is created for the second proxy node. The second proxy node can determine the service end previously connected by the mobile terminal by executing the reconnection task, thereby establishing a transmission link containing the mobile terminal, the first proxy node, the second proxy node and the service end. After the mobile terminal transmits data to the first proxy node, the first proxy node can forward the transmission data to the second proxy node, and the second proxy node can send the transmission data to the service end, realizing the effect of keeping unchanged after long connection double-end disconnection and reconnection.
[0055] In another embodiment of the present disclosure, referring to the above example, in the case that the first proxy node is the proxy node connected by the mobile terminal last time, the second proxy node determined by the first proxy node is the first proxy node, and the first proxy node can directly find the corresponding server of the mobile terminal and establish a transmission link among the mobile terminal, the first proxy node and the server, which is the same as the transmission link connected by the mobile terminal last time.
[0056] The second proxy node 204 is configured to determine the target server in the server cluster by executing the reconnection task and establish a transmission link including the target client, the first proxy node, the second proxy node and the target server, wherein the transmission link is used for data transmission between the target client and the target server.
[0057] After the first proxy node creates the reconnection task for the second proxy node, the second proxy node can determine the target server in the server cluster by executing the reconnection task. The second proxy node can be understood as a proxy node connected with the target client. In actual application, the second proxy node can be the proxy node connected by the target client last time or the proxy node connected by the target client first time. For example, the target client is connected with the proxy node A first time and connected with the proxy node B second time. When the target client is disconnected again for reconnection, the determined second proxy node can be the proxy node A or the proxy node B. After the second proxy node is determined as the proxy node A connected first time, the data can be forwarded to the proxy node A through the first proxy node, and the data is forwarded to the target server by the proxy node A. After the second proxy node is determined as the proxy node B connected last time, the data can be forwarded to the proxy node B through the first proxy node, and the data is forwarded to the proxy node A by the proxy node B, and the data is forwarded to the target server by the proxy node A. Compared with the case that the second proxy node is determined as the proxy node A, the case that the second proxy node is determined as the proxy node B needs one more step of forwarding in the subsequent transmission link. However, no matter whether the second proxy node is the proxy node A or the proxy node B or the target client is disconnected for reconnection for many times, resulting in that the target client is connected with many proxy nodes, when the second proxy node can be selected from many proxy nodes, since the target server is still connected with the proxy node A, the data is finally sent to the target server by the proxy node A in the transmission link.
[0058] Preferably, in order to reduce resource waste caused by data forwarding as much as possible, the second proxy node determined by the embodiment in the specification can be the proxy node to which the target client is connected for the first time. In actual application, each proxy node can be connected to multiple servers in the server cluster concurrently, so after the second proxy node performs the reconnection task, the target server to which the target client was connected last time needs to be determined from the server cluster, so as to continue transmitting data to the target server and ensure the consistency of the context of the streaming data.
[0059] In a specific implementation, the second proxy node can determine the service end identifier associated with the client identifier in the distributed cache, and then determine the target server in the server cluster according to the service end identifier. For example, the distributed cache stores “A-1: B-1”, where A is the client identifier, 1 is the proxy node identifier, and B is the service end identifier. According to the client identifier, it can be determined that the target client was connected to proxy node 1 before, proxy node 1 is the second proxy node, and the service end identifier associated with the client identifier is B. Then, the target server can be determined in the server cluster according to the service end identifier. It should be noted that the form of data stored in the distributed cache can be other forms, which are not limited in the specification.
[0060] In an embodiment of the specification, the second proxy node performs the reconnection task, determines the target server in the server cluster, and the target server is the server that was previously in communication with the target client. Then, the second proxy node establishes a transmission link between the target client, the first proxy node, the second proxy node, and the target server, and the transmission link is used for data transmission between the target client and the target server. After the target client sends data to the first proxy node, the first proxy node forwards the data to the second proxy node, and the second proxy node sends the data to the target server, which performs modeling processing according to the data.
[0061] In another embodiment of the specification, when the first proxy node is the second proxy node, the first proxy node creates and executes the reconnection task, determines the target server in the server cluster, and establishes a transmission link between the target client, the first proxy node, and the target server. After the target client sends data to the first proxy node, the first proxy node forwards the data to the target server, and the target server performs modeling processing according to the data.
[0062] Based on this, by having the first proxy node determine the second proxy node in the proxy node cluster according to historical connection information, it can be determined whether the first proxy node for the target client's reconnection is the same as the proxy node of the previous connection. If not, the first proxy node creates a reconnection task and sends it to the second proxy node for execution. The second proxy node then determines the target server in the server cluster and establishes a transmission link including the target client, the first proxy node, the second proxy node, and the target server. If they are the same, the first proxy node creates a reconnection task and executes it. The first proxy node then determines the target server in the server cluster and establishes a transmission link including the target client, the first proxy node, and the target server. This ensures that even if the target client disconnects and reconnects, it can still reconnect the target client and the target server based on the proxy node, maintaining the consistency of the long connection between the two ends. This ensures that the data context received by the target server is consistent, reduces resource consumption from repeated data transmission, and improves project processing efficiency.
[0063] Furthermore, to prevent the target client from connecting to a server other than the target server, which could cause the data previously sent by the target client to become invalid, in the event of a reconnection by the target client, the first proxy node needs to determine the second proxy node that the target client previously connected to. Specifically, the first proxy node is used to determine the client identifier in the historical connection information, perform an identifier correspondence lookup in the node cache based on the client identifier, determine the historical connection node identifier associated with the client identifier based on the lookup result, and determine the second proxy node in the proxy node cluster based on the historical connection node identifier.
[0064] The client identifier can be understood as a unique identifier corresponding to the target client. This identifier can be the client's MAC address, IP address, or client name, etc. Based on the client identifier, historical connection node identifiers associated with the client can be identified in the node cache. These historical connection node identifiers can be understood as the identifiers of the proxy nodes the client connected to; for example, `phone-proxy-ip` represents the IP address identifier of the mobile connection node. The node cache can be understood as a distributed cache of the proxy node cluster. This distributed cache records the connection information for each client, including the client identifier, server identifier, and proxy node identifier. Based on the client identifier, a lookup of the identifier mapping can be performed in the node cache. This mapping can be understood as the correspondence between the client identifier and the proxy node identifier. When the target client connects to a proxy node, the proxy node writes its identifier into the distributed cache. Subsequently, based on the client identifier, the distributed cache can be searched for proxy node identifiers associated with the client identifier, thus determining the second proxy node. In other words, the first proxy node determines whether it is the proxy node previously connected to by the client.
[0065] In actual application, the correspondence between the client identifier and the proxy node identifier, such as "A-1", can be written in the distributed cache, which indicates that the client identifier A has an association relationship with the proxy node identifier 1. Subsequently, the corresponding identifier correspondence can be found according to the client identifier, and the historical connection node identifier can be determined according to the found identifier correspondence. The historical connection node identifier can be understood as the node identifier of the proxy node that the target client has connected before.
[0066] In an embodiment of the present specification, the first proxy node determines that the client identifier in the historical connection information is A, and performs identifier correspondence finding in the node cache according to the client identifier. The found identifier correspondence is "A-1", which determines that the historical connection node identifier associated with the client identifier A is 1. According to the historical connection node identifier, the second proxy node is determined to be the proxy node 1 in the proxy node cluster.
[0067] In summary, the historical connection node identifier of the proxy node having a transmission relationship with the target client can be found in the distributed cache through the client identifier, so as to determine the second proxy node, which is convenient for subsequent determination of the target service corresponding to the target client through the second proxy node, thereby ensuring that the connection of both ends remains unchanged.
[0068] Further, in order to avoid the situation that the identifier correspondence in the node cache is not uniform due to multiple disconnections and reconnections of the target client, the identifier correspondence corresponding to the target client can be updated after the target client is connected with the first proxy node. Specifically, the first proxy node is also used to update the identifier correspondence corresponding to the target client according to the local node identifier, and write the updated identifier correspondence into the node cache.
[0069] Wherein, after the target client sends a reconnection request to the first proxy node, the first proxy node can be connected with the target client. At this time, the first proxy node can update the identifier correspondence of the target client, and write the updated identifier correspondence into the node cache, which is used for subsequent determination of the second proxy node having an association relationship with the target client based on the updated identifier correspondence.
[0070] In actual application, the first proxy node can first update the identity correspondence of the target client according to the local node identity, which can be understood as the node identity corresponding to the first proxy node. For example, the local node identity of the first proxy node is 2, and the identity correspondence of the target client is "A-1", indicating that the target client has previously connected with the proxy node 1. After updating the identity correspondence according to the local node identity, the updated identity correspondence can be "A-1-2", indicating that the target client has previously connected with the proxy node 1 and the proxy node 2. When the second proxy node is determined subsequently, the updated identity correspondence can be used to determine that the historical connection node identities are 1 and 2, and the proxy node 1 is selected as the second proxy node.
[0071] In an embodiment of the present disclosure, after the first proxy node receives the reconnection request sent by the mobile terminal, the first proxy node connects with the mobile terminal and updates the identity correspondence based on the local node identity corresponding to the first proxy node, and writes the updated identity correspondence into the node cache.
[0072] In summary, after updating the identity correspondence of the target client, the updated identity correspondence can be written into the distributed cache, so that the second proxy node can be accurately determined based on the identity correspondence in the distributed cache to facilitate the establishment of the transmission link subsequently.
[0073] Further, in order to enable the second proxy node to find the correct target service end, the first proxy node can establish a reconnection task for the second proxy node, so that the second proxy node can determine the target service end by executing the reconnection task. Specifically, in the case that the second proxy node is the first proxy node, the first proxy node is configured to create a first task as the reconnection task, wherein the first task is used to establish a transmission link comprising the target client, the first proxy node and the target service end. In the case that the second proxy node is not the first proxy node, the first proxy node is configured to create a second task as the reconnection task and forward the reconnection task to the second proxy node, wherein the second task is used to establish a transmission link comprising the target client, the first proxy node, the second proxy node and the target service end.
[0074] In the case that the first proxy node to which the target client reconnects is the proxy node connected by the target client before, the first proxy node is the second proxy node, and the first proxy node creates a first task as the reconnection task. The first task can be understood as a task executed by the first proxy node. The first proxy node determines the target server by executing the first task, so as to establish a transmission link comprising the target client, the first proxy node, and the target server. In the case that the first proxy node to which the target client reconnects is not the proxy node connected by the target client before, the first proxy node is not the second proxy node, and the first proxy node creates a second task as the reconnection task. The second task can be understood as a task executed by the second proxy node. The second proxy node determines the target server by executing the second task, so as to establish a transmission link comprising the target client, the first proxy node, the second proxy node, and the target server.
[0075] In actual application, in the case that the first proxy node judges that the proxy node connected by the target client before is itself, the second proxy node is the first proxy node. In this case, the first proxy node can directly determine the target server. Therefore, the first proxy node determines the target server by creating and executing the first task, and subsequently establishes a transmission link comprising the target client, the first proxy node, and the target server. In the case that the first proxy node judges that the proxy node connected by the target client before is not itself, the second proxy node is not the first proxy node. In this case, the first proxy node creates the second task as the reconnection task and sends the second task to the second proxy node. The second proxy node executes the reconnection task to determine the target server, so as to establish a transmission link comprising the target client, the first proxy node, the second proxy node, and the target server.
[0076] In an embodiment of the present specification, in the case that the second proxy node is the first proxy node, the first proxy node creates the first task as the reconnection task, finds the service end identifier having the association relationship according to the client identifier, and determines the target server in the service end cluster based on the service end identifier, and establishes a transmission link of the target client, the first proxy node, and the target server.
[0077] In another embodiment of the present specification, in the case that the second proxy node is not the first proxy node, the first proxy node creates the second task as the reconnection task, and sends the reconnection task to the second proxy node. The second proxy node executes the reconnection task, finds the service end identifier having the association relationship according to the client identifier carried in the task, and determines the target server in the service end cluster based on the service end identifier, and records a transmission link of the target client, the first proxy node, the second proxy node, and the target server.
[0078] In summary, the first proxy node determines whether it is the proxy node connected to the target client before determining whether the first proxy node is the second proxy node, so that the first proxy node creates a corresponding reconnection task according to the actual situation, and the corresponding proxy node executes the reconnection task, determines the target server having a historical transmission relationship with the target client, and achieves the purpose of keeping the connection of both ends unchanged.
[0079] Further, since the second proxy node can be connected to multiple servers, in order to prevent the second proxy node from selecting an incorrect server, resulting in the inability to guarantee that both ends remain unchanged, the second proxy node can search for a server identifier having an association relationship with the client identifier in the node cache based on the client identifier, and determine the target server in the server cluster based on the server identifier.
[0080] The server identifier can be understood as a unique identifier of the server, and in actual application, the server identifier can be a MAC address or an IP address of the server. The server identifier can be used to determine the corresponding target server in the server cluster.
[0081] In specific implementation, since the node cache stores the correspondence between the client identifier of the target client and the server identifier of the target server, the server identifier having the identifier correspondence relationship with the client identifier can be searched in the node cache based on the client identifier, and the target server can be determined in the server cluster based on the server identifier.
[0082] In one embodiment of the present specification, the second proxy node determines the client identifier corresponding to the target client based on the historical connection information in the reconnection task, searches for the corresponding server identifier in the node cache based on the client identifier, and then determines the target server having a historical transmission relationship with the target client based on the server identifier.
[0083] Based on this, the server identifier having an association relationship is searched in the node cache based on the client identifier, and the target server can be accurately screened based on the server identifier, so as to guarantee the establishment of the transmission link between the target client and the target server.
[0084] Further, in the case that the second agent node is not the first agent node, after the second agent node creates the transmission link containing the target client, the first agent node, the second agent node and the target server, the second agent node can perform data transmission between the target client and the target server based on the transmission link. Specifically, the first agent node is further configured to receive a data processing request sent by the target client through the transmission link, and forward the data processing request to the second agent node; and the second agent node is further configured to send the data processing request to the target server.
[0085] In actual application, after the transmission link is established, the target client can send the data processing request to the first agent node, and the first agent node forwards the data processing request to the second agent node, and the second agent node further forwards the data processing request to the target server, so that the target server can receive the data transmitted by the target client and process it.
[0086] In actual application, when the mobile phone sends video stream data, pose data and other data to the first agent node, it can be packaged in the data processing request and sent to the first agent node, and the first agent node forwards the data processing request to the second agent node, and the second agent node sends the data processing request to the target server. In the case that the second agent node is the first agent node, after the first agent node receives the data processing request, it can directly send the data processing request to the target server.
[0087] In a specific embodiment of the present specification, in the case that the second agent node is not the first agent node, the first agent node receives the data processing request sent by the target client, forwards the data processing request to the second agent node, and the second agent node sends the data processing request to the target server, and the target server acquires the video stream data carried in the request and performs real-time modeling processing.
[0088] Therefore, by forwarding the data processing request sent by the target client to the second agent node through the first agent node, the second agent node can send the data processing request to the target server, so that the data sent by the target client is processed by the same server, realizing the effect of keeping the same double-end after reconnection.
[0089] Further, in order to prevent the agent node from being unable to work normally due to excessive load pressure, the data transmission system further comprises a resource scheduling node for load balancing. Specifically, the resource scheduling node is configured to, in a case where the agent node cluster receives a reconnection request sent by the target client, acquire processing state information of the agent node cluster, determine the first agent node in the agent node cluster according to the processing state information and a preset resource scheduling strategy, and forward the reconnection request to the first agent node.
[0090] The processing state information of the agent node cluster can be understood as the load information of each agent node in the agent node cluster, and the preset resource scheduling strategy can be understood as a preset load balancing rule. According to the processing state information and the preset resource scheduling strategy, an agent node with relatively small load pressure in the agent node cluster can be selected as the first agent node to receive the reconnection request sent by the target client.
[0091] In actual application, the reconnection request can be first received by the resource scheduling node in the cluster, and then forwarded to the first agent node selected according to the preset scheduling strategy.
[0092] In an embodiment of the present disclosure, after the resource scheduling node receives the reconnection request sent by the client to the agent node cluster, the load information of each agent node in the agent node cluster is acquired, the selection weight of each agent node is calculated according to the preset resource scheduling strategy, the first agent node is determined in the agent node cluster according to the calculated selection weight, and the reconnection request is forwarded to the first agent node.
[0093] According to the processing state information and the preset resource scheduling strategy, the resource scheduling node selects the first agent node in the agent node cluster, so that the load of the agent nodes in the agent node cluster is balanced, and each agent node works normally to respond to the reconnection request sent by the target client.
[0094] Further, in the case that the target client connects for the first time, in order to ensure the normal response of the request of the client, the selection of the proxy node can also be performed by the resource scheduling node in the proxy node cluster. Specifically, the resource scheduling node is further configured to, in the case that the connection request sent by the target client is received by the proxy node cluster, acquire processing state information of the proxy node cluster, determine a target proxy node in the proxy node cluster according to the processing state information and a preset resource scheduling strategy, and forward the connection request to the target proxy node; the target proxy node is configured to determine a client connection node identifier corresponding to the target client, and send the client connection node identifier to the target server, and in response to a server connection request returned by the target server for the client connection node identifier, establish a target transmission link among the target client, the target proxy node and the target server.
[0095] The connection request of the target client can be understood as the request of the target client connecting to the proxy node for the first time, and the target proxy node can be understood as the proxy node connected by the target client for the first time.
[0096] In actual application, after the connection request is sent to the target proxy node, the target proxy node is connected to the target client, and the target proxy node can send the client identifier of the target client and the proxy node identifier of the target proxy node to the target server. The client connection node identifier can be understood as the node identifier of the proxy node connected by the target client, that is, the node identifier of the target proxy node. After the target server receives the client connection node identifier, the target server sends a connection request to the proxy node corresponding to the node identifier. The target server can also be selected and determined by the resource scheduling node in the server cluster. The target proxy node is connected to the target server in response to the connection request sent by the target server, so as to establish a transmission link among the target client, the target proxy node and the target server. Subsequently, the data transmission between the target client and the target server can be realized through the transmission link.
[0097] Based on this, the target proxy node is selected in the proxy node cluster by the resource scheduling node according to the processing state information and the preset resource scheduling strategy to receive the connection request sent by the target client, so that the load of the proxy node in the proxy node cluster is balanced, and the client connection node identifier is sent to the target server by the target proxy node in response to the client connection request, so that the target server can return a server connection request, thereby connecting to the target server to realize the establishment of the transmission link among the three.
[0098] Further, in order to ensure that the subsequent target client can also find the corresponding target service end when being disconnected and reconnected, the target agent node can also write the client identifier, the service end identifier, the client connection node identifier and the service end connection node identifier into the distributed cache, for subsequent query. Specifically, the target agent node is also used for obtaining the service end connection node identifier corresponding to the target service end, and writing the client identifier of the target client, the service end identifier of the target service end, the client connection node identifier and the service end connection node identifier into the node cache according to the identifier correspondence relationship. The node cache is used to find the target agent node or the target service end having an association relationship with the target client.
[0099] The client connection node identifier can be understood as the identifier of the agent node connected by the target client, the service end connection node identifier can be understood as the identifier of the agent node connected by the target service end, and the connection node identifier can be the IP address of the agent node. The client identifier, the service end identifier, the client connection node identifier and the service end connection node identifier are written into the distributed cache in a corresponding relationship, so as to facilitate subsequent finding of the target agent node or the target service end having an association relationship with the target client based on the identifier correspondence relationship, so that the target client can also be connected with the target service end after being disconnected and reconnected.
[0100] In an embodiment of the present specification, the target agent node writes the client identifier, the service end identifier and the node identifier of the target agent node into the distributed cache in a corresponding relationship, so as to facilitate subsequent agent node or service end search based on the identifier.
[0101] The system comprises a proxy node cluster, a server cluster, wherein the server cluster comprises a target server having a transmission relationship with a target client; a first proxy node configured to receive a reconnection request sent by the target client to the proxy node cluster, parse the reconnection request, obtain historical connection information corresponding to the target client, determine a second proxy node in the proxy node cluster according to the historical connection information, and create a reconnection task for the second proxy node, wherein the proxy node cluster comprises the first proxy node and the second proxy node; and the second proxy node configured to determine the target server in the server cluster by executing the reconnection task, and establish a transmission link comprising the target client, the first proxy node, the second proxy node and the target server, wherein the transmission link is used for data transmission between the target client and the target server. In the case that the target client disconnects from the target server through the proxy node and sends a reconnection request to the proxy node cluster, the first proxy node in the proxy node cluster can determine the second proxy node connected to the target client according to the historical connection information of the target client, and create a reconnection task for the second proxy node to execute. The second proxy node determines the target server corresponding to the target client in the server cluster by executing the reconnection task, and establishes a transmission link between the target client, the first proxy node, the second proxy node and the target server, so that the target client can be connected to the same target server through the proxy node in the case of reconnection, and the target client can continue to transmit data to the target server, the resource consumption caused by retransmission of data due to server change is reduced, and the user experience is improved.
[0102] Figure 3 A processing flowchart of a data transmission method applied to a first proxy node is shown, which comprises steps 302 to 306.
[0103] Step 302: receiving and parsing a reconnection request sent by a target client to obtain historical connection information corresponding to the target client.
[0104] In an implementable manner, the first proxy node receives and parses a reconnection request sent by a target client, the reconnection request being used for reconnection between the target client and a target server, the first proxy node obtains historical connection information corresponding to the target client, and the historical connection information can comprise a client identifier of the target client.
[0105] Step 304: determining a second proxy node according to the historical connection information, wherein the first proxy node and the second proxy node are located in the same proxy node cluster.
[0106] In an implementable manner, the first proxy node can query the client connection node identifier corresponding to the target client according to the client identifier in the historical connection information in the distributed cache, and determine the second proxy node according to the client connection node identifier.
[0107] Step 306: creating a reconnection task for the second proxy node, wherein the reconnection task is used to establish a transmission link containing the target client, a target server in the server cluster, the first proxy node, and the second proxy node, and the transmission link is used for data transmission between the target client and the target server.
[0108] In an implementable manner, the first proxy node creates a reconnection task for the second proxy node, and in the case that the first proxy node is not the second proxy node, the first proxy node sends the reconnection task to the second proxy node, and the second proxy node executes the reconnection task; in the case that the first proxy node is the second proxy node, the first proxy node executes the reconnection task.
[0109] Optionally, the method comprises: determining the client identifier in the historical connection information, performing identifier corresponding relationship lookup in the node cache according to the client identifier, determining the historical connection node identifier having an association relationship with the client identifier according to the lookup result, and determining the second proxy node in the proxy node cluster based on the historical connection node identifier.
[0110] Optionally, the method further comprises: updating the identifier corresponding relationship corresponding to the target client according to the local node identifier, and writing the updated identifier corresponding relationship into the node cache.
[0111] Optionally, the method comprises: in the case that the second proxy node is the first proxy node, creating a first task as the reconnection task, wherein the first task is used to establish a transmission link containing the target client, the first proxy node, and the target server; and in the case that the second proxy node is not the first proxy node, creating a second task as the reconnection task, and forwarding the reconnection task to the second proxy node, wherein the second task is used to establish a transmission link containing the target client, the first proxy node, the second proxy node, and the target server.
[0112] Optionally, the method comprises: in the case that the second proxy node is not the first proxy node, receiving a data processing request sent by the target client through the transmission link, and forwarding the data processing request to the second proxy node.
[0113] The specification provides a data transmission method applied to a first proxy node, comprising receiving and analyzing a reconnection request sent by a target client, obtaining historical connection information corresponding to the target client; determining a second proxy node according to the historical connection information, wherein the first proxy node and the second proxy node are located in the same proxy node cluster; creating a reconnection task for the second proxy node, wherein the reconnection task is used to establish a transmission link containing the target client, a target server in a server cluster, the first proxy node and the second proxy node, and the transmission link is used for data transmission between the target client and the target server. The implementation of the long connection between the target client and the target client through the proxy node, and the sending of the proxy node cluster to the proxy node cluster, enables the first proxy node in the proxy node cluster to determine the second proxy node connected to the target client according to the historical connection information of the target client, and create a reconnection task for the second proxy node to execute, so that the transmission link containing the target client, the first proxy node, the second proxy node and the target server can be established by the second proxy node subsequently, realizing the effect of keeping the disconnected reconnection double-end unchanged.
[0114] Figure 4 A processing flowchart of a data transmission method applied to a second proxy node according to an embodiment of the specification is shown, and the method comprises steps 402 to 406.
[0115] Step 402: execute the reconnection task established by the first proxy node for the target client, wherein the first proxy node and the second proxy node are located in the same proxy node cluster.
[0116] In an implementable manner, the second proxy node executes the reconnection task established by the first proxy node, and determines the target server according to the historical connection information of the target client.
[0117] Step 404: determine the target server corresponding to the target client in the server cluster according to the execution result.
[0118] In an implementable manner, after the second proxy node executes the reconnection task, the target server corresponding to the target client is determined in the server cluster according to the execution result.
[0119] Step 406: establish a transmission link containing the target client, the target server, the first proxy node and the second proxy node, wherein the transmission link is used for data transmission between the target client and the target server.
[0120] In an implementable manner, the second proxy node establishes a transmission link containing the target client, the target server, the first proxy node and the second proxy node.
[0121] Optionally, the method comprises: determining historical connection information in the reconnection task, searching for a service end identifier having an association relationship with a client identifier in the historical connection information in a node cache, and determining the target service end in the service end cluster based on the service end identifier.
[0122] The data transmission method provided by the present specification comprises: executing a reconnection task established by a first proxy node for a target client, wherein the first proxy node and the second proxy node are located in the same proxy node cluster; determining a target service end corresponding to the target client in a service end cluster according to the execution result; and establishing a transmission link comprising the target client, the target service end, the first proxy node, and the second proxy node, wherein the transmission link is used for data transmission between the target client and the target service end. The target service end corresponding to the target client is determined in the server cluster by executing the reconnection task, and a transmission link between the target client, the first proxy node, the second proxy node, and the target service end is established, so that the target client can be connected back to the same target service end according to the proxy nodes in the proxy node cluster in the case of disconnection and reconnection of the target client, ensuring that the target client can continue to transmit data to the target service end, reducing resource loss caused by retransmission of data due to service end change, and improving user experience.
[0123] The following describes the data transmission system provided by the present specification in combination with the accompanying Figure 5 The data transmission system provided by the present specification is further described by taking the application of the data transmission system in a credit project as an example. Among them, Figure 5 A processing process flow diagram of a data transmission system provided by an embodiment of the present specification is shown, and the specific steps include steps 502 to 516, wherein the system comprises a proxy node cluster and a service end cluster, and the service end cluster comprises a target service end having a transmission relationship with a target client.
[0124] Step 502: The first proxy node receives a reconnection request sent by the mobile terminal to the proxy node cluster, parses the reconnection request, and obtains historical connection information corresponding to the mobile terminal.
[0125] In an implementable manner, the user sends a reconnection request to the proxy node cluster through the mobile terminal, and the first proxy node in the proxy node cluster receives and parses the reconnection request to obtain historical connection information corresponding to the mobile terminal.
[0126] In an implementable mode, the system further comprises a resource scheduling node, when the mobile terminal performs reconnection, the first proxy node is selected according to the processing state information of the proxy node cluster and the preset resource scheduling strategy, and the reconnection request is forwarded to the first proxy node.
[0127] Step 504: The first proxy node determines the mobile terminal identifier in the historical connection information, and performs identifier corresponding relationship lookup in the node cache according to the mobile terminal identifier.
[0128] In an implementable mode, the first proxy node performs identifier corresponding relationship lookup in the node cache according to the mobile terminal identifier in the historical connection information, and finds the node identifier of the proxy node having the historical connection relationship with the mobile terminal.
[0129] Step 506: The first proxy node determines the historical connection node identifier having the association relationship with the mobile terminal identifier according to the lookup result, and determines the second proxy node in the proxy node cluster based on the historical connection node identifier.
[0130] In an implementable mode, the first proxy node determines the historical connection node identifier having the association relationship with the mobile terminal identifier according to the lookup result, and determines the second proxy node in the proxy node cluster based on the historical connection node identifier, and the second proxy node is the proxy node previously connected by the mobile terminal.
[0131] Step 508: The first proxy node creates a reconnection task for the second proxy node.
[0132] In an implementable mode, when the second proxy node is not the first proxy node, the first proxy node creates the reconnection task and sends it to the second proxy node, the second proxy node determines the target service end by executing the reconnection task, and subsequently further establishes a transmission link comprising the mobile terminal, the first proxy node, the second proxy node and the target service end.
[0133] In another implementable mode, when the second proxy node is the first proxy node, the first proxy node creates the reconnection task and executes it to determine the target service end, and subsequently further establishes a transmission link comprising the mobile terminal, the first proxy node and the target service end.
[0134] Step 510: The first proxy node updates the identifier corresponding relationship corresponding to the mobile terminal according to the local node identifier, and writes the updated identifier corresponding relationship into the node cache of the proxy node cluster.
[0135] In an implementable manner, the local node identifier of the first proxy node is A2, the identifier corresponding relationship corresponding to the current mobile terminal is C1-A1, indicating that the mobile terminal has previously connected with the proxy node A1, after updating the identifier corresponding relationship according to the local node identifier, the updated identifier corresponding relationship is C1-A1\C1-A2, and the updated identifier corresponding relationship is written into the node cache of the proxy node cluster.
[0136] Step 512: The second proxy node determines the target service end in the service end cluster by executing the reconnection task, and establishes a transmission link including the mobile terminal, the first proxy node, the second proxy node and the target service end.
[0137] In an implementable manner, the second proxy node determines the historical connection information in the reconnection task, finds the service end identifier having an association relationship with the mobile terminal identifier in the node cache according to the mobile terminal identifier in the historical connection information, and determines the target service end in the service end cluster based on the service end identifier. When the mobile terminal transmits the proof data for improving the credit in the future, the mobile terminal sends a data processing request to the first proxy node, the first proxy node forwards the data processing request to the second proxy node, and the second proxy node sends the data processing request to the target service end, so as to ensure the consistency of the data flow context of the target service end, and realize the effect that the connection double end remains unchanged after the mobile terminal is disconnected and reconnected.
[0138] Step 514: In the case that the second proxy node is not the first proxy node, the first proxy node receives the data processing request sent by the mobile terminal through the transmission link, and forwards the data processing request to the second proxy node.
[0139] In an implementable manner, after the second proxy node establishes the transmission link, the data transmission process of the mobile terminal is that the mobile terminal sends a data processing request carrying proof credit level data to the first proxy node, the first proxy node forwards the data processing request to the second proxy node, and the second proxy node sends the data processing request to the target service end.
[0140] Step 516: The second proxy node sends the data processing request to the target service end.
[0141] In an implementable manner, after the second proxy node receives the data processing request forwarded by the first proxy node, the second proxy node can send the data processing request to the target service end, and the target service end evaluates the credit level of the user according to the data carried in the request.
[0142] In an implementable manner, the resource scheduling node can also determine the target proxy node connected with the mobile terminal according to the processing state information of the proxy node cluster and a preset resource scheduling strategy when the target client connects for the first time, and forward the connection request to the target proxy node, so that the target proxy node establishes a transmission link among the mobile terminal, the first proxy node and the target server by connecting with the target server. The target proxy node can also write the mobile terminal identifier, the server identifier of the target server, the client connection node identifier and the server connection node identifier into the node cache, so as to facilitate subsequent determination of the target proxy node or the target server.
[0143] The data transmission system provided in the specification realizes that when the mobile terminal is disconnected from the long connection with the mobile terminal through the proxy node and the proxy node cluster is sent to the proxy node cluster, the first proxy node in the proxy node cluster can determine the second proxy node connected with the mobile terminal according to the historical connection information of the mobile terminal, and create a reconnection task for the second proxy node to execute. The second proxy node determines the target server corresponding to the mobile terminal in the server cluster by executing the reconnection task, and establishes a transmission link among the mobile terminal, the first proxy node, the second proxy node and the target server, so as to realize that in the case of disconnection and reconnection of the mobile terminal, the same target server can also be connected through the proxy node in the proxy node cluster, so that the mobile terminal can continue to transmit data to the target server, reduce the resource loss caused by retransmission of data due to change of the server, and improve the user experience.
[0144] Corresponding to the method embodiments, the specification also provides a data transmission device applied to the first proxy node, Figure 6 A structure diagram of a data transmission device applied to the first proxy node is shown in an embodiment of the specification. As shown in the figure, Figure 6 The device comprises:
[0145] The receiving module 602 is configured to receive and parse the reconnection request sent by the target client, and obtain the historical connection information corresponding to the target client;
[0146] The determining module 604 is configured to determine the second proxy node according to the historical connection information, wherein the first proxy node and the second proxy node are located in the same proxy node cluster;
[0147] The creating module 606 is configured to create a reconnection task for the second proxy node, wherein the reconnection task is used to establish a transmission link containing the target client, a target server in the server cluster, the first proxy node and the second proxy node, and the transmission link is used for data transmission between the target client and the target server.
[0148] Optionally, the determining module 604 is further configured to determine a client identifier in the historical connection information, perform an identifier correspondence lookup in a node cache according to the client identifier, determine a historical connection node identifier having an association relationship with the client identifier according to a lookup result, and determine the second proxy node in the proxy node cluster based on the historical connection node identifier.
[0149] Optionally, the apparatus further includes an updating module configured to update an identifier correspondence corresponding to the target client according to the local node identifier, and write the updated identifier correspondence into the node cache.
[0150] Optionally, the creating module 606 is further configured to, in a case where the second proxy node is the first proxy node, create a first task as a reconnection task, wherein the first task is used to establish a transmission link including the target client, the first proxy node, and the target server; and in a case where the second proxy node is not the first proxy node, create a second task as a reconnection task and forward the reconnection task to the second proxy node, wherein the second task is used to establish a transmission link including the target client, the first proxy node, the second proxy node, and the target server.
[0151] The present specification provides a data transmission apparatus applied to a first proxy node, including a receiving module configured to receive and parse a reconnection request sent by a target client, and obtain historical connection information corresponding to the target client; a determining module configured to determine a second proxy node according to the historical connection information, wherein the first proxy node and the second proxy node are located in a same proxy node cluster; and a creating module configured to create a reconnection task for the second proxy node, wherein the reconnection task is used to establish a transmission link including the target client, a target server in a server cluster, the first proxy node, and the second proxy node, and the transmission link is used for data transmission between the target client and the target server. In a case where the target client disconnects a long connection with the target client through a proxy node and sends a proxy node cluster to the proxy node cluster, the first proxy node in the proxy node cluster can determine a second proxy node connected with the target client according to historical connection information of the target client, and create a reconnection task for the second proxy node to execute, so that a transmission link including the target client, the first proxy node, the second proxy node, and the target server can be established by the second proxy node in the future, and the effect of keeping both ends unchanged after disconnection and reconnection is achieved.
[0152] The above is a schematic scheme of the data transmission device according to the embodiment. It should be noted that the technical scheme of the data transmission device and the technical scheme of the data transmission method described above belong to the same concept, and the details of the technical scheme of the data transmission device that are not described in detail can be referred to the description of the technical scheme of the data transmission method.
[0153] Corresponding to the method embodiments described above, the present specification also provides a data transmission device applied to a second proxy node, Figure 7 A structural schematic diagram of a data transmission device applied to a second proxy node is shown according to an embodiment of the present specification. As shown in Figure 7 The device comprises:
[0154] The execution module 702 is configured to execute a reconnection task established by a first proxy node for a target client, wherein the first proxy node and the second proxy node are located in the same proxy node cluster.
[0155] The determination module 704 is configured to determine a target service end corresponding to the target client in a service end cluster according to the execution result.
[0156] The establishment module 706 is configured to establish a transmission link containing the target client, the target service end, the first proxy node and the second proxy node, wherein the transmission link is used for data transmission between the target client and the target service end.
[0157] Optionally, the determination module 704 is further configured to determine historical connection information in the reconnection task, find a service end identifier having an association relationship with a client identifier in the historical connection information in a node cache according to the client identifier, and determine the target service end in the service end cluster based on the service end identifier.
[0158] The specification provides a data transmission device applied to a second agent node, comprising an execution module configured to execute a reconnection task established by a first agent node for a target client, wherein the first agent node and the second agent node are located in the same agent node cluster; a determination module configured to determine a target server corresponding to the target client in a server cluster according to an execution result; and an establishment module configured to establish a transmission link containing the target client, the target server, the first agent node and the second agent node, wherein the transmission link is used for data transmission between the target client and the target server. The target server corresponding to the target client is determined in the server cluster by executing the reconnection task, and the transmission link between the target client, the first agent node, the second agent node and the target server is established, so that the target client can be connected to the same target server according to the agent node in the agent node cluster in the case of disconnection and reconnection, the target client can continue to transmit data to the target server, resource loss caused by retransmission of data due to server change is reduced, and user experience is improved.
[0159] The above is a schematic scheme of the data transmission device of the embodiment. It should be noted that the technical scheme of the data transmission device and the technical scheme of the data transmission method described above belong to the same concept, and the details of the technical scheme of the data transmission device which are not described in detail can be referred to the description of the technical scheme of the data transmission method.
[0160] An embodiment of the specification further provides a data transmission system which stores computer instructions, and the system comprises a first agent node and a second agent node; the first agent node is used to store reconnection task creation executable instructions, and the second agent node is used to store transmission link establishment executable instructions; the reconnection task creation executable instructions are executed by the first agent node, and the transmission link establishment executable instructions are executed by the second agent node, so as to realize the steps of the above data transmission method.
[0161] Figure 8 A structural block diagram of a computing device 800 according to an embodiment of the specification is shown. The components of the computing device 800 include but are not limited to a memory 810 and a processor 820. The processor 820 is connected with the memory 810 through a bus 830, and a database 850 is used to save data.
[0162] The computing device 800 also includes an access device 840 that enables the computing device 800 to communicate via one or more networks 860. Examples of such networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or combinations of such networks, such as the Internet. The access device 840 can include one or more of any type of network interface (for example, a network interface card (NIC)), such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a global microwave interconnection access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and so on.
[0163] In an embodiment of the present specification, the above-mentioned components of the computing device 800 and other components not shown in the Figure 8 may be connected to each other, for example, through a bus. It should be understood that Figure 8 The computing device structure diagram shown is merely for the purpose of example, and is not a limitation on the scope of the present specification. Other components can be added or replaced by those skilled in the art as needed.
[0164] The computing device 800 can be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (for example, a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, and so on), a mobile phone (for example, a smartphone), a wearable computing device (for example, a smart watch, smart glasses, and so on), or other types of mobile devices, or a stationary computing device such as a desktop computer or a PC. The computing device 800 can also be a mobile or stationary server.
[0165] Wherein the processor 820 executes the computer instructions to implement the steps of the data transmission method.
[0166] The above is a schematic scheme of a computing device of the present embodiment. It should be noted that the technical scheme of the computing device belongs to the same concept as the technical scheme of the data transmission method described above, and the details of the technical scheme of the computing device that are not described in detail can be referred to the description of the technical scheme of the data transmission method.
[0167] An embodiment of the present specification also provides a computer readable storage medium storing computer instructions, which when executed by a processor, implement the steps of the data transmission method as described above.
[0168] The above is a schematic solution of the computer readable storage medium of the embodiment. It should be noted that the technical solution of the storage medium and the technical solution of the data transmission method described above belong to the same concept, and the details of the technical solution of the storage medium which are not described in detail can be referred to the description of the technical solution of the data transmission method.
[0169] An embodiment of the present specification further provides a computer program, wherein when the computer program is executed in the computer, the computer is enabled to execute the steps of the data transmission method.
[0170] The above is a schematic solution of the computer program of the embodiment. It should be noted that the technical solution of the computer program and the technical solution of the data transmission method described above belong to the same concept, and the details of the technical solution of the computer program which are not described in detail can be referred to the description of the technical solution of the data transmission method.
[0171] The specific embodiments of the present specification are described above. Other embodiments are within the scope of the appended claims. In some cases, acts or steps recited in the claims can be performed in an order other than that in which they are recited and still achieve desirable results. Also, the process depicted in the figures can not necessarily require the particular order shown, or sequential order, to achieve the desired results. In certain implementations, multitasking and parallel processing can be advantageous.
[0172] The computer instructions include computer program code, which can be in the form of source code, object code, executable code, or some intermediate form. The computer readable medium can include any entity or apparatus capable of carrying the computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal, and software distribution medium, etc. It should be noted that the contents included in the computer readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction, for example, in some jurisdictions, according to legislation and patent practice, the computer readable medium does not include electrical carrier signals and telecommunication signals.
[0173] It should be noted that, for the aforementioned method embodiments, the sequences of the described actions are not necessarily required to implement the present application, and certain actions can be performed in other sequences, or even at the same time, in accordance with the present application. Furthermore, certain actions can not be required to implement the present application. Additionally, the described embodiments are not necessarily the only possible implementation of the present application.
[0174] In the above embodiments, the description of each embodiment focuses on different aspects, and the parts not described in detail in a certain embodiment can be referred to the relevant description of other embodiments.
[0175] The above disclosed preferred embodiments of the present application are only used to help explain the present application. Alternative embodiments do not describe all the details, nor limit the present application to the specific embodiments described. Obviously, according to the content of the embodiments of the present application, many modifications and changes can be made. The present application selects and specifically describes these embodiments in order to better explain the principles and practical applications of the embodiments of the present application, so that those skilled in the art can well understand and use the present application. The present application is limited by the claims and their full scope and equivalents.
Claims
1. A data transmission system, the system comprising a proxy node cluster and a server cluster, wherein, The server cluster includes target servers that have a transmission relationship with the target client; The first proxy node is configured to receive a reconnection request sent by the target client to the proxy node cluster, parse the reconnection request, obtain the historical connection information corresponding to the target client, determine a second proxy node in the proxy node cluster based on the historical connection information, and create a reconnection task for the second proxy node. The proxy node cluster includes the first proxy node and the second proxy node. The historical connection information includes the client identifier of the target client. The first proxy node searches for the proxy node that the target client last connected to in the distributed cache based on the client identifier. The second proxy node is used to determine the target server in the server cluster by executing the reconnection task, and establish a transmission link including the target client, the first proxy node, the second proxy node and the target server, wherein the transmission link is used for data transmission between the target client and the target server.
2. The system as described in claim 1, wherein the first proxy node is configured to determine the client identifier in the historical connection information, perform an identifier correspondence lookup in the node cache based on the client identifier, determine the historical connection node identifier associated with the client identifier based on the lookup result, and determine the second proxy node in the proxy node cluster based on the historical connection node identifier.
3. In the system as described in claim 2, the first proxy node is further configured to update the identifier correspondence of the target client according to the local node identifier, and write the updated identifier correspondence into the node cache.
4. In the system as described in claim 1, when the second proxy node is the first proxy node, the first proxy node is used to create a first task as a reconnection task, wherein... The first task is to establish a transmission link including the target client, the first proxy node, and the target server; If the second proxy node is not the first proxy node, the first proxy node is used to create a second task as a reconnection task and forward the reconnection task to the second proxy node. The second task is used to establish a transmission link including the target client, the first proxy node, the second proxy node and the target server.
5. The system as described in claim 4, wherein the second proxy node is configured to determine the historical connection information in the reconnection task, search for a server identifier associated with the client identifier in the node cache based on the client identifier in the historical connection information, and determine the target server in the server cluster based on the server identifier.
6. In the system of claim 1, if the second proxy node is not the first proxy node, the first proxy node is further configured to receive a data processing request sent by the target client through the transmission link and forward the data processing request to the second proxy node; The second proxy node is also used to send the data processing request to the target server.
7. The system according to any one of claims 1-6, the system further comprising a resource scheduling node, configured to, when the proxy node cluster receives a reconnection request sent by the target client, obtain processing status information of the proxy node cluster, determine the first proxy node in the proxy node cluster according to the processing status information and a preset resource scheduling strategy, and forward the reconnection request to the first proxy node.
8. The system as described in claim 7, wherein the resource scheduling node is further configured to, when the proxy node cluster receives a connection request sent by the target client, obtain the processing status information of the proxy node cluster, determine a target proxy node in the proxy node cluster according to the processing status information and a preset resource scheduling strategy, and forward the connection request to the target proxy node; The target proxy node is used to determine the client connection node identifier corresponding to the target client, and send the client connection node identifier to the target server. In response to the server connection request returned by the target server for the client connection node identifier, a target transmission link is established between the target client, the target proxy node, and the target server.
9. The system as described in claim 8, wherein the target proxy node is further configured to obtain the server connection node identifier corresponding to the target server, and write the client identifier of the target client, the server identifier of the target server, the client connection node identifier, and the server connection node identifier into the node cache according to the identifier correspondence, wherein, The node cache is used to find the target proxy node or the target server that is associated with the target client.
10. A data transmission method, applied to a first agent node, comprising: The first proxy node receives and parses the reconnection request sent by the target client to obtain the historical connection information corresponding to the target client. The historical connection information includes the client identifier of the target client. The first proxy node searches for the proxy node that the target client last connected to in the distributed cache based on the client identifier. The second proxy node is determined based on the historical connection information, wherein the first proxy node and the second proxy node are located in the same proxy node cluster; A reconnection task is created for the second proxy node, wherein the reconnection task is used to establish a transmission link including the target client, the target server in the server cluster, the first proxy node, and the second proxy node, and the transmission link is used for data transmission between the target client and the target server.
11. A data transmission method, applied to a second agent node, comprising: The reconnection task established by the first proxy node for the target client is executed. The first proxy node and the second proxy node are located in the same proxy node cluster. The second proxy node is determined based on historical connection information, which includes the client identifier of the target client. The first proxy node searches for the proxy node that the target client last connected to in the distributed cache according to the client identifier. Based on the execution results, determine the target server corresponding to the target client in the server cluster; A transmission link is established, comprising the target client, the target server, the first proxy node, and the second proxy node, wherein the transmission link is used for data transmission between the target client and the target server.
12. A data transmission system, the system comprising a first proxy node and a second proxy node; The first proxy node is used to store executable instructions for creating reconnection tasks, and the second proxy node is used to store executable instructions for establishing transmission links. When the reconnection task creation executable instruction is executed by the first proxy node and the transmission link establishment executable instruction is executed by the second proxy node, the steps of the method described in claim 10 or 11 are implemented.
13. A computing device comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein the processor, when executing the computer instructions, performs the steps of the method of claim 10 or 11.
14. A computer-readable storage medium storing computer-executable instructions that, when executed by a processor, implement the steps of the method of claim 10 or 11.
Citation Information
Patent Citations
High-reliability video conference system, control method thereof and storage medium
CN113485821A
Data transmission method, device, system and equipment and storage medium
CN114268499A
Target service access method, module and system
CN114979099A