WO2021207960A1 - 一种实现断线重连的数据处理方法、装置、设备及系统 - Google Patents

一种实现断线重连的数据处理方法、装置、设备及系统 Download PDF

Info

Publication number
WO2021207960A1
WO2021207960A1 PCT/CN2020/084854 CN2020084854W WO2021207960A1 WO 2021207960 A1 WO2021207960 A1 WO 2021207960A1 CN 2020084854 W CN2020084854 W CN 2020084854W WO 2021207960 A1 WO2021207960 A1 WO 2021207960A1
Authority
WO
WIPO (PCT)
Prior art keywords
node
connection
received
preset
sending
Prior art date
Application number
PCT/CN2020/084854
Other languages
English (en)
French (fr)
Inventor
晏意林
陈元丰
黄高峰
史俊杰
谢翔
李升林
孙立林
Original Assignee
云图技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 云图技术有限公司 filed Critical 云图技术有限公司
Priority to PCT/CN2020/084854 priority Critical patent/WO2021207960A1/zh
Publication of WO2021207960A1 publication Critical patent/WO2021207960A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks

Definitions

  • This application relates to the field of network communication technology, and in particular to a data processing method, device, equipment and system for realizing disconnection and reconnection.
  • the operating mode of MPC is that multiple parties execute the same program together. For example, in a three-party calculation, each of the three nodes will start the same program to run together. In this way, during the execution of MPC, there are interactions between each node and other nodes. However, during the interaction process, there may be nodes with unstable network (such as weak network environment, etc.) among the computing nodes participating in the MPC, or even malicious nodes intervening in the network (such as unplugging the network cable during execution), resulting in Network abnormalities (such as jitter, delay, interruption, etc.) during the calculation process may even lead to errors in the calculated data. At present, when a network interruption occurs during the execution of the MPC, most of them are no processing, simple exit, or endless waiting, which may lead to waste of resources or calculation errors.
  • unstable network such as weak network environment, etc.
  • malicious nodes intervening in the network such as unplugging the network cable during execution
  • Network abnormalities such as jitter, delay, interruption, etc.
  • the embodiments of this specification provide a data processing method, device, equipment and system for realizing disconnection and reconnection, which can effectively solve the problem of network interruption between various nodes in the process of secure multiparty computing, thereby ensuring the normal operation of computing while reducing resources Waste.
  • a data processing method for realizing disconnection and reconnection is executed by multiple nodes, and the method includes:
  • a data processing method for realizing disconnection and reconnection is executed by multiple nodes, and the method includes:
  • the second node judges whether the information indicating that the target message is successfully received from the first node is received within a preset second timeout period
  • the target message is sent to the first node.
  • a data processing device for realizing disconnection and reconnection is executed by multiple nodes, and the device includes:
  • a first judgment module configured to judge whether a first node among the plurality of nodes has received a target message sent by a second node among the plurality of nodes within a preset first timeout period
  • the first sending module is configured to send a heartbeat packet to the second node when it is determined that it has not been received;
  • the first detection module is configured to detect whether the number of sending heartbeat packets is greater than a first preset number, and when it is determined that it is greater than the first preset number and the target message is not received, close the first connection with the second node;
  • the first request module is configured to send a request to reestablish a connection to the second node
  • the first determining module is configured to determine whether the second connection with the second node is successfully re-established based on the first preset successful re-establishment condition
  • the first receiving module is configured to receive the target message sent by the second node when it is determined that the reconstruction is successful.
  • a data processing device for realizing disconnection and reconnection is executed by multiple nodes, and the device includes:
  • a second sending module configured to send a target message from a second node among the plurality of nodes to the first node among the plurality of nodes;
  • a second judgment module configured for the second node to judge whether the information indicating that the target message is successfully received from the first node is received within a preset second timeout period
  • the third sending module is configured to send a heartbeat packet to the first node when it is determined that it has not been received;
  • the second detection module is configured to detect whether the number of times of sending heartbeat packets is greater than the second preset number of times, and when it is determined that the number of times the heartbeat packet is sent is greater than the second preset number of times and the information indicating that the target message is successfully received is not received, the first node is shut down The third connection;
  • the second request module is configured to send a request to reestablish a connection to the first node
  • a second determining module configured to determine whether the fourth connection with the first node is successfully re-established based on a second preset re-establishment success condition
  • the fourth sending module is configured to send the target message to the first node when it is determined that the reconstruction is successful.
  • a data processing device for realizing disconnection and reconnection includes a processor and a memory for storing executable instructions of the processor, and the implementation of the instructions when the instructions are executed by the processor includes the following steps:
  • the first node among the plurality of nodes determines whether the target message sent by the second node among the plurality of nodes is received within a preset first timeout period
  • a data processing device for realizing disconnection and reconnection includes a processor and a memory for storing executable instructions of the processor, and the implementation of the instructions when the instructions are executed by the processor includes the following steps:
  • the second node among the plurality of nodes sends a target message to the first node among the plurality of nodes
  • the second node judges whether the information indicating that the target message is successfully received from the first node is received within a preset second timeout period
  • the target message is sent to the first node.
  • a data processing system for realizing disconnection and reconnection includes at least one processor and a memory storing computer-executable instructions.
  • the processor executes the instructions, the steps of any method embodiment method in the embodiments of this specification are implemented.
  • This manual provides a data processing method, device, equipment and system for realizing disconnection and reconnection.
  • the judgment of the network interruption between the nodes can be quickly realized, thereby improving the processing efficiency of the network interruption.
  • the communication connection between nodes is re-established through the reconnection mechanism, which can ensure the normal operation of the calculation and reduce the error of calculation data when there are unstable nodes in the network or malicious nodes intervening in the network during the secure multi-party calculation process At the same time, reduce the waste of resources.
  • the implementation scheme provided in this specification can effectively solve the problem of network interruption between various nodes in the process of secure multi-party calculation, thereby ensuring the normal operation of the calculation and reducing the waste of resources.
  • FIG. 1 is a schematic flowchart of an embodiment of the interaction between nodes in the tripartite computing provided in this specification;
  • FIG. 2 is a schematic flowchart of an embodiment of a data processing method for reconnecting after a disconnection provided in this specification
  • FIG. 3 is a schematic flowchart of another embodiment of a data processing method for reconnecting after a disconnection provided in this specification
  • FIG. 4 is a schematic flowchart of a specific embodiment of a data processing method for realizing disconnection and reconnection provided in this specification;
  • FIG. 5 is a schematic diagram of the module structure of an embodiment of a data processing device that realizes disconnection and reconnection provided in this specification;
  • FIG. 6 is a schematic diagram of the module structure of an embodiment of another data processing device that realizes disconnection and reconnection provided in this specification;
  • FIG. 7 is a hardware structure block diagram of an embodiment of a data processing server that realizes disconnection and reconnection provided in this specification.
  • MPC is to solve the problem of collaborative computing that protects privacy between a group of untrusted parties. It can be abstractly understood as: each participant has its own private data, and calculates the public function without leaking their private data, and when the entire function calculation is completed, each participant only knows the calculation result, and does not know the other Participant's data and intermediate data of the calculation process.
  • the network is abnormal (jitter, delay, interruption, etc.), and even leads to errors in the calculated data.
  • this specification provides a data processing method for realizing disconnection and reconnection, which can be suitable for multiple parties to execute the same program at the same time, so as to effectively solve the problem of network interruption between various nodes in the secure multi-party calculation process.
  • the embodiment of this specification takes the interaction between nodes in the three-party computing (referred to as "3PC") as an example for description, and the processing procedures between other nodes are similar, and will not be repeated here.
  • P0, P1, and P2 represent 3 nodes participating in the calculation.
  • the communication mode between the nodes can be a Transmission Control Protocol (TCP) long connection, where 3 communication channels can be established.
  • TCP Transmission Control Protocol
  • the process of MPC OP involves pairwise interactions between nodes.
  • Each node may include a server and two clients for interaction between MPC OP.
  • OP is the abbreviation of Operation, which represents an operator, such as matrix multiplication and matrix subtraction.
  • MPC OP means that during the execution of MPC, multiple parties execute the same secure multi-party calculation operator at the same time.
  • TCP is full-duplex (two-way transmission and reception), that is, one communication channel can be used for receiving and sending.
  • FIG. 2 is a schematic flowchart of an embodiment of a data processing method for realizing disconnection and reconnection provided in this specification.
  • this specification provides method operation steps or device structures as shown in the following embodiments or drawings, the method or device may include more or fewer operation steps after partial combination based on conventional or no creative labor. Or modular unit.
  • steps or structures where there is no necessary causal relationship logically the execution order of these steps or the module structure of the device is not limited to the execution order or module structure shown in the embodiments of this specification or the drawings.
  • FIG. 2 A specific embodiment is shown in FIG. 2.
  • the method may include the following steps.
  • the first node among the plurality of nodes determines whether the target message sent by the second node among the plurality of nodes is received within a preset first timeout period.
  • the first node and the second node can be any two of the multiple nodes interacting with each other.
  • the first node can be P0
  • the second node can be P1
  • the first node can be P1
  • the second node can be P2, etc.
  • "First” and "Second" are only used to distinguish different nodes.
  • the preset first timeout time is a preset time, which can be used to determine whether it is timeout.
  • each node may preset a timeout period, such as 2s, 5s, etc., before each time it receives or sends information. It should be noted that in the embodiments of this specification, information reception or transmission is synchronous and non-blocking.
  • the pre-set timeout time for the same node each time it receives or sends information can be the same or different. Different nodes can set the timeout time before each time they receive or send information.
  • the timeout period can be the same or different. It can be set according to the actual scenario. The manual does not limit this. Among them, the setting of the timeout period can be realized by a timer or a timer.
  • the target message may include data for normal communication between nodes.
  • each node may include a server and two clients, where the server can be used to receive target messages and can also be used to send heartbeat packets; the client can be used to send The target message can also be used to receive heartbeat packets.
  • the server in the first node may set a timeout period in advance, then perform data reception, and determine whether the target message sent by the client in the second node is received within the timeout period.
  • the first node is P0
  • the second node is P1.
  • the server included in P0 can first set the timeout period T1, and then receive data, and determine whether the P1 is received within T1 The target message sent by the client.
  • the first node is P1, and the second node is P2.
  • the server included in P1 can first set the timeout period T2, and then receive data, and determine whether P2 is received within T2 The target message sent by the client.
  • the node can provide a guarantee for subsequent detection of network interruption by pre-setting a timeout period before sending and receiving data.
  • the heartbeat packet refers to a custom command word between the client and the server to notify the other party of their own status at regular intervals, which is similar to a heartbeat, so it is called a heartbeat packet.
  • the heartbeat packet can be mainly used to detect whether the connection between nodes is interrupted (may be referred to as "heartbeat detection"). It should be noted that this manual does not limit the specific content included in the heartbeat package.
  • the heartbeat packet is generally a very small packet, or an empty packet containing only the header.
  • the reason may be caused by network delay, so the failure to receive the target message within the preset timeout period does not indicate the connection between nodes Has been interrupted.
  • the first node determines that the target message sent by the second node is not received within the preset first timeout period, it can send a heartbeat packet to the second node to detect the first node. Whether the connection between one node and the second node is interrupted.
  • sending the heartbeat packet to the second node may be sent by a server included in the first node, or sent by a client included in the first node.
  • the timeout party may initiate a PING message and receive a PONG message in response to the peer to perform heartbeat detection.
  • timeout party initiates a PING message and receives a PONG message from the peer end, it indicates that the heartbeat detection is successful and the nodes can communicate normally; if the timeout party initiates a PING message but does not receive a PONG message from the peer end, it indicates that the heartbeat detection has failed. .
  • the sending a heartbeat packet to the second node may include: periodically sending a heartbeat packet to the second node.
  • the period of sending the heartbeat packet can be set according to the actual scenario, which is not limited in this specification.
  • the first node is P0 and the second node is P1.
  • P0 does not receive the target message sent by P1 within T1, it can send a heartbeat detection to P1 every T2.
  • each time before sending a heartbeat packet to the second node may include: detecting whether the message is received Target message; when it is determined that it has not been received, send a heartbeat packet to the second node.
  • the first node determines that it receives the target message sent by the second node within the preset first timeout period, or receives the target message each time before sending a heartbeat packet to the second node, it can be explained that the first node Normal communication can be carried out between one node and the second node without heartbeat detection, which can reduce resource waste.
  • the first node is P0 and the second node is P1.
  • P0 does not receive the target message sent by P1 in T1
  • it can send a heartbeat detection to P1 every T2, and to P1 every T2
  • P1 Every T2
  • S4 Detect whether the number of sending heartbeat packets is greater than a first preset number, and when it is determined that it is greater than the first preset number and the target message is not received, the first connection with the second node is closed.
  • the first preset number of times can be set according to the actual scenario, such as 5 times, 10 times, etc.
  • the preset number of sending heartbeat packets can be mainly used to prevent the other party from not responding in time due to busyness in a short period of time, or network delays, etc.
  • the first connection with the second node can be understood as a communication link between the first node and the second node, such as a communication link between a server in the first node and a client in the second node.
  • the first node before sending a heartbeat packet, may pre-set the maximum number of heartbeat packets sent, so as to detect whether the target is received when the number of heartbeat packets sent is greater than the set maximum number of heartbeat packets. information.
  • the first node when it is detected that the number of times of sending heartbeat packets is greater than the set maximum number of times of sending heartbeat packets and the target message has not been received, it means that multiple heartbeat detections have failed.
  • the communication link has been interrupted.
  • the local end can be closed, that is, the first connection with the second node can be closed, and resources can be released.
  • the maximum number of times of sending heartbeat packets is preset to N, the first node can detect whether the number of times it has sent heartbeat packets is greater than N.
  • the first node can continue to the second node Send the heartbeat packet until the number of times the heartbeat packet is sent is greater than N, and the first connection with the second node is closed when the target message is not received.
  • S6 Send a connection re-establishment request to the second node.
  • the first node may send a request to reestablish the connection to the second node, so as to re-receive the target message sent by the second node.
  • the request to re-establish the connection to the second node may be initiated by the client included in the first node.
  • the first preset re-establishment success condition may include receiving response information of the second node to the connection re-establishment request within the first preset request times.
  • the first preset number of requests refers to the number of times that the first node sends a connection reestablishment request to the second node, which can be set according to actual scenarios, which is not limited in this specification.
  • the response information can be understood as the information returned by the second node to the first node after receiving the request sent by the first node. For example, it can be response information indicating that the request is received.
  • the response information can include characters, numbers, and so on.
  • the second connection with the second node can be understood as a communication link between the first node and the second node, such as a re-established communication link between the server in the first node and the client in the second node.
  • the determining whether the second connection with the second node is successfully re-established based on the first preset re-establishment success condition may include: determining whether the re-connection request is sent to the second node. Whether the response information of the second node to the connection re-establishment request is received within the first preset time; if it is received, it is determined that the re-establishment of the second connection with the second node is successful; otherwise, it is determined to the second node Whether the number of times of sending re-connection requests is less than the first preset number of requests; when it is determined that it is less than the first preset number of requests, re-send the request for re-connection to the second node; correspondingly, based on the first preset re-establishment success Condition, determining whether the second connection with the second node is successfully re-established.
  • the first preset time can be understood as a preset reconstruction timeout time, which can be
  • the request to reestablish the connection to the second node before sending the request to reestablish the connection to the second node, you can preset the number of reestablishment requests N1 and the rebuild timeout time T3 each time, and then send the request to reestablish the connection to the second node, and determine whether it is within T3 The response message returned by the second node is received. If it is received, it indicates that the connection is successfully re-established. In some implementation scenarios, if the response information returned by the second node is not received in T3, it can be judged whether the number of times of sending the request to re-establish the connection is less than N1.
  • the request to re-establish the connection can be re-sent, and it can be judged whether Whether the response information returned by the second node is received in T3, if it is received, it means that the connection is reestablished successfully, if it is not received, it is judged whether the number of times of sending the request to reestablish the connection is less than N1, and so on, until the request to reestablish the connection is sent When the number of times is equal to N1, and the response message returned by the second node is not received within T3, it indicates that the connection re-establishment fails.
  • the first node when the connection is successfully re-established, may re-receive the target message sent by the second node. In another embodiment of the present specification, when the reconnection fails, the first node can release node resources, thereby reducing resource waste and improving processing efficiency.
  • idle detection may also be performed.
  • Idle detection can detect the communication link between nodes when the network is idle. If the line is detected to be interrupted, the connection can be established in advance, and there is no need to wait for the link to be rebuilt when the link is actually used, which can improve the processing efficiency of disconnection and reconnection. For example, for an MPC OP, if the input data is very large, its local calculation also takes time. In this way, the network is idle during the local calculation period. At this time, some tests can be done. If the line is interrupted, The connection can be rebuilt in advance, instead of waiting until the link is actually used. Idle detection can be that the client in one node actively sends a heartbeat packet to the server in another node for detection.
  • Idle detection can be performed after each successful transmission and reception.
  • the first node after the connection is successfully re-established and the first node receives the target message sent by the second node, it may further include: recording the first time corresponding to the successful reception of the target message, and sending the message to the second node.
  • the node sends information indicating that the target message is successfully received; after a first preset idle time based on the first time, sends an idle detection heartbeat packet to the second node.
  • the first time can be used to indicate the time corresponding to the system when the target message is successfully received.
  • the first preset idle time may be a time period from the time corresponding to the system when the target message is successfully received to the time T0 elapses, and T0 may be set according to actual scenarios.
  • the first preset idle time is preset as T0, and the timing starts after the first node successfully receives the target message sent by the second node.
  • the client in the first node can take the initiative Send a heartbeat packet to the server of the second node to determine whether the connection between the first node and the second node is still alive, and then decide whether to reconnect.
  • the reconnection mechanism is used to re-establish the communication connection between nodes, which can ensure the normal operation of calculations, reduce calculation data errors, and reduce resource waste when there are unstable network nodes or malicious nodes intervening in the network. .
  • the above embodiment is described from the side of the first node (receiving end) among multiple nodes.
  • the embodiment of this specification also provides an embodiment, which can be described from the side of the second node (transmitting end) of multiple nodes.
  • the method may include the following steps.
  • S20 The second node among the plurality of nodes sends a target message to the first node among the plurality of nodes.
  • the first node and the second node can be any two of the multiple nodes interacting with each other.
  • the first node can be P0
  • the second node can be P1
  • the first node can be P1
  • the second node can be P2, etc.
  • "First” and "Second" are only used to distinguish different nodes.
  • the target message may include data for normal communication between nodes.
  • each node may include a server and two clients, where the server can be used to receive target messages and can also be used to send heartbeat packets; the client can be used to send The target message can also be used to receive heartbeat packets.
  • the second node in the process of executing MPC OP, may send a target message to the first node.
  • S22 The second node judges whether the information indicating that the target message is successfully received from the first node is received within a preset second timeout period.
  • the preset second timeout time is a preset time, which can be used to determine whether it is timeout.
  • each node may preset a timeout period, such as 2s, 5s, etc., before each time it receives or sends information.
  • information reception or transmission is synchronous and non-blocking.
  • the pre-set timeout time for the same node each time it receives or sends information can be the same or different. Different nodes can set the timeout time before each time they receive or send information.
  • the timeout period can be the same or different. It can be set according to the actual scenario. The manual does not limit this. Among them, the setting of the timeout period can be realized by a timer or a timer.
  • the client in the second node can set a timeout period in advance before sending the information, and then send data, and determine whether it receives the message from the first node within the timeout period, which indicates that it has successfully received the target message. information. It should be noted that after the first node receives the target message sent by the second node, it will send to the second node information indicating the successful reception of the target message, where the information indicating the successful reception of the target message can be represented by characters, numbers, etc. . For example, in 3PC, the first node is P0 and the second node is P1.
  • the client included in P1 Before sending information, the client included in P1 can first set the timeout period T1, and then send data, and judge whether P0 is received in T1 The information returned by the server indicating the successful reception of the target message. For another example, in 3PC, the first node is P1, and the second node is P2. Before sending information, the client included in P2 can first set the timeout period T2, and then send data, and judge whether P1 is received within T2 The information returned by the server to indicate that the target message was successfully received.
  • the node can provide a guarantee for subsequent detection of network interruption by pre-setting a timeout period before sending and receiving data.
  • the heartbeat packet refers to a custom command word between the client and the server to notify the other party of their own status at regular intervals, which is similar to the heartbeat, so it is called the heartbeat packet.
  • the heartbeat packet can be mainly used to detect whether the connection between nodes is interrupted (may be referred to as "heartbeat detection"). It should be noted that this manual does not limit the specific content included in the heartbeat package.
  • the heartbeat packet is generally a very small packet, or an empty packet containing only the header.
  • the reason for not receiving the target message within the preset timeout period indicates that the target message was successfully received.
  • the information in the message does not indicate that the connection between the nodes has been interrupted.
  • the second node may send to the first node when it determines that it has not received the information indicating that the target message has been successfully received from the first node within the preset second timeout period.
  • the heartbeat packet is used to detect whether the connection between the first node and the second node is interrupted. For example, in some implementation scenarios, when the transmission and reception times out, the timeout party may initiate a PING message and receive a PONG message in response to the peer to perform heartbeat detection.
  • timeout party initiates a PING message and receives a PONG message from the peer end, it indicates that the heartbeat detection is successful and the nodes can communicate normally; if the timeout party initiates a PING message but does not receive a PONG message from the peer end, it indicates that the heartbeat detection has failed. .
  • the sending a heartbeat packet to the first node may include: periodically sending a heartbeat packet to the first node.
  • the period of sending the heartbeat packet can be set according to the actual scenario, which is not limited in this specification.
  • the first node is P0 and the second node is P1.
  • P1 does not receive the information returned by P0 within T1 indicating the success of receiving the target message, it can send a heartbeat detection to P0 every T2 time.
  • each time before sending a heartbeat packet to the first node May include: detecting whether the information indicating the successful reception of the target message is received, and when it is determined that it has not been received, sending a heartbeat packet to the first node.
  • the second node determines that it receives the information that indicates that the first node has successfully received the target message from the first node within the preset second timeout period, or receives the information before sending a heartbeat packet to the second node.
  • the first node is P0 and the second node is P1.
  • P2 does not receive the information that P0 sends to indicate the success of receiving the target message in T1
  • it can send a heartbeat detection to P0 every T2 time.
  • the process of sending a heartbeat packet by the second node to the first node is similar to the process of sending a heartbeat packet by the first node to the second node, and similarities can be referred to each other, and this will not be repeated.
  • S26 Detect whether the number of sending heartbeat packets is greater than a second preset number, and when it is determined that it is greater than the second preset number and the information indicating that the target message is successfully received is not received, the third connection with the first node is closed.
  • the second preset number of times can be set according to the actual scenario, such as 5 times, 10 times, etc.
  • the preset number of sending heartbeat packets can be mainly used to prevent the other party from not responding in time due to busyness in a short period of time, or network delays, etc.
  • the third connection with the first node can be understood as a communication link between the second node and the first node, such as a communication link between a client in the second node and a server in the first node.
  • the second node before sending a heartbeat packet, may pre-set the maximum number of heartbeat packets sent, so as to detect whether the number of heartbeat packets sent is greater than the maximum number of heartbeat packets sent. Information about the successful reception of the target message.
  • the local (socket) can be closed, that is, the third connection with the first node can be closed, and resources can be released. For example, if the maximum number of times of sending heartbeat packets is preset to N, the second node can detect whether the number of times it has sent heartbeat packets is greater than N.
  • the second node may continue to send heartbeat packets to the first node until the number of times of sending heartbeat packets is greater than N.
  • the third connection with the first node is closed.
  • S28 Send a connection re-establishment request to the first node.
  • the second node may send a request to reestablish the connection to the first node, so as to re-send the target message to the first node.
  • the request to re-establish the connection to the first node may be initiated by the client included in the second node.
  • S30 Determine whether the fourth connection with the first node is successfully re-established based on the second preset successful re-establishment condition.
  • the second preset re-establishment success condition includes receiving the response information of the first node to the re-connection request within the second preset request times.
  • the second preset number of requests refers to the number of times that the second node sends a connection reestablishment request to the first node, which can be set according to actual scenarios, which is not limited in this specification.
  • the response information can be understood as the information returned by the first node to the second node after receiving the request sent by the second node. For example, it can be response information indicating that the request has been received.
  • the response information can include characters, numbers, and so on.
  • the fourth connection with the first node may be understood as a communication link between the second node and the first node, such as a re-established communication link between the client in the second node and the server in the first node.
  • the determining whether the fourth connection with the first node is successfully re-established based on the second preset re-establishment success condition may include: determining whether the re-connection request is sent to the first node. Whether the response information of the first node to the connection re-establishment request is received within the second preset time; if it is received, it is determined that the fourth connection with the first node is successfully re-established; otherwise, it is judged to send to the first node Whether the number of times of sending reconnection requests is less than the second preset number of requests; when it is determined that it is less than the second preset number of requests, re-send the request for re-connection to the first node; correspondingly, based on the second preset re-establishment success Condition, determining whether the fourth connection with the first node is successfully re-established.
  • the second preset time can be understood as a preset reconstruction timeout time, which can be set according to the
  • the number of re-establishment requests N1 and each re-establishment timeout period T3 can be preset, and then the request to re-establish the connection is sent to the first node, and it is determined whether it is within T3.
  • the response message returned by the first node is received. If it is received, it means that the connection is successfully reestablished.
  • the response information returned by the first node is not received in T3, it can be judged whether the number of times of sending the request to reestablish the connection is less than N1.
  • the request to re-establish the connection can be re-sent, and it can be judged whether Whether the response information returned by the first node is received in T3, if it is received, it means that the connection is reestablished successfully, if it is not received, then re-determine whether the number of times of sending the request to re-establish the connection is less than N1, and so on, until the request to re-establish the connection is sent When the number of times is equal to N1, and the response message returned by the first node is not received within T3, it indicates that the connection reestablishment fails.
  • the second node when the connection is successfully re-established, may resend the target message to the first node. In another embodiment of the present specification, when the reconnection fails, the second node can release node resources, thereby reducing resource waste and improving processing efficiency.
  • idle detection may also be performed.
  • Idle detection can detect the communication link between nodes when the network is idle. If the line is detected to be interrupted, the connection can be established in advance, and there is no need to wait for the link to be rebuilt when the link is actually used, which can improve the processing efficiency of disconnection and reconnection. For example, for an MPC OP, if the input data is very large, its local calculation also takes time. In this way, the network is idle during the local calculation period. At this time, some tests can be done. If the line is interrupted, The connection can be rebuilt in advance, instead of waiting until the link is actually used. Idle detection can be that the client in one node actively sends a heartbeat packet to the server in another node for detection.
  • Idle detection can be performed after each successful transmission and reception.
  • the second node after the connection is successfully re-established and the second node sends the target message to the sending first node, it may further include: recording the second time corresponding to the successful sending of the target message; based on the second time After the second preset idle time in the, send an idle detection heartbeat packet to the first node.
  • the second time can be used to indicate the time corresponding to the system when the target message is successfully sent.
  • the second preset idle time may be the time period from the time corresponding to the system when the target message is successfully sent to the time T0 elapses, and T0 may be set according to actual scenarios.
  • the second preset idle time is preset as T0, and the timing starts after the second node successfully sends the target message to the sending node.
  • the client in the second node can take the initiative Send a heartbeat packet to the server of the first node to determine whether the connection between the second node and the first node is still alive, and then decide whether to reconnect.
  • the reconnection mechanism is used to re-establish the communication connection between nodes, which can ensure the normal operation of calculations, reduce calculation data errors, and reduce resource waste when there are unstable network nodes or malicious nodes intervening in the network. .
  • the interaction between P0 and P1 in the three-party calculation in FIG. 1 is taken as an example for description, where the P0 server receives the message sent by the P1 client.
  • the description is described by taking the receiving side of the P0 terminal, which may include the following steps.
  • the timeout period T1 may be set first, so that it can be subsequently judged whether the data reception is overtime according to the timeout period.
  • T1 after the timeout period T1 is set, data can be received, and it is determined whether the target data is received within T1.
  • the heartbeat detection can be further used to determine whether the communication link has been interrupted.
  • the heartbeat packet can be sent to P1 every T2 time. Among them, before each heartbeat packet is sent, it can be detected whether the target data has been received. If the target data is received, the heartbeat detection will be cancelled and the normal processing flow will be entered. If the target data is not received, proceed to step (4).
  • step ( 5) If it is less than N, return to step (3) to execute.
  • N heartbeat detections when N heartbeat detections fail, it indicates that the communication link between P1 and P0 has been interrupted. At this time, the connection can be closed and the connection can be reestablished.
  • the number of reconnection requests may be preset to N3 and the timeout period of each request to T3.
  • the P0 node can send a request to reestablish the connection to the P1 node. If the number of reconnection requests is less than N3 and the request time is less than T3, the response information returned by P1 is received, indicating that the reconnection is successful. At this time, P0 The target data can be received again. If the reconnection request time is greater than T3 and no response from P1 is received, at this time, it can be judged whether the number of reconnection requests is greater than N3.
  • N3 If it is greater than N3, it means that the conditions for reconnection are not met, the reconnection fails, and the resources are released; if If it is less than N3, you can re-send a connection re-establishment request to P1 at this time, and determine whether the response returned by P1 is received within the time T3 of the re-connection request.
  • the client of P0 can actively send a heartbeat packet to the server of P1 for idle detection, so as to determine the connection between P0 and P1 after the preset time Whether it is still alive, so as to improve the processing efficiency of disconnection and reconnection.
  • each node can include (N-1) clients.
  • one or more embodiments of this specification also provide a data processing device for realizing disconnection and reconnection.
  • the described devices may include systems (including distributed systems), software (applications), modules, components, servers, clients, etc., which use the methods described in the embodiments of this specification, combined with necessary implementation hardware devices.
  • the devices in one or more embodiments provided in the embodiments of this specification are as described in the following embodiments. Since the implementation scheme of the device to solve the problem is similar to the method, the implementation of the specific device in the embodiment of this specification can refer to the implementation of the foregoing method, and the repetition will not be repeated.
  • unit or “module” can be a combination of software and/or hardware that implements a predetermined function.
  • the devices described in the following embodiments are preferably implemented by software, implementation by hardware or a combination of software and hardware is also possible and conceived.
  • FIG. 5 is a schematic diagram of the module structure of an embodiment of a data processing device that realizes disconnection and reconnection provided in this specification. As shown in FIG. 5, this specification provides a data processing that realizes disconnection and reconnection.
  • the device is executed by multiple nodes, and may include: a first judgment module 120, a first sending module 122, a first detection module 124, a first request module 126, a first determination module 128, and a first receiving module 130.
  • the first determining module 120 may be used for a first node among the plurality of nodes to determine whether a target message sent by a second node among the plurality of nodes is received within a preset first timeout period;
  • the first sending module 122 may be used to send a heartbeat packet to the second node when it is determined that it has not been received;
  • the first detection module 124 may be used to detect whether the number of sending heartbeat packets is greater than a first preset number of times, and when it is determined that it is greater than the first preset number of times and the target message is not received, shutting down the first connection with the second node. connect;
  • the first request module 126 may be used to send a request to reestablish a connection to the second node
  • the first determining module 128 may be configured to determine whether the second connection with the second node is successfully re-established based on the first preset successful re-establishment condition;
  • the first receiving module 130 may be configured to receive the target message sent by the second node when it is determined that the reconstruction is successful.
  • FIG. 6 is another method provided in this specification for realizing disconnection and reconnection.
  • the second sending module 140 may be used to send a target message from the second node among the plurality of nodes to the first node among the plurality of nodes;
  • the second judgment module 142 may be used for the second node to judge whether the information indicating that the target message is successfully received from the first node is received within the preset second timeout period;
  • the third sending module 144 may be used to send a heartbeat packet to the first node when it is determined that it has not been received;
  • the second detection module 146 may be used to detect whether the number of sending heartbeat packets is greater than a second preset number, and when it is determined that it is greater than the second preset number and the information indicating that the target message is successfully received is not received, close the connection with the The third connection of a node;
  • the second request module 148 may be used to send a connection re-establishment request to the first node
  • the second determining module 150 may be configured to determine whether the fourth connection with the first node is successfully re-established based on the second preset re-establishment success condition;
  • the fourth sending module 152 may be used to send the target message to the first node when it is determined that the reconstruction is successful.
  • This manual provides a data processing device that realizes disconnection and reconnection.
  • MPC massive machine type communication
  • the judgment of the network interruption between the nodes can be quickly realized, which can improve the network interruption.
  • the processing efficiency When the network is determined to be interrupted, the reconnection mechanism is used to re-establish the communication connection between nodes, which can ensure the normal operation of calculations, reduce calculation data errors, and reduce resource waste when there are unstable network nodes or malicious nodes intervening in the network. .
  • the above-mentioned device may also include other implementation manners according to the description of the method embodiment, and for the specific implementation manner, refer to the description of the related method embodiment, which is not repeated here.
  • This specification also provides an embodiment of a data processing device that realizes disconnection and reconnection, including a processor and a memory for storing executable instructions of the processor.
  • the implementation includes the following steps:
  • the first node among the plurality of nodes determines whether the target message sent by the second node among the plurality of nodes is received within a preset first timeout period
  • This specification also provides an embodiment of a data processing device that realizes disconnection and reconnection, including a processor and a memory for storing executable instructions of the processor.
  • the implementation includes the following steps:
  • the second node among the plurality of nodes sends a target message to the first node among the plurality of nodes
  • the second node judges whether the information indicating that the target message is successfully received from the first node is received within a preset second timeout period
  • the target message is sent to the first node.
  • the above-mentioned device may also include other implementation manners according to the description of the method or device embodiment, such as an implementation manner of performing idle detection after receiving and sending, and determining whether the reconstruction is successful according to a preset reconstruction success condition, and so on.
  • implementation manners for specific implementation manners, reference may be made to the description of the related method embodiments, which will not be repeated here.
  • This specification also provides an embodiment of a data processing system that realizes disconnection and reconnection, including at least one processor and a memory storing computer-executable instructions.
  • the processor executes the instructions, any one or more of the above implementations are implemented.
  • the steps of the method in the example include, for example: the second node among the plurality of nodes sends a target message to the first node among the plurality of nodes; the second node determines whether the message is received within a preset second timeout period The information sent by the first node indicating that the target message is successfully received; when it is determined that it has not been received, a heartbeat packet is sent to the first node; it is detected whether the number of times the heartbeat packet is sent is greater than a second preset number of times, and it is determined that it is greater than the second preset When the number of times and the information indicating that the target message is successfully received is not received, close the third connection with the first node; send a request to reestablish the connection to the first no
  • FIG. 7 is a hardware structural block diagram of an embodiment of a data processing server that realizes disconnection and reconnection provided in this specification.
  • the server may be the one that realizes disconnection and reconnection in the above-mentioned embodiment.
  • the server 10 may include one or more (only one is shown in the figure) processor 100 (the processor 100 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA), The memory 200 for storing data, and the transmission module 300 for communication functions.
  • processor 100 may include, but is not limited to, a processing device such as a microprocessor MCU or a programmable logic device FPGA
  • the memory 200 for storing data
  • the transmission module 300 for communication functions.
  • FIG. 7 is only for illustration, and does not limit the structure of the above electronic device.
  • the server 10 may also include more or fewer components than shown in FIG. 7, for example, may also include other processing hardware, such as a database or multi-level cache, GPU, or have a configuration different from that shown in FIG. 7.
  • the memory 200 can be used to store software programs and modules of application software, such as the program instructions/modules corresponding to the data processing method for implementing disconnection and reconnection in the embodiments of this specification.
  • the processor 100 runs the software programs and modules stored in the memory 200 and Module to perform various functional applications and data processing.
  • the memory 200 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory.
  • the memory 200 may further include a memory remotely provided with respect to the processor 100, and these remote memories may be connected to a computer terminal through a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
  • the transmission module 300 is used to receive or send data via a network.
  • the above-mentioned specific examples of the network may include a wireless network provided by a communication provider of a computer terminal.
  • the transmission module 300 includes a network adapter (Network Interface Controller, NIC), which can be connected to other network devices through a base station so as to communicate with the Internet.
  • the transmission module 300 may be a radio frequency (RF) module, which is used to communicate with the Internet in a wireless manner.
  • RF radio frequency
  • the methods or devices described in the above embodiments provided in this specification can implement business logic through computer programs and are recorded on a storage medium, and the storage medium can be read and executed by a computer to achieve the effects of the solutions described in the embodiments of this specification.
  • the storage medium may include a physical device for storing information, and the information is usually digitized and then stored in an electric, magnetic, or optical medium.
  • the storage medium may include: devices that use electrical energy to store information, such as various types of memory, such as RAM, ROM, etc.; devices that use magnetic energy to store information, such as hard disks, floppy disks, magnetic tapes, magnetic core memory, bubble memory, U disk; a device that uses optical methods to store information, such as a CD or DVD.
  • devices that use electrical energy to store information such as various types of memory, such as RAM, ROM, etc.
  • devices that use magnetic energy to store information such as hard disks, floppy disks, magnetic tapes, magnetic core memory, bubble memory, U disk
  • a device that uses optical methods to store information such as a CD or DVD.
  • quantum memory graphene memory, and so on.
  • the above-mentioned data processing method or device embodiments for realizing disconnection and reconnection provided in this specification can be realized by the processor executing the corresponding program instructions in the computer, such as using the c++ language of the windows operating system to realize on the PC side or the linux system. Or other implementations such as using android and iOS system programming languages in smart terminals, and implementation of processing logic based on quantum computers, etc.
  • the device, computer storage medium, and system described above in the specification may also include other implementation manners according to the description of the related method embodiments.
  • specific implementation manners please refer to the description of the corresponding method embodiments, which will not be repeated here. .
  • the controller can be implemented in any suitable manner.
  • the controller can take the form of, for example, a microprocessor or a processor and a computer-readable medium storing computer-readable program codes (such as software or firmware) executable by the (micro)processor. , Logic gates, switches, application specific integrated circuits.
  • the controller can be regarded as a hardware component, and the devices included in it for realizing various functions can also be regarded as a structure within the hardware component. Or even, the device for realizing various functions can be regarded as both a software module for realizing the method and a structure within a hardware component.
  • the present invention is described with reference to flowcharts and/or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that it can be implemented by computer program instructions, and these computer program instructions can be provided to the processor of a general-purpose computer, special-purpose computer, embedded processor or other programmable data processing equipment to generate a machine, so that the computer or other programmable data processing equipment The instructions executed by the processor generate a device for implementing the specified function.
  • These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing equipment to work in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture including the instruction device.
  • the device implements the functions specified in one process or multiple processes in the flowchart and/or one block or multiple blocks in the block diagram.
  • one or more embodiments of this specification can be provided as a method, a system, or a computer program product. Therefore, one or more embodiments of this specification may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, one or more embodiments of this specification may adopt computer programs implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes. The form of the product.
  • computer-usable storage media including but not limited to disk storage, CD-ROM, optical storage, etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Mobile Radio Communication Systems (AREA)

