Disclosure of Invention
In view of the above, the present invention has been made to provide a mobile terminal remote-assisted wire probing method and a corresponding probing apparatus that overcome or at least partially solve the above-mentioned problems.
According to an aspect of the embodiments of the present invention, there is provided a method for detecting a connection between a mobile terminal and a remote assistant, which is applied to an initiator of the remote assistant, the method including:
initiating a connection request of remote assistance to a receiver of the remote assistance through a network;
performing connection detection on a plurality of connections provided by a plurality of relay stations existing between the sender and the receiver, wherein each connection is detected according to the following steps:
sending out a detection signal through the connecting line; when a response message aiming at the detection signal is received by the receiver for the first time through the connection, the state of the connection is switched to a connection state which is in operation but unstable; determining whether the connection line can stably run or not according to a signal detection response result of the connection line within a specified time;
and selecting a connection capable of running stably to establish remote assistance between the sender and the receiver.
Optionally, determining whether the connection line can stably operate according to the signal detection response result of the connection line within a specified time includes:
determining whether a response message from the receiver can be continuously received within the designated time;
if so, modifying the state of the connecting line into an operable state, and determining that the connecting line is in a stable operating state;
if not, the connection is determined to be interrupted.
Optionally, in a specified time, determining whether the connection line can stably operate according to a signal detection response result of the connection line, further including:
performing cyclic detection on the connection line within the specified time to obtain a cyclic detection result;
and further determining whether the connection can stably run or not by combining the current connection state of the connection and the loop detection result.
Optionally, further determining whether the connection can stably operate by combining the current connection state of the connection and the loop detection result, including:
if the current connection state of the connection is in operation but unstable, and the detection failure times are not more than a preset threshold value as the cyclic detection result, determining that the connection can stably operate;
and if the current connection state of the connection is in operation and the detection failure times are larger than the preset threshold value as the cyclic detection result, determining that the connection is switched to the connection state which is in operation but unstable.
Optionally, if it is determined that at least two connection lines can stably operate according to the current connection line state of the connection line and the cyclic detection result, selecting the connection line that can stably operate to establish the remote assistance between the sender and the receiver further includes:
further comparing the failure times of the cyclic detection of each connection;
and selecting the connection with the least cycle detection failure times to establish remote assistance between the sender and the receiver.
Optionally, selecting a connection capable of running stably to establish remote assistance between the sender and the receiver, further comprising:
when a plurality of lines capable of stably running exist, determining an optimal line by combining at least one of the following parameters: the time of receiving the data packet by the receiver last time and the delay time RTT of each connection line;
and selecting an optimal connection line to establish remote assistance between the sender and the receiver.
Optionally, performing connection detection on a plurality of connections provided by a plurality of relay stations existing between the sender and the receiver, further includes:
selecting at least one connection line for connection detection from a plurality of connection lines provided by the plurality of relay stations by adopting a preset rule;
performing connection detection on at least one selected connection;
wherein the preset rule comprises at least one of:
connecting the selected connection before the current connection;
in the links which are in a non-running state and are detected successfully before, the links which are not detected for the longest time from the current link are detected;
the links that have not been probed the longest from the current.
Optionally, the method further includes:
and if the network environment of the remote assistance is changed, reselecting a connection between the initiator and the receiver to establish the remote assistance.
Optionally, the network environment of the remote assistance changes, including at least one of:
a new connection is generated in the network environment;
a connecting line in the network environment is destroyed;
the state of the connection in the network environment is changed;
the receiving end receives a remote detection signal;
and the receiving end receives a remote data packet.
Optionally, the detection signal is an internet detector PING.
According to another aspect of the embodiments of the present invention, there is provided a connection detecting apparatus for remote assistance of a mobile terminal, applied to an initiator of remote assistance, the apparatus including:
the connection request initiating module is suitable for initiating a connection request of remote assistance to a receiver of the remote assistance through a network;
a connection detection module, adapted to perform connection detection on a plurality of connections provided by a plurality of relay stations existing between the sender and the receiver, wherein each connection is detected according to the following steps: sending out a detection signal through the connecting line; when a response message aiming at the detection signal is received by the receiver for the first time through the connection, the state of the connection is switched to a connection state which is in operation but unstable; determining whether the connection line can stably run or not according to a signal detection response result of the connection line within a specified time;
and the remote assistance establishing module is suitable for selecting a connection line capable of running stably to establish remote assistance between the sender and the receiver.
Optionally, the connection detecting module is further adapted to:
determining whether a response message from the receiver can be continuously received within the designated time;
if so, modifying the state of the connecting line into an operable state, and determining that the connecting line is in a stable operating state;
if not, the connection is determined to be interrupted.
Optionally, the connection detecting module is further adapted to:
performing cyclic detection on the connection line within the specified time to obtain a cyclic detection result;
and further determining whether the connection can stably run or not by combining the current connection state of the connection and the loop detection result.
Optionally, the connection detecting module is further adapted to:
if the current connection state of the connection is in operation but unstable, and the detection failure times are not less than a preset threshold value as the cyclic detection result, determining that the connection can stably operate;
and if the current connection state of the connection is in operation and the detection failure times are larger than the preset threshold value as the cyclic detection result, determining that the connection is switched to the connection state which is in operation but unstable.
Optionally, the remote assistance establishing module is further adapted to:
if the current connection state of the connection line and the cyclic detection result are combined to determine that at least two connection lines can stably run, further comparing the cyclic detection failure times of the connection lines;
and selecting the connection with the least cycle detection failure times to establish remote assistance between the sender and the receiver.
Optionally, the remote assistance establishing module is further adapted to:
when a plurality of lines capable of stably running exist, determining an optimal line by combining at least one of the following parameters: the time of receiving the data packet by the receiver last time and the delay time RTT of each connection line;
and selecting an optimal connection line to establish remote assistance between the sender and the receiver.
Optionally, the connection detecting module is further adapted to:
selecting at least one connection line for connection detection from a plurality of connection lines provided by the plurality of relay stations by adopting a preset rule;
performing connection detection on at least one selected connection;
wherein the preset rule comprises at least one of:
connecting the selected connection before the current connection;
in the links which are in a non-running state and are detected successfully before, the links which are not detected for the longest time from the current link are detected;
the links that have not been probed the longest from the current.
Optionally, the apparatus further comprises:
and the restarting module is suitable for reselecting a connection between the initiator and the receiver to establish remote assistance if the network environment of the remote assistance is changed.
Optionally, the network environment of the remote assistance in the restart module changes, including at least one of:
a new connection is generated in the network environment;
a connecting line in the network environment is destroyed;
the state of the connection in the network environment is changed;
the receiving end receives a remote detection signal;
and the receiving end receives a remote data packet.
Optionally, the detection signal is an internet detector PING.
According to yet another aspect of embodiments of the present invention, there is provided a mobile terminal including a processor and a memory:
the memory is used for storing a program for executing the connection detection method remotely assisted by any one mobile terminal;
the processor is configured to execute programs stored in the memory.
According to another aspect of the embodiments of the present invention, there is provided a computer storage medium for storing computer software instructions for the above-mentioned mobile terminal remote-assisted connection detecting apparatus, which includes a program designed to execute the above-mentioned aspect for the mobile terminal remote-assisted connection detecting apparatus.
The embodiment of the invention provides a connection detection method for remote assistance of a mobile terminal, aiming at solving the problems that network signals are unstable and data packets are frequently lost in the remote assistance process of the mobile terminal due to different operators to which the mobile terminal of a user belongs or different networks used by the user when the mobile terminal belongs to the same operator when the mobile terminal is remotely assisted. The method can provide a high-quality transmission channel for the user when the mobile terminal performs remote assistance so as to fulfill the aim of quickly, completely and stably transmitting data through the channel, and simultaneously can improve the safety performance of the network, ensure the accuracy of the data and improve the user experience. Specifically, the method for detecting the connection between the remote assistance of the mobile terminal includes that firstly, an initiator of the remote assistance can initiate a connection request of the remote assistance to a receiver of the remote assistance through a network, after the receiver of the remote assistance receives a signal of the connection request, the receiver of the remote assistance responds to the signal to indicate that a transmission channel between the receiver of the remote assistance and the receiver of the remote assistance is communicated, and after receiving the response, a sender of the remote assistance can establish connection on the transmission channel to perform corresponding data transmission. However, there are multiple connection channels between the sending side and the receiving side of the remote assistance, and in order to ensure the stability of the signal and the accuracy of the data, the multiple connection provided by multiple relay stations existing between the sending side and the receiving side may be subjected to connection detection to find one channel with the most stable signal transmission and the fastest transmission speed, so as to establish the remote assistance between the sending side and the receiving side. When each specific connection is detected, a detection signal can be sent out through the connection, and a receiver of the connection responds after receiving the detection signal. After determining that the connection is connected, the method for detecting a connection with remote assistance by a mobile terminal according to this embodiment switches the connection state to an active but unstable connection state, rather than directly switching the connection state to an active state after determining that the connection is connected. The state switching transition avoids the unstable state of the previously determined stable state when the connection is interrupted due to the interruption or other problems of the subsequent transmission channel of the detection signal, and further improves the stability of transmission. When the connection is in an operating but unstable connection state, whether the connection can stably operate or not can be determined according to a signal detection response result of the connection within a specified time, and an important basis is provided for selecting an optimal connection. And finally, selecting a connection capable of running stably according to the detection result to establish remote assistance between the sender and the receiver. Therefore, the method provided by the embodiment of the invention can provide a connection channel capable of ensuring stable and rapid signal transmission for the user when the mobile terminal is remotely assisted. The problems of signal interruption, data packet loss and the like are avoided, the stability of the network is improved, the data transmission time is shortened, the data accuracy is ensured, the user experience is improved, and great convenience is provided for users.
The foregoing description is only an overview of the technical solutions of the present invention, and the embodiments of the present invention are described below in order to make the technical means of the present invention more clearly understood and to make the above and other objects, features, and advantages of the present invention more clearly understandable.
The above and other objects, advantages and features of the present invention will become more apparent to those skilled in the art from the following detailed description of specific embodiments thereof, taken in conjunction with the accompanying drawings.
Detailed Description
Exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
In order to solve the above technical problem, an embodiment of the present invention provides a remote-assisted connection detection method for a mobile terminal. Fig. 1 is a process flow diagram of a method for remotely assisted connection detection by a mobile terminal according to an embodiment of the present invention. As shown in fig. 1, the method for remotely assisting a connection detection by a mobile terminal at least includes steps S102 to S106:
step S102, initiating a connection request of remote assistance to a receiver of the remote assistance through a network;
step S104, performing connection detection on a plurality of connection (connection) provided by a plurality of relay stations existing between a sender and a receiver, wherein each connection is detected according to the following steps:
sending out a detection signal through the connecting line; when a response message aiming at the detection signal from the receiver is received for the first time through the connection, the state of the connection is switched to a connection state which is in operation but unstable; determining whether the connection line can stably run or not according to a signal detection response result of the connection line within a specified time;
and step S106, selecting a connection capable of running stably to establish remote assistance between the sender and the receiver.
The embodiment of the invention provides a connection detection method for remote assistance of a mobile terminal, aiming at solving the problems that network signals are unstable and data packets are frequently lost in the remote assistance process of the mobile terminal due to different operators to which the mobile terminal of a user belongs or different networks used by the user when the mobile terminal belongs to the same operator when the mobile terminal is remotely assisted. The method can provide a high-quality transmission channel for the user when the mobile terminal performs remote assistance so as to fulfill the aim of quickly, completely and stably transmitting data, and simultaneously can improve the safety performance of a network, ensure the accuracy of the data and improve the user experience. Specifically, the method for detecting the connection between the remote assistance of the mobile terminal includes that firstly, an initiator of the remote assistance can initiate a connection request of the remote assistance to a receiver of the remote assistance through a network, after the receiver of the remote assistance receives a signal of the connection request, the receiver of the remote assistance responds to the signal to indicate that a transmission channel between the receiver of the remote assistance and the receiver of the remote assistance is communicated, and after receiving the response, a sender of the remote assistance can establish connection on the transmission channel to perform corresponding data transmission. However, there are multiple connection channels between the sending side and the receiving side of the remote assistance, and in order to ensure the stability of the signal and the accuracy of the data, the multiple connection provided by multiple relay stations existing between the sending side and the receiving side may be subjected to connection detection to find one channel with the most stable transmission signal and the fastest transmission speed, so as to establish the remote assistance between the sending side and the receiving side. When each specific connection is detected, a detection signal can be sent out through the connection, and a receiver of the connection responds after receiving the detection signal. After determining that the connection is connected, the method for detecting a connection with remote assistance by a mobile terminal according to this embodiment switches the connection state to an active but unstable connection state, rather than directly switching the connection state to an active state after determining that the connection is connected. The state switching transition avoids the unstable state of the previously determined stable state when the connection is interrupted due to the interruption or other problems of the subsequent transmission channel of the detection signal, and further improves the stability of transmission. When the connection is in an operating but unstable connection state, whether the connection can stably operate or not can be determined according to a signal detection response result of the connection within a specified time, and an important basis is provided for selecting an optimal connection. And finally, selecting a connection capable of running stably according to the detection result to establish remote assistance between the sender and the receiver. Therefore, the method provided by the embodiment of the invention can provide a connection channel capable of ensuring stable and rapid signal transmission for the user when the mobile terminal is remotely assisted. The problems of signal interruption, data packet loss and the like are avoided, the stability of the network is improved, the data transmission time is shortened, the data accuracy is ensured, the user experience is improved, and great convenience is provided for users.
Specifically, when the method for detecting a connection with remote assistance of a mobile terminal provided by the embodiment of the present invention is used, for example, the mobile terminal (a mobile phone, a tablet computer, etc., and a commonly used mobile phone is taken as an example in the following) frequently used by a user is used for remote assistance. For example, the mobile terminal held by the user a is an initiator of the remote assistance (for convenience of identification, referred to as user a for short), and the mobile terminal held by the user B is a receiver of the remote assistance (referred to as user B for short). By using the method provided by the embodiment of the invention, the initiator of the remote assistance (namely, the user A) initiates the connection request of the remote assistance of the mobile phone to the receiver of the remote assistance (namely, the user B) through the network, and the user B makes corresponding feedback to the request signal after receiving the connection request signal. If user B accepts the request, the remote assistance link is switched on, and user A, B can perform remote assistance via the link. If user B rejects the request, the remotely assisted link is broken. Meanwhile, after the user B accepts the request, the remote assistance may be performed through a plurality of wires. Fig. 2 is a schematic diagram of various connection modes between remote assistance of a mobile terminal according to an embodiment of the invention. As shown in fig. 2, the connection between the user a and the user B may be established by direct transfer, or may be established by a transit server. P2P (Peer-to-Peer network) is a distributed application architecture that distributes tasks and workloads among peers (peers), and is a networking or networking form of Peer-to-Peer computing model formed at the application layer. STUN (simple traversal of UDP over NATS, UDP simple traversal of Network Address Translation) is a Network protocol that allows a client located behind NAT (or multiple NATS) to find out its public Network Address, which is located behind the NAT of which type and the Network port to which the NAT is bound to a certain local port. UDP (user datagram Protocol) is a connectionless transport layer Protocol in an OSI (Open System Interconnection) reference model, and provides a transaction-oriented simple unreliable information transfer service. TCP (Transmission Control Protocol) is a connection-oriented, reliable transport layer communication Protocol based on a byte stream. Different connections may be selected for establishing a connection during remote assistance between user a and user B. In this embodiment, user a is the party initiating the connection (ICE _ control), and user B is the party receiving the connection (ICE _ CONTROLLED). When establishing a connection, the connection state (connection state) is divided into two types: connected and disconnected (not connected) (TCP connection will have a disconnected state). The reception state (downlink transmission) is divided into two types: reception not operating (not receiving) and reception operating (receiving). The write state (uplink) is divided into four types: initial state (init), transfer in operation but unstable (random), transfer in operation (write), and transfer timeout (timeout).
Accordingly, the deployment selection of the relay server and the selection of the connection mode directly affect the quality of the connection, so that in order to facilitate remote assistance, signals can be more stable, data transmission can be smoother, and connection detection can be performed on a plurality of connections provided by a plurality of relay stations existing between the user a and the user B, so as to find an optimal connection channel to establish connection between the users A, B.
Further, the multiple links provided by the multiple relay stations existing between the user a and the user B are detected, and at least one link for connecting may be selected from the multiple links provided by the multiple relay stations by using a preset rule. There are various ways to select the detected connection line by using the predetermined rule, and fig. 3 is a diagram illustrating three ways to select the detected connection line by using the predetermined rule according to an embodiment of the present invention. As shown in fig. 3:
first, a Selected connection (Selected connection) that has been Selected before the connection may be Selected.
Second, a connection that has not been probed the longest from among the connections that have not been in an inactive state and that have been previously probed successfully (among the connections that have not been written and that have been successfully ping, the connection that has not been ping the longest) may be selected.
Third, the connection that has not been probed the longest from the current (connection with no ping the longest) may be selected.
After the connection line is selected according to the method, the embodiment provides a detection method for specifically detecting the connection line. Fig. 4 is a flowchart of a process of probing each connection provided by a plurality of relay stations existing between a transmitting side and a receiving side according to an embodiment of the present invention. As shown in fig. 4, the detection method at least includes steps S402 to S406:
step S402, sending out a detection signal through the connecting line;
step S404, when a response message of a receiver for the detection signal is received for the first time through the connection, the state of the connection is switched to a connection state which is in operation but unstable;
step S406, determining whether the connection line can stably operate according to the signal detection response result of the connection line within the designated time.
Specifically, the user a may send out a ping (packet Internet groper) through the connection. PING is a command under Windows, Unix and Linux systems, and is also an internet packet explorer to check if the network is open or to determine the speed of the network connection. The uniqueness of the IP address of the machine on the network is utilized to send a data packet to the target IP address, and then the opposite side is required to return a data packet with the same size to determine whether the two network machines are connected and communicated and determine the specific time delay. At regular intervals, an attempt can be made to select a connection to send out PING (which may not be selected and not sent), and in this case, two modes are adopted: a frequent mode and a general mode. The frequent mode is to send PING to the selected connection every 48ms, and the general mode is to send PING to the selected connection every 250 ms. A minimum time interval may also be set, and PING may be sent to the selected link once per time interval, which may be determined based on the state of the selected link. Therefore, after the step S402 is finished, the user B receives the probe signal sent by the user a, and makes a corresponding feedback for the signal, and when the user a receives a response message of the user B for the probe signal for the first time through the connection, the state of the connection is switched accordingly.
Fig. 5 illustrates a prior state transition diagram for a mobile terminal remotely assisted connection according to one embodiment of the present invention. As shown in fig. 5, the user a sends out a probe signal through the connection, the user B receives the probe signal sent by the user a and makes feedback, and generates an initial state of connection (step 51), when the user a receives a response message for the signal from the user B for the first time through the connection, the state of the connection is switched to be in operation (step 52), if the response message for the probe signal is not received too long after the state, the state is switched to be in operation but unstable (step 53), if the response message is received in the state of being in operation but unstable, the connection state is switched to be in operation again (step 54), if the response message is not received too long, a timeout is transmitted (step 55), and the connection mode is destroyed (destroy) (step 57). If the connection status is in the forwarding operation and has the same network cost and priority, the forwarding time-out is expired (step 56), and the connection is destroyed (step 57). However, when the mobile phone is used for remote assistance, the original network signal may be stable, but the network signal may be unstable after a period of time, and the problem of signal interruption cannot be avoided.
To this end, the embodiment of the present invention executes step S404, and fig. 6 shows a state transition diagram of the present invention for a remote-assisted connection of a mobile terminal according to an embodiment of the present invention. As shown in fig. 6, user B receives the probe signal sent by user a and makes feedback, an initial state of connection is generated (step 61), when the user a receives the response message of the user B to the signal for the first time via the connection, if the network condition can be clearly determined to be a stable state, at this time, in order to speed up the speed of establishing the connection, the link may be set directly to an active state and an attempt may be made to transmit (step 62-a), if the stability of the network is not clear, the state of the connection is switched to operational but unstable (step 62-b), at which time upon remote assistance with the handset, the user does not consider the network to be in a stable state directly as in the prior art, but considers the network to be in an unstable state, and then signal detection can be continued, and a more stable connection line can be found to avoid the problems of signal interruption and the like.
After the step S404 is finished, it is determined that the connection between the user a and the user B is in an operating but unstable state, and in order to find a more stable connection, signal detection is continued, step S406 is executed, and it is further determined whether the connection can operate stably according to a signal detection response result of the connection within a specified time. When the stable state of the connection line is further judged according to the signal detection response result of the connection line, the method can be divided into two aspects:
in a first aspect, it is determined whether a response message can continue to be received from a recipient within a specified time.
Specifically, the signal detection response result of the connection line is analyzed and judged, if the user a can continuously receive the response message from the user B within the specified time, the connection line is always in a connected state, data transmission can be provided for the user, the state of the connection line is further modified into an operable state, and the connection line is determined to be in a stable operation state. If the user A does not receive the response message from the user B within the specified time, which indicates that the connection line is interrupted, the connection line is destroyed and is not considered any more.
In the second aspect, the connection is cyclically detected within a specified time to obtain a cyclic detection result, and then whether the connection can stably run is further determined by combining the current connection state of the connection and the cyclic detection result.
Specifically, when the link first enters an operational but unstable state, a loop probe is initiated, with 10 PING attempts per round. If there is a connection that has not been completed by the basic PING number of times or the state of the connection is unstable, a frequent probing mode may be adopted to send PING to the connection every 48 ms. When the connection which is selected before the current connection is selected is circularly detected, if the connection is in an operating but unstable state, PING can be sent to the connection every 900 ms. If the connection is in an operating state, PING can be sent to the connection once every 2500ms, at least 5 PINGs should be sent, and if there is an unresponsive PING, the sending Time does not exceed 2 times of the average RTT (Round-Trip Time, delay Time). When the backup connection line is circularly detected, PING can be sent to the connection line once every 2500 ms. If the connection between the user a and the user B is in an operating but unstable state, it can be further determined whether the connection can be stably operated according to the loop detection result. And when the detection failure times are not more than the preset threshold value according to the cyclic detection result, the current state of the connection line is relatively stable. As shown in fig. 6, if the preset threshold is 3, when the detection failure times of the loop detection result are 0, 1, 2, and 3, it indicates that the detection failure times are not greater than the preset threshold, and it is determined that the connection can stably operate, the connection state is switched to operation (step 63). If the connection state between the user a and the user B is in operation, at this time, it may be further determined whether the connection can be stably operated by combining the loop detection result. When the loop detection result indicates that the detection failure times are greater than the preset threshold, it indicates that the current state of the connection is unstable, as shown in fig. 6, the preset threshold is 3, and when the detection failure times of the loop detection result is 4, 5, 6, and 7 … …, it indicates that the detection failure times are greater than the preset threshold, and it is determined that the operation of the connection is unstable, the connection is switched to the connection state in operation but unstable (step 64). If a response message to the probe is not received too long in this state, a timeout is transmitted (step 65) and the connection is destroyed (step 66).
After the above steps are completed, if it is determined that at least two connection lines can stably operate by combining the current connection line state of the connection lines and the cyclic detection result, when the connection lines capable of stably operating are selected to establish remote assistance between the sender and the receiver, the number of cyclic detection failures of each connection line can be further compared, and the connection lines with the fewest cyclic detection failure times have higher stability when the number of cyclic detection failures is smaller, and the connection lines with the fewest cyclic detection failure times can be selected to establish remote assistance between the sender and the receiver. For example, if it is determined that three connection lines can stably operate by combining the current connection line state of the connection line and the cyclic detection result, where the cyclic detection failure frequency of the first connection line is 1, the cyclic detection failure frequency of the second connection line is 2, and the cyclic detection failure frequency of the third connection line is 3, the first connection line with the smallest cyclic detection failure frequency is selected to establish remote assistance between the sender and the receiver.
Further, when selecting a connection capable of running stably to establish remote assistance between the sender and the receiver, in addition to the above selection determination method, if there are multiple connections capable of running stably, the optimal connection may be selected to establish remote assistance between the sender and the receiver by referring to the time when the receiver receives the data packet last time or parameters such as the delay time RTT of each connection. For example, when a link is in an active state, if more than 5 PINGs have not yet returned and the time interval has exceeded the average RTT, and the earliest time interval in the not-returned PINGs exceeds 5000ms, the link is switched to an active but unstable state. When the connection is in an unstable state or an initial state, if the earliest time interval in the not-returned PING exceeds 5000ms, the transmission is overtime, and the connection mode of the connection is destroyed.
After selecting an optimal connection line to establish remote assistance between a sender and a receiver, if a network environment of the remote assistance changes, for example, a new connection line is generated in the network environment (a new connection is generated (a change occurs)), a connection line is destroyed in the network environment (a connection is destroyed), a connection state in the network environment is changed (a connection state or a receive state or a write state of the connection changes), a receiving end receives a remote probing signal (an ICE _ CONTROLLED end receives a remote ping), or a receiving end receives a remote data packet (an ICE _ CONTROLLED end receives a remote data packet), and the like, the connection line is selected again between the initiator and the receiver to establish the remote assistance.
In summary, the method for detecting a connection line remotely assisted by a mobile terminal according to the embodiments of the present invention can provide a connection channel capable of ensuring stable and fast signal transmission for a user during remote assistance of the mobile terminal. The problems of signal interruption, data packet loss and the like are avoided, the network stability is improved, the data transmission time is shortened, the data accuracy is ensured, the user experience is improved, and great convenience is provided for users.
Based on the same inventive concept, the embodiment of the invention also provides a remote-assisted connection detection device of the mobile terminal. FIG. 7 shows a schematic block diagram of a mobile terminal remotely assisted wire probing apparatus according to one embodiment of the present invention. As shown in fig. 7, the connection detecting apparatus remotely assisted by a mobile terminal at least includes:
a connection request initiating module 710, adapted to initiate a connection request of remote assistance to a receiver of remote assistance through a network;
a connection detection module 720, coupled to the connection request initiation module 710, adapted to perform connection detection on a plurality of connections provided by a plurality of relay stations existing between the sender and the receiver, where each connection is detected according to the following steps: sending out a detection signal through the connecting line; when a response message aiming at the detection signal from the receiver is received for the first time through the connection, the state of the connection is switched to a connection state which is in operation but unstable; determining whether the connection line can stably run or not according to a signal detection response result of the connection line within a specified time;
a remote assistance establishing module 730, coupled to the connection detecting module 720, is adapted to select a connection capable of stable operation to establish remote assistance between the sender and the receiver.
In a preferred embodiment, the wire probing module 720 is further adapted to:
determining whether a response message from the receiver can be continuously received within a specified time;
if so, modifying the state of the connecting line into an operable state, and determining that the connecting line is in a stable operating state;
if not, the connection is determined to be interrupted.
In a preferred embodiment, the wire probing module 720 is further adapted to:
carrying out cyclic detection on the connection line within a specified time to obtain a cyclic detection result;
and further determining whether the connection can stably run or not by combining the current connection state of the connection and the loop detection result.
In a preferred embodiment, the wire probing module 720 is further adapted to:
if the current connection state of the connection is in operation but unstable, and the detection failure times are not less than a preset threshold value as a cyclic detection result, determining that the connection can stably operate;
and if the current connection state of the connection is in operation and the detection failure times are larger than a preset threshold value according to the cyclic detection result, determining that the connection is switched to the connection state which is in operation but unstable.
In a preferred embodiment, the remote assistance setup module 730 is further adapted to:
if the current connection state of the connection lines and the cyclic detection result are combined to determine that at least two connection lines can stably run, further comparing the cyclic detection failure times of the connection lines;
the connection with the least number of failed cyclic probing is selected to establish remote assistance between the sender and the receiver.
In a preferred embodiment, the remote assistance setup module 730 is further adapted to:
when a plurality of lines capable of stably running exist, determining an optimal line by combining at least one of the following parameters: the time of receiving the data packet last time by the receiver and the delay time RTT of each connection line;
and selecting an optimal connection line to establish remote assistance between the sender and the receiver.
In a preferred embodiment, the wire probing module 720 is further adapted to:
selecting at least one connection line for connection detection from a plurality of connection lines provided by a plurality of relay stations by adopting a preset rule;
performing connection detection on at least one selected connection;
wherein the preset rule comprises at least one of the following:
connecting the selected connection before the current connection;
in the links which are in a non-running state and are detected successfully before, the links which are not detected for the longest time from the current link are detected;
the links that have not been probed the longest from the current.
In a preferred embodiment, as shown in fig. 8, the mobile terminal remote assisted connection detecting apparatus further includes:
a restart module 740, coupled to the remote assistance establishing module 730, is adapted to reselect a connection between the initiator and the receiver to establish the remote assistance if the network environment of the remote assistance changes.
In a preferred embodiment, the change in the remotely assisted network environment in the restart module 740 comprises at least one of:
a new connection is generated in the network environment;
a connecting line in the network environment is destroyed;
the state of the connection in the network environment is changed;
a receiving end receives a remote detection signal;
the receiving end receives the remote data packet.
In a preferred embodiment, the detection signal is an internet detector.
In addition, an embodiment of the present invention further provides a mobile terminal, as shown in fig. 9, including a processor and a memory: the memory is used for storing a program for executing the mobile terminal remote assisted connection detection method provided by any one or the combination of the above preferred embodiments;
the processor is configured to execute programs stored in the memory.
For convenience of explanation, fig. 9 only shows a part related to the embodiment of the present invention, and details of the technology are not disclosed. The mobile terminal may include any terminal device such as a mobile phone, a tablet computer, a PDA (personal digital Assistant), a POS (Point of Sales), and a vehicle-mounted computer, taking the terminal as the mobile phone as an example:
fig. 9 is a block diagram illustrating a partial structure of a mobile phone related to a mobile terminal according to an embodiment of the present invention. Referring to fig. 9, the handset includes: radio Frequency (RF) circuit 910, memory 920, input unit 930, display unit 940, sensor 950, audio circuit 960, wireless fidelity (WiFi) module 970, processor 980, and power supply 990. Those skilled in the art will appreciate that the handset configuration shown in fig. 9 is not intended to be limiting and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
The following describes each component of the mobile phone in detail with reference to fig. 9:
the RF circuit 910 may be used for receiving and transmitting signals during information transmission and reception or during a call, and in particular, for receiving downlink information of a base station and then processing the received downlink information to the processor 980; in addition, the data for designing uplink is transmitted to the base station. In general, the RF circuit 910 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like. In addition, the RF circuit 910 may also communicate with networks and other devices via wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to global system for Mobile communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), and the like.
The memory 920 may be used to store software programs and modules, and the processor 980 may execute various functional applications and data processing of the mobile phone by operating the software programs and modules stored in the memory 920. The memory 920 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data (such as audio data, a phonebook, etc.) created according to the use of the cellular phone, and the like. Further, the memory 920 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 930 may be used to receive input numeric or character information and generate key signal inputs related to user settings and function control of the cellular phone. Specifically, the input unit 930 may include a touch panel 931 and other input devices 932. The touch panel 931, also referred to as a touch screen, may collect a touch operation performed by a user on or near the touch panel 931 (e.g., a user's operation on or near the touch panel 931 using a finger, a stylus, or any other suitable object or accessory), and drive a corresponding connection device according to a preset program. Alternatively, the touch panel 931 may include two parts, a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 980, and can receive and execute commands sent by the processor 980. In addition, the touch panel 931 may be implemented by various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. The input unit 930 may include other input devices 932 in addition to the touch panel 931. In particular, other input devices 932 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 940 may be used to display information input by the user or information provided to the user and various menus of the mobile phone. The display unit 940 may include a display panel 941, and optionally, the display panel 941 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like. Further, the touch panel 931 may cover the display panel 941, and when the touch panel 931 detects a touch operation on or near the touch panel 931, the touch panel transmits the touch operation to the processor 980 to determine the type of the touch event, and then the processor 980 provides a corresponding visual output on the display panel 941 according to the type of the touch event. Although in fig. 9, the touch panel 931 and the display panel 941 are two independent components to implement the input and output functions of the mobile phone, in some embodiments, the touch panel 931 and the display panel 941 may be integrated to implement the input and output functions of the mobile phone.
The handset may also include at least one sensor 950, such as a light sensor, motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor that adjusts the brightness of the display panel 941 according to the brightness of ambient light, and a proximity sensor that turns off the display panel 941 and/or backlight when the mobile phone is moved to the ear. As one of the motion sensors, the accelerometer sensor can detect the magnitude of acceleration in each direction (generally, three axes), can detect the magnitude and direction of gravity when stationary, and can be used for applications of recognizing the posture of a mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer and tapping), and the like; as for other sensors such as a gyroscope, a barometer, a hygrometer, a thermometer, and an infrared sensor, which can be configured on the mobile phone, further description is omitted here.
Audio circuitry 960, speaker 961, microphone 962 may provide an audio interface between a user and a cell phone. The audio circuit 960 may transmit the electrical signal converted from the received audio data to the speaker 961, and convert the electrical signal into a sound signal for output by the speaker 961; on the other hand, the microphone 962 converts the collected sound signal into an electrical signal, converts the electrical signal into audio data after being received by the audio circuit 960, and outputs the audio data to the processor 980 for processing, and then transmits the audio data to, for example, another mobile phone through the RF circuit 910, or outputs the audio data to the memory 920 for further processing.
WiFi belongs to short-distance wireless transmission technology, and the mobile phone can help a user to receive and send e-mails, browse webpages, access streaming media and the like through the WiFi module 970, and provides wireless broadband Internet access for the user. Although fig. 9 shows the WiFi module 970, it is understood that it does not belong to the essential constitution of the handset, and can be omitted entirely as needed within the scope not changing the essence of the invention.
The processor 980 is a control center of the mobile phone, connects various parts of the entire mobile phone by using various interfaces and lines, and performs various functions of the mobile phone and processes data by operating or executing software programs and/or modules stored in the memory 920 and calling data stored in the memory 920, thereby integrally monitoring the mobile phone. Alternatively, processor 980 may include one or more processing units; preferably, the processor 980 may integrate an application processor, which primarily handles operating systems, user interfaces, applications, etc., and a modem processor, which primarily handles wireless communications. It will be appreciated that the modem processor described above may not be integrated into the processor 980.
The handset also includes a power supply 990 (e.g., a battery) for supplying power to the various components, which may preferably be logically connected to the processor 980 via a power management system, thereby providing management of charging, discharging, and power consumption via the power management system.
Although not shown, the mobile phone may further include a camera, a bluetooth module, etc., which are not described herein.
The method and the device for detecting the connection line remotely assisted by the mobile terminal provided by the embodiment of the invention can achieve the following beneficial effects:
the embodiment of the invention provides a connection detection method for remote assistance of a mobile terminal, aiming at solving the problems that network signals are unstable and data packets are frequently lost in the remote assistance process of the mobile terminal due to different operators to which the mobile terminal of a user belongs or different networks used by the user when the mobile terminal belongs to the same operator when the mobile terminal is remotely assisted. The method can provide a high-quality transmission channel for the user when the mobile terminal performs remote assistance so as to fulfill the aim of complete, stable and quick data transmission, and simultaneously can improve the safety performance of the network, ensure the accuracy of the data and improve the user experience. Specifically, the method for detecting the connection between the remote assistance of the mobile terminal includes that firstly, an initiator of the remote assistance can initiate a connection request of the remote assistance to a receiver of the remote assistance through a network, after the receiver of the remote assistance receives a signal of the connection request, the receiver of the remote assistance responds to the signal to indicate that a transmission channel between the receiver of the remote assistance and the receiver of the remote assistance is communicated, and after receiving the response, a sender of the remote assistance can establish connection on the transmission channel to perform corresponding data transmission. However, there are multiple connection channels between the sending party and the receiving party for remote assistance, and in order to ensure the stability of signals and the accuracy of data, the multiple connections provided by multiple relay stations existing between the sending party and the receiving party may be subjected to connection detection to find a channel with the most stable transmission signal and the fastest transmission speed. When each specific connection is detected, a detection signal can be sent out through the connection, and a receiver of the connection responds after receiving the detection signal. After determining that the connection is connected, the method for detecting a connection with remote assistance by a mobile terminal according to this embodiment switches the connection state to an active but unstable connection state, rather than directly switching the connection state to an active state after determining that the connection is connected. The state switching transition avoids the unstable state of the previously determined stable state when the connection is interrupted due to the interruption or other problems of the subsequent transmission channel of the detection signal, and further improves the stability of transmission. When the connection is in an operating but unstable connection state, whether the connection can stably operate or not can be determined according to a signal detection response result of the connection within a specified time, and an important basis is provided for selecting an optimal connection. And finally, selecting a connection capable of running stably according to the detection result to establish remote assistance between the sender and the receiver. Therefore, the method provided by the embodiment of the invention can provide a stable and quick signal transmission connection channel for the user when the mobile terminal is remotely assisted. The problems of signal interruption, data packet loss and the like are avoided, the stability of the network is improved, the data transmission time is shortened, the data accuracy is ensured, the user experience is improved, and great convenience is provided for users.
In the description provided herein, numerous specific details are set forth. It is understood, however, that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures and techniques have not been shown in detail in order not to obscure an understanding of this description.
Similarly, it should be appreciated that in the foregoing description of exemplary embodiments of the invention, various features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof for the purpose of streamlining the disclosure and aiding in the understanding of one or more of the various inventive aspects. However, the disclosed method should not be interpreted as reflecting an intention that: that the invention as claimed requires more features than are expressly recited in each claim. Rather, as the following claims reflect, inventive aspects lie in less than all features of a single foregoing disclosed embodiment. Thus, the claims following the detailed description are hereby expressly incorporated into this detailed description, with each claim standing on its own as a separate embodiment of this invention.
Those skilled in the art will appreciate that the modules in the device in an embodiment may be adaptively changed and disposed in one or more devices different from the embodiment. The modules or units or components of the embodiments may be combined into one module or unit or component, and furthermore they may be divided into a plurality of sub-modules or sub-units or sub-components. All of the features disclosed in this specification (including any accompanying claims, abstract and drawings), and all of the processes or elements of any method or apparatus so disclosed, may be combined in any combination, except combinations where at least some of such features and/or processes or elements are mutually exclusive. Each feature disclosed in this specification (including any accompanying claims, abstract and drawings) may be replaced by alternative features serving the same, equivalent or similar purpose, unless expressly stated otherwise.
Furthermore, those skilled in the art will appreciate that while some embodiments described herein include some features included in other embodiments, rather than other features, combinations of features of different embodiments are meant to be within the scope of the invention and form different embodiments. For example, in the claims, any of the claimed embodiments may be used in any combination.
The various component embodiments of the invention may be implemented in hardware, or in software modules running on one or more processors, or in a combination thereof. Those skilled in the art will appreciate that a microprocessor or Digital Signal Processor (DSP) may be used in practice to implement some or all of the functions of some or all of the components of a mobile terminal remotely assisted line probing apparatus according to embodiments of the present invention. The present invention may also be embodied as apparatus or device programs (e.g., computer programs and computer program products) for performing a portion or all of the methods described herein. Such programs implementing the present invention may be stored on computer-readable media or may be in the form of one or more signals. Such a signal may be downloaded from an internet website or provided on a carrier signal or in any other form.
It should be noted that the above-mentioned embodiments illustrate rather than limit the invention, and that those skilled in the art will be able to design alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
Thus, it should be appreciated by those skilled in the art that while a number of exemplary embodiments of the invention have been illustrated and described in detail herein, many other variations or modifications consistent with the principles of the invention may be directly determined or derived from the disclosure of the present invention without departing from the spirit and scope of the invention. Accordingly, the scope of the invention should be understood and interpreted to cover all such other variations or modifications.