Line hopping method, communication device and communication system in communication processTechnical Field
The present invention relates to the field of communications, and in particular, to a method, a device and a system for line hopping in a communication process.
Background
In the existing communication system, both communication parties use fixed lines to transmit communication data, taking a mobile user as an example, a calling terminal and a called terminal always use a fixed transmission line of a mobile operator to transmit communication data in the process of communication, and then taking a terminal installed with a wechat application as an example, when the user uses wechat with friends, for example, sending a short message or using a "push-to-talk" function, the user uses a network line to transmit voice data, that is, in the existing communication system, both communication parties use fixed lines to transmit communication data, once the fixed communication lines are maliciously monitored, the communication data transmitted by both communication parties can be maliciously stolen, and the safety of the communication information of both communication parties cannot be ensured.
Disclosure of Invention
The invention aims to solve one of the problems that the communication information safety of both communication parties cannot be ensured by adopting a fixed line to transmit communication data.
The present invention mainly aims to provide a method, a communication device and a communication system for line hopping in a communication process.
In order to achieve the purpose, the technical scheme of the invention is realized as follows:
according to an aspect of the present invention, there is provided a method for line hopping during communication, including:
in the process that the communication terminal communicates with the opposite communication terminal, when the communication terminal meets a preset jump triggering rule, a new communication line is selected according to the preset line jump rule, the currently used communication line is changed into the new communication line in a jump mode, and communication data are transmitted by the communication line after the jump.
According to an aspect of the present invention, there is provided a communication apparatus including:
the communication module is used for communicating with an opposite-end communication device;
the circuit hopping module is used for selecting a new communication circuit according to a preset circuit hopping rule and hopping the currently used communication circuit into the new communication circuit when the preset hopping trigger rule is met in the process of communicating with the opposite-end communication device;
and the communication module is also used for transmitting the communication data by using the communication line after jumping.
According to an aspect of the present invention, there is provided a communication system including a first terminal and a second terminal; the first terminal comprises the communication device; the second terminal comprises the communication device as described above.
Compared with the prior art, the line hopping method, the communication device and the communication system in the communication process can perform line hopping when the preset hopping trigger rule is met, so that data transmission is performed by using a new communication line, the defect that data transmission is performed by using a fixed communication line is overcome, the problem that once the fixed communication line is maliciously monitored, communication data transmitted by two communication parties can be maliciously stolen is solved, and the safety of communication information of the two communication parties is ensured.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments are briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on the drawings without creative efforts.
Fig. 1 is a flowchart of a method for line hopping in a communication process according to embodiment 1 of the present invention;
fig. 2 is a flowchart of line hopping in a communication process between terminals according to embodiment 2 of the present invention;
fig. 3 is a flowchart illustrating negotiating a public line pool according to respective communication network capabilities in a communication process between the terminals in fig. 2 according to embodiment 2 of the present invention;
fig. 4 is another flowchart, according to embodiment 2 of the present invention, for negotiating a public line pool according to respective communication network capabilities in a communication process between terminals in fig. 2;
fig. 5 is a flowchart of line hopping during communication between terminals according to another embodiment 2 of the present invention;
fig. 6 is a flowchart of line hopping during communication between terminals according to another embodiment 2 of the present invention;
fig. 7 is a schematic structural diagram of a communication system according to embodiment 3 of the present invention;
fig. 8 is a schematic structural diagram of a communication device according to embodiment 3 of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention are clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present invention without making any creative effort, shall fall within the protection scope of the present invention.
In the description of the present invention, it is to be understood that the terms "center", "longitudinal", "lateral", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", and the like, indicate orientations or positional relationships based on those shown in the drawings, and are used only for convenience in describing the present invention and for simplicity in description, and do not indicate or imply that the referenced devices or elements must have a particular orientation, be constructed and operated in a particular orientation, and thus, are not to be construed as limiting the present invention. Furthermore, the terms "first," "second," and the like are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or quantity or location.
In the description of the present invention, it should be noted that, unless otherwise explicitly specified or limited, the terms "mounted," "connected," and "connected" are to be construed broadly, e.g., as meaning either a fixed connection, a removable connection, or an integral connection; can be mechanically or electrically connected; they may be connected directly or indirectly through intervening media, or they may be interconnected between two elements. The specific meanings of the above terms in the present invention can be understood in specific cases to those skilled in the art.
Embodiments of the present invention will be described in further detail below with reference to the accompanying drawings.
Example 1
Fig. 1 shows a method for line hopping in a communication process according to an embodiment of the present invention, and referring to fig. 1, the method for line hopping in a communication process according to an embodiment of the present invention includes the following steps S101 to S103: wherein:
s101: the communication terminal communicates with a communication opposite terminal;
the communication terminal and the opposite communication terminal in this embodiment may be mobile terminals such as a mobile phone and an IPAD, or may be terminals such as a PC that can perform network communication, and the communication between the communication terminal and the opposite communication terminal may include a call, a short message, an email between the communication terminals, communication of APP applications installed on the terminal (e.g., voice chat or messaging of qq or WeChat), and the like.
S102: in the process that the communication terminal communicates with the opposite communication terminal, when the communication terminal meets a preset jump triggering rule, a new communication line is selected according to the preset line jump rule, and the currently used communication line is changed into the new communication line in a jump mode;
the embodiment can perform line hopping when the preset hopping trigger rule is met, so that data transmission is performed by using a new communication line, the defect that data transmission is performed by using a fixed communication line is overcome, the problem that once the fixed communication line is maliciously monitored, the communication data transmitted by two communication parties can be maliciously stolen is solved, and the safety of communication information of the two communication parties is ensured.
In an optional implementation manner of this embodiment, before the preset transition triggering rule is satisfied, or after the preset transition triggering rule is satisfied, a new communication line is selected according to a preset line transition rule, and before a currently used communication line is changed to a new communication line by a hop, the method of this embodiment further includes:
the communication terminal and the communication opposite terminal negotiate a public line pool according to respective communication network capabilities, and the public line pool comprises one or more communication lines which are common to the communication terminal and the communication opposite terminal. In this alternative embodiment, a new communication line may be selected from the public line pool according to a preset line hopping rule.
In this embodiment, the line hopping may be performed when a preset hopping trigger rule is satisfied, but the common line pool may be negotiated at any time in the communication process, for example, the common line pool is negotiated before the preset hopping trigger rule is satisfied, or the common line pool is negotiated after the preset hopping trigger rule is satisfied, and the line hopping is performed according to the preset hopping rule after the common line pool is negotiated, so that the common line pool may be negotiated at any time, user experience is improved, and security of communication information of both parties of communication is ensured.
In this alternative embodiment, the communication network capabilities of the communication terminal include: the communication terminal currently supports the used communication lines, for example, the communication terminal currently supports the use of a mobile line, a communication line, a telecommunication line, a network line, and the currently supported 4 communication lines of the communication terminal may respectively correspond to the corresponding line identifiers K1, K2, K3, K4, or may further include: the account number currently supported and used by the communication terminal comprises: the user's cell phone number and account number of APP application, e.g., the user has one or more cell phone numbers (including one or more unicom numbers and one or more mobile numbers) and account numbers of one or more APP applications (QQ2, WeChat, SKYPE, etc.), these account numbers can be communicated, for example, the communication terminal a has 5 mobile phone numbers, the communication opposite terminal B has 3 mobile phone numbers, when meeting the preset jump triggering rule, the communication terminal A sends a new mobile phone number to the communication opposite terminal B according to the preset rule, and the communication opposite terminal B knows that the communication terminal A jumps to the new mobile phone number, then a new communication line is formed with the new mobile phone number, further, the communication opposite terminal B can also jump to the new mobile phone number, and sends the mobile phone number to be jumped to the communication terminal a, and the two can form a new communication line according to the respective jumped new mobile phone numbers. Of course, the hopping may also be performed between the operator lines, or between the operator lines and the network lines, for example, in a case where the user supports a network (e.g., a 4G network), the communication terminal and the correspondent node are friends of a wechat phone, and then the communication terminal and the correspondent node may switch between the wechat (network line) and the mobile number (mobile line) to use a dial-up phone. Therefore, when the communication terminal communicates with the communication opposite terminal, the communication terminal can detect the communication line which can be connected with the communication opposite terminal according to the communication network capacity of the communication terminal, determine the communication line which can be used by the communication terminal and form a line pool of the communication terminal.
In this optional embodiment, the negotiation of the public line pool by the communication terminal and the communication peer according to their respective communication network capabilities includes various specific implementation manners, which are described below by way of example, but other manners of negotiating the public line pool are not excluded.
In an optional implementation manner of this embodiment, the negotiating, by the communication terminal and the correspondent node, a public line pool according to respective communication network capabilities includes:
the communication terminal detects the communication network capacity of the communication terminal to form a first line pool and sends the first line pool to a communication opposite terminal;
after receiving the first line pool, the communication opposite end detects the communication network capacity of the communication opposite end to form a second line pool, forms a public line pool according to the first line pool and the second line pool, and sends the public line pool to the communication terminal;
wherein, first circuit pond includes: one or more communication lines for use by the communication terminal, the second line pool comprising: one or more communication lines for use by a correspondent node.
In this optional embodiment, an implementation manner of negotiating a public line pool is provided, and the received line pool may be compared with a line pool generated by the communication peer, or the line pool may be sent by the communication peer, and the received line pool is compared with the line pool generated by the communication peer by the communication terminal (the implementation manner is the same as above, and is not described here again), so that a communication line common to the communication terminal and the communication peer is found, and the public line pool is generated.
In another optional implementation manner of this embodiment, the negotiating, by the communication terminal and the correspondent node, a public line pool according to respective communication network capabilities includes:
the communication terminal detects the communication network capacity of the communication terminal to form a first line pool and sends the first line pool to a communication opposite terminal; after receiving the first line pool, the communication opposite end detects the communication network capacity of the communication opposite end to form a second line pool, and a public line pool is formed according to the first line pool and the second line pool;
the communication opposite terminal detects the communication network capacity of the communication opposite terminal to form a second line pool and sends the second line pool to the communication terminal; after receiving the second line pool, the communication terminal detects the communication network capacity of the communication terminal to form a first line pool, and forms a public line pool according to the first line pool and the second line pool;
wherein, first circuit pond includes: one or more communication lines for use by the communication terminal, the second line pool comprising: one or more communication lines for use by a correspondent node.
In this optional embodiment, an implementation manner of negotiating a public line pool is provided, and a communication terminal and a communication peer may find a communication line common to the communication terminal and the communication peer respectively by comparing a received line pool with a line pool generated by the communication peer, so as to generate the public line pool.
In another optional implementation manner of this embodiment, in a process that the communication terminal communicates with the correspondent node, the method provided in this embodiment further includes: the communication terminal and the communication opposite terminal comprise pre-judging data packets in communication data packets sent to the opposite terminal, and the pre-judging data packets comprise respective communication network capabilities of the communication terminal and the communication opposite terminal; specifically, the prejudged data packet may be a field arranged at the head of the communication data packet, and the field carries a communication network capability, so that in a communication process, the communication terminal and the communication opposite terminal can know the communication network capability of the opposite terminal, and when a public line pool needs to be negotiated, the prejudged data packet to be sent to the communication opposite terminal at present can be compared with the prejudged data packet received from the communication opposite terminal at the last time to form the public line pool;
after meeting the preset jump triggering rule, selecting a new communication line in the public line pool according to the preset line jump rule, and before changing the currently used communication line into the new communication line, the communication terminal and the communication opposite terminal negotiate the public line pool according to respective communication network capabilities, wherein the method comprises the following steps:
after meeting the preset jump triggering rule, the communication terminal compares the prejudged data packet to be sent to the communication opposite terminal currently with the prejudged data packet received from the communication opposite terminal last time, and acquires a public communication line from the two prejudged data packets to form a public line pool, wherein the public line pool comprises one or more communication lines shared by the communication terminal and the communication opposite terminal.
In this optional embodiment, an implementation manner of negotiating a public line pool is provided, and a public line pool may be generated by finding a communication line common to a communication terminal and a communication peer through respective comparison of pre-determined packets.
In an optional implementation manner of this embodiment, the public line pool further includes: the communication terminal and the communication opposite terminal share one or more communication line identifiers, and the line identifiers can be codes of the communication lines, user numbers or user accounts as long as one communication line can be uniquely identified;
the communication terminal selects a new communication line from the public line pool according to a preset line hopping rule, including but not limited to at least one of the following modes:
the first method is as follows: the communication terminal selects the next communication line of the currently used communication line from the public line pool as a new communication line;
in the first mode, communication lines in a public line pool negotiated in advance are used in sequence; for example, a public line pool includes n communication lines: k0, K1 … … Kn, use K0, K1, K2 … … sequentially until the end of communication.
The second method comprises the following steps: the communication terminal calculates a communication line in the public line pool as a new communication line according to a preset algorithm;
in the second mode, as an optional implementation mode, the communication terminal calculates a hopping factor according to a preset algorithm, determines a position of a new communication line in the public line pool according to the hopping factor, and selects the communication line corresponding to the position as the new communication line; for example, pre-negotiated public line pools include: the n communication lines K0, K1 … … Kn, the hopping factor list includes: r0 and R1 … … Rn calculate R0 through a preset algorithm to obtain a communication line K3 pointing to the 4 th position, and the like, and a new communication line is selected.
The third method comprises the following steps: the communication terminal randomly selects a new communication line from the public line pool and sends the line identification of the new communication line to the communication opposite terminal; for example, the public line pool includes n communication lines, and the line identifiers thereof are: k0, K1 … … Kn, the communication terminal randomly selects K3, sends K3 to the opposite communication terminal, and the two communication parties communicate by using the communication line corresponding to K3.
The method is as follows: and the communication terminal receives the line identification of the new communication line sent by the communication opposite terminal and selects the communication line corresponding to the line identification in the public line pool. For example, the public line pool includes n communication lines, and the line identifiers thereof are: and the communication terminals K0 and K1 … … Kn receive the K3, select the communication line corresponding to the K3 from the communication lines in the pre-negotiated public line pool to carry out communication, and carry out communication by using the communication line corresponding to the K3.
In this optional embodiment, the communication terminal and the communication peer may respectively select a next communication line in the public line pool in sequence as a new communication line, or calculate the next communication line as a new communication line according to a preset algorithm, so that after a preset jump triggering rule is satisfied, a line available for communication between the communication terminal and the communication peer is automatically selected, or one party selects a new communication line and notifies the other party, thereby realizing line jump and further ensuring communication safety of both parties.
Further, in an optional implementation manner in this embodiment, after the communication terminal selects a new communication line from the public line pool according to a preset line hopping rule, the method provided in this embodiment further includes: and the communication terminal sends the line identification of the new communication line to the communication opposite terminal. Therefore, the new communication line used by both communication parties is further ensured to be the same line.
In an optional implementation manner of this embodiment, before the preset transition triggering rule is satisfied, or after the preset transition triggering rule is satisfied, a new communication line is selected according to a preset line transition rule, and before a currently used communication line is changed to a new communication line by a hop, the method of this embodiment further includes:
the communication terminal sends the currently used communication network capability to the communication opposite terminal; and/or receiving the currently used communication network capability sent by the communication opposite end;
selecting a new communication line according to a preset line hopping rule, comprising:
the communication terminal obtains a communication line shared by the communication terminal and the communication opposite end as a new communication line according to the current communication network capability of the communication terminal and the currently received communication network capability sent by the communication opposite end.
In a specific application, the communication network capability currently used by the communication terminal may be an account currently supported by the communication terminal, where the account includes: the mobile phone number of the user and the account number of the APP application, for example, the user has one or more mobile phone numbers (including one or more unicom numbers and one or more mobile numbers) and one or more account numbers of the APP application (QQ2, WeChat, SKYPE, etc.), and these account numbers can communicate. For example, after a preset jump triggering rule is satisfied, the communication terminal currently uses the mobile phone number K1, and receives the mobile phone number Q3 sent by the opposite communication terminal, then both communication parties establish a communication line of K1 and Q3 as a new communication line, and jump to the line of K1 and Q3. Therefore, one or both communication ends do not need to send all communication network capabilities (all communication lines or all account numbers) to the opposite end every time as in the above embodiment, and only one of the communication network capabilities needs to be sent to establish a new communication line, so that resource waste is avoided, and the communication safety of both communication ends can be ensured by jumping to the new communication line more quickly.
In an optional implementation manner of this embodiment, the sending, by the communication terminal, the currently used communication network capability to the correspondent node includes: the communication terminal detects the communication network capacity of the communication terminal to form a communication network capacity list, selects a new communication network capacity from the communication network capacity list according to a preset algorithm as the currently used communication network capacity, and sends the new communication network capacity to the communication opposite terminal. Therefore, both communication parties can form respective communication network capability lists, and the communication network capability lists contain one or more network communication capabilities (such as mobile phone numbers, APP application account numbers and the like) which can be currently used by the communication terminals, so that both communication parties can acquire the network communication capabilities of opposite terminals.
Wherein, the communication network capability list further comprises: the method further includes the following steps:
and when the selected new communication network capability is sent to the communication opposite terminal, the communication network capability identification corresponding to the new communication network capability is also sent to the communication opposite terminal. Therefore, the corresponding communication network capability can be found through the communication network capability identifier, for example, if the communication terminal and the opposite terminal both belong to the same internal network, the communication terminal only sends the internal identifier (which is equivalent to the communication network capability identifier), and the opposite communication terminal can or the number corresponding to the internal identifier, so as to establish a new communication line and jump to the new communication line.
In an optional implementation manner of this embodiment, the selecting a new communication network capability from the communication network capability list according to a preset algorithm includes at least one of the following:
the first method is as follows: the communication terminal selects the next communication network capability of the currently used communication network capability from the communication network capability list as a new communication network capability;
in the first mode, after meeting a preset pre-jump triggering rule, sequentially using the communication network capabilities in the communication network capability list; for example, the communication network capability list includes n communication network capabilities: l0 and L1 … … Ln, and the L0, L1 and L2 … … are used in sequence until the communication is finished.
The second method comprises the following steps: the communication terminal calculates one communication network capacity in the communication network capacity list according to a preset algorithm to serve as a new communication network capacity;
in the second mode, as an optional implementation mode, the communication terminal calculates a hopping factor according to a preset algorithm, determines a position of the new communication network capability in the communication network capability list according to the hopping factor, and selects the communication network capability corresponding to the position as the new communication network capability; for example, the list of communication network capabilities includes: n communication network capabilities: l0, L1 … … Ln, the list of hopping factors includes: r0 and R1 … … Rn calculate R0 through a preset algorithm to obtain a communication line L3 pointing to the 4 th position, and the like, and select new communication network capacity.
The third method comprises the following steps: the communication terminal randomly selects a new communication network capability from the communication network capability list.
In the third embodiment, for example, the communication network capability list includes: n communication network capabilities, wherein the communication network capabilities are identified as: l0 and L1 … … Ln, the communication terminal randomly selects L3, sends L3 to the opposite communication terminal, and the opposite communication terminal forms a new communication line for communication by utilizing L3 and the communication network capability currently used by the opposite communication terminal.
In an optional implementation manner of this embodiment, the meeting of the preset transition triggering rule includes: a jump trigger factor is reached; or acquiring a line jump instruction. After meeting the preset jump triggering rule, the line jump can be carried out.
Wherein, the jump trigger factor comprises at least one of the following: a hop period, a hop time point, and a communication data volume. The hopping period refers to that both communication parties hop according to the same line hopping rule after a period of time, and the hopping time point may refer to a specific time point, for example, 10 points and 11 points, where the hopping starts, or may refer to a time period in which the hopping is delayed, for example, after one hour, the hopping is performed after two hours, and the communication data amount may include a preset number of packets or an interaction number.
Wherein the line hopping instruction comprises at least one of: the method comprises the steps of sending a line hopping instruction by a communication opposite terminal, inputting the line hopping instruction by a current user of the communication terminal and generating the line hopping instruction by the communication terminal according to a preset rule. The line hopping instruction can be sent by an opposite terminal, or can be received by the communication terminal or generated by the communication terminal, and after the line hopping instruction is obtained, line hopping is carried out, so that the communication safety of both communication parties is ensured.
S103: and the communication terminal and the communication opposite terminal transmit communication data by using the communication line after jumping.
The embodiment can perform line hopping when the preset hopping trigger rule is met, so that data transmission is performed by using a new communication line, the insecurity of data transmission by using a fixed communication line is overcome, the problem that once the fixed communication line is maliciously monitored, the communication data transmitted by two communication parties can be maliciously stolen is solved, and the safety of the communication information of the two communication parties is ensured.
Example 2
Fig. 2 shows a process of line hopping in a communication process between terminals according to an embodiment of the present invention, and referring to fig. 2, a first terminal and a second terminal both execute the following processes:
s201: the first terminal and the second terminal communicate by using the current communication line;
s202: judging whether a trip point is reached, if not, executing S201, and if so, executing S203;
in a specific implementation, before reaching the transition point, or after reaching the transition point, the first terminal and the second terminal negotiate a public line pool according to respective communication network capabilities before performing step S203, where the public line pool includes one or more communication lines common to the first terminal and the second terminal.
S203: selecting a new communication line according to a preset line hopping rule;
this step can be implemented by adopting the optional implementation manner provided in embodiment 1, a public line pool may be negotiated in advance, a new communication line is selected from the public line pool, or the communication network capability may be directly sent to the opposite end, and a communication line common to the first terminal and the second terminal is obtained as the new communication line according to the current communication network capability of the first terminal and the currently received communication network capability sent by the opposite end.
S204: transmitting communication data by using the new communication line as the current communication line;
s205: judging whether to finish communication, if so, executing S206, and if not, executing S202;
s206: and finishing the communication.
Specifically, the first terminal and the second terminal in this embodiment may be mobile terminals such as a mobile phone, an IPAD, or terminals such as a PC that can perform network communication, and the communication between the first terminal and the second terminal may include a call, sending and receiving a short message, sending and receiving an email, and communication of an APP application installed on the terminal (e.g., qq, voice chat of a WeChat, or sending a message). The communication network capability of the terminal comprises: the communication lines currently available to the terminal, for example, the terminal may currently support a mobile line, a connected line, a telecommunication line, a network line, and may also include: the account currently available to the terminal, for example, the user has a communication number, a mobile number and a plurality of accounts (QQ2, wechat, SKYPE, etc.) of APP applications, which all can communicate, that is, the user can switch between wechat and mobile numbers with the correspondent node to dial a phone call in the case of supporting a network (e.g. a 4G network). Therefore, when the terminal communicates with the communication opposite terminal, the terminal can detect the communication line which can be connected with the communication opposite terminal according to the communication network capacity of the terminal, so that the communication line which can be used by the terminal can be determined, and a line pool of the terminal is formed.
Specifically, the jump threshold of the jump point may be set to a preset time interval or a preset communication data amount, and jump is performed once every time the jump threshold is reached. The first terminal and the second terminal may calculate the new communication line by, but not limited to, one of the following ways:
the first method is as follows: the method comprises the steps that a first terminal and a second terminal negotiate a public line pool in advance, the public line pool comprises a communication line list shared by the first terminal and the second terminal, and communication lines in the public line pool negotiated in advance are sequentially used after a jump point is judged to be reached; for example, a public line pool includes n communication lines: k0, K1 … … Kn, use K0, K1, K2 … … sequentially until the end of communication.
The second method comprises the following steps: the method comprises the steps that a first terminal and a second terminal negotiate in advance to negotiate a public line pool and a hopping factor list, the public line pool comprises a communication line list shared by the first terminal and the second terminal, after a hopping point is judged to be reached, a hopping factor is calculated through a preset algorithm, the position of a new communication line in the communication line list is determined according to the hopping factor, and the communication line corresponding to the position is selected as the new communication line; for example, pre-negotiated public line pools include: the n communication lines K0, K1 … … Kn, the hopping factor list includes: r0 and R1 … … Rn calculate R0 through a preset algorithm to obtain a communication line K3 pointing to the 4 th position, and the like, and a new communication line is selected until the communication is finished.
For example, in the second embodiment, the new communication line may be calculated by the following procedure (including steps a1 to a 5):
a1: after the jump point is reached, the first terminal generates a random number R, and the R is used as a jump factor;
a2: the first terminal sends the hopping factor R to the second terminal;
after reaching the jump point, the first terminal may also send a line jump instruction to the second terminal, where the sent line jump instruction may include a jump factor;
a3: the first terminal and the second terminal perform CRC or HASH operation on the hopping factor R (the step is optional);
a4: the first terminal and the second terminal perform a remainder operation on the hopping factor R (if step 3 is performed, the calculated CRC value or HASH value is performed), the calculation result S is R% N, and N is the number of the public line pool lines;
a5: and the first terminal and the second terminal correspondingly find the line identification in the public line pool according to the calculated result S, correspond to the corresponding communication line according to the line identification, and jump the current communication line to the corresponding communication line.
The third method comprises the following steps: the method comprises the steps that a first terminal and a second terminal negotiate a public line pool and a hopping factor list in advance, the public line pool comprises a communication line list shared by the first terminal and the second terminal, line hopping is initiated by the first terminal after a hopping point is judged to be reached, the first terminal randomly selects a new communication line from the public line pool, and a line identifier of the new communication line is sent to the second terminal; for example, the public line pool includes n communication lines, and the line identifiers thereof are: k0 and K1 … … Kn, the first terminal randomly selects K3, sends K3 to the second terminal, and the first terminal and the second terminal communicate by using a communication line corresponding to K3 until the communication is finished.
The method is as follows: similarly, the second terminal may also initiate line hopping, and in the same manner as above, the second terminal randomly selects a new communication line from the public line pool and sends the line identifier of the new communication line to the first terminal; and the first terminal receives the line identifier of the new communication line sent by the second terminal and selects the communication line corresponding to the line identifier in the public line pool. For example, the public line pool includes n communication lines, and the line identifiers thereof are: and K0 and K1 … … Kn, the first terminal receives K3, and selects the communication line corresponding to K3 from the communication lines in the pre-negotiated public line pool to carry out communication until the communication is finished. The two communication parties communicate by using the communication line corresponding to the K3.
The fifth mode is as follows: the first terminal and/or the second terminal send the communication network capacity used by the first terminal and/or the second terminal to the opposite terminal, and after the first terminal and/or the second terminal judge that the current communication network capacity reaches the trip point, the first terminal and the second terminal obtain a communication line shared by the first terminal and the second terminal as a new communication line according to the current communication network capacity and the currently received communication network capacity sent by the opposite terminal; taking the example that the first terminal sends the communication network capability to the second terminal, the method specifically includes at least one of the following modes:
mode 1: the first terminal selects the next communication network capability of the currently used communication network capability from the communication network capability list as a new communication network capability;
for example, the communication network capability list of the first terminal includes n communication network capabilities, which are identified as: l0 and L1 … … Ln, after reaching the jump point, use the communication network ability in the communication network ability list in turn; for example, the message is sent to the second terminal using L0, L1, and L2 … … in sequence until the communication is finished. The communication network capability list of the second terminal includes m communication network capabilities, and the communication network capabilities thereof are identified as: and P0 and P1 … … Pm, wherein the currently used communication network capability is Pm, and after the jump point is reached, the first terminal and the second terminal form a new communication line by utilizing Ln and Pm, and jump to the new communication line for communication until the communication is finished.
Mode 2: the first terminal calculates one communication network capacity in the communication network capacity list according to a preset algorithm to serve as the new communication network capacity;
in the second mode, as an optional implementation mode, the first terminal calculates a hopping factor according to a preset algorithm, determines a position of the new communication network capability in the communication network capability list according to the hopping factor, and selects the communication network capability corresponding to the position as the new communication network capability; for example, the list of communication network capabilities includes: n communication network capabilities: l0, L1 … … Ln, the list of hopping factors includes: r0 and R1 … … Rn calculate R0 through a preset algorithm to obtain a communication line L3 pointing to the 4 th position, and the like, select new communication network capacity and send the new communication network capacity to the second terminal.
Mode 3: and the communication terminal randomly selects the new communication network capability from the communication network capability list.
In the third embodiment, for example, the communication network capability list includes: n communication network capabilities, wherein the communication network capabilities are identified as: l0, L1 … … Ln, the communication terminal randomly selects L3, sends L3 to the second terminal, and the second terminal forms a new communication line for communication by using L3 and the communication network capability currently used by the second terminal.
Of course, the present invention is not limited to the first terminal sending the communication network capability to the second terminal, and the second terminal may send the communication network capability to the first terminal, and the first terminal in the above-described modes 1 to 3 may be replaced with the second terminal.
The hopping factor can be a random number, and the randomness of the hopping factor is ensured. The above public line pool further includes: the line identifier may be a code of the communication line, or may be a user number or a user account, as long as one communication line can be uniquely identified.
Fig. 3 shows a process of negotiating a public line pool according to respective communication network capabilities during communication between the terminals in fig. 2, and referring to fig. 3, the following process is executed between the first terminal and the second terminal:
s301: the first terminal and the second terminal communicate by using the current communication line;
s302: a first terminal acquires a line negotiation trigger instruction;
the acquisition mode of the line negotiation trigger instruction comprises at least one of the following modes: the line negotiation trigger instruction sent by the second terminal, the line negotiation trigger instruction input by the current user of the first terminal, and the line negotiation trigger instruction generated by the communication terminal according to the preset rule, for example, a line negotiation trigger instruction is generated once when a preset threshold value for generating the instruction is reached, and the preset threshold value for generating the instruction may be set to a preset time interval or a preset communication data amount.
S303: the first terminal detects the communication network capacity of the first terminal to form a first line pool;
s304: a first terminal sends a line negotiation request to a second terminal, wherein the line negotiation request carries a first line pool;
s305: after receiving a line negotiation request carrying a first line pool, a second terminal detects the communication network capacity of the second terminal to form a second line pool, forms a public line pool according to the first line pool and the second line pool, and stores the public line pool locally;
wherein, first circuit pond includes: one or more communication lines for use by the first terminal, the second line pool comprising: one or more communication lines for use by the second terminal.
S306: the second terminal sends a line negotiation response to the first terminal, wherein the line negotiation response carries a public line pool;
s307: the first terminal receives the public line pool and stores it locally.
Specifically, the first terminal and the second terminal in this embodiment may be mobile terminals such as a mobile phone, an IPAD, or terminals such as a PC that can perform network communication, and the communication between the first terminal and the second terminal may include a call, sending and receiving a short message, sending and receiving an email, and communication of an APP application installed on the terminal (e.g., qq, voice chat of a WeChat, or sending a message). The communication network capability of the terminal comprises: the communication lines currently available to the terminal, for example, the terminal may currently support a mobile line, a connected line, a telecommunication line, a network line, and may also include: the account currently available to the terminal, for example, the user has a communication number, a mobile number and a plurality of accounts (QQ2, wechat, SKYPE, etc.) of APP applications, which all can communicate, that is, the user can switch between wechat and mobile numbers with the correspondent node to dial a phone call in the case of supporting a network (e.g. a 4G network). Therefore, when the terminal communicates with the communication opposite terminal, the terminal can detect the communication line which can be connected with the communication opposite terminal according to the communication network capacity of the terminal, so that the communication line which can be used by the terminal can be determined, and a line pool of the terminal is formed.
Of course, the present invention is not limited to the first terminal initiating the line negotiation request, and may be initiated by the second terminal, and the flow is opposite to the flow shown in fig. 3.
Fig. 4 shows another process for negotiating a public line pool according to respective communication network capabilities during communication between the terminals in fig. 2, and referring to fig. 4, the following process is executed between the first terminal and the second terminal:
s401: the first terminal and the second terminal communicate by using the current communication line;
s402: a first terminal acquires a line negotiation trigger instruction;
the acquisition mode of the line negotiation trigger instruction comprises at least one of the following modes: the line negotiation trigger instruction sent by the second terminal, the line negotiation trigger instruction input by the current user of the first terminal, and the line negotiation trigger instruction generated by the communication terminal according to the preset rule, for example, a line negotiation trigger instruction is generated once when a preset threshold value for generating the instruction is reached, and the preset threshold value for generating the instruction may be set to a preset time interval or a preset communication data amount.
S403: the first terminal detects the communication network capacity of the first terminal to form a first line pool;
s404: a first terminal sends a line negotiation request to a second terminal, wherein the line negotiation request carries a first line pool;
s405: after receiving a line negotiation request carrying a first line pool, a second terminal detects the communication network capacity of the second terminal to form a second line pool, forms a public line pool according to the first line pool and the second line pool, and stores the public line pool locally;
wherein, first circuit pond includes: one or more communication lines for use by the first terminal, the second line pool comprising: one or more communication lines for use by the second terminal.
S406: the second terminal sends a line negotiation response to the first terminal, wherein the line negotiation response carries a second line pool;
s407: and after the first terminal receives the second line pool sent by the second terminal, forming a public line pool according to the first line pool and the second line pool, and storing the public line pool locally.
Specifically, the first terminal and the second terminal in this embodiment may be mobile terminals such as a mobile phone, an IPAD, or terminals such as a PC that can perform network communication, and the communication between the first terminal and the second terminal may include a call, sending and receiving a short message, sending and receiving an email, and communication of an APP application installed on the terminal (e.g., qq, voice chat of a WeChat, or sending a message). The communication network capability of the terminal comprises: the communication lines currently available to the terminal, for example, the terminal may currently support a mobile line, a connected line, a telecommunication line, a network line, and may also include: the account currently available to the terminal, for example, the user has a communication number, a mobile number and a plurality of accounts (QQ2, wechat, SKYPE, etc.) of APP applications, which all can communicate, that is, the user can switch between wechat and mobile numbers with the correspondent node to dial a phone call in the case of supporting a network (e.g. a 4G network). Therefore, when the terminal communicates with the communication opposite terminal, the terminal can detect the communication line which can be connected with the communication opposite terminal according to the communication network capacity of the terminal, so that the communication line which can be used by the terminal can be determined, and a line pool of the terminal is formed.
Of course, the present invention is not limited to the first terminal initiating the line negotiation request, and may be initiated by the second terminal, and the flow is opposite to the flow shown in fig. 4.
Fig. 5 shows another process of line hopping during communication between terminals, and referring to fig. 5, the following process is performed between a first terminal and a second terminal:
s501: the first terminal and the second terminal communicate by using the current communication line;
s502: a first terminal sends a line hopping request to a second terminal;
s503: the first terminal and the second terminal select a new communication line according to a preset line hopping rule respectively;
this step can be implemented by adopting the optional implementation manner provided in embodiment 1, a public line pool may be negotiated in advance, a new communication line is selected from the public line pool, or a communication network capability (for example, a mobile phone number that the terminal supports to use) may be directly sent to the opposite end, and a communication line that is common to the first terminal and the second terminal is obtained as the new communication line according to the current communication network capability of the terminal and the currently received communication network capability sent by the opposite end.
S504: transmitting communication data by using the new communication line as the current communication line;
s505: judging whether the communication is finished or not, if the communication is finished, executing S506, and if the communication is not finished, executing S502;
s506: and finishing the communication.
Specifically, the first terminal and the second terminal in this embodiment may be mobile terminals such as a mobile phone, an IPAD, or terminals such as a PC that can perform network communication, and the communication between the first terminal and the second terminal may include a call, sending and receiving a short message, sending and receiving an email, and communication of an APP application installed on the terminal (e.g., qq, voice chat of a WeChat, or sending a message). The communication network capability of the terminal comprises: the communication lines currently available to the terminal, for example, the terminal may currently support a mobile line, a connected line, a telecommunication line, a network line, and may also include: the account currently available to the terminal, for example, the user has a communication number, a mobile number and a plurality of accounts (QQ2, wechat, SKYPE, etc.) of APP applications, which all can communicate, that is, the user can switch between wechat and mobile numbers with the correspondent node to dial a phone call in the case of supporting a network (e.g. a 4G network). Therefore, when the terminal communicates with the communication opposite terminal, the terminal can detect the communication line which can be connected with the communication opposite terminal according to the communication network capacity of the terminal, so that the communication line which can be used by the terminal can be determined, and a line pool of the terminal is formed.
Specifically, the line hopping request may be only one instruction, or may include a hopping factor, where the hopping factor may be a random number, and the randomness of the hopping factor is ensured. Of course, the present invention is not limited to the first terminal sending the jump request, and may be initiated by the second terminal, and the procedure is opposite to the procedure shown in fig. 5. The first terminal and the second terminal may calculate the new communication line by, but not limited to, one of the following ways:
the first method is as follows: the method comprises the steps that a first terminal and a second terminal negotiate a public line pool in advance, the public line pool comprises a communication line list shared by the first terminal and the second terminal, and communication lines in the public line pool negotiated in advance are sequentially used after a jump point is judged to be reached; for example, a public line pool includes n communication lines: k0, K1 … … Kn, use K0, K1, K2 … … sequentially until the end of communication.
The second method comprises the following steps: the method comprises the steps that a first terminal and a second terminal negotiate in advance to negotiate a public line pool and a hopping factor list, the public line pool comprises a communication line list shared by the first terminal and the second terminal, after a hopping point is judged to be reached, a hopping factor is calculated through a preset algorithm, the position of a new communication line in the communication line list is determined according to the hopping factor, and the communication line corresponding to the position is selected as the new communication line; for example, pre-negotiated public line pools include: the n communication lines K0, K1 … … Kn, the hopping factor list includes: r0 and R1 … … Rn calculate R0 through a preset algorithm to obtain a communication line K3 pointing to the 4 th position, and the like, and a new communication line is selected until the communication is finished.
For example, in the second method, the new communication line may be calculated by the procedure shown in steps a 1-a 5.
The third method comprises the following steps: the method comprises the steps that a first terminal and a second terminal negotiate a public line pool and a hopping factor list in advance, the public line pool comprises a communication line list shared by the first terminal and the second terminal, line hopping is initiated by the first terminal after a hopping point is judged to be reached, the first terminal randomly selects a new communication line from the public line pool, and a line identifier of the new communication line is sent to the second terminal; for example, the public line pool includes n communication lines, and the line identifiers thereof are: k0 and K1 … … Kn, the first terminal randomly selects K3, sends K3 to the second terminal, and the first terminal and the second terminal communicate by using a communication line corresponding to K3 until the communication is finished.
The method is as follows: similarly, the second terminal may also initiate line hopping, and in the same manner as above, the second terminal randomly selects a new communication line from the public line pool and sends the line identifier of the new communication line to the first terminal; and the first terminal receives the line identifier of the new communication line sent by the second terminal and selects the communication line corresponding to the line identifier in the public line pool. For example, the public line pool includes n communication lines, and the line identifiers thereof are: and K0 and K1 … … Kn, the first terminal receives K3, and selects the communication line corresponding to K3 from the communication lines in the pre-negotiated public line pool to carry out communication until the communication is finished. The two communication parties communicate by using the communication line corresponding to the K3.
The above public line pool further includes: the line identifier may be a code of the communication line, or may be a user number or a user account, as long as one communication line can be uniquely identified.
The fifth mode is as follows: the first terminal and/or the second terminal send the communication network capacity used by the first terminal and/or the second terminal to the opposite terminal, and after the first terminal and/or the second terminal judge that the current communication network capacity reaches the trip point, the first terminal and the second terminal obtain a communication line shared by the first terminal and the second terminal as a new communication line according to the current communication network capacity and the currently received communication network capacity sent by the opposite terminal; taking the example that the first terminal sends the communication network capability to the second terminal, the method specifically includes at least one of the following modes:
mode 1: the first terminal selects the next communication network capability of the currently used communication network capability from the communication network capability list as a new communication network capability;
for example, the communication network capability list of the first terminal includes n communication network capabilities, which are identified as: l0 and L1 … … Ln, after reaching the jump point, use the communication network ability in the communication network ability list in turn; for example, the message is sent to the second terminal using L0, L1, and L2 … … in sequence until the communication is finished. The communication network capability list of the second terminal includes m communication network capabilities, and the communication network capabilities thereof are identified as: and P0 and P1 … … Pm, wherein the currently used communication network capability is Pm, and after the jump point is reached, the first terminal and the second terminal form a new communication line by utilizing Ln and Pm, and jump to the new communication line for communication until the communication is finished.
Mode 2: the first terminal calculates one communication network capacity in the communication network capacity list according to a preset algorithm to serve as the new communication network capacity;
in the second mode, as an optional implementation mode, the first terminal calculates a hopping factor according to a preset algorithm, determines a position of the new communication network capability in the communication network capability list according to the hopping factor, and selects the communication network capability corresponding to the position as the new communication network capability; for example, the list of communication network capabilities includes: n communication network capabilities: l0, L1 … … Ln, the list of hopping factors includes: r0 and R1 … … Rn calculate R0 through a preset algorithm to obtain a communication line L3 pointing to the 4 th position, and the like, select new communication network capacity and send the new communication network capacity to the second terminal.
Mode 3: and the communication terminal randomly selects the new communication network capability from the communication network capability list.
In the third embodiment, for example, the communication network capability list includes: n communication network capabilities, wherein the communication network capabilities are identified as: l0, L1 … … Ln, the communication terminal randomly selects L3, sends L3 to the second terminal, and the second terminal forms a new communication line for communication by using L3 and the communication network capability currently used by the second terminal.
Of course, the present invention is not limited to the first terminal sending the communication network capability to the second terminal, and the second terminal may send the communication network capability to the first terminal, and the first terminal in the above-described modes 1 to 3 may be replaced with the second terminal.
Fig. 6 shows another process of line hopping during communication between terminals, and referring to fig. 6, the first terminal and the second terminal both perform the following processes:
s601: the first terminal and the second terminal communicate by using the current communication line, and each communication data packet sent to the opposite terminal comprises a prejudgment data packet;
the pre-judging data packet comprises respective communication network capabilities of the first terminal and the second terminal or a communication network capability list; the communication network capability of the terminal comprises: the communication lines currently supported by the terminal, for example, the terminal may currently support a mobile line, a link line, a telecommunication line, and a network line, and the 4 communication lines currently supported by the communication terminal may respectively correspond to the corresponding line identifiers K1, K2, K3, and K4, or may also include: the account number currently supported by the terminal includes: the mobile phone number of the user and the account number of the APP application, for example, the user has one or more mobile phone numbers (including one or more unicom numbers and one or more mobile numbers) and one or more account numbers (QQ2, wechat, SKYPE, etc.) of the APP application, which can communicate, and the communication network capability list is a set of all communication network capabilities supported by the terminal. For example, the first terminal has 5 mobile phone numbers, the second terminal has 3 mobile phone numbers, when the preset jump triggering rule is met, the first terminal sends a new mobile phone number to the second terminal according to the preset rule, the second terminal learns that the first terminal jumps to the new mobile phone number, a new communication line is formed with the new mobile phone number, further, the second terminal can also jump to the new mobile phone number, the mobile phone number to be jumped is sent to the first terminal, and the first terminal and the second terminal can form a new communication line according to the respective jumped new mobile phone numbers. Of course, the hopping may also be performed between the operator lines, or between the operator lines and the network lines, for example, in a case where the user supports a network (e.g., a 4G network), the communication terminal and the correspondent node are friends of a wechat phone, and then the communication terminal and the correspondent node may switch between the wechat (network line) and the mobile number (mobile line) to use a dial-up phone. Therefore, when the communication terminal communicates with the communication opposite terminal, the communication terminal can detect the communication line which can be connected with the communication opposite terminal according to the communication network capacity of the communication terminal, determine the communication line which can be used by the communication terminal and form a line pool of the communication terminal.
S602: judging whether a trip point is reached, if not, executing S601, and if so, executing S603;
s603: comparing a pre-judging data packet to be sent to a communication opposite terminal currently with a pre-judging data packet received from the communication opposite terminal last time, and acquiring a public communication line from the two pre-judging data packets to form a public line pool;
the public line pool comprises one or more communication lines which are shared by the first terminal and the second terminal; it should be noted that the communication opposite end of the first terminal is the second terminal, and the communication opposite end of the second terminal is the first terminal.
S604: selecting a new communication line according to a preset line hopping rule;
s605: transmitting communication data by using the new communication line as the current communication line;
s606: judging whether the communication is finished or not, if the communication is finished, executing S607, and if the communication is not finished, executing S602;
s607: and finishing the communication.
Specifically, the first terminal and the second terminal in this embodiment may be mobile terminals such as a mobile phone, an IPAD, or terminals such as a PC that can perform network communication, and the communication between the first terminal and the second terminal may include a call, sending and receiving a short message, sending and receiving an email, and communication of an APP application installed on the terminal (e.g., qq, voice chat of a WeChat, or sending a message).
Specifically, the jump threshold of the jump point may be set to a preset time interval or a preset communication data amount, and jump is performed once every time the jump threshold is reached. The first terminal and the second terminal may calculate the new communication line by, but not limited to, one of the following ways:
the first method is as follows: the method comprises the steps that a first terminal and a second terminal negotiate a public line pool in advance, the public line pool comprises a communication network line list shared by the first terminal and the second terminal, and communication lines in the public line pool negotiated in advance are sequentially used after a jump point is judged to be reached; for example, a public line pool includes n communication lines: k0, K1 … … Kn, use K0, K1, K2 … … sequentially until the end of communication.
The second method comprises the following steps: the method comprises the steps that a first terminal and a second terminal negotiate in advance to negotiate a public line pool and a hopping factor list, the public line pool comprises a communication network line list shared by the first terminal and the second terminal, after a hopping point is judged to be reached, a hopping factor is calculated through a preset algorithm, the position of a new communication line in the communication line list is determined according to the hopping factor, and the communication line corresponding to the position is selected as the new communication line; for example, pre-negotiated public line pools include: the n communication lines K0, K1 … … Kn, the hopping factor list includes: r0 and R1 … … Rn calculate R0 through a preset algorithm to obtain a communication line K3 pointing to the 4 th position, and the like, and a new communication line is selected until the communication is finished.
For example, in the second method, the new communication line may be calculated by the procedure shown in steps a 1-a 5.
The third method comprises the following steps: the method comprises the steps that a first terminal and a second terminal negotiate a public line pool and a hopping factor list in advance, the public line pool comprises a communication network line list shared by the first terminal and the second terminal, line hopping is initiated by the first terminal after a hopping point is judged to be reached, the first terminal randomly selects a new communication line from the public line pool, and a line identifier of the new communication line is sent to the second terminal; for example, the public line pool includes n communication lines, and the line identifiers thereof are: k0 and K1 … … Kn, the first terminal randomly selects K3, sends K3 to the second terminal, and the first terminal and the second terminal communicate by using a communication line corresponding to K3 until the communication is finished.
The method is as follows: similarly, the second terminal may also initiate line hopping, and in the same manner as above, the second terminal randomly selects a new communication line from the public line pool and sends the line identifier of the new communication line to the first terminal; and the first terminal receives the line identifier of the new communication line sent by the second terminal and selects the communication line corresponding to the line identifier in the public line pool. For example, the public line pool includes n communication lines, and the line identifiers thereof are: and K0 and K1 … … Kn, the first terminal receives K3, and selects the communication line corresponding to K3 from the communication lines in the pre-negotiated public line pool to carry out communication until the communication is finished. The two communication parties communicate by using the communication line corresponding to the K3.
The fifth mode is as follows: the first terminal and/or the second terminal send the communication network capacity used by the first terminal and/or the second terminal to the opposite terminal, and after the first terminal and/or the second terminal judge that the current communication network capacity reaches the trip point, the first terminal and the second terminal obtain a communication line shared by the first terminal and the second terminal as a new communication line according to the current communication network capacity and the currently received communication network capacity sent by the opposite terminal; taking the example that the first terminal sends the communication network capability to the second terminal, the method specifically includes at least one of the following modes:
mode 1: the first terminal selects the next communication network capability of the currently used communication network capability from the communication network capability list as a new communication network capability;
for example, the communication network capability list of the first terminal includes n communication network capabilities, which are identified as: l0 and L1 … … Ln, after reaching the jump point, use the communication network ability in the communication network ability list in turn; for example, the message is sent to the second terminal using L0, L1, and L2 … … in sequence until the communication is finished. The communication network capability list of the second terminal includes m communication network capabilities, and the communication network capabilities thereof are identified as: and P0 and P1 … … Pm, wherein the currently used communication network capability is Pm, and after the jump point is reached, the first terminal and the second terminal form a new communication line by utilizing Ln and Pm, and jump to the new communication line for communication until the communication is finished.
Mode 2: the first terminal calculates one communication network capacity in the communication network capacity list according to a preset algorithm to serve as the new communication network capacity;
in the second mode, as an optional implementation mode, the first terminal calculates a hopping factor according to a preset algorithm, determines a position of the new communication network capability in the communication network capability list according to the hopping factor, and selects the communication network capability corresponding to the position as the new communication network capability; for example, the list of communication network capabilities includes: n communication network capabilities: l0, L1 … … Ln, the list of hopping factors includes: r0 and R1 … … Rn calculate R0 through a preset algorithm to obtain a communication line L3 pointing to the 4 th position, and the like, select new communication network capacity and send the new communication network capacity to the second terminal.
Mode 3: and the communication terminal randomly selects the new communication network capability from the communication network capability list.
In the third embodiment, for example, the communication network capability list includes: n communication network capabilities, wherein the communication network capabilities are identified as: l0, L1 … … Ln, the communication terminal randomly selects L3, sends L3 to the second terminal, and the second terminal forms a new communication line for communication by using L3 and the communication network capability currently used by the second terminal.
Of course, the present invention is not limited to the first terminal sending the communication network capability to the second terminal, and the second terminal may send the communication network capability to the first terminal, and the first terminal in the above-described modes 1 to 3 may be replaced with the second terminal.
The hopping factor can be a random number, and the randomness of the hopping factor is ensured. The above public line pool further includes: the line identifier may be a code of the communication line, or may be a user number or a user account, as long as one communication line can be uniquely identified.
Example 3
The present embodiment provides a communication system, as shown in fig. 7, the communication system 10 includes a first terminal 101 and a second terminal 102, where the first terminal 101 and the second terminal 102 adopt the same structure, the first terminal 101 includes a communication device 103, the second terminal 102 includes a communication device 104, the communication device 103 and the communication device 104 have the same structure, the first terminal 101 and the second terminal 102 in this embodiment may be mobile terminals such as mobile phones, IPADs, etc., or terminals such as PCs, etc. capable of performing network communication, and the communication between the communication terminal and the opposite communication terminal may include a call between the communication terminals, a short message, a mail, a communication of APP applications installed on the terminal (e.g., qq, a voice chat of a WeChat, or a message sending), etc.
In this embodiment, only the communication device 103 is taken as an example for description, the communication device 103 corresponds to the method of line hopping in the communication process in embodiment 1 one to one, and details are not repeated here, and only briefly described below:
fig. 8 shows a structural diagram of a communication device 103 according to an embodiment of the present invention, and referring to fig. 1, the communication device according to the embodiment of the present invention includes: a communication module 1031 and a line hopping module 1032, wherein:
a communication module 1031 for communicating with the communication device 104;
a line hopping module 1032, configured to select a new communication line according to a preset line hopping rule when a preset hopping trigger rule is satisfied in a process of communicating with the communication device 104, and hop a currently used communication line into the new communication line;
the communication module 1031 is further configured to transmit the communication data through the hopped communication line.
The embodiment can perform line hopping when the preset hopping trigger rule is met, so that data transmission is performed by using a new communication line, the defect that data transmission is performed by using a fixed communication line is overcome, the problem that once the fixed communication line is maliciously monitored, the communication data transmitted by two communication parties can be maliciously stolen is solved, and the safety of communication information of the two communication parties is ensured.
In an optional implementation manner of this embodiment, the line hopping module 1032 is further configured to negotiate, with the communication device 104, a common line pool according to respective communication network capabilities before the preset hopping trigger rule is satisfied or before a new communication line is selected according to the preset line hopping rule after the preset hopping trigger rule is satisfied and before the currently used communication line is hopped to be the new communication line, where the common line pool includes one or more communication lines that are common to the communication device and the communication device 104. The line hopping module 1032 is configured to select a new communication line according to a preset line hopping rule, and includes: and selecting a new communication line in the public line pool according to a preset line hopping rule.
In this embodiment, the line hopping may be performed when a preset hopping trigger rule is satisfied, but the common line pool may be negotiated at any time in the communication process, for example, the common line pool is negotiated before the preset hopping trigger rule is satisfied, or the common line pool is negotiated after the preset hopping trigger rule is satisfied, and the line hopping is performed according to the preset hopping rule after the common line pool is negotiated, so that the common line pool may be negotiated at any time, user experience is improved, and security of communication information of both parties of communication is ensured.
In this alternative embodiment, the communication network capabilities of the communication terminal include: the communication lines currently available to the communication terminal, for example, the communication terminal may currently support a mobile line, a link line, a telecommunication line, a network line, and may also include: the account currently available to the communication terminal, for example, the user has a communication number, a mobile number and a plurality of accounts (QQ2, wechat, SKYPE, etc.) of APP applications, which all can communicate, that is, the user can switch between wechat and mobile number to dial with the correspondent in the case of supporting a network (e.g. 4G network). Therefore, when the communication terminal communicates with the communication opposite terminal, the communication terminal can detect the communication line which can be connected with the communication opposite terminal according to the communication network capacity of the communication terminal, so that the communication line which can be used by the communication terminal can be determined, and a line pool of the communication terminal is formed.
In this optional embodiment, the negotiation of the public line pool by the communication terminal and the communication peer according to their respective communication network capabilities includes various specific implementation manners, which are described below by way of example, but other manners of negotiating the public line pool are not excluded.
In an optional implementation manner of this embodiment, the line hopping module 1032 is further configured to negotiate, with the communication device 104, a common line pool according to respective communication network capabilities, including:
the line hopping module 1032 detects the communication network capability of itself to form a first line pool, and sends the first line pool to the communication module 1031; the line hopping module 1032 receives and stores the public line pool sent by the communication device 104;
after receiving the first line pool, the line hopping module of the communication device 104 detects the communication network capability of itself through the communication module thereof to form a second line pool, forms a public line pool according to the first line pool and the second line pool, and sends the public line pool to the communication device 103;
the communication module 1031 is further configured to send the first line pool to the communication device 104, receive a public line pool sent by the communication device 104, and send the public line pool to the line jump module 1302.
Wherein, first circuit pond includes: one or more communication lines for use by the communication terminal; the second line pool includes: one or more communication lines for use by a correspondent node; the public line pool includes one or more communication lines common to the communication devices and the communication device 104.
In this optional embodiment, an implementation manner of negotiating a public line pool is provided, and the received line pool may be compared with a line pool generated by the communication peer, or the line pool may be sent by the communication peer, and the received line pool is compared with the line pool generated by the communication peer by the communication terminal (the implementation manner is the same as above, and is not described here again), so that a communication line common to the communication terminal and the communication peer is found, and the public line pool is generated.
In an alternative embodiment of this embodiment,
the line hopping module 1032 is further configured to negotiate a public line pool with the communication device 104 according to respective communication network capabilities, including:
the line hopping module 1032 detects the communication network capability of itself to form a first line pool, and sends the first line pool to the communication module 1031; after the communication module 1031 receives the second line pool, detecting the communication network capability thereof to form a first line pool, and forming a public line pool according to the first line pool and the second line pool;
the communication module 1031 is further configured to receive the first line pool sent by the line hopping module 1032 and send the first line pool to the communication device 104; and is also used to receive the second line pool sent by the communication device 104;
wherein, first circuit pond includes: one or more communication lines for use by the communication terminal, the second line pool comprising: one or more communication lines for use by a correspondent node; the public line pool includes one or more communication lines common to the communication devices and the communication device 104.
In this optional embodiment, an implementation manner of negotiating a public line pool is provided, and a communication terminal and a communication peer may find a communication line common to the communication terminal and the communication peer respectively by comparing a received line pool with a line pool generated by the communication peer, so as to generate the public line pool.
In another optional implementation manner of this embodiment, the communication module 1031 is further configured to, in a process of communicating with the communication device 104, include a pre-determined data packet in a communication data packet sent to the communication device 104, and receive the communication data packet sent by the communication device 104 and including the pre-determined data packet, where the pre-determined data packet includes respective communication network capabilities of the communication device and the communication device 104;
the line hopping module 1032 is further configured to, after meeting the preset hopping trigger rule, select a new communication line from the public line pool according to the preset line hopping rule, and negotiate the public line pool with the communication device 104 according to respective communication network capabilities before changing the currently used communication line into the new communication line, where the negotiation includes:
after meeting the preset jump triggering rule, comparing the pre-judging data packet to be currently sent to the communication opposite end with the pre-judging data packet received from the communication opposite end at the last time, and acquiring a public communication line from the two pre-judging data packets to form a public line pool, wherein the public line pool comprises one or more communication lines shared by the communication device and the communication device 104.
In this optional embodiment, an implementation manner of negotiating a public line pool is provided, and a public line pool may be generated by finding a communication line common to a communication terminal and a communication peer through respective comparison of pre-determined packets.
In an optional implementation manner of this embodiment, the public line pool further includes: the communication terminal and the communication opposite terminal share one or more communication line identifiers, and the line identifiers can be codes of the communication lines, user numbers or user accounts as long as one communication line can be uniquely identified;
in an optional implementation manner of this embodiment, the communication module 1031 is further configured to select a new communication line according to a preset line hopping rule before meeting a preset hopping trigger rule, or after meeting the preset hopping trigger rule, and send the currently used communication network capability of the communication device to the communication device 104 before the currently used communication line is hopped to be the new communication line; and/or receive the currently used communication network capabilities sent by the communication device 104;
the line hopping module 1032 is configured to select a new communication line according to a preset line hopping rule, and includes:
the line hopping module obtains a communication line shared by the communication device 103 and the communication device 104 as the new communication line according to the current communication network capability of the line hopping module and the currently received communication network capability sent by the communication device 104.
In a specific application, the communication network capability currently used by the communication device 103 may be an account currently used by the communication device 103, for example, the user has one or more mobile phone numbers (including one or more communication numbers and one or more mobile numbers) and one or more account numbers (QQ2, wechat, SKYPE, etc.) of APP applications, and these account numbers may perform communication. For example, after the preset jump triggering rule is satisfied, the communication device 103 currently uses the cell phone number K1, and receives the cell phone number Q3 sent by the communication device 104, then both parties of the communication establish a communication line of K1 and Q3 as a new communication line, and jump to the line of K1 and Q3. Therefore, one end or both sides of communication do not need to send all communication network capabilities to the opposite end every time in the above embodiment, and only one of the communication network capabilities needs to be sent to establish a new communication line, so that resource waste is avoided, and the communication can be more quickly hopped to the new communication line, thereby ensuring the communication safety of both sides of communication.
In an optional implementation manner of this embodiment, the line hopping module 1032 is further configured to detect a communication network capability of the line hopping module to form a communication network capability list, select a communication network capability currently used by a new communication network capability from the communication network capability list according to a preset algorithm, and send the communication network capability to the communication module. Therefore, both communication parties can form respective communication network capability lists, and the communication network capability lists contain one or more network communication capabilities (such as mobile phone numbers, APP application account numbers and the like) which can be currently used by the communication terminals, so that both communication parties can acquire the network communication capabilities of opposite terminals.
In an optional implementation manner of this embodiment, the communication network capability list further includes: communication network capability identifiers corresponding to one or more communication network capabilities in the communication network capability list;
the line hopping module 1032 is further configured to send the currently used communication network capability to the communication module, and send a communication network capability identifier corresponding to the currently used communication network capability to the communication module;
the communication module 1031 is further configured to send the communication network capability identifier corresponding to the currently used communication network capability to the communication device 104 when sending the currently used communication network capability to the communication device 104.
Therefore, the corresponding communication network capability can be found through the communication network capability identifier, for example, if the communication terminal and the opposite terminal both belong to the same internal network, the communication terminal only sends the internal identifier (which is equivalent to the communication network capability identifier), and the opposite communication terminal can or the number corresponding to the internal identifier, so as to establish a new communication line and jump to the new communication line.
In an optional implementation manner of this embodiment, the line hopping module 1032 is further configured to select a new communication network capability from the communication network capability list according to a preset algorithm, where the selecting includes at least one of the following manners:
selecting the next communication network capability of the currently used communication network capabilities from the communication network capability list as a new communication network capability;
calculating to obtain one communication network capability in the communication network capability list as the new communication network capability according to a preset algorithm;
randomly selecting the new communication network capability from the communication network capability list.
A line hopping module 1032, configured to select a new communication line from the public line pool according to a preset line hopping rule, where the new communication line includes at least one of:
the first method is as follows: selecting a next communication line of the currently used communication lines from the public line pool as a new communication line;
in the first mode, communication lines in a public line pool negotiated in advance are used in sequence; for example, a public line pool includes n communication lines: k0, K1 … … Kn, use K0, K1, K2 … … sequentially until the end of communication.
The second method comprises the following steps: calculating to obtain a communication line in the public line pool as a new communication line according to a preset algorithm;
in the second mode, as an optional implementation manner, the line hopping module 1032 calculates a hopping factor according to a preset algorithm, determines a position of a new communication line in the public line pool according to the hopping factor, and selects the communication line corresponding to the position as the new communication line; for example, pre-negotiated public line pools include: the n communication lines K0, K1 … … Kn, the hopping factor list includes: r0 and R1 … … Rn calculate R0 through a preset algorithm to obtain a communication line K3 pointing to the 4 th position, and the like, and a new communication line is selected.
For example, in the second method, the new communication line may be calculated by the procedure shown in steps a 1-a 5.
The third method comprises the following steps: the line hopping module 1032 randomly selects a new communication line from the public line pool, and sends the line identifier of the new communication line to the communication device 104 through the communication module 1031; for example, the public line pool includes n communication lines, and the line identifiers thereof are: the K0, K1 … … Kn, the line hopping module 1032 randomly selects K3, sends K3 to the communication device 104, and the two communication parties communicate by using the communication line corresponding to K3.
The method is as follows: the communication module 1031 is further configured to receive the line identifier of the new communication line sent by the communication device 104, and forward the line identifier to the line hopping module 1032. The line hopping module 1032 selects a communication line corresponding to the line identifier in the public line pool. For example, the public line pool includes n communication lines, and the line identifiers thereof are: and the communication modules 1031 receive the K3, the line hopping module 1032 selects the communication line corresponding to the K3 from the communication lines in the pre-negotiated public line pool for communication, and the two communication parties communicate by using the communication line corresponding to the K3.
The communication module 1031 is further configured to receive the line identifier of the new communication line sent by the communication device 104, and forward the line identifier to the line hopping module 1032.
Further, in an optional implementation manner of this embodiment, the communication module 1031 is further configured to send the line identifier of a new communication line to the communication device 104 after the line hopping module 1032 selects a new communication line in the public line pool according to a preset line hopping rule. Therefore, the new communication line used by both communication parties is further ensured to be the same line.
In an optional implementation manner of this embodiment, the meeting of the preset transition triggering rule includes: a jump trigger factor is reached; or acquiring a line jump instruction. After meeting the preset jump triggering rule, the line jump can be carried out.
Wherein, the jump trigger factor comprises at least one of the following: a hop period, a hop time point, and a communication data volume. The hopping period refers to that both communication parties hop according to the same line hopping rule after a period of time, and the hopping time point may refer to a specific time point, for example, 10 points and 11 points, where the hopping starts, or may refer to a time period in which the hopping is delayed, for example, after one hour, the hopping is performed after two hours, and the communication data amount may include a preset number of packets or an interaction number.
Wherein the line hopping instruction comprises at least one of: the method comprises the steps of sending a line hopping instruction by a communication opposite terminal, inputting the line hopping instruction by a current user of the communication terminal and generating the line hopping instruction by the communication terminal according to a preset rule. The line hopping instruction can be sent by an opposite terminal, or can be received by the communication terminal or generated by the communication terminal, and after the line hopping instruction is obtained, line hopping is carried out, so that the communication safety of both communication parties is ensured.
The embodiment can perform line hopping when the preset hopping trigger rule is met, so that data transmission is performed by using a new communication line, the insecurity of data transmission by using a fixed communication line is overcome, the problem that once the fixed communication line is maliciously monitored, the communication data transmitted by two communication parties can be maliciously stolen is solved, and the safety of the communication information of the two communication parties is ensured.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and alternate implementations are included within the scope of the preferred embodiment of the present invention in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the present invention.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
It will be understood by those skilled in the art that all or part of the steps carried by the method for implementing the above embodiments may be implemented by hardware that is related to instructions of a program, and the program may be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
In addition, functional units in the embodiments of the present invention may be integrated into one processing module, or each unit may exist alone physically, or two or more units are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of a software functional module and sold or used as a separate product, may also be stored in a computer readable storage medium.
The storage medium mentioned above may be a read-only memory, a magnetic or optical disk, etc.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention, and that variations, modifications, substitutions and alterations can be made in the above embodiments by those of ordinary skill in the art without departing from the principle and spirit of the present invention. The scope of the invention is defined by the appended claims and equivalents thereof.