Abstract

本说明书提供了一种实现断线重连的数据处理方法、装置、设备及系统。所述方法由多个节点共同执行,包括:第一节点判断在预设第一超时时间内是否收到第二节点发送的目标消息;确定没有收到时,向所述第二节点发送心跳包;检测发送心跳包的次数是否大于第一预设次数,确定大于第一预设次数且没有收到所述目标消息时,关闭与所述第二节点的第一连接;向所述第二节点发送重建连接的请求;基于第一预设重建成功条件,确定与所述第二节点的第二连接是否重建成功;确定重建成功时,接收所述第二节点发送的所述目标消息。利用本说明书实施例可以有效解决安全多方计算过程中各个节点间网络中断的问题,从而保证计算正常运行的同时,减少资源浪费。

Description

一种实现断线重连的数据处理方法、装置、设备及系统 技术领域
本申请涉及网络通信技术领域,特别涉及一种实现断线重连的数据处理方法、装置、设备及系统。
背景技术
大数据时代,海量数据的交叉计算可以为科研、医疗、金融等提供更好支持。许多企业或组织出于信息安全或利益的考虑,内部数据不对外开放,使得数据的价值无法体现。MPC(Secure Multi-Party Compute,安全多方计算)的提出为解决这一难题提供了保障。
MPC的运行模式是多方共同执行同一程序。例如,三方计算时,三个节点中的各个节点都会启动同一程序一起运行。这样,在MPC的执行过程中,就存在各个节点与其他节点之间的交互。然而,在交互过程中,参与MPC的计算节点中可能存在网络不稳定(如弱网环境等)的节点,甚至是恶意节点对网络进行干预(如在执行过程中拔掉网线等),从而造成计算过程中的网络异常(如抖动、延迟、中断等),甚至导致计算的数据出错。目前,当MPC执行过程中出现网络中断时,大部分是不进行处理、简单的退出,或者是无穷的等待,可能会导致资源浪费或计算出错。
因此,业内亟需一种可以有效解决MPC执行过程中网络中断的解决方案。
发明内容
本说明书实施例提供了一种实现断线重连的数据处理方法、装置、设备及系统,可以有效解决安全多方计算过程中各个节点间网络中断的问题,从而保证计算正常运行的同时,减少资源浪费。
本说明书提供的实现断线重连的数据处理方法、装置、设备及系统是包括以下方式实现的:
一种实现断线重连的数据处理方法,由多个节点共同执行,所述方法包括:
所述多个节点中第一节点判断在预设第一超时时间内是否收到所述多个节点中第二节点发送的目标消息;
确定没有收到时,向所述第二节点发送心跳包;
检测发送心跳包的次数是否大于第一预设次数,确定大于第一预设次数且没有收到所 述目标消息时,关闭与所述第二节点的第一连接;
向所述第二节点发送重建连接的请求;
基于第一预设重建成功条件,确定与所述第二节点的第二连接是否重建成功;
确定重建成功时,接收所述第二节点发送的所述目标消息。
一种实现断线重连的数据处理方法,由多个节点共同执行,所述方法包括:
所述多个节点中第二节点向所述多个节点中第一节点发送目标消息;
所述第二节点判断在预设第二超时时间内是否收到所述第一节点发送的表示成功接收目标消息的信息;
确定没有收到时,向所述第一节点发送心跳包;
检测发送心跳包的次数是否大于第二预设次数,确定大于第二预设次数且没有收到所述表示成功接收目标消息的信息时,关闭与所述第一节点的第三连接;
向所述第一节点发送重建连接的请求;
基于第二预设重建成功条件,确定与所述第一节点的第四连接是否重建成功;
确定重建成功时,向所述第一节点发送所述目标消息。
一种实现断线重连的数据处理装置,由多个节点共同执行,所述装置包括:
第一判断模块,用于所述多个节点中第一节点判断在预设第一超时时间内是否收到所述多个节点中第二节点发送的目标消息;
第一发送模块,用于确定没有收到时,向所述第二节点发送心跳包;
第一检测模块,用于检测发送心跳包的次数是否大于第一预设次数,确定大于第一预设次数且没有收到所述目标消息时,关闭与所述第二节点的第一连接;
第一请求模块,用于向所述第二节点发送重建连接的请求;
第一确定模块,用于基于第一预设重建成功条件,确定与所述第二节点的第二连接是否重建成功;
第一接收模块,用于确定重建成功时,接收所述第二节点发送的所述目标消息。
一种实现断线重连的数据处理装置,由多个节点共同执行,所述装置包括:
第二发送模块,用于所述多个节点中第二节点向所述多个节点中第一节点发送目标消息;
第二判断模块,用于所述第二节点判断在预设第二超时时间内是否收到所述第一节点发送的表示成功接收目标消息的信息;
第三发送模块,用于确定没有收到时,向所述第一节点发送心跳包;
第二检测模块,用于检测发送心跳包的次数是否大于第二预设次数,确定大于第二预设次数且没有收到所述表示成功接收目标消息的信息时,关闭与所述第一节点的第三连接;
第二请求模块,用于向所述第一节点发送重建连接的请求;
第二确定模块,用于基于第二预设重建成功条件,确定与所述第一节点的第四连接是否重建成功;
第四发送模块,用于确定重建成功时,向所述第一节点发送所述目标消息。
一种实现断线重连的数据处理设备,包括处理器及用于存储处理器可执行指令的存储器,所述指令被所述处理器执行时实现包括以下步骤:
多个节点中第一节点判断在预设第一超时时间内是否收到所述多个节点中第二节点发送的目标消息;
确定没有收到时,向所述第二节点发送心跳包;
检测发送心跳包的次数是否大于第一预设次数,确定大于第一预设次数且没有收到所述目标消息时,关闭与所述第二节点的第一连接;
向所述第二节点发送重建连接的请求;
基于第一预设重建成功条件,确定与所述第二节点的第二连接是否重建成功;
确定重建成功时,接收所述第二节点发送的所述目标消息。
一种实现断线重连的数据处理设备,包括处理器及用于存储处理器可执行指令的存储器,所述指令被所述处理器执行时实现包括以下步骤:
多个节点中第二节点向所述多个节点中第一节点发送目标消息;
所述第二节点判断在预设第二超时时间内是否收到所述第一节点发送的表示成功接收目标消息的信息;
确定没有收到时,向所述第一节点发送心跳包;
检测发送心跳包的次数是否大于第二预设次数,确定大于第二预设次数且没有收到所述表示成功接收目标消息的信息时,关闭与所述第一节点的第三连接;
向所述第一节点发送重建连接的请求;
基于第二预设重建成功条件,确定与所述第一节点的第四连接是否重建成功;
确定重建成功时,向所述第一节点发送所述目标消息。
一种实现断线重连的数据处理系统,包括至少一个处理器以及存储计算机可执行指令的存储器,所述处理器执行所述指令时实现本说明书实施例中任意一个方法实施例方法的步骤。
本说明书提供的一种实现断线重连的数据处理方法、装置、设备及系统。一些实施例中在MPC执行过程中,通过对节点间通信进行超时检测、心跳检测,可以快速实现对节点间网络中断的判断,从而可以提高对网络中断的处理效率。在确定网络中断情况下,通过重连机制重新建立节点间的通信连接,可以在安全多方计算过程中存在网络不稳定节点或者恶意节点对网络进行干预时,保证计算正常运行、减少计算数据出错的同时,减少资源浪费。采用本说明书提供的实施方案,可以有效解决安全多方计算过程中各个节点间网络中断的问题,从而保证计算正常运行的同时,减少资源浪费。
附图说明
此处所说明的附图用来提供对本说明书的进一步理解,构成本说明书的一部分,并不构成对本说明书的限定。在附图中:
图1是本说明书提供的三方计算中节点之间交互的一个实施例的流程示意图;
图2是本说明书提供的实现断线重连的数据处理方法的一个实施例的流程示意图;
图3是本说明书提供的实现断线重连的数据处理方法的另一个实施例的流程示意图;
图4是本说明书提供的实现断线重连的数据处理方法的一个具体实施例的流程示意图;
图5是本说明书提供的一种实现断线重连的数据处理装置的一个实施例的模块结构示意图;
图6是本说明书提供的另一种实现断线重连的数据处理装置的一个实施例的模块结构示意图;
图7是本说明书提供的一种实现断线重连的数据处理服务器的一个实施例的硬件结构框图。
具体实施方式
为了使本技术领域的人员更好地理解本说明书中的技术方案,下面将结合本说明书实施例中的附图,对本说明书实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本说明书中的一部分实施例,而不是全部的实施例。基于本说明书中的一个或多个实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都应当属于本说明书实施例保护的范围。
MPC是解决一组互不信任的参与方之间保护隐私的协同计算问题。其可以抽象理解为:各个参与方分别拥有各自的私有数据,在不泄漏各自私有数据的情况下,计算公共函数, 且在整个函数计算完成时,各个参与方只知道计算结果,并不知道其他参与方的数据以及计算过程的中间数据。
现有技术中基于C/S(Client/Server、客户机/服务器)、B/S(Browser/Server,浏览器/服务器)等的应用中基本都会支持断线重连机制,但其只适用于两方之间的交互,如客户机与服务器、浏览器与服务器等,并不适用于多方同时执行同一程序过程中,如MPC OP的执行过程中。这样,当参与MPC的计算节点中存在网络不稳定(弱网环境)的节点,甚至是恶意节点对网络进行干预(如在执行过程中拔掉网线等)时,就可能会造成计算过程中的网络异常(抖动、延迟、中断等),甚至导致计算的数据出错。为此,本说明书提供一种实现断线重连的数据处理方法,其可以适用于多方同时执行同一程序,从而可以有效解决安全多方计算过程中各个节点间网络中断的问题。
由于MPC OP执行过程中,各方之间对断线重连的数据处理过程均是一致的。为了便于理解,本说明书实施例中以三方计算(简称“3PC”)中节点之间的交互为例进行说明,其它节点间的处理过程类似,对此不再赘述。如图1所示,P0、P1、P2表示参与计算的3个节点,节点间的通信方式可以采用传输控制协议(Transmission Control Protocol,TCP)长连接,此处可以建立3个通信信道。MPC OP的过程涉及到节点之间的两两交互,每个节点可以包括一个服务端和两个客户端,用于MPC OP之间的交互。其中,OP为Operation的缩写,表示一个算子,比如矩阵乘法、矩阵减法等。MPC OP表示在MPC执行过程中,多方同时执行同一个安全多方计算算子。TCP是全双工(双向收发)的,即一条通信信道上可以进行接收也可以进行发送。
一些实施场景中,在执行MPC OP的过程中,节点间交互时会存在大量的本地计算与网络通信(即网络IO的读与写),使得在发送(写)、接收(读)的过程中可能存在断连的情况。本说明书提供一种实现断线重连的数据处理方法,可以有效解决安全多方计算过程中各个节点间网络中断的问题,从而保证计算正常运行的同时,减少资源浪费。
下面以一个具体的应用场景为例对本说明书实施方案进行说明。具体的,图2是本说明书提供的实现断线重连的数据处理方法的一个实施例的流程示意图。虽然本说明书提供了如下述实施例或附图所示的方法操作步骤或装置结构,但基于常规或者无需创造性的劳动在所述方法或装置中可以包括更多或者部分合并后更少的操作步骤或模块单元。在逻辑性上不存在必要因果关系的步骤或结构中,这些步骤的执行顺序或装置的模块结构不限于本说明书实施例或附图所示的执行顺序或模块结构。所述的方法或模块结构的在实际中的装置、服务器或终端产品应用时,可以按照实施例或者附图所示的方法或模块结构进行顺 序执行或者并行执行(例如并行处理器或者多线程处理的环境、甚至包括分布式处理、服务器集群的实施环境)。
需要说明的是,下述实施例描述并不对基于本说明书的其他可扩展到的应用场景中的技术方案构成限制。具体的一种实施例如图2所示,本说明书提供的一种实现断线重连的数据处理方法的一种实施例中,所述方法可以包括以下步骤。
S0:所述多个节点中第一节点判断在预设第一超时时间内是否收到所述多个节点中第二节点发送的目标消息。
其中,第一节点、第二节点可以是多个节点中的任意两个进行交互的节点,如,在3PC中,第一节点可以为P0,第二节点可以为P1,或者第一节点可以为P1,第二节点可以为P2等。“第一”、“第二”只是用于区别不同节点。预设第一超时时间是预先设置的时间,可以用于判断是否超时。本说明书一个实施例中,每个节点可以在每一次接收或发送信息前,可以预先设置一个超时时间,如2s、5s等。需要说明的是,本说明书实施例中,信息接收或发送是同步非阻塞的。同一节点在每一次接收或发送信息前预先设置超时时间可以相同,也可以不同,不同节点在每一次接收或发送信息前预先设置超时时间可以相同,也可以不同,具体可以根据实际场景设置,本说明书对此不作限定。其中,超时时间的设定可以通过定时器或计时器等实现。目标消息可以包括节点间进行正常通信的数据。
本说明书一个实施例中,每个节点可以包括一个服务端和两个客户端,其中,所述服务端可以用于接收目标消息,还可以用于发送心跳包;所述客户端可以用于发送目标消息,还可以用于接收心跳包。
本说明书一个实施例中,第一节点中服务端在接收信息前,可以预先设置一个超时时间,然后进行数据接收,并判断在超时时间内是否收到第二节点中客户端发送的目标消息。例如,在3PC中,第一节点为P0,第二节点为P1,P0包括的服务端在接收信息前,可以先设置超时时间T1,然后进行数据接收,并判断在T1内是否收到P1中客户端发送的目标消息。再如,在3PC中,第一节点为P1,第二节点为P2,P1包括的服务端在接收信息前,可以先设置超时时间T2,然后进行数据接收,并判断在T2内是否收到P2中客户端发送的目标消息。
本说明书实施例中,节点在收发数据前,通过预先设置超时时间,可以为后续检测网络中断提供保障。
S2:确定没有收到时,向所述第二节点发送心跳包。
其中,心跳包是指在客户端和服务器间定时通知对方自己状态的一个自定义的命令字, 按照一定的时间间隔发送,类似于心跳,所以叫做心跳包。心跳包主要可以用于检测节点间连接是否中断(可以简称“心跳检测”)。需要说明的是,本说明书对心跳包中具体包括哪些内容不作限定。一些实施场景中,心跳包一般是很小的包,或者只包含包头的一个空包。
由于第一节点确定在预设第一超时时间内没有收到第二节点发送的目标消息的原因可能是网络延迟导致,所以在预设超时时间内没有收到目标消息并不能说明节点间的连接已经中断。
为了检测节点间连接是否中断,本说明书一个实施例中,第一节点确定在预设第一超时时间内没有收到第二节点发送的目标消息时,可以向第二节点发送心跳包来检测第一节点与第二节点间的连接是否中断。其中,向第二节点发送心跳包可以是第一节点包括的服务端发送,也可以是第一节点包括的客户端发送。例如一些实施场景中,在收发超时时,可以由超时方发起PING消息并接收对端响应的PONG消息进行心跳检测。如果超时方发起PING消息后,接收到对端响应的PONG消息,说明心跳检测成功,节点间可以正常通信;如果超时方发起PING消息后,没有接收到对端响应的PONG消息,说明心跳检测失败。
本说明书一个实施例中,所述向所述第二节点发送心跳包,可以包括:周期性的向所述第二节点发送心跳包。其中,发送心跳包的周期可以根据实际场景设定,本说明书对此不作限定。例如,在3PC中,第一节点为P0,第二节点为P1,P0在T1内没有收到P1发送的目标消息时,可以每隔T2时间向P1发送一次心跳检测。
由于可能是网络延迟导致第一节点在预设超时时间内没有收到目标消息,所以,本说明书一个实施例中,每次向第二节点发送心跳包前,可以包括:检测是否收到所述目标消息;确定未收到时,向所述第二节点发送心跳包。本说明书一个实施例中,如果第一节点确定在预设第一超时时间内收到第二节点发送的目标消息,或者每次向第二节点发送心跳包前收到目标消息,则可以说明第一节点与第二节点间可以进行正常通信,不需要进行心跳检测,从而可以减少资源浪费。例如,在3PC中,第一节点为P0,第二节点为P1,P0在T1内没有收到P1发送的目标消息时,可以每隔T2时间向P1发送一次心跳检测,在每隔T2向P1发送心跳包前可以先检测是否收到目标消息,如果收到,则说明P0和P1间在超时时间内有正常通信,停止向P1发送心跳包。如果每隔T2向P1发送心跳包前没有收到目标消息,则可以向P1继续发送心跳检测,直至发送心跳包的次数大于第一预设次数。
S4:检测发送心跳包的次数是否大于第一预设次数,确定大于第一预设次数且没有收 到所述目标消息时,关闭与所述第二节点的第一连接。
其中,第一预设次数可以根据实际场景进行设置,如可以是5次、10次等,预先设置发送心跳包次数主要可以用于防止由于对方短时间内繁忙没有及时返回应答、或网络延迟等造成的误判。与所述第二节点的第一连接可以理解为是第一节点与第二节点间的通信链路,如第一节点中服务端与第二节点中客户端之间的通信链路。
本说明书一个实施例中,在发送心跳包前,第一节点可以预先设定发送心跳包次数的最大值,以便检测发送心跳包的次数大于设定发送心跳包次数的最大值时是否收到目标消息。
本说明书一个实施例中,当检测到发送心跳包的次数大于设定发送心跳包次数的最大值还没有收到目标消息时,说明多次心跳检测均失败,第一节点与第二节点间的通信链路已经中断。此时,可以关闭本端(socket),即关闭与第二节点的第一连接,释放资源。例如,预先设定发送心跳包次数的最大值为N,第一节点可以检测自身发送心跳包的次数是否大于N,如果小于N且未收到目标消息,则第一节点可以继续向第二节点发送心跳包,直至发送心跳包的次数大于N未收到目标消息时,关闭与第二节点的第一连接。
S6:向所述第二节点发送重建连接的请求。
本说明书一个实施例中,第一节点关闭与第二节点的第一连接后,可以向第二节点发送重建连接的请求,以便重新接收第二节点发送的目标消息。其中,向第二节点发送重建连接请求的可以是第一节点包括的客户端发起的。
S8:基于第一预设重建成功条件,确定与所述第二节点的第二连接是否重建成功。
其中,所述第一预设重建成功条件可以包括在第一预设请求次数内收到所述第二节点对重建连接请求的响应信息。第一预设请求次数指第一节点向第二节点发送重建连接请求的次数,其可以根据实际场景进行设定,本说明书对此不作限定。响应信息可以理解为第二节点接收第一节点发送的请求后向第一节点返回的信息,如可以是表示收到请求的应答信息,该应答信息可以包括字符、数字等。与所述第二节点的第二连接可以理解为是第一节点与第二节点间的通信链路,如第一节点中服务端与第二节点中客户端之间重新建立的通信链路。
本说明书一个实施例中,所述基于第一预设重建成功条件,确定与所述第二节点的第二连接是否重建成功,可以包括:判断在向所述第二节点发送重建连接请求后的第一预设时间内是否收到所述第二节点对重建连接请求的响应信息;若收到,则确定与所述第二节点的第二连接重建成功;否则,判断向所述第二节点发送重建连接请求的次数是否小于第 一预设请求次数;确定小于所述第一预设请求次数时,重新向所述第二节点发送重建连接的请求;相应的,基于第一预设重建成功条件,确定与所述第二节点的第二连接是否重建成功。其中,第一预设时间可以理解为预先设置的重建超时时间,可以根据实际场景设定,对此不作限定。
例如一些实施场景中,在向第二节点发送重建连接的请求前,可以预先设置重建请求次数N1以及每次重建超时时间T3,然后向第二节点发送重建连接的请求,并判断在T3内是否收到第二节点返回的响应信息,若收到,则说明重建连接成功。一些实施场景中,若在T3内没有收到第二节点返回的响应信息,则可以判断发送重建连接的请求的次数是否小于N1,如果小于N1,则可以重新发送重建连接的请求,并判断在T3内是否收到第二节点返回的响应信息,若收到,则说明重建连接成功,若没收到,则重新判断发送重建连接的请求的次数是否小于N1,如此循环,直至发送重建连接的请求的次数等于N1,且在T3内没收到第二节点返回的响应信息时,说明重建连接失败。
S10:确定重建成功时,接收所述第二节点发送的所述目标消息。
本说明书一个实施例中,在重建连接成功时,第一节点可以重新接收第二节点发送的目标消息。本说明书另一个实施例中,在重建连接失败时,第一节点可以释放节点资源,从而减少资源浪费,提高处理效率。
本说明书一个实施例中,在第一节点成功接收目标消息后,还可以进行空闲检测。空闲检测可以在网络空闲时对节点间通信链路进行检测,如果检测到线路中断,可以提前建立连接,不需要等到真正使用链路时再重建,从而可以对提高断线重连的处理效率。例如,一个MPC OP,如果输入数据非常大,其本地计算也需要时间,这样在本地计算的这段时间内,其网络是空闲的,此时是可以做一些检测的,如果线路中断了,就可以提前重建连接,而不用等到真正使用链路时再来重建。空闲检测可以是一个节点中客户端主动向另一个节点中服务端发送心跳包进行检测。
空闲检测可以在每次收发成功后进行。本说明书一个实施例中,在重建连接成功,第一节点接收第二节点发送的目标消息后,还可以包括:记录成功接收所述目标消息时所对应的第一时间,并向所述第二节点发送表示成功接收目标消息的信息;基于所述第一时间的第一预设空闲时间后,向所述第二节点发送空闲检测心跳包。其中,第一时间可以用于表示成功接收目标消息时系统对应的时间。第一预设空闲时间可以是从成功接收目标消息时系统对应的时间开始计时到经过T0时间为止的时间段,T0可以根据实际场景进行设置。例如一些实施场景中,预先设定第一预设空闲时间为T0,则从第一节点成功接收第二节点 发送的目标消息后开始计时,经过T0时间后,第一节点中的客户端可以主动向第二节点的服务端发送心跳包,从而判断第一节点与第二节点间的连接是否还存活,进而决定是否要重连接。
本说明书实施例中,在MPC执行过程中,通过对节点间通信进行超时检测、心跳检测,可以快速实现对节点间网络中断的判断,从而可以提高对网络中断的处理效率。在确定网络中断情况下,通过重连机制重新建立节点间的通信连接,可以在存在网络不稳定节点或者恶意节点对网络进行干预时,保证计算正常运行、减少计算数据出错的同时,减少资源浪费。
上述实施例是从多个节点中第一节点一侧(接收端)进行描述说明,本说明书实施例中还提供一种实施例,其可以从多个节点中第二节点一侧(发送端)进行描述说明,具体的,如图3所示,一种实现断线重连的数据处理方法的一种实施例中,所述方法可以包括以下步骤。
S20:所述多个节点中第二节点向所述多个节点中第一节点发送目标消息。
其中,第一节点、第二节点可以是多个节点中的任意两个进行交互的节点,如,在3PC中,第一节点可以为P0,第二节点可以为P1,或者第一节点可以为P1,第二节点可以为P2等。“第一”、“第二”只是用于区别不同节点。目标消息可以包括节点间进行正常通信的数据。
本说明书一个实施例中,每个节点可以包括一个服务端和两个客户端,其中,所述服务端可以用于接收目标消息,还可以用于发送心跳包;所述客户端可以用于发送目标消息,还可以用于接收心跳包。
本说明书一个实施例中,在执行MPC OP的过程中,第二节点可以向第一节点发送目标消息。
S22:所述第二节点判断在预设第二超时时间内是否收到所述第一节点发送的表示成功接收目标消息的信息。
其中,预设第二超时时间是预先设置的时间,可以用于判断是否超时。本说明书一个实施例中,每个节点可以在每一次接收或发送信息前,可以预先设置一个超时时间,如2s、5s等。需要说明的是,本说明书实施例中,信息接收或发送是同步非阻塞的。同一节点在每一次接收或发送信息前预先设置超时时间可以相同,也可以不同,不同节点在每一次接收或发送信息前预先设置超时时间可以相同,也可以不同,具体可以根据实际场景设置,本说明书对此不作限定。其中,超时时间的设定可以通过定时器或计时器等实现。
本说明书一个实施例中,第二节点中客户端在发送信息前,可以预先设置一个超时时间,然后进行数据发送,并判断在超时时间内是否收到第一节点发送的表示成功接收目标消息的信息。需要说明的是,第一节点在接收到第二节点发送的目标消息后,会向第二节点发送表示成功接收目标消息的信息,其中,表示成功接收目标消息的信息可以通过字符、数字等表示。例如,在3PC中,第一节点为P0,第二节点为P1,P1包括的客户端在发送信息前,可以先设置超时时间T1,然后进行数据发送,并判断在T1内是否收到P0中服务端返回的表示成功接收目标消息的信息。再如,在3PC中,第一节点为P1,第二节点为P2,P2包括的客户端在发送信息前,可以先设置超时时间T2,然后进行数据发送,并判断在T2内是否收到P1中服务端返回的表示成功接收目标消息的信息。
本说明书实施例中,节点在收发数据前,通过预先设置超时时间,可以为后续检测网络中断提供保障。
S24:确定没有收到时,向所述第一节点发送心跳包。
其中,心跳包是指在客户端和服务器间定时通知对方自己状态的一个自定义的命令字,按照一定的时间间隔发送,类似于心跳,所以叫做心跳包。心跳包主要可以用于检测节点间连接是否中断(可以简称“心跳检测”)。需要说明的是,本说明书对心跳包中具体包括哪些内容不作限定。一些实施场景中,心跳包一般是很小的包,或者只包含包头的一个空包。
由于第二节点确定在预设第二超时时间内没有收到第一节点发送的表示成功接收目标消息的信息的原因可能是网络延迟导致,所以在预设超时时间内没有收到表示成功接收目标消息的信息并不能说明节点间的连接已经中断。
为了检测节点间连接是否中断,本说明书一个实施例中,第二节点确定在预设第二超时时间内没有收到第一节点发送的表示成功接收目标消息的信息时,可以向第一节点发送心跳包来检测第一节点与第二节点间的连接是否中断。例如一些实施场景中,在收发超时时,可以由超时方发起PING消息并接收对端响应的PONG消息进行心跳检测。如果超时方发起PING消息后,接收到对端响应的PONG消息,说明心跳检测成功,节点间可以正常通信;如果超时方发起PING消息后,没有接收到对端响应的PONG消息,说明心跳检测失败。
本说明书一个实施例中,所述向所述第一节点发送心跳包,可以包括:周期性的向所述第一节点发送心跳包。其中,发送心跳包的周期可以根据实际场景设定,本说明书对此不作限定。例如,在3PC中,第一节点为P0,第二节点为P1,P1在T1内没有收到P0返 回的表示接收目标消息成功的信息时,可以每隔T2时间向P0发送一次心跳检测。
由于可能是网络延迟导致第二节点在预设超时时间内没有收到表示第一节点接收目标消息成功的信息,所以,本说明书一个实施例中,每次向所述第一节点发送心跳包前,可以包括:检测是否收到所述表示成功接收目标消息的信息,确定未收到时,向所述第一节点发送心跳包。本说明书一个实施例中,如果第二节点确定在预设第二超时时间内收到第一节点发送的表示第一节点接收目标消息成功的信息,或者每次向第二节点发送心跳包前收到表示第一节点接收目标消息成功的信息,则可以说明第一节点与第二节点间可以进行正常通信,不需要进行心跳检测,从而可以减少资源浪费。例如,在3PC中,第一节点为P0,第二节点为P1,P2在T1内没有收到P0发送的表示接收目标消息成功的信息时,可以每隔T2时间向P0发送一次心跳检测,在每隔T2向P0发送心跳包前可以先检测是否收到表示第一节点接收目标消息成功的信息,如果收到,则说明P0和P1间在超时时间内有正常通信,停止向P1发送心跳包。如果每隔T2向P0发送心跳包前没有收到目标消息,则可以向P0继续发送心跳检测,直至发送心跳包的次数大于第二预设次数。
需要说明的是,第二节点向第一节点发送心跳包的过程与第一节点向第二节点发送心跳包的过程类似,相似之处可以相互参照,对此不作赘述。
S26:检测发送心跳包的次数是否大于第二预设次数,确定大于第二预设次数且没有收到所述表示成功接收目标消息的信息时,关闭与所述第一节点的第三连接。
其中,第二预设次数可以根据实际场景进行设置,如可以是5次、10次等,预先设置发送心跳包次数主要可以用于防止由于对方短时间内繁忙没有及时返回应答、或网络延迟等造成的误判。与所述第一节点的第三连接可以理解为是第二节点与第一节点间的通信链路,如第二节点中客户端与第一节点中服务端之间的通信链路。
本说明书一个实施例中,在发送心跳包前,第二节点可以预先设定发送心跳包次数的最大值,以便检测发送心跳包的次数大于设定发送心跳包次数的最大值时是否收到表示成功接收目标消息的信息。
本说明书一个实施例中,当检测到发送心跳包的次数大于设定发送心跳包次数的最大值还没有收到表示成功接收目标消息的信息时,说明多次心跳检测均失败,第一节点与第二节点间的通信链路已经中断。此时,可以关闭本端(socket),即关闭与第一节点的第三连接,释放资源。例如,预先设定发送心跳包次数的最大值为N,第二节点可以检测自身发送心跳包的次数是否大于N,如果小于N且未收到第一节点发送的表示成功接收目标消息的信息,则第二节点可以继续向第一节点发送心跳包,直至发送心跳包的次数大于N未 收到第一节点发送的表示成功接收目标消息的信息时,关闭与第一节点的第三连接。
S28:向所述第一节点发送重建连接的请求。
本说明书一个实施例中,第二节点关闭与第一节点的第三连接后,可以向第一节点发送重建连接的请求,以便重新向第一节点发送目标消息。其中,向第一节点发送重建连接请求的可以是第二节点包括的客户端发起的。
S30:基于第二预设重建成功条件,确定与所述第一节点的第四连接是否重建成功。
其中,所述第二预设重建成功条件包括在第二预设请求次数内收到所述第一节点对重建连接请求的响应信息。第二预设请求次数指第二节点向第一节点发送重建连接请求的次数,其可以根据实际场景进行设定,本说明书对此不作限定。响应信息可以理解为第一节点接收第二节点发送的请求后向第二节点返回的信息,如可以是表示收到请求的应答信息,该应答信息可以包括字符、数字等。与所述第一节点的第四连接可以理解为是第二节点与第一节点间的通信链路,如第二节点中客户端与第一节点中服务端之间重新建立的通信链路。
本说明书一个实施例中,所述基于第二预设重建成功条件,确定与所述第一节点的第四连接是否重建成功,可以包括:判断在向所述第一节点发送重建连接请求后的第二预设时间内是否收到所述第一节点对重建连接请求的响应信息;若收到,则确定与所述第一节点的第四连接重建成功;否则,判断向所述第一节点发送重建连接请求的次数是否小于第二预设请求次数;确定小于所述第二预设请求次数时,重新向所述第一节点发送重建连接的请求;相应的,基于第二预设重建成功条件,确定与所述第一节点的第四连接是否重建成功。其中,第二预设时间可以理解为预先设置的重建超时时间,可以根据实际场景设定,对此不作限定。
例如一些实施场景中,在向第一节点发送重建连接的请求前,可以预先设置重建请求次数N1以及每次重建超时时间T3,然后向第一节点发送重建连接的请求,并判断在T3内是否收到第一节点返回的响应信息,若收到,则说明重建连接成功。一些实施场景中,若在T3内没有收到第一节点返回的响应信息,则可以判断发送重建连接的请求的次数是否小于N1,如果小于N1,则可以重新发送重建连接的请求,并判断在T3内是否收到第一节点返回的响应信息,若收到,则说明重建连接成功,若没收到,则重新判断发送重建连接的请求的次数是否小于N1,如此循环,直至发送重建连接的请求的次数等于N1,且在T3内没收到第一节点返回的响应信息时,说明重建连接失败。
S32:确定重建成功时,向所述第一节点发送所述目标消息。
本说明书一个实施例中,在重建连接成功时,第二节点可以重新向第一节点发送目标消息。本说明书另一个实施例中,在重建连接失败时,第二节点可以释放节点资源,从而减少资源浪费,提高处理效率。
本说明书一个实施例中,在第二节点成功发送目标消息后,还可以进行空闲检测。空闲检测可以在网络空闲时对节点间通信链路进行检测,如果检测到线路中断,可以提前建立连接,不需要等到真正使用链路时再重建,从而可以对提高断线重连的处理效率。例如,一个MPC OP,如果输入数据非常大,其本地计算也需要时间,这样在本地计算的这段时间内,其网络是空闲的,此时是可以做一些检测的,如果线路中断了,就可以提前重建连接,而不用等到真正使用链路时再来重建。空闲检测可以是一个节点中客户端主动向另一个节点中服务端发送心跳包进行检测。
空闲检测可以在每次收发成功后进行。本说明书一个实施例中,在重建连接成功,第二节点向发送第一节点发送目标消息后,还可以包括:记录成功发送所述目标消息时所对应的第二时间;基于所述第二时间的第二预设空闲时间后,向所述第一节点发送空闲检测心跳包。其中,第二时间可以用于表示成功发送目标消息时系统对应的时间。第二预设空闲时间可以是从成功发送目标消息时系统对应的时间开始计时到经过T0时间为止的时间段,T0可以根据实际场景进行设置。例如一些实施场景中,预先设定第二预设空闲时间为T0,则从第二节点成功向发送第一节点发送目标消息后开始计时,经过T0时间后,第二节点中的客户端可以主动向第一节点的服务端发送心跳包,从而判断第二节点与第一节点间的连接是否还存活,进而决定是否要重连接。
本说明书实施例中,在MPC执行过程中,通过对节点间通信进行超时检测、心跳检测,可以快速实现对节点间网络中断的判断,从而可以提高对网络中断的处理效率。在确定网络中断情况下,通过重连机制重新建立节点间的通信连接,可以在存在网络不稳定节点或者恶意节点对网络进行干预时,保证计算正常运行、减少计算数据出错的同时,减少资源浪费。
下面结合一个具体实施例对上述方法进行说明,然而,值得注意的是,该具体实施例仅是为了更好地说明本申请,并不构成对本申请的不当限定。
本具体实施例中以图1中三方计算中P0与P1之间的交互为例进行说明,其中,P0服务端接收P1客户端发送的消息。如图4所示,在本具体实施例中,以P0端进行接收的一侧进行描述,可以包括以下步骤。
(1)设置超时时间T1;
本实施例中,P0在准备接收数据之前,可以先设置超时时间T1,以便后续根据该超时时间判断数据接收是否超时。
(2)判断在T1内是否收到目标数据;
本实施例中,在设置超时时间T1后,可以进行接收数据,并判断在T1内是否收到目标数据。
(3)确定在T1内没有收到目标数据时,向P1发送心跳包;
本实施例中,由于在T1内没有收到目标数据的原因可能是网络延迟导致,所以在T1内没有收到目标数据时,可以进一步通过心跳检测确定通信链路是否已经中断。
本实施例中,如果T1之后,没有收到目标数据,此时可以每隔T2时间向P1发送心跳包。其中,在每次发送心跳包之前,可以检测是否已经收到目标数据,如果收到目标数据,则取消此次心跳检测,进入正常处理流程。如果没有收到目标数据,则进行步骤(4)。
本实施例中,确定在T1内收到目标数据时,不需要向P1发送心跳包,可以直接进入正常处理流程。
(4)检查发送心跳包的次数是否大于N次;
本实施例中,如果在发送心跳包之前,检测到没有收到目标数据,则可以检查发送心跳包的次数是否大于N次,如果大于N,则说明N次的心跳检测都失败,进行步骤(5);如果小于N,则返回步骤(3)执行。
(5)关闭现有连接;
本实施例中,在N次心跳检测都失败时,说明P1与P0之间的通信链路已经中断,此时可以关闭连接,准备重建连接。
(6)设置重建连接的条件;
本实施例中,在重建连接之前,可以预先设置重建连接请求次数为N3和每次请求的超时时间为T3。
(7)基于重建连接的条件,确定重建是否成功。
本实施例中,P0节点可以向P1节点发送重建连接的请求,如果在重建连接请求次数小于N3且该请求时间小于T3时收到P1返回的响应信息,则说明重建连接成功,此时,P0可以重新接收目标数据。如果重建连接请求时间大于T3时没有收到P1返回的响应,此时,可以判断重建连接请求次数是否大于N3,如果大于N3,则说明不满足重建连接的条件,重建连接失败,释放资源;如果小于N3,此时可以重新向P1发送重建连接的请求,并判断该重建连接请求时间T3内是否收到P1返回的响应。
本实施例中,当P0成功接收目标数据的预设时间后,可以由P0的客户端主动向P1的服务端发送心跳包进行空闲检测,从而确定预设时间后,P0与P1之间的连接是否还存活,从而提高断线重连的处理效率。
需要说明的是,为了便于理解,上述实施例中以三方计算中节点之间的交互为例进行说明,一些实施例中,当应用于多方计算中节点之间的交互时,如由N个节点共同执行时,每个节点可以包括(N-1)个客户端。
本说明书中上述方法的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参加即可,每个实施例重点说明的都是与其他实施例的不同之处。相关之处参见方法实施例的部分说明即可。
基于上述所述的一种实现断线重连的数据处理方法,本说明书一个或多个实施例还提供一种实现断线重连的数据处理装置。所述的装置可以包括使用了本说明书实施例所述方法的系统(包括分布式系统)、软件(应用)、模块、组件、服务器、客户端等并结合必要的实施硬件的装置。基于同一创新构思,本说明书实施例提供的一个或多个实施例中的装置如下面的实施例所述。由于装置解决问题的实现方案与方法相似,因此本说明书实施例具体的装置的实施可以参见前述方法的实施,重复之处不再赘述。以下所使用的,术语“单元”或者“模块”可以实现预定功能的软件和/或硬件的组合。尽管以下实施例所描述的装置较佳地以软件来实现,但是硬件,或者软件和硬件的组合的实现也是可能并被构想的。
具体地,图5是本说明书提供的一种实现断线重连的数据处理装置的一个实施例的模块结构示意图,如图5所示,本说明书提供的一种实现断线重连的数据处理装置由多个节点共同执行,可以包括:第一判断模块120,第一发送模块122,第一检测模块124,第一请求模块126,第一确定模块128,第一接收模块130。
第一判断模块120,可以用于所述多个节点中第一节点判断在预设第一超时时间内是否收到所述多个节点中第二节点发送的目标消息;
第一发送模块122,可以用于确定没有收到时,向所述第二节点发送心跳包;
第一检测模块124,可以用于检测发送心跳包的次数是否大于第一预设次数,确定大于第一预设次数且没有收到所述目标消息时,关闭与所述第二节点的第一连接;
第一请求模块126,可以用于向所述第二节点发送重建连接的请求;
第一确定模块128,可以用于基于第一预设重建成功条件,确定与所述第二节点的第二连接是否重建成功;
第一接收模块130,可以用于确定重建成功时,接收所述第二节点发送的所述目标消 息。
基于前述方法所述实施例的描述,本说明书还提供一种实现断线重连的数据处理装置,具体的,如图6所示,图6是本说明书提供的另一种实现断线重连的数据处理装置的一个实施例的模块结构示意图,其由多个节点共同执行,可以包括:第二发送模块140,第二判断模块142,第三发送模块144,第二检测模块146,第二请求模块148,第二确定模块150,第四发送模块152。
第二发送模块140,可以用于所述多个节点中第二节点向所述多个节点中第一节点发送目标消息;
第二判断模块142,可以用于所述第二节点判断在预设第二超时时间内是否收到所述第一节点发送的表示成功接收目标消息的信息;
第三发送模块144,可以用于确定没有收到时,向所述第一节点发送心跳包;
第二检测模块146,可以用于检测发送心跳包的次数是否大于第二预设次数,确定大于第二预设次数且没有收到所述表示成功接收目标消息的信息时,关闭与所述第一节点的第三连接;
第二请求模块148,可以用于向所述第一节点发送重建连接的请求;
第二确定模块150,可以用于基于第二预设重建成功条件,确定与所述第一节点的第四连接是否重建成功;
第四发送模块152,可以用于确定重建成功时,向所述第一节点发送所述目标消息。
本说明书提供的一种实现断线重连的数据处理装置,MPC执行过程中,通过对节点间通信进行超时检测、心跳检测,可以快速实现对节点间网络中断的判断,从而可以提高对网络中断的处理效率。在确定网络中断情况下,通过重连机制重新建立节点间的通信连接,可以在存在网络不稳定节点或者恶意节点对网络进行干预时,保证计算正常运行、减少计算数据出错的同时,减少资源浪费。
需要说明的,上述所述的装置根据方法实施例的描述还可以包括其他的实施方式,具体的实现方式可以参照相关方法实施例的描述,在此不作一一赘述。
本说明书还提供一种实现断线重连的数据处理设备的实施例,包括处理器及用于存储处理器可执行指令的存储器,所述指令被所述处理器执行时实现包括以下步骤:
多个节点中第一节点判断在预设第一超时时间内是否收到所述多个节点中第二节点发送的目标消息;
确定没有收到时,向所述第二节点发送心跳包;
检测发送心跳包的次数是否大于第一预设次数,确定大于第一预设次数且没有收到所述目标消息时,关闭与所述第二节点的第一连接;
向所述第二节点发送重建连接的请求;
基于第一预设重建成功条件,确定与所述第二节点的第二连接是否重建成功;
确定重建成功时,接收所述第二节点发送的所述目标消息。
本说明书还提供一种实现断线重连的数据处理设备的实施例,包括处理器及用于存储处理器可执行指令的存储器,所述指令被所述处理器执行时实现包括以下步骤:
多个节点中第二节点向所述多个节点中第一节点发送目标消息;
所述第二节点判断在预设第二超时时间内是否收到所述第一节点发送的表示成功接收目标消息的信息;
确定没有收到时,向所述第一节点发送心跳包;
检测发送心跳包的次数是否大于第二预设次数,确定大于第二预设次数且没有收到所述表示成功接收目标消息的信息时,关闭与所述第一节点的第三连接;
向所述第一节点发送重建连接的请求;
基于第二预设重建成功条件,确定与所述第一节点的第四连接是否重建成功;
确定重建成功时,向所述第一节点发送所述目标消息。
需要说明的,上述所述的设备根据方法或装置实施例的描述还可以包括其他的实施方式,如收发后进行空闲检测、根据预设重建成功条件确定是否重建成功等的实现方式。具体的实现方式可以参照相关方法实施例的描述,在此不作一一赘述。
本说明书还提供一种实现断线重连的数据处理系统的实施例,包括至少一个处理器以及存储计算机可执行指令的存储器,所述处理器执行所述指令时实现上述任意一个或者多个实施例中所述方法的步骤,例如包括:多个节点中第二节点向所述多个节点中第一节点发送目标消息;所述第二节点判断在预设第二超时时间内是否收到所述第一节点发送的表示成功接收目标消息的信息;确定没有收到时,向所述第一节点发送心跳包;检测发送心跳包的次数是否大于第二预设次数,确定大于第二预设次数且没有收到所述表示成功接收目标消息的信息时,关闭与所述第一节点的第三连接;向所述第一节点发送重建连接的请求;基于第二预设重建成功条件,确定与所述第一节点的第四连接是否重建成功;确定重建成功时,向所述第一节点发送所述目标消息。所述的系统可以为单独的服务器,也可以包括使用了本说明书的一个或多个所述方法或一个或多个实施例装置的服务器集群、系统(包括分布式系统)、软件(应用)、实际操作装置、逻辑门电路装置、量子计算机等并结 合必要的实施硬件的终端装置。
本说明书所提供的方法实施例可以在移动终端、计算机终端、服务器或者类似的运算装置中执行。以运行在服务器上为例,图7是本说明书提供的一种实现断线重连的数据处理服务器的一个实施例的硬件结构框图,该服务器可以是上述实施例中的实现断线重连的数据处理装置或实现断线重连的数据处理系统。如图7所示,服务器10可以包括一个或多个(图中仅示出一个)处理器100(处理器100可以包括但不限于微处理器MCU或可编程逻辑器件FPGA等的处理装置)、用于存储数据的存储器200、以及用于通信功能的传输模块300。本领域普通技术人员可以理解,图7所示的结构仅为示意,其并不对上述电子装置的结构造成限定。例如,服务器10还可包括比图7中所示更多或者更少的组件,例如还可以包括其他的处理硬件,如数据库或多级缓存、GPU,或者具有与图7所示不同的配置。
存储器200可用于存储应用软件的软件程序以及模块,如本说明书实施例中的实现断线重连的数据处理方法对应的程序指令/模块,处理器100通过运行存储在存储器200内的软件程序以及模块,从而执行各种功能应用以及数据处理。存储器200可包括高速随机存储器,还可包括非易失性存储器,如一个或者多个磁性存储装置、闪存、或者其他非易失性固态存储器。在一些实例中,存储器200可进一步包括相对于处理器100远程设置的存储器,这些远程存储器可以通过网络连接至计算机终端。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
传输模块300用于经由一个网络接收或者发送数据。上述的网络具体实例可包括计算机终端的通信供应商提供的无线网络。在一个实例中,传输模块300包括一个网络适配器(Network Interface Controller,NIC),其可通过基站与其他网络设备相连从而可与互联网进行通讯。在一个实例中,传输模块300可以为射频(Radio Frequency,RF)模块,其用于通过无线方式与互联网进行通讯。
上述对本说明书特定实施例进行了描述。其它实施例在所附权利要求书的范围内。在一些情况下,在权利要求书中记载的动作或步骤可以按照不同于实施例中的顺序来执行并且仍然可以实现期望的结果。另外,在附图中描绘的过程不一定要求示出的特定顺序或者连续顺序才能实现期望的结果。在某些实施方式中,多任务处理和并行处理也是可以的或者可能是有利的。
本说明书提供的上述实施例所述的方法或装置可以通过计算机程序实现业务逻辑并记录在存储介质上,所述的存储介质可以计算机读取并执行,实现本说明书实施例所描述 方案的效果。
所述存储介质可以包括用于存储信息的物理装置,通常是将信息数字化后再以利用电、磁或者光学等方式的媒体加以存储。所述存储介质有可以包括:利用电能方式存储信息的装置如,各式存储器,如RAM、ROM等;利用磁能方式存储信息的装置如,硬盘、软盘、磁带、磁芯存储器、磁泡存储器、U盘;利用光学方式存储信息的装置如,CD或DVD。当然,还有其他方式的可读存储介质,例如量子存储器、石墨烯存储器等等。
本说明书提供的上述实现断线重连的数据处理方法或装置实施例可以在计算机中由处理器执行相应的程序指令来实现,如使用windows操作系统的c++语言在PC端实现、linux系统实现,或其他例如使用android、iOS系统程序设计语言在智能终端实现,以及基于量子计算机的处理逻辑实现等。
需要说明的是说明书上述所述的装置、计算机存储介质、系统根据相关方法实施例的描述还可以包括其他的实施方式,具体的实现方式可以参照对应方法实施例的描述,在此不作一一赘述。
本申请中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于硬件+程序类实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。
本说明书实施例并不局限于必须是符合行业通信标准、标准计算机数据处理和数据存储规则或本说明书一个或多个实施例所描述的情况。某些行业标准或者使用自定义方式或实施例描述的实施基础上略加修改后的实施方案也可以实现上述实施例相同、等同或相近、或变形后可预料的实施效果。应用这些修改或变形后的数据获取、存储、判断、处理方式等获取的实施例,仍然可以属于本说明书实施例的可选实施方案范围之内。
本领域技术人员可知,设计人员几乎都通过将改进的方法流程编程到硬件电路中来得到相应的硬件电路结构。因此,不能说一个方法流程的改进就不能用硬件实体模块来实现。本领域技术人员也应该清楚,只需要将方法流程用硬件描述语言稍作逻辑编程并编程到集成电路中,就可以很容易得到实现该逻辑方法流程的硬件电路。
控制器可以按任何适当的方式实现,例如,控制器可以采取例如微处理器或处理器以及存储可由该(微)处理器执行的计算机可读程序代码(例如软件或固件)的计算机可读介质、逻辑门、开关、专用集成电路。控制器可以被认为是一种硬件部件,而对其内包括的用于实现各种功能的装置也可以视为硬件部件内的结构。或者甚至,可以将用于实现各 种功能的装置视为既可以是实现方法的软件模块又可以是硬件部件内的结构。
为了描述的方便,描述以上装置时以功能分为各种模块分别描述。当然,在实施本说明书一个或多个时可以把部分模块的功能在同一个或多个软件和/或硬件中实现,也可以将实现同一功能的模块由多个子模块或子单元的组合实现等。
本发明是参照根据本发明实施例的方法、装置(系统)、和计算机程序产品的流程图和/或方框图来描述的。应理解可由计算机程序指令实现,可提供这些计算机程序指令到通用计算机、专用计算机、嵌入式处理机或其他可编程数据处理设备的处理器以产生一个机器,使得通过计算机或其他可编程数据处理设备的处理器执行的指令产生用于实现指定的功能的装置。
这些计算机程序指令也可存储在能引导计算机或其他可编程数据处理设备以特定方式工作的计算机可读存储器中,使得存储在该计算机可读存储器中的指令产生包括指令装置的制造品,该指令装置实现在流程图一个流程或多个流程和/或方框图一个方框或多个方框中指定的功能。
本领域技术人员应明白,本说明书一个或多个实施例可提供为方法、系统或计算机程序产品。因此,本说明书一个或多个实施例可采用完全硬件实施例、完全软件实施例或结合软件和硬件方面的实施例的形式。而且,本说明书一个或多个实施例可采用在一个或多个其中包含有计算机可用程序代码的计算机可用存储介质(包括但不限于磁盘存储器、CD-ROM、光学存储器等)上实施的计算机程序产品的形式。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于系统实施例而言,由于其基本相似于方法实施例,所以描述的比较简单,相关之处参见方法实施例的部分说明即可。在不相互矛盾的情况下,本领域的技术人员可以将本说明书中描述的不同实施例或示例以及不同实施例或示例的特征进行结合和组合。
以上所述仅为本说明书一个或多个实施例的实施例而已,并不用于限制本本说明书一个或多个实施例。对于本领域技术人员来说,本说明书一个或多个实施例可以有各种更改和变化。凡在本申请的精神和原理之内所作的任何修改、等同替换、改进等,均应包含在权利要求范围之内。

Claims (17)

  1. 一种实现断线重连的数据处理方法,其特征在于,由多个节点共同执行,所述方法包括:
    所述多个节点中第一节点判断在预设第一超时时间内是否收到所述多个节点中第二节点发送的目标消息;
    确定没有收到时,向所述第二节点发送心跳包;
    检测发送心跳包的次数是否大于第一预设次数,确定大于第一预设次数且没有收到所述目标消息时,关闭与所述第二节点的第一连接;
    向所述第二节点发送重建连接的请求;
    基于第一预设重建成功条件,确定与所述第二节点的第二连接是否重建成功;
    确定重建成功时,接收所述第二节点发送的所述目标消息。
  2. 根据权利要求1所述的方法,其特征在于,所述向所述第二节点发送心跳包,包括:
    周期性的向所述第二节点发送心跳包;其中,每次向所述第二节点发送心跳包前,包括:检测是否收到所述目标消息;确定未收到时,向所述第二节点发送心跳包。
  3. 根据权利要求1所述的方法,其特征在于,所述第一预设重建成功条件包括在第一预设请求次数内收到所述第二节点对重建连接请求的响应信息。
  4. 根据权利要求1所述的方法,其特征在于,所述基于第一预设重建成功条件,确定与所述第二节点的第二连接是否重建成功,包括:
    判断在向所述第二节点发送重建连接请求后的第一预设时间内是否收到所述第二节点对重建连接请求的响应信息;
    若收到,则确定与所述第二节点的第二连接重建成功;否则,判断向所述第二节点发送重建连接请求的次数是否小于第一预设请求次数;
    确定小于所述第一预设请求次数时,重新向所述第二节点发送重建连接的请求;
    相应的,基于第一预设重建成功条件,确定与所述第二节点的第二连接是否重建成功。
  5. 根据权利要求1所述的方法,其特征在于,还包括:
    记录成功接收所述目标消息时所对应的第一时间,并向所述第二节点发送表示成功接收目标消息的信息;
    基于所述第一时间的第一预设空闲时间后,向所述第二节点发送空闲检测心跳包。
  6. 一种实现断线重连的数据处理方法,其特征在于,由多个节点共同执行,所述方法包括:
    所述多个节点中第二节点向所述多个节点中第一节点发送目标消息;
    所述第二节点判断在预设第二超时时间内是否收到所述第一节点发送的表示成功接收目标消息的信息;
    确定没有收到时,向所述第一节点发送心跳包;
    检测发送心跳包的次数是否大于第二预设次数,确定大于第二预设次数且没有收到所述表示成功接收目标消息的信息时,关闭与所述第一节点的第三连接;
    向所述第一节点发送重建连接的请求;
    基于第二预设重建成功条件,确定与所述第一节点的第四连接是否重建成功;
    确定重建成功时,向所述第一节点发送所述目标消息。
  7. 根据权利要求6所述的方法,其特征在于,所述向所述第一节点发送心跳包,包括:
    周期性的向所述第一节点发送心跳包;其中,每次向所述第一节点发送心跳包前,包括:检测是否收到所述表示成功接收目标消息的信息,确定未收到时,向所述第一节点发送心跳包。
  8. 根据权利要求6所述的方法,其特征在于,所述第二预设重建成功条件包括在第二预设请求次数内收到所述第一节点对重建连接请求的响应信息。
  9. 根据权利要求6所述的方法,其特征在于,所述基于第二预设重建成功条件,确定与所述第一节点的第四连接是否重建成功,包括:
    判断在向所述第一节点发送重建连接请求后的第二预设时间内是否收到所述第一节点对重建连接请求的响应信息;
    若收到,则确定与所述第一节点的第四连接重建成功;否则,判断向所述第一节点发送重建连接请求的次数是否小于第二预设请求次数;
    确定小于所述第二预设请求次数时,重新向所述第一节点发送重建连接的请求;
    相应的,基于第二预设重建成功条件,确定与所述第一节点的第四连接是否重建成功。
  10. 根据权利要求6所述的方法,其特征在于,所述向所述第一节点发送所述目标消息后,还包括:
    记录成功发送所述目标消息时所对应的第二时间;
    基于所述第二时间的第二预设空闲时间后,向所述第一节点发送空闲检测心跳包。
  11. 根据权利要求1-10中任意一项所述的方法,其特征在于,每个节点包括一个服务端和两个客户端,其中,所述服务端用于接收目标消息,还用于发送心跳包;所述客户端用于发送目标消息,还用于接收心跳包。
  12. 根据权利要求1-10中任意一项所述的方法,其特征在于,当所述方法由N个节点共同执行时,每个节点包括(N-1)个客户端。
  13. 一种实现断线重连的数据处理装置,其特征在于,由多个节点共同执行,所述装置包括:
    第一判断模块,用于所述多个节点中第一节点判断在预设第一超时时间内是否收到所述多个节点中第二节点发送的目标消息;
    第一发送模块,用于确定没有收到时,向所述第二节点发送心跳包;
    第一检测模块,用于检测发送心跳包的次数是否大于第一预设次数,确定大于第一预设次数且没有收到所述目标消息时,关闭与所述第二节点的第一连接;
    第一请求模块,用于向所述第二节点发送重建连接的请求;
    第一确定模块,用于基于第一预设重建成功条件,确定与所述第二节点的第二连接是否重建成功;
    第一接收模块,用于确定重建成功时,接收所述第二节点发送的所述目标消息。
  14. 一种实现断线重连的数据处理装置,其特征在于,由多个节点共同执行,所述装置包括:
    第二发送模块,用于所述多个节点中第二节点向所述多个节点中第一节点发送目标消息;
    第二判断模块,用于所述第二节点判断在预设第二超时时间内是否收到所述第一节点发送的表示成功接收目标消息的信息;
    第三发送模块,用于确定没有收到时,向所述第一节点发送心跳包;
    第二检测模块,用于检测发送心跳包的次数是否大于第二预设次数,确定大于第二预设次数且没有收到所述表示成功接收目标消息的信息时,关闭与所述第一节点的第三连接;
    第二请求模块,用于向所述第一节点发送重建连接的请求;
    第二确定模块,用于基于第二预设重建成功条件,确定与所述第一节点的第四连接是否重建成功;
    第四发送模块,用于确定重建成功时,向所述第一节点发送所述目标消息。
  15. 一种实现断线重连的数据处理设备,其特征在于,包括处理器及用于存储处理器可执行指令的存储器,所述指令被所述处理器执行时实现包括以下步骤:
    多个节点中第一节点判断在预设第一超时时间内是否收到所述多个节点中第二节点发送的目标消息;
    确定没有收到时,向所述第二节点发送心跳包;
    检测发送心跳包的次数是否大于第一预设次数,确定大于第一预设次数且没有收到所述目标消息时,关闭与所述第二节点的第一连接;
    向所述第二节点发送重建连接的请求;
    基于第一预设重建成功条件,确定与所述第二节点的第二连接是否重建成功;
    确定重建成功时,接收所述第二节点发送的所述目标消息。
  16. 一种实现断线重连的数据处理设备,其特征在于,包括处理器及用于存储处理器可执行指令的存储器,所述指令被所述处理器执行时实现包括以下步骤:
    多个节点中第二节点向所述多个节点中第一节点发送目标消息;
    所述第二节点判断在预设第二超时时间内是否收到所述第一节点发送的表示成功接收目标消息的信息;
    确定没有收到时,向所述第一节点发送心跳包;
    检测发送心跳包的次数是否大于第二预设次数,确定大于第二预设次数且没有收到所述表示成功接收目标消息的信息时,关闭与所述第一节点的第三连接;
    向所述第一节点发送重建连接的请求;
    基于第二预设重建成功条件,确定与所述第一节点的第四连接是否重建成功;
    确定重建成功时,向所述第一节点发送所述目标消息。
  17. 一种实现断线重连的数据处理系统,其特征在于,包括至少一个处理器以及存储计算机可执行指令的存储器,所述处理器执行所述指令时实现权利要求1-12中任意一项所述方法的步骤。
PCT/CN2020/084854 2020-04-15 2020-04-15 一种实现断线重连的数据处理方法、装置、设备及系统 WO2021207960A1 (zh)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/084854 WO2021207960A1 (zh) 2020-04-15 2020-04-15 一种实现断线重连的数据处理方法、装置、设备及系统

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/084854 WO2021207960A1 (zh) 2020-04-15 2020-04-15 一种实现断线重连的数据处理方法、装置、设备及系统

Publications (1)

Publication Number Publication Date
WO2021207960A1 true WO2021207960A1 (zh) 2021-10-21

Family

ID=78084854

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/084854 WO2021207960A1 (zh) 2020-04-15 2020-04-15 一种实现断线重连的数据处理方法、装置、设备及系统

Country Status (1)

Country Link
WO (1) WO2021207960A1 (zh)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115174447A (zh) * 2022-06-27 2022-10-11 京东科技信息技术有限公司 一种网络通信方法、装置、系统、设备及存储介质
US11653186B2 (en) * 2020-06-26 2023-05-16 BlueOwl, LLC Systems and methods for determining application status
US11688013B1 (en) 2015-01-20 2023-06-27 State Farm Mutual Automobile Insurance Company Providing insurance discounts based upon usage of telematics data-based risk mitigation and prevention functionality
US11711671B2 (en) 2020-06-26 2023-07-25 BlueOwl, LLC Systems and methods for determining mobile device status
US11729589B2 (en) 2020-07-07 2023-08-15 BlueOwl, LLC Systems and methods for verifying reliability of sensor data received from mobile devices

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090292957A1 (en) * 2008-05-21 2009-11-26 International Business Machines Corporation System for repeated unmount attempts of distributed file systems
CN105515912A (zh) * 2015-12-22 2016-04-20 河北远东通信系统工程有限公司 一种多节点之间链路有效性检测和处理方法
CN108737142A (zh) * 2017-04-21 2018-11-02 华为技术有限公司 一种调整节点检测参数的方法、节点和网状网络
CN109218137A (zh) * 2018-10-18 2019-01-15 郑州云海信息技术有限公司 一种分布式系统中的节点的状态检测方法和装置
CN111510492A (zh) * 2020-04-15 2020-08-07 矩阵元技术(深圳)有限公司 一种实现断线重连的数据处理方法、装置、设备及系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090292957A1 (en) * 2008-05-21 2009-11-26 International Business Machines Corporation System for repeated unmount attempts of distributed file systems
CN105515912A (zh) * 2015-12-22 2016-04-20 河北远东通信系统工程有限公司 一种多节点之间链路有效性检测和处理方法
CN108737142A (zh) * 2017-04-21 2018-11-02 华为技术有限公司 一种调整节点检测参数的方法、节点和网状网络
CN109218137A (zh) * 2018-10-18 2019-01-15 郑州云海信息技术有限公司 一种分布式系统中的节点的状态检测方法和装置
CN111510492A (zh) * 2020-04-15 2020-08-07 矩阵元技术(深圳)有限公司 一种实现断线重连的数据处理方法、装置、设备及系统

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US11688013B1 (en) 2015-01-20 2023-06-27 State Farm Mutual Automobile Insurance Company Providing insurance discounts based upon usage of telematics data-based risk mitigation and prevention functionality
US11735039B1 (en) 2015-01-20 2023-08-22 State Farm Mutual Automobile Insurance Company Broadcasting telematics data to nearby mobile devices, vehicles, and infrastructure
US11869376B2 (en) 2015-01-20 2024-01-09 State Farm Mutual Automobile Insurance Company Taking corrective action based upon telematics data broadcast from another vehicle
US11653186B2 (en) * 2020-06-26 2023-05-16 BlueOwl, LLC Systems and methods for determining application status
US11711671B2 (en) 2020-06-26 2023-07-25 BlueOwl, LLC Systems and methods for determining mobile device status
US20230254671A1 (en) * 2020-06-26 2023-08-10 BlueOwl, LLC Systems and methods for determining application status
US11729589B2 (en) 2020-07-07 2023-08-15 BlueOwl, LLC Systems and methods for verifying reliability of sensor data received from mobile devices
CN115174447A (zh) * 2022-06-27 2022-10-11 京东科技信息技术有限公司 一种网络通信方法、装置、系统、设备及存储介质
CN115174447B (zh) * 2022-06-27 2023-09-29 京东科技信息技术有限公司 一种网络通信方法、装置、系统、设备及存储介质

Similar Documents

Publication Publication Date Title
WO2021207960A1 (zh) 一种实现断线重连的数据处理方法、装置、设备及系统
CN111510492A (zh) 一种实现断线重连的数据处理方法、装置、设备及系统
US9424149B2 (en) Systems and methods for fault tolerant communications
KR101891365B1 (ko) 위트니스 서비스의 제공
WO2016202051A1 (zh) 一种通信系统中管理主备节点的方法和装置及高可用集群
US20130227022A1 (en) Peer discovery and secure communication in failover schemes
US20080244085A1 (en) System and Method of Delaying Connection Acceptance to Support Connection Request Processing at Layer-7
JP2018508072A (ja) メッセージをプッシュするための方法および装置
EP4207648A1 (en) Connection processing method and apparatus, electronic device, and computer-readable storage medium
US8676751B2 (en) High availability database systems and methods
WO2017185615A1 (zh) 一种业务处理设备的业务状态确定方法及调度设备
US9749825B2 (en) Connection-oriented messaging and signaling in mobile heath networks
US20180227332A1 (en) A method and computer program products for probing the status of an ip-based communication connection in order to receive an incoming communication
WO2017071384A1 (zh) 报文处理的方法及装置
US20110225230A1 (en) Method and apparatus for detecting active and orphan session-based connections
JP2020521409A (ja) Netconfセッション状態の検出方法、装置及びコンピュータ読取可能な記録媒体
US20210006607A1 (en) Communications apparatus, systems, and methods for preventing and/or minimizing session data clipping
CN111756826B (zh) 一种dlm的锁信息传输方法以及相关装置
CN108075947B (zh) 存储设备、pc端、通信连接连通性的维护方法及系统
US10523766B2 (en) Resolving path state conflicts in internet small computer system interfaces
Karam et al. Using Socket. io Approach for Many-to-Many Bi-Directional Video Conferencing
CN114281373A (zh) 设备状态更新方法、装置、计算机设备和存储介质
US11763097B1 (en) Intelligent dialogue recovery for virtual assistant communication sessions
CN114979980B (zh) 一种sip消息的通信方法及其终端设备和网络设备
CN114615167B (zh) 针对协商建立链路连接的监测方法和智能网络设备

Legal Events

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

Ref document number: 20931605

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20931605

Country of ref document: EP

Kind code of ref document: A1

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205 DATED 23/01/2023)